|
||||
File indexing completed on 2025-01-18 09:55:23
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 0014 #ifndef DDG4_GEANT4MONTECARLOTRUTH_H 0015 #define DDG4_GEANT4MONTECARLOTRUTH_H 0016 0017 // Framework include files 0018 #include <DDG4/Geant4Action.h> 0019 0020 // C/C++ include files 0021 #include <map> 0022 0023 // Forward declarations 0024 class G4Step; 0025 class G4Track; 0026 class G4Event; 0027 0028 /// Namespace for the AIDA detector description toolkit 0029 namespace dd4hep { 0030 0031 /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit 0032 namespace sim { 0033 0034 // Forward declarations 0035 class Geant4Particle; 0036 0037 /// Default Interface class to handle monte carlo truth records 0038 /** 0039 * \author M.Frank 0040 * \version 1.0 0041 * \ingroup DD4HEP_SIMULATION 0042 */ 0043 class Geant4MonteCarloTruth { 0044 protected: 0045 /// Standard constructor 0046 Geant4MonteCarloTruth(); 0047 public: 0048 /// Default destructor 0049 virtual ~Geant4MonteCarloTruth(); 0050 /// Mark a Geant4 track to be kept for later MC truth analysis 0051 virtual void mark(const G4Track* track) = 0; 0052 /// Store a track, with a flag 0053 virtual void mark(const G4Track* track, int reason) = 0; 0054 /// Mark a Geant4 track of the step to be kept for later MC truth analysis 0055 virtual void mark(const G4Step* step) = 0; 0056 /// Store a track produced in a step to be kept for later MC truth analysis 0057 virtual void mark(const G4Step* step, int reason) = 0; 0058 }; 0059 0060 /// Void implementation of the Monte-Carlo thruth handler doing nothing at all. 0061 /** 0062 * \author M.Frank 0063 * \version 1.0 0064 * \ingroup DD4HEP_SIMULATION 0065 */ 0066 class Geant4DummyTruthHandler : public Geant4Action, public Geant4MonteCarloTruth { 0067 public: 0068 /// Standard constructor 0069 Geant4DummyTruthHandler(Geant4Context* ctxt,const std::string& nam); 0070 /// Default destructor 0071 virtual ~Geant4DummyTruthHandler(); 0072 /// Mark a Geant4 track to be kept for later MC truth analysis. Default flag: CREATED_HIT 0073 virtual void mark(const G4Track* track); 0074 /// Store a track, with a flag 0075 virtual void mark(const G4Track* track, int reason); 0076 /// Mark a Geant4 track of the step to be kept for later MC truth analysis. Default flag: CREATED_HIT 0077 virtual void mark(const G4Step* step); 0078 /// Store a track produced in a step to be kept for later MC truth analysis 0079 virtual void mark(const G4Step* step, int reason); 0080 }; 0081 0082 } // End namespace sim 0083 } // End namespace dd4hep 0084 0085 #endif // DDG4_GEANT4MONTECARLOTRUTH_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |