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 // G4WrapperProcess 27 // 28 // Class description: 29 // 30 // Virtual class for wrapper process objects. 31 32 // Author: H.Kurahige, 18 December 1996 33 // ------------------------------------------- 34 #ifndef G4WrapperProcess_hh 35 #define G4WrapperProcess_hh 1 36 37 #include "globals.hh" 38 #include "G4ios.hh" 39 #include "G4VProcess.hh" 40 41 class G4WrapperProcess : public G4VProcess 42 { 43 public: 44 45 G4WrapperProcess(const G4String& aName = 46 G4ProcessType aType = fNo 47 // Constructor requires the process name 48 49 G4WrapperProcess(const G4WrapperProcess& r 50 // Copy constructor copies the name but 51 // physics table (null pointer is assign 52 53 virtual ~G4WrapperProcess(); 54 // Destructor 55 56 G4WrapperProcess& operator=(const G4Wrappe 57 58 inline G4bool operator==(const G4WrapperPr 59 inline G4bool operator!=(const G4WrapperPr 60 // Equality operators 61 62 virtual void RegisterProcess(G4VProcess*); 63 virtual const G4VProcess* GetRegisteredPro 64 65 //////////////////////////// 66 // DoIt ///////////////// 67 /////////////////////////// 68 69 virtual G4VParticleChange* PostStepDoIt( 70 const G4Track& tr 71 const G4Step& st 72 ); 73 74 virtual G4VParticleChange* AlongStepDoIt( 75 const G4Track& tr 76 const G4Step& ste 77 ); 78 virtual G4VParticleChange* AtRestDoIt( 79 const G4Track& tr 80 const G4Step& ste 81 ); 82 83 ////////////////////////// 84 // GPIL ////////////// 85 ///////////////////////// 86 87 virtual G4double AlongStepGetPhysicalInter 88 const G4Track& tr 89 G4double previou 90 G4double current 91 G4double& propose 92 G4GPILSelection* 93 94 virtual G4double AtRestGetPhysicalInteract 95 const G4Track& tr 96 G4ForceCondition* 97 ); 98 99 virtual G4double PostStepGetPhysicalIntera 100 const G4Track& tr 101 G4double previo 102 G4ForceCondition* 103 ); 104 105 virtual G4bool IsApplicable(const G4Partic 106 // Returns true if this process object i 107 // the particle type 108 // Process will not be registered to a p 109 110 virtual void BuildPhysicsTable(const G4Par 111 // Messaged by the Particle definition ( 112 // whenever cross-section tables have to 113 // materials have been defined). 114 // It is overloaded by individual proces 115 // tables 116 117 // Processes which build (for example in t 118 // physics tables independent of cuts shou 119 // void BuildThePhysicsTable() function. 120 // **Not** another BuildPhysicsTable(). 121 122 virtual void PreparePhysicsTable(const G4P 123 // Messaged by the Particle definition ( 124 // whenever cross-section tables have to 125 // (i.e. if new materials have been defi 126 // It is overloaded by individual proces 127 // tables 128 129 130 virtual G4bool StorePhysicsTable(const G4P 131 const G4S 132 G4bool as 133 // Store PhysicsTable in a file. 134 // Return false in case of failure at I/ 135 136 virtual G4bool RetrievePhysicsTable( const 137 const 138 G4boo 139 // Retrieve Physics from a file. 140 // Return true if the Physics Table can 141 // Return false if the process has no fu 142 // File name should be defined by each p 143 // placed under the directory specified 144 145 virtual void StartTracking(G4Track*); 146 virtual void EndTracking(); 147 // inform Start/End of tracking for each 148 149 virtual void SetProcessManager(const G4Pro 150 // A process manager sets its own pointe 151 // in the process Manager 152 virtual const G4ProcessManager* GetProces 153 // Get the process manager which the pro 154 155 virtual void ResetNumberOfInteractionLengt 156 // Reset (determine the value of) Number 157 virtual void SetMasterProcess(G4VProcess* 158 // Needed for MT, forward call to underl 159 160 protected: 161 162 G4VProcess* pRegProcess = nullptr; 163 }; 164 165 // ------------------------ 166 // Inline operators 167 // ------------------------ 168 169 inline 170 G4bool G4WrapperProcess::operator==(const G4Wr 171 { 172 return (this == &right); 173 } 174 175 inline 176 G4bool G4WrapperProcess::operator!=(const G4Wr 177 { 178 return (this != &right); 179 } 180 181 #endif 182