Geant4 10.7.0
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 57 of file G4ITSteppingVerbose.cc.

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

◆ ~G4ITSteppingVerbose()

G4ITSteppingVerbose::~G4ITSteppingVerbose ( )

Definition at line 66 of file G4ITSteppingVerbose.cc.

68{
69}

Member Function Documentation

◆ AlongStepDoItAllDone()

void G4ITSteppingVerbose::AlongStepDoItAllDone ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 145 of file G4ITSteppingVerbose.cc.

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

◆ AlongStepDoItOneByOne()

void G4ITSteppingVerbose::AlongStepDoItOneByOne ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 675 of file G4ITSteppingVerbose.cc.

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

◆ AtRestDoItInvoked()

void G4ITSteppingVerbose::AtRestDoItInvoked ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 78 of file G4ITSteppingVerbose.cc.

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

◆ AtRestDoItOneByOne()

void G4ITSteppingVerbose::AtRestDoItOneByOne ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 1237 of file G4ITSteppingVerbose.cc.

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

◆ DoItStarted()

void G4ITSteppingVerbose::DoItStarted ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 1103 of file G4ITSteppingVerbose.cc.

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

◆ DPSLAlongStep()

void G4ITSteppingVerbose::DPSLAlongStep ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 557 of file G4ITSteppingVerbose.cc.

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

◆ DPSLPostStep()

void G4ITSteppingVerbose::DPSLPostStep ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 519 of file G4ITSteppingVerbose.cc.

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

◆ DPSLStarted()

void G4ITSteppingVerbose::DPSLStarted ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 486 of file G4ITSteppingVerbose.cc.

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

◆ DPSLUserLimit()

void G4ITSteppingVerbose::DPSLUserLimit ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 501 of file G4ITSteppingVerbose.cc.

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

◆ NewStep()

void G4ITSteppingVerbose::NewStep ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 72 of file G4ITSteppingVerbose.cc.

74{
75}

◆ PostStepDoItAllDone()

void G4ITSteppingVerbose::PostStepDoItAllDone ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 202 of file G4ITSteppingVerbose.cc.

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

◆ PostStepDoItOneByOne()

void G4ITSteppingVerbose::PostStepDoItOneByOne ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 720 of file G4ITSteppingVerbose.cc.

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

◆ PostStepVerbose()

void G4ITSteppingVerbose::PostStepVerbose ( G4Track track)
virtual

Implements G4VITSteppingVerbose.

Definition at line 1170 of file G4ITSteppingVerbose.cc.

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

◆ PreStepVerbose()

void G4ITSteppingVerbose::PreStepVerbose ( G4Track track)
virtual

Implements G4VITSteppingVerbose.

Definition at line 1121 of file G4ITSteppingVerbose.cc.

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

◆ ShowStep()

void G4ITSteppingVerbose::ShowStep ( ) const

Definition at line 925 of file G4ITSteppingVerbose.cc.

927{
928 if(fVerboseLevel == 0)
929 {
930 return;
931 }
932
933 G4String volName;
934 G4int oldprc;
935
936// Show header
937 G4cout << G4endl;
938 G4cout << " ++G4Step Information " << G4endl;
939 oldprc = G4cout.precision(16);
940
941// Show G4Step specific information
942 G4cout << " Address of G4Track : " << fStep->GetTrack() << G4endl;
943 G4cout << " Step Length (mm) : "
945 G4cout << " Energy Deposit (MeV) : " << fStep->GetTotalEnergyDeposit()
946 << G4endl;
947
948// Show G4StepPoint specific information
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)
956 << fStep->GetPreStepPoint()->GetPosition().x() << std::setw(20)
958 G4cout << " Position - y (mm) : " << std::setw(20)
959 << fStep->GetPreStepPoint()->GetPosition().y() << std::setw(20)
961 G4cout << " Position - z (mm) : " << std::setw(20)
962 << fStep->GetPreStepPoint()->GetPosition().z() << std::setw(20)
964 G4cout << " Global Time (ns) : " << std::setw(20)
965 << fStep->GetPreStepPoint()->GetGlobalTime() << std::setw(20)
967 G4cout << " Local Time (ns) : " << std::setw(20)
968 << fStep->GetPreStepPoint()->GetLocalTime() << std::setw(20)
970 G4cout << " Proper Time (ns) : " << std::setw(20)
971 << fStep->GetPreStepPoint()->GetProperTime() << std::setw(20)
973 G4cout << " Momentum Direct - x : " << std::setw(20)
975 << std::setw(20)
977 G4cout << " Momentum Direct - y : " << std::setw(20)
979 << std::setw(20)
981 G4cout << " Momentum Direct - z : " << std::setw(20)
983 << std::setw(20)
985 G4cout << " Momentum - x (MeV/c): " << std::setw(20)
986 << fStep->GetPreStepPoint()->GetMomentum().x() << std::setw(20)
988 G4cout << " Momentum - y (MeV/c): " << std::setw(20)
989 << fStep->GetPreStepPoint()->GetMomentum().y() << std::setw(20)
991 G4cout << " Momentum - z (MeV/c): " << std::setw(20)
992 << fStep->GetPreStepPoint()->GetMomentum().z() << std::setw(20)
994 G4cout << " Total Energy (MeV) : " << std::setw(20)
995 << fStep->GetPreStepPoint()->GetTotalEnergy() << std::setw(20)
997 G4cout << " Kinetic Energy (MeV): " << std::setw(20)
998 << fStep->GetPreStepPoint()->GetKineticEnergy() << std::setw(20)
1000 G4cout << " Velocity (mm/ns) : " << std::setw(20)
1001 << fStep->GetPreStepPoint()->GetVelocity() << std::setw(20)
1003 G4cout << " Volume Name : " << std::setw(20)
1006 {
1008 }
1009 else
1010 {
1011 volName = "OutOfWorld";
1012 }
1013 G4cout << std::setw(20) << volName << G4endl;
1014 G4cout << " Safety (mm) : " << std::setw(20)
1015 << fStep->GetPreStepPoint()->GetSafety() << std::setw(20)
1017 G4cout << " Polarization - x : " << std::setw(20)
1018 << fStep->GetPreStepPoint()->GetPolarization().x() << std::setw(20)
1020 G4cout << " Polarization - y : " << std::setw(20)
1021 << fStep->GetPreStepPoint()->GetPolarization().y() << std::setw(20)
1023 G4cout << " Polarization - Z : " << std::setw(20)
1024 << fStep->GetPreStepPoint()->GetPolarization().z() << std::setw(20)
1026 G4cout << " Weight : " << std::setw(20)
1027 << fStep->GetPreStepPoint()->GetWeight() << std::setw(20)
1029 G4cout << " Step Status : ";
1030 G4StepStatus tStepStatus = fStep->GetPreStepPoint()->GetStepStatus();
1031 if(tStepStatus == fGeomBoundary)
1032 {
1033 G4cout << std::setw(20) << "Geom Limit";
1034 }
1035 else if(tStepStatus == fAlongStepDoItProc)
1036 {
1037 G4cout << std::setw(20) << "AlongStep Proc.";
1038 }
1039 else if(tStepStatus == fPostStepDoItProc)
1040 {
1041 G4cout << std::setw(20) << "PostStep Proc";
1042 }
1043 else if(tStepStatus == fAtRestDoItProc)
1044 {
1045 G4cout << std::setw(20) << "AtRest Proc";
1046 }
1047 else if(tStepStatus == fUndefined)
1048 {
1049 G4cout << std::setw(20) << "Undefined";
1050 }
1051
1052 tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
1053 if(tStepStatus == fGeomBoundary)
1054 {
1055 G4cout << std::setw(20) << "Geom Limit";
1056 }
1057 else if(tStepStatus == fAlongStepDoItProc)
1058 {
1059 G4cout << std::setw(20) << "AlongStep Proc.";
1060 }
1061 else if(tStepStatus == fPostStepDoItProc)
1062 {
1063 G4cout << std::setw(20) << "PostStep Proc";
1064 }
1065 else if(tStepStatus == fAtRestDoItProc)
1066 {
1067 G4cout << std::setw(20) << "AtRest Proc";
1068 }
1069 else if(tStepStatus == fUndefined)
1070 {
1071 G4cout << std::setw(20) << "Undefined";
1072 }
1073
1074 G4cout << G4endl;
1075 G4cout << " Process defined Step: ";
1077 {
1078 G4cout << std::setw(20) << "Undefined";
1079 }
1080 else
1081 {
1082 G4cout
1083 << std::setw(20)
1085 }
1087 {
1088 G4cout << std::setw(20) << "Undefined";
1089 }
1090 else
1091 {
1092 G4cout
1093 << std::setw(20)
1095 }
1096 G4cout.precision(oldprc);
1097
1098 G4cout << G4endl;
1099 G4cout << " -------------------------------------------------------"
1100 << "----------------" << G4endl;
1101}
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
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 G4int 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(size_t lp1=(*fSecondary).size()-tN2ndariesTot; lp1<(*fSecondary).size(); lp1++)
464 {
465 G4cout << " : "
466 << std::setw( 9)
467 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
468 << std::setw( 9)
469 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length")<< " "
470 << std::setw( 9)
471 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length") << " "
472 << std::setw( 9)
473 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy")<< " "
474 << std::setw(18)
475 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
476 }
477 G4cout << " :-----------------------------" << "----------------------------------"
478 << "-- EndOf2ndaries Info ---------------" << G4endl;
479 }
480 }
481 G4cout.precision(prec);
482}
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 276 of file G4ITSteppingVerbose.cc.

