Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:11

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MAIN_PHG4TRUTHSUBSYSTEM_H
0004 #define G4MAIN_PHG4TRUTHSUBSYSTEM_H
0005 
0006 #include "PHG4Subsystem.h"
0007 
0008 #include <string>
0009 
0010 class PHCompositeNode;
0011 class PHG4EventAction;
0012 class PHG4TrackingAction;
0013 class PHG4TruthTrackingAction;
0014 class PHG4TruthEventAction;
0015 
0016 class PHG4TruthSubsystem : public PHG4Subsystem
0017 {
0018  public:
0019   //! constructor
0020   PHG4TruthSubsystem(const std::string &name = "TRUTH");
0021 
0022   //! destructor
0023   ~PHG4TruthSubsystem(void) override
0024   {
0025   }
0026 
0027   //! init
0028   int InitRun(PHCompositeNode *) override;
0029 
0030   //! event processing
0031   int process_event(PHCompositeNode *) override;
0032 
0033   //! event processing
0034   int process_after_geant(PHCompositeNode *) override;
0035 
0036   //! Clean up after each event.
0037   int ResetEvent(PHCompositeNode *) override;
0038 
0039   //! accessors (reimplemented)
0040   PHG4EventAction *GetEventAction(void) const override;
0041   PHG4TrackingAction *GetTrackingAction(void) const override;
0042 
0043   //! only save the G4 truth information that is associated with the embedded particle
0044   void SetSaveOnlyEmbeded(bool b = true) { m_SaveOnlyEmbededFlag = b; };
0045 
0046  private:
0047   PHG4TruthEventAction *m_EventAction;
0048 
0049   PHG4TruthTrackingAction *m_TrackingAction;
0050 
0051   //! only save the G4 truth information that is associated with the embedded particle
0052   bool m_SaveOnlyEmbededFlag;
0053 };
0054 
0055 #endif