Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:19:23

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MAIN_PHG4PHENIXTRACKINGACTION_H
0004 #define G4MAIN_PHG4PHENIXTRACKINGACTION_H
0005 
0006 #include <Geant4/G4UserTrackingAction.hh>
0007 #include <list>
0008 
0009 // Master UserTrackingAction: tracking actions can be registered with this class
0010 // and they will be called in the order of registration.
0011 
0012 class G4Track;
0013 class PHG4TrackingAction;
0014 
0015 class PHG4PhenixTrackingAction : public G4UserTrackingAction
0016 {
0017  public:
0018   PHG4PhenixTrackingAction(void)
0019     : verbosity_(0)
0020   {
0021   }
0022 
0023   ~PHG4PhenixTrackingAction() override;
0024 
0025   //! register an action. This is called in PHG4Reco::Init based on which actions are found on the tree
0026   void AddAction(PHG4TrackingAction* action) { actions_.push_back(action); }
0027 
0028   void PreUserTrackingAction(const G4Track*) override;
0029 
0030   void PostUserTrackingAction(const G4Track*) override;
0031 
0032   //! Get/Set verbosity level
0033   void Verbosity(int val) { verbosity_ = val; }
0034   int Verbosity() const { return verbosity_; }
0035 
0036  private:
0037   //! list of subsystem specific Event actions
0038   typedef std::list<PHG4TrackingAction*> ActionList;
0039   ActionList actions_;
0040   int verbosity_;
0041 };
0042 
0043 #endif