CMS 3D CMS Logo

TrackingVerboseAction.h
Go to the documentation of this file.
1 // File : TrackingVerboseAction.h
3 // Author: P.Arce 12.09.01
4 // Ported to CMSSW by: M. Stavrianakou 22.03.06
5 // Description:
6 // Modifications:
7 // Class with the commands to switch on/off the verbosity of tracking and event
8 // see TrackingVerboseAction for a detailed explanation
9 // for a given range of tracks each 'n' tracks
10 // the GEANT4 command '/tracking/verbose N' will be executed when trackNo is
11 // fTVTrackMin <= trackNo <= fTVTrackMax
12 // each fTVTrackStep tracks (starting at 1, not 0) and if the trackNo is
13 // fTVTrackMin <= trackNo <= fTVTrackMax
14 // each fTVTrackStep tracks (starting at 1, not 0)
15 //
17 
18 #ifndef SimG4Core_TrackingVerbose_h
19 #define SimG4Core_TrackingVerbose_h 1
20 
24 
25 #include "G4Step.hh"
26 
27 #include <vector>
28 
29 class BeginOfTrack;
30 class EndOfTrack;
31 class BeginOfEvent;
32 class BeginOfRun;
33 class G4Track;
34 class G4TrackingManager;
35 class G4VSteppingVerbose;
36 
38  public Observer<const BeginOfRun *>,
39  public Observer<const BeginOfEvent *>,
40  public Observer<const BeginOfTrack *>,
41  public Observer<const EndOfTrack *>,
42  public Observer<const G4Step *> {
43 public:
45  ~TrackingVerboseAction() override;
46  void update(const BeginOfRun *) override;
47  void update(const BeginOfEvent *) override;
48  void update(const BeginOfTrack *) override;
49  void update(const EndOfTrack *) override;
50  void update(const G4Step *) override;
51 
52 private:
53  void setTrackingVerbose(int verblev);
54  bool checkTrackingVerbose(const G4Track *);
55  void printTrackInfo(const G4Track *);
56 
57 private:
58  int fLarge;
59  bool fDEBUG;
60  bool fG4Verbose;
71  std::vector<int> fPdgIds;
72  G4TrackingManager *theTrackingManager;
73  G4VSteppingVerbose *fVerbose;
74 };
75 
76 #endif
std::vector< int > fPdgIds
bool checkTrackingVerbose(const G4Track *)
void printTrackInfo(const G4Track *)
G4TrackingManager * theTrackingManager
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
G4VSteppingVerbose * fVerbose
void setTrackingVerbose(int verblev)
TrackingVerboseAction(edm::ParameterSet const &p)