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 93264 2015-10-14 09:30:04Z 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) = 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&); 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&); 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*); 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); 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&, const G4Step&); 119 146 120 // Store PhysicsTable in a file. 147 // Store PhysicsTable in a file. 121 // Return false in case of failure at I/O 148 // Return false in case of failure at I/O 122 G4bool StorePhysicsTable(const G4ParticleDef << 149 virtual G4bool StorePhysicsTable(const G4ParticleDefinition*, 123 const G4String& dir << 150 const G4String& directory, 124 G4bool ascii = fals << 151 G4bool ascii = false); 125 152 126 // Retrieve Physics from a file. 153 // Retrieve Physics from a file. 127 // (return true if the Physics Table can be 154 // (return true if the Physics Table can be build by using file) 128 // (return false if the process has no funct 155 // (return false if the process has no functionality or in case of failure) 129 // File name should is constructed as proces 156 // File name should is constructed as processName+particleName and the 130 // should be placed under the directory spec << 157 // should be placed under the directory specifed by the argument. 131 G4bool RetrievePhysicsTable(const G4Particle << 158 virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition*, 132 const G4String& << 159 const G4String& directory, 133 G4bool ascii) ov << 160 G4bool ascii); 134 << 135 // allowing check process name << 136 virtual G4VEmProcess* GetEmProcess(const G4S << 137 161 138 //------------------------------------------ 162 //------------------------------------------------------------------------ 139 // Specific methods for Discrete EM post ste 163 // Specific methods for Discrete EM post step simulation 140 //------------------------------------------ 164 //------------------------------------------------------------------------ 141 165 142 // The main method to access cross section p << 166 // It returns the cross section per volume for energy/ material 143 inline G4double GetLambda(G4double kinEnergy << 167 G4double CrossSectionPerVolume(G4double kineticEnergy, 144 const G4MaterialCu << 168 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 169 151 // It returns the cross section of the proce 170 // It returns the cross section of the process per atom 152 G4double ComputeCrossSectionPerAtom(G4double 171 G4double ComputeCrossSectionPerAtom(G4double kineticEnergy, 153 G4double 172 G4double Z, G4double A=0., 154 G4double 173 G4double cut=0.0); 155 174 156 inline G4double MeanFreePath(const G4Track& << 175 G4double MeanFreePath(const G4Track& track); >> 176 >> 177 // It returns cross section per volume >> 178 inline G4double GetLambda(G4double& kinEnergy, >> 179 const G4MaterialCutsCouple* couple); 157 180 158 //------------------------------------------ 181 //------------------------------------------------------------------------ 159 // Specific methods to build and access Phys 182 // Specific methods to build and access Physics Tables 160 //------------------------------------------ 183 //------------------------------------------------------------------------ 161 184 162 // Binning for lambda table 185 // Binning for lambda table 163 void SetLambdaBinning(G4int nbins); 186 void SetLambdaBinning(G4int nbins); 164 187 165 // Min kinetic energy for tables 188 // Min kinetic energy for tables 166 void SetMinKinEnergy(G4double e); 189 void SetMinKinEnergy(G4double e); 167 190 168 // Min kinetic energy for high energy table 191 // Min kinetic energy for high energy table 169 void SetMinKinEnergyPrim(G4double e); 192 void SetMinKinEnergyPrim(G4double e); 170 193 171 // Max kinetic energy for tables 194 // Max kinetic energy for tables 172 void SetMaxKinEnergy(G4double e); 195 void SetMaxKinEnergy(G4double e); 173 196 174 // Cross section table pointers 197 // Cross section table pointers 175 inline G4PhysicsTable* LambdaTable() const; 198 inline G4PhysicsTable* LambdaTable() const; 176 inline G4PhysicsTable* LambdaTablePrim() con 199 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 200 186 //------------------------------------------ 201 //------------------------------------------------------------------------ 187 // Define and access particle type 202 // Define and access particle type 188 //------------------------------------------ 203 //------------------------------------------------------------------------ 189 204 190 inline const G4ParticleDefinition* Particle( 205 inline const G4ParticleDefinition* Particle() const; 191 inline const G4ParticleDefinition* Secondary 206 inline const G4ParticleDefinition* SecondaryParticle() const; 192 207 193 protected: << 194 << 195 //------------------------------------------ 208 //------------------------------------------------------------------------ 196 // Specific methods to set, access, modify m 209 // Specific methods to set, access, modify models and basic parameters 197 //------------------------------------------ 210 //------------------------------------------------------------------------ 198 << 211 >> 212 protected: 199 // Select model in run time 213 // Select model in run time 200 inline G4VEmModel* SelectModel(G4double kinE << 214 inline G4VEmModel* SelectModel(G4double& kinEnergy, size_t index); 201 215 202 public: 216 public: 203 << 217 // Select model by energy and region index 204 // Select model by energy and couple index << 205 inline G4VEmModel* SelectModelForMaterial(G4 218 inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy, 206 st << 219 size_t& idxRegion) const; 207 220 208 // Add model for region, smaller value of or 221 // Add model for region, smaller value of order defines which 209 // model will be selected for a given energy 222 // model will be selected for a given energy interval 210 void AddEmModel(G4int, G4VEmModel*, const G4 << 223 void AddEmModel(G4int, G4VEmModel*, const G4Region* region = 0); 211 224 212 // Assign a model to a process local list, t << 225 // return the assigned model 213 // the derived process should execute AddEmM << 226 G4VEmModel* EmModel(G4int index = 1) const; 214 void SetEmModel(G4VEmModel*, G4int index = 0 << 215 227 216 inline G4int NumberOfModels() const; << 228 // Assign a model to a process >> 229 void SetEmModel(G4VEmModel*, G4int index = 1); 217 230 218 // return a model from the local list << 231 // Define new energy range for the model identified by the name 219 inline G4VEmModel* EmModel(std::size_t index << 232 void UpdateEmModel(const G4String&, G4double, G4double); 220 << 221 // Access to active model << 222 inline const G4VEmModel* GetCurrentModel() c << 223 233 224 // Access to models 234 // Access to models 225 inline G4VEmModel* GetModelByIndex(G4int idx << 235 G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false) const; 226 236 227 // Access to the current G4Element << 237 // access atom on which interaction happens 228 const G4Element* GetCurrentElement() const; 238 const G4Element* GetCurrentElement() const; 229 239 >> 240 // access to active model >> 241 inline const G4VEmModel* GetCurrentModel() const; >> 242 230 // Biasing parameters 243 // Biasing parameters 231 void SetCrossSectionBiasingFactor(G4double f 244 void SetCrossSectionBiasingFactor(G4double f, G4bool flag = true); 232 inline G4double CrossSectionBiasingFactor() 245 inline G4double CrossSectionBiasingFactor() const; 233 246 234 // Activate forced interaction 247 // Activate forced interaction 235 void ActivateForcedInteraction(G4double leng 248 void ActivateForcedInteraction(G4double length = 0.0, 236 const G4Strin 249 const G4String& r = "", 237 G4bool flag = 250 G4bool flag = true); 238 251 239 void ActivateSecondaryBiasing(const G4String 252 void ActivateSecondaryBiasing(const G4String& region, G4double factor, 240 G4double energ << 253 G4double energyLimit); 241 << 254 242 inline void SetEmMasterProcess(const G4VEmPr << 255 inline void SetIntegral(G4bool val); 243 256 244 inline void SetBuildTableFlag(G4bool val); 257 inline void SetBuildTableFlag(G4bool val); 245 258 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 //------------------------------------------ 259 //------------------------------------------------------------------------ 260 // Other generic methods 260 // Other generic methods 261 //------------------------------------------ 261 //------------------------------------------------------------------------ 262 262 263 protected: 263 protected: 264 264 265 G4double GetMeanFreePath(const G4Track& trac << 265 virtual G4double GetMeanFreePath(const G4Track& track, 266 G4double previousSt << 266 G4double previousStepSize, 267 G4ForceCondition* c << 267 G4ForceCondition* condition); 268 268 269 G4PhysicsVector* LambdaPhysicsVector(const G 269 G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*); 270 270 271 inline void DefineMaterial(const G4MaterialC << 272 << 273 inline G4int LambdaBinning() const; 271 inline G4int LambdaBinning() const; 274 272 275 inline G4double MinKinEnergy() const; 273 inline G4double MinKinEnergy() const; 276 274 277 inline G4double MaxKinEnergy() const; 275 inline G4double MaxKinEnergy() const; 278 276 279 // Single scattering parameters 277 // Single scattering parameters 280 inline G4double PolarAngleLimit() const; 278 inline G4double PolarAngleLimit() const; 281 279 >> 280 inline G4bool IsIntegral() const; >> 281 >> 282 inline G4double RecalculateLambda(G4double kinEnergy, >> 283 const G4MaterialCutsCouple* couple); >> 284 282 inline G4ParticleChangeForGamma* GetParticle 285 inline G4ParticleChangeForGamma* GetParticleChange(); 283 286 284 inline void SetParticle(const G4ParticleDefi 287 inline void SetParticle(const G4ParticleDefinition* p); 285 288 286 inline void SetSecondaryParticle(const G4Par 289 inline void SetSecondaryParticle(const G4ParticleDefinition* p); 287 290 288 inline std::size_t CurrentMaterialCutsCouple << 291 inline size_t CurrentMaterialCutsCoupleIndex() const; 289 << 290 inline const G4MaterialCutsCouple* MaterialC << 291 << 292 inline G4bool ApplyCuts() const; << 293 292 294 inline G4double GetGammaEnergyCut(); 293 inline G4double GetGammaEnergyCut(); 295 294 296 inline G4double GetElectronEnergyCut(); 295 inline G4double GetElectronEnergyCut(); 297 296 298 inline void SetStartFromNullFlag(G4bool val) 297 inline void SetStartFromNullFlag(G4bool val); 299 298 300 inline void SetSplineFlag(G4bool val); 299 inline void SetSplineFlag(G4bool val); 301 300 302 const G4Element* GetTargetElement() const; << 301 inline const G4Element* GetTargetElement() const; 303 << 304 const G4Isotope* GetTargetIsotope() const; << 305 302 306 // these two methods assume that vectors are << 303 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 304 311 private: 305 private: 312 306 >> 307 void Clear(); >> 308 >> 309 void BuildLambdaTable(); >> 310 >> 311 void PrintInfoProcess(const G4ParticleDefinition&); >> 312 >> 313 void FindLambdaMax(); >> 314 313 void PrintWarning(G4String tit, G4double val 315 void PrintWarning(G4String tit, G4double val); 314 316 315 void ComputeIntegralLambda(G4double kinEnerg << 317 inline void DefineMaterial(const G4MaterialCutsCouple* couple); 316 318 317 inline G4double LogEkin(const G4Track&); << 319 inline void ComputeIntegralLambda(G4double kinEnergy); 318 320 319 inline G4double GetLambdaFromTable(G4double 321 inline G4double GetLambdaFromTable(G4double kinEnergy); 320 322 321 inline G4double GetLambdaFromTable(G4double << 322 << 323 inline G4double GetLambdaFromTablePrim(G4dou 323 inline G4double GetLambdaFromTablePrim(G4double kinEnergy); 324 324 325 inline G4double GetLambdaFromTablePrim(G4dou << 326 << 327 inline G4double GetCurrentLambda(G4double ki 325 inline G4double GetCurrentLambda(G4double kinEnergy); 328 326 329 inline G4double GetCurrentLambda(G4double ki << 330 << 331 inline G4double ComputeCurrentLambda(G4doubl 327 inline G4double ComputeCurrentLambda(G4double kinEnergy); 332 328 333 // ======== pointers ========= << 329 // copy constructor and hide assignment operator 334 << 330 G4VEmProcess(G4VEmProcess &); 335 G4EmModelManager* modelManager = << 331 G4VEmProcess & operator=(const G4VEmProcess &right); 336 const G4ParticleDefinition* particle = null << 332 337 const G4ParticleDefinition* currentParticle << 333 // ======== Parameters of the class fixed at construction ========= 338 const G4ParticleDefinition* theGamma = null << 334 339 const G4ParticleDefinition* theElectron = n << 335 G4LossTableManager* lManager; 340 const G4ParticleDefinition* thePositron = n << 336 G4EmParameters* theParameters; 341 const G4ParticleDefinition* secondaryPartic << 337 G4EmModelManager* modelManager; 342 const G4VEmProcess* masterProc = nu << 338 G4EmBiasingManager* biasManager; 343 G4EmDataHandler* theData = nullp << 339 const G4ParticleDefinition* theGamma; 344 G4VEmModel* currentModel = << 340 const G4ParticleDefinition* theElectron; 345 G4LossTableManager* lManager = null << 341 const G4ParticleDefinition* thePositron; 346 G4EmParameters* theParameters = << 342 const G4ParticleDefinition* secondaryParticle; 347 const G4Material* baseMaterial = << 343 348 << 344 G4bool buildLambdaTable; 349 // ======== tables and vectors ======== << 345 350 G4PhysicsTable* theLambdaTable << 346 // ======== Parameters of the class fixed at initialisation ======= 351 G4PhysicsTable* theLambdaTableP << 347 352 << 348 std::vector<G4VEmModel*> emModels; 353 const std::vector<G4double>* theCuts = nullp << 349 G4int numberOfModels; 354 const std::vector<G4double>* theCutsGamma = << 350 355 const std::vector<G4double>* theCutsElectron << 351 // tables and vectors 356 const std::vector<G4double>* theCutsPositron << 352 G4PhysicsTable* theLambdaTable; 357 << 353 G4PhysicsTable* theLambdaTablePrim; 358 protected: << 354 std::vector<G4double> theEnergyOfCrossSectionMax; 359 << 355 std::vector<G4double> theCrossSectionMax; 360 // ======== pointers ========= << 356 361 << 357 size_t idxLambda; 362 const G4MaterialCutsCouple* currentCouple = << 358 size_t idxLambdaPrim; 363 const G4Material* currentMaterial << 359 364 G4EmBiasingManager* biasManager = n << 360 const std::vector<G4double>* theCuts; 365 std::vector<G4double>* theEnergyOfCros << 361 const std::vector<G4double>* theCutsGamma; 366 << 362 const std::vector<G4double>* theCutsElectron; 367 private: << 363 const std::vector<G4double>* theCutsPositron; 368 << 364 const std::vector<G4double>* theDensityFactor; 369 const std::vector<G4double>* theDensityFacto << 365 const std::vector<G4int>* theDensityIdx; 370 const std::vector<G4int>* theDensityIdx = nu << 366 371 << 367 G4int nLambdaBins; 372 // ======== parameters ========= << 368 373 G4double minKinEnergy; << 369 G4double minKinEnergy; 374 G4double maxKinEnergy; << 370 G4double minKinEnergyPrim; 375 G4double minKinEnergyPrim = DBL_MAX; << 371 G4double maxKinEnergy; 376 G4double lambdaFactor = 0.8; << 372 G4double lambdaFactor; 377 G4double invLambdaFactor; << 373 G4double biasFactor; 378 G4double biasFactor = 1.0; << 374 379 G4double massRatio = 1.0; << 375 G4bool integral; 380 G4double fFactor = 1.0; << 376 G4bool applyCuts; 381 G4double fLambda = 0.0; << 377 G4bool startFromNull; 382 G4double fLambdaEnergy = 0.0; << 378 G4bool splineFlag; 383 << 379 G4bool actMinKinEnergy; 384 protected: << 380 G4bool actMaxKinEnergy; 385 << 381 G4bool actBinning; 386 G4double mfpKinEnergy = DBL_MAX; << 382 G4bool actSpline; 387 G4double preStepKinEnergy = 0.0; << 388 G4double preStepLambda = 0.0; << 389 383 390 private: << 384 // ======== Cashed values - may be state dependent ================ 391 << 392 G4CrossSectionType fXSType = fEmNoIntegral; << 393 << 394 G4int numberOfModels = 0; << 395 G4int nLambdaBins = 84; << 396 385 397 protected: 386 protected: 398 387 399 G4int mainSecondaries = 1; << 388 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 389 413 private: 390 private: 414 391 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 392 std::vector<G4DynamicParticle*> secParticles; 430 G4ParticleChangeForGamma fParticleChange; << 431 393 432 private: << 394 G4VEmModel* currentModel; 433 395 434 // ======== local vectors ========= << 396 const G4ParticleDefinition* particle; 435 std::vector<G4VEmModel*> emModels; << 397 const G4ParticleDefinition* currentParticle; 436 398 >> 399 // cash >> 400 const G4Material* baseMaterial; >> 401 const G4Material* currentMaterial; >> 402 const G4MaterialCutsCouple* currentCouple; >> 403 size_t currentCoupleIndex; >> 404 size_t basedCoupleIndex; >> 405 >> 406 G4double mfpKinEnergy; >> 407 G4double preStepKinEnergy; >> 408 G4double preStepLambda; >> 409 G4double fFactor; >> 410 G4bool biasFlag; >> 411 G4bool weightFlag; >> 412 >> 413 G4int mainSecondaries; >> 414 G4int secID; >> 415 G4int fluoID; >> 416 G4int augerID; >> 417 G4int biasID; 437 }; 418 }; 438 419 439 // ======== Run time inline methods ========== 420 // ======== Run time inline methods ================ 440 421 441 //....oooOO0OOooo........oooOO0OOooo........oo << 422 inline size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex() const 442 << 443 inline std::size_t G4VEmProcess::CurrentMateri << 444 { 423 { 445 return currentCoupleIndex; 424 return currentCoupleIndex; 446 } 425 } 447 426 448 //....oooOO0OOooo........oooOO0OOooo........oo 427 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 449 428 450 inline const G4MaterialCutsCouple* G4VEmProces << 451 { << 452 return currentCouple; << 453 } << 454 << 455 //....oooOO0OOooo........oooOO0OOooo........oo << 456 << 457 inline G4double G4VEmProcess::GetGammaEnergyCu 429 inline G4double G4VEmProcess::GetGammaEnergyCut() 458 { 430 { 459 return (*theCutsGamma)[currentCoupleIndex]; 431 return (*theCutsGamma)[currentCoupleIndex]; 460 } 432 } 461 433 462 //....oooOO0OOooo........oooOO0OOooo........oo 434 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 463 435 464 inline G4double G4VEmProcess::GetElectronEnerg 436 inline G4double G4VEmProcess::GetElectronEnergyCut() 465 { 437 { 466 return (*theCutsElectron)[currentCoupleIndex 438 return (*theCutsElectron)[currentCoupleIndex]; 467 } 439 } 468 440 469 //....oooOO0OOooo........oooOO0OOooo........oo 441 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 470 442 471 inline void G4VEmProcess::DefineMaterial(const 443 inline void G4VEmProcess::DefineMaterial(const G4MaterialCutsCouple* couple) 472 { 444 { 473 if (couple != currentCouple) { << 445 if(couple != currentCouple) { 474 currentCouple = couple; << 446 currentCouple = couple; 475 baseMaterial = currentMaterial = couple->G << 447 currentMaterial = couple->GetMaterial(); 476 basedCoupleIndex = currentCoupleIndex = co << 448 baseMaterial = currentMaterial->GetBaseMaterial(); 477 fFactor = biasFactor; << 449 currentCoupleIndex = couple->GetIndex(); >> 450 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex]; >> 451 fFactor = biasFactor*(*theDensityFactor)[currentCoupleIndex]; >> 452 if(!baseMaterial) { baseMaterial = currentMaterial; } 478 mfpKinEnergy = DBL_MAX; 453 mfpKinEnergy = DBL_MAX; 479 if (baseMat) { << 454 idxLambda = idxLambdaPrim = 0; 480 basedCoupleIndex = (*theDensityIdx)[curr << 481 if (nullptr != currentMaterial->GetBaseM << 482 baseMaterial = currentMaterial->GetBas << 483 fFactor *= (*theDensityFactor)[currentCo << 484 } << 485 } 455 } 486 } 456 } 487 457 488 //....oooOO0OOooo........oooOO0OOooo........oo 458 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 489 459 490 inline 460 inline 491 G4VEmModel* G4VEmProcess::SelectModel(G4double << 461 G4VEmModel* G4VEmProcess::SelectModel(G4double& kinEnergy, size_t index) 492 { 462 { 493 if(1 < numberOfModels) { 463 if(1 < numberOfModels) { 494 currentModel = modelManager->SelectModel(k << 464 currentModel = modelManager->SelectModel(kinEnergy, index); 495 } 465 } 496 currentModel->SetCurrentCouple(currentCouple 466 currentModel->SetCurrentCouple(currentCouple); 497 return currentModel; 467 return currentModel; 498 } 468 } 499 469 500 //....oooOO0OOooo........oooOO0OOooo........oo 470 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 501 471 502 inline 472 inline 503 G4VEmModel* G4VEmProcess::SelectModelForMateri 473 G4VEmModel* G4VEmProcess::SelectModelForMaterial(G4double kinEnergy, 504 << 474 size_t& idxRegion) const 505 { 475 { 506 return modelManager->SelectModel(kinEnergy, << 476 return modelManager->SelectModel(kinEnergy, idxRegion); 507 } 477 } 508 478 509 //....oooOO0OOooo........oooOO0OOooo........oo 479 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 510 480 511 inline G4double G4VEmProcess::GetLambdaFromTab 481 inline G4double G4VEmProcess::GetLambdaFromTable(G4double e) 512 { 482 { 513 return ((*theLambdaTable)[basedCoupleIndex]) 483 return ((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda); 514 } 484 } 515 485 516 //....oooOO0OOooo........oooOO0OOooo........oo 486 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 517 487 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 488 inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e) 533 { 489 { 534 return ((*theLambdaTablePrim)[basedCoupleInd << 490 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 } 491 } 543 492 544 //....oooOO0OOooo........oooOO0OOooo........oo 493 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 545 494 546 inline G4double G4VEmProcess::ComputeCurrentLa 495 inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e) 547 { 496 { 548 return currentModel->CrossSectionPerVolume(b << 497 return currentModel->CrossSectionPerVolume( >> 498 baseMaterial,currentParticle, e,(*theCuts)[currentCoupleIndex]); 549 } 499 } 550 500 551 //....oooOO0OOooo........oooOO0OOooo........oo 501 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 552 502 553 inline G4double G4VEmProcess::GetCurrentLambda 503 inline G4double G4VEmProcess::GetCurrentLambda(G4double e) 554 { 504 { 555 if(currentCoupleIndex != coupleIdxLambda || << 505 G4double x; 556 coupleIdxLambda = currentCoupleIndex; << 506 if(e >= minKinEnergyPrim) { x = GetLambdaFromTablePrim(e); } 557 fLambdaEnergy = e; << 507 else if(theLambdaTable) { x = GetLambdaFromTable(e); } 558 if(e >= minKinEnergyPrim) { fLambda = GetL << 508 else { x = ComputeCurrentLambda(e); } 559 else if(nullptr != theLambdaTable) { fLamb << 509 return fFactor*x; 560 else { fLambda = ComputeCurrentLambda(e); << 561 fLambda *= fFactor; << 562 } << 563 return fLambda; << 564 } << 565 << 566 //....oooOO0OOooo........oooOO0OOooo........oo << 567 << 568 inline G4double G4VEmProcess::GetCurrentLambda << 569 { << 570 if(currentCoupleIndex != coupleIdxLambda || << 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 } 510 } 580 511 581 //....oooOO0OOooo........oooOO0OOooo........oo 512 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 582 513 583 inline void << 514 inline G4double 584 G4VEmProcess::CurrentSetup(const G4MaterialCut << 515 G4VEmProcess::GetLambda(G4double& kinEnergy, >> 516 const G4MaterialCutsCouple* couple) 585 { 517 { 586 DefineMaterial(couple); 518 DefineMaterial(couple); 587 SelectModel(energy*massRatio, currentCoupleI << 519 SelectModel(kinEnergy, currentCoupleIndex); >> 520 return GetCurrentLambda(kinEnergy); 588 } 521 } 589 522 590 //....oooOO0OOooo........oooOO0OOooo........oo 523 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 591 524 592 inline G4double 525 inline G4double 593 G4VEmProcess::GetLambda(G4double kinEnergy, co << 526 G4VEmProcess::RecalculateLambda(G4double e, const G4MaterialCutsCouple* couple) 594 G4double logKinEnergy) << 595 { 527 { 596 CurrentSetup(couple, kinEnergy); << 528 DefineMaterial(couple); 597 return GetCurrentLambda(kinEnergy, logKinEne << 529 SelectModel(e, currentCoupleIndex); >> 530 return fFactor*ComputeCurrentLambda(e); 598 } 531 } 599 532 600 //....oooOO0OOooo........oooOO0OOooo........oo 533 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 601 534 602 G4double G4VEmProcess::MeanFreePath(const G4Tr << 535 inline void G4VEmProcess::ComputeIntegralLambda(G4double e) 603 { 536 { 604 const G4double kinEnergy = track.GetKineticE << 537 mfpKinEnergy = theEnergyOfCrossSectionMax[currentCoupleIndex]; 605 CurrentSetup(track.GetMaterialCutsCouple(), << 538 if (e <= mfpKinEnergy) { 606 const G4double xs = GetCurrentLambda(kinEner << 539 preStepLambda = GetCurrentLambda(e); 607 track.GetDynamicP << 540 608 return (0.0 < xs) ? 1.0/xs : DBL_MAX; << 541 } else { >> 542 G4double e1 = e*lambdaFactor; >> 543 if(e1 > mfpKinEnergy) { >> 544 preStepLambda = GetCurrentLambda(e); >> 545 G4double preStepLambda1 = GetCurrentLambda(e1); >> 546 if(preStepLambda1 > preStepLambda) { >> 547 mfpKinEnergy = e1; >> 548 preStepLambda = preStepLambda1; >> 549 } >> 550 } else { >> 551 preStepLambda = fFactor*theCrossSectionMax[currentCoupleIndex]; >> 552 } >> 553 } 609 } 554 } 610 555 611 // ======== Get/Set inline methods used at ini 556 // ======== Get/Set inline methods used at initialisation ================ 612 557 613 inline G4bool G4VEmProcess::ApplyCuts() const << 614 { << 615 return applyCuts; << 616 } << 617 << 618 //....oooOO0OOooo........oooOO0OOooo........oo 558 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 619 559 620 inline G4int G4VEmProcess::LambdaBinning() con 560 inline G4int G4VEmProcess::LambdaBinning() const 621 { 561 { 622 return nLambdaBins; 562 return nLambdaBins; 623 } 563 } 624 564 625 //....oooOO0OOooo........oooOO0OOooo........oo 565 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 626 566 627 inline G4double G4VEmProcess::MinKinEnergy() c 567 inline G4double G4VEmProcess::MinKinEnergy() const 628 { 568 { 629 return minKinEnergy; 569 return minKinEnergy; 630 } 570 } 631 571 632 //....oooOO0OOooo........oooOO0OOooo........oo 572 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 633 573 634 inline G4double G4VEmProcess::MaxKinEnergy() c 574 inline G4double G4VEmProcess::MaxKinEnergy() const 635 { 575 { 636 return maxKinEnergy; 576 return maxKinEnergy; 637 } 577 } 638 578 639 //....oooOO0OOooo........oooOO0OOooo........oo 579 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 640 580 >> 581 inline G4double G4VEmProcess::PolarAngleLimit() const >> 582 { >> 583 return theParameters->MscThetaLimit(); >> 584 } >> 585 >> 586 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 587 641 inline G4double G4VEmProcess::CrossSectionBias 588 inline G4double G4VEmProcess::CrossSectionBiasingFactor() const 642 { 589 { 643 return biasFactor; 590 return biasFactor; 644 } 591 } 645 592 646 //....oooOO0OOooo........oooOO0OOooo........oo 593 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 647 594 648 inline G4PhysicsTable* G4VEmProcess::LambdaTab 595 inline G4PhysicsTable* G4VEmProcess::LambdaTable() const 649 { 596 { 650 return theLambdaTable; 597 return theLambdaTable; 651 } 598 } 652 599 653 //....oooOO0OOooo........oooOO0OOooo........oo 600 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 654 601 655 inline G4PhysicsTable* G4VEmProcess::LambdaTab 602 inline G4PhysicsTable* G4VEmProcess::LambdaTablePrim() const 656 { 603 { 657 return theLambdaTablePrim; 604 return theLambdaTablePrim; 658 } 605 } 659 606 660 //....oooOO0OOooo........oooOO0OOooo........oo 607 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 661 608 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 609 inline const G4ParticleDefinition* G4VEmProcess::Particle() const 692 { 610 { 693 return particle; 611 return particle; 694 } 612 } 695 613 696 //....oooOO0OOooo........oooOO0OOooo........oo 614 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 697 615 698 inline const G4ParticleDefinition* G4VEmProces 616 inline const G4ParticleDefinition* G4VEmProcess::SecondaryParticle() const 699 { 617 { 700 return secondaryParticle; 618 return secondaryParticle; 701 } 619 } 702 620 703 //....oooOO0OOooo........oooOO0OOooo........oo 621 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 704 622 705 inline void G4VEmProcess::SetCrossSectionType( << 623 inline void G4VEmProcess::SetIntegral(G4bool val) 706 { 624 { 707 fXSType = val; << 625 integral = val; 708 } 626 } 709 627 710 //....oooOO0OOooo........oooOO0OOooo........oo 628 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 711 629 712 inline G4CrossSectionType G4VEmProcess::CrossS << 630 inline G4bool G4VEmProcess::IsIntegral() const 713 { 631 { 714 return fXSType; << 632 return integral; 715 } 633 } 716 634 717 //....oooOO0OOooo........oooOO0OOooo........oo 635 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 718 636 719 inline void G4VEmProcess::SetBuildTableFlag(G4 637 inline void G4VEmProcess::SetBuildTableFlag(G4bool val) 720 { 638 { 721 buildLambdaTable = val; 639 buildLambdaTable = val; 722 } 640 } 723 641 724 //....oooOO0OOooo........oooOO0OOooo........oo 642 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 725 643 726 inline G4ParticleChangeForGamma* G4VEmProcess: 644 inline G4ParticleChangeForGamma* G4VEmProcess::GetParticleChange() 727 { 645 { 728 return &fParticleChange; 646 return &fParticleChange; 729 } 647 } 730 648 731 //....oooOO0OOooo........oooOO0OOooo........oo 649 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 732 650 733 inline void G4VEmProcess::SetParticle(const G4 651 inline void G4VEmProcess::SetParticle(const G4ParticleDefinition* p) 734 { 652 { 735 particle = p; 653 particle = p; 736 currentParticle = p; 654 currentParticle = p; 737 } 655 } 738 656 739 //....oooOO0OOooo........oooOO0OOooo........oo 657 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 740 658 741 inline void G4VEmProcess::SetSecondaryParticle 659 inline void G4VEmProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 742 { 660 { 743 secondaryParticle = p; 661 secondaryParticle = p; 744 } 662 } 745 663 746 //....oooOO0OOooo........oooOO0OOooo........oo 664 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 747 665 748 inline void G4VEmProcess::SetStartFromNullFlag 666 inline void G4VEmProcess::SetStartFromNullFlag(G4bool val) 749 { 667 { 750 startFromNull = val; 668 startFromNull = val; 751 } 669 } 752 670 753 //....oooOO0OOooo........oooOO0OOooo........oo 671 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 754 672 755 inline void G4VEmProcess::SetSplineFlag(G4bool 673 inline void G4VEmProcess::SetSplineFlag(G4bool val) 756 { 674 { 757 splineFlag = val; 675 splineFlag = val; >> 676 actSpline = true; 758 } 677 } 759 678 760 //....oooOO0OOooo........oooOO0OOooo........oo 679 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 761 680 762 inline G4int G4VEmProcess::DensityIndex(G4int << 681 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 { 682 { 771 return (*theDensityFactor)[idx]; << 683 return currentModel->GetCurrentElement(); 772 } 684 } 773 685 774 //....oooOO0OOooo........oooOO0OOooo........oo 686 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 775 687 776 inline G4bool G4VEmProcess::UseBaseMaterial() << 688 inline const G4Isotope* G4VEmProcess::GetTargetIsotope() const 777 { 689 { 778 return baseMat; << 690 return currentModel->GetCurrentIsotope(); 779 } 691 } 780 692 781 //....oooOO0OOooo........oooOO0OOooo........oo 693 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 782 694 783 inline const G4VEmModel* G4VEmProcess::GetCurr 695 inline const G4VEmModel* G4VEmProcess::GetCurrentModel() const 784 { 696 { 785 return currentModel; 697 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 } 698 } 815 699 816 //....oooOO0OOooo........oooOO0OOooo........oo 700 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 817 701 818 #endif 702 #endif 819 703