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: G4VEmProcess 31 // File name: G4VEmProcess 32 // 32 // 33 // Author: Vladimir Ivanchenko 33 // Author: Vladimir Ivanchenko 34 // 34 // 35 // Creation date: 01.10.2003 35 // Creation date: 01.10.2003 36 // 36 // 37 // Modifications: Vladimir Ivanchenko 37 // Modifications: Vladimir Ivanchenko 38 // 38 // 39 // Class Description: 39 // Class Description: 40 // 40 // 41 // It is the base class - EM discrete and rest 41 // It is the base class - EM discrete and rest/discrete process 42 42 43 // ------------------------------------------- 43 // ------------------------------------------------------------------- 44 // 44 // 45 45 46 #ifndef G4VEmProcess_h 46 #ifndef G4VEmProcess_h 47 #define G4VEmProcess_h 1 47 #define G4VEmProcess_h 1 48 48 49 #include <CLHEP/Units/SystemOfUnits.h> 49 #include <CLHEP/Units/SystemOfUnits.h> 50 50 51 #include "G4VDiscreteProcess.hh" 51 #include "G4VDiscreteProcess.hh" 52 #include "globals.hh" 52 #include "globals.hh" 53 #include "G4Material.hh" 53 #include "G4Material.hh" 54 #include "G4MaterialCutsCouple.hh" 54 #include "G4MaterialCutsCouple.hh" 55 #include "G4Track.hh" 55 #include "G4Track.hh" 56 #include "G4UnitsTable.hh" 56 #include "G4UnitsTable.hh" 57 #include "G4ParticleDefinition.hh" 57 #include "G4ParticleDefinition.hh" 58 #include "G4ParticleChangeForGamma.hh" 58 #include "G4ParticleChangeForGamma.hh" 59 #include "G4EmParameters.hh" 59 #include "G4EmParameters.hh" 60 #include "G4EmDataHandler.hh" 60 #include "G4EmDataHandler.hh" 61 #include "G4EmTableType.hh" 61 #include "G4EmTableType.hh" 62 #include "G4EmModelManager.hh" 62 #include "G4EmModelManager.hh" 63 #include "G4EmSecondaryParticleType.hh" 63 #include "G4EmSecondaryParticleType.hh" 64 64 65 class G4Step; 65 class G4Step; 66 class G4VEmModel; 66 class G4VEmModel; 67 class G4DataVector; 67 class G4DataVector; 68 class G4VParticleChange; 68 class G4VParticleChange; 69 class G4PhysicsTable; 69 class G4PhysicsTable; 70 class G4PhysicsVector; 70 class G4PhysicsVector; 71 class G4EmBiasingManager; 71 class G4EmBiasingManager; 72 class G4LossTableManager; 72 class G4LossTableManager; 73 73 74 //....oooOO0OOooo........oooOO0OOooo........oo 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 75 75 76 class G4VEmProcess : public G4VDiscreteProcess 76 class G4VEmProcess : public G4VDiscreteProcess 77 { 77 { 78 public: 78 public: 79 79 80 G4VEmProcess(const G4String& name, G4Process 80 G4VEmProcess(const G4String& name, G4ProcessType type = fElectromagnetic); 81 81 82 ~G4VEmProcess() override; 82 ~G4VEmProcess() override; 83 83 84 //------------------------------------------ 84 //------------------------------------------------------------------------ 85 // Virtual methods to be implemented in conc 85 // Virtual methods to be implemented in concrete processes 86 //------------------------------------------ 86 //------------------------------------------------------------------------ 87 87 >> 88 virtual G4bool IsApplicable(const G4ParticleDefinition& p) override = 0; >> 89 88 void ProcessDescription(std::ostream& outFil 90 void ProcessDescription(std::ostream& outFile) const override; 89 91 90 protected: 92 protected: 91 93 92 virtual void StreamProcessInfo(std::ostream& 94 virtual void StreamProcessInfo(std::ostream&) const {}; 93 95 94 virtual void InitialiseProcess(const G4Parti 96 virtual void InitialiseProcess(const G4ParticleDefinition*) = 0; 95 97 96 //------------------------------------------ 98 //------------------------------------------------------------------------ >> 99 // Method with standard implementation; may be overwritten if needed >> 100 //------------------------------------------------------------------------ >> 101 >> 102 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*, >> 103 const G4Material*); >> 104 >> 105 //------------------------------------------------------------------------ 97 // Implementation of virtual methods common 106 // Implementation of virtual methods common to all Discrete processes 98 //------------------------------------------ 107 //------------------------------------------------------------------------ 99 108 100 public: 109 public: 101 110 102 // Initialise for build of tables 111 // Initialise for build of tables 103 void PreparePhysicsTable(const G4ParticleDef 112 void PreparePhysicsTable(const G4ParticleDefinition&) override; 104 113 105 // Build physics table during initialisation 114 // Build physics table during initialisation 106 void BuildPhysicsTable(const G4ParticleDefin 115 void BuildPhysicsTable(const G4ParticleDefinition&) override; 107 116 108 // Called before tracking of each new G4Trac 117 // Called before tracking of each new G4Track 109 void StartTracking(G4Track*) override; 118 void StartTracking(G4Track*) override; 110 119 111 // implementation of virtual method, specifi 120 // implementation of virtual method, specific for G4VEmProcess 112 G4double PostStepGetPhysicalInteractionLengt 121 G4double PostStepGetPhysicalInteractionLength( 113 const G4Track& tr 122 const G4Track& track, 114 G4double previo 123 G4double previousStepSize, 115 G4ForceCondition* 124 G4ForceCondition* condition) override; 116 125 117 // implementation of virtual method, specifi 126 // implementation of virtual method, specific for G4VEmProcess 118 G4VParticleChange* PostStepDoIt(const G4Trac 127 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&) override; 119 128 120 // Store PhysicsTable in a file. 129 // Store PhysicsTable in a file. 121 // Return false in case of failure at I/O 130 // Return false in case of failure at I/O 122 G4bool StorePhysicsTable(const G4ParticleDef 131 G4bool StorePhysicsTable(const G4ParticleDefinition*, 123 const G4String& dir 132 const G4String& directory, 124 G4bool ascii = fals 133 G4bool ascii = false) override; 125 134 126 // Retrieve Physics from a file. 135 // Retrieve Physics from a file. 127 // (return true if the Physics Table can be 136 // (return true if the Physics Table can be build by using file) 128 // (return false if the process has no funct 137 // (return false if the process has no functionality or in case of failure) 129 // File name should is constructed as proces 138 // File name should is constructed as processName+particleName and the 130 // should be placed under the directory spec 139 // should be placed under the directory specified by the argument. 131 G4bool RetrievePhysicsTable(const G4Particle 140 G4bool RetrievePhysicsTable(const G4ParticleDefinition*, 132 const G4String& 141 const G4String& directory, 133 G4bool ascii) ov 142 G4bool ascii) override; 134 143 135 // allowing check process name 144 // allowing check process name 136 virtual G4VEmProcess* GetEmProcess(const G4S 145 virtual G4VEmProcess* GetEmProcess(const G4String& name); 137 146 138 //------------------------------------------ 147 //------------------------------------------------------------------------ 139 // Specific methods for Discrete EM post ste 148 // Specific methods for Discrete EM post step simulation 140 //------------------------------------------ 149 //------------------------------------------------------------------------ 141 150 142 // The main method to access cross section p << 151 // It returns the cross section per volume for energy/ material 143 inline G4double GetLambda(G4double kinEnergy << 152 G4double CrossSectionPerVolume(G4double kineticEnergy, 144 const G4MaterialCu << 153 const G4MaterialCutsCouple* couple, 145 G4double logKinEne << 154 G4double logKinEnergy = DBL_MAX); 146 << 147 // It returns the cross section per volume f << 148 G4double GetCrossSection(const G4double kinE << 149 const G4MaterialCut << 150 155 151 // It returns the cross section of the proce 156 // It returns the cross section of the process per atom 152 G4double ComputeCrossSectionPerAtom(G4double 157 G4double ComputeCrossSectionPerAtom(G4double kineticEnergy, 153 G4double 158 G4double Z, G4double A=0., 154 G4double 159 G4double cut=0.0); 155 160 156 inline G4double MeanFreePath(const G4Track& << 161 G4double MeanFreePath(const G4Track& track); >> 162 >> 163 // Obsolete method to access cross section per volume >> 164 G4double GetLambda(G4double kinEnergy, const G4MaterialCutsCouple* couple); >> 165 >> 166 // The main method to access cross section per volume >> 167 inline G4double GetLambda(G4double kinEnergy, >> 168 const G4MaterialCutsCouple* couple, >> 169 G4double logKinEnergy); 157 170 158 //------------------------------------------ 171 //------------------------------------------------------------------------ 159 // Specific methods to build and access Phys 172 // Specific methods to build and access Physics Tables 160 //------------------------------------------ 173 //------------------------------------------------------------------------ 161 174 162 // Binning for lambda table 175 // Binning for lambda table 163 void SetLambdaBinning(G4int nbins); 176 void SetLambdaBinning(G4int nbins); 164 177 165 // Min kinetic energy for tables 178 // Min kinetic energy for tables 166 void SetMinKinEnergy(G4double e); 179 void SetMinKinEnergy(G4double e); 167 180 168 // Min kinetic energy for high energy table 181 // Min kinetic energy for high energy table 169 void SetMinKinEnergyPrim(G4double e); 182 void SetMinKinEnergyPrim(G4double e); 170 183 171 // Max kinetic energy for tables 184 // Max kinetic energy for tables 172 void SetMaxKinEnergy(G4double e); 185 void SetMaxKinEnergy(G4double e); 173 186 >> 187 // for cross section with one peak >> 188 void SetEnergyOfCrossSectionMax(std::vector<G4double>*); >> 189 174 // Cross section table pointers 190 // Cross section table pointers 175 inline G4PhysicsTable* LambdaTable() const; 191 inline G4PhysicsTable* LambdaTable() const; 176 inline G4PhysicsTable* LambdaTablePrim() con 192 inline G4PhysicsTable* LambdaTablePrim() const; 177 inline void SetLambdaTable(G4PhysicsTable*); << 178 inline void SetLambdaTablePrim(G4PhysicsTabl << 179 << 180 // Integral method type and peak positions << 181 inline std::vector<G4double>* EnergyOfCrossS 193 inline std::vector<G4double>* EnergyOfCrossSectionMax() const; 182 inline void SetEnergyOfCrossSectionMax(std:: << 183 inline G4CrossSectionType CrossSectionType() << 184 inline void SetCrossSectionType(G4CrossSecti << 185 << 186 //------------------------------------------ 194 //------------------------------------------------------------------------ 187 // Define and access particle type 195 // Define and access particle type 188 //------------------------------------------ 196 //------------------------------------------------------------------------ 189 197 190 inline const G4ParticleDefinition* Particle( 198 inline const G4ParticleDefinition* Particle() const; 191 inline const G4ParticleDefinition* Secondary 199 inline const G4ParticleDefinition* SecondaryParticle() const; 192 200 193 protected: << 194 << 195 //------------------------------------------ 201 //------------------------------------------------------------------------ 196 // Specific methods to set, access, modify m 202 // Specific methods to set, access, modify models and basic parameters 197 //------------------------------------------ 203 //------------------------------------------------------------------------ 198 << 204 >> 205 protected: >> 206 199 // Select model in run time 207 // Select model in run time 200 inline G4VEmModel* SelectModel(G4double kinE << 208 inline G4VEmModel* SelectModel(G4double kinEnergy, size_t); 201 209 202 public: 210 public: 203 211 204 // Select model by energy and couple index 212 // Select model by energy and couple index 205 inline G4VEmModel* SelectModelForMaterial(G4 213 inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy, 206 st << 214 size_t idxCouple) const; 207 215 208 // Add model for region, smaller value of or 216 // Add model for region, smaller value of order defines which 209 // model will be selected for a given energy 217 // model will be selected for a given energy interval 210 void AddEmModel(G4int, G4VEmModel*, const G4 218 void AddEmModel(G4int, G4VEmModel*, const G4Region* region = nullptr); 211 219 212 // Assign a model to a process local list, t 220 // Assign a model to a process local list, to enable the list in run time 213 // the derived process should execute AddEmM 221 // the derived process should execute AddEmModel(..) for all such models 214 void SetEmModel(G4VEmModel*, G4int index = 0 222 void SetEmModel(G4VEmModel*, G4int index = 0); 215 223 216 inline G4int NumberOfModels() const; 224 inline G4int NumberOfModels() const; 217 225 218 // return a model from the local list 226 // return a model from the local list 219 inline G4VEmModel* EmModel(std::size_t index << 227 inline G4VEmModel* EmModel(size_t index = 0) const; 220 228 221 // Access to active model 229 // Access to active model 222 inline const G4VEmModel* GetCurrentModel() c 230 inline const G4VEmModel* GetCurrentModel() const; 223 231 224 // Access to models 232 // Access to models 225 inline G4VEmModel* GetModelByIndex(G4int idx << 233 G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false) const; 226 234 227 // Access to the current G4Element 235 // Access to the current G4Element 228 const G4Element* GetCurrentElement() const; 236 const G4Element* GetCurrentElement() const; 229 237 230 // Biasing parameters 238 // Biasing parameters 231 void SetCrossSectionBiasingFactor(G4double f 239 void SetCrossSectionBiasingFactor(G4double f, G4bool flag = true); 232 inline G4double CrossSectionBiasingFactor() 240 inline G4double CrossSectionBiasingFactor() const; 233 241 234 // Activate forced interaction 242 // Activate forced interaction 235 void ActivateForcedInteraction(G4double leng 243 void ActivateForcedInteraction(G4double length = 0.0, 236 const G4Strin 244 const G4String& r = "", 237 G4bool flag = 245 G4bool flag = true); 238 246 239 void ActivateSecondaryBiasing(const G4String 247 void ActivateSecondaryBiasing(const G4String& region, G4double factor, 240 G4double energ 248 G4double energyLimit); 241 249 >> 250 std::vector<G4double>* FindLambdaMax(); >> 251 242 inline void SetEmMasterProcess(const G4VEmPr 252 inline void SetEmMasterProcess(const G4VEmProcess*); >> 253 >> 254 inline void SetCrossSectionType(G4CrossSectionType val); 243 255 244 inline void SetBuildTableFlag(G4bool val); 256 inline void SetBuildTableFlag(G4bool val); 245 257 246 inline void CurrentSetup(const G4MaterialCut 258 inline void CurrentSetup(const G4MaterialCutsCouple*, G4double energy); 247 259 248 inline G4bool UseBaseMaterial() const; 260 inline G4bool UseBaseMaterial() const; 249 261 250 void BuildLambdaTable(); << 251 << 252 void StreamInfo(std::ostream& outFile, const << 253 G4bool rst=false) const; << 254 << 255 // hide copy constructor and assignment oper 262 // hide copy constructor and assignment operator 256 G4VEmProcess(G4VEmProcess &) = delete; 263 G4VEmProcess(G4VEmProcess &) = delete; 257 G4VEmProcess & operator=(const G4VEmProcess 264 G4VEmProcess & operator=(const G4VEmProcess &right) = delete; 258 265 259 //------------------------------------------ 266 //------------------------------------------------------------------------ 260 // Other generic methods 267 // Other generic methods 261 //------------------------------------------ 268 //------------------------------------------------------------------------ 262 269 263 protected: 270 protected: 264 271 265 G4double GetMeanFreePath(const G4Track& trac 272 G4double GetMeanFreePath(const G4Track& track, 266 G4double previousSt 273 G4double previousStepSize, 267 G4ForceCondition* c 274 G4ForceCondition* condition) override; 268 275 269 G4PhysicsVector* LambdaPhysicsVector(const G 276 G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*); 270 277 271 inline void DefineMaterial(const G4MaterialC 278 inline void DefineMaterial(const G4MaterialCutsCouple* couple); 272 279 273 inline G4int LambdaBinning() const; 280 inline G4int LambdaBinning() const; 274 281 275 inline G4double MinKinEnergy() const; 282 inline G4double MinKinEnergy() const; 276 283 277 inline G4double MaxKinEnergy() const; 284 inline G4double MaxKinEnergy() const; 278 285 279 // Single scattering parameters 286 // Single scattering parameters 280 inline G4double PolarAngleLimit() const; 287 inline G4double PolarAngleLimit() const; 281 288 >> 289 inline G4CrossSectionType CrossSectionType() const; >> 290 >> 291 inline G4double RecalculateLambda(G4double kinEnergy, >> 292 const G4MaterialCutsCouple* couple); >> 293 282 inline G4ParticleChangeForGamma* GetParticle 294 inline G4ParticleChangeForGamma* GetParticleChange(); 283 295 284 inline void SetParticle(const G4ParticleDefi 296 inline void SetParticle(const G4ParticleDefinition* p); 285 297 286 inline void SetSecondaryParticle(const G4Par 298 inline void SetSecondaryParticle(const G4ParticleDefinition* p); 287 299 288 inline std::size_t CurrentMaterialCutsCouple << 300 inline size_t CurrentMaterialCutsCoupleIndex() const; 289 301 290 inline const G4MaterialCutsCouple* MaterialC 302 inline const G4MaterialCutsCouple* MaterialCutsCouple() const; 291 303 292 inline G4bool ApplyCuts() const; 304 inline G4bool ApplyCuts() const; 293 305 294 inline G4double GetGammaEnergyCut(); 306 inline G4double GetGammaEnergyCut(); 295 307 296 inline G4double GetElectronEnergyCut(); 308 inline G4double GetElectronEnergyCut(); 297 309 298 inline void SetStartFromNullFlag(G4bool val) 310 inline void SetStartFromNullFlag(G4bool val); 299 311 300 inline void SetSplineFlag(G4bool val); 312 inline void SetSplineFlag(G4bool val); 301 313 302 const G4Element* GetTargetElement() const; << 314 inline const G4Element* GetTargetElement() const; 303 315 304 const G4Isotope* GetTargetIsotope() const; << 316 inline const G4Isotope* GetTargetIsotope() const; 305 317 306 // these two methods assume that vectors are 318 // these two methods assume that vectors are initilized 307 // and idx is within vector length 319 // and idx is within vector length 308 inline G4int DensityIndex(G4int idx) const; 320 inline G4int DensityIndex(G4int idx) const; 309 inline G4double DensityFactor(G4int idx) con 321 inline G4double DensityFactor(G4int idx) const; 310 322 311 private: 323 private: 312 324 313 void PrintWarning(G4String tit, G4double val << 325 void Clear(); 314 326 315 void ComputeIntegralLambda(G4double kinEnerg << 327 void BuildLambdaTable(); 316 328 317 inline G4double LogEkin(const G4Track&); << 329 void StreamInfo(std::ostream& outFile, const G4ParticleDefinition&, >> 330 G4bool rst=false) const; >> 331 >> 332 void PrintWarning(G4String tit, G4double val); >> 333 >> 334 void ComputeIntegralLambda(G4double kinEnergy, G4double logKinEnergy); 318 335 319 inline G4double GetLambdaFromTable(G4double 336 inline G4double GetLambdaFromTable(G4double kinEnergy); 320 337 321 inline G4double GetLambdaFromTable(G4double 338 inline G4double GetLambdaFromTable(G4double kinEnergy, G4double logKinEnergy); 322 339 323 inline G4double GetLambdaFromTablePrim(G4dou 340 inline G4double GetLambdaFromTablePrim(G4double kinEnergy); 324 341 325 inline G4double GetLambdaFromTablePrim(G4dou 342 inline G4double GetLambdaFromTablePrim(G4double kinEnergy, G4double logKinEnergy); 326 343 327 inline G4double GetCurrentLambda(G4double ki 344 inline G4double GetCurrentLambda(G4double kinEnergy); 328 345 329 inline G4double GetCurrentLambda(G4double ki 346 inline G4double GetCurrentLambda(G4double kinEnergy, G4double logKinEnergy); 330 347 331 inline G4double ComputeCurrentLambda(G4doubl 348 inline G4double ComputeCurrentLambda(G4double kinEnergy); 332 349 333 // ======== pointers ========= 350 // ======== pointers ========= 334 351 335 G4EmModelManager* modelManager = 352 G4EmModelManager* modelManager = nullptr; 336 const G4ParticleDefinition* particle = null 353 const G4ParticleDefinition* particle = nullptr; 337 const G4ParticleDefinition* currentParticle 354 const G4ParticleDefinition* currentParticle = nullptr; 338 const G4ParticleDefinition* theGamma = null 355 const G4ParticleDefinition* theGamma = nullptr; 339 const G4ParticleDefinition* theElectron = n 356 const G4ParticleDefinition* theElectron = nullptr; 340 const G4ParticleDefinition* thePositron = n 357 const G4ParticleDefinition* thePositron = nullptr; 341 const G4ParticleDefinition* secondaryPartic 358 const G4ParticleDefinition* secondaryParticle = nullptr; 342 const G4VEmProcess* masterProc = nu 359 const G4VEmProcess* masterProc = nullptr; 343 G4EmDataHandler* theData = nullp 360 G4EmDataHandler* theData = nullptr; 344 G4VEmModel* currentModel = 361 G4VEmModel* currentModel = nullptr; 345 G4LossTableManager* lManager = null 362 G4LossTableManager* lManager = nullptr; 346 G4EmParameters* theParameters = 363 G4EmParameters* theParameters = nullptr; 347 const G4Material* baseMaterial = 364 const G4Material* baseMaterial = nullptr; 348 365 349 // ======== tables and vectors ======== 366 // ======== tables and vectors ======== 350 G4PhysicsTable* theLambdaTable 367 G4PhysicsTable* theLambdaTable = nullptr; 351 G4PhysicsTable* theLambdaTableP 368 G4PhysicsTable* theLambdaTablePrim = nullptr; 352 369 353 const std::vector<G4double>* theCuts = nullp 370 const std::vector<G4double>* theCuts = nullptr; 354 const std::vector<G4double>* theCutsGamma = 371 const std::vector<G4double>* theCutsGamma = nullptr; 355 const std::vector<G4double>* theCutsElectron 372 const std::vector<G4double>* theCutsElectron = nullptr; 356 const std::vector<G4double>* theCutsPositron 373 const std::vector<G4double>* theCutsPositron = nullptr; 357 374 358 protected: 375 protected: 359 376 360 // ======== pointers ========= 377 // ======== pointers ========= 361 378 362 const G4MaterialCutsCouple* currentCouple = 379 const G4MaterialCutsCouple* currentCouple = nullptr; 363 const G4Material* currentMaterial 380 const G4Material* currentMaterial = nullptr; 364 G4EmBiasingManager* biasManager = n 381 G4EmBiasingManager* biasManager = nullptr; 365 std::vector<G4double>* theEnergyOfCros 382 std::vector<G4double>* theEnergyOfCrossSectionMax = nullptr; 366 383 367 private: 384 private: 368 385 369 const std::vector<G4double>* theDensityFacto 386 const std::vector<G4double>* theDensityFactor = nullptr; 370 const std::vector<G4int>* theDensityIdx = nu << 387 const std::vector<G4int>* theDensityIdx = nullptr; 371 388 372 // ======== parameters ========= 389 // ======== parameters ========= 373 G4double minKinEnergy; 390 G4double minKinEnergy; 374 G4double maxKinEnergy; 391 G4double maxKinEnergy; 375 G4double minKinEnergyPrim = DBL_MAX; 392 G4double minKinEnergyPrim = DBL_MAX; 376 G4double lambdaFactor = 0.8; 393 G4double lambdaFactor = 0.8; 377 G4double invLambdaFactor; << 394 G4double logLambdaFactor; 378 G4double biasFactor = 1.0; 395 G4double biasFactor = 1.0; 379 G4double massRatio = 1.0; 396 G4double massRatio = 1.0; 380 G4double fFactor = 1.0; 397 G4double fFactor = 1.0; 381 G4double fLambda = 0.0; 398 G4double fLambda = 0.0; 382 G4double fLambdaEnergy = 0.0; 399 G4double fLambdaEnergy = 0.0; 383 400 384 protected: 401 protected: 385 402 386 G4double mfpKinEnergy = DBL_MAX; 403 G4double mfpKinEnergy = DBL_MAX; 387 G4double preStepKinEnergy = 0.0; 404 G4double preStepKinEnergy = 0.0; >> 405 G4double preStepLogKinEnergy = LOG_EKIN_MIN; 388 G4double preStepLambda = 0.0; 406 G4double preStepLambda = 0.0; 389 407 390 private: 408 private: 391 409 392 G4CrossSectionType fXSType = fEmNoIntegral; 410 G4CrossSectionType fXSType = fEmNoIntegral; 393 411 394 G4int numberOfModels = 0; 412 G4int numberOfModels = 0; 395 G4int nLambdaBins = 84; 413 G4int nLambdaBins = 84; 396 414 397 protected: 415 protected: 398 416 399 G4int mainSecondaries = 1; 417 G4int mainSecondaries = 1; 400 G4int secID = _EM; 418 G4int secID = _EM; 401 G4int fluoID = _Fluorescence; 419 G4int fluoID = _Fluorescence; 402 G4int augerID = _AugerElectron; 420 G4int augerID = _AugerElectron; 403 G4int biasID = _EM; 421 G4int biasID = _EM; 404 G4int tripletID = _TripletElectron; 422 G4int tripletID = _TripletElectron; 405 std::size_t currentCoupleIndex = 0; << 423 size_t currentCoupleIndex = 0; 406 std::size_t basedCoupleIndex = 0; << 424 size_t basedCoupleIndex = 0; 407 std::size_t coupleIdxLambda = 0; << 425 size_t coupleIdxLambda = 0; 408 std::size_t idxLambda = 0; << 426 size_t idxLambda = 0; 409 427 410 G4bool isTheMaster = false; << 428 G4bool isTheMaster = true; 411 G4bool baseMat = false; 429 G4bool baseMat = false; 412 430 413 private: 431 private: 414 432 415 G4bool buildLambdaTable = true; 433 G4bool buildLambdaTable = true; 416 G4bool applyCuts = false; 434 G4bool applyCuts = false; 417 G4bool startFromNull = false; 435 G4bool startFromNull = false; 418 G4bool splineFlag = true; 436 G4bool splineFlag = true; 419 G4bool actMinKinEnergy = false; 437 G4bool actMinKinEnergy = false; 420 G4bool actMaxKinEnergy = false; 438 G4bool actMaxKinEnergy = false; 421 G4bool actBinning = false; 439 G4bool actBinning = false; 422 G4bool isIon = false; 440 G4bool isIon = false; 423 G4bool biasFlag = false; 441 G4bool biasFlag = false; 424 G4bool weightFlag = false; 442 G4bool weightFlag = false; 425 443 426 protected: 444 protected: 427 445 428 // ======== particle change ========= 446 // ======== particle change ========= 429 std::vector<G4DynamicParticle*> secParticles 447 std::vector<G4DynamicParticle*> secParticles; 430 G4ParticleChangeForGamma fParticleChange; 448 G4ParticleChangeForGamma fParticleChange; 431 449 432 private: 450 private: 433 451 434 // ======== local vectors ========= 452 // ======== local vectors ========= 435 std::vector<G4VEmModel*> emModels; 453 std::vector<G4VEmModel*> emModels; 436 454 437 }; 455 }; 438 456 439 // ======== Run time inline methods ========== 457 // ======== Run time inline methods ================ 440 458 >> 459 inline G4bool G4VEmProcess::ApplyCuts() const >> 460 { >> 461 return applyCuts; >> 462 } >> 463 441 //....oooOO0OOooo........oooOO0OOooo........oo 464 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 442 465 443 inline std::size_t G4VEmProcess::CurrentMateri << 466 inline size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex() const 444 { 467 { 445 return currentCoupleIndex; 468 return currentCoupleIndex; 446 } 469 } 447 470 448 //....oooOO0OOooo........oooOO0OOooo........oo 471 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 449 472 450 inline const G4MaterialCutsCouple* G4VEmProces 473 inline const G4MaterialCutsCouple* G4VEmProcess::MaterialCutsCouple() const 451 { 474 { 452 return currentCouple; 475 return currentCouple; 453 } 476 } 454 477 455 //....oooOO0OOooo........oooOO0OOooo........oo 478 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 456 479 457 inline G4double G4VEmProcess::GetGammaEnergyCu 480 inline G4double G4VEmProcess::GetGammaEnergyCut() 458 { 481 { 459 return (*theCutsGamma)[currentCoupleIndex]; 482 return (*theCutsGamma)[currentCoupleIndex]; 460 } 483 } 461 484 462 //....oooOO0OOooo........oooOO0OOooo........oo 485 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 463 486 464 inline G4double G4VEmProcess::GetElectronEnerg 487 inline G4double G4VEmProcess::GetElectronEnergyCut() 465 { 488 { 466 return (*theCutsElectron)[currentCoupleIndex 489 return (*theCutsElectron)[currentCoupleIndex]; 467 } 490 } 468 491 469 //....oooOO0OOooo........oooOO0OOooo........oo 492 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 470 493 471 inline void G4VEmProcess::DefineMaterial(const 494 inline void G4VEmProcess::DefineMaterial(const G4MaterialCutsCouple* couple) 472 { 495 { 473 if (couple != currentCouple) { << 496 if(couple != currentCouple) { 474 currentCouple = couple; 497 currentCouple = couple; 475 baseMaterial = currentMaterial = couple->G 498 baseMaterial = currentMaterial = couple->GetMaterial(); 476 basedCoupleIndex = currentCoupleIndex = co 499 basedCoupleIndex = currentCoupleIndex = couple->GetIndex(); 477 fFactor = biasFactor; 500 fFactor = biasFactor; 478 mfpKinEnergy = DBL_MAX; 501 mfpKinEnergy = DBL_MAX; 479 if (baseMat) { << 502 if(baseMat) { 480 basedCoupleIndex = (*theDensityIdx)[curr 503 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex]; 481 if (nullptr != currentMaterial->GetBaseM << 504 if(nullptr != currentMaterial->GetBaseMaterial()) 482 baseMaterial = currentMaterial->GetBas 505 baseMaterial = currentMaterial->GetBaseMaterial(); 483 fFactor *= (*theDensityFactor)[currentCo 506 fFactor *= (*theDensityFactor)[currentCoupleIndex]; 484 } 507 } 485 } 508 } 486 } 509 } 487 510 488 //....oooOO0OOooo........oooOO0OOooo........oo 511 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 489 512 490 inline 513 inline 491 G4VEmModel* G4VEmProcess::SelectModel(G4double << 514 G4VEmModel* G4VEmProcess::SelectModel(G4double kinEnergy, size_t) 492 { 515 { 493 if(1 < numberOfModels) { 516 if(1 < numberOfModels) { 494 currentModel = modelManager->SelectModel(k 517 currentModel = modelManager->SelectModel(kinEnergy, currentCoupleIndex); 495 } 518 } 496 currentModel->SetCurrentCouple(currentCouple 519 currentModel->SetCurrentCouple(currentCouple); 497 return currentModel; 520 return currentModel; 498 } 521 } 499 522 500 //....oooOO0OOooo........oooOO0OOooo........oo 523 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 501 524 502 inline 525 inline 503 G4VEmModel* G4VEmProcess::SelectModelForMateri 526 G4VEmModel* G4VEmProcess::SelectModelForMaterial(G4double kinEnergy, 504 << 527 size_t idxCouple) const 505 { 528 { 506 return modelManager->SelectModel(kinEnergy, 529 return modelManager->SelectModel(kinEnergy, idxCouple); 507 } 530 } 508 531 509 //....oooOO0OOooo........oooOO0OOooo........oo 532 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 510 533 511 inline G4double G4VEmProcess::GetLambdaFromTab 534 inline G4double G4VEmProcess::GetLambdaFromTable(G4double e) 512 { 535 { 513 return ((*theLambdaTable)[basedCoupleIndex]) 536 return ((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda); 514 } 537 } 515 538 516 //....oooOO0OOooo........oooOO0OOooo........oo 539 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 517 540 518 inline G4double G4VEmProcess::LogEkin(const G4 << 519 { << 520 return track.GetDynamicParticle()->GetLogKin << 521 } << 522 << 523 //....oooOO0OOooo........oooOO0OOooo........oo << 524 << 525 inline G4double G4VEmProcess::GetLambdaFromTab 541 inline G4double G4VEmProcess::GetLambdaFromTable(G4double e, G4double loge) 526 { 542 { 527 return ((*theLambdaTable)[basedCoupleIndex]) 543 return ((*theLambdaTable)[basedCoupleIndex])->LogVectorValue(e, loge); 528 } 544 } 529 545 530 //....oooOO0OOooo........oooOO0OOooo........oo 546 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 531 547 532 inline G4double G4VEmProcess::GetLambdaFromTab 548 inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e) 533 { 549 { 534 return ((*theLambdaTablePrim)[basedCoupleInd 550 return ((*theLambdaTablePrim)[basedCoupleIndex])->Value(e, idxLambda)/e; 535 } 551 } 536 552 537 //....oooOO0OOooo........oooOO0OOooo........oo 553 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 538 554 539 inline G4double G4VEmProcess::GetLambdaFromTab 555 inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e, G4double loge) 540 { 556 { 541 return ((*theLambdaTablePrim)[basedCoupleInd 557 return ((*theLambdaTablePrim)[basedCoupleIndex])->LogVectorValue(e, loge)/e; 542 } 558 } 543 559 544 //....oooOO0OOooo........oooOO0OOooo........oo 560 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 545 561 546 inline G4double G4VEmProcess::ComputeCurrentLa 562 inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e) 547 { 563 { 548 return currentModel->CrossSectionPerVolume(b 564 return currentModel->CrossSectionPerVolume(baseMaterial, currentParticle, e); 549 } 565 } 550 566 551 //....oooOO0OOooo........oooOO0OOooo........oo 567 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 552 568 553 inline G4double G4VEmProcess::GetCurrentLambda 569 inline G4double G4VEmProcess::GetCurrentLambda(G4double e) 554 { 570 { 555 if(currentCoupleIndex != coupleIdxLambda || 571 if(currentCoupleIndex != coupleIdxLambda || fLambdaEnergy != e) { 556 coupleIdxLambda = currentCoupleIndex; 572 coupleIdxLambda = currentCoupleIndex; 557 fLambdaEnergy = e; 573 fLambdaEnergy = e; 558 if(e >= minKinEnergyPrim) { fLambda = GetL 574 if(e >= minKinEnergyPrim) { fLambda = GetLambdaFromTablePrim(e); } 559 else if(nullptr != theLambdaTable) { fLamb 575 else if(nullptr != theLambdaTable) { fLambda = GetLambdaFromTable(e); } 560 else { fLambda = ComputeCurrentLambda(e); 576 else { fLambda = ComputeCurrentLambda(e); } 561 fLambda *= fFactor; 577 fLambda *= fFactor; 562 } 578 } 563 return fLambda; 579 return fLambda; 564 } 580 } 565 581 566 //....oooOO0OOooo........oooOO0OOooo........oo 582 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 567 583 568 inline G4double G4VEmProcess::GetCurrentLambda 584 inline G4double G4VEmProcess::GetCurrentLambda(G4double e, G4double loge) 569 { 585 { 570 if(currentCoupleIndex != coupleIdxLambda || 586 if(currentCoupleIndex != coupleIdxLambda || fLambdaEnergy != e) { 571 coupleIdxLambda = currentCoupleIndex; 587 coupleIdxLambda = currentCoupleIndex; 572 fLambdaEnergy = e; 588 fLambdaEnergy = e; 573 if(e >= minKinEnergyPrim) { fLambda = GetL 589 if(e >= minKinEnergyPrim) { fLambda = GetLambdaFromTablePrim(e, loge); } 574 else if(nullptr != theLambdaTable) { fLamb 590 else if(nullptr != theLambdaTable) { fLambda = GetLambdaFromTable(e, loge); } 575 else { fLambda = ComputeCurrentLambda(e); 591 else { fLambda = ComputeCurrentLambda(e); } 576 fLambda *= fFactor; 592 fLambda *= fFactor; 577 } 593 } 578 return fLambda; 594 return fLambda; 579 } 595 } 580 596 581 //....oooOO0OOooo........oooOO0OOooo........oo 597 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 582 598 583 inline void 599 inline void 584 G4VEmProcess::CurrentSetup(const G4MaterialCut 600 G4VEmProcess::CurrentSetup(const G4MaterialCutsCouple* couple, G4double energy) 585 { 601 { 586 DefineMaterial(couple); 602 DefineMaterial(couple); 587 SelectModel(energy*massRatio, currentCoupleI 603 SelectModel(energy*massRatio, currentCoupleIndex); 588 } 604 } 589 605 590 //....oooOO0OOooo........oooOO0OOooo........oo 606 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 591 607 592 inline G4double 608 inline G4double 593 G4VEmProcess::GetLambda(G4double kinEnergy, co 609 G4VEmProcess::GetLambda(G4double kinEnergy, const G4MaterialCutsCouple* couple, 594 G4double logKinEnergy) 610 G4double logKinEnergy) 595 { 611 { 596 CurrentSetup(couple, kinEnergy); 612 CurrentSetup(couple, kinEnergy); 597 return GetCurrentLambda(kinEnergy, logKinEne 613 return GetCurrentLambda(kinEnergy, logKinEnergy); 598 } 614 } 599 615 600 //....oooOO0OOooo........oooOO0OOooo........oo 616 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 601 617 602 G4double G4VEmProcess::MeanFreePath(const G4Tr << 618 inline G4double >> 619 G4VEmProcess::RecalculateLambda(G4double e, const G4MaterialCutsCouple* couple) 603 { 620 { 604 const G4double kinEnergy = track.GetKineticE << 621 CurrentSetup(couple, e); 605 CurrentSetup(track.GetMaterialCutsCouple(), << 622 return fFactor*ComputeCurrentLambda(e); 606 const G4double xs = GetCurrentLambda(kinEner << 607 track.GetDynamicP << 608 return (0.0 < xs) ? 1.0/xs : DBL_MAX; << 609 } 623 } 610 624 611 // ======== Get/Set inline methods used at ini 625 // ======== Get/Set inline methods used at initialisation ================ 612 626 613 inline G4bool G4VEmProcess::ApplyCuts() const << 614 { << 615 return applyCuts; << 616 } << 617 << 618 //....oooOO0OOooo........oooOO0OOooo........oo 627 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 619 628 620 inline G4int G4VEmProcess::LambdaBinning() con 629 inline G4int G4VEmProcess::LambdaBinning() const 621 { 630 { 622 return nLambdaBins; 631 return nLambdaBins; 623 } 632 } 624 633 625 //....oooOO0OOooo........oooOO0OOooo........oo 634 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 626 635 627 inline G4double G4VEmProcess::MinKinEnergy() c 636 inline G4double G4VEmProcess::MinKinEnergy() const 628 { 637 { 629 return minKinEnergy; 638 return minKinEnergy; 630 } 639 } 631 640 632 //....oooOO0OOooo........oooOO0OOooo........oo 641 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 633 642 634 inline G4double G4VEmProcess::MaxKinEnergy() c 643 inline G4double G4VEmProcess::MaxKinEnergy() const 635 { 644 { 636 return maxKinEnergy; 645 return maxKinEnergy; 637 } 646 } 638 647 639 //....oooOO0OOooo........oooOO0OOooo........oo 648 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 640 649 641 inline G4double G4VEmProcess::CrossSectionBias 650 inline G4double G4VEmProcess::CrossSectionBiasingFactor() const 642 { 651 { 643 return biasFactor; 652 return biasFactor; 644 } 653 } 645 654 646 //....oooOO0OOooo........oooOO0OOooo........oo 655 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 647 656 648 inline G4PhysicsTable* G4VEmProcess::LambdaTab 657 inline G4PhysicsTable* G4VEmProcess::LambdaTable() const 649 { 658 { 650 return theLambdaTable; 659 return theLambdaTable; 651 } 660 } 652 661 653 //....oooOO0OOooo........oooOO0OOooo........oo 662 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 654 663 655 inline G4PhysicsTable* G4VEmProcess::LambdaTab 664 inline G4PhysicsTable* G4VEmProcess::LambdaTablePrim() const 656 { 665 { 657 return theLambdaTablePrim; 666 return theLambdaTablePrim; 658 } 667 } 659 668 660 //....oooOO0OOooo........oooOO0OOooo........oo 669 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 661 670 662 inline void G4VEmProcess::SetLambdaTable(G4Phy << 663 { << 664 theLambdaTable = ptr; << 665 } << 666 << 667 //....oooOO0OOooo........oooOO0OOooo........oo << 668 << 669 inline void G4VEmProcess::SetLambdaTablePrim(G << 670 { << 671 theLambdaTablePrim = ptr; << 672 } << 673 << 674 //....oooOO0OOooo........oooOO0OOooo........oo << 675 << 676 inline std::vector<G4double>* G4VEmProcess::En 671 inline std::vector<G4double>* G4VEmProcess::EnergyOfCrossSectionMax() const 677 { 672 { 678 return theEnergyOfCrossSectionMax; 673 return theEnergyOfCrossSectionMax; 679 } 674 } 680 675 681 //....oooOO0OOooo........oooOO0OOooo........oo 676 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 682 677 683 inline void << 684 G4VEmProcess::SetEnergyOfCrossSectionMax(std:: << 685 { << 686 theEnergyOfCrossSectionMax = ptr; << 687 } << 688 << 689 //....oooOO0OOooo........oooOO0OOooo........oo << 690 << 691 inline const G4ParticleDefinition* G4VEmProces 678 inline const G4ParticleDefinition* G4VEmProcess::Particle() const 692 { 679 { 693 return particle; 680 return particle; 694 } 681 } 695 682 696 //....oooOO0OOooo........oooOO0OOooo........oo 683 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 697 684 698 inline const G4ParticleDefinition* G4VEmProces 685 inline const G4ParticleDefinition* G4VEmProcess::SecondaryParticle() const 699 { 686 { 700 return secondaryParticle; 687 return secondaryParticle; 701 } 688 } 702 689 703 //....oooOO0OOooo........oooOO0OOooo........oo 690 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 704 691 705 inline void G4VEmProcess::SetCrossSectionType( 692 inline void G4VEmProcess::SetCrossSectionType(G4CrossSectionType val) 706 { 693 { 707 fXSType = val; 694 fXSType = val; 708 } 695 } 709 696 710 //....oooOO0OOooo........oooOO0OOooo........oo 697 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 711 698 712 inline G4CrossSectionType G4VEmProcess::CrossS 699 inline G4CrossSectionType G4VEmProcess::CrossSectionType() const 713 { 700 { 714 return fXSType; 701 return fXSType; 715 } 702 } 716 703 717 //....oooOO0OOooo........oooOO0OOooo........oo 704 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 718 705 719 inline void G4VEmProcess::SetBuildTableFlag(G4 706 inline void G4VEmProcess::SetBuildTableFlag(G4bool val) 720 { 707 { 721 buildLambdaTable = val; 708 buildLambdaTable = val; 722 } 709 } 723 710 724 //....oooOO0OOooo........oooOO0OOooo........oo 711 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 725 712 726 inline G4ParticleChangeForGamma* G4VEmProcess: 713 inline G4ParticleChangeForGamma* G4VEmProcess::GetParticleChange() 727 { 714 { 728 return &fParticleChange; 715 return &fParticleChange; 729 } 716 } 730 717 731 //....oooOO0OOooo........oooOO0OOooo........oo 718 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 732 719 733 inline void G4VEmProcess::SetParticle(const G4 720 inline void G4VEmProcess::SetParticle(const G4ParticleDefinition* p) 734 { 721 { 735 particle = p; 722 particle = p; 736 currentParticle = p; 723 currentParticle = p; 737 } 724 } 738 725 739 //....oooOO0OOooo........oooOO0OOooo........oo 726 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 740 727 741 inline void G4VEmProcess::SetSecondaryParticle 728 inline void G4VEmProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 742 { 729 { 743 secondaryParticle = p; 730 secondaryParticle = p; 744 } 731 } 745 732 746 //....oooOO0OOooo........oooOO0OOooo........oo 733 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 747 734 748 inline void G4VEmProcess::SetStartFromNullFlag 735 inline void G4VEmProcess::SetStartFromNullFlag(G4bool val) 749 { 736 { 750 startFromNull = val; 737 startFromNull = val; 751 } 738 } 752 739 753 //....oooOO0OOooo........oooOO0OOooo........oo 740 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 754 741 755 inline void G4VEmProcess::SetSplineFlag(G4bool 742 inline void G4VEmProcess::SetSplineFlag(G4bool val) 756 { 743 { 757 splineFlag = val; 744 splineFlag = val; 758 } 745 } 759 746 760 //....oooOO0OOooo........oooOO0OOooo........oo 747 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 761 748 >> 749 inline const G4Element* G4VEmProcess::GetTargetElement() const >> 750 { >> 751 return currentModel->GetCurrentElement(); >> 752 } >> 753 >> 754 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 755 >> 756 inline const G4Isotope* G4VEmProcess::GetTargetIsotope() const >> 757 { >> 758 return currentModel->GetCurrentIsotope(); >> 759 } >> 760 >> 761 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 762 762 inline G4int G4VEmProcess::DensityIndex(G4int 763 inline G4int G4VEmProcess::DensityIndex(G4int idx) const 763 { 764 { 764 return (*theDensityIdx)[idx]; 765 return (*theDensityIdx)[idx]; 765 } 766 } 766 767 767 //....oooOO0OOooo........oooOO0OOooo........oo 768 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 768 769 769 inline G4double G4VEmProcess::DensityFactor(G4 770 inline G4double G4VEmProcess::DensityFactor(G4int idx) const 770 { 771 { 771 return (*theDensityFactor)[idx]; 772 return (*theDensityFactor)[idx]; 772 } 773 } 773 774 774 //....oooOO0OOooo........oooOO0OOooo........oo 775 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 775 776 776 inline G4bool G4VEmProcess::UseBaseMaterial() 777 inline G4bool G4VEmProcess::UseBaseMaterial() const 777 { 778 { 778 return baseMat; 779 return baseMat; 779 } 780 } 780 781 781 //....oooOO0OOooo........oooOO0OOooo........oo 782 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 782 783 783 inline const G4VEmModel* G4VEmProcess::GetCurr 784 inline const G4VEmModel* G4VEmProcess::GetCurrentModel() const 784 { 785 { 785 return currentModel; 786 return currentModel; 786 } 787 } 787 788 788 //....oooOO0OOooo........oooOO0OOooo........oo 789 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 789 790 790 inline void G4VEmProcess::SetEmMasterProcess(c 791 inline void G4VEmProcess::SetEmMasterProcess(const G4VEmProcess* ptr) 791 { 792 { 792 masterProc = ptr; 793 masterProc = ptr; 793 } 794 } 794 795 795 //....oooOO0OOooo........oooOO0OOooo........oo 796 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 796 797 797 inline G4int G4VEmProcess::NumberOfModels() co 798 inline G4int G4VEmProcess::NumberOfModels() const 798 { 799 { 799 return numberOfModels; 800 return numberOfModels; 800 } 801 } 801 802 802 //....oooOO0OOooo........oooOO0OOooo........oo 803 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 803 804 804 inline G4VEmModel* G4VEmProcess::EmModel(std:: << 805 inline G4VEmModel* G4VEmProcess::EmModel(size_t index) const 805 { 806 { 806 return (index < emModels.size()) ? emModels[ 807 return (index < emModels.size()) ? emModels[index] : nullptr; 807 } << 808 << 809 //....oooOO0OOooo........oooOO0OOooo........oo << 810 << 811 inline G4VEmModel* G4VEmProcess::GetModelByInd << 812 { << 813 return modelManager->GetModel(idx, ver); << 814 } 808 } 815 809 816 //....oooOO0OOooo........oooOO0OOooo........oo 810 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 817 811 818 #endif 812 #endif 819 813