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

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 ( )
default

Referenced by Clone().

◆ ~G4SteppingVerbose()

G4SteppingVerbose::~G4SteppingVerbose ( )
overridedefault

Member Function Documentation

◆ AlongStepDoItAllDone()

void G4SteppingVerbose::AlongStepDoItAllDone ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 111 of file G4SteppingVerbose.cc.

113{
114 if (Silent == 1) {
115 return;
116 }
117
118 G4VProcess* ptProcManager;
119
120 CopyState();
121
122 if (verboseLevel >= 3) {
123 G4cout << G4endl;
124 G4cout << " >>AlongStepDoIt (after all invocations):" << G4endl;
125 G4cout << " ++List of invoked processes " << G4endl;
126
127 for (std::size_t ci = 0; ci < MAXofAlongStepLoops; ++ci) {
128 ptProcManager = (*fAlongStepDoItVector)((G4int)ci);
129 G4cout << " " << ci + 1 << ") ";
130 if (ptProcManager != nullptr) {
131 G4cout << ptProcManager->GetProcessName() << G4endl;
132 }
133 }
134
135 ShowStep();
136 G4cout << G4endl;
137 G4cout << " ++List of secondaries generated "
138 << "(x,y,z,kE,t,PID):"
139 << " No. of secondaries = " << (*fSecondary).size() << G4endl;
140
141 if (! (*fSecondary).empty()) {
142 for (auto& lp1 : *fSecondary) {
143 G4cout << " " << std::setw(9) << G4BestUnit(lp1->GetPosition().x(), "Length") << " "
144 << std::setw(9) << G4BestUnit(lp1->GetPosition().y(), "Length") << " "
145 << std::setw(9) << G4BestUnit(lp1->GetPosition().z(), "Length") << " "
146 << std::setw(9) << G4BestUnit(lp1->GetKineticEnergy(), "Energy") << " "
147 << std::setw(9) << G4BestUnit(lp1->GetGlobalTime(), "Time") << " " << std::setw(18)
148 << lp1->GetDefinition()->GetParticleName() << G4endl;
149 }
150 }
151 }
152}
#define G4BestUnit(a, b)
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
virtual void ShowStep() const
const G4String & GetProcessName() const
static G4TRACKING_DLL G4ThreadLocal G4int Silent
G4TrackVector * fSecondary

◆ AlongStepDoItOneByOne()

void G4SteppingVerbose::AlongStepDoItOneByOne ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 453 of file G4SteppingVerbose.cc.

455{
456 if (Silent == 1) {
457 return;
458 }
459
460 CopyState();
461
462 if (verboseLevel >= 4) {
463 G4cout << G4endl;
464 G4cout << " >>AlongStepDoIt (process by process): "
465 << " Process Name = " << fCurrentProcess->GetProcessName() << G4endl;
466
467 ShowStep();
468 G4cout << " "
469 << "!Note! Safety of PostStep is only valid "
470 << "after all DoIt invocations." << G4endl;
471
473 G4cout << G4endl;
474
475 G4cout << " ++List of secondaries generated "
476 << "(x,y,z,kE,t,PID):"
477 << " No. of secodaries = " << fN2ndariesAlongStepDoIt << G4endl;
478
479 if (fN2ndariesAlongStepDoIt > 0) {
480 for (std::size_t lp1 = (*fSecondary).size() - fN2ndariesAlongStepDoIt;
481 lp1 < (*fSecondary).size(); ++lp1)
482 {
483 G4cout << " " << std::setw(9)
484 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length") << " " << std::setw(9)
485 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length") << " " << std::setw(9)
486 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << " " << std::setw(9)
487 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy") << " "
488 << std::setw(9) << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time") << " "
489 << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
490 }
491 }
492 }
493}
void VerboseParticleChange() override

◆ AtRestDoItInvoked()

void G4SteppingVerbose::AtRestDoItInvoked ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 57 of file G4SteppingVerbose.cc.

