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