Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ITSteppingVerbose Class Reference

#include <G4ITSteppingVerbose.hh>

+ Inheritance diagram for G4ITSteppingVerbose:

Public Member Functions

 G4ITSteppingVerbose ()
 
 ~G4ITSteppingVerbose ()
 
void NewStep ()
 
void StepInfoForLeadingTrack ()
 
void AtRestDoItInvoked ()
 
void AtRestDoItOneByOne ()
 
void AlongStepDoItAllDone ()
 
void AlongStepDoItOneByOne ()
 
void PostStepDoItAllDone ()
 
void PostStepDoItOneByOne ()
 
void StepInfo ()
 
void TrackingStarted (G4Track *)
 
void TrackingEnded (G4Track *)
 
void DoItStarted ()
 
void PreStepVerbose (G4Track *track)
 
void PostStepVerbose (G4Track *track)
 
void DPSLStarted ()
 
void DPSLUserLimit ()
 
void DPSLPostStep ()
 
void DPSLAlongStep ()
 
void VerboseTrack ()
 
void VerboseParticleChange ()
 
void ShowStep () const
 
- Public Member Functions inherited from G4VITSteppingVerbose
 G4VITSteppingVerbose ()
 
virtual ~G4VITSteppingVerbose ()
 
virtual void TrackingStarted (G4Track *track)
 
virtual void TrackingEnded (G4Track *track)
 
virtual void DoItStarted ()=0
 
virtual void PreStepVerbose (G4Track *)=0
 
virtual void PostStepVerbose (G4Track *)=0
 
virtual void NewStep ()=0
 
void CopyState ()
 
virtual void StepInfoForLeadingTrack ()=0
 
virtual void AtRestDoItInvoked ()=0
 
virtual void AtRestDoItOneByOne ()=0
 
virtual void PostStepDoItAllDone ()=0
 
virtual void PostStepDoItOneByOne ()=0
 
virtual void AlongStepDoItAllDone ()=0
 
virtual void AlongStepDoItOneByOne ()=0
 
virtual void StepInfo ()=0
 
virtual void DPSLStarted ()=0
 
virtual void DPSLUserLimit ()=0
 
virtual void DPSLPostStep ()=0
 
virtual void DPSLAlongStep ()=0
 
virtual void VerboseTrack ()=0
 
virtual void VerboseParticleChange ()=0
 
void SetVerbose (int flag)
 
G4int GetVerbose ()
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
void SetStepProcessor (const G4ITStepProcessor *stepProcessor)
 
void TrackBanner (G4Track *track, const G4String &message)
 

Additional Inherited Members

- Protected Types inherited from G4VITSteppingVerbose
typedef std::vector< G4intG4SelectedAtRestDoItVector
 
typedef std::vector< G4intG4SelectedAlongStepDoItVector
 
typedef std::vector< G4intG4SelectedPostStepDoItVector
 
- Protected Attributes inherited from G4VITSteppingVerbose
const G4ITStepProcessorfpStepProcessor
 
G4UIcmdWithAnIntegerfpVerboseUI
 
G4ITStepProcessorStatefpState
 
const ProcessGeneralInfofpProcessGeneralInfo
 
G4double PhysicalStep
 
G4StepStatus fStepStatus
 
const G4VParticleChangefParticleChange
 
const G4TrackfTrack
 
const G4TrackVectorfSecondary
 
const G4StepfStep
 
G4StepPointfPreStepPoint
 
G4StepPointfPostStepPoint
 
const G4VPhysicalVolumefCurrentVolume
 
const G4VITProcessfCurrentProcess
 
G4ProcessVectorfAtRestDoItVector
 
G4ProcessVectorfAlongStepDoItVector
 
G4ProcessVectorfPostStepDoItVector
 
G4ProcessVectorfAtRestGetPhysIntVector
 
G4ProcessVectorfAlongStepGetPhysIntVector
 
G4ProcessVectorfPostStepGetPhysIntVector
 
size_t MAXofAtRestLoops
 
size_t MAXofAlongStepLoops
 
size_t MAXofPostStepLoops
 
size_t fAtRestDoItProcTriggered
 
size_t fPostStepDoItProcTriggered
 
G4int fN2ndariesAtRestDoIt
 
G4int fN2ndariesAlongStepDoIt
 
G4int fN2ndariesPostStepDoIt
 
G4int fVerboseLevel
 
G4SelectedAtRestDoItVectorfSelectedAtRestDoItVector
 
G4SelectedPostStepDoItVectorfSelectedPostStepDoItVector
 
G4double fPreviousStepSize
 
G4TouchableHandle fTouchableHandle
 
G4double physIntLength
 
G4ForceCondition fCondition
 
G4GPILSelection fGPILSelection
 

Detailed Description

Definition at line 44 of file G4ITSteppingVerbose.hh.

Constructor & Destructor Documentation

◆ G4ITSteppingVerbose()

G4ITSteppingVerbose::G4ITSteppingVerbose ( )

Definition at line 56 of file G4ITSteppingVerbose.cc.

58{
59#ifdef G4_TRACKING_DEBUG
60 G4cout << "G4ITSteppingVerbose has instantiated" << G4endl;
61#endif
62}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ ~G4ITSteppingVerbose()

G4ITSteppingVerbose::~G4ITSteppingVerbose ( )

Definition at line 65 of file G4ITSteppingVerbose.cc.

67{
68}

Member Function Documentation

◆ AlongStepDoItAllDone()

void G4ITSteppingVerbose::AlongStepDoItAllDone ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 144 of file G4ITSteppingVerbose.cc.

