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