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 ()
 step information More...
 
void TrackingStarted ()
 tracking information More...
 
 ~LaserSteppingVerbose ()
 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.

13 {
14 }
LaserSteppingVerbose::~LaserSteppingVerbose ( )

destructor

Definition at line 16 of file LaserSteppingVerbose.cc.

17 {
18 }

Member Function Documentation

void LaserSteppingVerbose::StepInfo ( )

step information

Definition at line 20 of file LaserSteppingVerbose.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout, x, y, and z.

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

tracking information

Definition at line 120 of file LaserSteppingVerbose.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout.

121 {
122  CopyState();
123 
124  G4int precision = G4cout.precision(3);
125  if ( verboseLevel > 0 )
126  {
127  G4cout << std::setw( 5) << "Step#" << " "
128  << std::setw( 6) << "X" << " "
129  << std::setw( 6) << "Y" << " "
130  << std::setw( 6) << "Z" << " "
131  << std::setw( 9) << "KineE" << " "
132  << std::setw( 9) << "dEStep" << " "
133  << std::setw(10) << "StepLength" << " "
134  << std::setw(10) << "TrackLength" << " "
135  << std::setw(10) << "Volume" << " "
136  << std::setw(10) << "Process " << G4endl;
137 
138  G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
139  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
140  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
141  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
142  << std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
143  << std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
144  << std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
145  << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
146 
147  if (fTrack->GetNextVolume() != 0)
148  {
149  G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
150  }
151  else
152  {
153  G4cout << "OutOfWorld";
154  }
155 
156  G4cout << " initStep" << G4endl;
157  }
158  G4cout.precision(precision);
159 }