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