Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:50

0001 #ifndef SimG4Core_NewTrackAction_H
0002 #define SimG4Core_NewTrackAction_H
0003 
0004 class G4Track;
0005 class TrackInformation;
0006 
0007 /** SimG4Core Action for new G4tracks.
0008  *  This action is called each time a new G4Track is formed.
0009  *  Since formation (i.e. filling of data members) is done 
0010  *  gradually, the best moment to call NewTrackAction is not very clear.
0011  *  Currently done from StackingAction...
0012  */
0013 
0014 class NewTrackAction {
0015 public:
0016   NewTrackAction();
0017   void primary(const G4Track* aSecondary) const;
0018   void primary(G4Track* aSecondary) const;
0019   void secondary(const G4Track* aSecondary, const G4Track& mother, int) const;
0020   void secondary(G4Track* aSecondary, const G4Track& mother, int) const;
0021 
0022 private:
0023   void addUserInfoToPrimary(G4Track* aTrack) const;
0024   void addUserInfoToSecondary(G4Track* aTrack, const TrackInformation& motherInfo, int) const;
0025 };
0026 
0027 #endif