59{
60 if (Silent == 1) {
61 return;
62 }
63
64 G4VProcess* ptProcManager;
65 CopyState();
66
67 if (verboseLevel >= 3) {
68 G4int npt = 0;
69 G4cout << " **List of AtRestDoIt invoked:" << G4endl;
70 for (std::size_t np = 0; np < MAXofAtRestLoops; ++np) {
71 std::size_t npGPIL = MAXofAtRestLoops - np - 1;
73 ++npt;
74 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
75 G4cout << " # " << npt << " : " << ptProcManager->GetProcessName() << " (Forced)"
76 << G4endl;
77 }
79 ++npt;
80 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
81 G4cout << " # " << npt << " : " << ptProcManager->GetProcessName() << G4endl;
82 }
83 }
84
85 G4cout << " Generated secondries # : " << fN2ndariesAtRestDoIt << G4endl;
86
87 if (fN2ndariesAtRestDoIt > 0) {
88 G4cout << " -- List of secondaries generated : "
89 << "(x,y,z,kE,t,PID) --" << G4endl;
90 for (std::size_t lp1 = (*fSecondary).size() - fN2ndariesAtRestDoIt;
91 lp1 < (*fSecondary).size(); ++lp1)
92 {
93 G4cout << " " << std::setw(9)
94 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length") << " " << std::setw(9)
95 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length") << " " << std::setw(9)
96 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << " " << std::setw(9)
97 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy") << " "
98 << std::setw(9) << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time") << " "
99 << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
100 }
101 }
102 }
103
104 if (verboseLevel >= 4) {
105 ShowStep();
106 G4cout << G4endl;
107 }
108}
@ NotForced
@ Forced
G4SelectedAtRestDoItVector * fSelectedAtRestDoItVector

◆ BestUnitPrecision()

G4int G4SteppingVerbose::BestUnitPrecision ( )
static

Definition at line 842 of file G4SteppingVerbose.cc.

844{
845 return useBestUnitPrecision;
846}

Referenced by G4SteppingManager::G4SteppingManager().

◆ Clone()

G4VSteppingVerbose * G4SteppingVerbose::Clone ( )
inlineoverridevirtual

Reimplemented from G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 50 of file G4SteppingVerbose.hh.

50{ return new G4SteppingVerbose; }
G4SteppingVerbose()=default

◆ DPSLAlongStep()

void G4SteppingVerbose::DPSLAlongStep ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 371 of file G4SteppingVerbose.cc.

373{
374 if (Silent == 1) {
375 return;
376 }
377 CopyState();
378
379 if (verboseLevel > 5) {
380 G4cout << " ++ProposedStep(AlongStep) = " << std::setw(9)
381 << G4BestUnit(physIntLength, "Length")
382 << " : ProcName = " << fCurrentProcess->GetProcessName() << " (";
384 G4cout << "CandidateForSelection)" << G4endl;
385 }
387 G4cout << "NotCandidateForSelection)" << G4endl;
388 }
389 else {
390 G4cout << "?!?)" << G4endl;
391 }
392 }
393}
@ CandidateForSelection
@ NotCandidateForSelection
G4GPILSelection fGPILSelection

◆ DPSLPostStep()

void G4SteppingVerbose::DPSLPostStep ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 341 of file G4SteppingVerbose.cc.

343{
344 if (Silent == 1) {
345 return;
346 }
347 CopyState();
348
349 if (verboseLevel > 5) {
350 G4cout << " ++ProposedStep(PostStep ) = " << std::setw(9) << physIntLength
351 << " : ProcName = " << fCurrentProcess->GetProcessName() << " (";
353 G4cout << "ExclusivelyForced)" << G4endl;
354 }
355 else if (fCondition == StronglyForced) {
356 G4cout << "StronglyForced)" << G4endl;
357 }
358 else if (fCondition == Conditionally) {
359 G4cout << "Conditionally)" << G4endl;
360 }
361 else if (fCondition == Forced) {
362 G4cout << "Forced)" << G4endl;
363 }
364 else {
365 G4cout << "No ForceCondition)" << G4endl;
366 }
367 }
368}
@ StronglyForced
@ Conditionally
@ ExclusivelyForced
G4ForceCondition fCondition

