LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ConvertMCTruthToG4.h
Go to the documentation of this file.
1 
16 #ifndef G4BASE_CONVERTMCTRUTHTOG4_H
17 #define G4BASE_CONVERTMCTRUTHTOG4_H
18 
19 // G4 Includes
20 #include "Geant4/G4VUserPrimaryGeneratorAction.hh"
21 #include "Geant4/G4ParticleTable.hh"
22 #include "Geant4/globals.hh"
23 
24 // ART Includes
27 
28 // Forward declarations
29 class G4Event;
30 namespace simb {
31  class MCTruth;
32 }
33 
34 namespace g4b {
35 
36  class ConvertMCTruthToG4 : public G4VUserPrimaryGeneratorAction {
37 
38  public:
41  virtual ~ConvertMCTruthToG4();
42 
44  void Reset();
45 
48  void Append( art::Ptr<simb::MCTruth> &mct );
49 
52  void Append( const simb::MCTruth* mct );
53 
58  virtual void GeneratePrimaries( G4Event* );
59 
60  private:
61  static G4ParticleTable* fParticleTable;
62  std::vector<const simb::MCTruth*> fConvertList;
63  std::map<G4int, G4int> fUnknownPDG;
64  };
65 
66 } // namespace g4b
67 
68 #endif // G4BASE_CONVERTMCTRUTHTOG4_H
static G4ParticleTable * fParticleTable
Geant4&#39;s table of particle definitions.
ntupleExperimental Reset()
basic interface to Geant4 for ART-based software
ART objects.
std::map< G4int, G4int > fUnknownPDG
map of unknown PDG codes to instances
Event generator information.
Definition: MCTruth.h:32
std::vector< const simb::MCTruth * > fConvertList
List of MCTruth objects to convert for this spill.