Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4SteppingVerbose Class Reference

#include <G4SteppingVerbose.hh>

+ Inheritance diagram for G4SteppingVerbose:

Public Member Functions

 G4SteppingVerbose ()
 
virtual ~G4SteppingVerbose ()
 
virtual G4VSteppingVerboseClone ()
 
virtual void NewStep ()
 
virtual void AtRestDoItInvoked ()
 
virtual void AlongStepDoItAllDone ()
 
virtual void PostStepDoItAllDone ()
 
virtual void AlongStepDoItOneByOne ()
 
virtual void PostStepDoItOneByOne ()
 
virtual void StepInfo ()
 
virtual void TrackingStarted ()
 
virtual void DPSLStarted ()
 
virtual void DPSLUserLimit ()
 
virtual void DPSLPostStep ()
 
virtual void DPSLAlongStep ()
 
virtual void VerboseTrack ()
 
virtual void VerboseParticleChange ()
 
virtual void ShowStep () const
 
- Public Member Functions inherited from G4VSteppingVerbose
virtual ~G4VSteppingVerbose ()
 
virtual G4VSteppingVerboseClone ()
 
virtual void NewStep ()=0
 
void CopyState ()
 
virtual void SetManager (G4SteppingManager *const)
 
virtual void AtRestDoItInvoked ()=0
 
virtual void AlongStepDoItAllDone ()=0
 
virtual void PostStepDoItAllDone ()=0
 
virtual void AlongStepDoItOneByOne ()=0
 
virtual void PostStepDoItOneByOne ()=0
 
virtual void StepInfo ()=0
 
virtual void TrackingStarted ()=0
 
virtual void DPSLStarted ()=0
 
virtual void DPSLUserLimit ()=0
 
virtual void DPSLPostStep ()=0
 
virtual void DPSLAlongStep ()=0
 
virtual void VerboseTrack ()=0
 
virtual void VerboseParticleChange ()=0
 

Static Public Member Functions

static void UseBestUnit (G4int prec=4)
 
static G4int BestUnitPrecision ()
 
- Static Public Member Functions inherited from G4VSteppingVerbose
static void SetInstance (G4VSteppingVerbose *Instance)
 
static G4VSteppingVerboseGetInstance ()
 
static G4VSteppingVerboseGetMasterInstance ()
 
static G4int GetSilent ()
 
static void SetSilent (G4int fSilent)
 
static G4int GetSilentStepInfo ()
 
static void SetSilentStepInfo (G4int fSilent)
 

Additional Inherited Members

- Protected Types inherited from G4VSteppingVerbose
using G4SelectedAtRestDoItVector = std::vector< G4int >
 
using G4SelectedAlongStepDoItVector = std::vector< G4int >
 
using G4SelectedPostStepDoItVector = std::vector< G4int >
 
- Protected Member Functions inherited from G4VSteppingVerbose
 G4VSteppingVerbose ()
 
- Protected Attributes inherited from G4VSteppingVerbose
G4SteppingManagerfManager = nullptr
 
G4UserSteppingActionfUserSteppingAction = nullptr
 
G4double PhysicalStep = 0.0
 
G4double GeometricalStep = 0.0
 
G4double CorrectedStep = 0.0
 
G4bool PreStepPointIsGeom = false
 
G4bool FirstStep = false
 
G4StepStatus fStepStatus = fUndefined
 
G4double TempInitVelocity = 0.0
 
G4double TempVelocity = 0.0
 
G4double Mass = 0.0
 
G4double sumEnergyChange = 0.0
 
G4VParticleChangefParticleChange = nullptr
 
G4TrackfTrack = nullptr
 
G4TrackVectorfSecondary = nullptr
 
G4StepfStep = nullptr
 
G4StepPointfPreStepPoint = nullptr
 
G4StepPointfPostStepPoint = nullptr
 
G4VPhysicalVolumefCurrentVolume = nullptr
 
G4VSensitiveDetectorfSensitive = nullptr
 
G4VProcessfCurrentProcess = nullptr
 
G4ProcessVectorfAtRestDoItVector = nullptr
 
G4ProcessVectorfAlongStepDoItVector = nullptr
 
G4ProcessVectorfPostStepDoItVector = nullptr
 
G4ProcessVectorfAtRestGetPhysIntVector = nullptr
 
G4ProcessVectorfAlongStepGetPhysIntVector = nullptr
 
G4ProcessVectorfPostStepGetPhysIntVector = nullptr
 
std::size_t MAXofAtRestLoops = 0
 
std::size_t MAXofAlongStepLoops = 0
 
std::size_t MAXofPostStepLoops = 0
 
G4double currentMinimumStep = 0.0
 
G4double numberOfInteractionLengthLeft = 0.0
 
std::size_t fAtRestDoItProcTriggered = 0
 
std::size_t fAlongStepDoItProcTriggered = 0
 
std::size_t fPostStepDoItProcTriggered = 0
 
G4int fN2ndariesAtRestDoIt = 0
 
G4int fN2ndariesAlongStepDoIt = 0
 
G4int fN2ndariesPostStepDoIt = 0
 
G4NavigatorfNavigator = nullptr
 
G4int verboseLevel = 0
 