146{
147 if(fVerboseLevel == 0)
148 {
149 return;
150 }
151
152 G4VProcess* ptProcManager;
153
154 CopyState();
155
156 if(fVerboseLevel >= 3)
157 {
158 G4cout << G4endl;
159 G4cout << " >>AlongStepDoIt (after all invocations):" << G4endl;
160 G4cout << " ++List of invoked processes " << G4endl;
161
162 for(std::size_t ci=0; ci<MAXofAlongStepLoops; ++ci)
163 {
164 ptProcManager = (*fAlongStepDoItVector)((G4int)ci);
165 G4cout << " " << ci+1 << ") ";
166 if(ptProcManager != 0)
167 {
168 G4cout << ptProcManager->GetProcessName() << G4endl;
169 }
170 }
171
172 ShowStep();
173 G4cout << G4endl;
174 G4cout << " ++List of secondaries generated "
175 << "(x,y,z,kE,t,PID):"
176 << " No. of secodaries = "
177 << (*fSecondary).size() << G4endl;
178
179 if((*fSecondary).size()>0)
180 {
181 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
182 {
183 G4cout << " "
184 << std::setw( 9)
185 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length") << " "
186 << std::setw( 9)
187 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length") << " "
188 << std::setw( 9)
189 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length") << " "
190 << std::setw( 9)
191 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") << " "
192 << std::setw( 9)
193 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time") << " "
194 << std::setw(18)
195 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
196 }
197 }
198 }
199}
int G4int
Definition: G4Types.hh:85
const G4TrackVector * fSecondary
const G4String & GetProcessName() const
Definition: G4VProcess.hh:386

◆ AlongStepDoItOneByOne()

void G4ITSteppingVerbose::AlongStepDoItOneByOne ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 676 of file G4ITSteppingVerbose.cc.

678{
679 if(fVerboseLevel < 4)
680 {
681 return;
682 }
683
684 CopyState();
685
686 G4cout << G4endl;
687 G4cout << " >>AlongStepDoIt (process by process): " << " Process Name = "
689
690 ShowStep();
691 G4cout << " " << "!Note! Safety of PostStep is only valid "
692 << "after all DoIt invocations." << G4endl;
693
695 G4cout << G4endl;
696
697 G4cout << " ++List of secondaries generated " << "(x,y,z,kE,t,PID):"
698 << " No. of secodaries = " << fN2ndariesAlongStepDoIt << G4endl;
699
701 {
702 for(std::size_t lp1 = (*fSecondary).size() - fN2ndariesAlongStepDoIt;
703 lp1 < (*fSecondary).size(); ++lp1)
704 {
705 G4cout << " " << std::setw(9)
706 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
707 << " " << std::setw(9)
708 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
709 << " " << std::setw(9)
710 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
711 << " " << std::setw(9)
712 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
713 << " " << std::setw(9)
714 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time") << " "
715 << std::setw(18)
716 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
717 }
718 }
719}
const G4VITProcess * fCurrentProcess

◆ AtRestDoItInvoked()

void G4ITSteppingVerbose::AtRestDoItInvoked ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 77 of file G4ITSteppingVerbose.cc.

79{
80 if(fVerboseLevel == 0)
81 {
82 return;
83 }
84
85 G4VProcess* ptProcManager;
86 CopyState();
87
88 if(fVerboseLevel >= 3)
89 {
90 G4int npt = 0;
91 G4cout << " **List of AtRestDoIt invoked:" << G4endl;
92 for(std::size_t np = 0; np < MAXofAtRestLoops; ++np)
93 {
94 std::size_t npGPIL = MAXofAtRestLoops - np - 1;
95 if((*fSelectedAtRestDoItVector)[npGPIL] == 2)
96 {
97 ++npt;
98 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
99 G4cout << " # " << npt << " : " << ptProcManager->GetProcessName()
100 << " (Forced)" << G4endl;
101 }
102 else if ( (*fSelectedAtRestDoItVector)[npGPIL] == 1 )
103 {
104 ++npt;
105 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
106 G4cout << " # " << npt << " : " << ptProcManager->GetProcessName()
107 << G4endl;
108 }
109 }
110
111 G4cout << " Generated secondries # : " << fN2ndariesAtRestDoIt << G4endl;
112
114 {
115 G4cout << " -- List of secondaries generated : "
116 << "(x,y,z,kE,t,PID) --" << G4endl;
117 for(std::size_t lp1=(*fSecondary).size()-fN2ndariesAtRestDoIt;
118 lp1<(*fSecondary).size(); ++lp1)
119 {
120 G4cout << " "
121 << std::setw( 9)
122 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length") << " "
123 << std::setw( 9)
124 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length") << " "
125 << std::setw( 9)
126 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length") << " "
127 << std::setw( 9)
128 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") << " "
129 << std::setw( 9)
130 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time") << " "
131 << std::setw(18)
132 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
133 }
134 }
135 }
136
137 if(fVerboseLevel >= 4)
138 {
139 ShowStep();
140 G4cout << G4endl;
141 }
142}
G4SelectedAtRestDoItVector * fSelectedAtRestDoItVector

◆ AtRestDoItOneByOne()

void G4ITSteppingVerbose::AtRestDoItOneByOne ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 1238 of file G4ITSteppingVerbose.cc.

1239{
1240 CopyState();
1241
1242 G4cout << " Invoke at rest process : "
1244 << G4endl;
1245}

◆ DoItStarted()

void G4ITSteppingVerbose::DoItStarted ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 1104 of file G4ITSteppingVerbose.cc.

1105{
1106 if(fVerboseLevel <= 0) return;
1107
1108 G4IosFlagsSaver ios_saver(G4cout);
1109#ifdef USE_COLOR
1110 G4cout << LIGHT_RED;
1111#endif
1112 G4cout << "*** G4ITStepProcessor::DoIt ***" << 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"
1116 << G4endl;
1117#ifdef USE_COLOR
1119#endif
1120}
#define LIGHT_RED
Definition: G4Scheduler.cc:83
#define RESET_COLOR
Definition: G4Scheduler.cc:86

