Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/utils/include/G4VEmProcess.hh

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/utils/include/G4VEmProcess.hh (Version 11.3.0) and /processes/electromagnetic/utils/include/G4VEmProcess.hh (Version 10.6)


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