G4SelectedAtRestDoItVectorfSelectedAtRestDoItVector = nullptr
 
G4SelectedAlongStepDoItVectorfSelectedAlongStepDoItVector = nullptr
 
G4SelectedPostStepDoItVectorfSelectedPostStepDoItVector = nullptr
 
G4double fPreviousStepSize = 0.0
 
G4TouchableHandle fTouchableHandle
 
G4SteppingControl StepControlFlag = NormalCondition
 
G4double physIntLength = 0.0
 
G4ForceCondition fCondition = InActivated
 
G4GPILSelection fGPILSelection = NotCandidateForSelection
 
- Static Protected Attributes inherited from G4VSteppingVerbose
static G4ThreadLocal G4VSteppingVerbosefInstance = nullptr
 
static G4VSteppingVerbosefMasterInstance = nullptr
 
static G4TRACKING_DLL G4ThreadLocal G4int Silent = 0
 
static G4TRACKING_DLL G4ThreadLocal G4int SilentStepInfo = 0
 

Detailed Description

Definition at line 42 of file G4SteppingVerbose.hh.

Constructor & Destructor Documentation

◆ G4SteppingVerbose()

G4SteppingVerbose::G4SteppingVerbose ( )

Definition at line 51 of file G4SteppingVerbose.cc.

53{
54#ifdef G4_TRACKING_DEBUG
55 G4cout << "G4SteppingVerbose has instantiated" << G4endl;
56#endif
57}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

Referenced by Clone().

◆ ~G4SteppingVerbose()

G4SteppingVerbose::~G4SteppingVerbose ( )
virtual

Definition at line 60 of file G4SteppingVerbose.cc.

62{
63}

Member Function Documentation

◆ AlongStepDoItAllDone()

void G4SteppingVerbose::AlongStepDoItAllDone ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 139 of file G4SteppingVerbose.cc.

141{
142 if(Silent==1){ return; }
143
144 G4VProcess* ptProcManager;
145
146 CopyState();
147
148 if(verboseLevel >= 3)
149 {
150 G4cout << G4endl;
151 G4cout << " >>AlongStepDoIt (after all invocations):" << G4endl;
152 G4cout << " ++List of invoked processes " << G4endl;
153
154 for(std::size_t ci=0; ci<MAXofAlongStepLoops; ++ci)
155 {
156 ptProcManager = (*fAlongStepDoItVector)((G4int)ci);
157 G4cout << " " << ci+1 << ") ";
158 if(ptProcManager != nullptr)
159 {
160 G4cout << ptProcManager->GetProcessName() << G4endl;
161 }
162 }
163
164 ShowStep();
165 G4cout << G4endl;
166 G4cout << " ++List of secondaries generated "
167 << "(x,y,z,kE,t,PID):"
168 << " No. of secondaries = "
169 << (*fSecondary).size() << G4endl;
170
171 if((*fSecondary).size()>0)
172 {
173 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
174 {
175 G4cout << " "
176 << std::setw( 9)
177 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
178 << " " << std::setw( 9)
179 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
180 << " " << std::setw( 9)
181 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
182 << " " << std::setw( 9)
183 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
184 << " " << std::setw( 9)
185 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time")
186 << " " << std::setw(18)
187 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
188 << G4endl;
189 }
190 }
191 }
192}
#define G4BestUnit(a, b)
int G4int
Definition: G4Types.hh:85
virtual void ShowStep() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:386
std::size_t MAXofAlongStepLoops
static G4TRACKING_DLL G4ThreadLocal G4int Silent
G4TrackVector * fSecondary

◆ AlongStepDoItOneByOne()

void G4SteppingVerbose::AlongStepDoItOneByOne ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 547 of file G4SteppingVerbose.cc.

549{
550 if(Silent==1){ return; }
551
552 CopyState();
553
554 if(verboseLevel >= 4)
555 {
556 G4cout << G4endl;
557 G4cout << " >>AlongStepDoIt (process by process): "
558 << " Process Name = "
560
561 ShowStep();
562 G4cout << " "
563 << "!Note! Safety of PostStep is only valid "
564 << "after all DoIt invocations."
565 << G4endl;
566
568 G4cout << G4endl;
569
570 G4cout << " ++List of secondaries generated "
571 << "(x,y,z,kE,t,PID):"
572 << " No. of secodaries = "
574
576 {
577 for(std::size_t lp1=(*fSecondary).size()-fN2ndariesAlongStepDoIt;
578 lp1<(*fSecondary).size(); ++lp1)
579 {
580 G4cout << " "
581 << std::setw( 9)
582 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
583 << " " << std::setw( 9)
584 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
585 << " " << std::setw( 9)
586 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
587 << " " << std::setw( 9)
588 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
589 << " " << std::setw( 9)
590 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
591 << " " << std::setw(18)
592 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
593 << G4endl;
594 }
595 }
596 }
597}
virtual void VerboseParticleChange()
G4VProcess * fCurrentProcess

◆ AtRestDoItInvoked()

void G4SteppingVerbose::AtRestDoItInvoked ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 72 of file G4SteppingVerbose.cc.

