Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // >> 24 // $Id: G4FastSimulationManagerProcess.hh,v 1.8 2001/07/11 10:08:23 gunter Exp $ >> 25 // GEANT4 tag $Name: geant4-07-00-patch-01 $ 27 // 26 // 28 // << 27 // 29 //-------------------------------------------- 28 //--------------------------------------------------------------- 30 // 29 // 31 // G4FastSimulationManagerProcess.hh 30 // G4FastSimulationManagerProcess.hh 32 // 31 // 33 // Description: 32 // Description: 34 // The process that triggers parameterised << 33 // The process that triggers parameterised simulations >> 34 // if any. 35 // 35 // 36 // History: 36 // History: 37 // Feb 98: Parallel geometry sensitivity. Mor 37 // Feb 98: Parallel geometry sensitivity. MoraDeFreitas. 38 // Oct 97: "Fast" replaces "Parameterisation" << 38 // Oct 97: "Fast" replaces "Parameterisation" in class/method names. 39 // (release B.00 for parameterisation 39 // (release B.00 for parameterisation). MoraDeFreitas. 40 // Aug 97: First implementation. Verderi && M 40 // Aug 97: First implementation. Verderi && MoraDeFreitas. 41 // Apr 98: modified for new particle change. 41 // Apr 98: modified for new particle change. H.Kurashige 42 // Oct 06: Move to parallel geometry scheme. << 43 // Nov 06: name xxx81 is given for this relea << 44 // removed @ next maj. rel. so that t << 45 // the standard one. << 46 // May 07: remove "81" tags, to migrate to 9. << 47 // 42 // 48 //-------------------------------------------- 43 //--------------------------------------------------------------- 49 44 50 #ifndef G4FastSimulationManagerProcess_hh << 51 #define G4FastSimulationManagerProcess_hh << 52 45 >> 46 #ifndef G4FastSimulationManagerProcess_h >> 47 #define G4FastSimulationManagerProcess_h 1 >> 48 >> 49 #include "globals.hh" >> 50 #include "G4VProcess.hh" 53 #include "G4FastSimulationManager.hh" 51 #include "G4FastSimulationManager.hh" 54 #include "G4FastSimulationProcessType.hh" << 55 #include "G4FieldTrack.hh" << 56 #include "G4Navigator.hh" << 57 #include "G4Step.hh" 52 #include "G4Step.hh" 58 #include "G4VParticleChange.hh" << 53 #include "G4Navigator.hh" >> 54 #include "G4PropagatorInField.hh" >> 55 #include "G4VTouchable.hh" >> 56 #include "G4TouchableHistory.hh" 59 #include "G4VPhysicalVolume.hh" 57 #include "G4VPhysicalVolume.hh" 60 #include "G4VProcess.hh" << 58 #include "G4VParticleChange.hh" 61 #include "globals.hh" << 62 class G4PathFinder; << 63 class G4TransportationManager; << 64 59 65 // ------------------------------------------- << 60 //------------------------------------------ 66 // 61 // 67 // G4FastSimulationManagerProcess class 62 // G4FastSimulationManagerProcess class 68 // 63 // 69 // ------------------------------------------- << 64 //------------------------------------------ >> 65 70 66 71 // Class Description: 67 // Class Description: 72 // -- G4VProcess providing the interface betwe << 68 // This is a G4VProcess. It provides the interface between the tracking and the parameterisation. >> 69 // It has to be set in the process list of the particles you want to parameterise. 73 // 70 // 74 71 75 class G4FastSimulationManagerProcess : public 72 class G4FastSimulationManagerProcess : public G4VProcess 76 { 73 { 77 public: << 74 public: 78 // Constructor for parameterisation in mas << 75 79 G4FastSimulationManagerProcess(const G4Str << 76 //------------------------ 80 G4ProcessTy << 77 // Constructor/Destructor 81 << 78 //------------------------ 82 // -- Contructors for parameterisation att << 79 83 // -- Can also be used for the mass geomet << 80 G4FastSimulationManagerProcess(const G4String& 84 // -- World volume specified by name or po << 81 processName = 85 G4FastSimulationManagerProcess(const G4Str << 82 "G4FastSimulationManagerProcess", 86 G4ProcessTy << 83 G4ProcessType 87 G4FastSimulationManagerProcess(const G4Str << 84 theType = fParameterisation); 88 G4ProcessTy << 85 virtual ~G4FastSimulationManagerProcess(); 89 << 86 90 ~G4FastSimulationManagerProcess() override << 87 //-------------------------------------------------------------- 91 << 88 // Process interface 92 // ----------------------- << 89 //-------------------------------------------------------------- 93 // User access methods: << 90 94 // ----------------------- << 91 void StartTracking(); 95 G4VPhysicalVolume* GetWorldVolume() const << 92 96 << 93 //--------------------------------------------------- 97 // -- Set new world volume to the process << 94 // GetPhysicalInteractionLength() and DoIt() methods: 98 void SetWorldVolume(G4String); << 95 //--------------------------------------------------- 99 void SetWorldVolume(G4VPhysicalVolume*); << 96 100 << 97 G4double PostStepGetPhysicalInteractionLength(const G4Track& track, 101 // --------------------------------------- << 98 G4double previousStepSize, 102 // Process interface << 99 G4ForceCondition* condition); 103 // --------------------------------------- << 100 104 << 101 G4VParticleChange* PostStepDoIt(const G4Track& ,const G4Step& ); 105 // -- Start/End tracking: << 102 106 void StartTracking(G4Track*) override; << 103 //------------------------------------------------------------------------ 107 void EndTracking() override; << 104 // GetPhysicalInteractionLength() and DoIt() methods for AtRest particles: 108 << 105 //------------------------------------------------------------------------ 109 // -- PostStep methods: << 106 110 G4double PostStepGetPhysicalInteractionLen << 107 G4double AtRestGetPhysicalInteractionLength( 111 << 108 const G4Track& , 112 << 109 G4ForceCondition* 113 G4VParticleChange* PostStepDoIt(const G4Tr << 110 ); 114 << 111 115 // -- Responsible for limiting the step on << 112 G4VParticleChange* AtRestDoIt( 116 G4double AlongStepGetPhysicalInteractionLe << 113 const G4Track& , 117 << 114 const G4Step& 118 << 115 ); 119 << 116 120 G4VParticleChange* AlongStepDoIt(const G4T << 117 121 << 118 // -- no operation in AlongStepDoIt -- 122 // -- AtRest methods (still there after ma << 119 G4double AlongStepGetPhysicalInteractionLength( 123 G4double AtRestGetPhysicalInteractionLengt << 120 const G4Track&, 124 << 121 G4double , 125 G4VParticleChange* AtRestDoIt(const G4Trac << 122 G4double , 126 << 123 G4double&, 127 // -- debug: << 124 G4GPILSelection* 128 [[deprecated("obsolete: will be remove in << 125 ); 129 << 126 G4VParticleChange* AlongStepDoIt( 130 private: << 127 const G4Track& , 131 //-- would be better to my taste to have " << 128 const G4Step& 132 // at compilation << 129 ); 133 G4VPhysicalVolume* fWorldVolume; << 130 134 << 131 135 G4bool fIsTrackingTime; << 132 private: 136 G4bool fIsFirstStep; << 133 // When trigged, the *fFastSimulationManager holds 137 G4Navigator* fGhostNavigator; << 134 // the pointer used to call the DoIt() method. 138 G4int fGhostNavigatorIndex; << 135 G4FastSimulationManager* fFastSimulationManager; 139 G4bool fIsGhostGeometry; << 136 G4bool fFastSimulationTrigger; 140 G4double fGhostSafety; << 137 // this G4VParticleChange is used only when the safety limites the Step. 141 G4FieldTrack fFieldTrack; << 138 G4VParticleChange aDummyParticleChange; 142 << 139 G4ParticleChange xParticleChange; 143 G4FastSimulationManager* fFastSimulationMa << 140 144 G4bool fFastSimulationTrigger; << 141 // Flags that the track is starting 145 G4VParticleChange fDummyParticleChange; << 142 G4bool fStartTracking; 146 G4PathFinder* fPathFinder; << 143 147 G4TransportationManager* fTransportationMa << 144 // ------------------------------- >> 145 // Navigation in the Ghost World: >> 146 // ------------------------------- >> 147 // Current parallel "ghost" world, related Navigator >> 148 // and touchable history: >> 149 G4VPhysicalVolume* fGhostWorld; >> 150 G4Navigator fGhostNavigator; >> 151 G4TouchableHistory* fGhostTouchable; >> 152 G4bool fUpdateGhostTouchable; >> 153 G4bool fOutOfGhostWorld; >> 154 // Isotropic safety value to the next ghost volume >> 155 // and allowed Step length: >> 156 G4double fGhostSafety, >> 157 fGhostStepLength; >> 158 // Navigation with field: >> 159 G4PropagatorInField* fGhostFieldPropagator; >> 160 G4double fParticleCharge; >> 161 G4bool fFieldExertsForce; >> 162 >> 163 // Tracking Navigation used in PostStep, in case of mag-field: >> 164 G4Navigator fTrackingNavigator; >> 165 G4TouchableHistory fTrackingHistory; >> 166 >> 167 // ****************************************************** >> 168 // ****************************************************** >> 169 // >> 170 // For TESTS: >> 171 // >> 172 // ****************************************************** >> 173 // ****************************************************** >> 174 public: >> 175 G4double GetPreSafety() {return fPreSafety;} >> 176 G4double GetPreLinearSafety() {return fPreLinearSafety;} >> 177 G4double GetSafety() {return fGhostSafety;} >> 178 G4double GetLinearSafety() {return fGhostStepLength;} >> 179 void Verbose() const; >> 180 private: >> 181 G4double fPreSafety, fPreLinearSafety; 148 }; 182 }; 149 183 150 #endif 184 #endif 151 185