Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MAIN_PHG4PHENIXSTACKINGACTION_H
0004 #define G4MAIN_PHG4PHENIXSTACKINGACTION_H
0005 
0006 #include <Geant4/G4ClassificationOfNewTrack.hh>
0007 #include <Geant4/G4UserStackingAction.hh>
0008 
0009 #include <list>
0010 
0011 class G4Track;
0012 class PHG4StackingAction;
0013 
0014 class PHG4PhenixStackingAction : public G4UserStackingAction
0015 {
0016  public:
0017   PHG4PhenixStackingAction(void)
0018   {
0019   }
0020 
0021   ~PHG4PhenixStackingAction() override;
0022 
0023   //! register an action. This is called in PHG4Reco::Init based on which actions are found on the tree
0024   void AddAction(PHG4StackingAction* action)
0025   {
0026     if (action)
0027     {
0028       actions_.push_back(action);
0029     }
0030   }
0031 
0032   G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) override;
0033   void PrepareNewEvent() override;
0034 
0035  private:
0036   //! list of subsystem specific stacking actions
0037   typedef std::list<PHG4StackingAction*> ActionList;
0038   ActionList actions_;
0039 };
0040 
0041 #endif