74{
75 if(Silent==1) { return; }
76
77 G4VProcess* ptProcManager;
78 CopyState();
79
80 if(verboseLevel >= 3)
81 {
82 G4int npt=0;
83 G4cout << " **List of AtRestDoIt invoked:" << G4endl;
84 for(std::size_t np=0; np<MAXofAtRestLoops; ++np)
85 {
86 std::size_t npGPIL = MAXofAtRestLoops-np-1;
87 if( (*fSelectedAtRestDoItVector)[npGPIL] == G4ForceCondition::Forced )
88 {
89 ++npt;
90 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
91 G4cout << " # " << npt << " : "
92 << ptProcManager->GetProcessName()
93 << " (Forced)" << G4endl;
94 }
95 else if ( (*fSelectedAtRestDoItVector)[npGPIL] == G4ForceCondition::NotForced )
96 {
97 ++npt;
98 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
99 G4cout << " # " << npt << " : " << ptProcManager->GetProcessName()
100 << G4endl;
101 }
102 }
103
104 G4cout << " Generated secondries # : " << fN2ndariesAtRestDoIt << G4endl;
105
106 if( fN2ndariesAtRestDoIt > 0 )
107 {
108 G4cout << " -- List of secondaries generated : "
109 << "(x,y,z,kE,t,PID) --" << G4endl;
110 for( std::size_t lp1=(*fSecondary).size()-fN2ndariesAtRestDoIt;
111 lp1<(*fSecondary).size(); ++lp1)
112 {
113 G4cout << " "
114 << std::setw( 9)
115 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
116 << " " << std::setw( 9)
117 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
118 << " " << std::setw( 9)
119 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
120 << " " << std::setw( 9)
121 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
122 << " " << std::setw( 9)
123 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time")
124 << " " << std::setw(18)
125 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
126 << G4endl;
127 }
128 }
129 }
130
131 if( verboseLevel >= 4 )
132 {
133 ShowStep();
134 G4cout << G4endl;
135 }
136}
G4SelectedAtRestDoItVector * fSelectedAtRestDoItVector

◆ BestUnitPrecision()

G4int G4SteppingVerbose::BestUnitPrecision ( )
static

Definition at line 1045 of file G4SteppingVerbose.cc.

1047{ return useBestUnitPrecision; }

Referenced by G4SteppingManager::G4SteppingManager().

◆ Clone()

virtual G4VSteppingVerbose * G4SteppingVerbose::Clone ( )
inlinevirtual

Reimplemented from G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 51 of file G4SteppingVerbose.hh.

52 { return new G4SteppingVerbose; }

◆ DPSLAlongStep()

void G4SteppingVerbose::DPSLAlongStep ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 454 of file G4SteppingVerbose.cc.

456{
457 if(Silent==1){ return; }
458 CopyState();
459
460 if( verboseLevel > 5 )
461 {
462 G4cout << " ++ProposedStep(AlongStep) = "
463 << std::setw( 9) << G4BestUnit(physIntLength , "Length")
464 << " : ProcName = "
466 << " (";
468 {
469 G4cout << "CandidateForSelection)" << G4endl;
470 }
472 {
473 G4cout << "NotCandidateForSelection)" << G4endl;
474 }
475 else
476 {
477 G4cout << "?!?)" << G4endl;
478 }
479 }
480}
@ CandidateForSelection
@ NotCandidateForSelection
G4GPILSelection fGPILSelection

◆ DPSLPostStep()

void G4SteppingVerbose::DPSLPostStep ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 419 of file G4SteppingVerbose.cc.

421{
422 if(Silent==1){ return; }
423 CopyState();
424
425 if( verboseLevel > 5 )
426 {
427 G4cout << " ++ProposedStep(PostStep ) = "
428 << std::setw( 9) << physIntLength
429 << " : ProcName = " << fCurrentProcess->GetProcessName() << " (";
431 {
432 G4cout << "ExclusivelyForced)" << G4endl;
433 }
434 else if(fCondition==StronglyForced)
435 {
436 G4cout << "StronglyForced)" << G4endl;
437 }
438 else if(fCondition==Conditionally)
439 {
440 G4cout << "Conditionally)" << G4endl;
441 }
442 else if(fCondition==Forced)
443 {
444 G4cout << "Forced)" << G4endl;
445 }
446 else
447 {
448 G4cout << "No ForceCondition)" << G4endl;
449 }
450 }
451}
@ StronglyForced
@ Conditionally
@ ExclusivelyForced
@ Forced
G4ForceCondition fCondition

◆ DPSLStarted()

void G4SteppingVerbose::DPSLStarted ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 387 of file G4SteppingVerbose.cc.

389{
390 if(Silent==1){ return; }
391 CopyState();
392
393 if( verboseLevel > 5 )
394 {
395 G4cout << G4endl
396 << " >>DefinePhysicalStepLength (List of proposed StepLengths): "
397 << G4endl;
398 }
399}

◆ DPSLUserLimit()

void G4SteppingVerbose::DPSLUserLimit ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 402 of file G4SteppingVerbose.cc.

404{
405 if(Silent==1){ return; }
406 CopyState();
407
408 if( verboseLevel > 5 )
409 {
410 G4cout << G4endl << G4endl;
411 G4cout << "=== Defined Physical Step Length (DPSL)" << G4endl;
412 G4cout << " ++ProposedStep(UserLimit) = "
413 << std::setw( 9) << physIntLength
414 << " : ProcName = User defined maximum allowed Step" << G4endl;
415 }
416}

