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