◆ DPSLAlongStep()

void G4ITSteppingVerbose::DPSLAlongStep ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 558 of file G4ITSteppingVerbose.cc.

560{
561 if(fVerboseLevel == 0)
562 {
563 return;
564 }
565
566 if(fVerboseLevel > 5)
567 {
568 CopyState();
569
570 G4cout << " ++ProposedStep(AlongStep) = " << std::setw(9)
571 << G4BestUnit(physIntLength, "Length") << " : ProcName = "
572 << fCurrentProcess->GetProcessName() << " (";
574 {
575 G4cout << "CandidateForSelection)" << G4endl;
576 }
578 {
579 G4cout << "NotCandidateForSelection)" << G4endl;
580 }
581 else
582 {
583 G4cout << "?!?)" << G4endl;
584 }
585 }
586}
@ CandidateForSelection
@ NotCandidateForSelection
G4GPILSelection fGPILSelection

◆ DPSLPostStep()

void G4ITSteppingVerbose::DPSLPostStep ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 520 of file G4ITSteppingVerbose.cc.

522{
523 if(fVerboseLevel == 0)
524 {
525 return;
526 }
527
528 if(fVerboseLevel > 5)
529 {
530 CopyState();
531
532 G4cout << " ++ProposedStep(PostStep ) = " << std::setw(9)
533 << physIntLength << " : ProcName = "
534 << fCurrentProcess->GetProcessName() << " (";
536 {
537 G4cout << "ExclusivelyForced)" << G4endl;
538 }
539 else if(fCondition==StronglyForced)
540 {
541 G4cout << "StronglyForced)" << G4endl;
542 }
543 else if(fCondition==Conditionally)
544 {
545 G4cout << "Conditionally)" << G4endl;
546 }
547 else if(fCondition==Forced)
548 {
549 G4cout << "Forced)" << G4endl;
550 }
551 else
552 {
553 G4cout << "No ForceCondition)" << G4endl;
554 }
555 }
556}
@ StronglyForced
@ Conditionally
@ ExclusivelyForced
@ Forced

◆ DPSLStarted()

void G4ITSteppingVerbose::DPSLStarted ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 487 of file G4ITSteppingVerbose.cc.

489{
490 if(fVerboseLevel == 0)
491 {
492 return;
493 }
494 CopyState();
495
496 if(fVerboseLevel > 5)
497 {
498 G4cout << G4endl<< " >>DefinePhysicalStepLength (List of proposed StepLengths): " << G4endl;
499 }
500}

◆ DPSLUserLimit()

void G4ITSteppingVerbose::DPSLUserLimit ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 502 of file G4ITSteppingVerbose.cc.

504{
505 if(fVerboseLevel == 0)
506 {
507 return;
508 }
509 CopyState();
510
511 if(fVerboseLevel > 5)
512 {
513 G4cout << G4endl<< G4endl;
514 G4cout << "=== Defined Physical Step Length (DPSL)" << G4endl;
515 G4cout << " ++ProposedStep(UserLimit) = " << std::setw( 9) << physIntLength
516 << " : ProcName = User defined maximum allowed Step" << G4endl;
517 }
518}

◆ NewStep()

void G4ITSteppingVerbose::NewStep ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 71 of file G4ITSteppingVerbose.cc.

73{
74}

◆ PostStepDoItAllDone()

void G4ITSteppingVerbose::PostStepDoItAllDone ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 201 of file G4ITSteppingVerbose.cc.

203{
204 if(fVerboseLevel == 0)
205 {
206 return;
207 }
208
209 G4VProcess* ptProcManager;
210
211 CopyState();
212
213 if(fVerboseLevel >= 3)
214 {
215
219 {
220
221 G4int npt = 0;
222 G4cout << G4endl;
223 G4cout << " **PostStepDoIt (after all invocations):" << G4endl;
224 G4cout << " ++List of invoked processes " << G4endl;
225
226 for(std::size_t np = 0; np < MAXofPostStepLoops; ++np)
227 {
228 std::size_t npGPIL = MAXofPostStepLoops - np - 1;
229 if((*fSelectedPostStepDoItVector)[npGPIL] == 2)
230 {
231 npt++;
232 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
233 G4cout << " " << npt << ") " << ptProcManager->GetProcessName()
234 << " (Forced)" << G4endl;
235 }
236 else if ( (*fSelectedPostStepDoItVector)[npGPIL] == 1)
237 {
238 npt++;
239 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
240 G4cout << " " << npt << ") "
241 << ptProcManager->GetProcessName() << G4endl;
242 }
243 }
244
245 ShowStep();
246 G4cout << G4endl;
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;
250
251 if((*fSecondary).size() > 0)
252 {
253 for(std::size_t lp1 = 0; lp1 < (*fSecondary).size(); ++lp1)
254 {
255 G4cout << " " << std::setw(9)
256 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
257 << " " << std::setw(9)
258 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
259 << " " << std::setw(9)
260 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
261 << " " << std::setw(9)
262 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
263 << " " << std::setw(9)
264 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
265 << " " << std::setw(18)
266 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
267 << G4endl;
268 }
269 }
270 }
271 }
272}
@ fPostStepDoItProc
Definition: G4StepStatus.hh:49
G4SelectedPostStepDoItVector * fSelectedPostStepDoItVector

◆ PostStepDoItOneByOne()

void G4ITSteppingVerbose::PostStepDoItOneByOne ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 721 of file G4ITSteppingVerbose.cc.

723{
724 if(fVerboseLevel < 4)
725 {
726 return;
727 }
728
729 CopyState();
730 G4cout << G4endl;
731 G4cout << " >>PostStepDoIt (process by process): " << " Process Name = "
733
734 ShowStep();
735 G4cout << G4endl;
737 G4cout << G4endl;
738
739 G4cout << " ++List of secondaries generated " << "(x,y,z,kE,t,PID):"
740 << " No. of secodaries = " << fN2ndariesPostStepDoIt << G4endl;
741
743 {
744 for(std::size_t lp1 = (*fSecondary).size() - fN2ndariesPostStepDoIt;
745 lp1 < (*fSecondary).size(); ++lp1)
746 {
747 G4cout << " " << std::setw(9)
748 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
749 << " " << std::setw(9)
750 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
751 << " " << std::setw(9)
752 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
753 << " " << std::setw(9)
754 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
755 << " " << std::setw(9)
756 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time") << " "
757 << std::setw(18)
758 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
759 }
760 }
761}

◆ PostStepVerbose()

void G4ITSteppingVerbose::PostStepVerbose ( G4Track track)
virtual

Implements G4VITSteppingVerbose.

Definition at line 1171 of file G4ITSteppingVerbose.cc.

1172{
1173 if(fVerboseLevel <= 0) return;
1174
1175 G4IosFlagsSaver ios_saver(G4cout);
1176
1177 /////
1178 // POST STEP VERBOSE
1179
1180 G4cout << setw(18) << left << GetIT(track)->GetName() << setw(15)
1181 << track->GetTrackID() << std::setprecision(3) << setw(35)
1182 << G4String(G4BestUnit(track->GetPosition(), "Length")) << setw(25)
1183 << "---";
1184
1185 G4TouchableHandle nextTouchable = track->GetNextTouchableHandle();
1186 G4VPhysicalVolume* volume(0);
1187
1188 if(nextTouchable && (volume = nextTouchable->GetVolume()))
1189 {
1190 G4String volumeName = volume->GetName();
1191
1192 if(volume->IsParameterised() || volume->IsReplicated())
1193 {
1194 volumeName += " ";
1195 volumeName += (char)nextTouchable->GetReplicaNumber();
1196 }
1197
1198 G4cout << setw(25) << volumeName;
1199 }
1200 else
1201 {
1202 G4cout << setw(25) << "OutOfWorld";
1203 }
1205 {
1206 G4cout
1207 << setw(22)
1209 ->GetProcessName();
1210 }
1211 else
1212 {
1213 G4cout << "---";
1214 }
1215 G4cout << G4endl;
1216
1217 if(fVerboseLevel > 2)
1218 {
1219 const G4TrackVector* secondaries = 0;
1220 if((secondaries = track->GetStep()->GetSecondary()))
1221 {
1222 if(secondaries->empty() == false)
1223 {
1224 G4cout << "\t\t ---->";
1225 for(std::size_t j = 0; j < secondaries->size(); ++j)
1226 {
1227 G4cout << GetIT((*secondaries)[j])->GetName() << "("
1228 << (*secondaries)[j]->GetTrackID() << ")" << " ";
1229 }
1230 G4cout << G4endl;
1231 }
1232 }
1233 }
1234
1235 G4cout << G4endl;
1236}
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:48
std::vector< G4Track * > G4TrackVector
virtual const G4String & GetName() const =0
const G4VProcess * GetProcessDefinedStep() const
const G4TrackVector * GetSecondary() const
G4StepPoint * GetPostStepPoint() const
G4int GetTrackID() const
const G4TouchableHandle & GetNextTouchableHandle() const
const G4ThreeVector & GetPosition() const
const G4Step * GetStep() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:34
virtual G4int GetReplicaNumber(G4int depth=0) const
Definition: G4VTouchable.cc:50

◆ PreStepVerbose()

void G4ITSteppingVerbose::PreStepVerbose ( G4Track track)
virtual

Implements G4VITSteppingVerbose.

Definition at line 1122 of file G4ITSteppingVerbose.cc.

1123{
1124 if(fVerboseLevel <= 0) return;
1125
1126 G4IosFlagsSaver ios_saver(G4cout);
1127
1128/////
1129// PRE STEP VERBOSE
1130
1131#ifdef DEBUG
1132#ifdef USE_COLOR
1133 G4cout << LIGHT_RED;
1134#endif
1135 G4cout << "*DoIt* " << GetIT(track)->GetName()
1136 << " ID: " << track->GetTrackID()
1137 << " at time : " << track->GetGlobalTime()
1138 << G4endl;
1139#ifdef USE_COLOR
1141#endif
1142#endif
1143
1144 G4String volumeName;
1145
1146 G4TouchableHandle nextTouchable = track->GetNextTouchableHandle();
1147 G4VPhysicalVolume* volume(0);
1148
1149 if(nextTouchable && (volume = nextTouchable->GetVolume()))
1150 {
1151 volumeName = volume->GetName();
1152
1153 if(volume->IsParameterised() || volume->IsReplicated())
1154 {
1155 volumeName += " ";
1156 volumeName += (char)nextTouchable->GetReplicaNumber();
1157 }
1158 }
1159 else
1160 {
1161 volumeName = "OutOfWorld";
1162 }
1163
1164 G4cout << setw(18) << left << GetIT(track)->GetName() << setw(15)
1165 << track->GetTrackID() << std::setprecision(3) << setw(35)
1166 << G4String(G4BestUnit(track->GetPosition(), "Length")) << setw(25)
1167 << volumeName << setw(25) << "---" << G4endl;
1168
1169}
G4double GetGlobalTime() const

◆ ShowStep()

void G4ITSteppingVerbose::ShowStep ( ) const

Definition at line 926 of file G4ITSteppingVerbose.cc.

928{
929 if(fVerboseLevel == 0)
930 {
931 return;
932 }
933
934 G4String volName;
935 G4long oldprc;
936
937// Show header
938 G4cout << G4endl;
939 G4cout << " ++G4Step Information " << G4endl;
940 oldprc = G4cout.precision(16);
941
942// Show G4Step specific information
943 G4cout << " Address of G4Track : " << fStep->GetTrack() << G4endl;
944 G4cout << " Step Length (mm) : "
946 G4cout << " Energy Deposit (MeV) : " << fStep->GetTotalEnergyDeposit()
947 << G4endl;
948
949// Show G4StepPoint specific information
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)
957 << fStep->GetPreStepPoint()->GetPosition().x() << std::setw(20)
959 G4cout << " Position - y (mm) : " << std::setw(20)
960 << fStep->GetPreStepPoint()->GetPosition().y() << std::setw(20)
962 G4cout << " Position - z (mm) : " << std::setw(20)
963 << fStep->GetPreStepPoint()->GetPosition().z() << std::setw(20)
965 G4cout << " Global Time (ns) : " << std::setw(20)
966 << fStep->GetPreStepPoint()->GetGlobalTime() << std::setw(20)
968 G4cout << " Local Time (ns) : " << std::setw(20)
969 << fStep->GetPreStepPoint()->GetLocalTime() << std::setw(20)
971 G4cout << " Proper Time (ns) : " << std::setw(20)
972 << fStep->GetPreStepPoint()->GetProperTime() << std::setw(20)
974 G4cout << " Momentum Direct - x : " << std::setw(20)
976 << std::setw(20)
978 G4cout << " Momentum Direct - y : " << std::setw(20)
980 << std::setw(20)
982 G4cout << " Momentum Direct - z : " << std::setw(20)
984 << std::setw(20)
986 G4cout << " Momentum - x (MeV/c): " << std::setw(20)
987 << fStep->GetPreStepPoint()->GetMomentum().x() << std::setw(20)
989 G4cout << " Momentum - y (MeV/c): " << std::setw(20)
990 << fStep->GetPreStepPoint()->GetMomentum().y() << std::setw(20)
992 G4cout << " Momentum - z (MeV/c): " << std::setw(20)
993 << fStep->GetPreStepPoint()->GetMomentum().z() << std::setw(20)
995 G4cout << " Total Energy (MeV) : " << std::setw(20)
996 << fStep->GetPreStepPoint()->GetTotalEnergy() << std::setw(20)
998 G4cout << " Kinetic Energy (MeV): " << std::setw(20)
999 << fStep->GetPreStepPoint()->GetKineticEnergy() << std::setw(20)
1001 G4cout << " Velocity (mm/ns) : " << std::setw(20)
1002 << fStep->GetPreStepPoint()->GetVelocity() << std::setw(20)
1004 G4cout << " Volume Name : " << std::setw(20)
1007 {
1009 }
1010 else
1011 {
1012 volName = "OutOfWorld";
1013 }
1014 G4cout << std::setw(20) << volName << G4endl;
1015 G4cout << " Safety (mm) : " << std::setw(20)
1016 << fStep->GetPreStepPoint()->GetSafety() << std::setw(20)
1018 G4cout << " Polarization - x : " << std::setw(20)
1019 << fStep->GetPreStepPoint()->GetPolarization().x() << std::setw(20)
1021 G4cout << " Polarization - y : " << std::setw(20)
1022 << fStep->GetPreStepPoint()->GetPolarization().y() << std::setw(20)
1024 G4cout << " Polarization - Z : " << std::setw(20)
1025 << fStep->GetPreStepPoint()->GetPolarization().z() << std::setw(20)
1027 G4cout << " Weight : " << std::setw(20)
1028 << fStep->GetPreStepPoint()->GetWeight() << std::setw(20)
1030 G4cout << " Step Status : ";
1031 G4StepStatus tStepStatus = fStep->GetPreStepPoint()->GetStepStatus();
1032 if(tStepStatus == fGeomBoundary)
1033 {
1034 G4cout << std::setw(20) << "Geom Limit";
1035 }
1036 else if(tStepStatus == fAlongStepDoItProc)
1037 {
1038 G4cout << std::setw(20) << "AlongStep Proc.";
1039 }
1040 else if(tStepStatus == fPostStepDoItProc)
1041 {
1042 G4cout << std::setw(20) << "PostStep Proc";
1043 }
1044 else if(tStepStatus == fAtRestDoItProc)
1045 {
1046 G4cout << std::setw(20) << "AtRest Proc";
1047 }
1048 else if(tStepStatus == fUndefined)
1049 {
1050 G4cout << std::setw(20) << "Undefined";
1051 }
1052
1053 tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
1054 if(tStepStatus == fGeomBoundary)
1055 {
1056 G4cout << std::setw(20) << "Geom Limit";
1057 }
1058 else if(tStepStatus == fAlongStepDoItProc)
1059 {
1060 G4cout << std::setw(20) << "AlongStep Proc.";
1061 }
1062 else if(tStepStatus == fPostStepDoItProc)
1063 {
1064 G4cout << std::setw(20) << "PostStep Proc";
1065 }
1066 else if(tStepStatus == fAtRestDoItProc)
1067 {
1068 G4cout << std::setw(20) << "AtRest Proc";
1069 }
1070 else if(tStepStatus == fUndefined)
1071 {
1072 G4cout << std::setw(20) << "Undefined";
1073 }
1074
1075 G4cout << G4endl;
1076 G4cout << " Process defined Step: ";
1078 {
1079 G4cout << std::setw(20) << "Undefined";
1080 }
1081 else
1082 {
1083 G4cout
1084 << std::setw(20)
1086 }
1088 {
1089 G4cout << std::setw(20) << "Undefined";
1090 }
1091 else
1092 {
1093 G4cout
1094 << std::setw(20)
1096 }
1097 G4cout.precision(oldprc);
1098
1099 G4cout << G4endl;
1100 G4cout << " -------------------------------------------------------"
1101 << "----------------" << G4endl;
1102}
G4StepStatus
Definition: G4StepStatus.hh:40
@ fGeomBoundary
Definition: G4StepStatus.hh:43
@ fUndefined
Definition: G4StepStatus.hh:55
@ fAtRestDoItProc
Definition: G4StepStatus.hh:45
@ fAlongStepDoItProc
Definition: G4StepStatus.hh:47
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
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
G4double GetStepLength() const
const G4String & GetName() const