◆ DPSLStarted()

void G4SteppingVerbose::DPSLStarted ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 310 of file G4SteppingVerbose.cc.

312{
313 if (Silent == 1) {
314 return;
315 }
316 CopyState();
317
318 if (verboseLevel > 5) {
319 G4cout << G4endl << " >>DefinePhysicalStepLength (List of proposed StepLengths): " << G4endl;
320 }
321}

◆ DPSLUserLimit()

void G4SteppingVerbose::DPSLUserLimit ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 324 of file G4SteppingVerbose.cc.

326{
327 if (Silent == 1) {
328 return;
329 }
330 CopyState();
331
332 if (verboseLevel > 5) {
333 G4cout << G4endl << G4endl;
334 G4cout << "=== Defined Physical Step Length (DPSL)" << G4endl;
335 G4cout << " ++ProposedStep(UserLimit) = " << std::setw(9) << physIntLength
336 << " : ProcName = User defined maximum allowed Step" << G4endl;
337 }
338}

◆ NewStep()

void G4SteppingVerbose::NewStep ( )
overridevirtual

Implements G4VSteppingVerbose.

Definition at line 52 of file G4SteppingVerbose.cc.

54{}

◆ PostStepDoItAllDone()

void G4SteppingVerbose::PostStepDoItAllDone ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 155 of file G4SteppingVerbose.cc.

157{
158 if (Silent == 1) {
159 return;
160 }
161
162 G4VProcess* ptProcManager;
163
164 CopyState();
165
169 {
170 if (verboseLevel >= 3) {
171 G4int npt = 0;
172 G4cout << G4endl;
173 G4cout << " **PostStepDoIt (after all invocations):" << G4endl;
174 G4cout << " ++List of invoked processes " << G4endl;
175
176 for (std::size_t np = 0; np < MAXofPostStepLoops; ++np) {
177 std::size_t npGPIL = MAXofPostStepLoops - np - 1;
179 ++npt;
180 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
181 G4cout << " " << npt << ") " << ptProcManager->GetProcessName() << " (Forced)"
182 << G4endl;
183 }
185 ++npt;
186 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
187 G4cout << " " << npt << ") " << ptProcManager->GetProcessName() << G4endl;
188 }
189 }
190
191 ShowStep();
192 G4cout << G4endl;
193 G4cout << " ++List of secondaries generated "
194 << "(x,y,z,kE,t,PID):"
195 << " No. of secodaries = " << (*fSecondary).size() << G4endl;
196 G4cout << " [Note]Secondaries from AlongStepDoIt included." << G4endl;
197
198 if (! (*fSecondary).empty()) {
199 for (auto& lp1 : *fSecondary) {
200 G4cout << " " << std::setw(9) << G4BestUnit(lp1->GetPosition().x(), "Length") << " "
201 << std::setw(9) << G4BestUnit(lp1->GetPosition().y(), "Length") << " "
202 << std::setw(9) << G4BestUnit(lp1->GetPosition().z(), "Length") << " "
203 << std::setw(9) << G4BestUnit(lp1->GetKineticEnergy(), "Energy") << " "
204 << std::setw(9) << G4BestUnit(lp1->GetGlobalTime(), "Time") << " " << std::setw(18)
205 << lp1->GetDefinition()->GetParticleName() << G4endl;
206 }
207 }
208 }
209 }
210}
@ fPostStepDoItProc
G4SelectedPostStepDoItVector * fSelectedPostStepDoItVector

◆ PostStepDoItOneByOne()

void G4SteppingVerbose::PostStepDoItOneByOne ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 496 of file G4SteppingVerbose.cc.