◆ NewStep()

void G4SteppingVerbose::NewStep ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 66 of file G4SteppingVerbose.cc.

68{
69}

◆ PostStepDoItAllDone()

void G4SteppingVerbose::PostStepDoItAllDone ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 195 of file G4SteppingVerbose.cc.

197{
198 if(Silent==1) { return; }
199
200 G4VProcess* ptProcManager;
201
202 CopyState();
203
205 (fCondition == Forced) |
209 {
210 if(verboseLevel >= 3)
211 {
212 G4int npt=0;
213 G4cout << G4endl;
214 G4cout << " **PostStepDoIt (after all invocations):" << G4endl;
215 G4cout << " ++List of invoked processes " << G4endl;
216
217 for(std::size_t np=0; np<MAXofPostStepLoops; ++np)
218 {
219 std::size_t npGPIL = MAXofPostStepLoops-np-1;
220 if( (*fSelectedPostStepDoItVector)[npGPIL] == G4ForceCondition::Forced )
221 {
222 ++npt;
223 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
224 G4cout << " " << npt << ") "
225 << ptProcManager->GetProcessName()
226 << " (Forced)" << G4endl;
227 }
228 else if ( (*fSelectedPostStepDoItVector)[npGPIL] == G4ForceCondition::NotForced )
229 {
230 ++npt;
231 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
232 G4cout << " " << npt << ") " << ptProcManager->GetProcessName()
233 << G4endl;
234 }
235 }
236
237 ShowStep();
238 G4cout << G4endl;
239 G4cout << " ++List of secondaries generated "
240 << "(x,y,z,kE,t,PID):"
241 << " No. of secodaries = "
242 << (*fSecondary).size() << G4endl;
243 G4cout << " [Note]Secondaries from AlongStepDoIt included."
244 << G4endl;
245
246 if((*fSecondary).size()>0)
247 {
248 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
249 {
250 G4cout << " "
251 << std::setw( 9)
252 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
253 << " " << std::setw( 9)
254 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
255 << " " << std::setw( 9)
256 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
257 << " " << std::setw( 9)
258 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
259 << " " << std::setw( 9)
260 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
261 << " " << std::setw(18)
262 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
263 << G4endl;
264 }
265 }
266 }
267 }
268}
@ fPostStepDoItProc
Definition: G4StepStatus.hh:49
G4SelectedPostStepDoItVector * fSelectedPostStepDoItVector
std::size_t MAXofPostStepLoops

◆ PostStepDoItOneByOne()

void G4SteppingVerbose::PostStepDoItOneByOne ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 600 of file G4SteppingVerbose.cc.

602{
603 if(Silent==1) { return; }
604
605 CopyState();
606
607 if(verboseLevel >= 4)
608 {
609 G4cout << G4endl;
610 G4cout << " >>PostStepDoIt (process by process): "
611 << " Process Name = "
613
614 ShowStep();
615 G4cout << G4endl;
617 G4cout << G4endl;
618
619 G4cout << " ++List of secondaries generated "
620 << "(x,y,z,kE,t,PID):"
621 << " No. of secodaries = "
623
625 {
626 for(std::size_t lp1=(*fSecondary).size()-fN2ndariesPostStepDoIt;
627 lp1<(*fSecondary).size(); ++lp1)
628 {
629 G4cout << " "
630 << std::setw( 9)
631 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
632 << " " << std::setw( 9)
633 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
634 << " " << std::setw( 9)
635 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
636 << " " << std::setw( 9)
637 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
638 << " " << std::setw( 9)
639 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
640 << " " << std::setw(18)
641 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
642 << G4endl;
643 }
644 }
645 }
646}

◆ ShowStep()

void G4SteppingVerbose::ShowStep ( ) const
virtual

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 845 of file G4SteppingVerbose.cc.

