///////////////////////////////////////////////////////////
| 57 | |
| 58 | //////////////////////////////////////////////////////////////// |
| 59 | void 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 |