498{
499 if (Silent == 1) {
500 return;
501 }
502
503 CopyState();
504
505 if (verboseLevel >= 4) {
506 G4cout << G4endl;
507 G4cout << " >>PostStepDoIt (process by process): "
508 << " Process Name = " << fCurrentProcess->GetProcessName() << G4endl;
509
510 ShowStep();
511 G4cout << G4endl;
513 G4cout << G4endl;
514
515 G4cout << " ++List of secondaries generated "
516 << "(x,y,z,kE,t,PID):"
517 << " No. of secodaries = " << fN2ndariesPostStepDoIt << G4endl;
518
519 if (fN2ndariesPostStepDoIt > 0) {
520 for (std::size_t lp1 = (*fSecondary).size() - fN2ndariesPostStepDoIt;
521 lp1 < (*fSecondary).size(); ++lp1)
522 {
523 G4cout << " " << std::setw(9)
524 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length") << " " << std::setw(9)
525 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length") << " " << std::setw(9)
526 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << " " << std::setw(9)
527 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy") << " "
528 << std::setw(9) << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time") << " "
529 << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
530 }
531 }
532 }
533}

◆ ShowStep()

void G4SteppingVerbose::ShowStep ( ) const
virtual

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 683 of file G4SteppingVerbose.cc.

