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

#include <G4SteppingVerboseWithUnits.hh>

+ Inheritance diagram for G4SteppingVerboseWithUnits:

Public Member Functions

 G4SteppingVerboseWithUnits (G4int precision=4)
 
 ~G4SteppingVerboseWithUnits () override
 
G4VSteppingVerboseClone () override
 
void SetManager (G4SteppingManager *const) override
 
void TrackingStarted () override
 
void StepInfo () override
 
void AtRestDoItInvoked () override
 
void AlongStepDoItAllDone () override
 
void PostStepDoItAllDone () override
 
void AlongStepDoItOneByOne () override
 
void PostStepDoItOneByOne () override
 
void DPSLStarted () override
 
void DPSLUserLimit () override
 
void DPSLPostStep () override
 
void DPSLAlongStep () override
 
void VerboseTrack () override
 
void VerboseParticleChange () override
 
void ShowStep () const override
 
- Public Member Functions inherited from G4SteppingVerbose
 G4SteppingVerbose ()
 
virtual ~G4SteppingVerbose ()
 
virtual G4VSteppingVerboseClone ()
 
virtual void NewStep ()
 
virtual void AtRestDoItInvoked ()
 
virtual void AlongStepDoItAllDone ()
 
virtual void PostStepDoItAllDone ()
 
virtual void AlongStepDoItOneByOne ()
 
virtual void PostStepDoItOneByOne ()
 
virtual void StepInfo ()
 
virtual void TrackingStarted ()
 
virtual void DPSLStarted ()
 
virtual void DPSLUserLimit ()
 
virtual void DPSLPostStep ()
 
virtual void DPSLAlongStep ()
 
virtual void VerboseTrack ()
 
virtual void VerboseParticleChange ()
 
virtual void ShowStep () const
 
- Public Member Functions inherited from G4VSteppingVerbose
virtual ~G4VSteppingVerbose ()
 
virtual G4VSteppingVerboseClone ()
 
virtual void NewStep ()=0
 
void CopyState ()
 
virtual void SetManager (G4SteppingManager *const)
 
virtual void AtRestDoItInvoked ()=0
 
virtual void AlongStepDoItAllDone ()=0
 
virtual void PostStepDoItAllDone ()=0
 
virtual void AlongStepDoItOneByOne ()=0
 
virtual void PostStepDoItOneByOne ()=0
 
virtual void StepInfo ()=0
 
virtual void TrackingStarted ()=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
 

Additional Inherited Members

- Static Public Member Functions inherited from G4SteppingVerbose
static void UseBestUnit (G4int prec=4)
 
static G4int BestUnitPrecision ()
 
- Static Public Member Functions inherited from G4VSteppingVerbose
static void SetInstance (G4VSteppingVerbose *Instance)
 
static G4VSteppingVerboseGetInstance ()
 
static G4VSteppingVerboseGetMasterInstance ()
 
static G4int GetSilent ()
 
static void SetSilent (G4int fSilent)
 
static G4int GetSilentStepInfo ()
 
static void SetSilentStepInfo (G4int fSilent)
 
- Protected Types inherited from G4VSteppingVerbose
using G4SelectedAtRestDoItVector = std::vector< G4int >
 
using G4SelectedAlongStepDoItVector = std::vector< G4int >
 
using G4SelectedPostStepDoItVector = std::vector< G4int >
 
- Protected Member Functions inherited from G4VSteppingVerbose
 G4VSteppingVerbose ()
 
- Protected Attributes inherited from G4VSteppingVerbose
G4SteppingManagerfManager = nullptr
 
G4UserSteppingActionfUserSteppingAction = nullptr
 
G4double PhysicalStep = 0.0
 
G4double GeometricalStep = 0.0
 
G4double CorrectedStep = 0.0
 
G4bool PreStepPointIsGeom = false
 
G4bool FirstStep = false
 
G4StepStatus fStepStatus = fUndefined
 
G4double TempInitVelocity = 0.0
 
G4double TempVelocity = 0.0
 
G4double Mass = 0.0
 
G4double sumEnergyChange = 0.0
 
G4VParticleChangefParticleChange = nullptr
 
G4TrackfTrack = nullptr
 
G4TrackVectorfSecondary = nullptr
 
G4StepfStep = nullptr
 
G4StepPointfPreStepPoint = nullptr
 
G4StepPointfPostStepPoint = nullptr
 
G4VPhysicalVolumefCurrentVolume = nullptr
 
G4VSensitiveDetectorfSensitive = nullptr
 
G4VProcessfCurrentProcess = nullptr
 
G4ProcessVectorfAtRestDoItVector = nullptr
 
G4ProcessVectorfAlongStepDoItVector = nullptr
 
G4ProcessVectorfPostStepDoItVector = nullptr
 
G4ProcessVectorfAtRestGetPhysIntVector = nullptr
 
G4ProcessVectorfAlongStepGetPhysIntVector = nullptr
 
