Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/utils/include/G4EmCalculator.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/G4EmCalculator.hh (Version 11.3.0) and /processes/electromagnetic/utils/include/G4EmCalculator.hh (Version 11.0.p4)


  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 //                                                 28 //
 29 // GEANT4 Class header file                        29 // GEANT4 Class header file
 30 //                                                 30 //
 31 //                                                 31 //
 32 // File name:     G4EmCalculator                   32 // File name:     G4EmCalculator
 33 //                                                 33 //
 34 // Author:        Vladimir Ivanchenko              34 // Author:        Vladimir Ivanchenko
 35 //                                                 35 //
 36 // Creation date: 27.06.2004                       36 // Creation date: 27.06.2004
 37 //                                                 37 //
 38 // Modifications:                                  38 // Modifications:
 39 // 17.11.2004 Change signature of methods, add     39 // 17.11.2004 Change signature of methods, add new methods (V.Ivanchenko)
 40 // 11.01.2006 Add GetCSDARange (V.Ivanchenko)      40 // 11.01.2006 Add GetCSDARange (V.Ivanchenko)
 41 // 26.01.2006 Rename GetRange -> GetRangeFromR     41 // 26.01.2006 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko)
 42 // 22.03.2006 Add ComputeElectronicDEDX and Co     42 // 22.03.2006 Add ComputeElectronicDEDX and ComputeTotalDEDX (V.Ivanchenko)
 43 // 29.09.2006 Add member loweModel (V.Ivanchen     43 // 29.09.2006 Add member loweModel (V.Ivanchenko)
 44 // 15.03.2007 Add ComputeEnergyCutFromRangeCut     44 // 15.03.2007 Add ComputeEnergyCutFromRangeCut methods (V.Ivanchenko)
 45 // 02.02.2018 Add parameter to FindLambdaTable     45 // 02.02.2018 Add parameter to FindLambdaTable to store process type (M. Novak)
 46 //                                                 46 //
 47 // Class Description:                              47 // Class Description:
 48 //                                                 48 //
 49 // Provide access to dE/dx and cross sections      49 // Provide access to dE/dx and cross sections
 50                                                    50 
 51 // -------------------------------------------     51 // -------------------------------------------------------------------
 52 //                                                 52 //
 53                                                    53 
 54 #ifndef G4EmCalculator_h                           54 #ifndef G4EmCalculator_h
 55 #define G4EmCalculator_h 1                         55 #define G4EmCalculator_h 1
 56                                                    56 
 57 #include <vector>                                  57 #include <vector>
 58 #include "globals.hh"                              58 #include "globals.hh"
 59 #include "G4VAtomDeexcitation.hh"                  59 #include "G4VAtomDeexcitation.hh"
 60                                                    60 
 61 class G4LossTableManager;                          61 class G4LossTableManager;
 62 class G4NistManager;                               62 class G4NistManager;
 63 class G4Material;                                  63 class G4Material;
 64 class G4MaterialCutsCouple;                        64 class G4MaterialCutsCouple;
 65 class G4ParticleDefinition;                        65 class G4ParticleDefinition;
 66 class G4PhysicsTable;                              66 class G4PhysicsTable;
 67 class G4VEmModel;                                  67 class G4VEmModel;
 68 class G4VEnergyLossProcess;                        68 class G4VEnergyLossProcess;
 69 class G4VEmProcess;                                69 class G4VEmProcess;
 70 class G4VMultipleScattering;                       70 class G4VMultipleScattering;
 71 class G4VProcess;                                  71 class G4VProcess;
 72 class G4ionEffectiveCharge;                        72 class G4ionEffectiveCharge;
 73 class G4Region;                                    73 class G4Region;
 74 class G4Element;                                   74 class G4Element;
 75 class G4EmCorrections;                             75 class G4EmCorrections;
 76 class G4EmParameters;                              76 class G4EmParameters;
 77 class G4IonTable;                                  77 class G4IonTable;
 78                                                    78 
 79 class G4EmCalculator                               79 class G4EmCalculator
 80 {                                                  80 {
 81                                                    81 
 82 public:                                            82 public:
 83                                                    83 
 84   G4EmCalculator();                                84   G4EmCalculator();
 85                                                    85 
 86   ~G4EmCalculator();                               86   ~G4EmCalculator();
 87                                                    87 
 88   //==========================================     88   //===========================================================================
 89   // Methods to access precalculated dE/dx and     89   // Methods to access precalculated dE/dx and cross sections
 90   // Materials should exist in the list of the     90   // Materials should exist in the list of the G4MaterialCutsCouple
 91   //==========================================     91   //===========================================================================
 92                                                    92 
 93   G4double GetDEDX(G4double kinEnergy, const G     93   G4double GetDEDX(G4double kinEnergy, const G4ParticleDefinition*, 
 94        const G4Material*,                          94        const G4Material*,
 95                    const G4Region* r = nullptr     95                    const G4Region* r = nullptr);
 96   inline G4double GetDEDX(G4double kinEnergy,      96   inline G4double GetDEDX(G4double kinEnergy, const G4String& part, 
 97        const G4String& mat,                        97        const G4String& mat,
 98                    const G4String& regname = " <<  98                    const G4String& s = "world");
 99                                                    99 
100   G4double GetRangeFromRestricteDEDX(G4double     100   G4double GetRangeFromRestricteDEDX(G4double kinEnergy, 
101              const G4ParticleDefinition*,         101              const G4ParticleDefinition*, 
102              const G4Material*,                   102              const G4Material*,
103              const G4Region* r = nullptr);        103              const G4Region* r = nullptr);
104   inline G4double GetRangeFromRestricteDEDX(G4    104   inline G4double GetRangeFromRestricteDEDX(G4double kinEnergy, 
105               const G4String& part,               105               const G4String& part, 
106               const G4String& mat,                106               const G4String& mat,
107               const G4String& regname = "world << 107               const G4String& s = "world");
108                                                   108 
109   G4double GetCSDARange(G4double kinEnergy, co    109   G4double GetCSDARange(G4double kinEnergy, const G4ParticleDefinition*, 
110       const G4Material*,                          110       const G4Material*,
111       const G4Region* r = nullptr);               111       const G4Region* r = nullptr);
112   inline G4double GetCSDARange(G4double kinEne    112   inline G4double GetCSDARange(G4double kinEnergy, const G4String& part, 
113       const G4String& mat,                        113       const G4String& mat,
114       const G4String& regname = "world");      << 114       const G4String& s = "world");
115                                                   115 
116   G4double GetRange(G4double kinEnergy, const     116   G4double GetRange(G4double kinEnergy, const G4ParticleDefinition*, 
117       const G4Material*,                          117       const G4Material*,
118       const G4Region* r = nullptr);               118       const G4Region* r = nullptr);
119   inline G4double GetRange(G4double kinEnergy,    119   inline G4double GetRange(G4double kinEnergy, const G4String& part, 
120       const G4String& mat,                        120       const G4String& mat,
121       const G4String& regname = "world");      << 121       const G4String& s = "world");
122                                                   122 
123   G4double GetKinEnergy(G4double range, const     123   G4double GetKinEnergy(G4double range, const G4ParticleDefinition*, 
124       const G4Material*,                          124       const G4Material*,
125       const G4Region* r = nullptr);               125       const G4Region* r = nullptr);
126   inline G4double GetKinEnergy(G4double range,    126   inline G4double GetKinEnergy(G4double range, const G4String& part, 
127       const G4String& mat,                        127       const G4String& mat,
128       const G4String& regname = "world");      << 128       const G4String& s = "world");
129                                                   129 
130   G4double GetCrossSectionPerVolume(              130   G4double GetCrossSectionPerVolume(
131                    G4double kinEnergy, const G    131                    G4double kinEnergy, const G4ParticleDefinition*,
132                    const G4String& processName    132                    const G4String& processName,  const G4Material*,
133        const G4Region* r = nullptr);              133        const G4Region* r = nullptr);
134   inline G4double GetCrossSectionPerVolume(       134   inline G4double GetCrossSectionPerVolume(
135                    G4double kinEnergy, const G    135                    G4double kinEnergy, const G4String& part, const G4String& proc,
136                    const G4String& mat, const  << 136                    const G4String& mat, const G4String& s = "world");
137                                                   137 
138   G4double GetShellIonisationCrossSectionPerAt    138   G4double GetShellIonisationCrossSectionPerAtom(
139                    const G4String& part, G4int    139                    const G4String& part, G4int Z, 
140        G4AtomicShellEnumerator shell,             140        G4AtomicShellEnumerator shell,
141                    G4double kinEnergy);           141                    G4double kinEnergy);
142                                                   142 
143   G4double GetMeanFreePath(G4double kinEnergy,    143   G4double GetMeanFreePath(G4double kinEnergy, const G4ParticleDefinition*,
144          const G4String& processName,  const G    144          const G4String& processName,  const G4Material*,
145          const G4Region* r = nullptr);            145          const G4Region* r = nullptr);
146   inline G4double GetMeanFreePath(G4double kin    146   inline G4double GetMeanFreePath(G4double kinEnergy, const G4String& part, 
147           const G4String& proc, const G4String    147           const G4String& proc, const G4String& mat, 
148           const G4String& regname = "world");  << 148           const G4String& s = "world");
149                                                   149 
150   void PrintDEDXTable(const G4ParticleDefiniti    150   void PrintDEDXTable(const G4ParticleDefinition*);
151                                                   151 
152   void PrintRangeTable(const G4ParticleDefinit    152   void PrintRangeTable(const G4ParticleDefinition*);
153                                                   153 
154   void PrintInverseRangeTable(const G4Particle    154   void PrintInverseRangeTable(const G4ParticleDefinition*);
155                                                   155 
156   //==========================================    156   //===========================================================================
157   // Methods to calculate dE/dx and cross sect    157   // Methods to calculate dE/dx and cross sections "on fly"
158   // Existing tables and G4MaterialCutsCouples    158   // Existing tables and G4MaterialCutsCouples are not used
159   //==========================================    159   //===========================================================================
160                                                   160 
161   G4double ComputeDEDX(G4double kinEnergy, con    161   G4double ComputeDEDX(G4double kinEnergy, const G4ParticleDefinition*,
162                        const G4String& process    162                        const G4String& processName,  const G4Material*,
163            G4double cut = DBL_MAX);               163            G4double cut = DBL_MAX);
164   inline G4double ComputeDEDX(G4double kinEner    164   inline G4double ComputeDEDX(G4double kinEnergy, const G4String& part, 
165            const G4String& proc,                  165            const G4String& proc,
166                        const G4String& mat, G4    166                        const G4String& mat, G4double cut = DBL_MAX);
167                                                   167 
168   G4double ComputeElectronicDEDX(G4double kinE    168   G4double ComputeElectronicDEDX(G4double kinEnergy, 
169          const G4ParticleDefinition*,             169          const G4ParticleDefinition*,
170          const G4Material* mat, G4double cut =    170          const G4Material* mat, G4double cut = DBL_MAX);
171   inline G4double ComputeElectronicDEDX(G4doub    171   inline G4double ComputeElectronicDEDX(G4double kinEnergy, const G4String& part,
172          const G4String& mat, G4double cut = D    172          const G4String& mat, G4double cut = DBL_MAX);
173                                                   173 
174   G4double ComputeDEDXForCutInRange(G4double k    174   G4double ComputeDEDXForCutInRange(G4double kinEnergy, 
175             const G4ParticleDefinition*,          175             const G4ParticleDefinition*,
176             const G4Material* mat, G4double ra    176             const G4Material* mat, G4double rangecut = DBL_MAX);
177   inline G4double ComputeDEDXForCutInRange(G4d    177   inline G4double ComputeDEDXForCutInRange(G4double kinEnergy, const G4String& part,
178              const G4String& mat,                 178              const G4String& mat, 
179              G4double rangecut = DBL_MAX);        179              G4double rangecut = DBL_MAX);
180                                                   180 
181   G4double ComputeNuclearDEDX(G4double kinEner    181   G4double ComputeNuclearDEDX(G4double kinEnergy, const G4ParticleDefinition*, 
182             const G4Material*);                   182             const G4Material*);
183   inline G4double ComputeNuclearDEDX(G4double     183   inline G4double ComputeNuclearDEDX(G4double kinEnergy, const G4String& part, 
184             const G4String& mat);                 184             const G4String& mat);
185                                                   185 
186   G4double ComputeTotalDEDX(G4double kinEnergy    186   G4double ComputeTotalDEDX(G4double kinEnergy, const G4ParticleDefinition*, 
187           const G4Material*, G4double cut = DB    187           const G4Material*, G4double cut = DBL_MAX);
188   inline G4double ComputeTotalDEDX(G4double ki    188   inline G4double ComputeTotalDEDX(G4double kinEnergy, const G4String& part, 
189           const G4String& mat, G4double cut =     189           const G4String& mat, G4double cut = DBL_MAX);
190                                                   190 
191   G4double ComputeCrossSectionPerVolume(          191   G4double ComputeCrossSectionPerVolume(
192                        G4double kinEnergy, con    192                        G4double kinEnergy, const G4ParticleDefinition*,
193                        const G4String& process    193                        const G4String& processName,  const G4Material*,
194            G4double cut = 0.0);                   194            G4double cut = 0.0);
195   inline G4double ComputeCrossSectionPerVolume    195   inline G4double ComputeCrossSectionPerVolume(
196                        G4double kinEnergy, con    196                        G4double kinEnergy, const G4String& part, 
197            const G4String& proc,                  197            const G4String& proc,
198                        const G4String& mat, G4    198                        const G4String& mat, G4double cut = 0.0);
199                                                   199 
200   G4double ComputeCrossSectionPerAtom(            200   G4double ComputeCrossSectionPerAtom(
201                        G4double kinEnergy, con    201                        G4double kinEnergy, const G4ParticleDefinition*,
202                        const G4String& process    202                        const G4String& processName, G4double Z, G4double A,
203            G4double cut = 0.0);                   203            G4double cut = 0.0);
204   inline G4double ComputeCrossSectionPerAtom(     204   inline G4double ComputeCrossSectionPerAtom(
205                        G4double kinEnergy, con    205                        G4double kinEnergy, const G4String& part,
206                        const G4String& process    206                        const G4String& processName, const G4Element*,
207            G4double cut = 0.0);                   207            G4double cut = 0.0);
208                                                   208 
209   G4double ComputeCrossSectionPerShell(           209   G4double ComputeCrossSectionPerShell(
210                        G4double kinEnergy, con    210                        G4double kinEnergy, const G4ParticleDefinition*,
211                        const G4String& process    211                        const G4String& processName, G4int Z, G4int shellIdx,
212            G4double cut = 0.0);                   212            G4double cut = 0.0);
213   inline G4double ComputeCrossSectionPerShell(    213   inline G4double ComputeCrossSectionPerShell(
214                        G4double kinEnergy, con    214                        G4double kinEnergy, const G4String& part,
215                        const G4String& process    215                        const G4String& processName, const G4Element*,
216                        G4int shellIdx,            216                        G4int shellIdx,
217            G4double cut = 0.0);                   217            G4double cut = 0.0);
218                                                   218 
219   G4double ComputeGammaAttenuationLength(G4dou    219   G4double ComputeGammaAttenuationLength(G4double kinEnergy, 
220            const G4Material*);                    220            const G4Material*);
221                                                   221 
222   G4double ComputeShellIonisationCrossSectionP    222   G4double ComputeShellIonisationCrossSectionPerAtom(
223                    const G4String& part, G4int    223                    const G4String& part, G4int Z, 
224        G4AtomicShellEnumerator shell,             224        G4AtomicShellEnumerator shell,
225                    G4double kinEnergy,            225                    G4double kinEnergy,
226                    const G4Material* mat = nul    226                    const G4Material* mat = nullptr);
227                                                   227 
228   G4double ComputeMeanFreePath(                   228   G4double ComputeMeanFreePath(
229                        G4double kinEnergy, con    229                        G4double kinEnergy, const G4ParticleDefinition*,
230                        const G4String& process    230                        const G4String& processName,  const G4Material*,
231            G4double cut = 0.0);                   231            G4double cut = 0.0);
232   inline G4double ComputeMeanFreePath(            232   inline G4double ComputeMeanFreePath(
233                        G4double kinEnergy, con    233                        G4double kinEnergy, const G4String&, const G4String&,
234                        const G4String& process    234                        const G4String& processName, G4double cut = 0.0);
235                                                   235 
236   G4double ComputeEnergyCutFromRangeCut(          236   G4double ComputeEnergyCutFromRangeCut(
237                        G4double range, const G    237                        G4double range, const G4ParticleDefinition*,
238            const G4Material*);                    238            const G4Material*);
239   inline G4double ComputeEnergyCutFromRangeCut    239   inline G4double ComputeEnergyCutFromRangeCut(
240                        G4double range, const G    240                        G4double range, const G4String&,
241            const G4String&);                      241            const G4String&);
242                                                   242 
243   //==========================================    243   //===========================================================================
244   // Methods to access particles, materials, r    244   // Methods to access particles, materials, regions, processes
245   //==========================================    245   //===========================================================================
246                                                   246 
247   const G4ParticleDefinition* FindParticle(con    247   const G4ParticleDefinition* FindParticle(const G4String&);
248                                                   248 
249   const G4ParticleDefinition* FindIon(G4int Z,    249   const G4ParticleDefinition* FindIon(G4int Z, G4int A);
250                                                   250 
251   const G4Material* FindMaterial(const G4Strin    251   const G4Material* FindMaterial(const G4String&);
252                                                   252 
253   const G4Region* FindRegion(const G4String&);    253   const G4Region* FindRegion(const G4String&);
254                                                   254 
255   const G4MaterialCutsCouple* FindCouple(const    255   const G4MaterialCutsCouple* FindCouple(const G4Material*, 
256            const G4Region* r = nullptr);          256            const G4Region* r = nullptr);
257                                                   257 
258   G4VProcess* FindProcess(const G4ParticleDefi    258   G4VProcess* FindProcess(const G4ParticleDefinition* part,
259         const G4String& processName);             259         const G4String& processName);
260                                                   260 
261   void SetupMaterial(const G4Material*);          261   void SetupMaterial(const G4Material*);
262                                                   262 
263   void SetupMaterial(const G4String&);            263   void SetupMaterial(const G4String&);
264                                                   264 
265   void SetVerbose(G4int val);                     265   void SetVerbose(G4int val);
266                                                   266 
267   inline void SetApplySmoothing(G4int val);    << 
268                                                << 
269   // hide copy and assign                         267   // hide copy and assign
270   G4EmCalculator & operator=(const  G4EmCalcul    268   G4EmCalculator & operator=(const  G4EmCalculator &right) = delete;
271   G4EmCalculator(const  G4EmCalculator&) = del    269   G4EmCalculator(const  G4EmCalculator&) = delete;
272                                                   270 
273 private:                                          271 private:
274                                                   272 
275   G4bool UpdateParticle(const G4ParticleDefini    273   G4bool UpdateParticle(const G4ParticleDefinition*, G4double kinEnergy);
276                                                   274 
277   G4bool UpdateCouple(const G4Material*, G4dou    275   G4bool UpdateCouple(const G4Material*, G4double cut);
278                                                   276 
279   void FindLambdaTable(const G4ParticleDefinit    277   void FindLambdaTable(const G4ParticleDefinition*, 
280                        const G4String& process    278                        const G4String& processName,
281                        G4double kinEnergy, G4i    279                        G4double kinEnergy, G4int& proctype);
282                                                   280 
283   G4bool FindEmModel(const G4ParticleDefinitio    281   G4bool FindEmModel(const G4ParticleDefinition*, 
284                      const G4String& processNa    282                      const G4String& processName,
285                            G4double kinEnergy)    283                            G4double kinEnergy);
286                                                   284 
                                                   >> 285   G4VEnergyLossProcess* FindEnergyLossProcess(const G4ParticleDefinition*);
                                                   >> 286 
287   G4VEnergyLossProcess* FindEnLossProcess(cons    287   G4VEnergyLossProcess* FindEnLossProcess(const G4ParticleDefinition*,
288             const G4String& processName);         288             const G4String& processName);
289                                                   289 
290   G4VEmProcess* FindDiscreteProcess(const G4Pa    290   G4VEmProcess* FindDiscreteProcess(const G4ParticleDefinition*,
291             const G4String& processName);         291             const G4String& processName);
292                                                   292 
293   G4VMultipleScattering* FindMscProcess(const     293   G4VMultipleScattering* FindMscProcess(const G4ParticleDefinition*,
294           const G4String& processName);           294           const G4String& processName);
295                                                   295 
296   G4bool ActiveForParticle(const G4ParticleDef    296   G4bool ActiveForParticle(const G4ParticleDefinition* part,
297          G4VProcess* proc);                       297          G4VProcess* proc);
298                                                   298 
299   void CheckMaterial(G4int Z);                    299   void CheckMaterial(G4int Z);
300                                                   300 
301   G4EmParameters*              theParameters;     301   G4EmParameters*              theParameters;
302   G4LossTableManager*          manager;           302   G4LossTableManager*          manager;
303   G4NistManager*               nist;              303   G4NistManager*               nist;
304   G4IonTable*                  ionTable;          304   G4IonTable*                  ionTable;
305   G4EmCorrections*             corr;              305   G4EmCorrections*             corr; 
306                                                   306 
307   // cache                                        307   // cache
308   const G4MaterialCutsCouple*  currentCouple =    308   const G4MaterialCutsCouple*  currentCouple = nullptr;
309   const G4Material*            currentMaterial    309   const G4Material*            currentMaterial = nullptr;
310   const G4Material*            cutMaterial = n    310   const G4Material*            cutMaterial = nullptr;
311   const G4ParticleDefinition*  currentParticle    311   const G4ParticleDefinition*  currentParticle = nullptr;
312   const G4ParticleDefinition*  lambdaParticle     312   const G4ParticleDefinition*  lambdaParticle = nullptr;
313   const G4ParticleDefinition*  baseParticle =     313   const G4ParticleDefinition*  baseParticle = nullptr;
314   const G4PhysicsTable*        currentLambda =    314   const G4PhysicsTable*        currentLambda = nullptr;
315                                                   315 
316   G4VEmModel*                  currentModel =     316   G4VEmModel*                  currentModel = nullptr;
317   G4VEmModel*                  loweModel = nul    317   G4VEmModel*                  loweModel = nullptr;
318   G4VEnergyLossProcess*        currentProcess     318   G4VEnergyLossProcess*        currentProcess = nullptr;
319   G4VProcess*                  curProcess = nu    319   G4VProcess*                  curProcess = nullptr;
320   G4DynamicParticle*           dynParticle = n    320   G4DynamicParticle*           dynParticle = nullptr;
321                                                   321 
322   const G4ParticleDefinition*  theGenericIon;     322   const G4ParticleDefinition*  theGenericIon;
323   G4ionEffectiveCharge*        ionEffCharge;      323   G4ionEffectiveCharge*        ionEffCharge;
324                                                   324 
325   G4double                     currentCut = DB    325   G4double                     currentCut = DBL_MAX;
326   G4double                     chargeSquare =     326   G4double                     chargeSquare = 1.0;
327   G4double                     massRatio = 1.0    327   G4double                     massRatio = 1.0;
328   G4double                     mass = 0;          328   G4double                     mass = 0;
329   G4double                     cutenergy[3];      329   G4double                     cutenergy[3];
330                                                   330 
331   G4int                        currentCoupleIn    331   G4int                        currentCoupleIndex = 0;
332   G4int                        nLocalMaterials    332   G4int                        nLocalMaterials = 0;
333   G4int                        verbose = 0;       333   G4int                        verbose = 0;
334                                                   334 
335   G4bool                       isIon = false;     335   G4bool                       isIon = false;
336   G4bool                       isApplicable =     336   G4bool                       isApplicable = false;
337   G4bool                       applySmoothing  << 
338                                                   337 
339   std::vector<const G4Material*>            lo    338   std::vector<const G4Material*>            localMaterials;
340   std::vector<const G4MaterialCutsCouple*>  lo    339   std::vector<const G4MaterialCutsCouple*>  localCouples;
341   std::vector<G4double>                     lo    340   std::vector<G4double>                     localCuts;
342                                                   341 
343   G4String                     currentName = "    342   G4String                     currentName = "";
344   G4String                     lambdaName = ""    343   G4String                     lambdaName = "";
345   G4String                     currentParticle    344   G4String                     currentParticleName = "";
346   G4String                     currentMaterial    345   G4String                     currentMaterialName = "";
347   G4String                     currentProcessN    346   G4String                     currentProcessName = "";
348 };                                                347 };
349                                                   348 
350 //....oooOO0OOooo.......oooOO0OOooo........ooo    349 //....oooOO0OOooo.......oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
351 //....oooOO0OOooo........oooOO0OOooo........oo    350 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
352                                                   351 
353 inline                                            352 inline
354 G4double G4EmCalculator::GetDEDX(G4double kinE    353 G4double G4EmCalculator::GetDEDX(G4double kinEnergy, const G4String& particle,
355                                  const G4Strin    354                                  const G4String& material, const G4String& reg)
356 {                                                 355 {
357   return GetDEDX(kinEnergy,FindParticle(partic    356   return GetDEDX(kinEnergy,FindParticle(particle),
358      FindMaterial(material),FindRegion(reg));     357      FindMaterial(material),FindRegion(reg));
359 }                                                 358 }
360                                                   359 
361 //....oooOO0OOooo........oooOO0OOooo........oo    360 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
362                                                   361 
363 inline                                            362 inline
364 G4double G4EmCalculator::GetRangeFromRestricte    363 G4double G4EmCalculator::GetRangeFromRestricteDEDX(G4double kinEnergy, 
365                const G4String& particle,          364                const G4String& particle,
366                const G4String& material,          365                const G4String& material, 
367                const G4String& reg)               366                const G4String& reg)
368 {                                                 367 {
369   return GetRangeFromRestricteDEDX(kinEnergy,F    368   return GetRangeFromRestricteDEDX(kinEnergy,FindParticle(particle),
370            FindMaterial(material),FindRegion(r    369            FindMaterial(material),FindRegion(reg));
371 }                                                 370 }
372                                                   371 
373 //....oooOO0OOooo........oooOO0OOooo........oo    372 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
374                                                   373 
375 inline                                            374 inline
376 G4double G4EmCalculator::GetCSDARange(G4double    375 G4double G4EmCalculator::GetCSDARange(G4double kinEnergy, 
377               const G4String& particle,           376               const G4String& particle,
378               const G4String& material,           377               const G4String& material, 
379               const G4String& reg)                378               const G4String& reg)
380 {                                                 379 {
381   return GetCSDARange(kinEnergy,FindParticle(p    380   return GetCSDARange(kinEnergy,FindParticle(particle),
382       FindMaterial(material),FindRegion(reg));    381       FindMaterial(material),FindRegion(reg));
383 }                                                 382 }
384                                                   383 
385 //....oooOO0OOooo........oooOO0OOooo........oo    384 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
386                                                   385 
387 inline                                            386 inline
388 G4double G4EmCalculator::GetRange(G4double kin    387 G4double G4EmCalculator::GetRange(G4double kinEnergy, 
389           const G4String& particle,               388           const G4String& particle,
390           const G4String& material,               389           const G4String& material, 
391           const G4String& reg)                    390           const G4String& reg)
392 {                                                 391 {
393   return GetRange(kinEnergy,FindParticle(parti    392   return GetRange(kinEnergy,FindParticle(particle),
394       FindMaterial(material),FindRegion(reg));    393       FindMaterial(material),FindRegion(reg));
395 }                                                 394 }
396                                                   395 
397 //....oooOO0OOooo........oooOO0OOooo........oo    396 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
398                                                   397 
399 inline                                            398 inline
400 G4double G4EmCalculator::GetKinEnergy(G4double    399 G4double G4EmCalculator::GetKinEnergy(G4double range, const G4String& particle,
401                                       const G4    400                                       const G4String& material, const G4String& reg)
402 {                                                 401 {
403   return GetKinEnergy(range,FindParticle(parti    402   return GetKinEnergy(range,FindParticle(particle),
404           FindMaterial(material),FindRegion(re    403           FindMaterial(material),FindRegion(reg));
405 }                                                 404 }
406                                                   405 
407 //....oooOO0OOooo........oooOO0OOooo........oo    406 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
408                                                   407 
409 inline                                            408 inline
410 G4double G4EmCalculator::GetCrossSectionPerVol    409 G4double G4EmCalculator::GetCrossSectionPerVolume(G4double kinEnergy,
411                                             co    410                                             const G4String& particle,
412               const G4String& processName,        411               const G4String& processName,
413                                             co    412                                             const G4String& material,
414               const G4String& reg)                413               const G4String& reg)
415 {                                                 414 {
416   return GetCrossSectionPerVolume(kinEnergy,Fi    415   return GetCrossSectionPerVolume(kinEnergy,FindParticle(particle),processName,
417                                   FindMaterial    416                                   FindMaterial(material),FindRegion(reg));
418 }                                                 417 }
419                                                   418 
420 //....oooOO0OOooo........oooOO0OOooo........oo    419 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
421                                                   420 
422 inline                                            421 inline
423 G4double G4EmCalculator::GetMeanFreePath(G4dou    422 G4double G4EmCalculator::GetMeanFreePath(G4double kinEnergy,
424                                          const    423                                          const G4String& particle,
425            const G4String& processName,           424            const G4String& processName,
426                                          const    425                                          const G4String& material,
427            const G4String& reg)                   426            const G4String& reg)
428 {                                                 427 {
429   return GetMeanFreePath(kinEnergy,FindParticl    428   return GetMeanFreePath(kinEnergy,FindParticle(particle),processName,
430                          FindMaterial(material    429                          FindMaterial(material),FindRegion(reg));
431 }                                                 430 }
432                                                   431 
433 //....oooOO0OOooo........oooOO0OOooo........oo    432 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
434                                                   433 
435 inline G4double                                   434 inline G4double 
436 G4EmCalculator::ComputeElectronicDEDX(G4double    435 G4EmCalculator::ComputeElectronicDEDX(G4double kinEnergy, const G4String& part,
437               const G4String& mat, G4double cu    436               const G4String& mat, G4double cut)
438 {                                                 437 {
439   return                                          438   return 
440     ComputeElectronicDEDX(kinEnergy,FindPartic    439     ComputeElectronicDEDX(kinEnergy,FindParticle(part),FindMaterial(mat),cut);
441 }                                                 440 }
442                                                   441 
443 //....oooOO0OOooo........oooOO0OOooo........oo    442 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
444                                                   443 
445 inline G4double                                   444 inline G4double 
446 G4EmCalculator::ComputeDEDXForCutInRange(G4dou    445 G4EmCalculator::ComputeDEDXForCutInRange(G4double kinEnergy, 
447            const G4String& part,                  446            const G4String& part,
448            const G4String& mat,                   447            const G4String& mat, 
449            G4double rangecut)                     448            G4double rangecut)
450 {                                                 449 {
451   return ComputeDEDXForCutInRange(kinEnergy,Fi    450   return ComputeDEDXForCutInRange(kinEnergy,FindParticle(part),
452           FindMaterial(mat), rangecut);           451           FindMaterial(mat), rangecut);
453 }                                                 452 }
454                                                   453 
455 //....oooOO0OOooo........oooOO0OOooo........oo    454 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
456                                                   455 
457 inline                                            456 inline
458 G4double G4EmCalculator::ComputeTotalDEDX(G4do    457 G4double G4EmCalculator::ComputeTotalDEDX(G4double kinEnergy, 
459             const G4String& part,                 458             const G4String& part,
460             const G4String& mat,                  459             const G4String& mat, 
461             G4double cut)                         460             G4double cut)
462 {                                                 461 {
463   return ComputeTotalDEDX(kinEnergy,FindPartic    462   return ComputeTotalDEDX(kinEnergy,FindParticle(part),FindMaterial(mat),cut);
464 }                                                 463 }
465                                                   464 
466 //....oooOO0OOooo........oooOO0OOooo........oo    465 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
467                                                   466 
468 inline                                            467 inline
469 G4double G4EmCalculator::ComputeDEDX(G4double     468 G4double G4EmCalculator::ComputeDEDX(G4double kinEnergy,
470                                      const G4S    469                                      const G4String& particle,
471              const G4String& processName,         470              const G4String& processName,
472                                      const G4S    471                                      const G4String& material,
473                                            G4d    472                                            G4double cut)
474 {                                                 473 {
475   return ComputeDEDX(kinEnergy,FindParticle(pa    474   return ComputeDEDX(kinEnergy,FindParticle(particle),processName,
476                      FindMaterial(material),cu    475                      FindMaterial(material),cut);
477 }                                                 476 }
478                                                   477 
479 //....oooOO0OOooo........oooOO0OOooo........oo    478 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
480                                                   479 
481 inline                                            480 inline
482 G4double G4EmCalculator::ComputeNuclearDEDX(G4    481 G4double G4EmCalculator::ComputeNuclearDEDX(G4double kinEnergy,
483                                       const G4    482                                       const G4String& particle,
484               const G4String& material)           483               const G4String& material)
485 {                                                 484 {
486   return ComputeNuclearDEDX(kinEnergy,FindPart    485   return ComputeNuclearDEDX(kinEnergy,FindParticle(particle),
487           FindMaterial(material));                486           FindMaterial(material));
488 }                                                 487 }
489                                                   488 
490 //....oooOO0OOooo........oooOO0OOooo........oo    489 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
491                                                   490 
492 inline                                            491 inline
493 G4double G4EmCalculator::ComputeCrossSectionPe    492 G4double G4EmCalculator::ComputeCrossSectionPerVolume(
494                                                   493                                                    G4double kinEnergy,
495                                              c    494                                              const G4String& particle,
496                const G4String& processName,       495                const G4String& processName,
497                                              c    496                                              const G4String& material,
498                                                   497                                                    G4double cut)
499 {                                                 498 {
500   return ComputeCrossSectionPerVolume(kinEnerg    499   return ComputeCrossSectionPerVolume(kinEnergy,FindParticle(particle),
501               processName,                        500               processName,
502                                       FindMate    501                                       FindMaterial(material),cut);
503 }                                                 502 }
504                                                   503 
505 //....oooOO0OOooo........oooOO0OOooo........oo    504 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
506                                                   505 
507 inline                                            506 inline
508 G4double G4EmCalculator::ComputeCrossSectionPe    507 G4double G4EmCalculator::ComputeCrossSectionPerAtom(G4double kinEnergy,
509                                                   508                                               const G4String& particle,
510                                                   509                                               const G4String& processName,
511                 const G4Element* elm,             510                 const G4Element* elm,
512                                         G4doub    511                                         G4double cut)
513 {                                                 512 {
514   return ComputeCrossSectionPerAtom(kinEnergy,    513   return ComputeCrossSectionPerAtom(kinEnergy,FindParticle(particle),
515             processName,                          514             processName,
516                                     elm->GetZ(    515                                     elm->GetZ(),elm->GetN(),cut);
517 }                                                 516 }
518                                                   517 
519 //....oooOO0OOooo........oooOO0OOooo........oo    518 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
520                                                   519 
521 inline G4double G4EmCalculator::ComputeCrossSe    520 inline G4double G4EmCalculator::ComputeCrossSectionPerShell(
522                        G4double kinEnergy, con    521                        G4double kinEnergy, const G4String& part,
523                        const G4String& process    522                        const G4String& processName, const G4Element* elm,
524                        G4int shellIdx, G4doubl    523                        G4int shellIdx, G4double cut)
525 {                                                 524 {
526   return ComputeCrossSectionPerShell(kinEnergy    525   return ComputeCrossSectionPerShell(kinEnergy, FindParticle(part), 
527              processName, elm->GetZasInt(),       526              processName, elm->GetZasInt(), 
528              shellIdx, cut);                      527              shellIdx, cut);
529 }                                                 528 }
530                                                   529 
531 //....oooOO0OOooo........oooOO0OOooo........oo    530 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
532                                                   531 
533 inline                                            532 inline
534 G4double G4EmCalculator::ComputeEnergyCutFromR    533 G4double G4EmCalculator::ComputeEnergyCutFromRangeCut(
535                          G4double range,          534                          G4double range, 
536        const G4String& particle,                  535        const G4String& particle,
537        const G4String& material)                  536        const G4String& material)
538 {                                                 537 {
539   return ComputeEnergyCutFromRangeCut(range,Fi    538   return ComputeEnergyCutFromRangeCut(range,FindParticle(particle),
540               FindMaterial(material));            539               FindMaterial(material));
541 }                                                 540 }
542                                                   541 
543 //....oooOO0OOooo........oooOO0OOooo........oo    542 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
544                                                   543 
545 inline                                            544 inline
546 G4double G4EmCalculator::ComputeMeanFreePath(G    545 G4double G4EmCalculator::ComputeMeanFreePath(G4double kinEnergy,
547                                              c    546                                              const G4String& particle,
548                                              c    547                                              const G4String& processName,
549                                              c    548                                              const G4String& material,
550                                                   549                                                    G4double cut)
551 {                                                 550 {
552   return ComputeMeanFreePath(kinEnergy,FindPar    551   return ComputeMeanFreePath(kinEnergy,FindParticle(particle),processName,
553                              FindMaterial(mate    552                              FindMaterial(material),cut);
554 }                                              << 
555                                                << 
556 //....oooOO0OOooo........oooOO0OOooo........oo << 
557                                                << 
558 inline void G4EmCalculator::SetApplySmoothing( << 
559 {                                              << 
560   applySmoothing = val;                        << 
561 }                                                 553 }
562                                                   554 
563 //....oooOO0OOooo........oooOO0OOooo........oo    555 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
564                                                   556 
565 #endif                                            557 #endif
566                                                   558