685{
686 if (Silent == 1) {
687 return;
688 }
689 G4String volName;
690 G4long oldprc;
691
692 // Show header
693 G4cout << G4endl;
694 G4cout << " ++G4Step Information " << G4endl;
695 oldprc = G4cout.precision(16);
696
697 // Show G4Step specific information
698 G4cout << " Address of G4Track : " << fStep->GetTrack() << G4endl;
699 G4cout << " Step Length (mm) : " << fStep->GetTrack()->GetStepLength() << G4endl;
700 G4cout << " Energy Deposit (MeV) : " << fStep->GetTotalEnergyDeposit() << G4endl;
701
702 // Show G4StepPoint specific information
703 G4cout << " -------------------------------------------------------"
704 << "----------------" << G4endl;
705 G4cout << " StepPoint Information " << std::setw(20) << "PreStep" << std::setw(20)
706 << "PostStep" << G4endl;
707 G4cout << " -------------------------------------------------------"
708 << "----------------" << G4endl;
709 G4cout << " Position - x (mm) : " << std::setw(20)
710 << fStep->GetPreStepPoint()->GetPosition().x() << std::setw(20)
712 G4cout << " Position - y (mm) : " << std::setw(20)
713 << fStep->GetPreStepPoint()->GetPosition().y() << std::setw(20)
715 G4cout << " Position - z (mm) : " << std::setw(20)
716 << fStep->GetPreStepPoint()->GetPosition().z() << std::setw(20)
718 G4cout << " Global Time (ns) : " << std::setw(20)
719 << fStep->GetPreStepPoint()->GetGlobalTime() << std::setw(20)
721 G4cout << " Local Time (ns) : " << std::setw(20)
722 << fStep->GetPreStepPoint()->GetLocalTime() << std::setw(20)
724 G4cout << " Proper Time (ns) : " << std::setw(20)
725 << fStep->GetPreStepPoint()->GetProperTime() << std::setw(20)
727 G4cout << " Momentum Direct - x : " << std::setw(20)
728 << fStep->GetPreStepPoint()->GetMomentumDirection().x() << std::setw(20)
730 G4cout << " Momentum Direct - y : " << std::setw(20)
731 << fStep->GetPreStepPoint()->GetMomentumDirection().y() << std::setw(20)
733 G4cout << " Momentum Direct - z : " << std::setw(20)
734 << fStep->GetPreStepPoint()->GetMomentumDirection().z() << std::setw(20)
736 G4cout << " Momentum - x (MeV/c): " << std::setw(20)
737 << fStep->GetPreStepPoint()->GetMomentum().x() << std::setw(20)
739 G4cout << " Momentum - y (MeV/c): " << std::setw(20)
740 << fStep->GetPreStepPoint()->GetMomentum().y() << std::setw(20)
742 G4cout << " Momentum - z (MeV/c): " << std::setw(20)
743 << fStep->GetPreStepPoint()->GetMomentum().z() << std::setw(20)
745 G4cout << " Total Energy (MeV) : " << std::setw(20)
746 << fStep->GetPreStepPoint()->GetTotalEnergy() << std::setw(20)
748 G4cout << " Kinetic Energy (MeV): " << std::setw(20)
749 << fStep->GetPreStepPoint()->GetKineticEnergy() << std::setw(20)
751 G4cout << " Velocity (mm/ns) : " << std::setw(20)
752 << fStep->GetPreStepPoint()->GetVelocity() << std::setw(20)
754 G4cout << " Volume Name : " << std::setw(20)
756 if (fStep->GetPostStepPoint()->GetPhysicalVolume() != nullptr) {
758 }
759 else {
760 volName = "OutOfWorld";
761 }
762 G4cout << std::setw(20) << volName << G4endl;
763 G4cout << " Safety (mm) : " << std::setw(20)
764 << fStep->GetPreStepPoint()->GetSafety() << std::setw(20)
766 G4cout << " Polarization - x : " << std::setw(20)
767 << fStep->GetPreStepPoint()->GetPolarization().x() << std::setw(20)
769 G4cout << " Polarization - y : " << std::setw(20)
770 << fStep->GetPreStepPoint()->GetPolarization().y() << std::setw(20)
772 G4cout << " Polarization - Z : " << std::setw(20)
773 << fStep->GetPreStepPoint()->GetPolarization().z() << std::setw(20)
775 G4cout << " Weight : " << std::setw(20)
776 << fStep->GetPreStepPoint()->GetWeight() << std::setw(20)
778 G4cout << " Step Status : ";
780 if (tStepStatus == fGeomBoundary) {
781 G4cout << std::setw(20) << "Geom Limit";
782 }
783 else if (tStepStatus == fAlongStepDoItProc) {
784 G4cout << std::setw(20) << "AlongStep Proc.";
785 }
786 else if (tStepStatus == fPostStepDoItProc) {
787 G4cout << std::setw(20) << "PostStep Proc";
788 }
789 else if (tStepStatus == fAtRestDoItProc) {
790 G4cout << std::setw(20) << "AtRest Proc";
791 }
792 else if (tStepStatus == fUndefined) {
793 G4cout << std::setw(20) << "Undefined";
794 }
795
796 tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
797 if (tStepStatus == fGeomBoundary) {
798 G4cout << std::setw(20) << "Geom Limit";
799 }
800 else if (tStepStatus == fAlongStepDoItProc) {
801 G4cout << std::setw(20) << "AlongStep Proc.";
802 }
803 else if (tStepStatus == fPostStepDoItProc) {
804 G4cout << std::setw(20) << "PostStep Proc";
805 }
806 else if (tStepStatus == fAtRestDoItProc) {
807 G4cout << std::setw(20) << "AtRest Proc";
808 }
809 else if (tStepStatus == fUndefined) {
810 G4cout << std::setw(20) << "Undefined";
811 }
812
813 G4cout << G4endl;
814 G4cout << " Process defined Step: ";
815 if (fStep->GetPreStepPoint()->GetProcessDefinedStep() == nullptr) {
816 G4cout << std::setw(20) << "Undefined";
817 }
818 else {
820 }
821 if (fStep->GetPostStepPoint()->GetProcessDefinedStep() == nullptr) {
822 G4cout << std::setw(20) << "Undefined";
823 }
824 else {
826 }
827 G4cout.precision(oldprc);
828
829 G4cout << G4endl;
830 G4cout << " -------------------------------------------------------"
831 << "----------------" << G4endl;
832}
G4StepStatus
@ fGeomBoundary
@ fUndefined
@ fAtRestDoItProc
@ fAlongStepDoItProc
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 ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 213 of file G4SteppingVerbose.cc.

215{
216 if (Silent == 1) {
217 return;
218 }
219 if (SilentStepInfo == 1) {
220 return;
221 }
222
223 CopyState();
224 G4cout.precision(16);
225 G4long prec = G4cout.precision(3);
226
227 if (verboseLevel >= 1) {
228 if (verboseLevel >= 4) VerboseTrack();
229 if (verboseLevel >= 3) {
230 G4cout << G4endl;
231#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
232 G4cout << std::setw(5) << "#Step#"
233 << " " << std::setw(8) << "X"
234 << " " << std::setw(8) << "Y"
235 << " " << std::setw(8) << "Z"
236 << " " << std::setw(9) << "KineE"
237 << " " << std::setw(8) << "dE"
238 << " " << std::setw(12) << "StepLeng"
239 << " " << std::setw(12) << "TrackLeng"
240 << " " << std::setw(12) << "NextVolume"
241 << " " << std::setw(8) << "ProcName" << G4endl;
242#else
243 G4cout << std::setw(5) << "#Step#"
244 << " " << std::setw(8) << "X(mm)"
245 << " " << std::setw(8) << "Y(mm)"
246 << " " << std::setw(8) << "Z(mm)"
247 << " " << std::setw(9) << "KinE(MeV)"
248 << " " << std::setw(8) << "dE(MeV)"
249 << " " << std::setw(8) << "StepLeng"
250 << " " << std::setw(9) << "TrackLeng"
251 << " " << std::setw(11) << "NextVolume"
252 << " " << std::setw(8) << "ProcName" << G4endl;
253#endif
254 }
255 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " << std::setw(8)
256 << G4BestUnit(fTrack->GetPosition().x(), "Length") << " " << std::setw(8)
257 << G4BestUnit(fTrack->GetPosition().y(), "Length") << " " << std::setw(8)
258 << G4BestUnit(fTrack->GetPosition().z(), "Length") << " " << std::setw(9)
259 << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << " " << std::setw(8)
260 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " " << std::setw(8)
261 << G4BestUnit(fStep->GetStepLength(), "Length") << " " << std::setw(9)
262 << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
263
264 if (fTrack->GetNextVolume() != nullptr) {
265 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
266 }
267 else {
268 G4cout << std::setw(11) << "OutOfWorld"
269 << " ";
270 }
271 if (fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr) {
273 }
274 else {
275 G4cout << "User Limit";
276 }
277 G4cout << G4endl;
278 if (verboseLevel == 2) {
280 if (tN2ndariesTot > 0) {
281 G4cout << " :----- List of 2ndaries - "
282 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot << "(Rest=" << std::setw(2)
283 << fN2ndariesAtRestDoIt << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
284 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt << "), "
285 << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size() << " ---------------"
286 << G4endl;
287
288 for (std::size_t lp1 = (*fSecondary).size() - tN2ndariesTot; lp1 < (*fSecondary).size();
289 ++lp1)
290 {
291 G4cout << " : " << std::setw(9)
292 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length") << " "
293 << std::setw(9) << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
294 << " " << std::setw(9)
295 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << " "
296 << std::setw(9) << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
297 << " " << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
298 << G4endl;
299 }
300 G4cout << " :-----------------------------"
301 << "----------------------------------"
302 << "-- EndOf2ndaries Info ---------------" << G4endl;
303 }
304 }
305 }
306 G4cout.precision(prec);
307}
G4double GetStepLength() const
void VerboseTrack() override
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 ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 396 of file G4SteppingVerbose.cc.

398{
399 if (Silent == 1) {
400 return;
401 }
402
403 CopyState();
404
405 G4long prec = G4cout.precision(3);
406 if (verboseLevel > 0) {
407#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
408 G4cout << std::setw(5) << "Step#"
409 << " " << std::setw(8) << "X"
410 << " " << std::setw(8) << "Y"
411 << " " << std::setw(8) << "Z"
412 << " " << std::setw(9) << "KineE"
413 << " " << std::setw(8) << "dE"
414 << " " << std::setw(12) << "StepLeng"
415 << " " << std::setw(12) << "TrackLeng"
416 << " " << std::setw(12) << "NextVolume"
417 << " " << std::setw(8) << "ProcName" << G4endl;
418#else
419 G4cout << std::setw(5) << "Step#"
420 << " " << std::setw(8) << "X(mm)"
421 << " " << std::setw(8) << "Y(mm)"
422 << " " << std::setw(8) << "Z(mm)"
423 << " " << std::setw(9) << "KinE(MeV)"
424 << " " << std::setw(8) << "dE(MeV)"
425 << " " << std::setw(8) << "StepLeng"
426 << " " << std::setw(9) << "TrackLeng"
427 << " " << std::setw(11) << "NextVolume"
428 << " " << std::setw(8) << "ProcName" << G4endl;
429#endif
430
431 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " << std::setw(8)
432 << G4BestUnit(fTrack->GetPosition().x(), "Length") << " " << std::setw(8)
433 << G4BestUnit(fTrack->GetPosition().y(), "Length") << " " << std::setw(8)
434 << G4BestUnit(fTrack->GetPosition().z(), "Length") << " " << std::setw(9)
435 << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << " " << std::setw(8)
436 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " " << std::setw(8)
437 << G4BestUnit(fStep->GetStepLength(), "Length") << " " << std::setw(9)
438 << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
439
440 if (fTrack->GetNextVolume() != nullptr) {
441 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
442 }
443 else {
444 G4cout << std::setw(11) << "OutOfWorld"
445 << " ";
446 }
447 G4cout << "initStep" << G4endl;
448 }
449 G4cout.precision(prec);
450}