G4ProcessVectorfPostStepGetPhysIntVector = nullptr
 
std::size_t MAXofAtRestLoops = 0
 
std::size_t MAXofAlongStepLoops = 0
 
std::size_t MAXofPostStepLoops = 0
 
G4double currentMinimumStep = 0.0
 
G4double numberOfInteractionLengthLeft = 0.0
 
std::size_t fAtRestDoItProcTriggered = 0
 
std::size_t fAlongStepDoItProcTriggered = 0
 
std::size_t fPostStepDoItProcTriggered = 0
 
G4int fN2ndariesAtRestDoIt = 0
 
G4int fN2ndariesAlongStepDoIt = 0
 
G4int fN2ndariesPostStepDoIt = 0
 
G4NavigatorfNavigator = nullptr
 
G4int verboseLevel = 0
 
G4SelectedAtRestDoItVectorfSelectedAtRestDoItVector = nullptr
 
G4SelectedAlongStepDoItVectorfSelectedAlongStepDoItVector = nullptr
 
G4SelectedPostStepDoItVectorfSelectedPostStepDoItVector = nullptr
 
G4double fPreviousStepSize = 0.0
 
G4TouchableHandle fTouchableHandle
 
G4SteppingControl StepControlFlag = NormalCondition
 
G4double physIntLength = 0.0
 
G4ForceCondition fCondition = InActivated
 
G4GPILSelection fGPILSelection = NotCandidateForSelection
 
- Static Protected Attributes inherited from G4VSteppingVerbose
static G4ThreadLocal G4VSteppingVerbosefInstance = nullptr
 
static G4VSteppingVerbosefMasterInstance = nullptr
 
static G4TRACKING_DLL G4ThreadLocal G4int Silent = 0
 
static G4TRACKING_DLL G4ThreadLocal G4int SilentStepInfo = 0
 

Detailed Description

Definition at line 48 of file G4SteppingVerboseWithUnits.hh.

Constructor & Destructor Documentation

◆ G4SteppingVerboseWithUnits()

G4SteppingVerboseWithUnits::G4SteppingVerboseWithUnits ( G4int  precision = 4)

Definition at line 46 of file G4SteppingVerboseWithUnits.cc.

47 : G4SteppingVerbose(), fprec(prec)
48{
49}

◆ ~G4SteppingVerboseWithUnits()

G4SteppingVerboseWithUnits::~G4SteppingVerboseWithUnits ( )
override

Definition at line 53 of file G4SteppingVerboseWithUnits.cc.

54{
55 delete fmessenger;
56}

Member Function Documentation

◆ AlongStepDoItAllDone()

void G4SteppingVerboseWithUnits::AlongStepDoItAllDone ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 246 of file G4SteppingVerboseWithUnits.cc.

247{
248 G4VProcess* ptProcManager;
249
250 CopyState();
251
252 if(verboseLevel >= 3)
253 {
254 G4cout << G4endl;
255 G4cout << " >>AlongStepDoIt (after all invocations):" << G4endl;
256 G4cout << " ++List of invoked processes " << G4endl;
257
258 for(std::size_t ci=0; ci<MAXofAlongStepLoops; ++ci)
259 {
260 ptProcManager = (*fAlongStepDoItVector)((G4int)ci);
261 G4cout << " " << ci+1 << ") ";
262 if(ptProcManager != nullptr)
263 {
264 G4cout << ptProcManager->GetProcessName() << G4endl;
265 }
266 }
267
268 ShowStep();
269 G4cout << G4endl;
270 G4cout << " ++List of secondaries generated "
271 << "(x,y,z,kE,t,PID):"
272 << " No. of secondaries = "
273 << (*fSecondary).size() << G4endl;
274
275 if((*fSecondary).size()>0)
276 {
277 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
278 {
279 G4cout << " "
280 << std::setw( 9)
281 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
282 << " " << std::setw( 9)
283 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
284 << " " << std::setw( 9)
285 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
286 << " " << std::setw( 9)
287 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
288 << " " << std::setw( 9)
289 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time")
290 << " " << std::setw(18)
291 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
292 << G4endl;
293 }
294 }
295 }
296}
#define G4BestUnit(a, b)
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
Definition: G4VProcess.hh:386
std::size_t MAXofAlongStepLoops
G4TrackVector * fSecondary

◆ AlongStepDoItOneByOne()

void G4SteppingVerboseWithUnits::AlongStepDoItOneByOne ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 466 of file G4SteppingVerboseWithUnits.cc.

