43#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
46# define G4BestUnit(a, b) a
49G4int G4SteppingVerbose::useBestUnitPrecision = -1;
74 ptProcManager = (*fAtRestDoItVector)[(
G4int)np];
80 ptProcManager = (*fAtRestDoItVector)[(
G4int)np];
88 G4cout <<
" -- List of secondaries generated : "
89 <<
"(x,y,z,kE,t,PID) --" <<
G4endl;
91 lp1 < (*fSecondary).size(); ++lp1)
93 G4cout <<
" " << std::setw(9)
99 << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
124 G4cout <<
" >>AlongStepDoIt (after all invocations):" <<
G4endl;
128 ptProcManager = (*fAlongStepDoItVector)((
G4int)ci);
129 G4cout <<
" " << ci + 1 <<
") ";
130 if (ptProcManager !=
nullptr) {
137 G4cout <<
" ++List of secondaries generated "
138 <<
"(x,y,z,kE,t,PID):"
139 <<
" No. of secondaries = " << (*fSecondary).size() <<
G4endl;
141 if (! (*fSecondary).empty()) {
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;
173 G4cout <<
" **PostStepDoIt (after all invocations):" <<
G4endl;
180 ptProcManager = (*fPostStepDoItVector)[(
G4int)np];
186 ptProcManager = (*fPostStepDoItVector)[(
G4int)np];
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;
198 if (! (*fSecondary).empty()) {
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;
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;
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;
268 G4cout << std::setw(11) <<
"OutOfWorld"
280 if (tN2ndariesTot > 0) {
281 G4cout <<
" :----- List of 2ndaries - "
282 <<
"#SpawnInStep=" << std::setw(3) << tN2ndariesTot <<
"(Rest=" << std::setw(2)
285 <<
"#SpawnTotal=" << std::setw(3) << (*fSecondary).size() <<
" ---------------"
288 for (std::size_t lp1 = (*fSecondary).size() - tN2ndariesTot; lp1 < (*fSecondary).size();
291 G4cout <<
" : " << std::setw(9)
294 <<
" " << std::setw(9)
297 <<
" " << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
300 G4cout <<
" :-----------------------------"
301 <<
"----------------------------------"
302 <<
"-- EndOf2ndaries Info ---------------" <<
G4endl;
319 G4cout <<
G4endl <<
" >>DefinePhysicalStepLength (List of proposed StepLengths): " <<
G4endl;
334 G4cout <<
"=== Defined Physical Step Length (DPSL)" <<
G4endl;
336 <<
" : ProcName = User defined maximum allowed Step" <<
G4endl;
380 G4cout <<
" ++ProposedStep(AlongStep) = " << std::setw(9)
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;
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;
444 G4cout << std::setw(11) <<
"OutOfWorld"
464 G4cout <<
" >>AlongStepDoIt (process by process): "
469 <<
"!Note! Safety of PostStep is only valid "
470 <<
"after all DoIt invocations." <<
G4endl;
475 G4cout <<
" ++List of secondaries generated "
476 <<
"(x,y,z,kE,t,PID):"
481 lp1 < (*fSecondary).size(); ++lp1)
483 G4cout <<
" " << std::setw(9)
489 << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
507 G4cout <<
" >>PostStepDoIt (process by process): "
515 G4cout <<
" ++List of secondaries generated "
516 <<
"(x,y,z,kE,t,PID):"
521 lp1 < (*fSecondary).size(); ++lp1)
523 G4cout <<
" " << std::setw(9)
529 << std::setw(18) << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
549 G4cout <<
" -----------------------------------------------" <<
G4endl;
550 G4cout <<
" G4Track Information " << std::setw(20) <<
G4endl;
551 G4cout <<
" -----------------------------------------------" <<
G4endl;
555#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
556 G4cout <<
" Position - x : " << std::setw(20)
558 G4cout <<
" Position - y : " << std::setw(20)
560 G4cout <<
" Position - z : " << std::setw(20)
562 G4cout <<
" Global Time : " << std::setw(20)
564 G4cout <<
" Local Time : " << std::setw(20)
584#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
585 G4cout <<
" Kinetic Energy : "
587 G4cout <<
" Kinetic Energy (MeV): "
596 G4cout <<
" Track Length : " << std::setw(20)
600 G4cout <<
" Next Volume : " << std::setw(20);
609 G4cout <<
" Track Status : " << std::setw(20);
614 G4cout <<
" StopButAlive";
620 G4cout <<
" KillTrackAndSecondaries";
626 G4cout <<
" PostponeToNextEvent";
629#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
630 G4cout <<
" Vertex - x : " << std::setw(20)
632 G4cout <<
" Vertex - y : " << std::setw(20)
634 G4cout <<
" Vertex - z : " << std::setw(20)
637 G4cout <<
" Vertex - x (mm) : " << std::setw(20)
639 G4cout <<
" Vertex - y (mm) : " << std::setw(20)
641 G4cout <<
" Vertex - z (mm) : " << std::setw(20)
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 : "
653 G4cout <<
" Vertex - KineE (MeV): "
657 G4cout <<
" Creator Process : " << std::setw(20);
665 G4cout <<
" -----------------------------------------------" <<
G4endl;
695 oldprc =
G4cout.precision(16);
703 G4cout <<
" -------------------------------------------------------"
704 <<
"----------------" <<
G4endl;
705 G4cout <<
" StepPoint Information " << std::setw(20) <<
"PreStep" << std::setw(20)
707 G4cout <<
" -------------------------------------------------------"
708 <<
"----------------" <<
G4endl;
709 G4cout <<
" Position - x (mm) : " << std::setw(20)
712 G4cout <<
" Position - y (mm) : " << std::setw(20)
715 G4cout <<
" Position - z (mm) : " << std::setw(20)
718 G4cout <<
" Global Time (ns) : " << std::setw(20)
721 G4cout <<
" Local Time (ns) : " << std::setw(20)
724 G4cout <<
" Proper Time (ns) : " << std::setw(20)
727 G4cout <<
" Momentum Direct - x : " << std::setw(20)
730 G4cout <<
" Momentum Direct - y : " << std::setw(20)
733 G4cout <<
" Momentum Direct - z : " << std::setw(20)
736 G4cout <<
" Momentum - x (MeV/c): " << std::setw(20)
739 G4cout <<
" Momentum - y (MeV/c): " << std::setw(20)
742 G4cout <<
" Momentum - z (MeV/c): " << std::setw(20)
745 G4cout <<
" Total Energy (MeV) : " << std::setw(20)
748 G4cout <<
" Kinetic Energy (MeV): " << std::setw(20)
751 G4cout <<
" Velocity (mm/ns) : " << std::setw(20)
754 G4cout <<
" Volume Name : " << std::setw(20)
760 volName =
"OutOfWorld";
763 G4cout <<
" Safety (mm) : " << std::setw(20)
766 G4cout <<
" Polarization - x : " << std::setw(20)
769 G4cout <<
" Polarization - y : " << std::setw(20)
772 G4cout <<
" Polarization - Z : " << std::setw(20)
775 G4cout <<
" Weight : " << std::setw(20)
778 G4cout <<
" Step Status : ";
781 G4cout << std::setw(20) <<
"Geom Limit";
784 G4cout << std::setw(20) <<
"AlongStep Proc.";
787 G4cout << std::setw(20) <<
"PostStep Proc";
790 G4cout << std::setw(20) <<
"AtRest Proc";
793 G4cout << std::setw(20) <<
"Undefined";
798 G4cout << std::setw(20) <<
"Geom Limit";
801 G4cout << std::setw(20) <<
"AlongStep Proc.";
804 G4cout << std::setw(20) <<
"PostStep Proc";
807 G4cout << std::setw(20) <<
"AtRest Proc";
810 G4cout << std::setw(20) <<
"Undefined";
814 G4cout <<
" Process defined Step: ";
816 G4cout << std::setw(20) <<
"Undefined";
822 G4cout << std::setw(20) <<
"Undefined";
830 G4cout <<
" -------------------------------------------------------"
831 <<
"----------------" <<
G4endl;
838 useBestUnitPrecision = prec;
845 return useBestUnitPrecision;
@ NotCandidateForSelection
@ fKillTrackAndSecondaries
G4GLOB_DLL std::ostream G4cout
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 GetStepLength() const
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
void AlongStepDoItAllDone() override
void VerboseParticleChange() override
virtual void ShowStep() const
void DPSLAlongStep() override
void TrackingStarted() override
static void UseBestUnit(G4int prec=4)
void PostStepDoItOneByOne() override
void DPSLUserLimit() override
void AtRestDoItInvoked() override
void DPSLStarted() override
static G4int BestUnitPrecision()
void VerboseTrack() override
void DPSLPostStep() override
void AlongStepDoItOneByOne() override
void PostStepDoItAllDone() override
G4TrackStatus GetTrackStatus() const
G4double GetVertexKineticEnergy() const
const G4VProcess * GetCreatorProcess() const
G4VPhysicalVolume * GetNextVolume() const
const G4ThreeVector & GetPosition() const
G4double GetTrackLength() const
const G4ThreeVector & GetVertexMomentumDirection() const
G4double GetGlobalTime() const
G4int GetCurrentStepNumber() const
const G4ThreeVector & GetVertexPosition() const
G4double GetLocalTime() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4double GetStepLength() const
G4int GetParentID() const
virtual void DumpInfo() const
const G4String & GetName() const
const G4String & GetProcessName() const
std::size_t MAXofAlongStepLoops
G4int fN2ndariesPostStepDoIt
G4ForceCondition fCondition
G4GPILSelection fGPILSelection
G4VParticleChange * fParticleChange
G4int fN2ndariesAtRestDoIt
G4int fN2ndariesAlongStepDoIt
G4SelectedPostStepDoItVector * fSelectedPostStepDoItVector
std::size_t MAXofAtRestLoops
G4SelectedAtRestDoItVector * fSelectedAtRestDoItVector
G4VProcess * fCurrentProcess
static G4TRACKING_DLL G4ThreadLocal G4int SilentStepInfo
static G4TRACKING_DLL G4ThreadLocal G4int Silent
std::size_t MAXofPostStepLoops
G4TrackVector * fSecondary