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