467{
468 CopyState();
469
470 if(verboseLevel >= 4)
471 {
472 G4cout << G4endl;
473 G4cout << " >>AlongStepDoIt (process by process): "
474 << " Process Name = "
476
477 ShowStep();
478 G4cout << " "
479 << "!Note! Safety of PostStep is only valid "
480 << "after all DoIt invocations."
481 << G4endl;
482
484 G4cout << G4endl;
485
486 G4cout << " ++List of secondaries generated "
487 << "(x,y,z,kE,t,PID):"
488 << " No. of secondaries = "
490
492 {
493 for(std::size_t lp1=(*fSecondary).size()-fN2ndariesAlongStepDoIt;
494 lp1<(*fSecondary).size(); ++lp1)
495 {
496 G4cout << " "
497 << std::setw( 9)
498 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
499 << " " << std::setw( 9)
500 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
501 << " " << std::setw( 9)
502 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
503 << " " << std::setw( 9)
504 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
505 << " " << std::setw( 9)
506 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
507 << " " << std::setw(18)
508 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
509 << G4endl;
510 }
511 }
512 }
513}
G4VProcess * fCurrentProcess

◆ AtRestDoItInvoked()

void G4SteppingVerboseWithUnits::AtRestDoItInvoked ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 181 of file G4SteppingVerboseWithUnits.cc.

182{
183 G4VProcess* ptProcManager;
184 CopyState();
185
186 if(verboseLevel >= 3)
187 {
188 G4int npt=0;
189 G4cout << " **List of AtRestDoIt invoked:" << G4endl;
190 for(std::size_t np=0; np<MAXofAtRestLoops; ++np)
191 {
192 std::size_t npGPIL = MAXofAtRestLoops-np-1;
193 if( (*fSelectedAtRestDoItVector)[npGPIL] == G4ForceCondition::Forced )
194 {
195 ++npt;
196 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
197 G4cout << " # " << npt << " : "
198 << ptProcManager->GetProcessName()
199 << " (Forced)" << G4endl;
200 }
201 else if ( (*fSelectedAtRestDoItVector)[npGPIL] == G4ForceCondition::NotForced )
202 {
203 ++npt;
204 ptProcManager = (*fAtRestDoItVector)[(G4int)np];
205 G4cout << " # " << npt << " : " << ptProcManager->GetProcessName()
206 << G4endl;
207 }
208 }
209
210 G4cout << " Generated secondaries = " << fN2ndariesAtRestDoIt << G4endl;
211
212 if( fN2ndariesAtRestDoIt > 0 )
213 {
214 G4cout << " -- List of secondaries generated : "
215 << "(x,y,z,kE,t,PID) --" << G4endl;
216 for( std::size_t lp1=(*fSecondary).size()-fN2ndariesAtRestDoIt;
217 lp1<(*fSecondary).size(); ++lp1)
218 {
219 G4cout << " "
220 << std::setw( 9)
221 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
222 << " " << std::setw( 9)
223 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
224 << " " << std::setw( 9)
225 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
226 << " " << std::setw( 9)
227 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
228 << " " << std::setw( 9)
229 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time")
230 << " " << std::setw(18)
231 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
232 << G4endl;
233 }
234 }
235 }
236
237 if( verboseLevel >= 4 )
238 {
239 ShowStep();
240 G4cout << G4endl;
241 }
242}
G4SelectedAtRestDoItVector * fSelectedAtRestDoItVector

◆ Clone()

G4VSteppingVerbose * G4SteppingVerboseWithUnits::Clone ( )
inlineoverridevirtual

◆ DPSLAlongStep()

void G4SteppingVerboseWithUnits::DPSLAlongStep ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 438 of file G4SteppingVerboseWithUnits.cc.

439{
440 CopyState();
441
442 if( verboseLevel > 5 )
443 {
444 G4cout << " ++ProposedStep(AlongStep) = "
445 << std::setw( 9) << G4BestUnit(physIntLength , "Length")
446 << " : ProcName = "
448 << " (";
450 {
451 G4cout << "CandidateForSelection)" << G4endl;
452 }
454 {
455 G4cout << "NotCandidateForSelection)" << G4endl;
456 }
457 else
458 {
459 G4cout << "?!?)" << G4endl;
460 }
461 }
462}
@ CandidateForSelection
@ NotCandidateForSelection
G4GPILSelection fGPILSelection

◆ DPSLPostStep()

void G4SteppingVerboseWithUnits::DPSLPostStep ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 404 of file G4SteppingVerboseWithUnits.cc.

405{
406 CopyState();
407
408 if( verboseLevel > 5 )
409 {
410 G4cout << " ++ProposedStep(PostStep ) = "
411 << std::setw( 9) << G4BestUnit(physIntLength , "Length")
412 << " : ProcName = " << fCurrentProcess->GetProcessName() << " (";
414 {
415 G4cout << "ExclusivelyForced)" << G4endl;
416 }
417 else if(fCondition==StronglyForced)
418 {
419 G4cout << "StronglyForced)" << G4endl;
420 }
421 else if(fCondition==Conditionally)
422 {
423 G4cout << "Conditionally)" << G4endl;
424 }
425 else if(fCondition==Forced)
426 {
427 G4cout << "Forced)" << G4endl;
428 }
429 else
430 {
431 G4cout << "No ForceCondition)" << G4endl;
432 }
433 }
434}
@ StronglyForced
@ Conditionally
@ ExclusivelyForced
@ Forced
G4ForceCondition fCondition

