Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/utils/include/G4VEmModel.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/G4VEmModel.hh (Version 11.3.0) and /processes/electromagnetic/utils/include/G4VEmModel.hh (Version 10.4.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
                                                   >>  26 // $Id$
                                                   >>  27 //
 26 // -------------------------------------------     28 // -------------------------------------------------------------------
 27 //                                                 29 //
 28 // GEANT4 Class header file                        30 // GEANT4 Class header file
 29 //                                                 31 //
 30 //                                                 32 //
 31 // File name:     G4VEmModel                       33 // File name:     G4VEmModel
 32 //                                                 34 //
 33 // Author:        Vladimir Ivanchenko              35 // Author:        Vladimir Ivanchenko
 34 //                                                 36 //
 35 // Creation date: 03.01.2002                       37 // Creation date: 03.01.2002
 36 //                                                 38 //
 37 // Modifications:                                  39 // Modifications:
 38 //                                                 40 //
 39 // 23-12-02 V.Ivanchenko change interface befo     41 // 23-12-02 V.Ivanchenko change interface before move to cut per region
 40 // 24-01-03 Cut per region (V.Ivanchenko)          42 // 24-01-03 Cut per region (V.Ivanchenko)
 41 // 13-02-03 Add name (V.Ivanchenko)                43 // 13-02-03 Add name (V.Ivanchenko)
 42 // 25-02-03 Add sample theta and displacement      44 // 25-02-03 Add sample theta and displacement (V.Ivanchenko)
 43 // 23-07-03 Replace G4Material by G4MaterialCu     45 // 23-07-03 Replace G4Material by G4MaterialCutCouple in dE/dx and CrossSection
 44 //          calculation (V.Ivanchenko)             46 //          calculation (V.Ivanchenko)
 45 // 01-03-04 L.Urban signature changed in Sampl     47 // 01-03-04 L.Urban signature changed in SampleCosineTheta 
 46 // 23-04-04 L.urban signature of SampleCosineT     48 // 23-04-04 L.urban signature of SampleCosineTheta changed back 
 47 // 17-11-04 Add method CrossSectionPerAtom (V.     49 // 17-11-04 Add method CrossSectionPerAtom (V.Ivanchenko)
 48 // 14-03-05 Reduce number of pure virtual meth     50 // 14-03-05 Reduce number of pure virtual methods and make inline part 
 49 //          separate (V.Ivanchenko)                51 //          separate (V.Ivanchenko)
 50 // 24-03-05 Remove IsInCharge and add G4VParti     52 // 24-03-05 Remove IsInCharge and add G4VParticleChange in the constructor (VI)
 51 // 08-04-05 Major optimisation of internal int     53 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
 52 // 15-04-05 optimize internal interface for ms     54 // 15-04-05 optimize internal interface for msc (V.Ivanchenko)
 53 // 08-05-05 A -> N (V.Ivanchenko)                  55 // 08-05-05 A -> N (V.Ivanchenko)
 54 // 25-07-05 Move constructor and destructor to     56 // 25-07-05 Move constructor and destructor to the body (V.Ivanchenko)
 55 // 02-02-06 ComputeCrossSectionPerAtom: defaul     57 // 02-02-06 ComputeCrossSectionPerAtom: default value A=0. (mma)
 56 // 06-02-06 add method ComputeMeanFreePath() (     58 // 06-02-06 add method ComputeMeanFreePath() (mma)
 57 // 07-03-06 Optimize msc methods (V.Ivanchenko     59 // 07-03-06 Optimize msc methods (V.Ivanchenko)
 58 // 29-06-06 Add member currentElement and Get/     60 // 29-06-06 Add member currentElement and Get/Set methods (V.Ivanchenko)
 59 // 29-10-07 Added SampleScattering (V.Ivanchen     61 // 29-10-07 Added SampleScattering (V.Ivanchenko)
 60 // 15-07-08 Reorder class members and improve      62 // 15-07-08 Reorder class members and improve comments (VI)
 61 // 21-07-08 Added vector of G4ElementSelector      63 // 21-07-08 Added vector of G4ElementSelector and methods to use it (VI)
 62 // 12-09-08 Added methods GetParticleCharge, G     64 // 12-09-08 Added methods GetParticleCharge, GetChargeSquareRatio, 
 63 //          CorrectionsAlongStep, ActivateNucl     65 //          CorrectionsAlongStep, ActivateNuclearStopping (VI)
 64 // 16-02-09 Moved implementations of virtual m     66 // 16-02-09 Moved implementations of virtual methods to source (VI)
 65 // 07-04-09 Moved msc methods from G4VEmModel      67 // 07-04-09 Moved msc methods from G4VEmModel to G4VMscModel (VI)
 66 // 13-10-10 Added G4VEmAngularDistribution (VI     68 // 13-10-10 Added G4VEmAngularDistribution (VI)
 67 //                                                 69 //
 68 // Class Description:                              70 // Class Description:
 69 //                                                 71 //
 70 // Abstract interface to energy loss models        72 // Abstract interface to energy loss models
 71                                                    73 
 72 // -------------------------------------------     74 // -------------------------------------------------------------------
 73 //                                                 75 //
 74                                                    76 
 75 #ifndef G4VEmModel_h                               77 #ifndef G4VEmModel_h
 76 #define G4VEmModel_h 1                             78 #define G4VEmModel_h 1
 77                                                    79 
 78 #include "globals.hh"                              80 #include "globals.hh"
 79 #include "G4DynamicParticle.hh"                    81 #include "G4DynamicParticle.hh"
 80 #include "G4ParticleDefinition.hh"                 82 #include "G4ParticleDefinition.hh"
 81 #include "G4MaterialCutsCouple.hh"                 83 #include "G4MaterialCutsCouple.hh"
 82 #include "G4Material.hh"                           84 #include "G4Material.hh"
 83 #include "G4Element.hh"                            85 #include "G4Element.hh"
 84 #include "G4ElementVector.hh"                      86 #include "G4ElementVector.hh"
 85 #include "G4Isotope.hh"                            87 #include "G4Isotope.hh"
 86 #include "G4DataVector.hh"                         88 #include "G4DataVector.hh"
 87 #include "G4VEmFluctuationModel.hh"                89 #include "G4VEmFluctuationModel.hh"
 88 #include "G4VEmAngularDistribution.hh"             90 #include "G4VEmAngularDistribution.hh"
 89 #include "G4EmElementSelector.hh"                  91 #include "G4EmElementSelector.hh"
 90 #include <CLHEP/Random/RandomEngine.h>             92 #include <CLHEP/Random/RandomEngine.h>
 91 #include <vector>                                  93 #include <vector>
 92                                                    94 
 93 class G4ElementData;                               95 class G4ElementData;
 94 class G4PhysicsTable;                              96 class G4PhysicsTable;
 95 class G4Region;                                    97 class G4Region;
 96 class G4VParticleChange;                           98 class G4VParticleChange;
 97 class G4ParticleChangeForLoss;                     99 class G4ParticleChangeForLoss;
 98 class G4ParticleChangeForGamma;                   100 class G4ParticleChangeForGamma;
 99 class G4Track;                                    101 class G4Track;
100 class G4LossTableManager;                         102 class G4LossTableManager;
101                                                   103 
102 class G4VEmModel                                  104 class G4VEmModel
103 {                                                 105 {
104                                                   106 
105 public:                                           107 public:
106                                                   108 
107   explicit G4VEmModel(const G4String& nam);       109   explicit G4VEmModel(const G4String& nam);
108                                                   110 
109   virtual ~G4VEmModel();                          111   virtual ~G4VEmModel();
110                                                   112 
111   //------------------------------------------    113   //------------------------------------------------------------------------
112   // Virtual methods to be implemented for any    114   // Virtual methods to be implemented for any concrete model
113   //------------------------------------------    115   //------------------------------------------------------------------------
114                                                   116 
115   virtual void Initialise(const G4ParticleDefi    117   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) = 0;
116                                                   118 
117   virtual void SampleSecondaries(std::vector<G    119   virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
118                                  const G4Mater    120                                  const G4MaterialCutsCouple*,
119                                  const G4Dynam    121                                  const G4DynamicParticle*,
120                                  G4double tmin    122                                  G4double tmin = 0.0,
121                                  G4double tmax    123                                  G4double tmax = DBL_MAX) = 0;
122                                                   124 
123   //------------------------------------------    125   //------------------------------------------------------------------------
124   // Methods for initialisation of MT; may be     126   // Methods for initialisation of MT; may be overwritten if needed
125   //------------------------------------------    127   //------------------------------------------------------------------------
126                                                   128 
127   // initialisation in local thread            << 129   // initilisation in local thread
128   virtual void InitialiseLocal(const G4Particl    130   virtual void InitialiseLocal(const G4ParticleDefinition*,
129                                G4VEmModel* mas    131                                G4VEmModel* masterModel);
130                                                   132 
131   // initialisation of a new material at run t << 133   // initilisation of a new material at run time
132   virtual void InitialiseForMaterial(const G4P    134   virtual void InitialiseForMaterial(const G4ParticleDefinition*,
133                                      const G4M    135                                      const G4Material*);
134                                                   136 
135   // initialisation of a new element at run ti << 137   // initilisation of a new element at run time
136   virtual void InitialiseForElement(const G4Pa    138   virtual void InitialiseForElement(const G4ParticleDefinition*,
137                                     G4int Z);     139                                     G4int Z);
138                                                   140 
139   //------------------------------------------    141   //------------------------------------------------------------------------
140   // Methods with standard implementation; may    142   // Methods with standard implementation; may be overwritten if needed 
141   //------------------------------------------    143   //------------------------------------------------------------------------
142                                                   144 
143   // main method to compute dEdx                  145   // main method to compute dEdx
144   virtual G4double ComputeDEDXPerVolume(const     146   virtual G4double ComputeDEDXPerVolume(const G4Material*,
145                                         const     147                                         const G4ParticleDefinition*,
146                                         G4doub    148                                         G4double kineticEnergy,
147                                         G4doub    149                                         G4double cutEnergy = DBL_MAX);
148                                                   150 
149   // main method to compute cross section per     151   // main method to compute cross section per Volume
150   virtual G4double CrossSectionPerVolume(const    152   virtual G4double CrossSectionPerVolume(const G4Material*,
151                                          const    153                                          const G4ParticleDefinition*,
152                                          G4dou    154                                          G4double kineticEnergy,
153                                          G4dou    155                                          G4double cutEnergy = 0.0,
154                                          G4dou    156                                          G4double maxEnergy = DBL_MAX);
155                                                   157 
156   // method to get partial cross section          158   // method to get partial cross section
157   virtual G4double GetPartialCrossSection(cons    159   virtual G4double GetPartialCrossSection(const G4Material*,
158                                           G4in    160                                           G4int level,
159                                           cons    161                                           const G4ParticleDefinition*,
160                                           G4do    162                                           G4double kineticEnergy);
161                                                   163 
162   // main method to compute cross section per     164   // main method to compute cross section per atom
163   virtual G4double ComputeCrossSectionPerAtom(    165   virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
164                                                   166                                               G4double kinEnergy,
165                                                   167                                               G4double Z,
166                                                   168                                               G4double A = 0., /* amu */
167                                                   169                                               G4double cutEnergy = 0.0,
168                                                   170                                               G4double maxEnergy = DBL_MAX);
169                                                   171 
170   // main method to compute cross section per     172   // main method to compute cross section per atomic shell
171   virtual G4double ComputeCrossSectionPerShell    173   virtual G4double ComputeCrossSectionPerShell(const G4ParticleDefinition*,
172                                                   174                                                G4int Z, G4int shellIdx,
173                                                   175                                                G4double kinEnergy,
174                                                   176                                                G4double cutEnergy = 0.0,
175                                                   177                                                G4double maxEnergy = DBL_MAX);
176                                                   178 
177   // Compute effective ion charge square          179   // Compute effective ion charge square
178   virtual G4double ChargeSquareRatio(const G4T    180   virtual G4double ChargeSquareRatio(const G4Track&);
179                                                   181 
180   // Compute effective ion charge square          182   // Compute effective ion charge square
181   virtual G4double GetChargeSquareRatio(const     183   virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
182                                         const     184                                         const G4Material*,
183                                         G4doub    185                                         G4double kineticEnergy);
184                                                   186 
185   // Compute ion charge                           187   // Compute ion charge 
186   virtual G4double GetParticleCharge(const G4P    188   virtual G4double GetParticleCharge(const G4ParticleDefinition*,
187                                      const G4M    189                                      const G4Material*,
188                                      G4double     190                                      G4double kineticEnergy);
189                                                   191 
190   // Initialisation for a new track               192   // Initialisation for a new track
191   virtual void StartTracking(G4Track*);           193   virtual void StartTracking(G4Track*);
192                                                   194 
193   // add correction to energy loss and compute    195   // add correction to energy loss and compute non-ionizing energy loss
194   virtual void CorrectionsAlongStep(const G4Ma    196   virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
195                                     const G4Dy    197                                     const G4DynamicParticle*,
196                                     const G4do << 198                                     G4double& eloss,
197                                     G4double&  << 199                                     G4double& niel,
                                                   >> 200                                     G4double length);
198                                                   201 
199   // value which may be tabulated (by default     202   // value which may be tabulated (by default cross section)
200   virtual G4double Value(const G4MaterialCutsC    203   virtual G4double Value(const G4MaterialCutsCouple*,
201                          const G4ParticleDefin    204                          const G4ParticleDefinition*,
202                          G4double kineticEnerg    205                          G4double kineticEnergy);
203                                                   206 
204   // threshold for zero value                     207   // threshold for zero value 
205   virtual G4double MinPrimaryEnergy(const G4Ma    208   virtual G4double MinPrimaryEnergy(const G4Material*,
206                                     const G4Pa    209                                     const G4ParticleDefinition*,
207                                     G4double c    210                                     G4double cut = 0.0);
208                                                   211 
209   // model can define low-energy limit for the    212   // model can define low-energy limit for the cut
210   virtual G4double MinEnergyCut(const G4Partic    213   virtual G4double MinEnergyCut(const G4ParticleDefinition*,
211                                 const G4Materi    214                                 const G4MaterialCutsCouple*);
212                                                   215 
213   // initialisation at run time for a given ma << 216   // initilisation at run time for a given material
214   virtual void SetupForMaterial(const G4Partic    217   virtual void SetupForMaterial(const G4ParticleDefinition*,
215                                 const G4Materi    218                                 const G4Material*,
216                                 G4double kinet    219                                 G4double kineticEnergy);
217                                                   220 
218   // add a region for the model                   221   // add a region for the model
219   virtual void DefineForRegion(const G4Region*    222   virtual void DefineForRegion(const G4Region*);
220                                                   223 
221   // fill number of different type of secondar << 
222   virtual void FillNumberOfSecondaries(G4int&  << 
223                                        G4int&  << 
224                                                << 
225   // for automatic documentation                  224   // for automatic documentation
226   virtual void ModelDescription(std::ostream&     225   virtual void ModelDescription(std::ostream& outFile) const;
                                                   >> 226   
                                                   >> 227   virtual void ModelDescription(std::ostream& outFile,
                                                   >> 228                                 G4String endOfLine) const; 
227                                                   229 
228 protected:                                        230 protected:
229                                                   231 
230   // initialisation of the ParticleChange for     232   // initialisation of the ParticleChange for the model
231   G4ParticleChangeForLoss* GetParticleChangeFo    233   G4ParticleChangeForLoss* GetParticleChangeForLoss();
232                                                   234 
233   // initialisation of the ParticleChange for     235   // initialisation of the ParticleChange for the model
234   G4ParticleChangeForGamma* GetParticleChangeF    236   G4ParticleChangeForGamma* GetParticleChangeForGamma();
235                                                   237 
236   // kinematically allowed max kinetic energy     238   // kinematically allowed max kinetic energy of a secondary
237   virtual G4double MaxSecondaryEnergy(const G4    239   virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
238                                       G4double    240                                       G4double kineticEnergy);
239                                                   241 
240 public:                                           242 public:
241                                                   243 
242   //------------------------------------------    244   //------------------------------------------------------------------------
243   // Generic methods common to all models         245   // Generic methods common to all models
244   //------------------------------------------    246   //------------------------------------------------------------------------
245                                                   247 
246   // should be called at initialisation to bui    248   // should be called at initialisation to build element selectors
247   void InitialiseElementSelectors(const G4Part    249   void InitialiseElementSelectors(const G4ParticleDefinition*,
248                                   const G4Data    250                                   const G4DataVector&);
249                                                   251 
250   // should be called at initialisation to acc    252   // should be called at initialisation to access element selectors
251   inline std::vector<G4EmElementSelector*>* Ge    253   inline std::vector<G4EmElementSelector*>* GetElementSelectors();
252                                                   254 
253   // should be called at initialisation to set    255   // should be called at initialisation to set element selectors
254   inline void SetElementSelectors(std::vector<    256   inline void SetElementSelectors(std::vector<G4EmElementSelector*>*);
255                                                   257 
256   // dEdx per unit length, base material appro << 258   // dEdx per unit length
257   inline G4double ComputeDEDX( const G4Materia << 259   virtual inline G4double ComputeDEDX(const G4MaterialCutsCouple*,
258                                const G4Particl << 260                               const G4ParticleDefinition*,
259                                G4double kineti << 261                               G4double kineticEnergy,
260                                G4double cutEne << 262                               G4double cutEnergy = DBL_MAX);
261                                                   263 
262   // cross section per volume, base material a << 264   // cross section per volume
263   inline G4double CrossSection(const G4Materia    265   inline G4double CrossSection(const G4MaterialCutsCouple*,
264                                const G4Particl    266                                const G4ParticleDefinition*,
265                                G4double kineti    267                                G4double kineticEnergy,
266                                G4double cutEne    268                                G4double cutEnergy = 0.0,
267                                G4double maxEne    269                                G4double maxEnergy = DBL_MAX);
268                                                   270 
269   // compute mean free path via cross section     271   // compute mean free path via cross section per volume
270   inline G4double ComputeMeanFreePath(const G4    272   inline G4double ComputeMeanFreePath(const G4ParticleDefinition*,
271                                       G4double    273                                       G4double kineticEnergy,
272                                       const G4    274                                       const G4Material*,
273                                       G4double    275                                       G4double cutEnergy = 0.0,
274                                       G4double    276                                       G4double maxEnergy = DBL_MAX);
275                                                   277 
276   // generic cross section per element            278   // generic cross section per element
277   inline G4double ComputeCrossSectionPerAtom(c    279   inline G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
278                                              c    280                                              const G4Element*,
279                                              G    281                                              G4double kinEnergy,
280                                              G    282                                              G4double cutEnergy = 0.0,
281                                              G    283                                              G4double maxEnergy = DBL_MAX);
282                                                   284 
                                                   >> 285   // select isotope in order to have precise mass of the nucleus
                                                   >> 286   inline G4int SelectIsotopeNumber(const G4Element*);
                                                   >> 287 
283   // atom can be selected effitiantly if eleme    288   // atom can be selected effitiantly if element selectors are initialised 
284   inline const G4Element* SelectRandomAtom(con    289   inline const G4Element* SelectRandomAtom(const G4MaterialCutsCouple*,
285                                            con    290                                            const G4ParticleDefinition*,
286                                            G4d    291                                            G4double kineticEnergy,
287                                            G4d    292                                            G4double cutEnergy = 0.0,
288                                            G4d    293                                            G4double maxEnergy = DBL_MAX);
289   // same as SelectRandomAtom above but more e << 
290   inline const G4Element* SelectTargetAtom(con << 
291                                            con << 
292                                            G4d << 
293                                            G4d << 
294                                            G4d << 
295                                            G4d << 
296                                                   294 
297   // to select atom cross section per volume i    295   // to select atom cross section per volume is recomputed for each element 
298   const G4Element* SelectRandomAtom(const G4Ma    296   const G4Element* SelectRandomAtom(const G4Material*,
299                                     const G4Pa    297                                     const G4ParticleDefinition*,
300                                     G4double k    298                                     G4double kineticEnergy,
301                                     G4double c    299                                     G4double cutEnergy = 0.0,
302                                     G4double m    300                                     G4double maxEnergy = DBL_MAX);
303                                                   301 
304   // to select atom if cross section is propor    302   // to select atom if cross section is proportional number of electrons 
305   const G4Element* GetCurrentElement(const G4M << 303   inline G4int SelectRandomAtomNumber(const G4Material*);
306   G4int SelectRandomAtomNumber(const G4Materia << 
307                                                << 
308   // select isotope in order to have precise m << 
309   const G4Isotope* GetCurrentIsotope(const G4E << 
310   G4int SelectIsotopeNumber(const G4Element*)  << 
311                                                   304 
312   //------------------------------------------    305   //------------------------------------------------------------------------
313   // Get/Set methods                              306   // Get/Set methods
314   //------------------------------------------    307   //------------------------------------------------------------------------
315                                                   308 
316   void SetParticleChange(G4VParticleChange*, G    309   void SetParticleChange(G4VParticleChange*, G4VEmFluctuationModel* f=nullptr);
317                                                   310 
318   void SetCrossSectionTable(G4PhysicsTable*, G    311   void SetCrossSectionTable(G4PhysicsTable*, G4bool isLocal);
319                                                   312 
320   inline G4ElementData* GetElementData();         313   inline G4ElementData* GetElementData();
321                                                   314 
322   inline G4PhysicsTable* GetCrossSectionTable(    315   inline G4PhysicsTable* GetCrossSectionTable();
323                                                   316 
324   inline G4VEmFluctuationModel* GetModelOfFluc    317   inline G4VEmFluctuationModel* GetModelOfFluctuations();
325                                                   318 
326   inline G4VEmAngularDistribution* GetAngularD    319   inline G4VEmAngularDistribution* GetAngularDistribution();
327                                                   320 
328   inline G4VEmModel* GetTripletModel();           321   inline G4VEmModel* GetTripletModel();
329                                                   322 
330   inline void SetTripletModel(G4VEmModel*);       323   inline void SetTripletModel(G4VEmModel*);
331                                                   324 
332   inline void SetAngularDistribution(G4VEmAngu    325   inline void SetAngularDistribution(G4VEmAngularDistribution*);
333                                                   326 
334   inline G4double HighEnergyLimit() const;        327   inline G4double HighEnergyLimit() const;
335                                                   328 
336   inline G4double LowEnergyLimit() const;         329   inline G4double LowEnergyLimit() const;
337                                                   330 
338   inline G4double HighEnergyActivationLimit()     331   inline G4double HighEnergyActivationLimit() const;
339                                                   332 
340   inline G4double LowEnergyActivationLimit() c    333   inline G4double LowEnergyActivationLimit() const;
341                                                   334 
342   inline G4double PolarAngleLimit() const;        335   inline G4double PolarAngleLimit() const;
343                                                   336 
344   inline G4double SecondaryThreshold() const;     337   inline G4double SecondaryThreshold() const;
345                                                   338 
                                                   >> 339   inline G4bool LPMFlag() const;
                                                   >> 340 
346   inline G4bool DeexcitationFlag() const;         341   inline G4bool DeexcitationFlag() const;
347                                                   342 
348   inline G4bool ForceBuildTableFlag() const;      343   inline G4bool ForceBuildTableFlag() const;
349                                                   344 
350   inline G4bool UseAngularGeneratorFlag() cons    345   inline G4bool UseAngularGeneratorFlag() const;
351                                                   346 
352   inline void SetAngularGeneratorFlag(G4bool);    347   inline void SetAngularGeneratorFlag(G4bool);
353                                                   348 
354   inline void SetHighEnergyLimit(G4double);       349   inline void SetHighEnergyLimit(G4double);
355                                                   350 
356   inline void SetLowEnergyLimit(G4double);        351   inline void SetLowEnergyLimit(G4double);
357                                                   352 
358   inline void SetActivationHighEnergyLimit(G4d    353   inline void SetActivationHighEnergyLimit(G4double);
359                                                   354 
360   inline void SetActivationLowEnergyLimit(G4do    355   inline void SetActivationLowEnergyLimit(G4double);
361                                                   356 
362   inline G4bool IsActive(G4double kinEnergy) c << 357   inline G4bool IsActive(G4double kinEnergy);
363                                                   358 
364   inline void SetPolarAngleLimit(G4double);       359   inline void SetPolarAngleLimit(G4double);
365                                                   360 
366   inline void SetSecondaryThreshold(G4double);    361   inline void SetSecondaryThreshold(G4double);
367                                                   362 
                                                   >> 363   inline void SetLPMFlag(G4bool val);
                                                   >> 364 
368   inline void SetDeexcitationFlag(G4bool val);    365   inline void SetDeexcitationFlag(G4bool val);
369                                                   366 
370   inline void SetForceBuildTable(G4bool val);     367   inline void SetForceBuildTable(G4bool val);
371                                                   368 
372   inline void SetFluctuationFlag(G4bool val);     369   inline void SetFluctuationFlag(G4bool val);
373                                                   370 
374   inline G4bool IsMaster() const;              << 371   inline void SetMasterThread(G4bool val);
375                                                << 
376   inline void SetUseBaseMaterials(G4bool val); << 
377                                                   372 
378   inline G4bool UseBaseMaterials() const;      << 373   inline G4bool IsMaster() const;
379                                                   374 
380   inline G4double MaxSecondaryKinEnergy(const     375   inline G4double MaxSecondaryKinEnergy(const G4DynamicParticle* dynParticle);
381                                                   376 
382   inline const G4String& GetName() const;         377   inline const G4String& GetName() const;
383                                                   378 
384   inline void SetCurrentCouple(const G4Materia    379   inline void SetCurrentCouple(const G4MaterialCutsCouple*);
385                                                   380 
386   inline G4bool IsLocked() const;              << 381   inline const G4Element* GetCurrentElement() const;
387                                                   382 
388   inline void SetLocked(G4bool);               << 383   inline const G4Isotope* GetCurrentIsotope() const;
389                                                << 
390   // obsolete methods                          << 
391   [[deprecated("Use G4EmParameters::Instance() << 
392   void SetLPMFlag(G4bool);                     << 
393                                                   384 
394   void SetMasterThread(G4bool);                << 385   inline G4bool IsLocked() const;
395                                                   386 
396   //  hide assignment operator                 << 387   inline void SetLocked(G4bool);
397   G4VEmModel & operator=(const  G4VEmModel &ri << 
398   G4VEmModel(const  G4VEmModel&) = delete;     << 
399                                                   388 
400 protected:                                        389 protected:
401                                                   390 
402   inline const G4MaterialCutsCouple* CurrentCo    391   inline const G4MaterialCutsCouple* CurrentCouple() const;
403                                                   392 
404   inline void SetCurrentElement(const G4Elemen    393   inline void SetCurrentElement(const G4Element*);
405                                                   394 
406 private:                                          395 private:
407                                                   396 
                                                   >> 397   //  hide assignment operator
                                                   >> 398   G4VEmModel & operator=(const  G4VEmModel &right) = delete;
                                                   >> 399   G4VEmModel(const  G4VEmModel&) = delete;
                                                   >> 400 
408   // ======== Parameters of the class fixed at    401   // ======== Parameters of the class fixed at construction =========
409                                                   402  
410   G4VEmFluctuationModel*      flucModel = null << 403   G4VEmFluctuationModel* flucModel;
411   G4VEmAngularDistribution*   anglModel = null << 404   G4VEmAngularDistribution* anglModel;
412   G4VEmModel*                 fTripletModel =  << 405   const G4String   name;
413   const G4MaterialCutsCouple* fCurrentCouple = << 406 
414   const G4Element*            fCurrentElement  << 407   // ======== Parameters of the class fixed at initialisation =======
415   std::vector<G4EmElementSelector*>* elmSelect << 408 
416   G4LossTableManager*         fEmManager;      << 409   G4double        lowLimit;
                                                   >> 410   G4double        highLimit;
                                                   >> 411   G4double        eMinActive;
                                                   >> 412   G4double        eMaxActive;
                                                   >> 413   G4double        polarAngleLimit;
                                                   >> 414   G4double        secondaryThreshold;
                                                   >> 415   G4bool          theLPMflag;
                                                   >> 416   G4bool          flagDeexcitation;
                                                   >> 417   G4bool          flagForceBuildTable;
                                                   >> 418   G4bool          isMaster;
                                                   >> 419 
                                                   >> 420   G4bool          localTable;
                                                   >> 421   G4bool          localElmSelectors;
                                                   >> 422   G4bool          useAngularGenerator;
                                                   >> 423   G4bool          isLocked;
                                                   >> 424   G4int           nSelectors;
                                                   >> 425   std::vector<G4EmElementSelector*>* elmSelectors;
                                                   >> 426   G4LossTableManager*  fEmManager;
417                                                   427 
418 protected:                                        428 protected:
419                                                   429 
420   G4ElementData*               fElementData =  << 430   G4ElementData*               fElementData;
421   G4VParticleChange*           pParticleChange << 431   G4VParticleChange*           pParticleChange;
422   G4PhysicsTable*              xSectionTable = << 432   G4PhysicsTable*              xSectionTable;
423   const G4Material*            pBaseMaterial = << 433   const std::vector<G4double>* theDensityFactor;
424   const std::vector<G4double>* theDensityFacto << 434   const std::vector<G4int>*    theDensityIdx;
425   const std::vector<G4int>*    theDensityIdx = << 435   size_t                       idxTable;
                                                   >> 436   G4bool                       lossFlucFlag;
                                                   >> 437   const static G4double        inveplus;       
426                                                   438 
427   G4double inveplus;                           << 439   // ======== Cached values - may be state dependent ================
428   G4double pFactor = 1.0;                      << 
429                                                   440 
430 private:                                          441 private:
431                                                   442 
432   G4double lowLimit;                           << 443   const G4MaterialCutsCouple* fCurrentCouple;
433   G4double highLimit;                          << 444   const G4Element*            fCurrentElement;
434   G4double eMinActive = 0.0;                   << 445   const G4Isotope*            fCurrentIsotope;
435   G4double eMaxActive = DBL_MAX;               << 446   G4VEmModel*                 fTripletModel;
436   G4double secondaryThreshold = DBL_MAX;       << 
437   G4double polarAngleLimit;                    << 
438                                                << 
439   G4int nSelectors = 0;                        << 
440   G4int nsec = 5;                              << 
441                                                << 
442 protected:                                     << 
443                                                << 
444   std::size_t currentCoupleIndex = 0;          << 
445   std::size_t basedCoupleIndex = 0;            << 
446   G4bool lossFlucFlag = true;                  << 
447                                                << 
448 private:                                       << 
449                                                   447 
450   G4bool flagDeexcitation = false;             << 448   G4int                  nsec;
451   G4bool flagForceBuildTable = false;          << 
452   G4bool isMaster = true;                      << 
453                                                << 
454   G4bool localTable = true;                    << 
455   G4bool localElmSelectors = true;             << 
456   G4bool useAngularGenerator = false;          << 
457   G4bool useBaseMaterials = false;             << 
458   G4bool isLocked = false;                     << 
459                                                << 
460   const G4String  name;                        << 
461   std::vector<G4double>  xsec;                    449   std::vector<G4double>  xsec;
462                                                   450 
463 };                                                451 };
464                                                   452 
465 // ======== Run time inline methods ==========    453 // ======== Run time inline methods ================
466                                                   454 
467 inline void G4VEmModel::SetCurrentCouple(const << 455 inline void G4VEmModel::SetCurrentCouple(const G4MaterialCutsCouple* p)
468 {                                                 456 {
469   if(fCurrentCouple != ptr) {                  << 457   fCurrentCouple = p;
470     fCurrentCouple = ptr;                      << 
471     basedCoupleIndex = currentCoupleIndex = pt << 
472     pBaseMaterial = ptr->GetMaterial();        << 
473     pFactor = 1.0;                             << 
474     if(useBaseMaterials) {                     << 
475       basedCoupleIndex = (*theDensityIdx)[curr << 
476       if(nullptr != pBaseMaterial->GetBaseMate << 
477   pBaseMaterial = pBaseMaterial->GetBaseMateri << 
478       pFactor = (*theDensityFactor)[currentCou << 
479     }                                          << 
480   }                                            << 
481 }                                                 458 }
482                                                   459 
483 //....oooOO0OOooo........oooOO0OOooo........oo    460 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
484                                                   461 
485 inline const G4MaterialCutsCouple* G4VEmModel:    462 inline const G4MaterialCutsCouple* G4VEmModel::CurrentCouple() const
486 {                                                 463 {
487   return fCurrentCouple;                          464   return fCurrentCouple;
488 }                                                 465 }
489                                                   466 
490 //....oooOO0OOooo........oooOO0OOooo........oo    467 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
491                                                   468 
492 inline void G4VEmModel::SetCurrentElement(cons    469 inline void G4VEmModel::SetCurrentElement(const G4Element* elm)
493 {                                                 470 {
494   fCurrentElement = elm;                          471   fCurrentElement = elm;
                                                   >> 472   fCurrentIsotope = nullptr;
                                                   >> 473 }
                                                   >> 474 
                                                   >> 475 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 476 
                                                   >> 477 inline const G4Element* G4VEmModel::GetCurrentElement() const
                                                   >> 478 {
                                                   >> 479   return fCurrentElement;
                                                   >> 480 }
                                                   >> 481 
                                                   >> 482 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 483 
                                                   >> 484 inline const G4Isotope* G4VEmModel::GetCurrentIsotope() const
                                                   >> 485 {
                                                   >> 486   return fCurrentIsotope;
495 }                                                 487 }
496                                                   488 
497 //....oooOO0OOooo........oooOO0OOooo........oo    489 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
498                                                   490 
499 inline                                            491 inline 
500 G4double G4VEmModel::MaxSecondaryKinEnergy(con    492 G4double G4VEmModel::MaxSecondaryKinEnergy(const G4DynamicParticle* dynPart)
501 {                                                 493 {
502   return MaxSecondaryEnergy(dynPart->GetPartic    494   return MaxSecondaryEnergy(dynPart->GetParticleDefinition(),
503                             dynPart->GetKineti    495                             dynPart->GetKineticEnergy());
504 }                                                 496 }
505                                                   497 
506 //....oooOO0OOooo........oooOO0OOooo........oo    498 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
507                                                   499 
508 inline G4double G4VEmModel::ComputeDEDX(const     500 inline G4double G4VEmModel::ComputeDEDX(const G4MaterialCutsCouple* couple,
509                                         const     501                                         const G4ParticleDefinition* part,
510                                         G4doub    502                                         G4double kinEnergy,
511                                         G4doub    503                                         G4double cutEnergy)
512 {                                                 504 {
513   SetCurrentCouple(couple);                       505   SetCurrentCouple(couple);
514   return pFactor*ComputeDEDXPerVolume(pBaseMat << 506   return ComputeDEDXPerVolume(couple->GetMaterial(),part,kinEnergy,cutEnergy);
515 }                                                 507 }
516                                                   508 
517 //....oooOO0OOooo........oooOO0OOooo........oo    509 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
518                                                   510 
519 inline G4double G4VEmModel::CrossSection(const    511 inline G4double G4VEmModel::CrossSection(const G4MaterialCutsCouple* couple,
520                                          const    512                                          const G4ParticleDefinition* part,
521                                          G4dou    513                                          G4double kinEnergy,
522                                          G4dou    514                                          G4double cutEnergy,
523                                          G4dou    515                                          G4double maxEnergy)
524 {                                                 516 {
525   SetCurrentCouple(couple);                       517   SetCurrentCouple(couple);
526   return pFactor*CrossSectionPerVolume(pBaseMa << 518   return CrossSectionPerVolume(couple->GetMaterial(),part,kinEnergy,
527                                        cutEner << 519                                cutEnergy,maxEnergy);
528 }                                                 520 }
529                                                   521 
530 //....oooOO0OOooo........oooOO0OOooo........oo    522 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
531                                                   523 
532 inline                                            524 inline 
533 G4double G4VEmModel::ComputeMeanFreePath(const    525 G4double G4VEmModel::ComputeMeanFreePath(const G4ParticleDefinition* part,
534                                          G4dou    526                                          G4double ekin,
535                                          const    527                                          const G4Material* material,
536                                          G4dou    528                                          G4double emin,
537                                          G4dou    529                                          G4double emax)
538 {                                                 530 {
539   G4double cross = CrossSectionPerVolume(mater    531   G4double cross = CrossSectionPerVolume(material,part,ekin,emin,emax);
540   return (cross > 0.0) ? 1./cross : DBL_MAX;   << 532   return cross > 0.0 ? 1./cross : DBL_MAX;
541 }                                                 533 }
542                                                   534 
543 //....oooOO0OOooo........oooOO0OOooo........oo    535 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
544                                                   536 
545 inline G4double                                   537 inline G4double
546 G4VEmModel::ComputeCrossSectionPerAtom(const G    538 G4VEmModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition* part,
547                                        const G    539                                        const G4Element* elm,
548                                        G4doubl    540                                        G4double kinEnergy,
549                                        G4doubl    541                                        G4double cutEnergy,
550                                        G4doubl    542                                        G4double maxEnergy)
551 {                                                 543 {
552   fCurrentElement = elm;                       << 544   SetCurrentElement(elm);
553   return ComputeCrossSectionPerAtom(part,kinEn    545   return ComputeCrossSectionPerAtom(part,kinEnergy,elm->GetZ(),elm->GetN(),
554                                     cutEnergy,    546                                     cutEnergy,maxEnergy);
555 }                                                 547 }
556                                                   548 
557 //....oooOO0OOooo........oooOO0OOooo........oo    549 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
558                                                   550 
559 inline const G4Element*                           551 inline const G4Element*
560 G4VEmModel::SelectRandomAtom(const G4MaterialC    552 G4VEmModel::SelectRandomAtom(const G4MaterialCutsCouple* couple,
561                              const G4ParticleD    553                              const G4ParticleDefinition* part,
562                              G4double kinEnerg    554                              G4double kinEnergy,
563                              G4double cutEnerg    555                              G4double cutEnergy,
564                              G4double maxEnerg    556                              G4double maxEnergy)
565 {                                                 557 {
566   SetCurrentCouple(couple);                    << 558   fCurrentCouple = couple;
567   fCurrentElement = (nSelectors > 0) ?         << 559   if(nSelectors > 0) {
568     ((*elmSelectors)[couple->GetIndex()])->Sel << 560     fCurrentElement = 
569     SelectRandomAtom(pBaseMaterial,part,kinEne << 561       ((*elmSelectors)[couple->GetIndex()])->SelectRandomAtom(kinEnergy);
                                                   >> 562   } else {
                                                   >> 563     fCurrentElement = SelectRandomAtom(couple->GetMaterial(),part,kinEnergy,
                                                   >> 564                                        cutEnergy,maxEnergy);
                                                   >> 565   }
                                                   >> 566   fCurrentIsotope = nullptr;
570   return fCurrentElement;                         567   return fCurrentElement;
571 }                                                 568 }
572                                                   569 
573 //....oooOO0OOooo........oooOO0OOooo........oo    570 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
574                                                   571 
575 inline const G4Element*                        << 572 inline G4int G4VEmModel::SelectRandomAtomNumber(const G4Material* mat)
576 G4VEmModel::SelectTargetAtom(const G4MaterialC << 
577                              const G4ParticleD << 
578                              G4double kinEnerg << 
579                              G4double logKinE, << 
580                              G4double cutEnerg << 
581                              G4double maxEnerg << 
582 {                                                 573 {
583   SetCurrentCouple(couple);                    << 574   // this algorith assumes that cross section is proportional to
584   fCurrentElement = (nSelectors > 0)           << 575   // number electrons multiplied by number of atoms
585    ? ((*elmSelectors)[couple->GetIndex()])->Se << 576   size_t nn = mat->GetNumberOfElements();
586    : SelectRandomAtom(pBaseMaterial,part,kinEn << 577   const G4ElementVector* elmv = mat->GetElementVector();
587   return fCurrentElement;                      << 578   G4int Z = (*elmv)[0]->GetZasInt();
                                                   >> 579   if(1 < nn) {
                                                   >> 580     const G4double* at = mat->GetVecNbOfAtomsPerVolume();
                                                   >> 581     G4double tot = mat->GetTotNbOfAtomsPerVolume()*G4UniformRand();
                                                   >> 582     for( size_t i=0; i<nn; ++i) {
                                                   >> 583       tot -= at[i];
                                                   >> 584       if(tot <= 0.0) { 
                                                   >> 585   Z = (*elmv)[i]->GetZasInt();
                                                   >> 586   break; 
                                                   >> 587       }
                                                   >> 588     }
                                                   >> 589   }
                                                   >> 590   return Z;
                                                   >> 591 }
                                                   >> 592 
                                                   >> 593 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 594 
                                                   >> 595 inline G4int G4VEmModel::SelectIsotopeNumber(const G4Element* elm)
                                                   >> 596 {
                                                   >> 597   SetCurrentElement(elm);
                                                   >> 598   G4int N = G4lrint(elm->GetN());
                                                   >> 599   G4int ni = elm->GetNumberOfIsotopes();
                                                   >> 600   fCurrentIsotope = nullptr;
                                                   >> 601   if(ni > 0) {
                                                   >> 602     G4int idx = 0;
                                                   >> 603     if(ni > 1) {
                                                   >> 604       G4double* ab = elm->GetRelativeAbundanceVector();
                                                   >> 605       G4double x = G4UniformRand();
                                                   >> 606       for(; idx<ni; ++idx) {
                                                   >> 607         x -= ab[idx];
                                                   >> 608         if (x <= 0.0) { break; }
                                                   >> 609       }
                                                   >> 610       if(idx >= ni) { idx = ni - 1; }
                                                   >> 611     }
                                                   >> 612     fCurrentIsotope = elm->GetIsotope(idx);
                                                   >> 613     N = fCurrentIsotope->GetN();
                                                   >> 614   }
                                                   >> 615   return N;
588 }                                                 616 }
589                                                   617 
590 // ======== Get/Set inline methods used at ini    618 // ======== Get/Set inline methods used at initialisation ================
591                                                   619 
592 inline G4VEmFluctuationModel* G4VEmModel::GetM    620 inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations()
593 {                                                 621 {
594   return flucModel;                               622   return flucModel;
595 }                                                 623 }
596                                                   624 
597 //....oooOO0OOooo........oooOO0OOooo........oo    625 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
598                                                   626 
599 inline G4VEmAngularDistribution* G4VEmModel::G    627 inline G4VEmAngularDistribution* G4VEmModel::GetAngularDistribution()
600 {                                                 628 {
601   return anglModel;                               629   return anglModel;
602 }                                                 630 }
603                                                   631 
604 //....oooOO0OOooo........oooOO0OOooo........oo    632 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
605                                                   633 
606 inline void G4VEmModel::SetAngularDistribution    634 inline void G4VEmModel::SetAngularDistribution(G4VEmAngularDistribution* p)
607 {                                                 635 {
608   if(p != anglModel) {                            636   if(p != anglModel) {
609     delete anglModel;                             637     delete anglModel;
610     anglModel = p;                                638     anglModel = p;
611   }                                               639   }
612 }                                                 640 }
613                                                   641 
614 //....oooOO0OOooo........oooOO0OOooo........oo    642 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
615                                                   643 
616 inline G4VEmModel* G4VEmModel::GetTripletModel    644 inline G4VEmModel* G4VEmModel::GetTripletModel()
617 {                                                 645 {
618   return fTripletModel;                           646   return fTripletModel;
619 }                                                 647 }
620                                                   648 
621 //....oooOO0OOooo........oooOO0OOooo........oo    649 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
622                                                   650 
623 inline void G4VEmModel::SetTripletModel(G4VEmM    651 inline void G4VEmModel::SetTripletModel(G4VEmModel* p)
624 {                                                 652 {
625   if(p != fTripletModel) {                        653   if(p != fTripletModel) {
626     delete fTripletModel;                         654     delete fTripletModel;
627     fTripletModel = p;                            655     fTripletModel = p;
628   }                                               656   }
629 }                                                 657 }
630                                                   658 
631 //....oooOO0OOooo........oooOO0OOooo........oo    659 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
632                                                   660 
633 inline G4double G4VEmModel::HighEnergyLimit()     661 inline G4double G4VEmModel::HighEnergyLimit() const
634 {                                                 662 {
635   return highLimit;                               663   return highLimit;
636 }                                                 664 }
637                                                   665 
638 //....oooOO0OOooo........oooOO0OOooo........oo    666 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
639                                                   667 
640 inline G4double G4VEmModel::LowEnergyLimit() c    668 inline G4double G4VEmModel::LowEnergyLimit() const
641 {                                                 669 {
642   return lowLimit;                                670   return lowLimit;
643 }                                                 671 }
644                                                   672 
645 //....oooOO0OOooo........oooOO0OOooo........oo    673 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
646                                                   674 
647 inline G4double G4VEmModel::HighEnergyActivati    675 inline G4double G4VEmModel::HighEnergyActivationLimit() const
648 {                                                 676 {
649   return eMaxActive;                              677   return eMaxActive;
650 }                                                 678 }
651                                                   679 
652 //....oooOO0OOooo........oooOO0OOooo........oo    680 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
653                                                   681 
654 inline G4double G4VEmModel::LowEnergyActivatio    682 inline G4double G4VEmModel::LowEnergyActivationLimit() const
655 {                                                 683 {
656   return eMinActive;                              684   return eMinActive;
657 }                                                 685 }
658                                                   686 
659 //....oooOO0OOooo........oooOO0OOooo........oo    687 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
660                                                   688 
661 inline G4double G4VEmModel::PolarAngleLimit()     689 inline G4double G4VEmModel::PolarAngleLimit() const
662 {                                                 690 {
663   return polarAngleLimit;                         691   return polarAngleLimit;
664 }                                                 692 }
665                                                   693 
666 //....oooOO0OOooo........oooOO0OOooo........oo    694 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
667                                                   695 
668 inline G4double G4VEmModel::SecondaryThreshold    696 inline G4double G4VEmModel::SecondaryThreshold() const
669 {                                                 697 {
670   return secondaryThreshold;                      698   return secondaryThreshold;
671 }                                                 699 }
672                                                   700 
673 //....oooOO0OOooo........oooOO0OOooo........oo    701 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
674                                                   702 
                                                   >> 703 inline G4bool G4VEmModel::LPMFlag() const 
                                                   >> 704 {
                                                   >> 705   return theLPMflag;
                                                   >> 706 }
                                                   >> 707 
                                                   >> 708 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 709 
675 inline G4bool G4VEmModel::DeexcitationFlag() c    710 inline G4bool G4VEmModel::DeexcitationFlag() const 
676 {                                                 711 {
677   return flagDeexcitation;                        712   return flagDeexcitation;
678 }                                                 713 }
679                                                   714 
680 //....oooOO0OOooo........oooOO0OOooo........oo    715 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
681                                                   716 
682 inline G4bool G4VEmModel::ForceBuildTableFlag(    717 inline G4bool G4VEmModel::ForceBuildTableFlag() const 
683 {                                                 718 {
684   return flagForceBuildTable;                     719   return flagForceBuildTable;
685 }                                                 720 }
686                                                   721 
687 //....oooOO0OOooo........oooOO0OOooo........oo    722 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
688                                                   723 
689 inline G4bool G4VEmModel::UseAngularGeneratorF    724 inline G4bool G4VEmModel::UseAngularGeneratorFlag() const
690 {                                                 725 {
691   return useAngularGenerator;                     726   return useAngularGenerator;
692 }                                                 727 }
693                                                   728 
694 //....oooOO0OOooo........oooOO0OOooo........oo    729 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
695                                                   730 
696 inline void G4VEmModel::SetAngularGeneratorFla    731 inline void G4VEmModel::SetAngularGeneratorFlag(G4bool val)
697 {                                                 732 {
698   useAngularGenerator = val;                      733   useAngularGenerator = val;
699 }                                                 734 }
700                                                   735 
701 //....oooOO0OOooo........oooOO0OOooo........oo    736 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
702                                                   737 
703 inline void G4VEmModel::SetFluctuationFlag(G4b    738 inline void G4VEmModel::SetFluctuationFlag(G4bool val)
704 {                                                 739 {
705   lossFlucFlag = val;                             740   lossFlucFlag = val;
706 }                                                 741 }
707                                                   742 
708 //....oooOO0OOooo........oooOO0OOooo........oo    743 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
709                                                   744 
710 inline G4bool G4VEmModel::IsMaster() const     << 745 inline void G4VEmModel::SetMasterThread(G4bool val)
711 {                                              << 
712   return isMaster;                             << 
713 }                                              << 
714                                                << 
715 //....oooOO0OOooo........oooOO0OOooo........oo << 
716                                                << 
717 inline void G4VEmModel::SetUseBaseMaterials(G4 << 
718 {                                                 746 {
719   useBaseMaterials = val;                      << 747   isMaster = val;
720 }                                                 748 }
721                                                   749 
722 //....oooOO0OOooo........oooOO0OOooo........oo    750 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
723                                                   751 
724 inline G4bool G4VEmModel::UseBaseMaterials() c << 752 inline G4bool G4VEmModel::IsMaster() const
725 {                                                 753 {
726   return useBaseMaterials;                     << 754   return isMaster;
727 }                                                 755 }
728                                                   756 
729 //....oooOO0OOooo........oooOO0OOooo........oo    757 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
730                                                   758 
731 inline void G4VEmModel::SetHighEnergyLimit(G4d    759 inline void G4VEmModel::SetHighEnergyLimit(G4double val)
732 {                                                 760 {
733   highLimit = val;                                761   highLimit = val;
734 }                                                 762 }
735                                                   763 
736 //....oooOO0OOooo........oooOO0OOooo........oo    764 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
737                                                   765 
738 inline void G4VEmModel::SetLowEnergyLimit(G4do    766 inline void G4VEmModel::SetLowEnergyLimit(G4double val)
739 {                                                 767 {
740   lowLimit = val;                                 768   lowLimit = val;
741 }                                                 769 }
742                                                   770 
743 //....oooOO0OOooo........oooOO0OOooo........oo    771 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
744                                                   772 
745 inline void G4VEmModel::SetActivationHighEnerg    773 inline void G4VEmModel::SetActivationHighEnergyLimit(G4double val)
746 {                                                 774 {
747   eMaxActive = val;                               775   eMaxActive = val;
748 }                                                 776 }
749                                                   777 
750 //....oooOO0OOooo........oooOO0OOooo........oo    778 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
751                                                   779 
752 inline void G4VEmModel::SetActivationLowEnergy    780 inline void G4VEmModel::SetActivationLowEnergyLimit(G4double val)
753 {                                                 781 {
754   eMinActive = val;                               782   eMinActive = val;
755 }                                                 783 }
756                                                   784 
757 //....oooOO0OOooo........oooOO0OOooo........oo    785 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
758                                                   786 
759 inline G4bool G4VEmModel::IsActive(G4double ki << 787 inline G4bool G4VEmModel::IsActive(G4double kinEnergy)
760 {                                                 788 {
761   return (kinEnergy >= eMinActive && kinEnergy    789   return (kinEnergy >= eMinActive && kinEnergy <= eMaxActive);
762 }                                                 790 }
763                                                   791 
764 //....oooOO0OOooo........oooOO0OOooo........oo    792 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
765                                                   793 
766 inline void G4VEmModel::SetPolarAngleLimit(G4d    794 inline void G4VEmModel::SetPolarAngleLimit(G4double val)
767 {                                                 795 {
768   if(!isLocked) { polarAngleLimit = val; }        796   if(!isLocked) { polarAngleLimit = val; }
769 }                                                 797 }
770                                                   798 
771 //....oooOO0OOooo........oooOO0OOooo........oo    799 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
772                                                   800 
773 inline void G4VEmModel::SetSecondaryThreshold(    801 inline void G4VEmModel::SetSecondaryThreshold(G4double val) 
774 {                                                 802 {
775   secondaryThreshold = val;                       803   secondaryThreshold = val;
776 }                                                 804 }
777                                                   805 
778 //....oooOO0OOooo........oooOO0OOooo........oo    806 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
779                                                   807 
                                                   >> 808 inline void G4VEmModel::SetLPMFlag(G4bool val) 
                                                   >> 809 {
                                                   >> 810   theLPMflag = val;
                                                   >> 811 }
                                                   >> 812 
                                                   >> 813 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 814 
780 inline void G4VEmModel::SetDeexcitationFlag(G4    815 inline void G4VEmModel::SetDeexcitationFlag(G4bool val) 
781 {                                                 816 {
782   flagDeexcitation = val;                         817   flagDeexcitation = val;
783 }                                                 818 }
784                                                   819 
785 //....oooOO0OOooo........oooOO0OOooo........oo    820 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
786                                                   821 
787 inline void G4VEmModel::SetForceBuildTable(G4b    822 inline void G4VEmModel::SetForceBuildTable(G4bool val)
788 {                                                 823 {
789   flagForceBuildTable = val;                      824   flagForceBuildTable = val;
790 }                                                 825 }
791                                                   826 
792 //....oooOO0OOooo........oooOO0OOooo........oo    827 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
793                                                   828 
794 inline const G4String& G4VEmModel::GetName() c    829 inline const G4String& G4VEmModel::GetName() const 
795 {                                                 830 {
796   return name;                                    831   return name;
797 }                                                 832 }
798                                                   833 
799 //....oooOO0OOooo........oooOO0OOooo........oo    834 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
800                                                   835 
801 inline std::vector<G4EmElementSelector*>* G4VE    836 inline std::vector<G4EmElementSelector*>* G4VEmModel::GetElementSelectors()
802 {                                                 837 {
803   return elmSelectors;                            838   return elmSelectors;
804 }                                                 839 }
805                                                   840 
806 //....oooOO0OOooo........oooOO0OOooo........oo    841 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
807                                                   842 
808 inline void                                       843 inline void 
809 G4VEmModel::SetElementSelectors(std::vector<G4    844 G4VEmModel::SetElementSelectors(std::vector<G4EmElementSelector*>* p)
810 {                                                 845 {
811   if(p != elmSelectors) {                      << 846   elmSelectors = p;
812     elmSelectors = p;                          << 847   if(elmSelectors) { nSelectors = elmSelectors->size(); }
813     nSelectors = (nullptr != elmSelectors) ? G << 848   localElmSelectors = false;
814     localElmSelectors = false;                 << 
815   }                                            << 
816 }                                                 849 }
817                                                   850 
818 //....oooOO0OOooo........oooOO0OOooo........oo    851 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
819                                                   852 
820 inline G4ElementData* G4VEmModel::GetElementDa    853 inline G4ElementData* G4VEmModel::GetElementData()
821 {                                                 854 {
822   return fElementData;                            855   return fElementData;
823 }                                                 856 }
824                                                   857 
825 //....oooOO0OOooo........oooOO0OOooo........oo    858 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
826                                                   859 
827 inline G4PhysicsTable* G4VEmModel::GetCrossSec    860 inline G4PhysicsTable* G4VEmModel::GetCrossSectionTable()
828 {                                                 861 {
829   return xSectionTable;                           862   return xSectionTable;
830 }                                                 863 }
831                                                   864 
832 //....oooOO0OOooo........oooOO0OOooo........oo    865 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
833                                                   866 
834 inline G4bool G4VEmModel::IsLocked() const        867 inline G4bool G4VEmModel::IsLocked() const
835 {                                                 868 {
836   return isLocked;                                869   return isLocked;
837 }                                                 870 }
838                                                   871 
839 //....oooOO0OOooo........oooOO0OOooo........oo    872 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
840                                                   873 
841 inline void G4VEmModel::SetLocked(G4bool val)     874 inline void G4VEmModel::SetLocked(G4bool val)
842 {                                                 875 {
843   isLocked = val;                                 876   isLocked = val;
844 }                                                 877 }
845                                                   878 
846 //....oooOO0OOooo........oooOO0OOooo........oo    879 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
847                                                   880 
848 #endif                                            881 #endif
                                                   >> 882 
849                                                   883