Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // Author: Mathieu Karamitros (kara (AT) cenbg 28 // 29 // History: 30 // ----------- 31 // 10 Oct 2011 M.Karamitros created 32 // 33 // ------------------------------------------- 34 35 #include "G4ITTrackingManager.hh" 36 #include "G4Track.hh" 37 #include "G4ProcessManager.hh" 38 #include "G4IT.hh" 39 #include "G4TrackingInformation.hh" 40 #include "G4ITTrackingInteractivity.hh" 41 #include "G4VITSteppingVerbose.hh" 42 #include "G4ITTrackHolder.hh" 43 44 G4ITTrackingManager::G4ITTrackingManager() 45 { 46 fpTrackingInteractivity = nullptr; 47 } 48 //____________________________________________ 49 //void G4ITTrackingManager::Initialize() 50 //{ 51 // if(fpTrackingInteractivity) fpTrackingIn 52 //} 53 //____________________________________________ 54 G4ITTrackingManager::~G4ITTrackingManager() 55 { 56 delete fpTrackingInteractivity; 57 } 58 //____________________________________________ 59 void G4ITTrackingManager::StartTracking(G4Trac 60 { 61 if (fpTrackingInteractivity != nullptr) 62 { 63 fpTrackingInteractivity->StartTracking(tra 64 #ifdef G4VERBOSE 65 fpTrackingInteractivity->GetSteppingVerbos 66 #endif 67 } 68 69 // Inform beginning of tracking to physics p 70 track->GetDefinition()->GetProcessManager()- 71 } 72 //____________________________________________ 73 void G4ITTrackingManager::AppendStep(G4Track* 74 { 75 if (fpTrackingInteractivity != nullptr) fpTr 76 } 77 78 //____________________________________________ 79 void G4ITTrackingManager::SetInteractivity(G4I 80 { 81 if ((fpTrackingInteractivity != nullptr) && 82 { 83 delete fpTrackingInteractivity; 84 } 85 fpTrackingInteractivity = iteractivity; 86 } 87 88 //____________________________________________ 89 void G4ITTrackingManager::EndTracking(G4Track* 90 { 91 if (fpTrackingInteractivity != nullptr) 92 { 93 fpTrackingInteractivity->EndTracking(track 94 #ifdef G4VERBOSE 95 fpTrackingInteractivity->GetSteppingVerbos 96 #endif 97 } 98 99 G4ITTrackHolder::Instance()->PushToKill(trac 100 } 101 102 void G4ITTrackingManager::EndTrackingWOKill(G4 103 { 104 if (fpTrackingInteractivity != nullptr) 105 { 106 fpTrackingInteractivity->EndTracking(track 107 #ifdef G4VERBOSE 108 fpTrackingInteractivity->GetSteppingVerbos 109 #endif 110 } 111 } 112