847{
848 if(Silent==1){ return; }
849 G4String volName;
850 G4long oldprc;
851
852 // Show header
853 G4cout << G4endl;
854 G4cout << " ++G4Step Information " << G4endl;
855 oldprc = G4cout.precision(16);
856
857 // Show G4Step specific information
858 G4cout << " Address of G4Track : "
859 << fStep->GetTrack() << G4endl;
860 G4cout << " Step Length (mm) : "
862 G4cout << " Energy Deposit (MeV) : "
864
865 // Show G4StepPoint specific information
866 G4cout << " -------------------------------------------------------"
867 << "----------------" << G4endl;
868 G4cout << " StepPoint Information "
869 << std::setw(20) << "PreStep"
870 << std::setw(20) << "PostStep" << G4endl;
871 G4cout << " -------------------------------------------------------"
872 << "----------------" << G4endl;
873 G4cout << " Position - x (mm) : "
874 << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().x()
875 << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().x()
876 << G4endl;
877 G4cout << " Position - y (mm) : "
878 << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().y()
879 << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().y()
880 << G4endl;
881 G4cout << " Position - z (mm) : "
882 << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().z()
883 << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().z()
884 << G4endl;
885 G4cout << " Global Time (ns) : "
886 << std::setw(20) << fStep->GetPreStepPoint()->GetGlobalTime()
887 << std::setw(20) << fStep->GetPostStepPoint()->GetGlobalTime()
888 << G4endl;
889 G4cout << " Local Time (ns) : "
890 << std::setw(20) << fStep->GetPreStepPoint()->GetLocalTime()
891 << std::setw(20) << fStep->GetPostStepPoint()->GetLocalTime()
892 << G4endl;
893 G4cout << " Proper Time (ns) : "
894 << std::setw(20) << fStep->GetPreStepPoint()->GetProperTime()
895 << std::setw(20) << fStep->GetPostStepPoint()->GetProperTime()
896 << G4endl;
897 G4cout << " Momentum Direct - x : "
898 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
899 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x()
900 << G4endl;
901 G4cout << " Momentum Direct - y : "
902 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
903 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y()
904 << G4endl;
905 G4cout << " Momentum Direct - z : "
906 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
907 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z()
908 << G4endl;
909 G4cout << " Momentum - x (MeV/c): "
910 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().x()
911 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().x()
912 << G4endl;
913 G4cout << " Momentum - y (MeV/c): "
914 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().y()
915 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().y()
916 << G4endl;
917 G4cout << " Momentum - z (MeV/c): "
918 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().z()
919 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().z()
920 << G4endl;
921 G4cout << " Total Energy (MeV) : "
922 << std::setw(20) << fStep->GetPreStepPoint()->GetTotalEnergy()
923 << std::setw(20) << fStep->GetPostStepPoint()->GetTotalEnergy()
924 << G4endl;
925 G4cout << " Kinetic Energy (MeV): "
926 << std::setw(20) << fStep->GetPreStepPoint()->GetKineticEnergy()
927 << std::setw(20) << fStep->GetPostStepPoint()->GetKineticEnergy()
928 << G4endl;
929 G4cout << " Velocity (mm/ns) : "
930 << std::setw(20) << fStep->GetPreStepPoint()->GetVelocity()
931 << std::setw(20) << fStep->GetPostStepPoint()->GetVelocity()
932 << G4endl;
933 G4cout << " Volume Name : "
934 << std::setw(20)
937 {
939 }
940 else
941 {
942 volName = "OutOfWorld";
943 }
944 G4cout << std::setw(20) << volName << G4endl;
945 G4cout << " Safety (mm) : "
946 << std::setw(20) << fStep->GetPreStepPoint()->GetSafety()
947 << std::setw(20) << fStep->GetPostStepPoint()->GetSafety()
948 << G4endl;
949 G4cout << " Polarization - x : "
950 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
951 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().x()
952 << G4endl;
953 G4cout << " Polarization - y : "
954 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
955 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().y()
956 << G4endl;
957 G4cout << " Polarization - Z : "
958 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
959 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().z()
960 << G4endl;
961 G4cout << " Weight : "
962 << std::setw(20) << fStep->GetPreStepPoint()->GetWeight()
963 << std::setw(20) << fStep->GetPostStepPoint()->GetWeight()
964 << G4endl;
965 G4cout << " Step Status : " ;
967 if( tStepStatus == fGeomBoundary )
968 {
969 G4cout << std::setw(20) << "Geom Limit";
970 }
971 else if ( tStepStatus == fAlongStepDoItProc )
972 {
973 G4cout << std::setw(20) << "AlongStep Proc.";
974 }
975 else if ( tStepStatus == fPostStepDoItProc )
976 {
977 G4cout << std::setw(20) << "PostStep Proc";
978 }
979 else if ( tStepStatus == fAtRestDoItProc )
980 {
981 G4cout << std::setw(20) << "AtRest Proc";
982 }
983 else if ( tStepStatus == fUndefined )
984 {
985 G4cout << std::setw(20) << "Undefined";
986 }
987
988 tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
989 if( tStepStatus == fGeomBoundary )
990 {
991 G4cout << std::setw(20) << "Geom Limit";
992 }
993 else if ( tStepStatus == fAlongStepDoItProc )
994 {
995 G4cout << std::setw(20) << "AlongStep Proc.";
996 }
997 else if ( tStepStatus == fPostStepDoItProc )
998 {
999 G4cout << std::setw(20) << "PostStep Proc";
1000 }
1001 else if ( tStepStatus == fAtRestDoItProc )
1002 {
1003 G4cout << std::setw(20) << "AtRest Proc";
1004 }
1005 else if ( tStepStatus == fUndefined )
1006 {
1007 G4cout << std::setw(20) << "Undefined";
1008 }
1009
1010 G4cout << G4endl;
1011 G4cout << " Process defined Step: " ;
1013 {
1014 G4cout << std::setw(20) << "Undefined";
1015 }
1016 else
1017 {
1018 G4cout << std::setw(20)
1021 }
1023 {
1024 G4cout << std::setw(20) << "Undefined";
1025 }
1026 else
1027 {
1028 G4cout << std::setw(20)
1031 }
1032 G4cout.precision(oldprc);
1033
1034 G4cout << G4endl;
1035 G4cout << " -------------------------------------------------------"
1036 << "----------------" << G4endl;
1037}
G4StepStatus
Definition: G4StepStatus.hh:40
@ fGeomBoundary
Definition: G4StepStatus.hh:43
@ fUndefined
Definition: G4StepStatus.hh:55
@ fAtRestDoItProc
Definition: G4StepStatus.hh:45
@ fAlongStepDoItProc
Definition: G4StepStatus.hh:47
long G4long
Definition: G4Types.hh:87
double z() const
double x() const
double y() const
G4double GetTotalEnergy() const
G4StepStatus GetStepStatus() const
G4double GetVelocity() const
G4double GetProperTime() const
G4double GetGlobalTime() const
G4double GetSafety() const
const G4VProcess * GetProcessDefinedStep() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetPosition() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetLocalTime() const
G4VPhysicalVolume * GetPhysicalVolume() const
const G4ThreeVector & GetPolarization() const
G4double GetKineticEnergy() const
G4double GetWeight() const
G4Track * GetTrack() const
G4StepPoint * GetPreStepPoint() const
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
G4double GetStepLength() const
const G4String & GetName() const

Referenced by AlongStepDoItAllDone(), AlongStepDoItOneByOne(), AtRestDoItInvoked(), PostStepDoItAllDone(), and PostStepDoItOneByOne().

◆ StepInfo()

void G4SteppingVerbose::StepInfo ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 271 of file G4SteppingVerbose.cc.

273{
274 if(Silent==1) { return; }
275 if(SilentStepInfo==1) { return; }
276
277 CopyState();
278 G4cout.precision(16);
279 G4long prec = G4cout.precision(3);
280
281 if( verboseLevel >= 1 )
282 {
283 if( verboseLevel >= 4 ) VerboseTrack();
284 if( verboseLevel >= 3 )
285 {
286 G4cout << G4endl;
287#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
288 G4cout << std::setw( 5) << "#Step#" << " "
289 << std::setw( 8) << "X" << " "
290 << std::setw( 8) << "Y" << " "
291 << std::setw( 8) << "Z" << " "
292 << std::setw( 9) << "KineE" << " "
293 << std::setw( 8) << "dE" << " "
294 << std::setw(12) << "StepLeng" << " "
295 << std::setw(12) << "TrackLeng" << " "
296 << std::setw(12) << "NextVolume" << " "
297 << std::setw( 8) << "ProcName" << G4endl;
298#else
299 G4cout << std::setw( 5) << "#Step#" << " "
300 << std::setw( 8) << "X(mm)" << " "
301 << std::setw( 8) << "Y(mm)" << " "
302 << std::setw( 8) << "Z(mm)" << " "
303 << std::setw( 9) << "KinE(MeV)" << " "
304 << std::setw( 8) << "dE(MeV)" << " "
305 << std::setw( 8) << "StepLeng" << " "
306 << std::setw( 9) << "TrackLeng" << " "
307 << std::setw(11) << "NextVolume" << " "
308 << std::setw( 8) << "ProcName" << G4endl;
309#endif
310 }
311 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
312 << std::setw( 8)
313 << G4BestUnit(fTrack->GetPosition().x(), "Length") << " "
314 << std::setw( 8)
315 << G4BestUnit(fTrack->GetPosition().y(), "Length") << " "
316 << std::setw( 8)
317 << G4BestUnit(fTrack->GetPosition().z(), "Length") << " "
318 << std::setw( 9)
319 << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << " "
320 << std::setw( 8)
321 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
322 << std::setw( 8)
323 << G4BestUnit(fStep->GetStepLength(), "Length") << " "
324 << std::setw( 9)
325 << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
326
327 if( fTrack->GetNextVolume() != 0 )
328 {
329 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
330 }
331 else
332 {
333 G4cout << std::setw(11) << "OutOfWorld" << " ";
334 }
336 {
339 }
340 else
341 {
342 G4cout << "User Limit";
343 }
344 G4cout << G4endl;
345 if( verboseLevel == 2 )
346 {
349 if(tN2ndariesTot>0)
350 {
351 G4cout << " :----- List of 2ndaries - "
352 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
353 << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
354 << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
355 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
356 << "), "
357 << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
358 << " ---------------"
359 << G4endl;
360
361 for(std::size_t lp1=(*fSecondary).size()-tN2ndariesTot;
362 lp1<(*fSecondary).size(); ++lp1)
363 {
364 G4cout << " : "
365 << std::setw( 9)
366 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
367 << " " << std::setw( 9)
368 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
369 << " " << std::setw( 9)
370 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
371 << " " << std::setw( 9)
372 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
373 << " " << std::setw(18)
374 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
375 << G4endl;
376 }
377 G4cout << " :-----------------------------"
378 << "----------------------------------"
379 << "-- EndOf2ndaries Info ---------------" << G4endl;
380 }
381 }
382 }
383 G4cout.precision(prec);
384}
G4double GetStepLength() const
virtual void VerboseTrack()
G4VPhysicalVolume * GetNextVolume() const
const G4ThreeVector & GetPosition() const
G4double GetTrackLength() const
G4int GetCurrentStepNumber() const
G4double GetKineticEnergy() const
static G4TRACKING_DLL G4ThreadLocal G4int SilentStepInfo

◆ TrackingStarted()

void G4SteppingVerbose::TrackingStarted ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 483 of file G4SteppingVerbose.cc.

485{
486 if(Silent==1){ return; }
487
488 CopyState();
489
490 G4long prec = G4cout.precision(3);
491 if( verboseLevel > 0 )
492 {
493#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
494 G4cout << std::setw( 5) << "Step#" << " "
495 << std::setw( 8) << "X" << " "
496 << std::setw( 8) << "Y" << " "
497 << std::setw( 8) << "Z" << " "
498 << std::setw( 9) << "KineE" << " "
499 << std::setw( 8) << "dE" << " "
500 << std::setw(12) << "StepLeng" << " "
501 << std::setw(12) << "TrackLeng" << " "
502 << std::setw(12) << "NextVolume" << " "
503 << std::setw( 8) << "ProcName" << G4endl;
504#else
505 G4cout << std::setw( 5) << "Step#" << " "
506 << std::setw( 8) << "X(mm)" << " "
507 << std::setw( 8) << "Y(mm)" << " "
508 << std::setw( 8) << "Z(mm)" << " "
509 << std::setw( 9) << "KinE(MeV)" << " "
510 << std::setw( 8) << "dE(MeV)" << " "
511 << std::setw( 8) << "StepLeng" << " "
512 << std::setw( 9) << "TrackLeng" << " "
513 << std::setw(11) << "NextVolume" << " "
514 << std::setw( 8) << "ProcName" << G4endl;
515#endif
516
517 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
518 << std::setw( 8)
519 << G4BestUnit(fTrack->GetPosition().x(),"Length") << " "
520 << std::setw( 8)
521 << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
522 << std::setw( 8)
523 << G4BestUnit(fTrack->GetPosition().z(),"Length") << " "
524 << std::setw( 9)
525 << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") << " "
526 << std::setw( 8)
527 << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
528 << std::setw( 8)
529 << G4BestUnit(fStep->GetStepLength(),"Length") << " "
530 << std::setw( 9)
531 << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
532
533 if(fTrack->GetNextVolume())
534 {
535 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
536 }
537 else
538 {
539 G4cout << std::setw(11) << "OutOfWorld" << " ";
540 }
541 G4cout << "initStep" << G4endl;
542 }
543 G4cout.precision(prec);
544}

◆ UseBestUnit()

void G4SteppingVerbose::UseBestUnit ( G4int  prec = 4)
static

Definition at line 1040 of file G4SteppingVerbose.cc.

1042{ useBestUnitPrecision = prec; }

◆ VerboseParticleChange()

void G4SteppingVerbose::VerboseParticleChange ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 834 of file G4SteppingVerbose.cc.

836{
837 if(Silent==1) { return; }
838
839 G4cout << G4endl;
840 G4cout << " ++G4ParticleChange Information " << G4endl;
842}
virtual void DumpInfo() const
G4VParticleChange * fParticleChange

Referenced by AlongStepDoItOneByOne(), and PostStepDoItOneByOne().

◆ VerboseTrack()

void G4SteppingVerbose::VerboseTrack ( )
virtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 649 of file G4SteppingVerbose.cc.

651{
652 if(Silent==1){ return; }
653
654 CopyState();
655
656 G4cout << G4endl;
657 G4cout << " ++G4Track Information " << G4endl;
658 G4long prec = G4cout.precision(3);
659
660
661 G4cout << " -----------------------------------------------"
662 << G4endl;
663 G4cout << " G4Track Information " << std::setw(20) << G4endl;
664 G4cout << " -----------------------------------------------"
665 << G4endl;
666
667 G4cout << " Step number : "
668 << std::setw(20) << fTrack->GetCurrentStepNumber()
669 << G4endl;
670#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
671 G4cout << " Position - x : "
672 << std::setw(20) << G4BestUnit(fTrack->GetPosition().x(), "Length")
673 << G4endl;
674 G4cout << " Position - y : "
675 << std::setw(20) << G4BestUnit(fTrack->GetPosition().y(), "Length")
676 << G4endl;
677 G4cout << " Position - z : "
678 << std::setw(20) << G4BestUnit(fTrack->GetPosition().z(), "Length")
679 << G4endl;
680 G4cout << " Global Time : "
681 << std::setw(20) << G4BestUnit(fTrack->GetGlobalTime(), "Time")
682 << G4endl;
683 G4cout << " Local Time : "
684 << std::setw(20) << G4BestUnit(fTrack->GetLocalTime(), "Time")
685 << G4endl;
686#else
687 G4cout << " Position - x (mm) : "
688 << std::setw(20) << fTrack->GetPosition().x() /mm
689 << G4endl;
690 G4cout << " Position - y (mm) : "
691 << std::setw(20) << fTrack->GetPosition().y() /mm
692 << G4endl;
693 G4cout << " Position - z (mm) : "
694 << std::setw(20) << fTrack->GetPosition().z() /mm
695 << G4endl;
696 G4cout << " Global Time (ns) : "
697 << std::setw(20) << fTrack->GetGlobalTime() /ns
698 << G4endl;
699 G4cout << " Local Time (ns) : "
700 << std::setw(20) << fTrack->GetLocalTime() /ns
701 << G4endl;
702#endif
703 G4cout << " Momentum Direct - x : "
704 << std::setw(20) << fTrack->GetMomentumDirection().x()
705 << G4endl;
706 G4cout << " Momentum Direct - y : "
707 << std::setw(20) << fTrack->GetMomentumDirection().y()
708 << G4endl;
709 G4cout << " Momentum Direct - z : "
710 << std::setw(20) << fTrack->GetMomentumDirection().z()
711 << G4endl;
712#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
713 G4cout << " Kinetic Energy : "
714#else
715 G4cout << " Kinetic Energy (MeV): "
716#endif
717 << std::setw(20) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
718 << G4endl;
719 G4cout << " Polarization - x : "
720 << std::setw(20) << fTrack->GetPolarization().x()
721 << G4endl;
722 G4cout << " Polarization - y : "
723 << std::setw(20) << fTrack->GetPolarization().y()
724 << G4endl;
725 G4cout << " Polarization - z : "
726 << std::setw(20) << fTrack->GetPolarization().z()
727 << G4endl;
728 G4cout << " Track Length : "
729 << std::setw(20) << G4BestUnit(fTrack->GetTrackLength(), "Length")
730 << G4endl;
731 G4cout << " Track ID # : "
732 << std::setw(20) << fTrack->GetTrackID()
733 << G4endl;
734 G4cout << " Parent Track ID # : "
735 << std::setw(20) << fTrack->GetParentID()
736 << G4endl;
737 G4cout << " Next Volume : "
738 << std::setw(20);
739 if( fTrack->GetNextVolume() != 0 )
740 {
741 G4cout << fTrack->GetNextVolume()->GetName() << " ";
742 }
743 else
744 {
745 G4cout << "OutOfWorld" << " ";
746 }
747 G4cout << G4endl;
748 G4cout << " Track Status : "
749 << std::setw(20);
750 if( fTrack->GetTrackStatus() == fAlive )
751 {
752 G4cout << " Alive";
753 }
754 else if( fTrack->GetTrackStatus() == fStopButAlive )
755 {
756 G4cout << " StopButAlive";
757 }
758 else if( fTrack->GetTrackStatus() == fStopAndKill )
759 {
760 G4cout << " StopAndKill";
761 }
763 {
764 G4cout << " KillTrackAndSecondaries";
765 }
766 else if( fTrack->GetTrackStatus() == fSuspend )
767 {
768 G4cout << " Suspend";
769 }
771 {
772 G4cout << " PostponeToNextEvent";
773 }
774 G4cout << G4endl;
775#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
776 G4cout << " Vertex - x : "
777 << std::setw(20)
778 << G4BestUnit(fTrack->GetVertexPosition().x(),"Length")
779 << G4endl;
780 G4cout << " Vertex - y : "
781 << std::setw(20)
782 << G4BestUnit(fTrack->GetVertexPosition().y(),"Length")
783 << G4endl;
784 G4cout << " Vertex - z : "
785 << std::setw(20)
786 << G4BestUnit(fTrack->GetVertexPosition().z(),"Length")
787 << G4endl;
788#else
789 G4cout << " Vertex - x (mm) : "
790 << std::setw(20) << fTrack->GetVertexPosition().x()/mm
791 << G4endl;
792 G4cout << " Vertex - y (mm) : "
793 << std::setw(20) << fTrack->GetVertexPosition().y()/mm
794 << G4endl;
795 G4cout << " Vertex - z (mm) : "
796 << std::setw(20) << fTrack->GetVertexPosition().z()/mm
797 << G4endl;
798#endif
799 G4cout << " Vertex - Px (MomDir): "
800 << std::setw(20) << fTrack->GetVertexMomentumDirection().x()
801 << G4endl;
802 G4cout << " Vertex - Py (MomDir): "
803 << std::setw(20) << fTrack->GetVertexMomentumDirection().y()
804 << G4endl;
805 G4cout << " Vertex - Pz (MomDir): "
806 << std::setw(20) << fTrack->GetVertexMomentumDirection().z()
807 << G4endl;
808#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
809 G4cout << " Vertex - KineE : "
810#else
811 G4cout << " Vertex - KineE (MeV): "
812#endif
813 << std::setw(20)
815 << G4endl;
816
817 G4cout << " Creator Process : "
818 << std::setw(20);
819 if( fTrack->GetCreatorProcess() == 0)
820 {
821 G4cout << " Event Generator" << G4endl;
822 }
823 else
824 {
826 }
827
828 G4cout << " -----------------------------------------------"
829 << G4endl;
830 G4cout.precision(prec);
831}
@ fKillTrackAndSecondaries
@ fSuspend
@ fAlive
@ fStopAndKill
@ fStopButAlive
@ fPostponeToNextEvent
G4TrackStatus GetTrackStatus() const
G4double GetVertexKineticEnergy() const
G4int GetTrackID() const
const G4VProcess * GetCreatorProcess() const
const G4ThreeVector & GetVertexMomentumDirection() const
G4double GetGlobalTime() const
const G4ThreeVector & GetVertexPosition() const
G4double GetLocalTime() const
const G4ThreeVector & GetMomentumDirection() const
const G4ThreeVector & GetPolarization() const
G4int GetParentID() const
#define ns(x)
Definition: xmltok.c:1649

Referenced by StepInfo().


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