CMS 3D CMS Logo

CMSSteppingVerbose.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CMSSteppingVerbose_h
2 #define SimG4Core_CMSSteppingVerbose_h
3 
4 //---------------------------------------------------------------
5 //
6 // CMSSteppingVerbose is intend to replace Geant4 default stepping
7 // verbosity class in order to keep necessary
8 // verbosity options when G4VERBOSE flag is disabled.
9 // The goal is to provide easy way to print
10 // per event, per track, per step.
11 //
12 // V.Ivanchenko 10.06.2016
13 //
14 //---------------------------------------------------------------
15 
16 #include "globals.hh"
17 #include <vector>
18 
19 class G4Event;
20 class G4Track;
21 class G4Step;
22 class G4SteppingManager;
23 class G4SteppingVerbose;
24 
26 public:
27  explicit CMSSteppingVerbose(
28  G4int verb, G4double ekin, std::vector<G4int>& evtNum, std::vector<G4int>& primV, std::vector<G4int>& trNum);
29  ~CMSSteppingVerbose() = default;
30 
31  void beginOfEvent(const G4Event*);
32  void trackStarted(const G4Track*, bool isKilled);
33  void trackEnded(const G4Track*) const;
34  void stackFilled(const G4Track*, bool isKilled) const;
35  void nextStep(const G4Step*, const G4SteppingManager* ptr, bool isKilled) const;
36 
37  void stopEventPrint();
38  void setVerbose(int val) { m_verbose = val; }
39 
40 private:
41  G4bool m_PrintEvent;
42  G4bool m_PrintTrack;
44  G4int m_verbose;
45  G4int m_nEvents;
46  G4int m_nVertex;
47  G4int m_nTracks;
48  std::vector<G4int> m_EventNumbers;
49  std::vector<G4int> m_PrimaryVertex;
50  std::vector<G4int> m_TrackNumbers;
51  G4double m_EkinThreshold;
52  G4SteppingVerbose* m_g4SteppingVerbose;
53 };
54 
55 #endif
void beginOfEvent(const G4Event *)
std::vector< G4int > m_EventNumbers
void trackEnded(const G4Track *) const
~CMSSteppingVerbose()=default
std::vector< G4int > m_TrackNumbers
CMSSteppingVerbose(G4int verb, G4double ekin, std::vector< G4int > &evtNum, std::vector< G4int > &primV, std::vector< G4int > &trNum)
void stackFilled(const G4Track *, bool isKilled) const
void setVerbose(int val)
G4SteppingVerbose * m_g4SteppingVerbose
std::vector< G4int > m_PrimaryVertex
void nextStep(const G4Step *, const G4SteppingManager *ptr, bool isKilled) const
void trackStarted(const G4Track *, bool isKilled)