45#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
47#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
50#define G4BestUnit(a,b) a
59#ifdef G4_TRACKING_DEBUG
60 G4cout <<
"G4ITSteppingVerbose has instantiated" <<
G4endl;
98 ptProcManager = (*fAtRestDoItVector)[(
G4int)np];
105 ptProcManager = (*fAtRestDoItVector)[(
G4int)np];
115 G4cout <<
" -- List of secondaries generated : "
116 <<
"(x,y,z,kE,t,PID) --" <<
G4endl;
118 lp1<(*fSecondary).size(); ++lp1)
132 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
159 G4cout <<
" >>AlongStepDoIt (after all invocations):" <<
G4endl;
164 ptProcManager = (*fAlongStepDoItVector)((
G4int)ci);
165 G4cout <<
" " << ci+1 <<
") ";
166 if(ptProcManager != 0)
174 G4cout <<
" ++List of secondaries generated "
175 <<
"(x,y,z,kE,t,PID):"
176 <<
" No. of secodaries = "
177 << (*fSecondary).size() <<
G4endl;
179 if((*fSecondary).size()>0)
181 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
195 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
223 G4cout <<
" **PostStepDoIt (after all invocations):" <<
G4endl;
232 ptProcManager = (*fPostStepDoItVector)[(
G4int)np];
239 ptProcManager = (*fPostStepDoItVector)[(
G4int)np];
240 G4cout <<
" " << npt <<
") "
247 G4cout <<
" ++List of secondaries generated " <<
"(x,y,z,kE,t,PID):"
248 <<
" No. of secodaries = " << (*fSecondary).size() <<
G4endl;
249 G4cout <<
" [Note]Secondaries from AlongStepDoIt included." <<
G4endl;
251 if((*fSecondary).size() > 0)
253 for(std::size_t lp1 = 0; lp1 < (*fSecondary).size(); ++lp1)
255 G4cout <<
" " << std::setw(9)
257 <<
" " << std::setw(9)
259 <<
" " << std::setw(9)
261 <<
" " << std::setw(9)
263 <<
" " << std::setw(9)
265 <<
" " << std::setw(18)
266 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
294#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
295 G4cout << std::setw( 5) <<
"#TrackID" <<
" "
296 << std::setw( 5) <<
"#Step#" <<
" "
297 << std::setw( 8) <<
"X" <<
" " << std::setw( 8) <<
"Y" <<
" "
298 << std::setw( 8) <<
"Z" <<
" "
299 << std::setw( 9) <<
"KineE" <<
" " << std::setw( 8) <<
"dE" <<
" "
300 << std::setw(12) <<
"StepLeng" <<
" " << std::setw(12) <<
"TrackLeng" <<
" "
301 << std::setw(12) <<
"NextVolume" <<
" " << std::setw( 8) <<
"ProcName" <<
G4endl;
303 G4cout << std::setw( 5) <<
"#TrackID" <<
" "
304 << std::setw( 5) <<
"#Step#" <<
" "
305 << std::setw( 8) <<
"X(mm)" <<
" " << std::setw( 8) <<
"Y(mm)" <<
" "
306 << std::setw( 8) <<
"Z(mm)" <<
" "
307 << std::setw( 9) <<
"KinE(MeV)" <<
" " << std::setw( 8) <<
"dE(MeV)" <<
" "
308 << std::setw( 8) <<
"StepLeng" <<
" " << std::setw( 9) <<
"TrackLeng" <<
" "
309 << std::setw(11) <<
"NextVolume" <<
" " << std::setw( 8) <<
"ProcName" <<
G4endl;
316 <<
" " << std::setw(8)
319 <<
" " << std::setw(8)
322 <<
" " << std::setw(9)
332 G4cout << std::setw(11) <<
"OutOfWorld" <<
" ";
349 if(tN2ndariesTot > 0)
351 G4cout <<
" :----- List of 2ndaries - " <<
"#SpawnInStep="
352 << std::setw(3) << tN2ndariesTot <<
"(Rest=" << std::setw(2)
356 << std::setw(3) << (*fSecondary).size() <<
" ---------------"
359 for(std::size_t lp1=(*fSecondary).size()-tN2ndariesTot;
360 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(std::size_t lp1=(*fSecondary).size()-tN2ndariesTot;
464 lp1<(*fSecondary).size(); ++lp1)
476 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
478 G4cout <<
" :-----------------------------" <<
"----------------------------------"
479 <<
"-- EndOf2ndaries Info ---------------" <<
G4endl;
498 G4cout <<
G4endl<<
" >>DefinePhysicalStepLength (List of proposed StepLengths): " <<
G4endl;
514 G4cout <<
"=== Defined Physical Step Length (DPSL)" <<
G4endl;
516 <<
" : ProcName = User defined maximum allowed Step" <<
G4endl;
532 G4cout <<
" ++ProposedStep(PostStep ) = " << std::setw(9)
570 G4cout <<
" ++ProposedStep(AlongStep) = " << std::setw(9)
621 G4cout <<
"Start tracking : "
650 G4cout << std::setw(11) <<
"OutOfWorld" <<
" ";
663 G4cout <<
" * End tracking : " <<
" Particle : "
687 G4cout <<
" >>AlongStepDoIt (process by process): " <<
" Process Name = "
691 G4cout <<
" " <<
"!Note! Safety of PostStep is only valid "
692 <<
"after all DoIt invocations." <<
G4endl;
697 G4cout <<
" ++List of secondaries generated " <<
"(x,y,z,kE,t,PID):"
703 lp1 < (*fSecondary).size(); ++lp1)
705 G4cout <<
" " << std::setw(9)
707 <<
" " << std::setw(9)
709 <<
" " << std::setw(9)
711 <<
" " << std::setw(9)
713 <<
" " << std::setw(9)
716 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
731 G4cout <<
" >>PostStepDoIt (process by process): " <<
" Process Name = "
739 G4cout <<
" ++List of secondaries generated " <<
"(x,y,z,kE,t,PID):"
745 lp1 < (*fSecondary).size(); ++lp1)
747 G4cout <<
" " << std::setw(9)
749 <<
" " << std::setw(9)
751 <<
" " << std::setw(9)
753 <<
" " << std::setw(9)
755 <<
" " << std::setw(9)
758 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() <<
G4endl;
778 G4cout <<
" -----------------------------------------------" <<
G4endl;
779 G4cout <<
" G4Track Information " << std::setw(20) <<
G4endl;
780 G4cout <<
" -----------------------------------------------" <<
G4endl;
782 G4cout <<
" Step number : " << std::setw(20)
784#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
785 G4cout <<
" Position - x : " << std::setw(20)
787 G4cout <<
" Position - y : " << std::setw(20)
789 G4cout <<
" Position - z : " << std::setw(20)
791 G4cout <<
" Global Time : " << std::setw(20)
793 G4cout <<
" Local Time : " << std::setw(20)
796 G4cout <<
" Position - x (mm) : " << std::setw(20)
798 G4cout <<
" Position - y (mm) : " << std::setw(20)
800 G4cout <<
" Position - z (mm) : " << std::setw(20)
802 G4cout <<
" Global Time (ns) : " << std::setw(20)
804 G4cout <<
" Local Time (ns) : " << std::setw(20)
807 G4cout <<
" Momentum Direct - x : " << std::setw(20)
809 G4cout <<
" Momentum Direct - y : " << std::setw(20)
811 G4cout <<
" Momentum Direct - z : " << std::setw(20)
813#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
814 G4cout <<
" Kinetic Energy : "
816 G4cout <<
" Kinetic Energy (MeV): "
820 G4cout <<
" Polarization - x : " << std::setw(20)
822 G4cout <<
" Polarization - y : " << std::setw(20)
824 G4cout <<
" Polarization - z : " << std::setw(20)
826 G4cout <<
" Track Length : " << std::setw(20)
828 G4cout <<
" Track ID # : " << std::setw(20)
830 G4cout <<
" Parent Track ID # : " << std::setw(20)
832 G4cout <<
" Next Volume : " << std::setw(20);
839 G4cout <<
"OutOfWorld" <<
" ";
842 G4cout <<
" Track Status : " << std::setw(20);
849 G4cout <<
" StopButAlive";
857 G4cout <<
" KillTrackAndSecondaries";
865 G4cout <<
" PostponeToNextEvent";
868#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
869 G4cout <<
" Vertex - x : " << std::setw(20)
871 G4cout <<
" Vertex - y : " << std::setw(20)
873 G4cout <<
" Vertex - z : " << std::setw(20)
876 G4cout <<
" Vertex - x (mm) : " << std::setw(20)
878 G4cout <<
" Vertex - y (mm) : " << std::setw(20)
880 G4cout <<
" Vertex - z (mm) : " << std::setw(20)
883 G4cout <<
" Vertex - Px (MomDir): " << std::setw(20)
885 G4cout <<
" Vertex - Py (MomDir): " << std::setw(20)
887 G4cout <<
" Vertex - Pz (MomDir): " << std::setw(20)
889#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
890 G4cout <<
" Vertex - KineE : "
892 G4cout <<
" Vertex - KineE (MeV): "
897 G4cout <<
" Creator Process : " << std::setw(20);
907 G4cout <<
" -----------------------------------------------" <<
G4endl;
940 oldprc =
G4cout.precision(16);
944 G4cout <<
" Step Length (mm) : "
950 G4cout <<
" -------------------------------------------------------"
951 <<
"----------------" <<
G4endl;
952 G4cout <<
" StepPoint Information " << std::setw(20) <<
"PreStep"
953 << std::setw(20) <<
"PostStep" <<
G4endl;
954 G4cout <<
" -------------------------------------------------------"
955 <<
"----------------" <<
G4endl;
956 G4cout <<
" Position - x (mm) : " << std::setw(20)
959 G4cout <<
" Position - y (mm) : " << std::setw(20)
962 G4cout <<
" Position - z (mm) : " << std::setw(20)
965 G4cout <<
" Global Time (ns) : " << std::setw(20)
968 G4cout <<
" Local Time (ns) : " << std::setw(20)
971 G4cout <<
" Proper Time (ns) : " << std::setw(20)
974 G4cout <<
" Momentum Direct - x : " << std::setw(20)
978 G4cout <<
" Momentum Direct - y : " << std::setw(20)
982 G4cout <<
" Momentum Direct - z : " << std::setw(20)
986 G4cout <<
" Momentum - x (MeV/c): " << std::setw(20)
989 G4cout <<
" Momentum - y (MeV/c): " << std::setw(20)
992 G4cout <<
" Momentum - z (MeV/c): " << std::setw(20)
995 G4cout <<
" Total Energy (MeV) : " << std::setw(20)
998 G4cout <<
" Kinetic Energy (MeV): " << std::setw(20)
1001 G4cout <<
" Velocity (mm/ns) : " << std::setw(20)
1004 G4cout <<
" Volume Name : " << std::setw(20)
1012 volName =
"OutOfWorld";
1015 G4cout <<
" Safety (mm) : " << std::setw(20)
1018 G4cout <<
" Polarization - x : " << std::setw(20)
1021 G4cout <<
" Polarization - y : " << std::setw(20)
1024 G4cout <<
" Polarization - Z : " << std::setw(20)
1027 G4cout <<
" Weight : " << std::setw(20)
1030 G4cout <<
" Step Status : ";
1034 G4cout << std::setw(20) <<
"Geom Limit";
1038 G4cout << std::setw(20) <<
"AlongStep Proc.";
1042 G4cout << std::setw(20) <<
"PostStep Proc";
1046 G4cout << std::setw(20) <<
"AtRest Proc";
1050 G4cout << std::setw(20) <<
"Undefined";
1056 G4cout << std::setw(20) <<
"Geom Limit";
1060 G4cout << std::setw(20) <<
"AlongStep Proc.";
1064 G4cout << std::setw(20) <<
"PostStep Proc";
1068 G4cout << std::setw(20) <<
"AtRest Proc";
1072 G4cout << std::setw(20) <<
"Undefined";
1076 G4cout <<
" Process defined Step: ";
1079 G4cout << std::setw(20) <<
"Undefined";
1089 G4cout << std::setw(20) <<
"Undefined";
1097 G4cout.precision(oldprc);
1100 G4cout <<
" -------------------------------------------------------"
1101 <<
"----------------" <<
G4endl;
1113 G4cout << std::setw(18) << left <<
"#Name" << std::setw(15) <<
"trackID"
1114 << std::setw(35) <<
"Position" << std::setw(25) <<
"Pre step volume"
1115 << std::setw(25) <<
"Post step volume" << std::setw(22) <<
"Process"
1149 if(nextTouchable && (volume = nextTouchable->
GetVolume()))
1151 volumeName = volume->
GetName();
1161 volumeName =
"OutOfWorld";
1165 << track->
GetTrackID() << std::setprecision(3) << setw(35)
1167 << volumeName << setw(25) <<
"---" <<
G4endl;
1181 << track->
GetTrackID() << std::setprecision(3) << setw(35)
1188 if(nextTouchable && (volume = nextTouchable->
GetVolume()))
1198 G4cout << setw(25) << volumeName;
1202 G4cout << setw(25) <<
"OutOfWorld";
1222 if(secondaries->empty() ==
false)
1225 for(std::size_t j = 0; j < secondaries->size(); ++j)
1228 << (*secondaries)[j]->GetTrackID() <<
")" <<
" ";
1242 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