◆ UseBestUnit()

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

Definition at line 835 of file G4SteppingVerbose.cc.

837{
838 useBestUnitPrecision = prec;
839}

◆ VerboseParticleChange()

void G4SteppingVerbose::VerboseParticleChange ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 670 of file G4SteppingVerbose.cc.

672{
673 if (Silent == 1) {
674 return;
675 }
676
677 G4cout << G4endl;
678 G4cout << " ++G4ParticleChange Information " << G4endl;
680}
virtual void DumpInfo() const
G4VParticleChange * fParticleChange

Referenced by AlongStepDoItOneByOne(), and PostStepDoItOneByOne().

◆ VerboseTrack()

void G4SteppingVerbose::VerboseTrack ( )
overridevirtual

Implements G4VSteppingVerbose.

Reimplemented in G4SteppingVerboseWithUnits.

Definition at line 536 of file G4SteppingVerbose.cc.

538{
539 if (Silent == 1) {
540 return;
541 }
542
543 CopyState();
544
545 G4cout << G4endl;
546 G4cout << " ++G4Track Information " << G4endl;
547 G4long prec = G4cout.precision(3);
548
549 G4cout << " -----------------------------------------------" << G4endl;
550 G4cout << " G4Track Information " << std::setw(20) << G4endl;
551 G4cout << " -----------------------------------------------" << G4endl;
552
553 G4cout << " Step number : " << std::setw(20) << fTrack->GetCurrentStepNumber()
554 << G4endl;
555#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
556 G4cout << " Position - x : " << std::setw(20)
557 << G4BestUnit(fTrack->GetPosition().x(), "Length") << G4endl;
558 G4cout << " Position - y : " << std::setw(20)
559 << G4BestUnit(fTrack->GetPosition().y(), "Length") << G4endl;
560 G4cout << " Position - z : " << std::setw(20)
561 << G4BestUnit(fTrack->GetPosition().z(), "Length") << G4endl;
562 G4cout << " Global Time : " << std::setw(20)
563 << G4BestUnit(fTrack->GetGlobalTime(), "Time") << G4endl;
564 G4cout << " Local Time : " << std::setw(20)
565 << G4BestUnit(fTrack->GetLocalTime(), "Time") << G4endl;
566#else
567 G4cout << " Position - x (mm) : " << std::setw(20) << fTrack->GetPosition().x() / mm
568 << G4endl;
569 G4cout << " Position - y (mm) : " << std::setw(20) << fTrack->GetPosition().y() / mm
570 << G4endl;
571 G4cout << " Position - z (mm) : " << std::setw(20) << fTrack->GetPosition().z() / mm
572 << G4endl;
573 G4cout << " Global Time (ns) : " << std::setw(20) << fTrack->GetGlobalTime() / ns
574 << G4endl;
575 G4cout << " Local Time (ns) : " << std::setw(20) << fTrack->GetLocalTime() / ns
576 << G4endl;
577#endif
578 G4cout << " Momentum Direct - x : " << std::setw(20) << fTrack->GetMomentumDirection().x()
579 << G4endl;
580 G4cout << " Momentum Direct - y : " << std::setw(20) << fTrack->GetMomentumDirection().y()
581 << G4endl;
582 G4cout << " Momentum Direct - z : " << std::setw(20) << fTrack->GetMomentumDirection().z()
583 << G4endl;
584#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
585 G4cout << " Kinetic Energy : "
586#else
587 G4cout << " Kinetic Energy (MeV): "
588#endif
589 << std::setw(20) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << G4endl;
590 G4cout << " Polarization - x : " << std::setw(20) << fTrack->GetPolarization().x()
591 << G4endl;
592 G4cout << " Polarization - y : " << std::setw(20) << fTrack->GetPolarization().y()
593 << G4endl;
594 G4cout << " Polarization - z : " << std::setw(20) << fTrack->GetPolarization().z()
595 << G4endl;
596 G4cout << " Track Length : " << std::setw(20)
597 << G4BestUnit(fTrack->GetTrackLength(), "Length") << G4endl;
598 G4cout << " Track ID # : " << std::setw(20) << fTrack->GetTrackID() << G4endl;
599 G4cout << " Parent Track ID # : " << std::setw(20) << fTrack->GetParentID() << G4endl;
600 G4cout << " Next Volume : " << std::setw(20);
601 if (fTrack->GetNextVolume() != nullptr) {
602 G4cout << fTrack->GetNextVolume()->GetName() << " ";
603 }
604 else {
605 G4cout << "OutOfWorld"
606 << " ";
607 }
608 G4cout << G4endl;
609 G4cout << " Track Status : " << std::setw(20);
610 if (fTrack->GetTrackStatus() == fAlive) {
611 G4cout << " Alive";
612 }
613 else if (fTrack->GetTrackStatus() == fStopButAlive) {
614 G4cout << " StopButAlive";
615 }
616 else if (fTrack->GetTrackStatus() == fStopAndKill) {
617 G4cout << " StopAndKill";
618 }
620 G4cout << " KillTrackAndSecondaries";
621 }
622 else if (fTrack->GetTrackStatus() == fSuspend) {
623 G4cout << " Suspend";
624 }
626 G4cout << " PostponeToNextEvent";
627 }
628 G4cout << G4endl;
629#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
630 G4cout << " Vertex - x : " << std::setw(20)
631 << G4BestUnit(fTrack->GetVertexPosition().x(), "Length") << G4endl;
632 G4cout << " Vertex - y : " << std::setw(20)
633 << G4BestUnit(fTrack->GetVertexPosition().y(), "Length") << G4endl;
634 G4cout << " Vertex - z : " << std::setw(20)
635 << G4BestUnit(fTrack->GetVertexPosition().z(), "Length") << G4endl;
636#else
637 G4cout << " Vertex - x (mm) : " << std::setw(20)
638 << fTrack->GetVertexPosition().x() / mm << G4endl;
639 G4cout << " Vertex - y (mm) : " << std::setw(20)
640 << fTrack->GetVertexPosition().y() / mm << G4endl;
641 G4cout << " Vertex - z (mm) : " << std::setw(20)
642 << fTrack->GetVertexPosition().z() / mm << G4endl;
643#endif
644 G4cout << " Vertex - Px (MomDir): " << std::setw(20)
646 G4cout << " Vertex - Py (MomDir): " << std::setw(20)
648 G4cout << " Vertex - Pz (MomDir): " << std::setw(20)
650#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
651 G4cout << " Vertex - KineE : "
652#else
653 G4cout << " Vertex - KineE (MeV): "
654#endif
655 << std::setw(20) << G4BestUnit(fTrack->GetVertexKineticEnergy(), "Energy") << G4endl;
656
657 G4cout << " Creator Process : " << std::setw(20);
658 if (fTrack->GetCreatorProcess() == nullptr) {
659 G4cout << " Event Generator" << G4endl;
660 }
661 else {
663 }
664
665 G4cout << " -----------------------------------------------" << G4endl;
666 G4cout.precision(prec);
667}
@ 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

Referenced by StepInfo().


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