Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:14

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 #include "G4Region.hh"
0009 
0010 #include <vector>
0011 
0012 class SimTrackManager;
0013 class TrackWithHistory;
0014 class BeginOfTrack;
0015 class EndOfTrack;
0016 class CMSSteppingVerbose;
0017 class TrackInformation;
0018 
0019 class TrackingAction : public G4UserTrackingAction {
0020 public:
0021   explicit TrackingAction(SimTrackManager*, CMSSteppingVerbose*, const edm::ParameterSet& ps);
0022   ~TrackingAction() override = default;
0023 
0024   void PreUserTrackingAction(const G4Track* aTrack) override;
0025   void PostUserTrackingAction(const G4Track* aTrack) override;
0026 
0027   inline TrackWithHistory* currentTrackWithHistory() { return currentTrack_; }
0028   inline const G4Track* geant4Track() const { return g4Track_; }
0029   inline G4TrackingManager* getTrackManager() { return fpTrackingManager; }
0030 
0031   SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal;
0032   SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal;
0033 
0034 private:
0035   SimTrackManager* trackManager_;
0036   CMSSteppingVerbose* steppingVerbose_;
0037   const G4Track* g4Track_ = nullptr;
0038   TrackInformation* trkInfo_ = nullptr;
0039   TrackWithHistory* currentTrack_ = nullptr;
0040   int endPrintTrackID_;
0041   bool checkTrack_;
0042   bool doFineCalo_;
0043   bool saveCaloBoundaryInformation_;
0044   double ekinMin_;
0045   std::vector<double> ekinMinRegion_;
0046   std::vector<G4Region*> ptrRegion_;
0047 };
0048 
0049 #endif