Loading...
Searching...
No Matches
Public Member Functions | List of all members
VG01SteppingVerboseWithDir Class Reference

#include <Doxymodules_geometry.h>

Inheritance diagram for VG01SteppingVerboseWithDir:
G4SteppingVerbose G4VSteppingVerbose

Public Member Functions

 VG01SteppingVerboseWithDir ()
 
 ~VG01SteppingVerboseWithDir ()
 
void StepInfo () override
 
void TrackingStarted () override
 
void Banner ()
 

Detailed Description

Definition at line 29 of file Doxymodules_geometry.h.

Constructor & Destructor Documentation

◆ VG01SteppingVerboseWithDir()

VG01SteppingVerboseWithDir::VG01SteppingVerboseWithDir ( )

Definition at line 43 of file VG01SteppingVerboseWithDir.cc.

◆ ~VG01SteppingVerboseWithDir()

VG01SteppingVerboseWithDir::~VG01SteppingVerboseWithDir ( )

Definition at line 49 of file VG01SteppingVerboseWithDir.cc.

50{}

Member Function Documentation

◆ StepInfo()

void VG01SteppingVerboseWithDir::StepInfo ( )
override

Definition at line 77 of file VG01SteppingVerboseWithDir.cc.

78{
79 CopyState();
80
81 G4int prec = G4cout.precision(6);
82
83 if( verboseLevel >= 1 ){
84 if( verboseLevel >= 4 ) VerboseTrack();
85 if( verboseLevel >= 3 ){ Banner(); }
86
87 G4cout << std::setw( 5)<<fTrack->GetCurrentStepNumber() << " "
88 << std::setw( 9)<<fTrack->GetPosition().x() / CLHEP::mm << " "
89 << std::setw( 9)<<fTrack->GetPosition().y() / CLHEP::mm << " "
90 << std::setw( 9)<<fTrack->GetPosition().z() / CLHEP::mm << " " // << " Ek = "
91 << std::setw(11)<<fTrack->GetKineticEnergy() / CLHEP::MeV << " ";
92 G4cout.precision(3);
93 G4cout << std::setw( 8)<<fStep->GetTotalEnergyDeposit() / CLHEP::MeV << " "
94 << std::setw( 7)<<fStep->GetStepLength() / CLHEP::mm << " ";
95 G4cout.precision(6);
96 G4cout << std::setw(12)<<fTrack->GetTrackLength() / CLHEP::mm << " ";
97
98 G4cout.precision(5);
99 G4StepPoint* preStepPt= fTrack->GetStep()->GetPreStepPoint();
100 if( preStepPt != nullptr ) {
101 G4double safety = preStepPt->GetSafety();
102 G4cout << std::setw( 8) << ( (safety > 1.0e-9) ? safety : 0.0 ) << " ";
103 } else {
104 G4cout << std::setw( 8) << "-0.0_(N/A)" << " ";
105 }
106
107
108 G4cout << "| ";
109 G4cout << std::setw(11)<<fTrack->GetMomentumDirection().x() << " "
110 << std::setw(11)<<fTrack->GetMomentumDirection().y() << " "
111 << std::setw(11)<<fTrack->GetMomentumDirection().z() << " | ";
112
113 G4cout << std::setw(15) << fTrack->GetMaterial()->GetName() << " ";
114 G4VProcess const* pds= fStep->GetPostStepPoint()->GetProcessDefinedStep();
115 G4cout << std::setw(14) << ( ( pds != nullptr) ? pds->GetProcessName() :
116 G4String( "User Limit") ) << " ";
117 // if( fStepStatus != fWorldBoundary){
118 if( fTrack->GetNextVolume() != nullptr ) {
119 G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName();
120 G4cout << std::setw( 4) << fTrack->GetNextVolume()->GetCopyNo();
121 } else {
122 G4cout << std::setw(10) << "OutOfWorld";
123 }
124
125 G4cout << " ";
126
127 G4cout << G4endl;
128
129 if( verboseLevel == 2 ){
130 G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
131 fN2ndariesAlongStepDoIt +
132 fN2ndariesPostStepDoIt;
133 if(tN2ndariesTot>0){
134 G4cout << " :----- List of 2ndaries - "
135 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
136 << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
137 << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
138 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
139 << "), "
140 << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
141 << " ---------------"
142 << G4endl;
143
144 for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
145 lp1<(*fSecondary).size(); lp1++){
146 G4cout << " : "
147 << std::setw(8)
148 << (*fSecondary)[lp1]->GetPosition().x() / CLHEP::mm << " "
149 << std::setw(8)
150 << (*fSecondary)[lp1]->GetPosition().y() / CLHEP::mm << " "
151 << std::setw(8)
152 << (*fSecondary)[lp1]->GetPosition().z() / CLHEP::mm << " "
153 << std::setw(8)
154 << (*fSecondary)[lp1]->GetKineticEnergy() / CLHEP::MeV << " "
155 << std::setw(10)
156 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << " ";
157 G4cout << G4endl;
158 }
159
160 G4cout << " :-----------------------------"
161 << "----------------------------------"
162 << "-- EndOf2ndaries Info ---------------"
163 << G4endl;
164 }
165 }
166
167 }
168 G4cout.precision(prec);
169 // G4cout<< "exit VG01SteppingVerboseWithDir::StepInfo " <<G4endl;
170}