278{
279 if(fVerboseLevel == 0)
280 {
281 return;
282 }
283
284 if(fVerboseLevel < 2)
285 {
286 CopyState();
287 G4int prec = G4cout.precision(3);
288 // G4cout.precision(16);
289
290 if(fVerboseLevel >= 4) VerboseTrack();
291 if(fVerboseLevel >= 3)
292 {
293 G4cout << G4endl;
294 G4cout << "StepInfo" << G4endl;
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;
303#else
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;
311#endif
312 }
313 G4cout << std::setw(5) << fTrack->GetTrackID() << " " << std::setw(5)
314 << fTrack->GetCurrentStepNumber() << " " << std::setw(8)
315 << G4BestUnit(fTrack->GetPosition().x(), "Length") << " "
316 << std::setw(8) << G4BestUnit(fTrack->GetPosition().y(), "Length")
317 << " " << std::setw(8)
318 << G4BestUnit(fTrack->GetPosition().z(), "Length") << " "
319 << std::setw(9) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
320 << " " << std::setw(8)
321 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
322 << std::setw(8) << G4BestUnit(fStep->GetStepLength(), "Length")
323 << " " << std::setw(9)
324 << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
325
326 // Put cut comment here
327 if(fTrack->GetNextVolume() != 0)
328 {
329 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
330 }
331 else
332 {
333 G4cout << std::setw(11) << "OutOfWorld" << " ";
334 }
336 {
337 G4cout
339 }
340 else
341 {
342 G4cout << "User Limit";
343 }
344
345 G4cout << G4endl;
346 if(fVerboseLevel == 2)
347 {
350 if(tN2ndariesTot > 0)
351 {
352 G4cout << " :----- List of 2ndaries - " << "#SpawnInStep="
353 << std::setw(3) << tN2ndariesTot << "(Rest=" << std::setw(2)
354 << fN2ndariesAtRestDoIt << ",Along=" << std::setw(2)
355 << fN2ndariesAlongStepDoIt << ",Post=" << std::setw(2)
356 << fN2ndariesPostStepDoIt << "), " << "#SpawnTotal="
357 << std::setw(3) << (*fSecondary).size() << " ---------------"
358 << G4endl;
359
360 for(size_t lp1=(*fSecondary).size()-tN2ndariesTot; 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 657 of file G4ITSteppingVerbose.cc.

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

◆ TrackingStarted()

void G4ITSteppingVerbose::TrackingStarted ( G4Track track)
virtual

Reimplemented from G4VITSteppingVerbose.

Definition at line 588 of file G4ITSteppingVerbose.cc.

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

◆ VerboseParticleChange()

void G4ITSteppingVerbose::VerboseParticleChange ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 912 of file G4ITSteppingVerbose.cc.

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

Referenced by AlongStepDoItOneByOne(), and PostStepDoItOneByOne().

◆ VerboseTrack()

void G4ITSteppingVerbose::VerboseTrack ( )
virtual

Implements G4VITSteppingVerbose.

Definition at line 763 of file G4ITSteppingVerbose.cc.

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

Referenced by StepInfo(), and StepInfoForLeadingTrack().


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