Referenced by AlongStepDoItAllDone(), AlongStepDoItOneByOne(), AtRestDoItInvoked(), PostStepDoItAllDone(), and PostStepDoItOneByOne().

◆ StepInfo()

void G4ITSteppingVerbose::StepInfo ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 382 of file G4ITSteppingVerbose.cc.

384{
385 if(fVerboseLevel < 2)
386 {
387 return;
388 }
389
390 CopyState();
391 G4long prec = G4cout.precision(3);
392// G4cout.precision(16);
393
394 if(fVerboseLevel >= 4) VerboseTrack();
395 if(fVerboseLevel >= 3)
396 {
397 G4cout << G4endl;
398 G4cout << "StepInfo" << 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;
407#else
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;
415#endif
416 }
417 G4cout << std::setw(5) << fTrack->GetTrackID() << " " << std::setw(5)
418 << fTrack->GetCurrentStepNumber() << " " << std::setw(8)
419 << G4BestUnit(fTrack->GetPosition().x(), "Length") << " "
420 << std::setw(8) << G4BestUnit(fTrack->GetPosition().y(), "Length")
421 << " " << std::setw(8)
422 << G4BestUnit(fTrack->GetPosition().z(), "Length") << " "
423 << std::setw(9) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
424 << " " << std::setw(8)
425 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
426 << std::setw(8) << G4BestUnit(fStep->GetStepLength(), "Length") << " "
427 << std::setw(9) << G4BestUnit(fTrack->GetTrackLength(), "Length")
428 << " ";
429
430 // Put cut comment here
431 if(fTrack->GetNextVolume() != 0)
432 {
433 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
434 }
435 else
436 {
437 G4cout << std::setw(11) << "OutOfWorld" << " ";
438 }
440 {
441 G4cout
443 }
444 else
445 {
446 G4cout << "User Limit";
447 }
448 G4cout << G4endl;
449 if(fVerboseLevel == 2)
450 {
453 if(tN2ndariesTot > 0)
454 {
455 G4cout << " :----- List of 2ndaries - " << "#SpawnInStep="
456 << std::setw(3) << tN2ndariesTot << "(Rest=" << std::setw(2)
457 << fN2ndariesAtRestDoIt << ",Along=" << std::setw(2)
458 << fN2ndariesAlongStepDoIt << ",Post=" << std::setw(2)
459 << fN2ndariesPostStepDoIt << "), " << "#SpawnTotal="
460 << std::setw(3) << (*fSecondary).size() << " ---------------"
461 << G4endl;
462
463 for(std::size_t lp1=(*fSecondary).size()-tN2ndariesTot;
464 lp1<(*fSecondary).size(); ++lp1)
465 {
466 G4cout << " : "
467 << std::setw( 9)
468 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
469 << std::setw( 9)
470 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length")<< " "
471 << std::setw( 9)
472 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length") << " "
473 << std::setw( 9)
474 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy")<< " "
475 << std::setw(18)
476 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
477 }
478 G4cout << " :-----------------------------" << "----------------------------------"
479 << "-- EndOf2ndaries Info ---------------" << G4endl;
480 }
481 }
482 G4cout.precision(prec);
483}
G4double GetStepLength() const
G4VPhysicalVolume * GetNextVolume() const
G4double GetTrackLength() const
G4int GetCurrentStepNumber() const
G4double GetKineticEnergy() const

◆ StepInfoForLeadingTrack()

void G4ITSteppingVerbose::StepInfoForLeadingTrack ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 275 of file G4ITSteppingVerbose.cc.

277{
278 if(fVerboseLevel == 0)
279 {
280 return;
281 }
282
283 if(fVerboseLevel < 2)
284 {
285 CopyState();
286 G4long prec = G4cout.precision(3);
287 // G4cout.precision(16);
288
289 if(fVerboseLevel >= 4) VerboseTrack();
290 if(fVerboseLevel >= 3)
291 {
292 G4cout << G4endl;
293 G4cout << "StepInfo" << G4endl;
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;
302#else
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;
310#endif
311 }
312 G4cout << std::setw(5) << fTrack->GetTrackID() << " " << std::setw(5)
313 << fTrack->GetCurrentStepNumber() << " " << std::setw(8)
314 << G4BestUnit(fTrack->GetPosition().x(), "Length") << " "
315 << std::setw(8) << G4BestUnit(fTrack->GetPosition().y(), "Length")
316 << " " << std::setw(8)
317 << G4BestUnit(fTrack->GetPosition().z(), "Length") << " "
318 << std::setw(9) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
319 << " " << std::setw(8)
320 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
321 << std::setw(8) << G4BestUnit(fStep->GetStepLength(), "Length")
322 << " " << std::setw(9)
323 << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
324
325 // Put cut comment here
326 if(fTrack->GetNextVolume() != 0)
327 {
328 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
329 }
330 else
331 {
332 G4cout << std::setw(11) << "OutOfWorld" << " ";
333 }
335 {
336 G4cout
338 }
339 else
340 {
341 G4cout << "User Limit";
342 }
343
344 G4cout << G4endl;
345 if(fVerboseLevel == 2)
346 {
349 if(tN2ndariesTot > 0)
350 {
351 G4cout << " :----- List of 2ndaries - " << "#SpawnInStep="
352 << std::setw(3) << tN2ndariesTot << "(Rest=" << std::setw(2)
353 << fN2ndariesAtRestDoIt << ",Along=" << std::setw(2)
354 << fN2ndariesAlongStepDoIt << ",Post=" << std::setw(2)
355 << fN2ndariesPostStepDoIt << "), " << "#SpawnTotal="
356 << std::setw(3) << (*fSecondary).size() << " ---------------"
357 << G4endl;
358
359 for(std::size_t lp1=(*fSecondary).size()-tN2ndariesTot;
360 lp1<(*fSecondary).size(); ++lp1)
361 {
362 G4cout << " : "
363 << std::setw( 9)
364 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
365 << std::setw( 9)
366 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length")<< " "
367 << std::setw( 9)
368 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length") << " "
369 << std::setw( 9)
370 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy")<< " "
371 << std::setw(18)
372 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
373 }
374 G4cout << " :-----------------------------" << "----------------------------------"
375 << "-- EndOf2ndaries Info ---------------" << G4endl;
376 }
377 }
378 G4cout.precision(prec);
379 }
380}

