Geant4 Cross Reference

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


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
                                                   >>  23 // $Id: G4LossTableManager.hh,v 1.27 2005/02/15 19:35:11 vnivanch Exp $
                                                   >>  24 // GEANT4 tag $Name: geant4-07-01-patch-01 $
                                                   >>  25 //
                                                   >>  26 //
 26 // -------------------------------------------     27 // -------------------------------------------------------------------
 27 //                                                 28 //
 28 // GEANT4 Class header file                        29 // GEANT4 Class header file
 29 //                                                 30 //
 30 //                                                 31 //
 31 // File name:     G4LossTableManager               32 // File name:     G4LossTableManager
 32 //                                                 33 //
 33 // Author:        Vladimir Ivanchenko on base      34 // Author:        Vladimir Ivanchenko on base of G4LossTables class
 34 //                and Maria Grazia Pia ideas       35 //                and Maria Grazia Pia ideas
 35 //                                                 36 //
 36 // Creation date: 03.01.2002                       37 // Creation date: 03.01.2002
 37 //                                                 38 //
 38 // Modifications by V.Ivanchenko               <<  39 // Modifications:
                                                   >>  40 //
                                                   >>  41 // 20-01-03 Migrade to cut per region (V.Ivanchenko)
                                                   >>  42 // 17-02-03 Fix problem of store/restore tables for ions (V.Ivanchenko)
                                                   >>  43 // 10-03-03 Add Ion registration (V.Ivanchenko)
                                                   >>  44 // 25-03-03 Add deregistration (V.Ivanchenko)
                                                   >>  45 // 26-03-03 Add GetDEDXDispersion (V.Ivanchenko)
                                                   >>  46 // 02-04-03 Change messenger (V.Ivanchenko)
                                                   >>  47 // 23-07-03 Add exchange with G4EnergyLossTables (V.Ivanchenko)
                                                   >>  48 // 05-10-03 Add G4VEmProcesses registration (V.Ivanchenko)
                                                   >>  49 // 17-10-03 Add SetParameters method (V.Ivanchenko)
                                                   >>  50 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
                                                   >>  51 // 14-01-04 Activate precise range calculation (V.Ivanchenko)
                                                   >>  52 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
 39 //                                                 53 //
 40 // Class Description:                              54 // Class Description:
 41 //                                                 55 //
 42 // A utility static class, responsable for the     56 // A utility static class, responsable for the energy loss tables
 43 // for each particle                               57 // for each particle
 44 //                                                 58 //
 45 // Energy loss processes have to register thei     59 // Energy loss processes have to register their tables with this
 46 // class. The responsibility of creating and d     60 // class. The responsibility of creating and deleting the tables
 47 // remains with the energy loss classes.           61 // remains with the energy loss classes.
 48                                                    62 
 49 // -------------------------------------------     63 // -------------------------------------------------------------------
 50 //                                                 64 //
 51                                                    65 
 52 #ifndef G4LossTableManager_h                       66 #ifndef G4LossTableManager_h
 53 #define G4LossTableManager_h 1                     67 #define G4LossTableManager_h 1
 54                                                    68 
                                                   >>  69 
 55 #include <map>                                     70 #include <map>
 56 #include <vector>                                  71 #include <vector>
 57 #include "globals.hh"                              72 #include "globals.hh"
 58 #include "G4ThreadLocalSingleton.hh"           <<  73 #include "G4LossTableBuilder.hh"
 59 #include "G4VEnergyLossProcess.hh"                 74 #include "G4VEnergyLossProcess.hh"
 60 #include "G4EmParameters.hh"                   <<  75 #include "G4EnergyLossTables.hh"
 61                                                    76 
 62 class G4PhysicsTable;                              77 class G4PhysicsTable;
 63 class G4MaterialCutsCouple;                        78 class G4MaterialCutsCouple;
                                                   >>  79 class G4EnergyLossMessenger;
 64 class G4ParticleDefinition;                        80 class G4ParticleDefinition;
 65 class G4Region;                                << 
 66 class G4EmSaturation;                          << 
 67 class G4EmConfigurator;                        << 
 68 class G4ElectronIonPair;                       << 
 69 class G4NIELCalculator;                        << 
 70 class G4VMultipleScattering;                       81 class G4VMultipleScattering;
 71 class G4VEmProcess;                                82 class G4VEmProcess;
 72 class G4EmCorrections;                             83 class G4EmCorrections;
 73 class G4LossTableBuilder;                      << 
 74 class G4VAtomDeexcitation;                     << 
 75 class G4VSubCutProducer;                       << 
 76                                                    84 
 77 class G4LossTableManager                           85 class G4LossTableManager
 78 {                                                  86 {
 79                                                    87 
 80 friend class G4ThreadLocalSingleton<G4LossTabl << 
 81                                                << 
 82 public:                                            88 public:
 83                                                    89 
 84   static G4LossTableManager* Instance();           90   static G4LossTableManager* Instance();
 85                                                    91 
 86   ~G4LossTableManager();                           92   ~G4LossTableManager();
 87                                                    93 
 88   //------------------------------------------ <<  94   void Clear();
 89   // initialisation before a new run           << 
 90   //------------------------------------------ << 
 91                                                << 
 92   void PreparePhysicsTable(const G4ParticleDef << 
 93                            G4VEnergyLossProces << 
 94                                                << 
 95   void PreparePhysicsTable(const G4ParticleDef << 
 96                            G4VEmProcess* p);   << 
 97                                                << 
 98   void PreparePhysicsTable(const G4ParticleDef << 
 99                            G4VMultipleScatteri << 
100                                                << 
101   void BuildPhysicsTable(const G4ParticleDefin << 
102                                                << 
103   void BuildPhysicsTable(const G4ParticleDefin << 
104                          G4VEnergyLossProcess* << 
105                                                << 
106   void LocalPhysicsTables(const G4ParticleDefi << 
107                           G4VEnergyLossProcess << 
108                                                << 
109   void DumpHtml();                             << 
110                                                << 
111   //------------------------------------------ << 
112   // Run time access to DEDX, range, energy fo << 
113   // energy, and G4MaterialCutsCouple          << 
114   //------------------------------------------ << 
115                                                << 
116   inline G4double GetDEDX(                     << 
117     const G4ParticleDefinition *aParticle,     << 
118     G4double kineticEnergy,                    << 
119     const G4MaterialCutsCouple *couple);       << 
120                                                    95 
121   inline G4double GetRange(                    <<  96   // get the DEDX or the range for a given particle/energy/material
                                                   >>  97   G4double GetDEDX(
122     const G4ParticleDefinition *aParticle,         98     const G4ParticleDefinition *aParticle,
123     G4double kineticEnergy,                        99     G4double kineticEnergy,
124     const G4MaterialCutsCouple *couple);          100     const G4MaterialCutsCouple *couple);
125                                                   101 
126   inline G4double GetCSDARange(                << 102   G4double GetRange(
127     const G4ParticleDefinition *aParticle,        103     const G4ParticleDefinition *aParticle,
128     G4double kineticEnergy,                       104     G4double kineticEnergy,
129     const G4MaterialCutsCouple *couple);          105     const G4MaterialCutsCouple *couple);
130                                                   106 
131   inline G4double GetRangeFromRestricteDEDX(   << 107   G4double GetTrancatedRange(
132     const G4ParticleDefinition *aParticle,        108     const G4ParticleDefinition *aParticle,
133     G4double kineticEnergy,                       109     G4double kineticEnergy,
134     const G4MaterialCutsCouple *couple);          110     const G4MaterialCutsCouple *couple);
135                                                   111 
136   inline G4double GetEnergy(                   << 112   G4double GetEnergy(
137     const G4ParticleDefinition *aParticle,        113     const G4ParticleDefinition *aParticle,
138     G4double range,                               114     G4double range,
139     const G4MaterialCutsCouple *couple);          115     const G4MaterialCutsCouple *couple);
140                                                   116 
141   inline G4double GetDEDXDispersion(           << 117   G4double GetDEDXDispersion(
142     const G4MaterialCutsCouple *couple,           118     const G4MaterialCutsCouple *couple,
143     const G4DynamicParticle* dp,                  119     const G4DynamicParticle* dp,
144           G4double& length);                      120           G4double& length);
145                                                   121 
146   //------------------------------------------ << 122   // to be called only by energy loss processes
147   // Methods to be called only at initialisati << 
148   // and at the end of the job                 << 
149   //------------------------------------------ << 
150                                                << 
151   void Register(G4VEnergyLossProcess* p);         123   void Register(G4VEnergyLossProcess* p);
152                                                   124 
153   void DeRegister(G4VEnergyLossProcess* p);       125   void DeRegister(G4VEnergyLossProcess* p);
154                                                   126 
155   void Register(G4VMultipleScattering* p);        127   void Register(G4VMultipleScattering* p);
156                                                   128 
157   void DeRegister(G4VMultipleScattering* p);      129   void DeRegister(G4VMultipleScattering* p);
158                                                   130 
159   void Register(G4VEmProcess* p);                 131   void Register(G4VEmProcess* p);
160                                                   132 
161   void DeRegister(G4VEmProcess* p);               133   void DeRegister(G4VEmProcess* p);
162                                                   134 
163   void Register(G4VProcess* p);                << 135   void EnergyLossProcessIsInitialised(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
164                                                << 136   
165   void DeRegister(G4VProcess* p);              << 137   void RegisterIon(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
166                                                << 
167   void Register(G4VEmModel* p);                << 
168                                                << 
169   void DeRegister(G4VEmModel* p);              << 
170                                                << 
171   void Register(G4VEmFluctuationModel* p);     << 
172                                                << 
173   void DeRegister(G4VEmFluctuationModel* p);   << 
174                                                << 
175   void RegisterExtraParticle(const G4ParticleD << 
176                              G4VEnergyLossProc << 
177                                                << 
178   void SetVerbose(G4int val);                  << 
179                                                   138 
180   void ResetParameters();                      << 139   void RegisterExtraParticle(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
181                                                   140 
182   void SetAtomDeexcitation(G4VAtomDeexcitation << 141   void BuildPhysicsTable(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess* p);
183                                                   142 
184   void SetSubCutProducer(G4VSubCutProducer*);  << 143   void SetLossFluctuations(G4bool val);
185                                                   144 
186   void SetNIELCalculator(G4NIELCalculator*);   << 145   void SetSubCutoff(G4bool val);
187                                                   146 
188   //------------------------------------------ << 147   void SetIntegral(G4bool val);
189   // Access methods                            << 
190   //------------------------------------------ << 
191                                                   148 
192   inline G4bool IsMaster() const;              << 149   void SetRandomStep(G4bool val);
193                                                   150 
194   G4VEnergyLossProcess* GetEnergyLossProcess(c << 151   void SetMinSubRange(G4double val);
195                                                << 
196   const std::vector<G4VEnergyLossProcess*>& Ge << 
197                                                   152 
198   const std::vector<G4VEmProcess*>& GetEmProce << 153   void SetMinEnergy(G4double val);
199                                                   154 
200   const std::vector<G4VMultipleScattering*>& G << 155   void SetMaxEnergy(G4double val);
201                                                   156 
202   G4EmSaturation* EmSaturation();              << 157   void SetMaxEnergyForPreciseRange(G4double val);
203                                                   158 
204   G4EmConfigurator* EmConfigurator();          << 159   void SetMaxEnergyForMuons(G4double val);
205                                                   160 
206   G4ElectronIonPair* ElectronIonPair();        << 161   void SetDEDXBinning(G4int val);
207                                                   162 
208   G4NIELCalculator* NIELCalculator();          << 163   void SetDEDXBinningForPreciseRange(G4int val);
209                                                   164 
210   inline G4EmCorrections* EmCorrections();     << 165   void SetLambdaBinning(G4int val);
211                                                   166 
212   inline G4VAtomDeexcitation* AtomDeexcitation << 167   void SetStepLimits(G4double v1, G4double v2);
213                                                   168 
214   inline G4VSubCutProducer* SubCutProducer();  << 169   void SetBuildPreciseRange(G4bool val);
215                                                   170 
216   inline G4LossTableBuilder* GetTableBuilder() << 171   void SetVerbose(G4int val);
217                                                << 
218   inline void SetGammaGeneralProcess(G4VEmProc << 
219                                                   172 
220   inline G4VEmProcess* GetGammaGeneralProcess( << 173   G4EnergyLossMessenger* GetMessenger();
221                                                   174 
222   inline void SetElectronGeneralProcess(G4VEmP << 175   G4bool BuildPreciseRange() const;
223                                                   176 
224   inline G4VEmProcess* GetElectronGeneralProce << 177   const std::vector<G4VEnergyLossProcess*>& GetEnergyLossProcessVector();
225                                                   178 
226   inline void SetPositronGeneralProcess(G4VEmP << 179   const std::vector<G4VEmProcess*>& GetEmProcessVector();
227                                                   180 
228   inline G4VEmProcess* GetPositronGeneralProce << 181   const std::vector<G4VMultipleScattering*>& GetMultipleScatteringVector();
229                                                   182 
230   G4LossTableManager(G4LossTableManager &) = d << 183   G4EmCorrections* EmCorrections() {return emCorrections;};
231   G4LossTableManager & operator=(const G4LossT << 
232                                                   184 
233 private:                                          185 private:
234                                                   186 
235   //------------------------------------------ << 
236   // Private methods and members               << 
237   //------------------------------------------ << 
238                                                << 
239   G4LossTableManager();                           187   G4LossTableManager();
240                                                   188 
241   void Clear();                                << 
242                                                << 
243   G4VEnergyLossProcess* BuildTables(const G4Pa    189   G4VEnergyLossProcess* BuildTables(const G4ParticleDefinition* aParticle);
244                                                   190 
245   void CopyTables(const G4ParticleDefinition*  << 191   void CopyTables(const G4ParticleDefinition* aParticle, G4VEnergyLossProcess*);
246                   G4VEnergyLossProcess*);      << 
247                                                   192 
248   void ParticleHaveNoLoss(const G4ParticleDefi    193   void ParticleHaveNoLoss(const G4ParticleDefinition* aParticle);
249                                                   194 
                                                   >> 195   void SetParameters(G4VEnergyLossProcess*);
                                                   >> 196 
250   void CopyDEDXTables();                          197   void CopyDEDXTables();
251                                                   198 
252   void PrintEWarning(G4String, G4double);      << 199 private:
253                                                   200 
254   static G4ThreadLocal G4LossTableManager* ins << 201   static G4LossTableManager* theInstance;
255                                                   202 
256   typedef const G4ParticleDefinition* PD;         203   typedef const G4ParticleDefinition* PD;
257                                                << 204   std::map<PD,G4VEnergyLossProcess*,std::less<PD> > loss_map;
258   // cache                                     << 
259   G4VEnergyLossProcess* currentLoss{nullptr};  << 
260   PD currentParticle{nullptr};                 << 
261   PD theElectron;                              << 
262   PD theGenericIon{nullptr};                   << 
263   PD firstParticle{nullptr};                   << 
264                                                << 
265   G4LossTableBuilder* tableBuilder;            << 
266   G4EmCorrections* emCorrections;              << 
267   G4EmConfigurator* emConfigurator{nullptr};   << 
268   G4ElectronIonPair* emElectronIonPair{nullptr << 
269   G4NIELCalculator* nielCalculator{nullptr};   << 
270   G4VAtomDeexcitation* atomDeexcitation{nullpt << 
271   G4VSubCutProducer* subcutProducer{nullptr};  << 
272                                                << 
273   G4EmParameters* theParameters;               << 
274   G4VEmProcess* gGeneral{nullptr};             << 
275   G4VEmProcess* eGeneral{nullptr};             << 
276   G4VEmProcess* pGeneral{nullptr};             << 
277                                                << 
278   G4int verbose;                               << 
279   G4int n_loss{0};                             << 
280   G4int run{-1};                               << 
281                                                << 
282   G4bool all_tables_are_built{false};          << 
283   G4bool startInitialisation{false};           << 
284   G4bool resetParam{true};                     << 
285   G4bool isMaster{false};                      << 
286                                                   205 
287   std::vector<G4VEnergyLossProcess*> loss_vect    206   std::vector<G4VEnergyLossProcess*> loss_vector;
288   std::vector<PD> part_vector;                    207   std::vector<PD> part_vector;
289   std::vector<PD> base_part_vector;               208   std::vector<PD> base_part_vector;
                                                   >> 209   std::vector<G4bool> tables_are_built;
290   std::vector<G4PhysicsTable*> dedx_vector;       210   std::vector<G4PhysicsTable*> dedx_vector;
291   std::vector<G4PhysicsTable*> range_vector;      211   std::vector<G4PhysicsTable*> range_vector;
292   std::vector<G4PhysicsTable*> inv_range_vecto    212   std::vector<G4PhysicsTable*> inv_range_vector;
293   std::vector<G4bool> tables_are_built;        << 
294   std::vector<G4bool> isActive;                << 
295   std::vector<G4VMultipleScattering*> msc_vect    213   std::vector<G4VMultipleScattering*> msc_vector;
296   std::vector<G4VEmProcess*> emp_vector;          214   std::vector<G4VEmProcess*> emp_vector;
297   std::vector<G4VEmModel*> mod_vector;         << 
298   std::vector<G4VEmFluctuationModel*> fmod_vec << 
299   std::vector<G4VProcess*> p_vector;           << 
300                                                   215 
301   std::map<PD,G4VEnergyLossProcess*,std::less< << 216   // cash
                                                   >> 217   G4VEnergyLossProcess*    currentLoss;
                                                   >> 218   PD                   currentParticle;
                                                   >> 219   PD                   theElectron;
                                                   >> 220 
                                                   >> 221   G4int n_loss;
                                                   >> 222 
                                                   >> 223   G4bool all_tables_are_built;
                                                   >> 224   G4bool first_entry;
                                                   >> 225   G4bool lossFluctuationFlag;
                                                   >> 226   G4bool subCutoffFlag;
                                                   >> 227   G4bool rndmStepFlag;
                                                   >> 228   G4bool integral;
                                                   >> 229   G4bool integralActive;
                                                   >> 230   G4bool all_tables_are_stored;
                                                   >> 231   G4bool buildPreciseRange;
                                                   >> 232   G4bool minEnergyActive;
                                                   >> 233   G4bool maxEnergyActive;
                                                   >> 234   G4bool maxEnergyForMuonsActive;
                                                   >> 235   G4bool stepFunctionActive;
                                                   >> 236 
                                                   >> 237   G4double minSubRange;
                                                   >> 238   G4double maxRangeVariation;
                                                   >> 239   G4double maxFinalStep;
                                                   >> 240   G4double minKinEnergy;
                                                   >> 241   G4double maxKinEnergy;
                                                   >> 242   G4double maxKinEnergyForMuons;
                                                   >> 243 
                                                   >> 244   //G4VEnergyLossProcess*       eIonisation;
                                                   >> 245   G4LossTableBuilder*         tableBuilder;
                                                   >> 246   G4EnergyLossMessenger*      theMessenger;
                                                   >> 247   G4EmCorrections*            emCorrections;
                                                   >> 248   const G4ParticleDefinition* firstParticle;
                                                   >> 249   G4int verbose;
                                                   >> 250 
302 };                                                251 };
303                                                   252 
304 //....oooOO0OOooo........oooOO0OOooo........oo    253 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
305 //....oooOO0OOooo........oooOO0OOooo........oo << 
306                                                << 
307 inline                                         << 
308 G4double G4LossTableManager::GetDEDX(const G4P << 
309                                      G4double  << 
310                                      const G4M << 
311 {                                              << 
312   if(aParticle != currentParticle) { GetEnergy << 
313   return currentLoss ? currentLoss->GetDEDX(ki << 
314 }                                              << 
315                                                << 
316 //....oooOO0OOooo........oooOO0OOooo........oo    254 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
317                                                   255 
318 inline                                         << 256 inline G4double G4LossTableManager::GetDEDX(
319 G4double G4LossTableManager::GetCSDARange(cons << 257           const G4ParticleDefinition *aParticle,
320                                           G4do << 258                 G4double kineticEnergy,
321                                           cons << 259           const G4MaterialCutsCouple *couple)
322 {                                              << 260 {
323   if(aParticle != currentParticle) { GetEnergy << 261   if(aParticle != currentParticle) {
324   return currentLoss ? currentLoss->GetCSDARan << 262     currentParticle = aParticle;
                                                   >> 263     std::map<PD, G4VEnergyLossProcess*,std::less<PD> >::const_iterator pos;
                                                   >> 264     if ((pos = loss_map.find(aParticle)) != loss_map.end()) {
                                                   >> 265       currentLoss = (*pos).second;
                                                   >> 266     } else {
                                                   >> 267       currentLoss = 0;
                                                   >> 268     //  ParticleHaveNoLoss(aParticle);
                                                   >> 269     }
                                                   >> 270   }
                                                   >> 271   G4double x;
                                                   >> 272   if(currentLoss) x = currentLoss->GetDEDX(kineticEnergy, couple);
                                                   >> 273   else            x = G4EnergyLossTables::GetDEDX(currentParticle,kineticEnergy,couple,false);
                                                   >> 274   return x;
325 }                                                 275 }
326                                                   276 
327 //....oooOO0OOooo........oooOO0OOooo........oo    277 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
328                                                   278 
329 inline                                         << 279 inline G4double G4LossTableManager::GetTrancatedRange(
330 G4double G4LossTableManager::GetRangeFromRestr << 280           const G4ParticleDefinition *aParticle,
331                              const G4ParticleD << 281                 G4double kineticEnergy,
332                              G4double kineticE << 282           const G4MaterialCutsCouple *couple)
333                              const G4MaterialC << 283 {
334 {                                              << 284   if(aParticle != currentParticle) {
335   if(aParticle != currentParticle) { GetEnergy << 285     currentParticle = aParticle;
336   return currentLoss ? currentLoss->GetRange(k << 286     std::map<PD, G4VEnergyLossProcess*, std::less<PD> >::const_iterator pos;
                                                   >> 287     if ((pos = loss_map.find(currentParticle)) != loss_map.end()) {
                                                   >> 288       currentLoss = (*pos).second;
                                                   >> 289     } else {
                                                   >> 290       currentLoss = 0;
                                                   >> 291 //      ParticleHaveNoLoss(aParticle);
                                                   >> 292     }
                                                   >> 293   }
                                                   >> 294   G4double x;
                                                   >> 295   if(currentLoss) {
                                                   >> 296     x = currentLoss->GetRangeForLoss(kineticEnergy, couple);
                                                   >> 297   } else {           
                                                   >> 298     x = G4EnergyLossTables::GetRange(currentParticle,kineticEnergy,couple,false);
                                                   >> 299   }
                                                   >> 300   return x;
337 }                                                 301 }
338                                                   302 
339 //....oooOO0OOooo........oooOO0OOooo........oo    303 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
340                                                   304 
341 inline                                         << 305 inline G4double G4LossTableManager::GetRange(
342 G4double G4LossTableManager::GetRange(const G4 << 306           const G4ParticleDefinition *aParticle,
343                                       G4double << 307                 G4double kineticEnergy,
344                                       const G4 << 308           const G4MaterialCutsCouple *couple)
345 {                                              << 309 {
346   if(aParticle != currentParticle) { GetEnergy << 310   if(aParticle != currentParticle) {
347   return currentLoss ? currentLoss->GetRange(k << 311     currentParticle = aParticle;
                                                   >> 312     std::map<PD, G4VEnergyLossProcess*, std::less<PD> >::const_iterator pos;
                                                   >> 313     if ((pos = loss_map.find(currentParticle)) != loss_map.end()) {
                                                   >> 314       currentLoss = (*pos).second;
                                                   >> 315     } else {
                                                   >> 316       currentLoss = 0;
                                                   >> 317 //      ParticleHaveNoLoss(aParticle);
                                                   >> 318     }
                                                   >> 319   }
                                                   >> 320   G4double x;
                                                   >> 321   if(currentLoss) {
                                                   >> 322     x = currentLoss->GetRange(kineticEnergy, couple);
                                                   >> 323   } else {           
                                                   >> 324     x = G4EnergyLossTables::GetRange(currentParticle,kineticEnergy,couple,false);
                                                   >> 325   }
                                                   >> 326   return x;
348 }                                                 327 }
349                                                   328 
350 //....oooOO0OOooo........oooOO0OOooo........oo    329 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
351                                                   330 
352 inline                                         << 331 inline G4double G4LossTableManager::GetEnergy(
353 G4double G4LossTableManager::GetEnergy(const G << 332           const G4ParticleDefinition *aParticle,
354                                        G4doubl << 333                 G4double range,
355                                        const G << 334           const G4MaterialCutsCouple *couple)
356 {                                              << 335 {
357   if(aParticle != currentParticle) { GetEnergy << 336   if(aParticle != currentParticle) {
358   return currentLoss ? currentLoss->GetKinetic << 337     currentParticle = aParticle;
                                                   >> 338     std::map<PD,G4VEnergyLossProcess*,std::less<PD> >::const_iterator pos;
                                                   >> 339     if ((pos = loss_map.find(aParticle)) != loss_map.end()) {
                                                   >> 340       currentLoss = (*pos).second;
                                                   >> 341     } else {
                                                   >> 342       currentLoss = 0;
                                                   >> 343      // ParticleHaveNoLoss(aParticle);
                                                   >> 344     }
                                                   >> 345   }
                                                   >> 346   G4double x;
                                                   >> 347   if(currentLoss) x = currentLoss->GetKineticEnergy(range, couple);
                                                   >> 348   else            x = G4EnergyLossTables::GetPreciseEnergyFromRange(currentParticle,
                                                   >> 349                                           range,couple,false);
                                                   >> 350   return x;
359 }                                                 351 }
360                                                   352 
361 //....oooOO0OOooo........oooOO0OOooo........oo    353 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
362                                                   354 
363 inline                                         << 355 inline  G4double G4LossTableManager::GetDEDXDispersion(
364 G4double G4LossTableManager::GetDEDXDispersion << 356     const G4MaterialCutsCouple *couple,
365                              const G4MaterialC << 357     const G4DynamicParticle* dp,
366                              const G4DynamicPa << 358           G4double& length)
367                              G4double& length) << 
368 {                                              << 
369   const G4ParticleDefinition* aParticle = dp-> << 
370   if(aParticle != currentParticle) { GetEnergy << 
371   return currentLoss ? currentLoss->GetDEDXDis << 
372 }                                              << 
373                                                << 
374 //....oooOO0OOooo........oooOO0OOooo........oo << 
375                                                << 
376 inline G4bool G4LossTableManager::IsMaster() c << 
377 {                                                 359 {
378   return isMaster;                             << 360   const G4ParticleDefinition* aParticle = dp->GetDefinition();
                                                   >> 361   if(aParticle != currentParticle) {
                                                   >> 362     std::map<PD,G4VEnergyLossProcess*,std::less<PD> >::const_iterator pos;
                                                   >> 363     if ((pos = loss_map.find(aParticle)) != loss_map.end()) {
                                                   >> 364       currentParticle = aParticle;
                                                   >> 365       currentLoss = (*pos).second;
                                                   >> 366     } else {
                                                   >> 367       ParticleHaveNoLoss(aParticle);
                                                   >> 368     }
                                                   >> 369   }
                                                   >> 370   return currentLoss->GetDEDXDispersion(couple, dp, length);
379 }                                                 371 }
380                                                   372 
381 //....oooOO0OOooo........oooOO0OOooo........oo    373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
382                                                   374 
383 inline G4EmCorrections* G4LossTableManager::Em << 
384 {                                              << 
385   return emCorrections;                        << 
386 }                                              << 
387                                                << 
388 //....oooOO0OOooo........oooOO0OOooo........oo << 
389                                                << 
390 inline G4VAtomDeexcitation* G4LossTableManager << 
391 {                                              << 
392   return atomDeexcitation;                     << 
393 }                                              << 
394                                                << 
395 //....oooOO0OOooo........oooOO0OOooo........oo << 
396                                                << 
397 inline G4VSubCutProducer* G4LossTableManager:: << 
398 {                                              << 
399   return subcutProducer;                       << 
400 }                                              << 
401                                                << 
402 //....oooOO0OOooo........oooOO0OOooo........oo << 
403                                                << 
404 inline G4LossTableBuilder* G4LossTableManager: << 
405 {                                              << 
406   return tableBuilder;                         << 
407 }                                              << 
408                                                << 
409 //....oooOO0OOooo........oooOO0OOooo........oo << 
410                                                << 
411 inline void G4LossTableManager::SetGammaGenera << 
412 {                                              << 
413   gGeneral = ptr;                              << 
414 }                                              << 
415                                                << 
416 //....oooOO0OOooo........oooOO0OOooo........oo << 
417                                                << 
418 inline G4VEmProcess* G4LossTableManager::GetGa << 
419 {                                              << 
420   return gGeneral;                             << 
421 }                                              << 
422                                                << 
423 //....oooOO0OOooo........oooOO0OOooo........oo << 
424                                                << 
425 inline void G4LossTableManager::SetElectronGen << 
426 {                                              << 
427   eGeneral = ptr;                              << 
428 }                                              << 
429                                                << 
430 //....oooOO0OOooo........oooOO0OOooo........oo << 
431                                                << 
432 inline G4VEmProcess* G4LossTableManager::GetEl << 
433 {                                              << 
434   return eGeneral;                             << 
435 }                                              << 
436                                                << 
437 //....oooOO0OOooo........oooOO0OOooo........oo << 
438                                                << 
439 inline void G4LossTableManager::SetPositronGen << 
440 {                                              << 
441   pGeneral = ptr;                              << 
442 }                                              << 
443                                                << 
444 //....oooOO0OOooo........oooOO0OOooo........oo << 
445                                                << 
446 inline G4VEmProcess* G4LossTableManager::GetPo << 
447 {                                              << 
448   return pGeneral;                             << 
449 }                                              << 
450 //....oooOO0OOooo........oooOO0OOooo........oo << 
451                                                << 
452 #endif                                            375 #endif
                                                   >> 376 
453                                                   377