46#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
48#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
51#define G4BestUnit(a,b) a
60#ifdef G4_TRACKING_DEBUG
61 G4cout <<
"G4ITSteppingVerbose has instantiated" <<
G4endl;
99 ptProcManager = (*fAtRestDoItVector)[np];
106 ptProcManager = (*fAtRestDoItVector)[np];
116 G4cout <<
" -- List of secondaries generated : "
117 <<
"(x,y,z,kE,t,PID) --" <<
G4endl;
119 lp1<(*fSecondary).size(); lp1++)
133 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
160 G4cout <<
" >>AlongStepDoIt (after all invocations):" <<
G4endl;
165 ptProcManager = (*fAlongStepDoItVector)(ci);
166 G4cout <<
" " << ci+1 <<
") ";
167 if(ptProcManager != 0)
175 G4cout <<
" ++List of secondaries generated "
176 <<
"(x,y,z,kE,t,PID):"
177 <<
" No. of secodaries = "
178 << (*fSecondary).size() <<
G4endl;
180 if((*fSecondary).size()>0)
182 for(
size_t lp1=0; lp1<(*fSecondary).size(); lp1++)
196 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
224 G4cout <<
" **PostStepDoIt (after all invocations):" <<
G4endl;
233 ptProcManager = (*fPostStepDoItVector)[np];
240 ptProcManager = (*fPostStepDoItVector)[np];
241 G4cout <<
" " << npt <<
") "
248 G4cout <<
" ++List of secondaries generated " <<
"(x,y,z,kE,t,PID):"
249 <<
" No. of secodaries = " << (*fSecondary).size() <<
G4endl;
250 G4cout <<
" [Note]Secondaries from AlongStepDoIt included." <<
G4endl;
252 if((*fSecondary).size() > 0)
254 for(
size_t lp1 = 0; lp1 < (*fSecondary).size(); lp1++)
256 G4cout <<
" " << std::setw(9)
258 <<
" " << std::setw(9)
260 <<
" " << std::setw(9)
262 <<
" " << std::setw(9)
264 <<
" " << std::setw(9)
266 <<
" " << std::setw(18)
267 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
295#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
296 G4cout << std::setw( 5) <<
"#TrackID" <<
" "
297 << std::setw( 5) <<
"#Step#" <<
" "
298 << std::setw( 8) <<
"X" <<
" " << std::setw( 8) <<
"Y" <<
" "
299 << std::setw( 8) <<
"Z" <<
" "
300 << std::setw( 9) <<
"KineE" <<
" " << std::setw( 8) <<
"dE" <<
" "
301 << std::setw(12) <<
"StepLeng" <<
" " << std::setw(12) <<
"TrackLeng" <<
" "
302 << std::setw(12) <<
"NextVolume" <<
" " << std::setw( 8) <<
"ProcName" <<
G4endl;
304 G4cout << std::setw( 5) <<
"#TrackID" <<
" "
305 << std::setw( 5) <<
"#Step#" <<
" "
306 << std::setw( 8) <<
"X(mm)" <<
" " << std::setw( 8) <<
"Y(mm)" <<
" "
307 << std::setw( 8) <<
"Z(mm)" <<
" "
308 << std::setw( 9) <<
"KinE(MeV)" <<
" " << std::setw( 8) <<
"dE(MeV)" <<
" "
309 << std::setw( 8) <<
"StepLeng" <<
" " << std::setw( 9) <<
"TrackLeng" <<
" "
310 << std::setw(11) <<
"NextVolume" <<
" " << std::setw( 8) <<
"ProcName" <<
G4endl;
317 <<
" " << std::setw(8)
320 <<
" " << std::setw(8)
323 <<
" " << std::setw(9)
333 G4cout << std::setw(11) <<
"OutOfWorld" <<
" ";
350 if(tN2ndariesTot > 0)
352 G4cout <<
" :----- List of 2ndaries - " <<
"#SpawnInStep="
353 << std::setw(3) << tN2ndariesTot <<
"(Rest=" << std::setw(2)
357 << std::setw(3) << (*fSecondary).size() <<
" ---------------"
360 for(
size_t lp1=(*fSecondary).size()-tN2ndariesTot; lp1<(*fSecondary).size(); lp1++)
372 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
374 G4cout <<
" :-----------------------------" <<
"----------------------------------"
375 <<
"-- EndOf2ndaries Info ---------------" <<
G4endl;
399#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
400 G4cout << std::setw( 5) <<
"#TrackID" <<
" "
401 << std::setw( 5) <<
"#Step#" <<
" "
402 << std::setw( 8) <<
"X" <<
" " << std::setw( 8) <<
"Y" <<
" "
403 << std::setw( 8) <<
"Z" <<
" "
404 << std::setw( 9) <<
"KineE" <<
" " << std::setw( 8) <<
"dE" <<
" "
405 << std::setw(12) <<
"StepLeng" <<
" " << std::setw(12) <<
"TrackLeng" <<
" "
406 << std::setw(12) <<
"NextVolume" <<
" " << std::setw( 8) <<
"ProcName" <<
G4endl;
408 G4cout << std::setw( 5) <<
"#TrackID" <<
" "
409 << std::setw( 5) <<
"#Step#" <<
" "
410 << std::setw( 8) <<
"X(mm)" <<
" " << std::setw( 8) <<
"Y(mm)" <<
" "
411 << std::setw( 8) <<
"Z(mm)" <<
" "
412 << std::setw( 9) <<
"KinE(MeV)" <<
" " << std::setw( 8) <<
"dE(MeV)" <<
" "
413 << std::setw( 8) <<
"StepLeng" <<
" " << std::setw( 9) <<
"TrackLeng" <<
" "
414 << std::setw(11) <<
"NextVolume" <<
" " << std::setw( 8) <<
"ProcName" <<
G4endl;
421 <<
" " << std::setw(8)
424 <<
" " << std::setw(8)
437 G4cout << std::setw(11) <<
"OutOfWorld" <<
" ";
453 if(tN2ndariesTot > 0)
455 G4cout <<
" :----- List of 2ndaries - " <<
"#SpawnInStep="
456 << std::setw(3) << tN2ndariesTot <<
"(Rest=" << std::setw(2)
460 << std::setw(3) << (*fSecondary).size() <<
" ---------------"
463 for(
size_t lp1=(*fSecondary).size()-tN2ndariesTot; lp1<(*fSecondary).size(); lp1++)
475 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
477 G4cout <<
" :-----------------------------" <<
"----------------------------------"
478 <<
"-- EndOf2ndaries Info ---------------" <<
G4endl;
497 G4cout <<
G4endl<<
" >>DefinePhysicalStepLength (List of proposed StepLengths): " <<
G4endl;
513 G4cout <<
"=== Defined Physical Step Length (DPSL)" <<
G4endl;
515 <<
" : ProcName = User defined maximum allowed Step" <<
G4endl;
531 G4cout <<
" ++ProposedStep(PostStep ) = " << std::setw(9)
569 G4cout <<
" ++ProposedStep(AlongStep) = " << std::setw(9)
620 G4cout <<
"Start tracking : "
649 G4cout << std::setw(11) <<
"OutOfWorld" <<
" ";
662 G4cout <<
" * End tracking : " <<
" Particle : "
686 G4cout <<
" >>AlongStepDoIt (process by process): " <<
" Process Name = "
690 G4cout <<
" " <<
"!Note! Safety of PostStep is only valid "
691 <<
"after all DoIt invocations." <<
G4endl;
696 G4cout <<
" ++List of secondaries generated " <<
"(x,y,z,kE,t,PID):"
702 lp1 < (*fSecondary).size(); lp1++)
704 G4cout <<
" " << std::setw(9)
706 <<
" " << std::setw(9)
708 <<
" " << std::setw(9)
710 <<
" " << std::setw(9)
712 <<
" " << std::setw(9)
715 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
730 G4cout <<
" >>PostStepDoIt (process by process): " <<
" Process Name = "
738 G4cout <<
" ++List of secondaries generated " <<
"(x,y,z,kE,t,PID):"
744 lp1 < (*fSecondary).size(); lp1++)
746 G4cout <<
" " << std::setw(9)
748 <<
" " << std::setw(9)
750 <<
" " << std::setw(9)
752 <<
" " << std::setw(9)
754 <<
" " << std::setw(9)
757 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
777 G4cout <<
" -----------------------------------------------" <<
G4endl;
778 G4cout <<
" G4Track Information " << std::setw(20) <<
G4endl;
779 G4cout <<
" -----------------------------------------------" <<
G4endl;
781 G4cout <<
" Step number : " << std::setw(20)
783#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
784 G4cout <<
" Position - x : " << std::setw(20)
786 G4cout <<
" Position - y : " << std::setw(20)
788 G4cout <<
" Position - z : " << std::setw(20)
790 G4cout <<
" Global Time : " << std::setw(20)
792 G4cout <<
" Local Time : " << std::setw(20)
795 G4cout <<
" Position - x (mm) : " << std::setw(20)
797 G4cout <<
" Position - y (mm) : " << std::setw(20)
799 G4cout <<
" Position - z (mm) : " << std::setw(20)
801 G4cout <<
" Global Time (ns) : " << std::setw(20)
803 G4cout <<
" Local Time (ns) : " << std::setw(20)
806 G4cout <<
" Momentum Direct - x : " << std::setw(20)
808 G4cout <<
" Momentum Direct - y : " << std::setw(20)
810 G4cout <<
" Momentum Direct - z : " << std::setw(20)
812#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
813 G4cout <<
" Kinetic Energy : "
815 G4cout <<
" Kinetic Energy (MeV): "
819 G4cout <<
" Polarization - x : " << std::setw(20)
821 G4cout <<
" Polarization - y : " << std::setw(20)
823 G4cout <<
" Polarization - z : " << std::setw(20)
825 G4cout <<
" Track Length : " << std::setw(20)
827 G4cout <<
" Track ID # : " << std::setw(20)
829 G4cout <<
" Parent Track ID # : " << std::setw(20)
831 G4cout <<
" Next Volume : " << std::setw(20);
838 G4cout <<
"OutOfWorld" <<
" ";
841 G4cout <<
" Track Status : " << std::setw(20);
848 G4cout <<
" StopButAlive";
856 G4cout <<
" KillTrackAndSecondaries";
864 G4cout <<
" PostponeToNextEvent";
867#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
868 G4cout <<
" Vertex - x : " << std::setw(20)
870 G4cout <<
" Vertex - y : " << std::setw(20)
872 G4cout <<
" Vertex - z : " << std::setw(20)
875 G4cout <<
" Vertex - x (mm) : " << std::setw(20)
877 G4cout <<
" Vertex - y (mm) : " << std::setw(20)
879 G4cout <<
" Vertex - z (mm) : " << std::setw(20)
882 G4cout <<
" Vertex - Px (MomDir): " << std::setw(20)
884 G4cout <<
" Vertex - Py (MomDir): " << std::setw(20)
886 G4cout <<
" Vertex - Pz (MomDir): " << std::setw(20)
888#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
889 G4cout <<
" Vertex - KineE : "
891 G4cout <<
" Vertex - KineE (MeV): "
896 G4cout <<
" Creator Process : " << std::setw(20);
906 G4cout <<
" -----------------------------------------------" <<
G4endl;
939 oldprc =
G4cout.precision(16);
943 G4cout <<
" Step Length (mm) : "
949 G4cout <<
" -------------------------------------------------------"
950 <<
"----------------" <<
G4endl;
951 G4cout <<
" StepPoint Information " << std::setw(20) <<
"PreStep"
952 << std::setw(20) <<
"PostStep" <<
G4endl;
953 G4cout <<
" -------------------------------------------------------"
954 <<
"----------------" <<
G4endl;
955 G4cout <<
" Position - x (mm) : " << std::setw(20)
958 G4cout <<
" Position - y (mm) : " << std::setw(20)
961 G4cout <<
" Position - z (mm) : " << std::setw(20)
964 G4cout <<
" Global Time (ns) : " << std::setw(20)
967 G4cout <<
" Local Time (ns) : " << std::setw(20)
970 G4cout <<
" Proper Time (ns) : " << std::setw(20)
973 G4cout <<
" Momentum Direct - x : " << std::setw(20)
977 G4cout <<
" Momentum Direct - y : " << std::setw(20)
981 G4cout <<
" Momentum Direct - z : " << std::setw(20)
985 G4cout <<
" Momentum - x (MeV/c): " << std::setw(20)
988 G4cout <<
" Momentum - y (MeV/c): " << std::setw(20)
991 G4cout <<
" Momentum - z (MeV/c): " << std::setw(20)
994 G4cout <<
" Total Energy (MeV) : " << std::setw(20)
997 G4cout <<
" Kinetic Energy (MeV): " << std::setw(20)
1000 G4cout <<
" Velocity (mm/ns) : " << std::setw(20)
1003 G4cout <<
" Volume Name : " << std::setw(20)
1011 volName =
"OutOfWorld";
1014 G4cout <<
" Safety (mm) : " << std::setw(20)
1017 G4cout <<
" Polarization - x : " << std::setw(20)
1020 G4cout <<
" Polarization - y : " << std::setw(20)
1023 G4cout <<
" Polarization - Z : " << std::setw(20)
1026 G4cout <<
" Weight : " << std::setw(20)
1029 G4cout <<
" Step Status : ";
1033 G4cout << std::setw(20) <<
"Geom Limit";
1037 G4cout << std::setw(20) <<
"AlongStep Proc.";
1041 G4cout << std::setw(20) <<
"PostStep Proc";
1045 G4cout << std::setw(20) <<
"AtRest Proc";
1049 G4cout << std::setw(20) <<
"Undefined";
1055 G4cout << std::setw(20) <<
"Geom Limit";
1059 G4cout << std::setw(20) <<
"AlongStep Proc.";
1063 G4cout << std::setw(20) <<
"PostStep Proc";
1067 G4cout << std::setw(20) <<
"AtRest Proc";
1071 G4cout << std::setw(20) <<
"Undefined";
1075 G4cout <<
" Process defined Step: ";
1078 G4cout << std::setw(20) <<
"Undefined";
1088 G4cout << std::setw(20) <<
"Undefined";
1096 G4cout.precision(oldprc);
1099 G4cout <<
" -------------------------------------------------------"
1100 <<
"----------------" <<
G4endl;
1112 G4cout << std::setw(18) << left <<
"#Name" << std::setw(15) <<
"trackID"
1113 << std::setw(35) <<
"Position" << std::setw(25) <<
"Pre step volume"
1114 << std::setw(25) <<
"Post step volume" << std::setw(22) <<
"Process"
1148 if(nextTouchable && (volume = nextTouchable->
GetVolume()))
1150 volumeName = volume->
GetName();
1160 volumeName =
"OutOfWorld";
1164 << track->
GetTrackID() << std::setprecision(3) << setw(35)
1166 << volumeName << setw(25) <<
"---" <<
G4endl;
1180 << track->
GetTrackID() << std::setprecision(3) << setw(35)
1187 if(nextTouchable && (volume = nextTouchable->
GetVolume()))
1197 G4cout << setw(25) << volumeName;
1201 G4cout << setw(25) <<
"OutOfWorld";
1221 if(secondaries->empty() ==
false)
1224 for(
size_t j = 0; j < secondaries->size(); ++j)
1227 << (*secondaries)[j]->GetTrackID() <<
")" <<
" ";
1241 G4cout <<
" Invoke at rest process : "
@ NotCandidateForSelection
G4IT * GetIT(const G4Track *track)
@ fKillTrackAndSecondaries
std::vector< G4Track * > G4TrackVector
G4GLOB_DLL std::ostream G4cout
void VerboseParticleChange()
void TrackingStarted(G4Track *)
void TrackingEnded(G4Track *)
void PostStepDoItAllDone()
void PostStepVerbose(G4Track *track)
void AtRestDoItOneByOne()
void PreStepVerbose(G4Track *track)
void AlongStepDoItAllDone()
void PostStepDoItOneByOne()
void AlongStepDoItOneByOne()
void StepInfoForLeadingTrack()
virtual const G4String & GetName() const =0
const G4String & GetParticleName() 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
const G4TrackVector * GetSecondary() const
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
G4TrackStatus GetTrackStatus() const
G4double GetVertexKineticEnergy() const
const G4TouchableHandle & GetNextTouchableHandle() 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
G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4double GetStepLength() const
G4int GetParentID() const
const G4Step * GetStep() const
size_t MAXofPostStepLoops
G4int fN2ndariesAtRestDoIt
G4SelectedPostStepDoItVector * fSelectedPostStepDoItVector
const G4VITProcess * fCurrentProcess
G4SelectedAtRestDoItVector * fSelectedAtRestDoItVector
const G4VParticleChange * fParticleChange
const G4TrackVector * fSecondary
G4ForceCondition fCondition
G4GPILSelection fGPILSelection
G4int fN2ndariesPostStepDoIt
G4int fN2ndariesAlongStepDoIt
size_t MAXofAlongStepLoops
virtual void DumpInfo() const
virtual G4bool IsReplicated() const =0
const G4String & GetName() const
virtual G4bool IsParameterised() const =0
const G4String & GetProcessName() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
virtual G4int GetReplicaNumber(G4int depth=0) const