◆ DPSLStarted()

void G4SteppingVerboseWithUnits::DPSLStarted ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 374 of file G4SteppingVerboseWithUnits.cc.

375{
376 CopyState();
377
378 if( verboseLevel > 5 )
379 {
380 G4cout << G4endl
381 << " >>DefinePhysicalStepLength (List of proposed StepLengths): "
382 << G4endl;
383 }
384}

◆ DPSLUserLimit()

void G4SteppingVerboseWithUnits::DPSLUserLimit ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 388 of file G4SteppingVerboseWithUnits.cc.

389{
390 CopyState();
391
392 if( verboseLevel > 5 )
393 {
394 G4cout << G4endl << G4endl;
395 G4cout << "=== Defined Physical Step Length (DPSL)" << G4endl;
396 G4cout << " ++ProposedStep(UserLimit) = "
397 << std::setw( 9) << G4BestUnit(physIntLength , "Length")
398 << " : ProcName = User defined maximum allowed Step" << G4endl;
399 }
400}

◆ PostStepDoItAllDone()

void G4SteppingVerboseWithUnits::PostStepDoItAllDone ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 300 of file G4SteppingVerboseWithUnits.cc.

301{
302 G4VProcess* ptProcManager;
303
304 CopyState();
305
307 (fCondition == Forced) |
311 {
312 if(verboseLevel >= 3)
313 {
314 G4int npt=0;
315 G4cout << G4endl;
316 G4cout << " **PostStepDoIt (after all invocations):" << G4endl;
317 G4cout << " ++List of invoked processes " << G4endl;
318
319 for(std::size_t np=0; np<MAXofPostStepLoops; ++np)
320 {
321 std::size_t npGPIL = MAXofPostStepLoops-np-1;
322 if( (*fSelectedPostStepDoItVector)[npGPIL] == G4ForceCondition::Forced )
323 {
324 ++npt;
325 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
326 G4cout << " " << npt << ") "
327 << ptProcManager->GetProcessName()
328 << " (Forced)" << G4endl;
329 }
330 else if ( (*fSelectedPostStepDoItVector)[npGPIL] == G4ForceCondition::NotForced )
331 {
332 ++npt;
333 ptProcManager = (*fPostStepDoItVector)[(G4int)np];
334 G4cout << " " << npt << ") " << ptProcManager->GetProcessName()
335 << G4endl;
336 }
337 }
338
339 ShowStep();
340 G4cout << G4endl;
341 G4cout << " ++List of secondaries generated "
342 << "(x,y,z,kE,t,PID):"
343 << " No. of secondaries = "
344 << (*fSecondary).size() << G4endl;
345 G4cout << " [Note]Secondaries from AlongStepDoIt included."
346 << G4endl;
347
348 if((*fSecondary).size()>0)
349 {
350 for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
351 {
352 G4cout << " "
353 << std::setw( 9)
354 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
355 << " " << std::setw( 9)
356 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
357 << " " << std::setw( 9)
358 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
359 << " " << std::setw( 9)
360 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
361 << " " << std::setw( 9)
362 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
363 << " " << std::setw(18)
364 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
365 << G4endl;
366 }
367 }
368 }
369 }
370}
@ fPostStepDoItProc
Definition: G4StepStatus.hh:49
G4SelectedPostStepDoItVector * fSelectedPostStepDoItVector
std::size_t MAXofPostStepLoops

◆ PostStepDoItOneByOne()

void G4SteppingVerboseWithUnits::PostStepDoItOneByOne ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 517 of file G4SteppingVerboseWithUnits.cc.

518{
519 CopyState();
520
521 if(verboseLevel >= 4)
522 {
523 G4cout << G4endl;
524 G4cout << " >>PostStepDoIt (process by process): "
525 << " Process Name = "
527
528 ShowStep();
529 G4cout << G4endl;
531 G4cout << G4endl;
532
533 G4cout << " ++List of secondaries generated "
534 << "(x,y,z,kE,t,PID):"
535 << " No. of secondaries = "
537
539 {
540 for(std::size_t lp1=(*fSecondary).size()-fN2ndariesPostStepDoIt;
541 lp1<(*fSecondary).size(); ++lp1)
542 {
543 G4cout << " "
544 << std::setw( 9)
545 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
546 << " " << std::setw( 9)
547 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
548 << " " << std::setw( 9)
549 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
550 << " " << std::setw( 9)
551 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
552 << " " << std::setw( 9)
553 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
554 << " " << std::setw(18)
555 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
556 << G4endl;
557 }
558 }
559 }
560}

◆ SetManager()

void G4SteppingVerboseWithUnits::SetManager ( G4SteppingManager * const  fMan)
overridevirtual

Reimplemented from G4VSteppingVerbose.

Definition at line 60 of file G4SteppingVerboseWithUnits.cc.

