MCPcopy Create free account
hub / github.com/Geant4/geant4 / ProcessOneTrack

Method ProcessOneTrack

source/tracking/src/G4TrackingManager.cc:59–156  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

57
58////////////////////////////////////////////////////////////////
59void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
60////////////////////////////////////////////////////////////////
61{
62 // Receiving a G4Track from the EventManager, this funciton has the
63 // responsibility to trace the track till it stops
64
65 fpTrack = apValueG4Track;
66 EventIsAborted = false;
67
68 // Clear secondary particle vector
69 //
70 for (auto& itr : *GimmeSecondaries()) {
71 delete itr;
72 }
73 GimmeSecondaries()->clear();
74
75 if (verboseLevel > 0 && (G4VSteppingVerbose::GetSilent() != 1)) TrackBanner();
76
77 // Give SteppingManger the pointer to the track which will be tracked
78 //
79 fpSteppingManager->SetInitialStep(fpTrack);
80
81 // Pre tracking user intervention process
82
83 fpTrajectory = nullptr;
84 if (fpUserTrackingAction != nullptr) {
85 fpUserTrackingAction->PreUserTrackingAction(fpTrack);
86 }
87
88 // we need this to scope the G4Track::ProfilerConfig b/t
89 // the PreUserTrackingAction and PostUserTrackingAction
90 {
91#ifdef G4_STORE_TRAJECTORY
92 // Construct a trajectory if it is requested
93 //
94 if ((StoreTrajectory != 0) && (fpTrajectory == nullptr)) {
95 // default trajectory concrete class object
96 switch (StoreTrajectory) {
97 default:
98 case 1:
99 fpTrajectory = new G4Trajectory(fpTrack);
100 break;
101 case 2:
102 fpTrajectory = new G4SmoothTrajectory(fpTrack);
103 break;
104 case 3:
105 fpTrajectory = new G4RichTrajectory(fpTrack);
106 break;
107 case 4:
108 fpTrajectory = new G4RichTrajectory(fpTrack);
109 break;
110 }
111 }
112#endif
113
114 // Give SteppingManger the maxmimum number of processes
115 fpSteppingManager->GetProcessNumber();
116

Callers 2

DoProcessingMethod · 0.80
HandOverOneTrackMethod · 0.80

Calls 15

GetProcessNumberMethod · 0.80
SetStepMethod · 0.80
GetTrackStatusMethod · 0.80
clearMethod · 0.45
SetInitialStepMethod · 0.45
PreUserTrackingActionMethod · 0.45
GetStepMethod · 0.45
StartTrackingMethod · 0.45
GetProcessManagerMethod · 0.45
GetDefinitionMethod · 0.45
SteppingMethod · 0.45
AppendStepMethod · 0.45

Tested by 1

HandOverOneTrackMethod · 0.64