Geant4 Cross Reference

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


  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: G4VEnergyLossProcess.hh,v 1.93 2010-10-14 16:27:35 vnivanch Exp $
                                                   >>  27 // GEANT4 tag $Name:
 26 //                                                 28 //
 27 // -------------------------------------------     29 // -------------------------------------------------------------------
 28 //                                                 30 //
 29 // GEANT4 Class header file                        31 // GEANT4 Class header file
 30 //                                                 32 //
 31 //                                                 33 //
 32 // File name:     G4VEnergyLossProcess             34 // File name:     G4VEnergyLossProcess
 33 //                                                 35 //
 34 // Author:        Vladimir Ivanchenko on base      36 // Author:        Vladimir Ivanchenko on base of Laszlo Urban code
 35 //                                                 37 //
 36 // Creation date: 03.01.2002                       38 // Creation date: 03.01.2002
 37 //                                                 39 //
 38 // Modifications: Vladimir Ivanchenko          <<  40 // Modifications:
                                                   >>  41 //
                                                   >>  42 // 26-12-02 Secondary production moved to derived classes (V.Ivanchenko)
                                                   >>  43 // 20-01-03 Migrade to cut per region (V.Ivanchenko)
                                                   >>  44 // 24-01-03 Make models region aware (V.Ivanchenko)
                                                   >>  45 // 05-02-03 Fix compilation warnings (V.Ivanchenko)
                                                   >>  46 // 13-02-03 SubCutoffProcessors defined for regions (V.Ivanchenko)
                                                   >>  47 // 17-02-03 Fix problem of store/restore tables (V.Ivanchenko)
                                                   >>  48 // 26-02-03 Region dependent step limit (V.Ivanchenko)
                                                   >>  49 // 26-03-03 Add GetDEDXDispersion (V.Ivanchenko)
                                                   >>  50 // 09-04-03 Fix problem of negative range limit for non integral (V.Ivanchenko)
                                                   >>  51 // 13-05-03 Add calculation of precise range (V.Ivanchenko)
                                                   >>  52 // 21-07-03 Add UpdateEmModel method (V.Ivanchenko)
                                                   >>  53 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
                                                   >>  54 // 14-01-04 Activate precise range calculation (V.Ivanchenko)
                                                   >>  55 // 10-03-04 Fix problem of step limit calculation (V.Ivanchenko)
                                                   >>  56 // 30-06-04 make destructor virtual (V.Ivanchenko)
                                                   >>  57 // 05-07-04 fix problem of GenericIons seen at small cuts (V.Ivanchenko)
                                                   >>  58 // 03-08-04 Add DEDX table to all processes for control on integral range(VI)
                                                   >>  59 // 06-08-04 Clear up names of member functions (V.Ivanchenko)
                                                   >>  60 // 27-08-04 Add NeedBuildTables method (V.Ivanchneko)
                                                   >>  61 // 09-09-04 Bug fix for the integral mode with 2 peaks (V.Ivanchneko)
                                                   >>  62 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivanchenko)
                                                   >>  63 // 08-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
                                                   >>  64 // 11-04-05 Use MaxSecondaryEnergy from a model (V.Ivanchenko)
                                                   >>  65 // 10-01-05 Remove SetStepLimits (V.Ivanchenko)
                                                   >>  66 // 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
                                                   >>  67 // 13-01-06 Remove AddSubCutSecondaries and cleanup (V.Ivantchenko)
                                                   >>  68 // 20-01-06 Introduce G4EmTableType and reducing number of methods (VI)
                                                   >>  69 // 26-01-06 Add public method GetCSDARange (V.Ivanchenko)
                                                   >>  70 // 22-03-06 Add SetDynamicMassCharge (V.Ivanchenko)
                                                   >>  71 // 23-03-06 Use isIonisation flag (V.Ivanchenko)
                                                   >>  72 // 13-05-06 Add method to access model by index (V.Ivanchenko)
                                                   >>  73 // 14-01-07 add SetEmModel(index) and SetFluctModel() (mma)
                                                   >>  74 // 15-01-07 Add separate ionisation tables and reorganise get/set methods for
                                                   >>  75 //          dedx tables (V.Ivanchenko)
                                                   >>  76 // 13-03-07 use SafetyHelper instead of navigator (V.Ivanchenko)
                                                   >>  77 // 27-07-07 use stl vector for emModels instead of C-array (V.Ivanchenko)
                                                   >>  78 // 25-09-07 More accurate handling zero xsect in 
                                                   >>  79 //          PostStepGetPhysicalInteractionLength (V.Ivanchenko)
                                                   >>  80 // 27-10-07 Virtual functions moved to source (V.Ivanchenko)
                                                   >>  81 // 15-07-08 Reorder class members for further multi-thread development (VI)
 39 //                                                 82 //
 40 // Class Description:                              83 // Class Description:
 41 //                                                 84 //
 42 // It is the unified energy loss process it ca     85 // It is the unified energy loss process it calculates the continuous
 43 // energy loss for charged particles using a s     86 // energy loss for charged particles using a set of Energy Loss
 44 // models valid for different energy regions.      87 // models valid for different energy regions. There are a possibility
 45 // to create and access to dE/dx and range tab     88 // to create and access to dE/dx and range tables, or to calculate
 46 // that information on fly.                        89 // that information on fly.
 47                                                    90 
 48 // -------------------------------------------     91 // -------------------------------------------------------------------
 49 //                                                 92 //
 50                                                    93 
 51 #ifndef G4VEnergyLossProcess_h                     94 #ifndef G4VEnergyLossProcess_h
 52 #define G4VEnergyLossProcess_h 1                   95 #define G4VEnergyLossProcess_h 1
 53                                                    96 
 54 #include "G4VContinuousDiscreteProcess.hh"         97 #include "G4VContinuousDiscreteProcess.hh"
 55 #include "globals.hh"                              98 #include "globals.hh"
 56 #include "G4Material.hh"                           99 #include "G4Material.hh"
 57 #include "G4MaterialCutsCouple.hh"                100 #include "G4MaterialCutsCouple.hh"
 58 #include "G4Track.hh"                             101 #include "G4Track.hh"
 59 #include "G4EmModelManager.hh"                    102 #include "G4EmModelManager.hh"
                                                   >> 103 #include "G4UnitsTable.hh"
 60 #include "G4ParticleChangeForLoss.hh"             104 #include "G4ParticleChangeForLoss.hh"
 61 #include "G4EmTableType.hh"                       105 #include "G4EmTableType.hh"
 62 #include "G4EmSecondaryParticleType.hh"        << 
 63 #include "G4PhysicsTable.hh"                      106 #include "G4PhysicsTable.hh"
 64 #include "G4PhysicsVector.hh"                     107 #include "G4PhysicsVector.hh"
 65                                                   108 
 66 class G4Step;                                     109 class G4Step;
 67 class G4ParticleDefinition;                       110 class G4ParticleDefinition;
 68 class G4EmParameters;                          << 
 69 class G4VEmModel;                                 111 class G4VEmModel;
 70 class G4VEmFluctuationModel;                      112 class G4VEmFluctuationModel;
 71 class G4DataVector;                               113 class G4DataVector;
 72 class G4Region;                                   114 class G4Region;
 73 class G4SafetyHelper;                             115 class G4SafetyHelper;
 74 class G4VAtomDeexcitation;                        116 class G4VAtomDeexcitation;
 75 class G4VSubCutProducer;                       << 
 76 class G4EmBiasingManager;                         117 class G4EmBiasingManager;
 77 class G4LossTableManager;                      << 
 78 class G4EmDataHandler;                         << 
 79                                                   118 
 80 //....oooOO0OOooo........oooOO0OOooo........oo    119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 81                                                   120 
 82 class G4VEnergyLossProcess : public G4VContinu    121 class G4VEnergyLossProcess : public G4VContinuousDiscreteProcess
 83 {                                                 122 {
 84 public:                                           123 public:
 85                                                   124 
 86   G4VEnergyLossProcess(const G4String& name =     125   G4VEnergyLossProcess(const G4String& name = "EnergyLoss",
 87                        G4ProcessType type = fE << 126            G4ProcessType type = fElectromagnetic);
                                                   >> 127 
                                                   >> 128   virtual ~G4VEnergyLossProcess();
 88                                                   129 
 89   ~G4VEnergyLossProcess() override;            << 130 private:
                                                   >> 131   // clean vectors and arrays
                                                   >> 132   void Clean();
 90                                                   133 
 91   //------------------------------------------    134   //------------------------------------------------------------------------
 92   // Virtual methods to be implemented in conc    135   // Virtual methods to be implemented in concrete processes
 93   //------------------------------------------    136   //------------------------------------------------------------------------
 94                                                   137 
 95 protected:                                     << 138 public:
                                                   >> 139   virtual G4bool IsApplicable(const G4ParticleDefinition& p) = 0;
                                                   >> 140   
                                                   >> 141   virtual void PrintInfo() = 0;
 96                                                   142 
 97   // description of specific process parameter << 143 protected:
 98   virtual void StreamProcessInfo(std::ostream& << 
 99                                                   144 
100   virtual void InitialiseEnergyLossProcess(con    145   virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
101                                            con    146                                            const G4ParticleDefinition*) = 0;
102                                                   147 
103 public:                                        << 148   //------------------------------------------------------------------------
                                                   >> 149   // Methods with standard implementation; may be overwritten if needed 
                                                   >> 150   //------------------------------------------------------------------------
104                                                   151 
105   // used as low energy limit LambdaTable      << 
106   virtual G4double MinPrimaryEnergy(const G4Pa    152   virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
107                                     const G4Ma << 153             const G4Material*, G4double cut);
                                                   >> 154 
                                                   >> 155   //------------------------------------------------------------------------
                                                   >> 156   // Virtual methods implementation common to all EM ContinuousDiscrete 
                                                   >> 157   // processes. Further inheritance is not assumed 
                                                   >> 158   //------------------------------------------------------------------------
108                                                   159 
109   // print documentation in html format        << 160 public:
110   void ProcessDescription(std::ostream& outFil << 
111                                                   161 
112   // prepare all tables                           162   // prepare all tables
113   void PreparePhysicsTable(const G4ParticleDef << 163   void PreparePhysicsTable(const G4ParticleDefinition&);
114                                                   164 
115   // build all tables                             165   // build all tables
116   void BuildPhysicsTable(const G4ParticleDefin << 166   void BuildPhysicsTable(const G4ParticleDefinition&);
117                                                   167 
118   // build a table                                168   // build a table
119   G4PhysicsTable* BuildDEDXTable(G4EmTableType    169   G4PhysicsTable* BuildDEDXTable(G4EmTableType tType = fRestricted);
120                                                   170 
121   // build a table                                171   // build a table
122   G4PhysicsTable* BuildLambdaTable(G4EmTableTy    172   G4PhysicsTable* BuildLambdaTable(G4EmTableType tType = fRestricted);
123                                                   173 
124   // Called before tracking of each new G4Trac << 174   // summary printout after initialisation
125   void StartTracking(G4Track*) override;       << 175   void PrintInfoDefinition();
126                                                   176 
127   // Step limit from AlongStep                    177   // Step limit from AlongStep 
128   G4double AlongStepGetPhysicalInteractionLeng << 178   G4double AlongStepGetPhysicalInteractionLength(const G4Track&,
129                                   const G4Trac << 179              G4double  previousStepSize,
130                                   G4double  pr << 180              G4double  currentMinimumStep,
131                                   G4double  cu << 181              G4double& currentSafety,
132                                   G4double& cu << 182              G4GPILSelection* selection);
133                                   G4GPILSelect << 
134                                                   183 
135   // Step limit from cross section                184   // Step limit from cross section
136   G4double PostStepGetPhysicalInteractionLengt << 185   G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
137                                   const G4Trac << 186             G4double   previousStepSize,
138                                   G4double pre << 187             G4ForceCondition* condition);
139                                   G4ForceCondi << 
140                                                   188 
141   // AlongStep computations                       189   // AlongStep computations
142   G4VParticleChange* AlongStepDoIt(const G4Tra << 190   G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
                                                   >> 191 
                                                   >> 192   // Sampling of secondaries in vicinity of geometrical boundary
                                                   >> 193   // Return sum of secodaries energy 
                                                   >> 194   G4double SampleSubCutSecondaries(std::vector<G4Track*>&, const G4Step&, 
                                                   >> 195            G4VEmModel* model, G4int matIdx); 
143                                                   196 
144   // PostStep sampling of secondaries             197   // PostStep sampling of secondaries
145   G4VParticleChange* PostStepDoIt(const G4Trac << 198   G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
146                                                   199 
147   // Store all PhysicsTable in files.             200   // Store all PhysicsTable in files.
148   // Return false in case of any fatal failure    201   // Return false in case of any fatal failure at I/O  
149   G4bool StorePhysicsTable(const G4ParticleDef    202   G4bool StorePhysicsTable(const G4ParticleDefinition*,
150                            const G4String& dir    203                            const G4String& directory,
151                            G4bool ascii = fals << 204          G4bool ascii = false);
152                                                   205 
153   // Retrieve all Physics from a files.           206   // Retrieve all Physics from a files.
154   // Return true if all the Physics Table are     207   // Return true if all the Physics Table are built.
155   // Return false if any fatal failure.           208   // Return false if any fatal failure. 
156   G4bool RetrievePhysicsTable(const G4Particle    209   G4bool RetrievePhysicsTable(const G4ParticleDefinition*,
157                               const G4String&     210                               const G4String& directory,
158                               G4bool ascii) ov << 211             G4bool ascii);
159                                                   212 
160 private:                                          213 private:
161                                                << 214   // store a table
162   // summary printout after initialisation     << 215   G4bool StoreTable(const G4ParticleDefinition* p, 
163   void StreamInfo(std::ostream& out, const G4P << 216         G4PhysicsTable*, G4bool ascii,
164                   G4bool rst=false) const;     << 217         const G4String& directory, 
                                                   >> 218         const G4String& tname);
                                                   >> 219 
                                                   >> 220   // retrieve a table
                                                   >> 221   G4bool RetrieveTable(const G4ParticleDefinition* p, 
                                                   >> 222            G4PhysicsTable*, G4bool ascii,
                                                   >> 223            const G4String& directory, 
                                                   >> 224            const G4String& tname, 
                                                   >> 225            G4bool mandatory);
165                                                   226 
166   //------------------------------------------    227   //------------------------------------------------------------------------
167   // Public interface to cross section, mfp an    228   // Public interface to cross section, mfp and sampling of fluctuations
168   // These methods are not used in run time       229   // These methods are not used in run time
169   //------------------------------------------    230   //------------------------------------------------------------------------
170                                                   231 
171 public:                                           232 public:
172                                                << 
173   // access to dispersion of restricted energy    233   // access to dispersion of restricted energy loss
174   G4double GetDEDXDispersion(const G4MaterialC    234   G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple,
175                              const G4DynamicPa << 235            const G4DynamicParticle* dp,
176                              G4double length); << 236            G4double length);
177                                                   237 
178   // Access to cross section table                238   // Access to cross section table
179   G4double CrossSectionPerVolume(G4double kine    239   G4double CrossSectionPerVolume(G4double kineticEnergy,
180                                  const G4Mater << 240          const G4MaterialCutsCouple* couple);
181   G4double CrossSectionPerVolume(G4double kine << 
182                                  const G4Mater << 
183                                  G4double logK << 
184                                                   241 
185   // access to cross section                      242   // access to cross section
186   G4double MeanFreePath(const G4Track& track);    243   G4double MeanFreePath(const G4Track& track);
187                                                   244 
188   // access to step limit                         245   // access to step limit
189   G4double ContinuousStepLimit(const G4Track&     246   G4double ContinuousStepLimit(const G4Track& track,
190                                G4double previo << 247              G4double previousStepSize,
191                                G4double curren << 248              G4double currentMinimumStep,
192                                G4double& curre << 249              G4double& currentSafety);
193                                                   250 
194 protected:                                        251 protected:
195                                                   252 
196   // implementation of the pure virtual method    253   // implementation of the pure virtual method
197   G4double GetMeanFreePath(const G4Track& trac    254   G4double GetMeanFreePath(const G4Track& track,
198                            G4double previousSt << 255          G4double previousStepSize,
199                            G4ForceCondition* c << 256          G4ForceCondition* condition);
200                                                   257 
201   // implementation of the pure virtual method    258   // implementation of the pure virtual method
202   G4double GetContinuousStepLimit(const G4Trac    259   G4double GetContinuousStepLimit(const G4Track& track,
203                                   G4double pre << 260           G4double previousStepSize,
204                                   G4double cur << 261           G4double currentMinimumStep,
205                                   G4double& cu << 262           G4double& currentSafety);
                                                   >> 263 
                                                   >> 264   //------------------------------------------------------------------------
                                                   >> 265   // Run time method which may be also used by derived processes
                                                   >> 266   //------------------------------------------------------------------------
206                                                   267 
207   // creation of an empty vector for cross sec << 268   // creeation of an empty vector for cross section
208   G4PhysicsVector* LambdaPhysicsVector(const G    269   G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*, 
209                                        G4doubl << 270                G4double cut);
                                                   >> 271 
                                                   >> 272   inline size_t CurrentMaterialCutsCoupleIndex() const;
210                                                   273 
211   inline std::size_t CurrentMaterialCutsCouple << 274   inline G4double GetCurrentRange() const;
212                                                   275 
213   //------------------------------------------    276   //------------------------------------------------------------------------
214   // Specific methods to set, access, modify m    277   // Specific methods to set, access, modify models
215   //------------------------------------------    278   //------------------------------------------------------------------------
216                                                   279 
217   // Select model in run time                     280   // Select model in run time
218   inline void SelectModel(G4double kinEnergy);    281   inline void SelectModel(G4double kinEnergy);
219                                                   282 
220 public:                                           283 public:
221   // Select model by energy and couple index   << 284   // Select model by energy and region index
222   // Not for run time processing               << 
223   inline G4VEmModel* SelectModelForMaterial(G4    285   inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy, 
224                                             st << 286               size_t& idx) const;
225                                                   287 
226   // Add EM model coupled with fluctuation mod    288   // Add EM model coupled with fluctuation model for region, smaller value 
227   // of order defines which pair of models wil    289   // of order defines which pair of models will be selected for a given 
228   // energy interval                              290   // energy interval  
229   void AddEmModel(G4int, G4VEmModel*,             291   void AddEmModel(G4int, G4VEmModel*, 
230                   G4VEmFluctuationModel* fluc  << 292       G4VEmFluctuationModel* fluc = 0,
231                   const G4Region* region = nul << 293       const G4Region* region = 0);
232                                                   294 
233   // Assign a model to a process local list, t << 295   // Define new energy range for the model identified by the name
234   // the derived process should execute AddEmM << 296   void UpdateEmModel(const G4String&, G4double, G4double);
235   void SetEmModel(G4VEmModel*, G4int index=0); << 
236                                                   297 
237   // Access to models                          << 298   // Assign a model to a process
238   inline std::size_t NumberOfModels() const;   << 299   void SetEmModel(G4VEmModel*, G4int index=1);
239                                                   300   
240   // Return a model from the local list        << 301   // return the assigned model
241   inline G4VEmModel* EmModel(std::size_t index << 302   G4VEmModel* EmModel(G4int index=1);
242                                                   303   
243   // Access to models from G4EmModelManager li << 304   // Access to models
244   inline G4VEmModel* GetModelByIndex(std::size << 305   G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false);
                                                   >> 306 
                                                   >> 307   G4int NumberOfModels();
245                                                   308 
246   // Assign a fluctuation model to a process      309   // Assign a fluctuation model to a process
247   inline void SetFluctModel(G4VEmFluctuationMo << 310   void SetFluctModel(G4VEmFluctuationModel*);
248                                                   311   
249   // Return the assigned fluctuation model     << 312   // return the assigned fluctuation model
250   inline G4VEmFluctuationModel* FluctModel() c << 313   inline G4VEmFluctuationModel* FluctModel();
251                                                   314     
252   //------------------------------------------    315   //------------------------------------------------------------------------
253   // Define and access particle type              316   // Define and access particle type 
254   //------------------------------------------    317   //------------------------------------------------------------------------
255                                                   318 
256 protected:                                        319 protected:
257   inline void SetParticle(const G4ParticleDefi    320   inline void SetParticle(const G4ParticleDefinition* p);
258   inline void SetSecondaryParticle(const G4Par    321   inline void SetSecondaryParticle(const G4ParticleDefinition* p);
259                                                   322 
260 public:                                           323 public:
261   inline void SetBaseParticle(const G4Particle    324   inline void SetBaseParticle(const G4ParticleDefinition* p);
262   inline const G4ParticleDefinition* Particle(    325   inline const G4ParticleDefinition* Particle() const;
263   inline const G4ParticleDefinition* BaseParti    326   inline const G4ParticleDefinition* BaseParticle() const;
264   inline const G4ParticleDefinition* Secondary    327   inline const G4ParticleDefinition* SecondaryParticle() const;
265                                                   328 
266   // hide  assignment operator                 << 
267   G4VEnergyLossProcess(G4VEnergyLossProcess &) << 
268   G4VEnergyLossProcess & operator=(const G4VEn << 
269                                                << 
270   //------------------------------------------    329   //------------------------------------------------------------------------
271   // Get/set parameters to configure the proce    330   // Get/set parameters to configure the process at initialisation time
272   //------------------------------------------    331   //------------------------------------------------------------------------
273                                                   332 
274   // Add subcut processor for the region       << 333   // Add subcutoff option for the region
275   void ActivateSubCutoff(const G4Region* regio << 334   void ActivateSubCutoff(G4bool val, const G4Region* region = 0);
276                                                   335 
277   // Activate biasing                             336   // Activate biasing
278   void SetCrossSectionBiasingFactor(G4double f    337   void SetCrossSectionBiasingFactor(G4double f, G4bool flag = true);
279                                                   338 
280   void ActivateForcedInteraction(G4double leng << 339   void ActivateForcedInteraction(G4double length = 0.0, 
281                                  const G4Strin << 340          const G4String& region = "",
282                                  G4bool flag = << 341          G4bool flag = true);
283                                                   342 
284   void ActivateSecondaryBiasing(const G4String    343   void ActivateSecondaryBiasing(const G4String& region, G4double factor,
285                                 G4double energ << 344         G4double energyLimit);
                                                   >> 345 
                                                   >> 346   // Add subcutoff process (bremsstrahlung) to sample secondary 
                                                   >> 347   // particle production in vicinity of the geometry boundary
                                                   >> 348   void AddCollaborativeProcess(G4VEnergyLossProcess*);
286                                                   349 
287   inline void SetLossFluctuations(G4bool val);    350   inline void SetLossFluctuations(G4bool val);
                                                   >> 351   inline void SetRandomStep(G4bool val);
288                                                   352 
289   inline void SetSpline(G4bool val);           << 353   inline void SetIntegral(G4bool val);
290   inline void SetCrossSectionType(G4CrossSecti << 354   inline G4bool IsIntegral() const;
291   inline G4CrossSectionType CrossSectionType() << 
292                                                   355 
293   // Set/Get flag "isIonisation"                  356   // Set/Get flag "isIonisation"
294   void SetIonisation(G4bool val);              << 357   inline void SetIonisation(G4bool val);
295   inline G4bool IsIonisationProcess() const;      358   inline G4bool IsIonisationProcess() const;
296                                                   359 
297   // Redefine parameteters for stepping contro    360   // Redefine parameteters for stepping control
298   void SetLinearLossLimit(G4double val);       << 361   inline void SetLinearLossLimit(G4double val);
299   void SetStepFunction(G4double v1, G4double v << 362   inline void SetMinSubRange(G4double val);
300   void SetLowestEnergyLimit(G4double);         << 363   inline void SetLambdaFactor(G4double val);
                                                   >> 364   inline void SetStepFunction(G4double v1, G4double v2);
                                                   >> 365   inline void SetLowestEnergyLimit(G4double);
301                                                   366 
302   inline G4int NumberOfSubCutoffRegions() cons    367   inline G4int NumberOfSubCutoffRegions() const;
303                                                   368 
304   //------------------------------------------    369   //------------------------------------------------------------------------
305   // Specific methods to path Physics Tables t    370   // Specific methods to path Physics Tables to the process
306   //------------------------------------------    371   //------------------------------------------------------------------------
307                                                   372 
308   void SetDEDXTable(G4PhysicsTable* p, G4EmTab    373   void SetDEDXTable(G4PhysicsTable* p, G4EmTableType tType);
309   void SetCSDARangeTable(G4PhysicsTable* pRang    374   void SetCSDARangeTable(G4PhysicsTable* pRange);
310   void SetRangeTableForLoss(G4PhysicsTable* p)    375   void SetRangeTableForLoss(G4PhysicsTable* p);
                                                   >> 376   void SetSecondaryRangeTable(G4PhysicsTable* p);
311   void SetInverseRangeTable(G4PhysicsTable* p)    377   void SetInverseRangeTable(G4PhysicsTable* p);
312   void SetLambdaTable(G4PhysicsTable* p);      << 
313                                                   378 
314   void SetTwoPeaksXS(std::vector<G4TwoPeaksXS* << 379   void SetLambdaTable(G4PhysicsTable* p);
315   void SetEnergyOfCrossSectionMax(std::vector< << 380   void SetSubLambdaTable(G4PhysicsTable* p);
316                                                   381 
317   //------------------------------------------ << 382   // Binning for dEdx, range, inverse range and labda tables
318   // Specific methods to define custom Physics << 383   inline void SetDEDXBinning(G4int nbins);
319   //------------------------------------------ << 384   inline void SetLambdaBinning(G4int nbins);
320                                                   385 
321   // Binning for dEdx, range, inverse range an << 386   // Binning for dEdx, range, and inverse range tables
322   void SetDEDXBinning(G4int nbins);            << 387   inline void SetDEDXBinningForCSDARange(G4int nbins);
323                                                   388 
324   // Min kinetic energy for tables                389   // Min kinetic energy for tables
325   void SetMinKinEnergy(G4double e);            << 390   inline void SetMinKinEnergy(G4double e);
326   inline G4double MinKinEnergy() const;           391   inline G4double MinKinEnergy() const;
327                                                   392 
328   // Max kinetic energy for tables                393   // Max kinetic energy for tables
329   void SetMaxKinEnergy(G4double e);            << 394   inline void SetMaxKinEnergy(G4double e);
330   inline G4double MaxKinEnergy() const;           395   inline G4double MaxKinEnergy() const;
331                                                   396 
                                                   >> 397   // Max kinetic energy for tables
                                                   >> 398   inline void SetMaxKinEnergyForCSDARange(G4double e);
                                                   >> 399 
332   // Biasing parameters                           400   // Biasing parameters
333   inline G4double CrossSectionBiasingFactor()     401   inline G4double CrossSectionBiasingFactor() const;
334                                                   402 
335   // Return values for given G4MaterialCutsCou    403   // Return values for given G4MaterialCutsCouple
336   inline G4double GetDEDX(G4double kineticEner << 404   inline G4double GetDEDX(G4double& kineticEnergy, const G4MaterialCutsCouple*);
337   inline G4double GetCSDADEDX(G4double kinetic << 405   inline G4double GetDEDXForSubsec(G4double& kineticEnergy, 
338                               const G4Material << 406            const G4MaterialCutsCouple*);
339   inline G4double GetDEDX(G4double kineticEner << 407   inline G4double GetRange(G4double& kineticEnergy, const G4MaterialCutsCouple*);
340                           G4double logKineticE << 408   inline G4double GetCSDARange(G4double& kineticEnergy, const G4MaterialCutsCouple*);
341   inline G4double GetRange(G4double kineticEne << 409   inline G4double GetRangeForLoss(G4double& kineticEnergy, const G4MaterialCutsCouple*);
342   inline G4double GetRange(G4double kineticEne << 410   inline G4double GetKineticEnergy(G4double& range, const G4MaterialCutsCouple*);
343                            G4double logKinetic << 411   inline G4double GetLambda(G4double& kineticEnergy, const G4MaterialCutsCouple*);
344   inline G4double GetCSDARange(G4double kineti << 
345                                const G4Materia << 
346   inline G4double GetKineticEnergy(G4double ra << 
347                                    const G4Mat << 
348   inline G4double GetLambda(G4double kineticEn << 
349   inline G4double GetLambda(G4double kineticEn << 
350                             G4double logKineti << 
351                                                   412 
352   inline G4bool TablesAreBuilt() const;           413   inline G4bool TablesAreBuilt() const;
353                                                   414 
354   // Access to specific tables                    415   // Access to specific tables
355   inline G4PhysicsTable* DEDXTable() const;       416   inline G4PhysicsTable* DEDXTable() const;
                                                   >> 417   inline G4PhysicsTable* DEDXTableForSubsec() const;
356   inline G4PhysicsTable* DEDXunRestrictedTable    418   inline G4PhysicsTable* DEDXunRestrictedTable() const;
357   inline G4PhysicsTable* IonisationTable() con    419   inline G4PhysicsTable* IonisationTable() const;
                                                   >> 420   inline G4PhysicsTable* IonisationTableForSubsec() const;
358   inline G4PhysicsTable* CSDARangeTable() cons    421   inline G4PhysicsTable* CSDARangeTable() const;
359   inline G4PhysicsTable* RangeTableForLoss() c    422   inline G4PhysicsTable* RangeTableForLoss() const;
360   inline G4PhysicsTable* InverseRangeTable() c    423   inline G4PhysicsTable* InverseRangeTable() const;
361   inline G4PhysicsTable* LambdaTable() const;  << 424   inline G4PhysicsTable* LambdaTable();
362   inline std::vector<G4TwoPeaksXS*>* TwoPeaksX << 425   inline G4PhysicsTable* SubLambdaTable();
363   inline std::vector<G4double>* EnergyOfCrossS << 
364                                                << 
365   inline G4bool UseBaseMaterial() const;       << 
366                                                   426 
367   //------------------------------------------    427   //------------------------------------------------------------------------
368   // Run time method for simulation of ionisat    428   // Run time method for simulation of ionisation
369   //------------------------------------------    429   //------------------------------------------------------------------------
370                                                   430 
371   // access atom on which interaction happens     431   // access atom on which interaction happens
372   const G4Element* GetCurrentElement() const;     432   const G4Element* GetCurrentElement() const;
373                                                   433 
                                                   >> 434   // sample range at the end of a step
                                                   >> 435   //  inline G4double SampleRange();
                                                   >> 436 
374   // Set scaling parameters for ions is needed    437   // Set scaling parameters for ions is needed to G4EmCalculator
375   void SetDynamicMassCharge(G4double massratio << 438   inline void SetDynamicMassCharge(G4double massratio, G4double charge2ratio);
376                                                   439 
377 private:                                          440 private:
378                                                   441 
379   void FillSecondariesAlongStep(G4double weigh << 442   void FillSecondariesAlongStep(G4double& eloss, G4double& weight);
380                                                << 
381   void PrintWarning(const G4String&, G4double  << 
382                                                   443 
383   // define material and indexes                  444   // define material and indexes
384   inline void DefineMaterial(const G4MaterialC    445   inline void DefineMaterial(const G4MaterialCutsCouple* couple);
385                                                   446 
386   //------------------------------------------    447   //------------------------------------------------------------------------
387   // Compute values using scaling relation, ma    448   // Compute values using scaling relation, mass and charge of based particle
388   //------------------------------------------    449   //------------------------------------------------------------------------
389   inline G4double GetDEDXForScaledEnergy(G4dou << 
390   inline G4double GetDEDXForScaledEnergy(G4dou << 
391                                          G4dou << 
392   inline G4double GetIonisationForScaledEnergy << 
393   inline G4double GetScaledRangeForScaledEnerg << 
394   inline G4double GetScaledRangeForScaledEnerg << 
395                                                << 
396                                                << 
397   inline G4double GetLimitScaledRangeForScaled << 
398   inline G4double GetLimitScaledRangeForScaled << 
399                                                << 
400                                                   450 
                                                   >> 451   inline G4double GetDEDXForScaledEnergy(G4double scaledKinEnergy);
                                                   >> 452   inline G4double GetSubDEDXForScaledEnergy(G4double scaledKinEnergy);
                                                   >> 453   inline G4double GetIonisationForScaledEnergy(G4double scaledKinEnergy);
                                                   >> 454   inline G4double GetSubIonisationForScaledEnergy(G4double scaledKinEnergy);
                                                   >> 455   inline G4double GetScaledRangeForScaledEnergy(G4double scaledKinEnergy);
                                                   >> 456   inline G4double GetLimitScaledRangeForScaledEnergy(G4double scaledKinEnergy);
401   inline G4double ScaledKinEnergyForLoss(G4dou    457   inline G4double ScaledKinEnergyForLoss(G4double range);
402   inline G4double GetLambdaForScaledEnergy(G4d << 458   inline G4double GetLambdaForScaledEnergy(G4double scaledKinEnergy);
403   inline G4double GetLambdaForScaledEnergy(G4d << 459   inline void ComputeLambdaForScaledEnergy(G4double scaledKinEnergy);
404                                            G4d << 
405                                                   460 
406   inline G4double LogScaledEkin(const G4Track& << 461   // hide  assignment operator
407                                                << 462   G4VEnergyLossProcess(G4VEnergyLossProcess &);
408   void ComputeLambdaForScaledEnergy(G4double s << 463   G4VEnergyLossProcess & operator=(const G4VEnergyLossProcess &right);
409                                     const G4Tr << 
410                                                   464 
411   G4bool IsRegionForCubcutProcessor(const G4Tr << 465   // ======== Parameters of the class fixed at construction =========
412                                                   466 
413 protected:                                     << 467   G4EmModelManager*           modelManager;
                                                   >> 468   G4EmBiasingManager*         biasManager;
                                                   >> 469   G4SafetyHelper*             safetyHelper;
414                                                   470 
415   G4ParticleChangeForLoss     fParticleChange; << 471   const G4ParticleDefinition* secondaryParticle;
416   const G4Material*           currentMaterial  << 472   const G4ParticleDefinition* theElectron;
417   const G4MaterialCutsCouple* currentCouple =  << 473   const G4ParticleDefinition* thePositron;
                                                   >> 474   const G4ParticleDefinition* theGamma;
                                                   >> 475   const G4ParticleDefinition* theGenericIon;
                                                   >> 476 
                                                   >> 477   //  G4PhysicsVector*            vstrag;
                                                   >> 478 
                                                   >> 479   // ======== Parameters of the class fixed at initialisation =======
                                                   >> 480 
                                                   >> 481   std::vector<G4VEmModel*>              emModels;
                                                   >> 482   G4VEmFluctuationModel*                fluctModel;
                                                   >> 483   G4VAtomDeexcitation*                  atomDeexcitation;
                                                   >> 484   std::vector<const G4Region*>          scoffRegions;
                                                   >> 485   G4int                                 nSCoffRegions;
                                                   >> 486   G4bool*                               idxSCoffRegions;
                                                   >> 487 
                                                   >> 488   std::vector<G4VEnergyLossProcess*>    scProcesses;
                                                   >> 489   G4int                                 nProcesses;
                                                   >> 490 
                                                   >> 491   // tables and vectors
                                                   >> 492   G4PhysicsTable*             theDEDXTable;
                                                   >> 493   G4PhysicsTable*             theDEDXSubTable;
                                                   >> 494   G4PhysicsTable*             theDEDXunRestrictedTable;
                                                   >> 495   G4PhysicsTable*             theIonisationTable;
                                                   >> 496   G4PhysicsTable*             theIonisationSubTable;
                                                   >> 497   G4PhysicsTable*             theRangeTableForLoss;
                                                   >> 498   G4PhysicsTable*             theCSDARangeTable;
                                                   >> 499   G4PhysicsTable*             theSecondaryRangeTable;
                                                   >> 500   G4PhysicsTable*             theInverseRangeTable;
                                                   >> 501   G4PhysicsTable*             theLambdaTable;
                                                   >> 502   G4PhysicsTable*             theSubLambdaTable;
                                                   >> 503 
                                                   >> 504   std::vector<G4double>       theDEDXAtMaxEnergy;
                                                   >> 505   std::vector<G4double>       theRangeAtMaxEnergy;
                                                   >> 506   std::vector<G4double>       theEnergyOfCrossSectionMax;
                                                   >> 507   std::vector<G4double>       theCrossSectionMax;
                                                   >> 508 
                                                   >> 509   const std::vector<G4double>* theDensityFactor;
                                                   >> 510   const std::vector<G4int>*    theDensityIdx;
418                                                   511 
419 private:                                       << 512   const G4DataVector*         theCuts;
                                                   >> 513   const G4DataVector*         theSubCuts;
420                                                   514 
421   G4LossTableManager*         lManager;        << 515   const G4ParticleDefinition* baseParticle;
422   G4EmModelManager*           modelManager;    << 
423   G4VEmModel*                 currentModel = n << 
424   G4EmBiasingManager*         biasManager = nu << 
425   G4SafetyHelper*             safetyHelper;    << 
426   G4EmParameters*             theParameters;   << 
427   G4VEmFluctuationModel*      fluctModel = nul << 
428   G4VAtomDeexcitation*        atomDeexcitation << 
429   G4VSubCutProducer*          subcutProducer = << 
430                                                << 
431   const G4ParticleDefinition* particle = nullp << 
432   const G4ParticleDefinition* baseParticle = n << 
433   const G4ParticleDefinition* secondaryParticl << 
434   G4EmDataHandler* theData = nullptr;          << 
435                                                << 
436   G4PhysicsTable* theDEDXTable = nullptr;      << 
437   G4PhysicsTable* theDEDXunRestrictedTable = n << 
438   G4PhysicsTable* theIonisationTable = nullptr << 
439   G4PhysicsTable* theRangeTableForLoss = nullp << 
440   G4PhysicsTable* theCSDARangeTable = nullptr; << 
441   G4PhysicsTable* theInverseRangeTable = nullp << 
442   G4PhysicsTable* theLambdaTable = nullptr;    << 
443                                                << 
444   std::vector<const G4Region*>* scoffRegions = << 
445   std::vector<G4VEmModel*>*     emModels = nul << 
446   const std::vector<G4int>*     theDensityIdx  << 
447   const std::vector<G4double>*  theDensityFact << 
448   const G4DataVector*           theCuts = null << 
449                                                   516 
450   std::vector<G4double>* theEnergyOfCrossSecti << 517   G4int    nBins;
451   std::vector<G4TwoPeaksXS*>* fXSpeaks = nullp << 518   G4int    nBinsCSDA;
452                                                   519 
453   G4double lowestKinEnergy;                       520   G4double lowestKinEnergy;
454   G4double minKinEnergy;                          521   G4double minKinEnergy;
455   G4double maxKinEnergy;                          522   G4double maxKinEnergy;
456   G4double maxKinEnergyCSDA;                      523   G4double maxKinEnergyCSDA;
457                                                   524 
458   G4double linLossLimit = 0.01;                << 525   G4double linLossLimit;
459   G4double dRoverRange = 0.2;                  << 526   G4double minSubRange;
                                                   >> 527   G4double dRoverRange;
460   G4double finalRange;                            528   G4double finalRange;
461   G4double lambdaFactor = 0.8;                 << 529   G4double lambdaFactor;
462   G4double invLambdaFactor;                    << 530   G4double biasFactor;
463   G4double biasFactor = 1.0;                   << 531 
464                                                << 532   G4bool   lossFluctuationFlag;
465   G4double massRatio = 1.0;                    << 533   G4bool   rndmStepFlag;
466   G4double logMassRatio = 0.0;                 << 534   G4bool   tablesAreBuilt;
467   G4double fFactor = 1.0;                      << 535   G4bool   integral;
468   G4double reduceFactor = 1.0;                 << 536   G4bool   isIon;
469   G4double chargeSqRatio = 1.0;                << 537   G4bool   isIonisation;
470   G4double fRange = 0.0;                       << 538   G4bool   useSubCutoff;
471   G4double fRangeEnergy = 0.0;                 << 539   G4bool   useDeexcitation;
                                                   >> 540   G4bool   biasFlag;
                                                   >> 541   G4bool   weightFlag;
472                                                   542 
473 protected:                                        543 protected:
474                                                   544 
475   G4double preStepLambda = 0.0;                << 545   G4ParticleChangeForLoss          fParticleChange;
476   G4double preStepKinEnergy = 0.0;             << 
477   G4double preStepScaledEnergy = 0.0;          << 
478   G4double mfpKinEnergy = 0.0;                 << 
479                                                   546 
480   std::size_t currentCoupleIndex = 0;          << 547   // ======== Cashed values - may be state dependent ================
481                                                   548 
482 private:                                          549 private:
483                                                   550 
484   G4int nBins;                                 << 551   std::vector<G4DynamicParticle*>  secParticles;
485   G4int nBinsCSDA;                             << 552   std::vector<G4Track*>            scTracks;
486   G4int numberOfModels = 0;                    << 553 
487   G4int nSCoffRegions = 0;                     << 554   const G4ParticleDefinition* particle;
488   G4int secID = _DeltaElectron;                << 555 
489   G4int tripletID = _TripletElectron;          << 556   G4VEmModel*                 currentModel;
490   G4int biasID = _DeltaEBelowCut;              << 557   const G4Material*           currentMaterial;
491   G4int epixeID = _ePIXE;                      << 558   const G4MaterialCutsCouple* currentCouple;
492   G4int gpixeID = _GammaPIXE;                  << 559   size_t                      currentCoupleIndex;
493   G4int mainSecondaries = 1;                   << 560   size_t                      basedCoupleIndex;
494                                                << 561 
495   std::size_t basedCoupleIndex = 0;            << 562   G4int    nWarnings;
496   std::size_t coupleIdxRange = 0;              << 563 
497   std::size_t idxDEDX = 0;                     << 564   G4double massRatio;
498   std::size_t idxDEDXunRestricted = 0;         << 565   G4double fFactor;
499   std::size_t idxIonisation = 0;               << 566   G4double reduceFactor;
500   std::size_t idxRange = 0;                    << 567   G4double chargeSqRatio;
501   std::size_t idxCSDA = 0;                     << 568 
502   std::size_t idxSecRange = 0;                 << 569   G4double preStepLambda;
503   std::size_t idxInverseRange = 0;             << 570   G4double fRange;
504   std::size_t idxLambda = 0;                   << 571   G4double preStepKinEnergy;
505                                                << 572   G4double preStepScaledEnergy;
506   G4GPILSelection aGPILSelection;              << 573   G4double mfpKinEnergy;
507   G4CrossSectionType fXSType = fEmOnePeak;     << 574 
508                                                << 575   G4GPILSelection  aGPILSelection;
509   G4bool lossFluctuationFlag = true;           << 
510   G4bool useCutAsFinalRange = false;           << 
511   G4bool tablesAreBuilt = false;               << 
512   G4bool spline = true;                        << 
513   G4bool isIon = false;                        << 
514   G4bool isIonisation = false;                 << 
515   G4bool useDeexcitation = false;              << 
516   G4bool biasFlag = false;                     << 
517   G4bool weightFlag = false;                   << 
518   G4bool isMaster = false;                     << 
519   G4bool baseMat = false;                      << 
520   G4bool actLinLossLimit = false;              << 
521   G4bool actLossFluc = false;                  << 
522   G4bool actBinning = false;                   << 
523   G4bool actMinKinEnergy = false;              << 
524   G4bool actMaxKinEnergy = false;              << 
525                                                   576 
526   std::vector<G4DynamicParticle*> secParticles << 
527   std::vector<G4Track*> scTracks;              << 
528 };                                                577 };
529                                                   578 
530 // ======== Run time inline methods ==========    579 // ======== Run time inline methods ================
531                                                   580 
532 inline std::size_t G4VEnergyLossProcess::Curre << 581 inline size_t G4VEnergyLossProcess::CurrentMaterialCutsCoupleIndex() const 
533 {                                                 582 {
534   return currentCoupleIndex;                      583   return currentCoupleIndex;
535 }                                                 584 }
536                                                   585 
537 //....oooOO0OOooo........oooOO0OOooo........oo    586 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 587   
                                                   >> 588 inline G4double G4VEnergyLossProcess::GetCurrentRange() const
                                                   >> 589 {
                                                   >> 590   return fRange;
                                                   >> 591 }
                                                   >> 592 
                                                   >> 593 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
538                                                   594 
539 inline void G4VEnergyLossProcess::SelectModel(    595 inline void G4VEnergyLossProcess::SelectModel(G4double kinEnergy)
540 {                                                 596 {
541   currentModel = modelManager->SelectModel(kin    597   currentModel = modelManager->SelectModel(kinEnergy, currentCoupleIndex);
542   currentModel->SetCurrentCouple(currentCouple    598   currentModel->SetCurrentCouple(currentCouple);
543 }                                                 599 }
544                                                   600 
545 //....oooOO0OOooo........oooOO0OOooo........oo    601 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
546                                                   602 
547 inline G4VEmModel* G4VEnergyLossProcess::Selec    603 inline G4VEmModel* G4VEnergyLossProcess::SelectModelForMaterial(
548                    G4double kinEnergy, std::si << 604                    G4double kinEnergy, size_t& idx) const
549 {                                                 605 {
550   return modelManager->SelectModel(kinEnergy,     606   return modelManager->SelectModel(kinEnergy, idx);
551 }                                                 607 }
552                                                   608 
553 //....oooOO0OOooo........oooOO0OOooo........oo    609 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
554                                                   610 
555 inline void                                       611 inline void 
556 G4VEnergyLossProcess::DefineMaterial(const G4M    612 G4VEnergyLossProcess::DefineMaterial(const G4MaterialCutsCouple* couple)
557 {                                                 613 {
558   if(couple != currentCouple) {                   614   if(couple != currentCouple) {
559     currentCouple = couple;                    << 615     currentCouple   = couple;
560     currentMaterial = couple->GetMaterial();      616     currentMaterial = couple->GetMaterial();
561     basedCoupleIndex = currentCoupleIndex = co << 617     currentCoupleIndex = couple->GetIndex();
562     fFactor = chargeSqRatio*biasFactor;        << 618     basedCoupleIndex   = (*theDensityIdx)[currentCoupleIndex];
563     mfpKinEnergy = DBL_MAX;                    << 619     fFactor = chargeSqRatio*biasFactor*(*theDensityFactor)[currentCoupleIndex];
564     idxLambda = 0;                             << 
565     if(baseMat) {                              << 
566       basedCoupleIndex = (*theDensityIdx)[curr << 
567       fFactor *= (*theDensityFactor)[currentCo << 
568     }                                          << 
569     reduceFactor = 1.0/(fFactor*massRatio);       620     reduceFactor = 1.0/(fFactor*massRatio);
                                                   >> 621     mfpKinEnergy = DBL_MAX;
570   }                                               622   }
571 }                                                 623 }
572                                                   624 
573 //....oooOO0OOooo........oooOO0OOooo........oo    625 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
574                                                   626 
                                                   >> 627 inline void G4VEnergyLossProcess::SetDynamicMassCharge(G4double massratio,
                                                   >> 628                                                        G4double charge2ratio)
                                                   >> 629 {
                                                   >> 630   massRatio     = massratio;
                                                   >> 631   fFactor      *= charge2ratio/chargeSqRatio;
                                                   >> 632   chargeSqRatio = charge2ratio;
                                                   >> 633   reduceFactor  = 1.0/(fFactor*massRatio);
                                                   >> 634 }
                                                   >> 635 
                                                   >> 636 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 637 
575 inline G4double G4VEnergyLossProcess::GetDEDXF    638 inline G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e)
576 {                                                 639 {
577   /*                                           << 640   G4double x = fFactor*(*theDEDXTable)[basedCoupleIndex]->Value(e);
578   G4cout << "G4VEnergyLossProcess::GetDEDX: Id << 
579            << basedCoupleIndex << " E(MeV)= "  << 
580          << " Emin= " << minKinEnergy << "  Fa << 
581          << "  " << theDEDXTable << G4endl; */ << 
582   G4double x = fFactor*(*theDEDXTable)[basedCo << 
583   if(e < minKinEnergy) { x *= std::sqrt(e/minK    641   if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
584   return x;                                       642   return x;
585 }                                                 643 }
586                                                   644 
587 //....oooOO0OOooo........oooOO0OOooo........oo    645 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
588                                                   646 
589 inline                                         << 647 inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e)
590 G4double G4VEnergyLossProcess::GetDEDXForScale << 
591 {                                                 648 {
592   /*                                           << 649   G4double x = fFactor*(*theDEDXSubTable)[basedCoupleIndex]->Value(e);
593   G4cout << "G4VEnergyLossProcess::GetDEDX: Id << 
594            << basedCoupleIndex << " E(MeV)= "  << 
595          << " Emin= " << minKinEnergy << "  Fa << 
596          << "  " << theDEDXTable << G4endl; */ << 
597   G4double x = fFactor*(*theDEDXTable)[basedCo << 
598   if(e < minKinEnergy) { x *= std::sqrt(e/minK    650   if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
599   return x;                                       651   return x;
600 }                                                 652 }
601                                                   653 
602 //....oooOO0OOooo........oooOO0OOooo........oo    654 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
603                                                   655 
604 inline G4double G4VEnergyLossProcess::GetIonis    656 inline G4double G4VEnergyLossProcess::GetIonisationForScaledEnergy(G4double e)
605 {                                                 657 {
606   G4double x =                                 << 658   G4double x = fFactor*(*theIonisationTable)[basedCoupleIndex]->Value(e);
607     fFactor*(*theIonisationTable)[basedCoupleI << 
608   if(e < minKinEnergy) { x *= std::sqrt(e/minK    659   if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
609   return x;                                       660   return x;
610 }                                                 661 }
611                                                   662 
612 //....oooOO0OOooo........oooOO0OOooo........oo    663 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
613                                                   664 
614 inline G4double G4VEnergyLossProcess::GetScale << 665 inline 
615 {                                              << 666 G4double G4VEnergyLossProcess::GetSubIonisationForScaledEnergy(G4double e)
616   //G4cout << "G4VEnergyLossProcess::GetScaled << 
617   //         << basedCoupleIndex << " E(MeV)=  << 
618   //         << " lastIdx= " << lastIdx << "   << 
619   if(currentCoupleIndex != coupleIdxRange || f << 
620     coupleIdxRange = currentCoupleIndex;       << 
621     fRangeEnergy = e;                          << 
622     fRange = reduceFactor*((*theRangeTableForL << 
623     if (fRange < 0.0) { fRange = 0.0; }        << 
624     else if (e < minKinEnergy) { fRange *= std << 
625   }                                            << 
626   //G4cout << "G4VEnergyLossProcess::GetScaled << 
627   //         << basedCoupleIndex << " E(MeV)=  << 
628   //         << " R=  " << computedRange << "  << 
629   return fRange;                               << 
630 }                                              << 
631                                                << 
632 inline G4double                                << 
633 G4VEnergyLossProcess::GetScaledRangeForScaledE << 
634 {                                                 667 {
635   //G4cout << "G4VEnergyLossProcess::GetScaled << 668   G4double x = fFactor*(*theIonisationSubTable)[basedCoupleIndex]->Value(e);
636   //         << basedCoupleIndex << " E(MeV)=  << 669   if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
637   //         << " lastIdx= " << lastIdx << "   << 670   return x;
638   if(currentCoupleIndex != coupleIdxRange || f << 
639     coupleIdxRange = currentCoupleIndex;       << 
640     fRangeEnergy = e;                          << 
641     fRange = reduceFactor*((*theRangeTableForL << 
642     if (fRange < 0.0) { fRange = 0.0; }        << 
643     else if (e < minKinEnergy) { fRange *= std << 
644   }                                            << 
645   //G4cout << "G4VEnergyLossProcess::GetScaled << 
646   //         << basedCoupleIndex << " E(MeV)=  << 
647   //         << " R=  " << fRange << "  " << t << 
648   return fRange;                               << 
649 }                                                 671 }
650                                                   672 
651 //....oooOO0OOooo........oooOO0OOooo........oo    673 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
652                                                   674 
653 inline G4double                                << 675 inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e)
654 G4VEnergyLossProcess::GetLimitScaledRangeForSc << 
655 {                                                 676 {
656   G4double x = ((*theCSDARangeTable)[basedCoup << 677   G4double x = ((*theRangeTableForLoss)[basedCoupleIndex])->Value(e);
657   if (x < 0.0) { x = 0.0; }                    << 678   if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
658   else if (e < minKinEnergy) { x *= std::sqrt( << 
659   return x;                                       679   return x;
660 }                                                 680 }
661                                                   681 
662 //....oooOO0OOooo........oooOO0OOooo........oo    682 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
663                                                   683 
664 inline G4double                                   684 inline G4double 
665 G4VEnergyLossProcess::GetLimitScaledRangeForSc << 685 G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(G4double e)
666                                                << 
667 {                                                 686 {
668   G4double x = ((*theCSDARangeTable)[basedCoup << 687   G4double x;
669   if (x < 0.0) { x = 0.0; }                    << 688   if (e < maxKinEnergyCSDA) {
670   else if (e < minKinEnergy) { x *= std::sqrt( << 689     x = ((*theCSDARangeTable)[basedCoupleIndex])->Value(e);
                                                   >> 690     if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
                                                   >> 691   } else {
                                                   >> 692     x = theRangeAtMaxEnergy[basedCoupleIndex] +
                                                   >> 693       (e - maxKinEnergyCSDA)/theDEDXAtMaxEnergy[basedCoupleIndex];
                                                   >> 694   }
671   return x;                                       695   return x;
672 }                                                 696 }
673                                                   697 
674 //....oooOO0OOooo........oooOO0OOooo........oo    698 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
675                                                   699 
676 inline G4double G4VEnergyLossProcess::ScaledKi    700 inline G4double G4VEnergyLossProcess::ScaledKinEnergyForLoss(G4double r)
677 {                                                 701 {
678   //G4cout << "G4VEnergyLossProcess::GetEnergy << 
679   //         << basedCoupleIndex << " R(mm)= " << 
680   //         << theInverseRangeTable << G4endl << 
681   G4PhysicsVector* v = (*theInverseRangeTable)    702   G4PhysicsVector* v = (*theInverseRangeTable)[basedCoupleIndex];
682   G4double rmin = v->Energy(0);                   703   G4double rmin = v->Energy(0);
683   G4double e = 0.0;                               704   G4double e = 0.0; 
684   if(r >= rmin) { e = v->Value(r, idxInverseRa << 705   if(r >= rmin) { e = v->Value(r); }
685   else if(r > 0.0) {                              706   else if(r > 0.0) {
686     G4double x = r/rmin;                          707     G4double x = r/rmin;
687     e = minKinEnergy*x*x;                         708     e = minKinEnergy*x*x;
688   }                                               709   }
689   return e;                                       710   return e;
690 }                                                 711 }
691                                                   712 
692 //....oooOO0OOooo........oooOO0OOooo........oo    713 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
693                                                   714 
694 inline G4double G4VEnergyLossProcess::GetLambd    715 inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e)
695 {                                                 716 {
696   return fFactor*((*theLambdaTable)[basedCoupl << 717   return fFactor*((*theLambdaTable)[basedCoupleIndex])->Value(e);
697 }                                              << 
698                                                << 
699 //....oooOO0OOooo........oooOO0OOooo........oo << 
700                                                << 
701 inline G4double                                << 
702 G4VEnergyLossProcess::GetLambdaForScaledEnergy << 
703 {                                              << 
704   return fFactor*((*theLambdaTable)[basedCoupl << 
705 }                                              << 
706                                                << 
707 //....oooOO0OOooo........oooOO0OOooo........oo << 
708                                                << 
709 inline G4double G4VEnergyLossProcess::LogScale << 
710 {                                              << 
711   return track.GetDynamicParticle()->GetLogKin << 
712 }                                                 718 }
713                                                   719 
714 //....oooOO0OOooo........oooOO0OOooo........oo    720 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
715                                                   721 
716 inline G4double                                   722 inline G4double 
717 G4VEnergyLossProcess::GetDEDX(G4double kinEner << 723 G4VEnergyLossProcess::GetDEDX(G4double& kineticEnergy,
718                               const G4Material << 724             const G4MaterialCutsCouple* couple)
719 {                                                 725 {
720   DefineMaterial(couple);                         726   DefineMaterial(couple);
721   return GetDEDXForScaledEnergy(kinEnergy*mass << 727   return GetDEDXForScaledEnergy(kineticEnergy*massRatio);
722 }                                                 728 }
723                                                   729 
724 //....oooOO0OOooo........oooOO0OOooo........oo    730 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
725                                                   731 
726 inline G4double                                   732 inline G4double 
727 G4VEnergyLossProcess::GetDEDX(G4double kinEner << 733 G4VEnergyLossProcess::GetDEDXForSubsec(G4double& kineticEnergy,
728                               const G4Material << 734             const G4MaterialCutsCouple* couple)
729                               G4double logKinE << 
730 {                                                 735 {
731   DefineMaterial(couple);                         736   DefineMaterial(couple);
732   return GetDEDXForScaledEnergy(kinEnergy*mass << 737   return GetSubDEDXForScaledEnergy(kineticEnergy*massRatio);
733 }                                                 738 }
734                                                   739 
735 //....oooOO0OOooo........oooOO0OOooo........oo    740 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
736                                                   741 
737 inline G4double                                   742 inline G4double 
738 G4VEnergyLossProcess::GetRange(G4double kinEne << 743 G4VEnergyLossProcess::GetRange(G4double& kineticEnergy,
739                                const G4Materia << 744              const G4MaterialCutsCouple* couple)
740 {                                                 745 {
741   DefineMaterial(couple);                      << 746   G4double x = fRange;
742   return GetScaledRangeForScaledEnergy(kinEner << 747   if(kineticEnergy != preStepKinEnergy || couple != currentCouple) { 
                                                   >> 748     DefineMaterial(couple);
                                                   >> 749     if(theCSDARangeTable) {
                                                   >> 750       x = GetLimitScaledRangeForScaledEnergy(kineticEnergy*massRatio)
                                                   >> 751   * reduceFactor;
                                                   >> 752     } else if(theRangeTableForLoss) {
                                                   >> 753       x = GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
                                                   >> 754     }
                                                   >> 755   }
                                                   >> 756   return x;
743 }                                                 757 }
744                                                   758 
745 //....oooOO0OOooo........oooOO0OOooo........oo    759 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
746                                                   760 
747 inline G4double                                   761 inline G4double 
748 G4VEnergyLossProcess::GetRange(G4double kinEne << 762 G4VEnergyLossProcess::GetCSDARange(G4double& kineticEnergy, 
749                                const G4Materia << 763            const G4MaterialCutsCouple* couple)
750                                G4double logKin << 
751 {                                                 764 {
752   DefineMaterial(couple);                         765   DefineMaterial(couple);
753   return GetScaledRangeForScaledEnergy(kinEner << 766   G4double x = DBL_MAX;
                                                   >> 767   if(theCSDARangeTable) {
                                                   >> 768     x = GetLimitScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
                                                   >> 769   }
                                                   >> 770   return x;
754 }                                                 771 }
755                                                   772 
756 //....oooOO0OOooo........oooOO0OOooo........oo    773 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
757                                                   774 
758 inline G4double                                   775 inline G4double 
759 G4VEnergyLossProcess::GetCSDARange(G4double ki << 776 G4VEnergyLossProcess::GetRangeForLoss(G4double& kineticEnergy,
760                                    const G4Mat << 777               const G4MaterialCutsCouple* couple)
761 {                                                 778 {
762   DefineMaterial(couple);                         779   DefineMaterial(couple);
763   return (nullptr == theCSDARangeTable) ? DBL_ << 780   G4double x = DBL_MAX;
764     GetLimitScaledRangeForScaledEnergy(kinetic << 781   if(theRangeTableForLoss) {
                                                   >> 782     x = GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
                                                   >> 783   }
                                                   >> 784   //  G4cout << "Range from " << GetProcessName() 
                                                   >> 785   //         << "  e= " << kineticEnergy << " r= " << x << G4endl;
                                                   >> 786   return x;
765 }                                                 787 }
766                                                   788 
767 //....oooOO0OOooo........oooOO0OOooo........oo    789 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
768                                                   790 
769 inline G4double                                   791 inline G4double 
770 G4VEnergyLossProcess::GetKineticEnergy(G4doubl << 792 G4VEnergyLossProcess::GetKineticEnergy(G4double& range,
771                                        const G << 793                const G4MaterialCutsCouple* couple)
772 {                                                 794 {
773   DefineMaterial(couple);                         795   DefineMaterial(couple);
774   return ScaledKinEnergyForLoss(range/reduceFa << 796   G4double r = range/reduceFactor;
                                                   >> 797   G4double e = ScaledKinEnergyForLoss(r)/massRatio;
                                                   >> 798   return e;
775 }                                                 799 }
776                                                   800 
777 //....oooOO0OOooo........oooOO0OOooo........oo    801 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
778                                                   802 
779 inline G4double                                   803 inline G4double 
780 G4VEnergyLossProcess::GetLambda(G4double kinEn << 804 G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy,
781                                 const G4Materi << 805         const G4MaterialCutsCouple* couple)
782 {                                                 806 {
783   DefineMaterial(couple);                         807   DefineMaterial(couple);
784   return (nullptr != theLambdaTable) ?         << 808   G4double x = 0.0;
785     GetLambdaForScaledEnergy(kinEnergy*massRat << 809   if(theLambdaTable) { x = GetLambdaForScaledEnergy(kineticEnergy*massRatio); }
                                                   >> 810   return x;
786 }                                                 811 }
787                                                   812 
788 //....oooOO0OOooo........oooOO0OOooo........oo    813 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
789                                                   814 
790 inline G4double                                << 815 inline void G4VEnergyLossProcess::ComputeLambdaForScaledEnergy(G4double e)
791 G4VEnergyLossProcess::GetLambda(G4double kinEn << 
792                                 const G4Materi << 
793                                 G4double logKi << 
794 {                                                 816 {
795   DefineMaterial(couple);                      << 817   mfpKinEnergy  = theEnergyOfCrossSectionMax[currentCoupleIndex];
796   return (nullptr != theLambdaTable) ?         << 818   if (e <= mfpKinEnergy) {
797     GetLambdaForScaledEnergy(kinEnergy*massRat << 819     preStepLambda = GetLambdaForScaledEnergy(e);
798     :  0.0;                                    << 820 
                                                   >> 821   } else {
                                                   >> 822     G4double e1 = e*lambdaFactor;
                                                   >> 823     if(e1 > mfpKinEnergy) {
                                                   >> 824       preStepLambda  = GetLambdaForScaledEnergy(e);
                                                   >> 825       G4double preStepLambda1 = GetLambdaForScaledEnergy(e1);
                                                   >> 826       if(preStepLambda1 > preStepLambda) {
                                                   >> 827         mfpKinEnergy = e1;
                                                   >> 828         preStepLambda = preStepLambda1;
                                                   >> 829       }
                                                   >> 830     } else {
                                                   >> 831       preStepLambda = fFactor*theCrossSectionMax[currentCoupleIndex];
                                                   >> 832     }
                                                   >> 833   }
799 }                                                 834 }
800                                                   835 
801 // ======== Get/Set inline methods used at ini    836 // ======== Get/Set inline methods used at initialisation ================
802                                                   837 
803 inline void G4VEnergyLossProcess::SetFluctMode    838 inline void G4VEnergyLossProcess::SetFluctModel(G4VEmFluctuationModel* p)
804 {                                                 839 {
805   fluctModel = p;                                 840   fluctModel = p;
806 }                                                 841 }
807                                                   842 
808 //....oooOO0OOooo........oooOO0OOooo........oo    843 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
809                                                   844 
810 inline G4VEmFluctuationModel* G4VEnergyLossPro << 845 inline G4VEmFluctuationModel* G4VEnergyLossProcess::FluctModel()
811 {                                                 846 {
812   return fluctModel;                              847   return fluctModel;
813 }                                                 848 }
814                                                   849 
815 //....oooOO0OOooo........oooOO0OOooo........oo    850 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
816                                                   851 
817 inline void G4VEnergyLossProcess::SetParticle(    852 inline void G4VEnergyLossProcess::SetParticle(const G4ParticleDefinition* p)
818 {                                                 853 {
819   particle = p;                                   854   particle = p;
820 }                                                 855 }
821                                                   856 
822 //....oooOO0OOooo........oooOO0OOooo........oo    857 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
823                                                   858 
824 inline void                                    << 859 inline void G4VEnergyLossProcess::SetSecondaryParticle(const G4ParticleDefinition* p)
825 G4VEnergyLossProcess::SetSecondaryParticle(con << 
826 {                                                 860 {
827   secondaryParticle = p;                          861   secondaryParticle = p;
828 }                                                 862 }
829                                                   863 
830 //....oooOO0OOooo........oooOO0OOooo........oo    864 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
831                                                   865 
832 inline void                                    << 866 inline void G4VEnergyLossProcess::SetBaseParticle(const G4ParticleDefinition* p)
833 G4VEnergyLossProcess::SetBaseParticle(const G4 << 
834 {                                                 867 {
835   baseParticle = p;                               868   baseParticle = p;
836 }                                                 869 }
837                                                   870 
838 //....oooOO0OOooo........oooOO0OOooo........oo    871 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
839                                                   872 
840 inline const G4ParticleDefinition* G4VEnergyLo    873 inline const G4ParticleDefinition* G4VEnergyLossProcess::Particle() const
841 {                                                 874 {
842   return particle;                                875   return particle;
843 }                                                 876 }
844                                                   877 
845 //....oooOO0OOooo........oooOO0OOooo........oo    878 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
846                                                   879 
847 inline const G4ParticleDefinition* G4VEnergyLo    880 inline const G4ParticleDefinition* G4VEnergyLossProcess::BaseParticle() const
848 {                                                 881 {
849   return baseParticle;                            882   return baseParticle;
850 }                                                 883 }
851                                                   884 
852 //....oooOO0OOooo........oooOO0OOooo........oo    885 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
853                                                   886 
854 inline const G4ParticleDefinition*             << 887 inline const G4ParticleDefinition* G4VEnergyLossProcess::SecondaryParticle() const
855 G4VEnergyLossProcess::SecondaryParticle() cons << 
856 {                                                 888 {
857   return secondaryParticle;                       889   return secondaryParticle;
858 }                                                 890 }
859                                                   891 
860 //....oooOO0OOooo........oooOO0OOooo........oo    892 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
861                                                   893 
862 inline void G4VEnergyLossProcess::SetLossFluct    894 inline void G4VEnergyLossProcess::SetLossFluctuations(G4bool val)
863 {                                                 895 {
864   lossFluctuationFlag = val;                      896   lossFluctuationFlag = val;
865   actLossFluc = true;                          << 
866 }                                                 897 }
867                                                   898 
868 //....oooOO0OOooo........oooOO0OOooo........oo    899 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
869                                                   900 
870 inline void G4VEnergyLossProcess::SetSpline(G4 << 901 inline void G4VEnergyLossProcess::SetRandomStep(G4bool val)
871 {                                                 902 {
872   spline = val;                                << 903   rndmStepFlag = val;
873 }                                                 904 }
874                                                   905 
875 //....oooOO0OOooo........oooOO0OOooo........oo    906 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
876                                                   907 
877 inline void G4VEnergyLossProcess::SetCrossSect << 908 inline void G4VEnergyLossProcess::SetIntegral(G4bool val)
878 {                                                 909 {
879   fXSType = val;                               << 910   integral = val;
880 }                                                 911 }
881                                                   912 
882 //....oooOO0OOooo........oooOO0OOooo........oo    913 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
883                                                   914   
884 inline G4CrossSectionType G4VEnergyLossProcess << 915 inline G4bool G4VEnergyLossProcess::IsIntegral() const 
885 {                                                 916 {
886   return fXSType;                              << 917   return integral;
                                                   >> 918 }
                                                   >> 919 
                                                   >> 920 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 921 
                                                   >> 922 inline void G4VEnergyLossProcess::SetIonisation(G4bool val)
                                                   >> 923 {
                                                   >> 924   isIonisation = val;
                                                   >> 925   if(val) { aGPILSelection = CandidateForSelection; }
                                                   >> 926   else    { aGPILSelection = NotCandidateForSelection; }
887 }                                                 927 }
888                                                   928 
889 //....oooOO0OOooo........oooOO0OOooo........oo    929 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
890                                                   930 
891 inline G4bool G4VEnergyLossProcess::IsIonisati    931 inline G4bool G4VEnergyLossProcess::IsIonisationProcess() const
892 {                                                 932 {
893   return isIonisation;                            933   return isIonisation;
894 }                                                 934 }
895                                                   935 
896 //....oooOO0OOooo........oooOO0OOooo........oo    936 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
897                                                   937 
                                                   >> 938 inline void G4VEnergyLossProcess::SetLinearLossLimit(G4double val)
                                                   >> 939 {
                                                   >> 940   linLossLimit = val;
                                                   >> 941 }
                                                   >> 942 
                                                   >> 943 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 944 
                                                   >> 945 inline void G4VEnergyLossProcess::SetMinSubRange(G4double val)
                                                   >> 946 {
                                                   >> 947   minSubRange = val;
                                                   >> 948 }
                                                   >> 949 
                                                   >> 950 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 951 
                                                   >> 952 inline void G4VEnergyLossProcess::SetLambdaFactor(G4double val)
                                                   >> 953 {
                                                   >> 954   if(val > 0.0 && val <= 1.0) { lambdaFactor = val; }
                                                   >> 955 }
                                                   >> 956 
                                                   >> 957 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 958 
                                                   >> 959 void G4VEnergyLossProcess::SetStepFunction(G4double v1, G4double v2)
                                                   >> 960 {
                                                   >> 961   dRoverRange = v1;
                                                   >> 962   finalRange = v2;
                                                   >> 963   if (dRoverRange > 0.999) { dRoverRange = 1.0; }
                                                   >> 964   currentCouple = 0;
                                                   >> 965   mfpKinEnergy  = DBL_MAX;
                                                   >> 966 }
                                                   >> 967 
                                                   >> 968 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 969 
                                                   >> 970 inline void G4VEnergyLossProcess::SetLowestEnergyLimit(G4double val)
                                                   >> 971 {
                                                   >> 972   lowestKinEnergy = val;
                                                   >> 973 }
                                                   >> 974 
                                                   >> 975 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 976 
898 inline G4int G4VEnergyLossProcess::NumberOfSub    977 inline G4int G4VEnergyLossProcess::NumberOfSubCutoffRegions() const
899 {                                                 978 {
900   return nSCoffRegions;                           979   return nSCoffRegions;
901 }                                                 980 }
902                                                   981 
903 //....oooOO0OOooo........oooOO0OOooo........oo    982 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
904                                                   983 
905 inline G4double G4VEnergyLossProcess::MinKinEn << 984 inline void G4VEnergyLossProcess::SetDEDXBinning(G4int nbins)
906 {                                                 985 {
907   return minKinEnergy;                         << 986   nBins = nbins;
908 }                                                 987 }
909                                                   988 
910 //....oooOO0OOooo........oooOO0OOooo........oo    989 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
911                                                   990 
912 inline G4double G4VEnergyLossProcess::MaxKinEn << 991 inline void G4VEnergyLossProcess::SetLambdaBinning(G4int nbins)
913 {                                                 992 {
914   return maxKinEnergy;                         << 993   nBins = nbins;
915 }                                                 994 }
916                                                   995 
917 //....oooOO0OOooo........oooOO0OOooo........oo    996 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
918                                                   997 
919 inline G4double G4VEnergyLossProcess::CrossSec << 998 inline void G4VEnergyLossProcess::SetDEDXBinningForCSDARange(G4int nbins)
920 {                                                 999 {
921   return biasFactor;                           << 1000   nBinsCSDA = nbins;
922 }                                                 1001 }
923                                                   1002 
924 //....oooOO0OOooo........oooOO0OOooo........oo    1003 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
925                                                   1004 
926 inline G4bool G4VEnergyLossProcess::TablesAreB << 1005 inline void G4VEnergyLossProcess::SetMinKinEnergy(G4double e)
927 {                                                 1006 {
928   return tablesAreBuilt;                       << 1007   minKinEnergy = e;
929 }                                                 1008 }
930                                                   1009 
931 //....oooOO0OOooo........oooOO0OOooo........oo    1010 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
932                                                   1011 
933 inline G4PhysicsTable* G4VEnergyLossProcess::D << 1012 inline G4double G4VEnergyLossProcess::MinKinEnergy() const
934 {                                                 1013 {
935   return theDEDXTable;                         << 1014   return minKinEnergy;
936 }                                                 1015 }
937                                                   1016 
938 //....oooOO0OOooo........oooOO0OOooo........oo    1017 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
939                                                   1018 
940 inline G4PhysicsTable* G4VEnergyLossProcess::D << 1019 inline void G4VEnergyLossProcess::SetMaxKinEnergy(G4double e)
941 {                                                 1020 {
942   return theDEDXunRestrictedTable;             << 1021   maxKinEnergy = e;
                                                   >> 1022   if(e < maxKinEnergyCSDA) { maxKinEnergyCSDA = e; }
943 }                                                 1023 }
944                                                   1024 
945 //....oooOO0OOooo........oooOO0OOooo........oo    1025 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
946                                                   1026 
947 inline G4PhysicsTable* G4VEnergyLossProcess::I << 1027 inline G4double G4VEnergyLossProcess::MaxKinEnergy() const
948 {                                                 1028 {
949   return theIonisationTable;                   << 1029   return maxKinEnergy;
950 }                                                 1030 }
951                                                   1031 
952 //....oooOO0OOooo........oooOO0OOooo........oo    1032 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
953                                                   1033 
954 inline G4PhysicsTable* G4VEnergyLossProcess::C << 1034 inline void G4VEnergyLossProcess::SetMaxKinEnergyForCSDARange(G4double e)
955 {                                                 1035 {
956   return theCSDARangeTable;                    << 1036   maxKinEnergyCSDA = e;
957 }                                                 1037 }
958                                                   1038 
959 //....oooOO0OOooo........oooOO0OOooo........oo    1039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
960                                                   1040 
961 inline G4PhysicsTable* G4VEnergyLossProcess::R << 1041 inline G4double G4VEnergyLossProcess::CrossSectionBiasingFactor() const
962 {                                                 1042 {
963   return theRangeTableForLoss;                 << 1043   return biasFactor;
964 }                                                 1044 }
965                                                   1045 
966 //....oooOO0OOooo........oooOO0OOooo........oo    1046 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
967                                                   1047 
968 inline G4PhysicsTable* G4VEnergyLossProcess::I << 1048 inline G4bool G4VEnergyLossProcess::TablesAreBuilt() const
969 {                                                 1049 {
970   return theInverseRangeTable;                 << 1050   return  tablesAreBuilt;
971 }                                                 1051 }
972                                                   1052 
973 //....oooOO0OOooo........oooOO0OOooo........oo    1053 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
974                                                   1054 
975 inline G4PhysicsTable* G4VEnergyLossProcess::L << 1055 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTable() const
976 {                                                 1056 {
977   return theLambdaTable;                       << 1057   return theDEDXTable;
978 }                                                 1058 }
979                                                   1059 
980 //....oooOO0OOooo........oooOO0OOooo........oo    1060 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
981                                                   1061 
982 inline G4bool G4VEnergyLossProcess::UseBaseMat << 1062 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTableForSubsec() const
983 {                                                 1063 {
984   return baseMat;                              << 1064   return theDEDXSubTable;
985 }                                                 1065 }
986                                                   1066 
987 //....oooOO0OOooo........oooOO0OOooo........oo    1067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
988                                                   1068 
989 inline std::vector<G4double>*                  << 1069 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXunRestrictedTable() const
990 G4VEnergyLossProcess::EnergyOfCrossSectionMax( << 
991 {                                                 1070 {
992   return theEnergyOfCrossSectionMax;           << 1071   return theDEDXunRestrictedTable;
993 }                                                 1072 }
994                                                   1073 
995 //....oooOO0OOooo........oooOO0OOooo........oo    1074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
996                                                   1075 
997 inline std::vector<G4TwoPeaksXS*>* G4VEnergyLo << 1076 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTable() const
                                                   >> 1077 {
                                                   >> 1078   G4PhysicsTable* t = theDEDXTable;
                                                   >> 1079   if(theIonisationTable) { t = theIonisationTable; } 
                                                   >> 1080   return t;
                                                   >> 1081 }
                                                   >> 1082 
                                                   >> 1083 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 1084 
                                                   >> 1085 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTableForSubsec() const
998 {                                                 1086 {
999   return fXSpeaks;                             << 1087   G4PhysicsTable* t = theDEDXSubTable;
                                                   >> 1088   if(theIonisationSubTable) { t = theIonisationSubTable; } 
                                                   >> 1089   return t;
1000 }                                                1090 }
1001                                                  1091 
1002 //....oooOO0OOooo........oooOO0OOooo........o    1092 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1003                                                  1093 
1004 inline std::size_t G4VEnergyLossProcess::Numb << 1094 inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const
1005 {                                                1095 {
1006   return numberOfModels;                      << 1096   return theCSDARangeTable;
1007 }                                                1097 }
1008                                                  1098 
1009 //....oooOO0OOooo........oooOO0OOooo........o    1099 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1010                                                  1100 
1011 inline G4VEmModel* G4VEnergyLossProcess::EmMo << 1101 inline G4PhysicsTable* G4VEnergyLossProcess::RangeTableForLoss() const
1012 {                                                1102 {
1013   return (index < emModels->size()) ? (*emMod << 1103   return theRangeTableForLoss;
                                                   >> 1104 }
                                                   >> 1105 
                                                   >> 1106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 1107 
                                                   >> 1108 inline G4PhysicsTable* G4VEnergyLossProcess::InverseRangeTable() const
                                                   >> 1109 {
                                                   >> 1110   return theInverseRangeTable;
                                                   >> 1111 }
                                                   >> 1112 
                                                   >> 1113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 1114 
                                                   >> 1115 inline G4PhysicsTable* G4VEnergyLossProcess::LambdaTable()
                                                   >> 1116 {
                                                   >> 1117   return theLambdaTable;
1014 }                                                1118 }
1015                                                  1119 
1016 //....oooOO0OOooo........oooOO0OOooo........o    1120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1017                                                  1121 
1018 inline G4VEmModel*                            << 1122 inline G4PhysicsTable* G4VEnergyLossProcess::SubLambdaTable()
1019 G4VEnergyLossProcess::GetModelByIndex(std::si << 
1020 {                                                1123 {
1021   return modelManager->GetModel((G4int)idx, v << 1124   return theSubLambdaTable;
1022 }                                                1125 }
1023                                                  1126 
1024 //....oooOO0OOooo........oooOO0OOooo........o    1127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1025                                                  1128 
1026 #endif                                           1129 #endif
1027                                                  1130