61{
62 fManager = fMan;
63 fmessenger = new G4GenericMessenger(this,"/tracking/",
64 "precision of verbose output");
65 auto& cmd = fmessenger->DeclareProperty("setVerbosePrecision",fprec,
66 "set precision of verbose output");
68}
@ G4State_Idle
@ G4State_PreInit
Command & DeclareProperty(const G4String &name, const G4AnyType &variable, const G4String &doc="")
G4SteppingManager * fManager
Command & SetStates(G4ApplicationState s0)

◆ ShowStep()

void G4SteppingVerboseWithUnits::ShowStep ( ) const
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 693 of file G4SteppingVerboseWithUnits.cc.

694{
695 // Show header
696 G4cout << G4endl;
697 G4cout << " ++G4Step Information " << G4endl;
698 G4long oldprc = G4cout.precision(fprec);
699
700 // Show G4Step specific information
701 G4cout << " Address of G4Track : "
702 << fStep->GetTrack() << G4endl;
703 G4cout << " Step Length : "
704 << G4BestUnit(fStep->GetTrack()->GetStepLength(), "Length") << G4endl;
705 G4cout << " Energy Deposit : "
706 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << G4endl;
707
708 // Show G4StepPoint specific information
709 G4cout << " -------------------------------------------------------"
710 << "----------------" << G4endl;
711 G4cout << " StepPoint Information "
712 << std::setw(20) << "PreStep" << std::setw(20) << "PostStep" << G4endl;
713 G4cout << " -------------------------------------------------------"
714 << "----------------" << G4endl;
715 G4cout << " Position - x : "
716 << std::setw(17)
717 << G4BestUnit(fStep->GetPreStepPoint()->GetPosition().x(), "Length")
718 << std::setw(17)
719 << G4BestUnit(fStep->GetPostStepPoint()->GetPosition().x(), "Length")
720 << G4endl;
721 G4cout << " Position - y : "
722 << std::setw(17)
723 << G4BestUnit(fStep->GetPreStepPoint()->GetPosition().y(), "Length")
724 << std::setw(17)
725 << G4BestUnit(fStep->GetPostStepPoint()->GetPosition().y(), "Length")
726 << G4endl;
727 G4cout << " Position - z : "
728 << std::setw(17)
729 << G4BestUnit(fStep->GetPreStepPoint()->GetPosition().z(), "Length")
730 << std::setw(17)
731 << G4BestUnit(fStep->GetPostStepPoint()->GetPosition().z(), "Length")
732 << G4endl;
733 G4cout << " Global Time : "
734 << std::setw(17)
736 << std::setw(17)
738 << G4endl;
739 G4cout << " Local Time : "
740 << std::setw(17)
742 << std::setw(17)
744 << G4endl;
745 G4cout << " Proper Time : "
746 << std::setw(17)
748 << std::setw(17)
750 << G4endl;
751 G4cout << " Momentum Direct - x : "
752 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
753 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x()
754 << G4endl;
755 G4cout << " Momentum Direct - y : "
756 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
757 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y()
758 << G4endl;
759 G4cout << " Momentum Direct - z : "
760 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
761 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z()
762 << G4endl;
763 G4cout << " Momentum - x : "
764 << std::setw(14)
765 << G4BestUnit(fStep->GetPreStepPoint()->GetMomentum().x(),"Momentum")
766 << std::setw(14)
767 << G4BestUnit(fStep->GetPostStepPoint()->GetMomentum().x(),"Momentum")
768 << G4endl;
769 G4cout << " Momentum - y : "
770 << std::setw(14)
771 << G4BestUnit(fStep->GetPreStepPoint()->GetMomentum().y(),"Momentum")
772 << std::setw(14)
773 << G4BestUnit(fStep->GetPostStepPoint()->GetMomentum().y(),"Momentum")
774 << G4endl;
775 G4cout << " Momentum - z : "
776 << std::setw(14)
777 << G4BestUnit(fStep->GetPreStepPoint()->GetMomentum().z(),"Momentum")
778 << std::setw(14)
779 << G4BestUnit(fStep->GetPostStepPoint()->GetMomentum().z(),"Momentum")
780 << G4endl;
781 G4cout << " Total Energy : "
782 << std::setw(16)
784 << std::setw(16)
786 << G4endl;
787 G4cout << " Kinetic Energy : "
788 << std::setw(16)
790 << std::setw(16)
792 << G4endl;
793 G4cout << " Velocity : "
794 << std::setw(14)
795 << G4BestUnit(fStep->GetPreStepPoint()->GetVelocity(),"Velocity")
796 << std::setw(14)
797 << G4BestUnit(fStep->GetPostStepPoint()->GetVelocity(),"Velocity")
798 << G4endl;
799 G4cout << " Volume Name : "
800 << std::setw(20)
802 G4String volName = "OutOfWorld";
805 G4cout << std::setw(20) << volName
806 << G4endl;
807 G4cout << " Safety : "
808 << std::setw(17)
809 << G4BestUnit(fStep->GetPreStepPoint()->GetSafety(),"Length")
810 << std::setw(17)
811 << G4BestUnit(fStep->GetPostStepPoint()->GetSafety(),"Length")
812 << G4endl;
813 G4cout << " Polarization - x : "
814 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
815 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().x()
816 << G4endl;
817 G4cout << " Polarization - y : "
818 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
819 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().y()
820 << G4endl;
821 G4cout << " Polarization - Z : "
822 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
823 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().z()
824 << G4endl;
825 G4cout << " Weight : "
826 << std::setw(20) << fStep->GetPreStepPoint()->GetWeight()
827 << std::setw(20) << fStep->GetPostStepPoint()->GetWeight()
828 << G4endl;
829 G4cout << " Step Status : " ;
831 if( tStepStatus == fGeomBoundary )
832 {
833 G4cout << std::setw(20) << "Geom Limit";
834 }
835 else if ( tStepStatus == fAlongStepDoItProc )
836 {
837 G4cout << std::setw(20) << "AlongStep Proc.";
838 }
839 else if ( tStepStatus == fPostStepDoItProc )
840 {
841 G4cout << std::setw(20) << "PostStep Proc";
842 }
843 else if ( tStepStatus == fAtRestDoItProc )
844 {
845 G4cout << std::setw(20) << "AtRest Proc";
846 }
847 else if ( tStepStatus == fUndefined )
848 {
849 G4cout << std::setw(20) << "Undefined";
850 }
851
852 tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
853 if( tStepStatus == fGeomBoundary )
854 {
855 G4cout << std::setw(20) << "Geom Limit";
856 }
857 else if ( tStepStatus == fAlongStepDoItProc )
858 {
859 G4cout << std::setw(20) << "AlongStep Proc.";
860 }
861 else if ( tStepStatus == fPostStepDoItProc )
862 {
863 G4cout << std::setw(20) << "PostStep Proc";
864 }
865 else if ( tStepStatus == fAtRestDoItProc )
866 {
867 G4cout << std::setw(20) << "AtRest Proc";
868 }
869 else if ( tStepStatus == fUndefined )
870 {
871 G4cout << std::setw(20) << "Undefined";
872 }
873
874 G4cout << G4endl;
875 G4cout << " Process defined Step: " ;
877 {
878 G4cout << std::setw(20) << "Undefined";
879 }
880 else
881 {
882 G4cout << std::setw(20)
885 }
887 {
888 G4cout << std::setw(20) << "Undefined";
889 }
890 else
891 {
892 G4cout << std::setw(20)
895 }
896 G4cout.precision(oldprc);
897
898 G4cout << G4endl;
899 G4cout << " -------------------------------------------------------"
900 << "----------------" << G4endl;
901}
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
const G4VProcess * GetProcessDefinedStep() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetPosition() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetLocalTime() const
G4VPhysicalVolume * GetPhysicalVolume() const
const G4ThreeVector & GetPolarization() const
G4double GetKineticEnergy() const
G4double GetWeight() const
G4Track * GetTrack() const
G4StepPoint * GetPreStepPoint() const
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
G4double GetStepLength() const
const G4String & GetName() const

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