◆ TrackingEnded()

void G4ITSteppingVerbose::TrackingEnded ( G4Track track)
virtual

Reimplemented from G4VITSteppingVerbose.

Definition at line 658 of file G4ITSteppingVerbose.cc.

660{
661 if(fVerboseLevel <= 1) return;
662
663 G4cout << " * End tracking : " << " Particle : "
664 << track->GetDefinition()->GetParticleName() << "," << " Track ID : "
665 << track->GetTrackID();
666
667 if(track->GetNextVolume())
668 {
669 G4cout << std::setw(11) << track->GetNextVolume()->GetName() << " ";
670 }
671
672 G4cout << G4endl;
673}
const G4String & GetParticleName() const
G4ParticleDefinition * GetDefinition() const

◆ TrackingStarted()

void G4ITSteppingVerbose::TrackingStarted ( G4Track track)
virtual

Reimplemented from G4VITSteppingVerbose.

Definition at line 589 of file G4ITSteppingVerbose.cc.

591{
592 if(fVerboseLevel <= 1)
593 {
594 return;
595 }
596
597 G4long prec = G4cout.precision(3);
598 if(fVerboseLevel > 0)
599 {
600 fTrack = track;
601 fStep = track->GetStep();
602
603//#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
604// G4cout << std::setw(5) << "TrackID" << " " << std::setw(5) << "Step#" << " "
605// << std::setw(8) << "X" << " " << std::setw(8) << "Y" << " "
606// << std::setw(8) << "Z" << " " << std::setw(9) << "KineE"
607// << " " << std::setw(8) << "dE" << " " << std::setw(12)
608// << "StepLeng" << " " << std::setw(12) << "TrackLeng" << " "
609// << std::setw(12) << "NextVolume" << " " << std::setw(8) << "ProcName"
610// << G4endl;
611//#else
612// G4cout << std::setw(5) << "TrackID" << std::setw(5) << "Step#" << " "
613// << std::setw(8) << "X(mm)" << " " << std::setw(8) << "Y(mm)" << " "
614// << std::setw(8) << "Z(mm)" << " " << std::setw(9) << "KinE(MeV)"
615// << " " << std::setw(8) << "dE(MeV)" << " " << std::setw(8)
616// << "StepLeng" << " " << std::setw(9) << "TrackLeng" << " "
617// << std::setw(11) << "NextVolume" << " " << std::setw(8) << "ProcName"
618// << G4endl;
619//#endif
620
621 G4cout << "Start tracking : "
622 << GetIT(fTrack)->GetName()
623 << " (" << fTrack->GetTrackID() << ") from position "
624 << std::setw(8)
625 << G4BestUnit(fTrack->GetPosition().x(), "Length") << " "
626 << std::setw(8)
627 << G4BestUnit(fTrack->GetPosition().y(), "Length") << " "
628 << std::setw(8)
629 << G4BestUnit(fTrack->GetPosition().z(), "Length") << " ";
630
631// G4cout << std::setw(5) << fTrack->GetTrackID() << std::setw(5)
632// << fTrack->GetCurrentStepNumber() << " " << std::setw(8)
633// << G4BestUnit(fTrack->GetPosition().x(), "Length") << " "
634// << std::setw(8) << G4BestUnit(fTrack->GetPosition().y(), "Length")
635// << " " << std::setw(8)
636// << G4BestUnit(fTrack->GetPosition().z(), "Length") << " "
637// << std::setw(9) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
638// << " " << std::setw(8)
639// << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
640// << std::setw(8) << G4BestUnit(fStep->GetStepLength(), "Length")
641// << " " << std::setw(9)
642// << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
643
644 if(fTrack->GetNextVolume())
645 {
646 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
647 }
648 else
649 {
650 G4cout << std::setw(11) << "OutOfWorld" << " ";
651 }
652 G4cout << "initStep" << G4endl;
653 }
654 G4cout.precision(prec);
655}

◆ VerboseParticleChange()

void G4ITSteppingVerbose::VerboseParticleChange ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 913 of file G4ITSteppingVerbose.cc.

915{
916 if(fVerboseLevel == 0)
917 {
918 return;
919 }
920// Show header
921 G4cout << G4endl;
922 G4cout << " ++G4ParticleChange Information " << G4endl;
924}
const G4VParticleChange * fParticleChange
virtual void DumpInfo() const

Referenced by AlongStepDoItOneByOne(), and PostStepDoItOneByOne().

◆ VerboseTrack()

void G4ITSteppingVerbose::VerboseTrack ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 764 of file G4ITSteppingVerbose.cc.

