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 10.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 //
                                                   >>  27 //
 26 // -------------------------------------------     28 // -------------------------------------------------------------------
 27 //                                                 29 //
 28 // GEANT4 Class header file                        30 // GEANT4 Class header file
 29 //                                                 31 //
 30 //                                                 32 //
 31 // File name:     G4LossTableManager               33 // File name:     G4LossTableManager
 32 //                                                 34 //
 33 // Author:        Vladimir Ivanchenko on base      35 // Author:        Vladimir Ivanchenko on base of G4LossTables class
 34 //                and Maria Grazia Pia ideas       36 //                and Maria Grazia Pia ideas
 35 //                                                 37 //
 36 // Creation date: 03.01.2002                       38 // Creation date: 03.01.2002
 37 //                                                 39 //
 38 // Modifications by V.Ivanchenko               <<  40 // Modifications:
                                                   >>  41 //
                                                   >>  42 // 20-01-03 Migrade to cut per region (V.Ivanchenko)
                                                   >>  43 // 17-02-03 Fix problem of store/restore tables for ions (V.Ivanchenko)
                                                   >>  44 // 10-03-03 Add Ion registration (V.Ivanchenko)
                                                   >>  45 // 25-03-03 Add deregistration (V.Ivanchenko)
                                                   >>  46 // 26-03-03 Add GetDEDXDispersion (V.Ivanchenko)
                                                   >>  47 // 02-04-03 Change messenger (V.Ivanchenko)
                                                   >>  48 // 23-07-03 Add exchange with G4EnergyLossTables (V.Ivanchenko)
                                                   >>  49 // 05-10-03 Add G4VEmProcesses registration (V.Ivanchenko)
                                                   >>  50 // 17-10-03 Add SetParameters method (V.Ivanchenko)
                                                   >>  51 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
                                                   >>  52 // 14-01-04 Activate precise range calculation (V.Ivanchenko)
                                                   >>  53 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
                                                   >>  54 // 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
                                                   >>  55 // 20-01-06 Introduce GetSubDEDX method (VI)
                                                   >>  56 // 26-01-06 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko)
                                                   >>  57 // 10-05-06 Add methods  SetMscStepLimitation, FacRange and MscFlag (VI)
                                                   >>  58 // 22-05-06 Add methods  Set/Get bremsTh (VI)
                                                   >>  59 // 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
                                                   >>  60 // 18-06-07 Move definition of msc parameters to G4EmProcessOptions (V.Ivanchenko)
                                                   >>  61 // 12-04-10 Added PreparePhsyicsTables and BuildPhysicsTables entries (V.Ivanchenko)
                                                   >>  62 // 04-06-13 Adaptation for MT mode, new method LocalPhysicsTables (V.Ivanchenko)  
 39 //                                                 63 //
 40 // Class Description:                              64 // Class Description:
 41 //                                                 65 //
 42 // A utility static class, responsable for the     66 // A utility static class, responsable for the energy loss tables
 43 // for each particle                               67 // for each particle
 44 //                                                 68 //
 45 // Energy loss processes have to register thei     69 // Energy loss processes have to register their tables with this
 46 // class. The responsibility of creating and d     70 // class. The responsibility of creating and deleting the tables
 47 // remains with the energy loss classes.           71 // remains with the energy loss classes.
 48                                                    72 
 49 // -------------------------------------------     73 // -------------------------------------------------------------------
 50 //                                                 74 //
 51                                                    75 
 52 #ifndef G4LossTableManager_h                       76 #ifndef G4LossTableManager_h
 53 #define G4LossTableManager_h 1                     77 #define G4LossTableManager_h 1
 54                                                    78 
 55 #include <map>                                     79 #include <map>
 56 #include <vector>                                  80 #include <vector>
 57 #include "globals.hh"                              81 #include "globals.hh"
 58 #include "G4ThreadLocalSingleton.hh"               82 #include "G4ThreadLocalSingleton.hh"
 59 #include "G4VEnergyLossProcess.hh"                 83 #include "G4VEnergyLossProcess.hh"
 60 #include "G4EmParameters.hh"                   <<  84 #include "G4EmCorrections.hh"
                                                   >>  85 #include "G4LossTableBuilder.hh"
                                                   >>  86 #include "G4VAtomDeexcitation.hh"
                                                   >>  87 #include "G4VSubCutProducer.hh"
 61                                                    88 
 62 class G4PhysicsTable;                              89 class G4PhysicsTable;
 63 class G4MaterialCutsCouple;                        90 class G4MaterialCutsCouple;
 64 class G4ParticleDefinition;                        91 class G4ParticleDefinition;
 65 class G4Region;                                    92 class G4Region;
 66 class G4EmSaturation;                              93 class G4EmSaturation;
 67 class G4EmConfigurator;                            94 class G4EmConfigurator;
 68 class G4ElectronIonPair;                           95 class G4ElectronIonPair;
 69 class G4NIELCalculator;                        << 
 70 class G4VMultipleScattering;                       96 class G4VMultipleScattering;
 71 class G4VEmProcess;                                97 class G4VEmProcess;
 72 class G4EmCorrections;                         << 
 73 class G4LossTableBuilder;                      << 
 74 class G4VAtomDeexcitation;                     << 
 75 class G4VSubCutProducer;                       << 
 76                                                    98 
 77 class G4LossTableManager                           99 class G4LossTableManager
 78 {                                                 100 {
 79                                                   101 
 80 friend class G4ThreadLocalSingleton<G4LossTabl    102 friend class G4ThreadLocalSingleton<G4LossTableManager>;
 81                                                   103 
 82 public:                                           104 public:
 83                                                   105 
 84   static G4LossTableManager* Instance();          106   static G4LossTableManager* Instance();
 85                                                   107 
 86   ~G4LossTableManager();                          108   ~G4LossTableManager();
 87                                                   109 
 88   //------------------------------------------    110   //-------------------------------------------------
                                                   >> 111   // called from destructor
                                                   >> 112   //-------------------------------------------------
                                                   >> 113 
                                                   >> 114   void Clear();
                                                   >> 115 
                                                   >> 116   //-------------------------------------------------
 89   // initialisation before a new run              117   // initialisation before a new run
 90   //------------------------------------------    118   //-------------------------------------------------
 91                                                   119 
 92   void PreparePhysicsTable(const G4ParticleDef    120   void PreparePhysicsTable(const G4ParticleDefinition* aParticle,
 93                            G4VEnergyLossProces << 121                            G4VEnergyLossProcess* p, G4bool theMaster);
 94                                                   122 
 95   void PreparePhysicsTable(const G4ParticleDef    123   void PreparePhysicsTable(const G4ParticleDefinition* aParticle,
 96                            G4VEmProcess* p);   << 124                            G4VEmProcess* p, G4bool theMaster);
 97                                                   125 
 98   void PreparePhysicsTable(const G4ParticleDef    126   void PreparePhysicsTable(const G4ParticleDefinition* aParticle,
 99                            G4VMultipleScatteri << 127                            G4VMultipleScattering* p, G4bool theMaster);
100                                                   128 
101   void BuildPhysicsTable(const G4ParticleDefin    129   void BuildPhysicsTable(const G4ParticleDefinition* aParticle);
102                                                   130 
103   void BuildPhysicsTable(const G4ParticleDefin    131   void BuildPhysicsTable(const G4ParticleDefinition* aParticle, 
104                          G4VEnergyLossProcess*    132                          G4VEnergyLossProcess* p);
105                                                   133 
106   void LocalPhysicsTables(const G4ParticleDefi    134   void LocalPhysicsTables(const G4ParticleDefinition* aParticle, 
107                           G4VEnergyLossProcess    135                           G4VEnergyLossProcess* p);
108                                                   136  
109   void DumpHtml();                                137   void DumpHtml();
110                                                   138 
111   //------------------------------------------    139   //-------------------------------------------------
112   // Run time access to DEDX, range, energy fo    140   // Run time access to DEDX, range, energy for a given particle, 
113   // energy, and G4MaterialCutsCouple             141   // energy, and G4MaterialCutsCouple
114   //------------------------------------------    142   //-------------------------------------------------
115                                                   143 
116   inline G4double GetDEDX(                        144   inline G4double GetDEDX(
117     const G4ParticleDefinition *aParticle,        145     const G4ParticleDefinition *aParticle,
118     G4double kineticEnergy,                       146     G4double kineticEnergy,
119     const G4MaterialCutsCouple *couple);          147     const G4MaterialCutsCouple *couple);
120                                                   148 
                                                   >> 149   inline G4double GetSubDEDX(
                                                   >> 150     const G4ParticleDefinition *aParticle,
                                                   >> 151     G4double kineticEnergy,
                                                   >> 152     const G4MaterialCutsCouple *couple);
                                                   >> 153 
121   inline G4double GetRange(                       154   inline G4double GetRange(
122     const G4ParticleDefinition *aParticle,        155     const G4ParticleDefinition *aParticle,
123     G4double kineticEnergy,                       156     G4double kineticEnergy,
124     const G4MaterialCutsCouple *couple);          157     const G4MaterialCutsCouple *couple);
125                                                   158 
126   inline G4double GetCSDARange(                   159   inline G4double GetCSDARange(
127     const G4ParticleDefinition *aParticle,        160     const G4ParticleDefinition *aParticle,
128     G4double kineticEnergy,                       161     G4double kineticEnergy,
129     const G4MaterialCutsCouple *couple);          162     const G4MaterialCutsCouple *couple);
130                                                   163 
131   inline G4double GetRangeFromRestricteDEDX(      164   inline G4double GetRangeFromRestricteDEDX(
132     const G4ParticleDefinition *aParticle,        165     const G4ParticleDefinition *aParticle,
133     G4double kineticEnergy,                       166     G4double kineticEnergy,
134     const G4MaterialCutsCouple *couple);          167     const G4MaterialCutsCouple *couple);
135                                                   168 
136   inline G4double GetEnergy(                      169   inline G4double GetEnergy(
137     const G4ParticleDefinition *aParticle,        170     const G4ParticleDefinition *aParticle,
138     G4double range,                               171     G4double range,
139     const G4MaterialCutsCouple *couple);          172     const G4MaterialCutsCouple *couple);
140                                                   173 
141   inline G4double GetDEDXDispersion(              174   inline G4double GetDEDXDispersion(
142     const G4MaterialCutsCouple *couple,           175     const G4MaterialCutsCouple *couple,
143     const G4DynamicParticle* dp,                  176     const G4DynamicParticle* dp,
144           G4double& length);                      177           G4double& length);
145                                                   178 
146   //------------------------------------------    179   //-------------------------------------------------
147   // Methods to be called only at initialisati    180   // Methods to be called only at initialisation
148   // and at the end of the job                 << 
149   //------------------------------------------    181   //-------------------------------------------------
150                                                   182 
151   void Register(G4VEnergyLossProcess* p);         183   void Register(G4VEnergyLossProcess* p);
152                                                   184 
153   void DeRegister(G4VEnergyLossProcess* p);       185   void DeRegister(G4VEnergyLossProcess* p);
154                                                   186 
155   void Register(G4VMultipleScattering* p);        187   void Register(G4VMultipleScattering* p);
156                                                   188 
157   void DeRegister(G4VMultipleScattering* p);      189   void DeRegister(G4VMultipleScattering* p);
158                                                   190 
159   void Register(G4VEmProcess* p);                 191   void Register(G4VEmProcess* p);
160                                                   192 
161   void DeRegister(G4VEmProcess* p);               193   void DeRegister(G4VEmProcess* p);
162                                                   194 
163   void Register(G4VProcess* p);                << 
164                                                << 
165   void DeRegister(G4VProcess* p);              << 
166                                                << 
167   void Register(G4VEmModel* p);                   195   void Register(G4VEmModel* p);
168                                                   196 
169   void DeRegister(G4VEmModel* p);                 197   void DeRegister(G4VEmModel* p);
170                                                   198 
171   void Register(G4VEmFluctuationModel* p);        199   void Register(G4VEmFluctuationModel* p);
172                                                   200 
173   void DeRegister(G4VEmFluctuationModel* p);      201   void DeRegister(G4VEmFluctuationModel* p);
174                                                   202 
175   void RegisterExtraParticle(const G4ParticleD    203   void RegisterExtraParticle(const G4ParticleDefinition* aParticle, 
176                              G4VEnergyLossProc    204                              G4VEnergyLossProcess* p);
177                                                   205 
178   void SetVerbose(G4int val);                     206   void SetVerbose(G4int val);
179                                                   207 
180   void ResetParameters();                      << 
181                                                << 
182   void SetAtomDeexcitation(G4VAtomDeexcitation    208   void SetAtomDeexcitation(G4VAtomDeexcitation*);
183                                                   209 
184   void SetSubCutProducer(G4VSubCutProducer*);     210   void SetSubCutProducer(G4VSubCutProducer*);
185                                                   211 
186   void SetNIELCalculator(G4NIELCalculator*);   << 
187                                                << 
188   //------------------------------------------    212   //-------------------------------------------------
189   // Access methods                               213   // Access methods
190   //------------------------------------------    214   //-------------------------------------------------
191                                                   215 
192   inline G4bool IsMaster() const;                 216   inline G4bool IsMaster() const;
193                                                   217 
194   G4VEnergyLossProcess* GetEnergyLossProcess(c    218   G4VEnergyLossProcess* GetEnergyLossProcess(const G4ParticleDefinition*);
195                                                   219  
196   const std::vector<G4VEnergyLossProcess*>& Ge    220   const std::vector<G4VEnergyLossProcess*>& GetEnergyLossProcessVector();
197                                                   221 
198   const std::vector<G4VEmProcess*>& GetEmProce    222   const std::vector<G4VEmProcess*>& GetEmProcessVector();
199                                                   223 
200   const std::vector<G4VMultipleScattering*>& G    224   const std::vector<G4VMultipleScattering*>& GetMultipleScatteringVector();
201                                                   225 
202   G4EmSaturation* EmSaturation();                 226   G4EmSaturation* EmSaturation();
203                                                   227 
204   G4EmConfigurator* EmConfigurator();             228   G4EmConfigurator* EmConfigurator();
205                                                   229 
206   G4ElectronIonPair* ElectronIonPair();           230   G4ElectronIonPair* ElectronIonPair();
207                                                   231 
208   G4NIELCalculator* NIELCalculator();          << 
209                                                << 
210   inline G4EmCorrections* EmCorrections();        232   inline G4EmCorrections* EmCorrections();
211                                                   233 
212   inline G4VAtomDeexcitation* AtomDeexcitation    234   inline G4VAtomDeexcitation* AtomDeexcitation();
213                                                   235 
214   inline G4VSubCutProducer* SubCutProducer();     236   inline G4VSubCutProducer* SubCutProducer();
215                                                   237 
216   inline G4LossTableBuilder* GetTableBuilder()    238   inline G4LossTableBuilder* GetTableBuilder();
217                                                   239 
218   inline void SetGammaGeneralProcess(G4VEmProc    240   inline void SetGammaGeneralProcess(G4VEmProcess*); 
219                                                   241 
220   inline G4VEmProcess* GetGammaGeneralProcess(    242   inline G4VEmProcess* GetGammaGeneralProcess(); 
221                                                   243 
222   inline void SetElectronGeneralProcess(G4VEmP << 244   inline void SetElectronGeneralProcess(G4VEnergyLossProcess*); 
223                                                << 
224   inline G4VEmProcess* GetElectronGeneralProce << 
225                                                   245 
226   inline void SetPositronGeneralProcess(G4VEmP << 246   inline G4VEnergyLossProcess* GetElectronGeneralProcess(); 
227                                                << 
228   inline G4VEmProcess* GetPositronGeneralProce << 
229                                                << 
230   G4LossTableManager(G4LossTableManager &) = d << 
231   G4LossTableManager & operator=(const G4LossT << 
232                                                   247 
233 private:                                          248 private:
234                                                   249 
235   //------------------------------------------    250   //-------------------------------------------------
236   // Private methods and members                  251   // Private methods and members
237   //------------------------------------------    252   //-------------------------------------------------
238                                                   253 
239   G4LossTableManager();                           254   G4LossTableManager();
240                                                   255 
241   void Clear();                                << 256   void ResetParameters();
242                                                   257 
243   G4VEnergyLossProcess* BuildTables(const G4Pa    258   G4VEnergyLossProcess* BuildTables(const G4ParticleDefinition* aParticle);
244                                                   259 
245   void CopyTables(const G4ParticleDefinition*     260   void CopyTables(const G4ParticleDefinition* aParticle, 
246                   G4VEnergyLossProcess*);         261                   G4VEnergyLossProcess*);
247                                                   262 
248   void ParticleHaveNoLoss(const G4ParticleDefi    263   void ParticleHaveNoLoss(const G4ParticleDefinition* aParticle);
249                                                   264 
250   void CopyDEDXTables();                          265   void CopyDEDXTables();
251                                                   266 
252   void PrintEWarning(G4String, G4double);         267   void PrintEWarning(G4String, G4double);
253                                                   268 
                                                   >> 269   G4LossTableManager(G4LossTableManager &) = delete;
                                                   >> 270   G4LossTableManager & operator=(const G4LossTableManager &right) = delete;
                                                   >> 271 
254   static G4ThreadLocal G4LossTableManager* ins    272   static G4ThreadLocal G4LossTableManager* instance;
255                                                   273 
256   typedef const G4ParticleDefinition* PD;         274   typedef const G4ParticleDefinition* PD;
257                                                   275 
258   // cache                                     << 276   std::map<PD,G4VEnergyLossProcess*,std::less<PD> > loss_map;
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                                                   277 
287   std::vector<G4VEnergyLossProcess*> loss_vect    278   std::vector<G4VEnergyLossProcess*> loss_vector;
288   std::vector<PD> part_vector;                    279   std::vector<PD> part_vector;
289   std::vector<PD> base_part_vector;               280   std::vector<PD> base_part_vector;
                                                   >> 281   std::vector<G4bool> tables_are_built;
                                                   >> 282   std::vector<G4bool> isActive;
290   std::vector<G4PhysicsTable*> dedx_vector;       283   std::vector<G4PhysicsTable*> dedx_vector;
291   std::vector<G4PhysicsTable*> range_vector;      284   std::vector<G4PhysicsTable*> range_vector;
292   std::vector<G4PhysicsTable*> inv_range_vecto    285   std::vector<G4PhysicsTable*> inv_range_vector;
293   std::vector<G4bool> tables_are_built;        << 
294   std::vector<G4bool> isActive;                << 
295   std::vector<G4VMultipleScattering*> msc_vect    286   std::vector<G4VMultipleScattering*> msc_vector;
296   std::vector<G4VEmProcess*> emp_vector;          287   std::vector<G4VEmProcess*> emp_vector;
297   std::vector<G4VEmModel*> mod_vector;            288   std::vector<G4VEmModel*> mod_vector;
298   std::vector<G4VEmFluctuationModel*> fmod_vec    289   std::vector<G4VEmFluctuationModel*> fmod_vector;
299   std::vector<G4VProcess*> p_vector;           << 
300                                                   290 
301   std::map<PD,G4VEnergyLossProcess*,std::less< << 291   // cache
                                                   >> 292   G4VEnergyLossProcess* currentLoss;
                                                   >> 293   PD                    currentParticle;
                                                   >> 294   PD                    theElectron;
                                                   >> 295   PD                    theGenericIon;
                                                   >> 296   PD                    firstParticle;
                                                   >> 297 
                                                   >> 298   G4int n_loss;
                                                   >> 299   G4int run;
                                                   >> 300 
                                                   >> 301   G4bool all_tables_are_built;
                                                   >> 302   G4bool startInitialisation;
                                                   >> 303   G4bool isMaster;
                                                   >> 304   G4LossTableBuilder*         tableBuilder;
                                                   >> 305   G4EmCorrections*            emCorrections;
                                                   >> 306   G4EmConfigurator*           emConfigurator;
                                                   >> 307   G4ElectronIonPair*          emElectronIonPair;
                                                   >> 308   G4VAtomDeexcitation*        atomDeexcitation;
                                                   >> 309   G4VSubCutProducer*          subcutProducer;
                                                   >> 310 
                                                   >> 311   G4EmParameters*       theParameters;
                                                   >> 312   G4VEmProcess*         gGeneral;
                                                   >> 313   G4VEnergyLossProcess* eGeneral;
                                                   >> 314 
                                                   >> 315   G4int verbose;
302 };                                                316 };
303                                                   317 
304 //....oooOO0OOooo........oooOO0OOooo........oo    318 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
305 //....oooOO0OOooo........oooOO0OOooo........oo    319 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
306                                                   320 
307 inline                                            321 inline
308 G4double G4LossTableManager::GetDEDX(const G4P    322 G4double G4LossTableManager::GetDEDX(const G4ParticleDefinition *aParticle,
309                                      G4double     323                                      G4double kineticEnergy,
310                                      const G4M    324                                      const G4MaterialCutsCouple *couple)
311 {                                                 325 {
312   if(aParticle != currentParticle) { GetEnergy    326   if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
313   return currentLoss ? currentLoss->GetDEDX(ki    327   return currentLoss ? currentLoss->GetDEDX(kineticEnergy, couple) : 0.0;
314 }                                                 328 }
315                                                   329 
316 //....oooOO0OOooo........oooOO0OOooo........oo    330 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
317                                                   331 
318 inline                                            332 inline
                                                   >> 333 G4double G4LossTableManager::GetSubDEDX(const G4ParticleDefinition *aParticle,
                                                   >> 334                                         G4double kineticEnergy,
                                                   >> 335                                         const G4MaterialCutsCouple *couple)
                                                   >> 336 {
                                                   >> 337   if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
                                                   >> 338   return currentLoss ? currentLoss->GetDEDXForSubsec(kineticEnergy, couple) : 0.0;
                                                   >> 339 }
                                                   >> 340 
                                                   >> 341 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
                                                   >> 342 
                                                   >> 343 inline
319 G4double G4LossTableManager::GetCSDARange(cons    344 G4double G4LossTableManager::GetCSDARange(const G4ParticleDefinition *aParticle,
320                                           G4do    345                                           G4double kineticEnergy,
321                                           cons    346                                           const G4MaterialCutsCouple *couple)
322 {                                                 347 {
323   if(aParticle != currentParticle) { GetEnergy    348   if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
324   return currentLoss ? currentLoss->GetCSDARan    349   return currentLoss ? currentLoss->GetCSDARange(kineticEnergy, couple) : DBL_MAX;
325 }                                                 350 }
326                                                   351 
327 //....oooOO0OOooo........oooOO0OOooo........oo    352 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
328                                                   353 
329 inline                                            354 inline
330 G4double G4LossTableManager::GetRangeFromRestr    355 G4double G4LossTableManager::GetRangeFromRestricteDEDX(
331                              const G4ParticleD    356                              const G4ParticleDefinition *aParticle,
332                              G4double kineticE    357                              G4double kineticEnergy,
333                              const G4MaterialC    358                              const G4MaterialCutsCouple *couple)
334 {                                                 359 {
335   if(aParticle != currentParticle) { GetEnergy    360   if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
336   return currentLoss ? currentLoss->GetRange(k << 361   return currentLoss ? currentLoss->GetRangeForLoss(kineticEnergy, couple) : DBL_MAX;
337 }                                                 362 }
338                                                   363 
339 //....oooOO0OOooo........oooOO0OOooo........oo    364 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
340                                                   365 
341 inline                                            366 inline
342 G4double G4LossTableManager::GetRange(const G4    367 G4double G4LossTableManager::GetRange(const G4ParticleDefinition *aParticle,
343                                       G4double    368                                       G4double kineticEnergy,
344                                       const G4    369                                       const G4MaterialCutsCouple *couple)
345 {                                                 370 {
346   if(aParticle != currentParticle) { GetEnergy    371   if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
347   return currentLoss ? currentLoss->GetRange(k    372   return currentLoss ? currentLoss->GetRange(kineticEnergy, couple) : DBL_MAX;
348 }                                                 373 }
349                                                   374 
350 //....oooOO0OOooo........oooOO0OOooo........oo    375 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
351                                                   376 
352 inline                                            377 inline
353 G4double G4LossTableManager::GetEnergy(const G    378 G4double G4LossTableManager::GetEnergy(const G4ParticleDefinition *aParticle,
354                                        G4doubl    379                                        G4double range,
355                                        const G    380                                        const G4MaterialCutsCouple *couple)
356 {                                                 381 {
357   if(aParticle != currentParticle) { GetEnergy    382   if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
358   return currentLoss ? currentLoss->GetKinetic    383   return currentLoss ? currentLoss->GetKineticEnergy(range, couple) : 0.0;
359 }                                                 384 }
360                                                   385 
361 //....oooOO0OOooo........oooOO0OOooo........oo    386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
362                                                   387 
363 inline                                            388 inline
364 G4double G4LossTableManager::GetDEDXDispersion    389 G4double G4LossTableManager::GetDEDXDispersion(
365                              const G4MaterialC    390                              const G4MaterialCutsCouple *couple,
366                              const G4DynamicPa    391                              const G4DynamicParticle* dp,
367                              G4double& length)    392                              G4double& length)
368 {                                                 393 {
369   const G4ParticleDefinition* aParticle = dp->    394   const G4ParticleDefinition* aParticle = dp->GetParticleDefinition();
370   if(aParticle != currentParticle) { GetEnergy    395   if(aParticle != currentParticle) { GetEnergyLossProcess(aParticle); }
371   return currentLoss ? currentLoss->GetDEDXDis    396   return currentLoss ? currentLoss->GetDEDXDispersion(couple, dp, length) : 0.0;
372 }                                                 397 }
373                                                   398 
374 //....oooOO0OOooo........oooOO0OOooo........oo    399 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
375                                                   400 
376 inline G4bool G4LossTableManager::IsMaster() c    401 inline G4bool G4LossTableManager::IsMaster() const
377 {                                                 402 {
378   return isMaster;                                403   return isMaster;
379 }                                                 404 }
380                                                   405 
381 //....oooOO0OOooo........oooOO0OOooo........oo    406 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
382                                                   407 
383 inline G4EmCorrections* G4LossTableManager::Em    408 inline G4EmCorrections* G4LossTableManager::EmCorrections() 
384 {                                                 409 {
385   return emCorrections;                           410   return emCorrections;
386 }                                                 411 }
387                                                   412 
388 //....oooOO0OOooo........oooOO0OOooo........oo    413 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
389                                                   414 
390 inline G4VAtomDeexcitation* G4LossTableManager    415 inline G4VAtomDeexcitation* G4LossTableManager::AtomDeexcitation()
391 {                                                 416 {
392   return atomDeexcitation;                        417   return atomDeexcitation;
393 }                                                 418 }
394                                                   419 
395 //....oooOO0OOooo........oooOO0OOooo........oo    420 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
396                                                   421 
397 inline G4VSubCutProducer* G4LossTableManager::    422 inline G4VSubCutProducer* G4LossTableManager::SubCutProducer()
398 {                                                 423 { 
399   return subcutProducer;                          424   return subcutProducer;
400 }                                                 425 }
401                                                   426 
402 //....oooOO0OOooo........oooOO0OOooo........oo    427 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
403                                                   428 
404 inline G4LossTableBuilder* G4LossTableManager:    429 inline G4LossTableBuilder* G4LossTableManager::GetTableBuilder()
405 {                                                 430 {
406   return tableBuilder;                            431   return tableBuilder;
407 }                                                 432 }
408                                                   433 
409 //....oooOO0OOooo........oooOO0OOooo........oo    434 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
410                                                   435 
411 inline void G4LossTableManager::SetGammaGenera    436 inline void G4LossTableManager::SetGammaGeneralProcess(G4VEmProcess* ptr)
412 {                                                 437 {
413   gGeneral = ptr;                                 438   gGeneral = ptr;
414 }                                                 439 } 
415                                                   440 
416 //....oooOO0OOooo........oooOO0OOooo........oo    441 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
417                                                   442 
418 inline G4VEmProcess* G4LossTableManager::GetGa    443 inline G4VEmProcess* G4LossTableManager::GetGammaGeneralProcess()
419 {                                                 444 {
420   return gGeneral;                                445   return gGeneral;
421 }                                                 446 } 
422                                                   447 
423 //....oooOO0OOooo........oooOO0OOooo........oo    448 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
424                                                   449 
425 inline void G4LossTableManager::SetElectronGen << 450 inline 
                                                   >> 451 void G4LossTableManager::SetElectronGeneralProcess(G4VEnergyLossProcess* ptr)
426 {                                                 452 {
427   eGeneral = ptr;                                 453   eGeneral = ptr;
428 }                                                 454 } 
429                                                   455 
430 //....oooOO0OOooo........oooOO0OOooo........oo    456 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
431                                                   457 
432 inline G4VEmProcess* G4LossTableManager::GetEl << 458 inline G4VEnergyLossProcess* G4LossTableManager::GetElectronGeneralProcess()
433 {                                                 459 {
434   return eGeneral;                                460   return eGeneral;
435 }                                                 461 } 
436                                                   462 
437 //....oooOO0OOooo........oooOO0OOooo........oo    463 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
438                                                   464 
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                                            465 #endif
                                                   >> 466 
453                                                   467