◆ StepInfo()

void G4SteppingVerboseWithUnits::StepInfo ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 108 of file G4SteppingVerboseWithUnits.cc.

109{
110 CopyState();
111 G4long oldprec = G4cout.precision(fprec);
112
113 if( verboseLevel >= 1 )
114 {
115 if( verboseLevel >= 4 ) VerboseTrack();
116 if( verboseLevel >= 3 )
117 {
118 G4cout << G4endl;
119 G4cout << std::setw(5) << "#Step#" << " "
120 << std::setw(fprec+3) << "X" << " "
121 << std::setw(fprec+3) << "Y" << " "
122 << std::setw(fprec+3) << "Z" << " "
123 << std::setw(fprec+6) << "KineE" << " "
124 << std::setw(fprec+10) << "dEStep" << " "
125 << std::setw(fprec+7) << "StepLeng"
126 << std::setw(fprec+7) << "TrakLeng"
127 << std::setw(10) << "Volume" << " "
128 << std::setw(10) << "Process" << G4endl;
129 }
130
131 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
132 << std::setw(fprec+3) << G4BestUnit(fTrack->GetPosition().x(),"Length")
133 << std::setw(fprec+3) << G4BestUnit(fTrack->GetPosition().y(),"Length")
134 << std::setw(fprec+3) << G4BestUnit(fTrack->GetPosition().z(),"Length")
135 << std::setw(fprec+3) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
136 << std::setw(fprec+7) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
137 << std::setw(fprec+3) << G4BestUnit(fStep->GetStepLength(),"Length")
138 << std::setw(fprec+3) << G4BestUnit(fTrack->GetTrackLength(),"Length")
139 << std::setw(10) << fTrack->GetVolume()->GetName();
140
141 const G4VProcess* process
143 G4String procName = " UserLimit";
144 if (process != nullptr) procName = process->GetProcessName();
145 if (fStepStatus == fWorldBoundary) procName = "OutOfWorld";
146 G4cout << " " << std::setw( 9) << procName;
147 G4cout << G4endl;
148
149 if (verboseLevel == 2)
150 {
151 const std::vector<const G4Track*>* secondary
153 std::size_t nbtrk = (*secondary).size();
154 if (nbtrk)
155 {
156 G4cout << "\n :----- List of secondaries ----------------" << G4endl;
157 G4cout.precision(4);
158 for (std::size_t lp=0; lp<(*secondary).size(); ++lp)
159 {
160 G4cout << " "
161 << std::setw(13)
162 << (*secondary)[lp]->GetDefinition()->GetParticleName()
163 << ": energy ="
164 << std::setw(6)
165 << G4BestUnit((*secondary)[lp]->GetKineticEnergy(),"Energy")
166 << " time ="
167 << std::setw(6)
168 << G4BestUnit((*secondary)[lp]->GetGlobalTime(),"Time");
169 G4cout << G4endl;
170 }
171
172 G4cout << " :------------------------------------------\n" << G4endl;
173 }
174 }
175 }
176 G4cout.precision(oldprec);
177}
@ fWorldBoundary
Definition: G4StepStatus.hh:41
const std::vector< const G4Track * > * GetSecondaryInCurrentStep() const
Definition: G4Step.cc:202
G4double GetStepLength() const
G4VPhysicalVolume * GetVolume() const
const G4ThreeVector & GetPosition() const
G4double GetTrackLength() const
G4int GetCurrentStepNumber() const
G4double GetKineticEnergy() const