766{
767 if(fVerboseLevel == 0)
768 {
769 return;
770 }
771
772 CopyState();
773// Show header
774 G4cout << G4endl;
775 G4cout << " ++G4Track Information " << G4endl;
776 G4long prec = G4cout.precision(3);
777
778 G4cout << " -----------------------------------------------" << G4endl;
779 G4cout << " G4Track Information " << std::setw(20) << G4endl;
780 G4cout << " -----------------------------------------------" << G4endl;
781
782 G4cout << " Step number : " << std::setw(20)
784#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
785 G4cout << " Position - x : " << std::setw(20)
786 << G4BestUnit(fTrack->GetPosition().x(), "Length") << G4endl;
787 G4cout << " Position - y : " << std::setw(20)
788 << G4BestUnit(fTrack->GetPosition().y(), "Length") << G4endl;
789 G4cout << " Position - z : " << std::setw(20)
790 << G4BestUnit(fTrack->GetPosition().z(), "Length") << G4endl;
791 G4cout << " Global Time : " << std::setw(20)
792 << G4BestUnit(fTrack->GetGlobalTime(), "Time") << G4endl;
793 G4cout << " Local Time : " << std::setw(20)
794 << G4BestUnit(fTrack->GetLocalTime(), "Time") << G4endl;
795#else
796 G4cout << " Position - x (mm) : " << std::setw(20)
797 << fTrack->GetPosition().x() / mm << G4endl;
798 G4cout << " Position - y (mm) : " << std::setw(20)
799 << fTrack->GetPosition().y() / mm << G4endl;
800 G4cout << " Position - z (mm) : " << std::setw(20)
801 << fTrack->GetPosition().z() / mm << G4endl;
802 G4cout << " Global Time (ns) : " << std::setw(20)
803 << fTrack->GetGlobalTime() / ns << G4endl;
804 G4cout << " Local Time (ns) : " << std::setw(20)
805 << fTrack->GetLocalTime() / ns << G4endl;
806#endif
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 : "
815#else
816 G4cout << " Kinetic Energy (MeV): "
817#endif
818 << std::setw(20)
819 << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << G4endl;
820 G4cout << " Polarization - x : " << std::setw(20)
821 << fTrack->GetPolarization().x() << G4endl;
822 G4cout << " Polarization - y : " << std::setw(20)
823 << fTrack->GetPolarization().y() << G4endl;
824 G4cout << " Polarization - z : " << std::setw(20)
825 << fTrack->GetPolarization().z() << G4endl;
826 G4cout << " Track Length : " << std::setw(20)
827 << G4BestUnit(fTrack->GetTrackLength(), "Length") << G4endl;
828 G4cout << " Track ID # : " << std::setw(20)
829 << fTrack->GetTrackID() << G4endl;
830 G4cout << " Parent Track ID # : " << std::setw(20)
831 << fTrack->GetParentID() << G4endl;
832 G4cout << " Next Volume : " << std::setw(20);
833 if(fTrack->GetNextVolume() != 0)
834 {
835 G4cout << fTrack->GetNextVolume()->GetName() << " ";
836 }
837 else
838 {
839 G4cout << "OutOfWorld" << " ";
840 }
841 G4cout << G4endl;
842 G4cout << " Track Status : " << std::setw(20);
844 {
845 G4cout << " Alive";
846 }
847 else if(fTrack->GetTrackStatus() == fStopButAlive)
848 {
849 G4cout << " StopButAlive";
850 }
851 else if(fTrack->GetTrackStatus() == fStopAndKill)
852 {
853 G4cout << " StopAndKill";
854 }
856 {
857 G4cout << " KillTrackAndSecondaries";
858 }
859 else if(fTrack->GetTrackStatus() == fSuspend)
860 {
861 G4cout << " Suspend";
862 }
864 {
865 G4cout << " PostponeToNextEvent";
866 }
867 G4cout << G4endl;
868#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
869 G4cout << " Vertex - x : " << std::setw(20)
870 << G4BestUnit(fTrack->GetVertexPosition().x(), "Length") << G4endl;
871 G4cout << " Vertex - y : " << std::setw(20)
872 << G4BestUnit(fTrack->GetVertexPosition().y(), "Length") << G4endl;
873 G4cout << " Vertex - z : " << std::setw(20)
874 << G4BestUnit(fTrack->GetVertexPosition().z(), "Length") << G4endl;
875#else
876 G4cout << " Vertex - x (mm) : " << std::setw(20)
877 << fTrack->GetVertexPosition().x() / mm << G4endl;
878 G4cout << " Vertex - y (mm) : " << std::setw(20)
879 << fTrack->GetVertexPosition().y() / mm << G4endl;
880 G4cout << " Vertex - z (mm) : " << std::setw(20)
881 << fTrack->GetVertexPosition().z() / mm << G4endl;
882#endif
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 : "
891#else
892 G4cout << " Vertex - KineE (MeV): "
893#endif
894 << std::setw(20)
896
897 G4cout << " Creator Process : " << std::setw(20);
898 if(fTrack->GetCreatorProcess() == 0)
899 {
900 G4cout << " Event Generator" << G4endl;
901 }
902 else
903 {
905 }
906
907 G4cout << " -----------------------------------------------" << G4endl;
908
909 G4cout.precision(prec);
910}
@ fKillTrackAndSecondaries
@ fSuspend
@ fAlive
@ fStopAndKill
@ fStopButAlive
@ fPostponeToNextEvent
G4TrackStatus GetTrackStatus() const
G4double GetVertexKineticEnergy() const
const G4VProcess * GetCreatorProcess() const
const G4ThreeVector & GetVertexMomentumDirection() const
const G4ThreeVector & GetVertexPosition() const
G4double GetLocalTime() const
const G4ThreeVector & GetMomentumDirection() const
const G4ThreeVector & GetPolarization() const
G4int GetParentID() const
#define ns(x)
Definition: xmltok.c:1649

Referenced by StepInfo(), and StepInfoForLeadingTrack().


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