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