◆ TrackingStarted()

void VG01SteppingVerboseWithDir::TrackingStarted ( )
override

Definition at line 174 of file VG01SteppingVerboseWithDir.cc.

175{
176 CopyState();
177 G4int prec = G4cout.precision(6);
178 if( verboseLevel > 0 ){
179
180 Banner();
181
182 G4cout << std::setw( 5)<<fTrack->GetCurrentStepNumber() << " "
183 << std::setw( 9)<<fTrack->GetPosition().x() / CLHEP::mm << " "
184 << std::setw( 9)<<fTrack->GetPosition().y() / CLHEP::mm << " "
185 << std::setw( 9)<<fTrack->GetPosition().z() / CLHEP::mm << " " // << " E_0 = "
186 << std::setw(11)<<fTrack->GetKineticEnergy() / CLHEP::MeV << " ";
187 // << " ( = " << std::setw(8) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") << " ) "
188 G4cout.precision(3);
189 G4cout << std::setw( 8) << fStep->GetTotalEnergyDeposit() / CLHEP::MeV << " "
190 << std::setw( 7) << fStep->GetStepLength() / CLHEP::mm << " ";
191 G4cout.precision(6);
192 G4cout << std::setw(12) << fTrack->GetTrackLength() / CLHEP::mm << " ";
193
194 G4Step const* step= fTrack->GetStep();
195 G4StepPoint const * preStepPt= nullptr;
196 if( step != nullptr )
197 preStepPt =fTrack->GetStep()->GetPreStepPoint();
198 if( preStepPt != nullptr ) {
199 G4double safety = preStepPt->GetSafety();
200 G4cout << std::setw( 8) << ( (safety > 1.0e-9) ? safety : 0.0 ) << " ";
201 } else {
202 G4cout << std::setw( 8) << "N/A" << " ";
203 }
204 G4cout << "| ";
205 G4cout << std::setw(11) << fTrack->GetMomentumDirection().x() << " "
206 << std::setw(11) << fTrack->GetMomentumDirection().y() << " "
207 << std::setw(11) << fTrack->GetMomentumDirection().z() << " | ";
208
209 // Material and volume name
210 if(fTrack->GetVolume()){
211 G4Material* material = fTrack->GetVolume()->GetLogicalVolume()->GetMaterial();
212 if( material != nullptr ){
213 G4cout << std::setw(15) << material->GetName() << " ";
214 }
215 else {
216 G4cout << std::setw(15) << "No-Material" << " ";
217 }
218 G4cout << std::setw(14) << "initStep" << " ";
219 G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
220 G4cout << std::setw( 4) << fTrack->GetVolume()->GetCopyNo() << " (initial Volume)";
221
222 } else {
223 G4cout << std::setw(10) << "No-Material" << " ";
224 G4cout << std::setw(14) << "initStep" << " ";
225 G4cout << std::setw(10) << "OutOfWorld" << " ";
226 }
227 // fTrack->GetMaterial() fails at track start !!!!
228 G4cout << G4endl;
229 }
230 G4cout.precision(prec);
231}

◆ Banner()

void VG01SteppingVerboseWithDir::Banner ( )

Definition at line 54 of file VG01SteppingVerboseWithDir.cc.

55{
56 G4cout << G4endl;
57 G4cout << std::setw( 5) << "Step#" << " "
58 << std::setw( 9) << "X (mm)" << " "
59 << std::setw( 9) << "Y (mm)" << " "
60 << std::setw( 9) << "Z (mm)" << " "
61 << std::setw(11) << "Ek (MeV)" << " "
62 << std::setw( 8) << "dE (MeV)" << " "
63 << std::setw( 7) << "Step(mm)" << " "
64 << std::setw(12) << "Track(mm)" << " "
65 << std::setw( 7) << "Safety(mm)" << " | "
66 << std::setw(11) << " Dir.x " << " "
67 << std::setw(11) << " Dir.y " << " "
68 << std::setw(11) << " Dir.z " << " | "
69 << std::setw(15) << "Material"
70 << std::setw(14) << "Process"
71 << std::setw(15) << "NextVolu"
72 << G4endl;
73}

The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration