Geant4 10.7.0
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 ()
 
 ~G4SteppingVerbose ()
 
void NewStep ()
 
void AtRestDoItInvoked ()
 
void AlongStepDoItAllDone ()
 
void PostStepDoItAllDone ()
 
void AlongStepDoItOneByOne ()
 
void PostStepDoItOneByOne ()
 
void StepInfo ()
 
void TrackingStarted ()
 
void DPSLStarted ()
 
void DPSLUserLimit ()
 
void DPSLPostStep ()
 
void DPSLAlongStep ()
 
void VerboseTrack ()
 
void VerboseParticleChange ()
 
void ShowStep () const
 
- Public Member Functions inherited from G4VSteppingVerbose
virtual ~G4VSteppingVerbose ()
 
virtual void NewStep ()=0
 
void CopyState ()
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VSteppingVerbose
static void SetInstance (G4VSteppingVerbose *Instance)
 
static G4VSteppingVerboseGetInstance ()
 
static G4int GetSilent ()
 
static void SetSilent (G4int fSilent)
 
static G4int GetSilentStepInfo ()
 
static void SetSilentStepInfo (G4int fSilent)
 
- 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 G4ThreadLocal G4int Silent = 0
 
static G4ThreadLocal G4int SilentStepInfo = 0
 

Detailed Description

Definition at line 42 of file G4SteppingVerbose.hh.

Constructor & Destructor Documentation

◆ G4SteppingVerbose()

G4SteppingVerbose::G4SteppingVerbose ( )

Definition at line 49 of file G4SteppingVerbose.cc.

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

◆ ~G4SteppingVerbose()

G4SteppingVerbose::~G4SteppingVerbose ( )

Definition at line 58 of file G4SteppingVerbose.cc.

60{
61}

Member Function Documentation

◆ AlongStepDoItAllDone()

void G4SteppingVerbose::AlongStepDoItAllDone ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 137 of file G4SteppingVerbose.cc.

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

◆ AlongStepDoItOneByOne()

void G4SteppingVerbose::AlongStepDoItOneByOne ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 545 of file G4SteppingVerbose.cc.

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

◆ AtRestDoItInvoked()

void G4SteppingVerbose::AtRestDoItInvoked ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 70 of file G4SteppingVerbose.cc.

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

◆ DPSLAlongStep()

void G4SteppingVerbose::DPSLAlongStep ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 452 of file G4SteppingVerbose.cc.

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

◆ DPSLPostStep()

void G4SteppingVerbose::DPSLPostStep ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 417 of file G4SteppingVerbose.cc.

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

◆ DPSLStarted()

void G4SteppingVerbose::DPSLStarted ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 385 of file G4SteppingVerbose.cc.

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

◆ DPSLUserLimit()

void G4SteppingVerbose::DPSLUserLimit ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 400 of file G4SteppingVerbose.cc.

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

◆ NewStep()

void G4SteppingVerbose::NewStep ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 64 of file G4SteppingVerbose.cc.

66{
67}

◆ PostStepDoItAllDone()

void G4SteppingVerbose::PostStepDoItAllDone ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 193 of file G4SteppingVerbose.cc.

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

◆ PostStepDoItOneByOne()

void G4SteppingVerbose::PostStepDoItOneByOne ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 598 of file G4SteppingVerbose.cc.

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

◆ ShowStep()

void G4SteppingVerbose::ShowStep ( ) const

Definition at line 843 of file G4SteppingVerbose.cc.

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

Definition at line 269 of file G4SteppingVerbose.cc.

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

◆ TrackingStarted()

void G4SteppingVerbose::TrackingStarted ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 481 of file G4SteppingVerbose.cc.

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

◆ VerboseParticleChange()

void G4SteppingVerbose::VerboseParticleChange ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 832 of file G4SteppingVerbose.cc.

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

Referenced by AlongStepDoItOneByOne(), and PostStepDoItOneByOne().

◆ VerboseTrack()

void G4SteppingVerbose::VerboseTrack ( )
virtual

Implements G4VSteppingVerbose.

Definition at line 647 of file G4SteppingVerbose.cc.

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

Referenced by StepInfo().


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