Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-09 02:02:19

0001 #ifndef SimG4Core_Phase2TrackingAction_H
0002 #define SimG4Core_Phase2TrackingAction_H
0003 //
0004 // Package:     Application
0005 // Class  :     Phase2TrackingAction
0006 //
0007 // Description: Manage tracks
0008 // Created:     08.04.2025 V.Ivantchenko
0009 //
0010 
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "SimG4Core/Notification/interface/SimActivityRegistry.h"
0013 
0014 #include "G4UserTrackingAction.hh"
0015 #include "G4Region.hh"
0016 
0017 #include <vector>
0018 
0019 class SimTrackManager;
0020 class CMSG4TrackInterface;
0021 class TrackWithHistory;
0022 class BeginOfTrack;
0023 class EndOfTrack;
0024 class CMSSteppingVerbose;
0025 class TrackInformation;
0026 
0027 class Phase2TrackingAction : public G4UserTrackingAction {
0028 public:
0029   explicit Phase2TrackingAction(SimTrackManager*, CMSSteppingVerbose*, const edm::ParameterSet& ps);
0030   ~Phase2TrackingAction() override = default;
0031 
0032   void PreUserTrackingAction(const G4Track* aTrack) override;
0033   void PostUserTrackingAction(const G4Track* aTrack) override;
0034 
0035   inline TrackWithHistory* currentTrackWithHistory() { return currentTrack_; }
0036   inline const G4Track* geant4Track() const { return g4Track_; }
0037   inline G4TrackingManager* getTrackManager() { return fpTrackingManager; }
0038 
0039   SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal;
0040   SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal;
0041 
0042   Phase2TrackingAction(Phase2TrackingAction&) = delete;
0043   Phase2TrackingAction& operator=(const Phase2TrackingAction& right) = delete;
0044 
0045 private:
0046   SimTrackManager* trackManager_;
0047   CMSG4TrackInterface* trackInterface_;
0048   CMSSteppingVerbose* steppingVerbose_;
0049   const G4Track* g4Track_ = nullptr;
0050   TrackInformation* trkInfo_ = nullptr;
0051   TrackWithHistory* currentTrack_ = nullptr;
0052   int endPrintTrackID_;
0053   bool checkTrack_;
0054   bool doFineCalo_;
0055   bool saveCaloBoundaryInformation_;
0056   double ekinMin_;
0057   std::vector<double> ekinMinRegion_;
0058   std::vector<G4Region*> ptrRegion_;
0059 };
0060 
0061 #endif