Geant4 Cross Reference

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

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

Diff markup

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


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