42#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
45#define G4BestUnit(a,b) a
54#ifdef G4_TRACKING_DEBUG
55 G4cout <<
"G4SteppingVerbose has instantiated" <<
G4endl;
90 ptProcManager = (*fAtRestDoItVector)[np];
91 G4cout <<
" # " << npt <<
" : "
98 ptProcManager = (*fAtRestDoItVector)[np];
108 G4cout <<
" -- List of secondaries generated : "
109 <<
"(x,y,z,kE,t,PID) --" <<
G4endl;
111 lp1<(*fSecondary).size(); ++lp1)
116 <<
" " << std::setw( 9)
118 <<
" " << std::setw( 9)
120 <<
" " << std::setw( 9)
122 <<
" " << std::setw( 9)
124 <<
" " << std::setw(18)
125 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
151 G4cout <<
" >>AlongStepDoIt (after all invocations):" <<
G4endl;
156 ptProcManager = (*fAlongStepDoItVector)(ci);
157 G4cout <<
" " << ci+1 <<
") ";
158 if(ptProcManager !=
nullptr)
166 G4cout <<
" ++List of secondaries generated "
167 <<
"(x,y,z,kE,t,PID):"
168 <<
" No. of secondaries = "
169 << (*fSecondary).size() <<
G4endl;
171 if((*fSecondary).size()>0)
173 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
178 <<
" " << std::setw( 9)
180 <<
" " << std::setw( 9)
182 <<
" " << std::setw( 9)
184 <<
" " << std::setw( 9)
186 <<
" " << std::setw(18)
187 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
214 G4cout <<
" **PostStepDoIt (after all invocations):" <<
G4endl;
223 ptProcManager = (*fPostStepDoItVector)[np];
224 G4cout <<
" " << npt <<
") "
231 ptProcManager = (*fPostStepDoItVector)[np];
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."
246 if((*fSecondary).size()>0)
248 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
253 <<
" " << std::setw( 9)
255 <<
" " << std::setw( 9)
257 <<
" " << std::setw( 9)
259 <<
" " << std::setw( 9)
261 <<
" " << std::setw(18)
262 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
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;
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;
333 G4cout << std::setw(11) <<
"OutOfWorld" <<
" ";
351 G4cout <<
" :----- List of 2ndaries - "
352 <<
"#SpawnInStep=" << std::setw(3) << tN2ndariesTot
357 <<
"#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
358 <<
" ---------------"
361 for(std::size_t lp1=(*fSecondary).size()-tN2ndariesTot;
362 lp1<(*fSecondary).size(); ++lp1)
367 <<
" " << std::setw( 9)
369 <<
" " << std::setw( 9)
371 <<
" " << std::setw( 9)
373 <<
" " << std::setw(18)
374 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
377 G4cout <<
" :-----------------------------"
378 <<
"----------------------------------"
379 <<
"-- EndOf2ndaries Info ---------------" <<
G4endl;
396 <<
" >>DefinePhysicalStepLength (List of proposed StepLengths): "
411 G4cout <<
"=== Defined Physical Step Length (DPSL)" <<
G4endl;
412 G4cout <<
" ++ProposedStep(UserLimit) = "
414 <<
" : ProcName = User defined maximum allowed Step" <<
G4endl;
427 G4cout <<
" ++ProposedStep(PostStep ) = "
462 G4cout <<
" ++ProposedStep(AlongStep) = "
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;
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;
539 G4cout << std::setw(11) <<
"OutOfWorld" <<
" ";
557 G4cout <<
" >>AlongStepDoIt (process by process): "
558 <<
" Process Name = "
563 <<
"!Note! Safety of PostStep is only valid "
564 <<
"after all DoIt invocations."
570 G4cout <<
" ++List of secondaries generated "
571 <<
"(x,y,z,kE,t,PID):"
572 <<
" No. of secodaries = "
578 lp1<(*fSecondary).size(); ++lp1)
583 <<
" " << std::setw( 9)
585 <<
" " << std::setw( 9)
587 <<
" " << std::setw( 9)
589 <<
" " << std::setw( 9)
591 <<
" " << std::setw(18)
592 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
610 G4cout <<
" >>PostStepDoIt (process by process): "
611 <<
" Process Name = "
619 G4cout <<
" ++List of secondaries generated "
620 <<
"(x,y,z,kE,t,PID):"
621 <<
" No. of secodaries = "
627 lp1<(*fSecondary).size(); ++lp1)
632 <<
" " << std::setw( 9)
634 <<
" " << std::setw( 9)
636 <<
" " << std::setw( 9)
638 <<
" " << std::setw( 9)
640 <<
" " << std::setw(18)
641 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
661 G4cout <<
" -----------------------------------------------"
663 G4cout <<
" G4Track Information " << std::setw(20) <<
G4endl;
664 G4cout <<
" -----------------------------------------------"
667 G4cout <<
" Step number : "
670#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
671 G4cout <<
" Position - x : "
674 G4cout <<
" Position - y : "
677 G4cout <<
" Position - z : "
680 G4cout <<
" Global Time : "
683 G4cout <<
" Local Time : "
687 G4cout <<
" Position - x (mm) : "
690 G4cout <<
" Position - y (mm) : "
693 G4cout <<
" Position - z (mm) : "
696 G4cout <<
" Global Time (ns) : "
699 G4cout <<
" Local Time (ns) : "
703 G4cout <<
" Momentum Direct - x : "
706 G4cout <<
" Momentum Direct - y : "
709 G4cout <<
" Momentum Direct - z : "
712#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
713 G4cout <<
" Kinetic Energy : "
715 G4cout <<
" Kinetic Energy (MeV): "
719 G4cout <<
" Polarization - x : "
722 G4cout <<
" Polarization - y : "
725 G4cout <<
" Polarization - z : "
728 G4cout <<
" Track Length : "
731 G4cout <<
" Track ID # : "
734 G4cout <<
" Parent Track ID # : "
737 G4cout <<
" Next Volume : "
745 G4cout <<
"OutOfWorld" <<
" ";
748 G4cout <<
" Track Status : "
756 G4cout <<
" StopButAlive";
764 G4cout <<
" KillTrackAndSecondaries";
772 G4cout <<
" PostponeToNextEvent";
775#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
776 G4cout <<
" Vertex - x : "
780 G4cout <<
" Vertex - y : "
784 G4cout <<
" Vertex - z : "
789 G4cout <<
" Vertex - x (mm) : "
792 G4cout <<
" Vertex - y (mm) : "
795 G4cout <<
" Vertex - z (mm) : "
799 G4cout <<
" Vertex - Px (MomDir): "
802 G4cout <<
" Vertex - Py (MomDir): "
805 G4cout <<
" Vertex - Pz (MomDir): "
808#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
809 G4cout <<
" Vertex - KineE : "
811 G4cout <<
" Vertex - KineE (MeV): "
817 G4cout <<
" Creator Process : "
828 G4cout <<
" -----------------------------------------------"
855 oldprc =
G4cout.precision(16);
858 G4cout <<
" Address of G4Track : "
860 G4cout <<
" Step Length (mm) : "
862 G4cout <<
" Energy Deposit (MeV) : "
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) : "
877 G4cout <<
" Position - y (mm) : "
881 G4cout <<
" Position - z (mm) : "
885 G4cout <<
" Global Time (ns) : "
889 G4cout <<
" Local Time (ns) : "
893 G4cout <<
" Proper Time (ns) : "
897 G4cout <<
" Momentum Direct - x : "
901 G4cout <<
" Momentum Direct - y : "
905 G4cout <<
" Momentum Direct - z : "
909 G4cout <<
" Momentum - x (MeV/c): "
913 G4cout <<
" Momentum - y (MeV/c): "
917 G4cout <<
" Momentum - z (MeV/c): "
921 G4cout <<
" Total Energy (MeV) : "
925 G4cout <<
" Kinetic Energy (MeV): "
929 G4cout <<
" Velocity (mm/ns) : "
933 G4cout <<
" Volume Name : "
942 volName =
"OutOfWorld";
945 G4cout <<
" Safety (mm) : "
949 G4cout <<
" Polarization - x : "
953 G4cout <<
" Polarization - y : "
957 G4cout <<
" Polarization - Z : "
965 G4cout <<
" Step Status : " ;
969 G4cout << std::setw(20) <<
"Geom Limit";
973 G4cout << std::setw(20) <<
"AlongStep Proc.";
977 G4cout << std::setw(20) <<
"PostStep Proc";
981 G4cout << std::setw(20) <<
"AtRest Proc";
985 G4cout << std::setw(20) <<
"Undefined";
991 G4cout << std::setw(20) <<
"Geom Limit";
995 G4cout << std::setw(20) <<
"AlongStep Proc.";
999 G4cout << std::setw(20) <<
"PostStep Proc";
1003 G4cout << std::setw(20) <<
"AtRest Proc";
1007 G4cout << std::setw(20) <<
"Undefined";
1011 G4cout <<
" Process defined Step: " ;
1014 G4cout << std::setw(20) <<
"Undefined";
1024 G4cout << std::setw(20) <<
"Undefined";
1032 G4cout.precision(oldprc);
1035 G4cout <<
" -------------------------------------------------------"
1036 <<
"----------------" <<
G4endl;
@ NotCandidateForSelection
static constexpr double mm
@ 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
virtual void PostStepDoItAllDone()
virtual void DPSLStarted()
virtual void PostStepDoItOneByOne()
virtual void AtRestDoItInvoked()
virtual void AlongStepDoItAllDone()
virtual ~G4SteppingVerbose()
virtual void ShowStep() const
virtual void DPSLPostStep()
static void UseBestUnit(G4int prec=4)
virtual void DPSLUserLimit()
virtual void TrackingStarted()
virtual void AlongStepDoItOneByOne()
static G4int BestUnitPrecision()
virtual void DPSLAlongStep()
virtual void VerboseTrack()
virtual void VerboseParticleChange()
static G4int useBestUnitPrecision
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