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 // 27 // 28 // GEANT4 Class header file 28 // GEANT4 Class header file 29 // 29 // 30 // 30 // 31 // File name: G4LossTableManager 31 // File name: G4LossTableManager 32 // 32 // 33 // Author: Vladimir Ivanchenko on base 33 // Author: Vladimir Ivanchenko on base of G4LossTables class 34 // and Maria Grazia Pia ideas 34 // and Maria Grazia Pia ideas 35 // 35 // 36 // Creation date: 03.01.2002 36 // Creation date: 03.01.2002 37 // 37 // 38 // Modifications by V.Ivanchenko 38 // Modifications by V.Ivanchenko 39 // 39 // 40 // Class Description: 40 // Class Description: 41 // 41 // 42 // A utility static class, responsable for the 42 // A utility static class, responsable for the energy loss tables 43 // for each particle 43 // for each particle 44 // 44 // 45 // Energy loss processes have to register thei 45 // Energy loss processes have to register their tables with this 46 // class. The responsibility of creating and d 46 // class. The responsibility of creating and deleting the tables 47 // remains with the energy loss classes. 47 // remains with the energy loss classes. 48 48 49 // ------------------------------------------- 49 // ------------------------------------------------------------------- 50 // 50 // 51 51 52 #ifndef G4LossTableManager_h 52 #ifndef G4LossTableManager_h 53 #define G4LossTableManager_h 1 53 #define G4LossTableManager_h 1 54 54 55 #include <map> 55 #include <map> 56 #include <vector> 56 #include <vector> 57 #include "globals.hh" 57 #include "globals.hh" 58 #include "G4ThreadLocalSingleton.hh" 58 #include "G4ThreadLocalSingleton.hh" 59 #include "G4VEnergyLossProcess.hh" 59 #include "G4VEnergyLossProcess.hh" 60 #include "G4EmParameters.hh" 60 #include "G4EmParameters.hh" 61 61 62 class G4PhysicsTable; 62 class G4PhysicsTable; 63 class G4MaterialCutsCouple; 63 class G4MaterialCutsCouple; 64 class G4ParticleDefinition; 64 class G4ParticleDefinition; 65 class G4Region; 65 class G4Region; 66 class G4EmSaturation; 66 class G4EmSaturation; 67 class G4EmConfigurator; 67 class G4EmConfigurator; 68 class G4ElectronIonPair; 68 class G4ElectronIonPair; 69 class G4NIELCalculator; 69 class G4NIELCalculator; 70 class G4VMultipleScattering; 70 class G4VMultipleScattering; 71 class G4VEmProcess; 71 class G4VEmProcess; 72 class G4EmCorrections; 72 class G4EmCorrections; 73 class G4LossTableBuilder; 73 class G4LossTableBuilder; 74 class G4VAtomDeexcitation; 74 class G4VAtomDeexcitation; 75 class G4VSubCutProducer; 75 class G4VSubCutProducer; 76 76 77 class G4LossTableManager 77 class G4LossTableManager 78 { 78 { 79 79 80 friend class G4ThreadLocalSingleton<G4LossTabl 80 friend class G4ThreadLocalSingleton<G4LossTableManager>; 81 81 82 public: 82 public: 83 83 84 static G4LossTableManager* Instance(); 84 static G4LossTableManager* Instance(); 85 85 86 ~G4LossTableManager(); 86 ~G4LossTableManager(); 87 87 88 //------------------------------------------ 88 //------------------------------------------------- 89 // initialisation before a new run 89 // initialisation before a new run 90 //------------------------------------------ 90 //------------------------------------------------- 91 91 92 void PreparePhysicsTable(const G4ParticleDef 92 void PreparePhysicsTable(const G4ParticleDefinition* aParticle, 93 G4VEnergyLossProces 93 G4VEnergyLossProcess* p); 94 94 95 void PreparePhysicsTable(const G4ParticleDef 95 void PreparePhysicsTable(const G4ParticleDefinition* aParticle, 96 G4VEmProcess* p); 96 G4VEmProcess* p); 97 97 98 void PreparePhysicsTable(const G4ParticleDef 98 void PreparePhysicsTable(const G4ParticleDefinition* aParticle, 99 G4VMultipleScatteri 99 G4VMultipleScattering* p); 100 100 101 void BuildPhysicsTable(const G4ParticleDefin 101 void BuildPhysicsTable(const G4ParticleDefinition* aParticle); 102 102 103 void BuildPhysicsTable(const G4ParticleDefin 103 void BuildPhysicsTable(const G4ParticleDefinition* aParticle, 104 G4VEnergyLossProcess* 104 G4VEnergyLossProcess* p); 105 105 106 void LocalPhysicsTables(const G4ParticleDefi 106 void LocalPhysicsTables(const G4ParticleDefinition* aParticle, 107 G4VEnergyLossProcess 107 G4VEnergyLossProcess* p); 108 108 109 void DumpHtml(); 109 void DumpHtml(); 110 110 111 //------------------------------------------ 111 //------------------------------------------------- 112 // Run time access to DEDX, range, energy fo 112 // Run time access to DEDX, range, energy for a given particle, 113 // energy, and G4MaterialCutsCouple 113 // energy, and G4MaterialCutsCouple 114 //------------------------------------------ 114 //------------------------------------------------- 115 115 116 inline G4double GetDEDX( 116 inline G4double GetDEDX( 117 const G4ParticleDefinition *aParticle, 117 const G4ParticleDefinition *aParticle, 118 G4double kineticEnergy, 118 G4double kineticEnergy, 119 const G4MaterialCutsCouple *couple); 119 const G4MaterialCutsCouple *couple); 120 120 121 inline G4double GetRange( 121 inline G4double GetRange( 122 const G4ParticleDefinition *aParticle, 122 const G4ParticleDefinition *aParticle, 123 G4double kineticEnergy, 123 G4double kineticEnergy, 124 const G4MaterialCutsCouple *couple); 124 const G4MaterialCutsCouple *couple); 125 125 126 inline G4double GetCSDARange( 126 inline G4double GetCSDARange( 127 const G4ParticleDefinition *aParticle, 127 const G4ParticleDefinition *aParticle, 128 G4double kineticEnergy, 128 G4double kineticEnergy, 129 const G4MaterialCutsCouple *couple); 129 const G4MaterialCutsCouple *couple); 130 130 131 inline G4double GetRangeFromRestricteDEDX( 131 inline G4double GetRangeFromRestricteDEDX( 132 const G4ParticleDefinition *aParticle, 132 const G4ParticleDefinition *aParticle, 133 G4double kineticEnergy, 133 G4double kineticEnergy, 134 const G4MaterialCutsCouple *couple); 134 const G4MaterialCutsCouple *couple); 135 135 136 inline G4double GetEnergy( 136 inline G4double GetEnergy( 137 const G4ParticleDefinition *aParticle, 137 const G4ParticleDefinition *aParticle, 138 G4double range, 138 G4double range, 139 const G4MaterialCutsCouple *couple); 139 const G4MaterialCutsCouple *couple); 140 140 141 inline G4double GetDEDXDispersion( 141 inline G4double GetDEDXDispersion( 142 const G4MaterialCutsCouple *couple, 142 const G4MaterialCutsCouple *couple, 143 const G4DynamicParticle* dp, 143 const G4DynamicParticle* dp, 144 G4double& length); 144 G4double& length); 145 145 146 //------------------------------------------ 146 //------------------------------------------------- 147 // Methods to be called only at initialisati 147 // Methods to be called only at initialisation 148 // and at the end of the job 148 // and at the end of the job 149 //------------------------------------------ 149 //------------------------------------------------- 150 150 151 void Register(G4VEnergyLossProcess* p); 151 void Register(G4VEnergyLossProcess* p); 152 152 153 void DeRegister(G4VEnergyLossProcess* p); 153 void DeRegister(G4VEnergyLossProcess* p); 154 154 155 void Register(G4VMultipleScattering* p); 155 void Register(G4VMultipleScattering* p); 156 156 157 void DeRegister(G4VMultipleScattering* p); 157 void DeRegister(G4VMultipleScattering* p); 158 158 159 void Register(G4VEmProcess* p); 159 void Register(G4VEmProcess* p); 160 160 161 void DeRegister(G4VEmProcess* p); 161 void DeRegister(G4VEmProcess* p); 162 162 163 void Register(G4VProcess* p); 163 void Register(G4VProcess* p); 164 164 165 void DeRegister(G4VProcess* p); 165 void DeRegister(G4VProcess* p); 166 166 167 void Register(G4VEmModel* p); 167 void Register(G4VEmModel* p); 168 168 169 void DeRegister(G4VEmModel* p); 169 void DeRegister(G4VEmModel* p); 170 170 171 void Register(G4VEmFluctuationModel* p); 171 void Register(G4VEmFluctuationModel* p); 172 172 173 void DeRegister(G4VEmFluctuationModel* p); 173 void DeRegister(G4VEmFluctuationModel* p); 174 174 175 void RegisterExtraParticle(const G4ParticleD 175 void RegisterExtraParticle(const G4ParticleDefinition* aParticle, 176 G4VEnergyLossProc 176 G4VEnergyLossProcess* p); 177 177 178 void SetVerbose(G4int val); 178 void SetVerbose(G4int val); 179 179 180 void ResetParameters(); 180 void ResetParameters(); 181 181 182 void SetAtomDeexcitation(G4VAtomDeexcitation 182 void SetAtomDeexcitation(G4VAtomDeexcitation*); 183 183 184 void SetSubCutProducer(G4VSubCutProducer*); 184 void SetSubCutProducer(G4VSubCutProducer*); 185 185 186 void SetNIELCalculator(G4NIELCalculator*); 186 void SetNIELCalculator(G4NIELCalculator*); 187 187 188 //------------------------------------------ 188 //------------------------------------------------- 189 // Access methods 189 // Access methods 190 //------------------------------------------ 190 //------------------------------------------------- 191 191 192 inline G4bool IsMaster() const; 192 inline G4bool IsMaster() const; 193 193 194 G4VEnergyLossProcess* GetEnergyLossProcess(c 194 G4VEnergyLossProcess* GetEnergyLossProcess(const G4ParticleDefinition*); 195 195 196 const std::vector<G4VEnergyLossProcess*>& Ge 196 const std::vector<G4VEnergyLossProcess*>& GetEnergyLossProcessVector(); 197 197 198 const std::vector<G4VEmProcess*>& GetEmProce 198 const std::vector<G4VEmProcess*>& GetEmProcessVector(); 199 199 200 const std::vector<G4VMultipleScattering*>& G 200 const std::vector<G4VMultipleScattering*>& GetMultipleScatteringVector(); 201 201 202 G4EmSaturation* EmSaturation(); 202 G4EmSaturation* EmSaturation(); 203 203 204 G4EmConfigurator* EmConfigurator(); 204 G4EmConfigurator* EmConfigurator(); 205 205 206 G4ElectronIonPair* ElectronIonPair(); 206 G4ElectronIonPair* ElectronIonPair(); 207 207 208 G4NIELCalculator* NIELCalculator(); 208 G4NIELCalculator* NIELCalculator(); 209 209 210 inline G4EmCorrections* EmCorrections(); 210 inline G4EmCorrections* EmCorrections(); 211 211 212 inline G4VAtomDeexcitation* AtomDeexcitation 212 inline G4VAtomDeexcitation* AtomDeexcitation(); 213 213 214 inline G4VSubCutProducer* SubCutProducer(); 214 inline G4VSubCutProducer* SubCutProducer(); 215 215 216 inline G4LossTableBuilder* GetTableBuilder() 216 inline G4LossTableBuilder* GetTableBuilder(); 217 217 218 inline void SetGammaGeneralProcess(G4VEmProc 218 inline void SetGammaGeneralProcess(G4VEmProcess*); 219 219 220 inline G4VEmProcess* GetGammaGeneralProcess( 220 inline G4VEmProcess* GetGammaGeneralProcess(); 221 221 222 inline void SetElectronGeneralProcess(G4VEmP 222 inline void SetElectronGeneralProcess(G4VEmProcess*); 223 223 224 inline G4VEmProcess* GetElectronGeneralProce 224 inline G4VEmProcess* GetElectronGeneralProcess(); 225 225 226 inline void SetPositronGeneralProcess(G4VEmP 226 inline void SetPositronGeneralProcess(G4VEmProcess*); 227 227 228 inline G4VEmProcess* GetPositronGeneralProce 228 inline G4VEmProcess* GetPositronGeneralProcess(); 229 229 230 G4LossTableManager(G4LossTableManager &) = d 230 G4LossTableManager(G4LossTableManager &) = delete; 231 G4LossTableManager & operator=(const G4LossT 231 G4LossTableManager & operator=(const G4LossTableManager &right) = delete; 232 232 233 private: 233 private: 234 234 235 //------------------------------------------ 235 //------------------------------------------------- 236 // Private methods and members 236 // Private methods and members 237 //------------------------------------------ 237 //------------------------------------------------- 238 238 239 G4LossTableManager(); 239 G4LossTableManager(); 240 240 241 void Clear(); 241 void Clear(); 242 242 243 G4VEnergyLossProcess* BuildTables(const G4Pa 243 G4VEnergyLossProcess* BuildTables(const G4ParticleDefinition* aParticle); 244 244 245 void CopyTables(const G4ParticleDefinition* 245 void CopyTables(const G4ParticleDefinition* aParticle, 246 G4VEnergyLossProcess*); 246 G4VEnergyLossProcess*); 247 247 248 void ParticleHaveNoLoss(const G4ParticleDefi 248 void ParticleHaveNoLoss(const G4ParticleDefinition* aParticle); 249 249 250 void CopyDEDXTables(); 250 void CopyDEDXTables(); 251 251 252 void PrintEWarning(G4String, G4double); 252 void PrintEWarning(G4String, G4double); 253 253 254 static G4ThreadLocal G4LossTableManager* ins 254 static G4ThreadLocal G4LossTableManager* instance; 255 255 256 typedef const G4ParticleDefinition* PD; 256 typedef const G4ParticleDefinition* PD; 257 257 258 // cache 258 // cache 259 G4VEnergyLossProcess* currentLoss{nullptr}; 259 G4VEnergyLossProcess* currentLoss{nullptr}; 260 PD currentParticle{nullptr}; 260 PD currentParticle{nullptr}; 261 PD theElectron; 261 PD theElectron; 262 PD theGenericIon{nullptr}; 262 PD theGenericIon{nullptr}; 263 PD firstParticle{nullptr}; 263 PD firstParticle{nullptr}; 264 264 265 G4LossTableBuilder* tableBuilder; 265 G4LossTableBuilder* tableBuilder; 266 G4EmCorrections* emCorrections; 266 G4EmCorrections* emCorrections; 267 G4EmConfigurator* emConfigurator{nullptr}; 267 G4EmConfigurator* emConfigurator{nullptr}; 268 G4ElectronIonPair* emElectronIonPair{nullptr 268 G4ElectronIonPair* emElectronIonPair{nullptr}; 269 G4NIELCalculator* nielCalculator{nullptr}; 269 G4NIELCalculator* nielCalculator{nullptr}; 270 G4VAtomDeexcitation* atomDeexcitation{nullpt 270 G4VAtomDeexcitation* atomDeexcitation{nullptr}; 271 G4VSubCutProducer* subcutProducer{nullptr}; 271 G4VSubCutProducer* subcutProducer{nullptr}; 272 272 273 G4EmParameters* theParameters; 273 G4EmParameters* theParameters; 274 G4VEmProcess* gGeneral{nullptr}; 274 G4VEmProcess* gGeneral{nullptr}; 275 G4VEmProcess* eGeneral{nullptr}; 275 G4VEmProcess* eGeneral{nullptr}; 276 G4VEmProcess* pGeneral{nullptr}; 276 G4VEmProcess* pGeneral{nullptr}; 277 277 278 G4int verbose; 278 G4int verbose; 279 G4int n_loss{0}; 279 G4int n_loss{0}; 280 G4int run{-1}; 280 G4int run{-1}; 281 281 282 G4bool all_tables_are_built{false}; 282 G4bool all_tables_are_built{false}; 283 G4bool startInitialisation{false}; 283 G4bool startInitialisation{false}; 284 G4bool resetParam{true}; << 284 G4bool isMaster{true}; 285 G4bool isMaster{false}; << 286 285 287 std::vector<G4VEnergyLossProcess*> loss_vect 286 std::vector<G4VEnergyLossProcess*> loss_vector; 288 std::vector<PD> part_vector; 287 std::vector<PD> part_vector; 289 std::vector<PD> base_part_vector; 288 std::vector<PD> base_part_vector; 290 std::vector<G4PhysicsTable*> dedx_vector; 289 std::vector<G4PhysicsTable*> dedx_vector; 291 std::vector<G4PhysicsTable*> range_vector; 290 std::vector<G4PhysicsTable*> range_vector; 292 std::vector<G4PhysicsTable*> inv_range_vecto 291 std::vector<G4PhysicsTable*> inv_range_vector; 293 std::vector<G4bool> tables_are_built; 292 std::vector<G4bool> tables_are_built; 294 std::vector<G4bool> isActive; 293 std::vector<G4bool> isActive; 295 std::vector<G4VMultipleScattering*> msc_vect 294 std::vector<G4VMultipleScattering*> msc_vector; 296 std::vector<G4VEmProcess*> emp_vector; 295 std::vector<G4VEmProcess*> emp_vector; 297 std::vector<G4VEmModel*> mod_vector; 296 std::vector<G4VEmModel*> mod_vector; 298 std::vector<G4VEmFluctuationModel*> fmod_vec 297 std::vector<G4VEmFluctuationModel*> fmod_vector; 299 std::vector<G4VProcess*> p_vector; 298 std::vector<G4VProcess*> p_vector; 300 299 301 std::map<PD,G4VEnergyLossProcess*,std::less< 300 std::map<PD,G4VEnergyLossProcess*,std::less<PD> > loss_map; 302 }; 301 }; 303 302 304 //....oooOO0OOooo........oooOO0OOooo........oo 303 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 305 //....oooOO0OOooo........oooOO0OOooo........oo 304 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 306 305 307 inline 306 inline 308 G4double G4LossTableManager::GetDEDX(const G4P 307 G4double G4LossTableManager::GetDEDX(const G4ParticleDefinition *aParticle, 309 G4double 308 G4double kineticEnergy, 310 const G4M 309 const G4MaterialCutsCouple *couple) 311 { 310 { 312 if(aParticle != currentParticle) { GetEnergy 311 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 313 return currentLoss ? currentLoss->GetDEDX(ki 312 return currentLoss ? currentLoss->GetDEDX(kineticEnergy, couple) : 0.0; 314 } 313 } 315 314 316 //....oooOO0OOooo........oooOO0OOooo........oo 315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 317 316 318 inline 317 inline 319 G4double G4LossTableManager::GetCSDARange(cons 318 G4double G4LossTableManager::GetCSDARange(const G4ParticleDefinition *aParticle, 320 G4do 319 G4double kineticEnergy, 321 cons 320 const G4MaterialCutsCouple *couple) 322 { 321 { 323 if(aParticle != currentParticle) { GetEnergy 322 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 324 return currentLoss ? currentLoss->GetCSDARan 323 return currentLoss ? currentLoss->GetCSDARange(kineticEnergy, couple) : DBL_MAX; 325 } 324 } 326 325 327 //....oooOO0OOooo........oooOO0OOooo........oo 326 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 328 327 329 inline 328 inline 330 G4double G4LossTableManager::GetRangeFromRestr 329 G4double G4LossTableManager::GetRangeFromRestricteDEDX( 331 const G4ParticleD 330 const G4ParticleDefinition *aParticle, 332 G4double kineticE 331 G4double kineticEnergy, 333 const G4MaterialC 332 const G4MaterialCutsCouple *couple) 334 { 333 { 335 if(aParticle != currentParticle) { GetEnergy 334 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 336 return currentLoss ? currentLoss->GetRange(k 335 return currentLoss ? currentLoss->GetRange(kineticEnergy, couple) : DBL_MAX; 337 } 336 } 338 337 339 //....oooOO0OOooo........oooOO0OOooo........oo 338 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 340 339 341 inline 340 inline 342 G4double G4LossTableManager::GetRange(const G4 341 G4double G4LossTableManager::GetRange(const G4ParticleDefinition *aParticle, 343 G4double 342 G4double kineticEnergy, 344 const G4 343 const G4MaterialCutsCouple *couple) 345 { 344 { 346 if(aParticle != currentParticle) { GetEnergy 345 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 347 return currentLoss ? currentLoss->GetRange(k 346 return currentLoss ? currentLoss->GetRange(kineticEnergy, couple) : DBL_MAX; 348 } 347 } 349 348 350 //....oooOO0OOooo........oooOO0OOooo........oo 349 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 351 350 352 inline 351 inline 353 G4double G4LossTableManager::GetEnergy(const G 352 G4double G4LossTableManager::GetEnergy(const G4ParticleDefinition *aParticle, 354 G4doubl 353 G4double range, 355 const G 354 const G4MaterialCutsCouple *couple) 356 { 355 { 357 if(aParticle != currentParticle) { GetEnergy 356 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 358 return currentLoss ? currentLoss->GetKinetic 357 return currentLoss ? currentLoss->GetKineticEnergy(range, couple) : 0.0; 359 } 358 } 360 359 361 //....oooOO0OOooo........oooOO0OOooo........oo 360 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 362 361 363 inline 362 inline 364 G4double G4LossTableManager::GetDEDXDispersion 363 G4double G4LossTableManager::GetDEDXDispersion( 365 const G4MaterialC 364 const G4MaterialCutsCouple *couple, 366 const G4DynamicPa 365 const G4DynamicParticle* dp, 367 G4double& length) 366 G4double& length) 368 { 367 { 369 const G4ParticleDefinition* aParticle = dp-> 368 const G4ParticleDefinition* aParticle = dp->GetParticleDefinition(); 370 if(aParticle != currentParticle) { GetEnergy 369 if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); } 371 return currentLoss ? currentLoss->GetDEDXDis 370 return currentLoss ? currentLoss->GetDEDXDispersion(couple, dp, length) : 0.0; 372 } 371 } 373 372 374 //....oooOO0OOooo........oooOO0OOooo........oo 373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 375 374 376 inline G4bool G4LossTableManager::IsMaster() c 375 inline G4bool G4LossTableManager::IsMaster() const 377 { 376 { 378 return isMaster; 377 return isMaster; 379 } 378 } 380 379 381 //....oooOO0OOooo........oooOO0OOooo........oo 380 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 382 381 383 inline G4EmCorrections* G4LossTableManager::Em 382 inline G4EmCorrections* G4LossTableManager::EmCorrections() 384 { 383 { 385 return emCorrections; 384 return emCorrections; 386 } 385 } 387 386 388 //....oooOO0OOooo........oooOO0OOooo........oo 387 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 389 388 390 inline G4VAtomDeexcitation* G4LossTableManager 389 inline G4VAtomDeexcitation* G4LossTableManager::AtomDeexcitation() 391 { 390 { 392 return atomDeexcitation; 391 return atomDeexcitation; 393 } 392 } 394 393 395 //....oooOO0OOooo........oooOO0OOooo........oo 394 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 396 395 397 inline G4VSubCutProducer* G4LossTableManager:: 396 inline G4VSubCutProducer* G4LossTableManager::SubCutProducer() 398 { 397 { 399 return subcutProducer; 398 return subcutProducer; 400 } 399 } 401 400 402 //....oooOO0OOooo........oooOO0OOooo........oo 401 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 403 402 404 inline G4LossTableBuilder* G4LossTableManager: 403 inline G4LossTableBuilder* G4LossTableManager::GetTableBuilder() 405 { 404 { 406 return tableBuilder; 405 return tableBuilder; 407 } 406 } 408 407 409 //....oooOO0OOooo........oooOO0OOooo........oo 408 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 410 409 411 inline void G4LossTableManager::SetGammaGenera 410 inline void G4LossTableManager::SetGammaGeneralProcess(G4VEmProcess* ptr) 412 { 411 { 413 gGeneral = ptr; 412 gGeneral = ptr; 414 } 413 } 415 414 416 //....oooOO0OOooo........oooOO0OOooo........oo 415 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 417 416 418 inline G4VEmProcess* G4LossTableManager::GetGa 417 inline G4VEmProcess* G4LossTableManager::GetGammaGeneralProcess() 419 { 418 { 420 return gGeneral; 419 return gGeneral; 421 } 420 } 422 421 423 //....oooOO0OOooo........oooOO0OOooo........oo 422 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 424 423 425 inline void G4LossTableManager::SetElectronGen 424 inline void G4LossTableManager::SetElectronGeneralProcess(G4VEmProcess* ptr) 426 { 425 { 427 eGeneral = ptr; 426 eGeneral = ptr; 428 } 427 } 429 428 430 //....oooOO0OOooo........oooOO0OOooo........oo 429 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 431 430 432 inline G4VEmProcess* G4LossTableManager::GetEl 431 inline G4VEmProcess* G4LossTableManager::GetElectronGeneralProcess() 433 { 432 { 434 return eGeneral; 433 return eGeneral; 435 } 434 } 436 435 437 //....oooOO0OOooo........oooOO0OOooo........oo 436 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 438 437 439 inline void G4LossTableManager::SetPositronGen 438 inline void G4LossTableManager::SetPositronGeneralProcess(G4VEmProcess* ptr) 440 { 439 { 441 pGeneral = ptr; 440 pGeneral = ptr; 442 } 441 } 443 442 444 //....oooOO0OOooo........oooOO0OOooo........oo 443 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 445 444 446 inline G4VEmProcess* G4LossTableManager::GetPo 445 inline G4VEmProcess* G4LossTableManager::GetPositronGeneralProcess() 447 { 446 { 448 return pGeneral; 447 return pGeneral; 449 } 448 } 450 //....oooOO0OOooo........oooOO0OOooo........oo 449 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 451 450 452 #endif 451 #endif 453 452