◆ TrackingStarted()

void G4SteppingVerboseWithUnits::TrackingStarted ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 72 of file G4SteppingVerboseWithUnits.cc.

73{
74 CopyState();
75 G4long oldprec = G4cout.precision(fprec);
76
77 // Step zero
78 //
79 if( verboseLevel > 0 )
80 {
81 G4cout << std::setw( 5) << "Step#" << " "
82 << std::setw(fprec+3) << "X" << " "
83 << std::setw(fprec+3) << "Y" << " "
84 << std::setw(fprec+3) << "Z" << " "
85 << std::setw(fprec+6) << "KineE" << " "
86 << std::setw(fprec+10) << "dEStep" << " "
87 << std::setw(fprec+7) << "StepLeng"
88 << std::setw(fprec+7) << "TrakLeng"
89 << std::setw( 10) << "Volume" << " "
90 << std::setw( 10) << "Process" << G4endl;
91
92 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
93 << std::setw(fprec+3) << G4BestUnit(fTrack->GetPosition().x(),"Length")
94 << std::setw(fprec+3) << G4BestUnit(fTrack->GetPosition().y(),"Length")
95 << std::setw(fprec+3) << G4BestUnit(fTrack->GetPosition().z(),"Length")
96 << std::setw(fprec+3) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
97 << std::setw(fprec+7) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
98 << std::setw(fprec+3) << G4BestUnit(fStep->GetStepLength(),"Length")
99 << std::setw(fprec+3) << G4BestUnit(fTrack->GetTrackLength(),"Length")
100 << std::setw(10) << fTrack->GetVolume()->GetName()
101 << std::setw( 9) << " initStep" << G4endl;
102 }
103 G4cout.precision(oldprec);
104}

◆ VerboseParticleChange()

void G4SteppingVerboseWithUnits::VerboseParticleChange ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 684 of file G4SteppingVerboseWithUnits.cc.

685{
686 G4cout << G4endl;
687 G4cout << " ++G4ParticleChange Information " << G4endl;
689}
virtual void DumpInfo() const
G4VParticleChange * fParticleChange

Referenced by AlongStepDoItOneByOne(), and PostStepDoItOneByOne().

◆ VerboseTrack()

void G4SteppingVerboseWithUnits::VerboseTrack ( )
overridevirtual

Reimplemented from G4SteppingVerbose.

Definition at line 564 of file G4SteppingVerboseWithUnits.cc.

