CMS 3D CMS Logo

List of all members | Public Member Functions
LaserSteppingVerbose Class Reference

#include <LaserSteppingVerbose.h>

Inheritance diagram for LaserSteppingVerbose:

Public Member Functions

 LaserSteppingVerbose ()
 constructor More...
 
void StepInfo () override
 step information More...
 
void TrackingStarted () override
 tracking information More...
 
 ~LaserSteppingVerbose () override
 destructor More...
 

Detailed Description

Class to manage verbose stepping

Date
2007/03/20 12:00:59
Revision
1.2
Author
Maarten Thomas

Definition at line 13 of file LaserSteppingVerbose.h.

Constructor & Destructor Documentation

LaserSteppingVerbose::LaserSteppingVerbose ( )

constructor

Definition at line 12 of file LaserSteppingVerbose.cc.

12 {}
LaserSteppingVerbose::~LaserSteppingVerbose ( )
override

destructor

Definition at line 14 of file LaserSteppingVerbose.cc.

14 {}

Member Function Documentation

void LaserSteppingVerbose::StepInfo ( )
override

step information

Definition at line 16 of file LaserSteppingVerbose.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout, boostedTaus_cff::precision, HFPhase1Reconstructor_cfi::verboseLevel, x, y, and z.

16  {
17  // G4cout << "<LaserSteppingVerbose::StepInfo()>: verboseLevel = " <<
18  // verboseLevel << endl;
19 
20  CopyState();
21 
22  G4int precision = G4cout.precision(3);
23 
24  if (verboseLevel >= 1) {
25  if (verboseLevel >= 4)
26  VerboseTrack();
27  if (verboseLevel >= 3) {
28  G4cout << G4endl;
29  G4cout << std::setw(5) << "#Step#"
30  << " " << std::setw(6) << "X"
31  << " " << std::setw(6) << "Y"
32  << " " << std::setw(6) << "Z"
33  << " " << std::setw(9) << "KineE"
34  << " " << std::setw(9) << "dEStep"
35  << " " << std::setw(10) << "StepLength"
36  << " " << std::setw(10) << "TrackLength"
37  << " " << std::setw(10) << "Volume"
38  << " " << std::setw(10) << "Process" << G4endl;
39 
40  G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " << std::setw(6)
41  << G4BestUnit(fTrack->GetPosition().x(), "Length") << std::setw(6)
42  << G4BestUnit(fTrack->GetPosition().y(), "Length") << std::setw(6)
43  << G4BestUnit(fTrack->GetPosition().z(), "Length") << std::setw(6)
44  << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << std::setw(6)
45  << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << std::setw(6)
46  << G4BestUnit(fStep->GetStepLength(), "Length") << std::setw(6)
47  << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
48 
49  if (fTrack->GetNextVolume() != nullptr) {
50  G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
51  } else {
52  G4cout << std::setw(10) << "OutOfWorld";
53  }
54 
55  if (fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr) {
56  G4cout << " " << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
57  } else {
58  G4cout << " UserLimit";
59  }
60 
61  G4cout << G4endl;
62 
63  if (verboseLevel == 2) {
64  // total number of secondaries
65  G4int tN2ndariesTot = fN2ndariesAtRestDoIt + fN2ndariesAlongStepDoIt + fN2ndariesPostStepDoIt;
66 
67  if (tN2ndariesTot > 0) {
68  G4cout << " :---- List of Secondaries - "
69  << "#SpawnInStep = " << std::setw(3) << tN2ndariesTot << "(Rest = " << std::setw(2)
70  << fN2ndariesAtRestDoIt << ", Along = " << std::setw(2) << fN2ndariesAlongStepDoIt
71  << ", Post = " << std::setw(2) << fN2ndariesPostStepDoIt << "), "
72  << "#SpawnTotal = " << std::setw(3) << (*fSecondary).size() << " --------- " << G4endl;
73 
74  for (size_t lp1 = (*fSecondary).size() - tN2ndariesTot; lp1 < (*fSecondary).size(); lp1++) {
75  G4cout << " : " << std::setw(6) << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
76  << std::setw(6) << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length") << std::setw(6)
77  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << std::setw(6)
78  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy") << std::setw(10)
79  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
80  G4cout << G4endl;
81  }
82 
83  G4cout << " :----------------------"
84  << "--------------------------"
85  << "-- End of Secondaries Info --------------------------------- " << G4endl;
86  }
87  }
88  }
89  }
90  G4cout.precision(precision);
91 }
void LaserSteppingVerbose::TrackingStarted ( )
override

tracking information

Definition at line 93 of file LaserSteppingVerbose.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout, boostedTaus_cff::precision, and HFPhase1Reconstructor_cfi::verboseLevel.

93  {
94  CopyState();
95 
96  G4int precision = G4cout.precision(3);
97  if (verboseLevel > 0) {
98  G4cout << std::setw(5) << "Step#"
99  << " " << std::setw(6) << "X"
100  << " " << std::setw(6) << "Y"
101  << " " << std::setw(6) << "Z"
102  << " " << std::setw(9) << "KineE"
103  << " " << std::setw(9) << "dEStep"
104  << " " << std::setw(10) << "StepLength"
105  << " " << std::setw(10) << "TrackLength"
106  << " " << std::setw(10) << "Volume"
107  << " " << std::setw(10) << "Process " << G4endl;
108 
109  G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " << std::setw(6)
110  << G4BestUnit(fTrack->GetPosition().x(), "Length") << std::setw(6)
111  << G4BestUnit(fTrack->GetPosition().y(), "Length") << std::setw(6)
112  << G4BestUnit(fTrack->GetPosition().z(), "Length") << std::setw(6)
113  << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << std::setw(6)
114  << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << std::setw(6)
115  << G4BestUnit(fStep->GetStepLength(), "Length") << std::setw(6)
116  << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
117 
118  if (fTrack->GetNextVolume() != nullptr) {
119  G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
120  } else {
121  G4cout << "OutOfWorld";
122  }
123 
124  G4cout << " initStep" << G4endl;
125  }
126  G4cout.precision(precision);
127 }