Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-31 22:26:09

0001 #ifndef SimG4Core_TrackingAction_H
0002 #define SimG4Core_TrackingAction_H
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "SimG4Core/Notification/interface/SimActivityRegistry.h"
0006 
0007 #include "G4UserTrackingAction.hh"
0008 
0009 class EventAction;
0010 class TrackWithHistory;
0011 class BeginOfTrack;
0012 class EndOfTrack;
0013 class CMSSteppingVerbose;
0014 class TrackInformation;
0015 
0016 class TrackingAction : public G4UserTrackingAction {
0017 public:
0018   explicit TrackingAction(EventAction* ea, const edm::ParameterSet& ps, CMSSteppingVerbose*);
0019   ~TrackingAction() override;
0020 
0021   void PreUserTrackingAction(const G4Track* aTrack) override;
0022   void PostUserTrackingAction(const G4Track* aTrack) override;
0023 
0024   inline TrackWithHistory* currentTrackWithHistory() { return currentTrack_; }
0025   inline const G4Track* geant4Track() const { return g4Track_; }
0026   inline G4TrackingManager* getTrackManager() { return fpTrackingManager; }
0027 
0028   SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal;
0029   SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal;
0030 
0031 private:
0032   EventAction* eventAction_;
0033   CMSSteppingVerbose* steppingVerbose_;
0034   const G4Track* g4Track_ = nullptr;
0035   TrackInformation* trkInfo_ = nullptr;
0036   TrackWithHistory* currentTrack_ = nullptr;
0037   bool checkTrack_;
0038   bool doFineCalo_;
0039   bool saveCaloBoundaryInformation_;
0040   double eMinFine_;
0041 };
0042 
0043 #endif