565{
566 CopyState();
567
568 G4cout << G4endl;
569 G4cout << " ++G4Track Information " << G4endl;
570 G4long oldprec = G4cout.precision(fprec);
571
572
573 G4cout << " -----------------------------------------------" << G4endl;
574 G4cout << " G4Track Information " << std::setw(20) << G4endl;
575 G4cout << " -----------------------------------------------" << G4endl;
576
577 G4cout << " Step number : "
578 << std::setw(20) << fTrack->GetCurrentStepNumber() << G4endl;
579 G4cout << " Position - x : "
580 << std::setw(20) << G4BestUnit(fTrack->GetPosition().x(), "Length")
581 << G4endl;
582 G4cout << " Position - y : "
583 << std::setw(20) << G4BestUnit(fTrack->GetPosition().y(), "Length")
584 << G4endl;
585 G4cout << " Position - z : "
586 << std::setw(20) << G4BestUnit(fTrack->GetPosition().z(), "Length")
587 << G4endl;
588 G4cout << " Global Time : "
589 << std::setw(20) << G4BestUnit(fTrack->GetGlobalTime(), "Time")
590 << G4endl;
591 G4cout << " Local Time : "
592 << std::setw(20) << G4BestUnit(fTrack->GetLocalTime(), "Time")
593 << G4endl;
594 G4cout << " Momentum Direct - x : "
595 << std::setw(20) << fTrack->GetMomentumDirection().x()
596 << G4endl;
597 G4cout << " Momentum Direct - y : "
598 << std::setw(20) << fTrack->GetMomentumDirection().y()
599 << G4endl;
600 G4cout << " Momentum Direct - z : "
601 << std::setw(20) << fTrack->GetMomentumDirection().z()
602 << G4endl;
603 G4cout << " Kinetic Energy : "
604 << std::setw(20) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
605 << G4endl;
606 G4cout << " Polarization - x : "
607 << std::setw(20) << fTrack->GetPolarization().x()
608 << G4endl;
609 G4cout << " Polarization - y : "
610 << std::setw(20) << fTrack->GetPolarization().y()
611 << G4endl;
612 G4cout << " Polarization - z : "
613 << std::setw(20) << fTrack->GetPolarization().z()
614 << G4endl;
615 G4cout << " Track Length : "
616 << std::setw(20) << G4BestUnit(fTrack->GetTrackLength(), "Length")
617 << G4endl;
618 G4cout << " Track ID # : "
619 << std::setw(20) << fTrack->GetTrackID()
620 << G4endl;
621 G4cout << " Parent Track ID # : "
622 << std::setw(20) << fTrack->GetParentID()
623 << G4endl;
624 G4cout << " Next Volume : "
625 << std::setw(20);
626 if (fTrack->GetNextVolume() != 0)
627 G4cout << fTrack->GetNextVolume()->GetName() << " ";
628 else G4cout << "OutOfWorld" << " ";
629 G4cout << G4endl;
630 G4cout << " Track Status : "
631 << std::setw(20);
632 if( fTrack->GetTrackStatus() == fAlive )
633 G4cout << " Alive";
634 else if( fTrack->GetTrackStatus() == fStopButAlive )
635 G4cout << " StopButAlive";
636 else if( fTrack->GetTrackStatus() == fStopAndKill )
637 G4cout << " StopAndKill";
639 G4cout << " KillTrackAndSecondaries";
640 else if( fTrack->GetTrackStatus() == fSuspend )
641 G4cout << " Suspend";
643 G4cout << " PostponeToNextEvent";
644 G4cout << G4endl;
645 G4cout << " Vertex - x : "
646 << std::setw(20)
647 << G4BestUnit(fTrack->GetVertexPosition().x(),"Length")
648 << G4endl;
649 G4cout << " Vertex - y : "
650 << std::setw(20)
651 << G4BestUnit(fTrack->GetVertexPosition().y(),"Length")
652 << G4endl;
653 G4cout << " Vertex - z : "
654 << std::setw(20)
655 << G4BestUnit(fTrack->GetVertexPosition().z(),"Length")
656 << G4endl;
657 G4cout << " Vertex - Px (MomDir): "
658 << std::setw(20) << fTrack->GetVertexMomentumDirection().x()
659 << G4endl;
660 G4cout << " Vertex - Py (MomDir): "
661 << std::setw(20) << fTrack->GetVertexMomentumDirection().y()
662 << G4endl;
663 G4cout << " Vertex - Pz (MomDir): "
664 << std::setw(20) << fTrack->GetVertexMomentumDirection().z()
665 << G4endl;
666 G4cout << " Vertex - KineE : "
667 << std::setw(20)
669 << G4endl;
670
671 G4cout << " Creator Process : "
672 << std::setw(20);
673 if (fTrack->GetCreatorProcess() == 0)
674 G4cout << " Event Generator" << G4endl;
675 else
677
678 G4cout << " -----------------------------------------------" << G4endl;
679 G4cout.precision(oldprec);
680}
@ fKillTrackAndSecondaries
@ fSuspend
@ fAlive
@ fStopAndKill
@ fStopButAlive
@ fPostponeToNextEvent
G4TrackStatus GetTrackStatus() const
G4double GetVertexKineticEnergy() const
G4int GetTrackID() const
const G4VProcess * GetCreatorProcess() const
G4VPhysicalVolume * GetNextVolume() const
const G4ThreeVector & GetVertexMomentumDirection() const
G4double GetGlobalTime() const
const G4ThreeVector & GetVertexPosition() const
G4double GetLocalTime() const
const G4ThreeVector & GetMomentumDirection() const
const G4ThreeVector & GetPolarization() const
G4int GetParentID() const

Referenced by StepInfo().


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