Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // 26 // >> 27 // $Id: G4FastSimulationManagerProcess.hh,v 1.14 2007/05/11 13:50:20 mverderi Exp $ >> 28 // GEANT4 tag $Name: geant4-09-00 $ 27 // 29 // 28 // << 30 // 29 //-------------------------------------------- 31 //--------------------------------------------------------------- 30 // 32 // 31 // G4FastSimulationManagerProcess.hh 33 // G4FastSimulationManagerProcess.hh 32 // 34 // 33 // Description: 35 // Description: 34 // The process that triggers parameterised 36 // The process that triggers parameterised simulations if any. 35 // 37 // 36 // History: 38 // History: 37 // Feb 98: Parallel geometry sensitivity. Mor 39 // Feb 98: Parallel geometry sensitivity. MoraDeFreitas. 38 // Oct 97: "Fast" replaces "Parameterisation" << 40 // Oct 97: "Fast" replaces "Parameterisation" in class/method names. 39 // (release B.00 for parameterisation 41 // (release B.00 for parameterisation). MoraDeFreitas. 40 // Aug 97: First implementation. Verderi && M 42 // Aug 97: First implementation. Verderi && MoraDeFreitas. 41 // Apr 98: modified for new particle change. 43 // Apr 98: modified for new particle change. H.Kurashige 42 // Oct 06: Move to parallel geometry scheme. 44 // Oct 06: Move to parallel geometry scheme. M. Verderi 43 // Nov 06: name xxx81 is given for this relea 45 // Nov 06: name xxx81 is given for this release. "81" will be 44 // removed @ next maj. rel. so that t 46 // removed @ next maj. rel. so that this process becomes 45 // the standard one. 47 // the standard one. 46 // May 07: remove "81" tags, to migrate to 9. 48 // May 07: remove "81" tags, to migrate to 9.0. 47 // 49 // 48 //-------------------------------------------- 50 //--------------------------------------------------------------- 49 51 >> 52 50 #ifndef G4FastSimulationManagerProcess_hh 53 #ifndef G4FastSimulationManagerProcess_hh 51 #define G4FastSimulationManagerProcess_hh 54 #define G4FastSimulationManagerProcess_hh 52 55 >> 56 #include "globals.hh" >> 57 #include "G4VProcess.hh" 53 #include "G4FastSimulationManager.hh" 58 #include "G4FastSimulationManager.hh" 54 #include "G4FastSimulationProcessType.hh" << 55 #include "G4FieldTrack.hh" << 56 #include "G4Navigator.hh" << 57 #include "G4Step.hh" 59 #include "G4Step.hh" 58 #include "G4VParticleChange.hh" << 60 #include "G4Navigator.hh" 59 #include "G4VPhysicalVolume.hh" 61 #include "G4VPhysicalVolume.hh" 60 #include "G4VProcess.hh" << 62 #include "G4VParticleChange.hh" 61 #include "globals.hh" << 63 62 class G4PathFinder; << 63 class G4TransportationManager; << 64 64 65 // ------------------------------------------- 65 // --------------------------------------------------------------------- 66 // 66 // 67 // G4FastSimulationManagerProcess class 67 // G4FastSimulationManagerProcess class 68 // 68 // 69 // ------------------------------------------- 69 // --------------------------------------------------------------------- 70 70 >> 71 71 // Class Description: 72 // Class Description: 72 // -- G4VProcess providing the interface betwe 73 // -- G4VProcess providing the interface between the tracking and the fast simulation. 73 // 74 // 74 75 75 class G4FastSimulationManagerProcess : public 76 class G4FastSimulationManagerProcess : public G4VProcess 76 { 77 { 77 public: << 78 public: 78 // Constructor for parameterisation in mas << 79 79 G4FastSimulationManagerProcess(const G4Str << 80 // ------------------------- 80 G4ProcessTy << 81 // Constructor/Destructor: 81 << 82 // ------------------------- 82 // -- Contructors for parameterisation att << 83 // -- Constructor for parameterisation in mass geometry 83 // -- Can also be used for the mass geomet << 84 G4FastSimulationManagerProcess(const G4String& processName = "G4FastSimulationManagerProcess", 84 // -- World volume specified by name or po << 85 G4ProcessType theType = fParameterisation); 85 G4FastSimulationManagerProcess(const G4Str << 86 86 G4ProcessTy << 87 // -- Contructors for parameterisation attached a parallel geometry. 87 G4FastSimulationManagerProcess(const G4Str << 88 // -- Can also be used for the mass geometry, providing world volume name. 88 G4ProcessTy << 89 // -- World volume specified by name or pointer. 89 << 90 G4FastSimulationManagerProcess(const G4String& processName, 90 ~G4FastSimulationManagerProcess() override << 91 const G4String& worldVolumeName, 91 << 92 G4ProcessType theType = fParameterisation); 92 // ----------------------- << 93 G4FastSimulationManagerProcess(const G4String& processName, 93 // User access methods: << 94 G4VPhysicalVolume* worldVolume, 94 // ----------------------- << 95 G4ProcessType theType = fParameterisation); 95 G4VPhysicalVolume* GetWorldVolume() const << 96 96 << 97 virtual ~G4FastSimulationManagerProcess(); 97 // -- Set new world volume to the process << 98 98 void SetWorldVolume(G4String); << 99 // ----------------------- 99 void SetWorldVolume(G4VPhysicalVolume*); << 100 // User access methods: 100 << 101 // ----------------------- 101 // --------------------------------------- << 102 G4VPhysicalVolume* GetWorldVolume() const {return fWorldVolume;} 102 // Process interface << 103 103 // --------------------------------------- << 104 // -- Set new world volume to the process 104 << 105 void SetWorldVolume(G4String ); 105 // -- Start/End tracking: << 106 void SetWorldVolume(G4VPhysicalVolume*); 106 void StartTracking(G4Track*) override; << 107 107 void EndTracking() override; << 108 108 << 109 // -------------------------------------------------------------- 109 // -- PostStep methods: << 110 // Process interface 110 G4double PostStepGetPhysicalInteractionLen << 111 // -------------------------------------------------------------- 111 << 112 112 << 113 // -- Start/End tracking: 113 G4VParticleChange* PostStepDoIt(const G4Tr << 114 void StartTracking(G4Track*); 114 << 115 void EndTracking(); 115 // -- Responsible for limiting the step on << 116 116 G4double AlongStepGetPhysicalInteractionLe << 117 // -- PostStep methods: 117 << 118 G4double PostStepGetPhysicalInteractionLength(const G4Track& track, 118 << 119 G4double previousStepSize, 119 << 120 G4ForceCondition* condition); 120 G4VParticleChange* AlongStepDoIt(const G4T << 121 121 << 122 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& ); 122 // -- AtRest methods (still there after ma << 123 123 G4double AtRestGetPhysicalInteractionLengt << 124 124 << 125 125 G4VParticleChange* AtRestDoIt(const G4Trac << 126 126 << 127 127 // -- debug: << 128 128 [[deprecated("obsolete: will be remove in << 129 // -- AtRest methods (still there after many years of no use...): 129 << 130 G4double AtRestGetPhysicalInteractionLength(const G4Track&, 130 private: << 131 G4ForceCondition*); 131 //-- would be better to my taste to have " << 132 132 // at compilation << 133 G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&); 133 G4VPhysicalVolume* fWorldVolume; << 134 134 << 135 135 G4bool fIsTrackingTime; << 136 // -- unused: 136 G4bool fIsFirstStep; << 137 G4double AlongStepGetPhysicalInteractionLength(const G4Track&, G4double, G4double, G4double&, G4GPILSelection*) {return 0.0;} 137 G4Navigator* fGhostNavigator; << 138 G4VParticleChange* AlongStepDoIt(const G4Track& , const G4Step&) {return 0;} 138 G4int fGhostNavigatorIndex; << 139 139 G4bool fIsGhostGeometry; << 140 140 G4double fGhostSafety; << 141 // -- debug: 141 G4FieldTrack fFieldTrack; << 142 void Verbose() const; 142 << 143 143 G4FastSimulationManager* fFastSimulationMa << 144 144 G4bool fFastSimulationTrigger; << 145 private: 145 G4VParticleChange fDummyParticleChange; << 146 //-- would be better to my taste to have "const G4VPhysicalVolume* fWorldVolume;", but clashes at compilation 146 G4PathFinder* fPathFinder; << 147 G4VPhysicalVolume* fWorldVolume; 147 G4TransportationManager* fTransportationMa << 148 >> 149 G4bool fIsTrackingTime; >> 150 G4bool fIsFirstStep; >> 151 G4Navigator* fNavigator; >> 152 G4int fNavigatorIndex; >> 153 >> 154 >> 155 G4FastSimulationManager* fFastSimulationManager; >> 156 G4bool fFastSimulationTrigger; 148 }; 157 }; 149 158 150 #endif 159 #endif 151 160