Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/utils/src/G4EmParameters.cc

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/src/G4EmParameters.cc (Version 11.3.0) and /processes/electromagnetic/utils/src/G4EmParameters.cc (Version 10.2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
                                                   >>  26 // $Id: G4EmParameters.cc 69320 2013-04-30 15:59:36Z vnivanch $
                                                   >>  27 //
 26 // -------------------------------------------     28 // -------------------------------------------------------------------
 27 //                                                 29 //
 28 // GEANT4 Class file                               30 // GEANT4 Class file
 29 //                                                 31 //
                                                   >>  32 //
 30 // File name:     G4EmParameters                   33 // File name:     G4EmParameters
 31 //                                                 34 //
 32 // Author:        Vladimir Ivanchenko              35 // Author:        Vladimir Ivanchenko
 33 //                                                 36 //
 34 // Creation date: 18.05.2013                       37 // Creation date: 18.05.2013
 35 //                                                 38 //
 36 // Modifications:                                  39 // Modifications:
 37 //                                                 40 //
                                                   >>  41 //
                                                   >>  42 //
 38 // -------------------------------------------     43 // -------------------------------------------------------------------
 39 //                                                 44 //
 40 //....oooOO0OOooo........oooOO0OOooo........oo     45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 41 //....oooOO0OOooo........oooOO0OOooo........oo     46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 42                                                    47 
 43 #include "G4EmParameters.hh"                       48 #include "G4EmParameters.hh"
 44 #include "G4PhysicalConstants.hh"                  49 #include "G4PhysicalConstants.hh"
 45 #include "G4UnitsTable.hh"                         50 #include "G4UnitsTable.hh"
 46 #include "G4SystemOfUnits.hh"                      51 #include "G4SystemOfUnits.hh"
 47 #include "G4VEmProcess.hh"                     << 
 48 #include "G4VEnergyLossProcess.hh"             << 
 49 #include "G4VAtomDeexcitation.hh"              << 
 50 #include "G4EmExtraParameters.hh"              << 
 51 #include "G4EmLowEParameters.hh"               << 
 52 #include "G4EmParametersMessenger.hh"              52 #include "G4EmParametersMessenger.hh"
 53 #include "G4NistManager.hh"                        53 #include "G4NistManager.hh"
 54 #include "G4RegionStore.hh"                    << 
 55 #include "G4Region.hh"                         << 
 56 #include "G4ApplicationState.hh"               << 
 57 #include "G4StateManager.hh"                   << 
 58 #include "G4Threading.hh"                      << 
 59 #include "G4AutoLock.hh"                       << 
 60                                                << 
 61 G4EmParameters* G4EmParameters::theInstance =  << 
 62                                                    54 
 63 namespace                                      <<  55 G4EmParameters* G4EmParameters::theInstance = 0;
 64 {                                              << 
 65   G4Mutex emParametersMutex = G4MUTEX_INITIALI << 
 66 }                                              << 
 67                                                    56 
 68 //....oooOO0OOooo........oooOO0OOooo........oo     57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 69                                                    58 
 70 G4EmParameters* G4EmParameters::Instance()         59 G4EmParameters* G4EmParameters::Instance()
 71 {                                                  60 {
 72   if(nullptr == theInstance) {                 <<  61   if(0 == theInstance) {
 73     G4AutoLock l(&emParametersMutex);          <<  62     static G4EmParameters manager;
 74     if(nullptr == theInstance) {               <<  63     theInstance = &manager;
 75       static G4EmParameters manager;           << 
 76       theInstance = &manager;                  << 
 77     }                                          << 
 78     l.unlock();                                << 
 79   }                                                64   }
 80   return theInstance;                              65   return theInstance;
 81 }                                                  66 }
 82                                                    67 
 83 //....oooOO0OOooo........oooOO0OOooo........oo     68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 84                                                    69 
 85 G4EmParameters::~G4EmParameters()                  70 G4EmParameters::~G4EmParameters()
 86 {                                                  71 {
 87   delete theMessenger;                             72   delete theMessenger;
 88   delete fBParameters;                         << 
 89   delete fCParameters;                         << 
 90   delete emSaturation;                         << 
 91 }                                                  73 }
 92                                                    74 
 93 //....oooOO0OOooo........oooOO0OOooo........oo     75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 94                                                    76 
 95 G4EmParameters::G4EmParameters()                   77 G4EmParameters::G4EmParameters()
 96 {                                                  78 {
 97   G4NistManager::Instance();                       79   G4NistManager::Instance();
 98   theMessenger = new G4EmParametersMessenger(t     80   theMessenger = new G4EmParametersMessenger(this);
 99   Initialise();                                << 
100                                                    81 
101   fBParameters = new G4EmExtraParameters();    <<  82   SetDefaults();
102   fCParameters = new G4EmLowEParameters();     << 
103                                                << 
104   fStateManager = G4StateManager::GetStateMana << 
105   emSaturation = nullptr;                      << 
106 }                                                  83 }
107                                                    84 
108 void G4EmParameters::SetDefaults()             <<  85 #include "G4AutoLock.hh"
109 {                                              <<  86 namespace { G4Mutex EmParametersMutex = G4MUTEX_INITIALIZER; }
110   if(!IsLocked()) {                            << 
111     Initialise();                              << 
112     fBParameters->Initialise();                << 
113     fCParameters->Initialise();                << 
114   }                                            << 
115 }                                              << 
116                                                    87 
117 void G4EmParameters::Initialise()              <<  88 void G4EmParameters::SetDefaults()
118 {                                                  89 {
                                                   >>  90   G4AutoLock l(&EmParametersMutex);
                                                   >>  91   
119   lossFluctuation = true;                          92   lossFluctuation = true;
120   buildCSDARange = false;                          93   buildCSDARange = false;
121   flagLPM = true;                                  94   flagLPM = true;
122   cutAsFinalRange = false;                     <<  95   spline = true;
                                                   >>  96   finalRange = false;
123   applyCuts = false;                               97   applyCuts = false;
                                                   >>  98   fluo = false;
                                                   >>  99   beardenFluoDir = false;
                                                   >> 100   auger = false;
                                                   >> 101   augerCascade = false;
                                                   >> 102   pixe = false;
                                                   >> 103   deexIgnoreCut = false;
124   lateralDisplacement = true;                     104   lateralDisplacement = true;
125   lateralDisplacementAlg96 = true;             << 
126   muhadLateralDisplacement = false;               105   muhadLateralDisplacement = false;
                                                   >> 106   latDisplacementBeyondSafety = false;
127   useAngGeneratorForIonisation = false;           107   useAngGeneratorForIonisation = false;
128   useMottCorrection = false;                      108   useMottCorrection = false;
129   integral = true;                             << 109 
130   birks = false;                               << 110   minSubRange = 1.0;
131   fICRU90 = false;                             << 111   minKinEnergy = 0.1*keV;
132   gener = false;                               << 112   maxKinEnergy = 10.0*TeV;
133   onIsolated = false;                          << 113   maxKinEnergyCSDA = 1.0*GeV;
134   fSamplingTable = false;                      << 114   lowestElectronEnergy = 1.0*keV;
135   fPolarisation = false;                       << 115   lowestMuHadEnergy = 1.0*keV;
136   fMuDataFromFile = false;                     << 
137   fPEKShell = true;                            << 
138   fMscPosiCorr = true;                         << 
139   fUseEPICS2017XS = false;                     << 
140   f3GammaAnnihilationOnFly = false;            << 
141   fUseRiGePairProductionModel = false;         << 
142   fDNA = false;                                << 
143   fIsPrinted = false;                          << 
144                                                << 
145   minKinEnergy = 0.1*CLHEP::keV;               << 
146   maxKinEnergy = 100.0*CLHEP::TeV;             << 
147   maxKinEnergyCSDA = 1.0*CLHEP::GeV;           << 
148   max5DEnergyForMuPair = 0.0;                  << 
149   lowestElectronEnergy = 1.0*CLHEP::keV;       << 
150   lowestMuHadEnergy = 1.0*CLHEP::keV;          << 
151   lowestTripletEnergy = 1.0*CLHEP::MeV;        << 
152   maxNIELEnergy = 0.0;                         << 
153   linLossLimit = 0.01;                            116   linLossLimit = 0.01;
154   bremsTh = bremsMuHadTh = maxKinEnergy;       << 117   bremsTh = maxKinEnergy;
155   lambdaFactor = 0.8;                             118   lambdaFactor = 0.8;
156   factorForAngleLimit = 1.0;                      119   factorForAngleLimit = 1.0;
157   thetaLimit = CLHEP::pi;                         120   thetaLimit = CLHEP::pi;
158   energyLimit = 100.0*CLHEP::MeV;              << 
159   rangeFactor = 0.04;                             121   rangeFactor = 0.04;
160   rangeFactorMuHad = 0.2;                         122   rangeFactorMuHad = 0.2;
161   geomFactor = 2.5;                               123   geomFactor = 2.5;
162   skin = 1.0;                                     124   skin = 1.0;
163   safetyFactor = 0.6;                          << 
164   lambdaLimit  = 1.0*CLHEP::mm;                << 
165   factorScreen = 1.0;                          << 
166                                                   125 
                                                   >> 126   nbins  = 77;
167   nbinsPerDecade = 7;                             127   nbinsPerDecade = 7;
168   verbose = 1;                                    128   verbose = 1;
169   workerVerbose = 0;                              129   workerVerbose = 0;
170   nForFreeVector = 2;                          << 
171   tripletConv = 0;                             << 
172                                                   130 
173   fTransportationWithMsc = G4TransportationWit << 
174   mscStepLimit = fUseSafety;                      131   mscStepLimit = fUseSafety;
175   mscStepLimitMuHad = fMinimal;                   132   mscStepLimitMuHad = fMinimal;
176   nucFormfactor = fExponentialNF;              << 133 
177   fSStype = fWVI;                              << 134   namePIXE = "Empirical";
178   fFluct = fUniversalFluctuation;              << 135   nameElectronPIXE = "Livermore";
179   fPositronium = fSimplePositronium;           << 
180                                                << 
181   const char* data_dir = G4FindDataDir("G4LEDA << 
182   if (nullptr != data_dir) {                   << 
183     fDirLEDATA = G4String(data_dir);           << 
184   }                                            << 
185   else {                                       << 
186     G4Exception("G4EmParameters::Initialise()" << 
187                 "G4LEDATA data directory was n << 
188   }                                            << 
189 }                                                 136 }
190                                                   137 
191 void G4EmParameters::SetLossFluctuations(G4boo    138 void G4EmParameters::SetLossFluctuations(G4bool val)
192 {                                                 139 {
193   if(IsLocked()) { return; }                   << 140   G4AutoLock l(&EmParametersMutex);
194   lossFluctuation = val;                          141   lossFluctuation = val;
195 }                                                 142 }
196                                                   143 
197 G4bool G4EmParameters::LossFluctuation() const    144 G4bool G4EmParameters::LossFluctuation() const
198 {                                                 145 {
199   return lossFluctuation;                         146   return lossFluctuation;
200 }                                                 147 }
201                                                   148 
202 void G4EmParameters::SetBuildCSDARange(G4bool     149 void G4EmParameters::SetBuildCSDARange(G4bool val)
203 {                                                 150 {
204   if(IsLocked()) { return; }                   << 151   G4AutoLock l(&EmParametersMutex);
205   buildCSDARange = val;                           152   buildCSDARange = val;
206 }                                                 153 }
207                                                   154 
208 G4bool G4EmParameters::BuildCSDARange() const     155 G4bool G4EmParameters::BuildCSDARange() const 
209 {                                                 156 {
210   return buildCSDARange;                          157   return buildCSDARange;
211 }                                                 158 }
212                                                   159 
213 void G4EmParameters::SetLPM(G4bool val)           160 void G4EmParameters::SetLPM(G4bool val)
214 {                                                 161 {
215   if(IsLocked()) { return; }                   << 162   G4AutoLock l(&EmParametersMutex);
216   flagLPM = val;                                  163   flagLPM = val;
217 }                                                 164 }
218                                                   165 
219 G4bool G4EmParameters::LPM() const                166 G4bool G4EmParameters::LPM() const 
220 {                                                 167 {
221   return flagLPM;                                 168   return flagLPM;
222 }                                                 169 }
223                                                   170 
                                                   >> 171 void G4EmParameters::SetSpline(G4bool val)
                                                   >> 172 {
                                                   >> 173   G4AutoLock l(&EmParametersMutex);
                                                   >> 174   spline = val;
                                                   >> 175 }
                                                   >> 176 
                                                   >> 177 G4bool G4EmParameters::Spline() const
                                                   >> 178 {
                                                   >> 179   return spline;
                                                   >> 180 }
                                                   >> 181 
224 void G4EmParameters::SetUseCutAsFinalRange(G4b    182 void G4EmParameters::SetUseCutAsFinalRange(G4bool val)
225 {                                                 183 {
226   if(IsLocked()) { return; }                   << 184   G4AutoLock l(&EmParametersMutex);
227   cutAsFinalRange = val;                       << 185   finalRange = val;
228 }                                                 186 }
229                                                   187 
230 G4bool G4EmParameters::UseCutAsFinalRange() co    188 G4bool G4EmParameters::UseCutAsFinalRange() const
231 {                                                 189 {
232   return cutAsFinalRange;                      << 190   return finalRange;
233 }                                                 191 }
234                                                   192 
235 void G4EmParameters::SetApplyCuts(G4bool val)     193 void G4EmParameters::SetApplyCuts(G4bool val)
236 {                                                 194 {
237   if(IsLocked()) { return; }                   << 195   G4AutoLock l(&EmParametersMutex);
238   applyCuts = val;                                196   applyCuts = val;
239 }                                                 197 }
240                                                   198 
241 G4bool G4EmParameters::ApplyCuts() const          199 G4bool G4EmParameters::ApplyCuts() const
242 {                                                 200 {
243   return applyCuts;                               201   return applyCuts;
244 }                                                 202 }
245                                                   203 
246 void G4EmParameters::SetFluo(G4bool val)          204 void G4EmParameters::SetFluo(G4bool val)
247 {                                                 205 {
248   if(IsLocked()) { return; }                   << 206   G4AutoLock l(&EmParametersMutex);
249   fCParameters->SetFluo(val);                  << 207   fluo = val;
250 }                                                 208 }
251                                                   209 
252 G4bool G4EmParameters::Fluo() const               210 G4bool G4EmParameters::Fluo() const
253 {                                                 211 {
254   return fCParameters->Fluo();                 << 212   return fluo;
255 }                                              << 
256                                                << 
257 G4EmFluoDirectory G4EmParameters::FluoDirector << 
258 {                                              << 
259   return fCParameters->FluoDirectory();        << 
260 }                                              << 
261                                                << 
262 void G4EmParameters::SetFluoDirectory(G4EmFluo << 
263 {                                              << 
264   if(IsLocked()) { return; }                   << 
265   fCParameters->SetFluoDirectory(val);         << 
266 }                                                 213 }
267                                                   214 
268 void G4EmParameters::SetBeardenFluoDir(G4bool     215 void G4EmParameters::SetBeardenFluoDir(G4bool val)
269 {                                                 216 {
270   if(IsLocked()) { return; }                   << 217   G4AutoLock l(&EmParametersMutex);
271   fCParameters->SetBeardenFluoDir(val);        << 218   beardenFluoDir = val;
272 }                                              << 
273                                                << 
274 void G4EmParameters::SetANSTOFluoDir(G4bool va << 
275 {                                              << 
276   if(IsLocked()) { return; }                   << 
277   fCParameters->SetANSTOFluoDir(val);          << 
278 }                                                 219 }
279                                                   220 
280 void G4EmParameters::SetXDB_EADLFluoDir(G4bool << 221 G4bool G4EmParameters::BeardenFluoDir() const
281 {                                                 222 {
282   if(IsLocked()) { return; }                   << 223   return beardenFluoDir;
283   fCParameters->SetXDB_EADLFluoDir(val);       << 
284 }                                                 224 }
285                                                   225 
286 void G4EmParameters::SetAuger(G4bool val)         226 void G4EmParameters::SetAuger(G4bool val)
287 {                                                 227 {
288   if(IsLocked()) { return; }                   << 228   G4AutoLock l(&EmParametersMutex);
289   fCParameters->SetAuger(val);                 << 229   auger = val;
                                                   >> 230   if(val) { fluo = true; }
290 }                                                 231 }
291                                                   232 
292 G4bool G4EmParameters::BeardenFluoDir()        << 233 G4bool G4EmParameters::Auger() const
293 {                                                 234 {
294   auto dir = fCParameters->FluoDirectory();    << 235   return auger;
295   return (dir == fluoBearden);                 << 
296 }                                                 236 }
297                                                   237 
298 G4bool G4EmParameters::ANSTOFluoDir()          << 238 void G4EmParameters::SetAugerCascade(G4bool val)
299 {                                                 239 {
300   auto dir = fCParameters->FluoDirectory();    << 240   G4AutoLock l(&EmParametersMutex);
301   return (dir == fluoANSTO);                   << 241   augerCascade = val;
                                                   >> 242   if(val) { fluo = true; auger = true; }
302 }                                                 243 }
303                                                   244 
304 G4bool G4EmParameters::Auger() const           << 245 G4bool G4EmParameters::AugerCascade() const
305 {                                                 246 {
306   return fCParameters->Auger();                << 247   return augerCascade;
307 }                                                 248 }
308                                                   249 
309 void G4EmParameters::SetPixe(G4bool val)          250 void G4EmParameters::SetPixe(G4bool val)
310 {                                                 251 {
311   if(IsLocked()) { return; }                   << 252   G4AutoLock l(&EmParametersMutex);
312   fCParameters->SetPixe(val);                  << 253   pixe = val;
                                                   >> 254   if(val) { fluo = true; }
313 }                                                 255 }
314                                                   256 
315 G4bool G4EmParameters::Pixe() const               257 G4bool G4EmParameters::Pixe() const
316 {                                                 258 {
317   return fCParameters->Pixe();                 << 259   return pixe;
318 }                                                 260 }
319                                                   261 
320 void G4EmParameters::SetDeexcitationIgnoreCut(    262 void G4EmParameters::SetDeexcitationIgnoreCut(G4bool val)
321 {                                                 263 {
322   if(IsLocked()) { return; }                   << 264   G4AutoLock l(&EmParametersMutex);
323   fCParameters->SetDeexcitationIgnoreCut(val); << 265   deexIgnoreCut = val;
324 }                                                 266 }
325                                                   267 
326 G4bool G4EmParameters::DeexcitationIgnoreCut()    268 G4bool G4EmParameters::DeexcitationIgnoreCut() const
327 {                                                 269 {
328   return fCParameters->DeexcitationIgnoreCut() << 270   return deexIgnoreCut;
329 }                                                 271 }
330                                                   272 
331 void G4EmParameters::SetLateralDisplacement(G4    273 void G4EmParameters::SetLateralDisplacement(G4bool val)
332 {                                                 274 {
333   if(IsLocked()) { return; }                   << 275   G4AutoLock l(&EmParametersMutex);
334   lateralDisplacement = val;                      276   lateralDisplacement = val;
335 }                                                 277 }
336                                                   278 
337 G4bool G4EmParameters::LateralDisplacement() c    279 G4bool G4EmParameters::LateralDisplacement() const
338 {                                                 280 {
339   return lateralDisplacement;                     281   return lateralDisplacement;
340 }                                                 282 }
341                                                   283 
342 void G4EmParameters::SetLateralDisplacementAlg << 284 void G4EmParameters::SetMuHadLateralDisplacement(G4bool val)
343 {                                                 285 {
344   if(IsLocked()) { return; }                   << 286   G4AutoLock l(&EmParametersMutex);
345   lateralDisplacementAlg96 = val;              << 287   muhadLateralDisplacement = val;
346 }                                                 288 }
347                                                   289 
348 G4bool G4EmParameters::LateralDisplacementAlg9 << 290 G4bool G4EmParameters::MuHadLateralDisplacement() const
349 {                                                 291 {
350   return lateralDisplacementAlg96;             << 292   return muhadLateralDisplacement;
351 }                                                 293 }
352                                                   294 
353 void G4EmParameters::SetMuHadLateralDisplaceme << 295 void G4EmParameters::SetLatDisplacementBeyondSafety(G4bool val)
354 {                                                 296 {
355   if(IsLocked()) { return; }                   << 297   G4AutoLock l(&EmParametersMutex);
356   muhadLateralDisplacement = val;              << 298   latDisplacementBeyondSafety = val;
357 }                                                 299 }
358                                                   300 
359 G4bool G4EmParameters::MuHadLateralDisplacemen << 301 G4bool G4EmParameters::LatDisplacementBeyondSafety() const
360 {                                                 302 {
361   return muhadLateralDisplacement;             << 303   return latDisplacementBeyondSafety;
362 }                                                 304 }
363                                                   305 
364 void G4EmParameters::ActivateAngularGeneratorF    306 void G4EmParameters::ActivateAngularGeneratorForIonisation(G4bool val)
365 {                                                 307 {
366   if(IsLocked()) { return; }                   << 
367   useAngGeneratorForIonisation = val;             308   useAngGeneratorForIonisation = val;
368 }                                                 309 }
369                                                   310 
370 G4bool G4EmParameters::UseAngularGeneratorForI    311 G4bool G4EmParameters::UseAngularGeneratorForIonisation() const
371 {                                                 312 {
372   return useAngGeneratorForIonisation;            313   return useAngGeneratorForIonisation;
373 }                                                 314 }
374                                                   315 
375 void G4EmParameters::SetUseMottCorrection(G4bo    316 void G4EmParameters::SetUseMottCorrection(G4bool val)
376 {                                                 317 {
377   if(IsLocked()) { return; }                   << 
378   useMottCorrection = val;                        318   useMottCorrection = val;
379 }                                                 319 }
380                                                   320 
381 G4bool G4EmParameters::UseMottCorrection() con    321 G4bool G4EmParameters::UseMottCorrection() const
382 {                                                 322 {
383   return useMottCorrection;                       323   return useMottCorrection;
384 }                                                 324 }
385                                                   325 
386 void G4EmParameters::SetIntegral(G4bool val)   << 326 void G4EmParameters::SetMinSubRange(G4double val)
387 {                                              << 
388   if(IsLocked()) { return; }                   << 
389   integral = val;                              << 
390 }                                              << 
391                                                << 
392 G4bool G4EmParameters::Integral() const        << 
393 {                                              << 
394   return integral;                             << 
395 }                                              << 
396                                                << 
397 void G4EmParameters::SetEnablePolarisation(G4b << 
398 {                                              << 
399   if(IsLocked()) { return; }                   << 
400   fPolarisation = val;                         << 
401 }                                              << 
402                                                << 
403 G4bool G4EmParameters::EnablePolarisation() co << 
404 {                                                 327 {
405   return fPolarisation;                        << 328   G4AutoLock l(&EmParametersMutex);
406 }                                              << 329   if(val > 0.0 && val < 1.0) {
407                                                << 330     minSubRange = val;
408 void G4EmParameters::SetBirksActive(G4bool val << 331   } else {
409 {                                              << 332     G4ExceptionDescription ed;
410   if(IsLocked()) { return; }                   << 333     ed << "Value of MinSubRange is out of range (0 - 1): " << val
411   birks = val;                                 << 334        << " is ignored"; 
412   if(birks && nullptr == emSaturation) { emSat << 335     PrintWarning(ed);
413 }                                              << 
414                                                << 
415 G4bool G4EmParameters::BirksActive() const     << 
416 {                                              << 
417   return birks;                                << 
418 }                                              << 
419                                                << 
420 void G4EmParameters::SetUseICRU90Data(G4bool v << 
421 {                                              << 
422   if(IsLocked()) { return; }                   << 
423   fICRU90 = val;                               << 
424 }                                              << 
425                                                << 
426 G4bool G4EmParameters::UseICRU90Data() const   << 
427 {                                              << 
428   return fICRU90;                              << 
429 }                                              << 
430                                                << 
431 void G4EmParameters::SetDNAFast(G4bool val)    << 
432 {                                              << 
433   if(IsLocked()) { return; }                   << 
434   fCParameters->SetDNAFast(val);               << 
435   if(val) { ActivateDNA(); }                   << 
436 }                                              << 
437                                                << 
438 G4bool G4EmParameters::DNAFast() const         << 
439 {                                              << 
440   return fCParameters->DNAFast();              << 
441 }                                              << 
442                                                << 
443 void G4EmParameters::SetDNAStationary(G4bool v << 
444 {                                              << 
445   if(IsLocked()) { return; }                   << 
446   fCParameters->SetDNAStationary(val);         << 
447   if(val) { ActivateDNA(); }                   << 
448 }                                              << 
449                                                << 
450 G4bool G4EmParameters::DNAStationary() const   << 
451 {                                              << 
452   return fCParameters->DNAStationary();        << 
453 }                                              << 
454                                                << 
455 void G4EmParameters::SetDNAElectronMsc(G4bool  << 
456 {                                              << 
457   if(IsLocked()) { return; }                   << 
458   fCParameters->SetDNAElectronMsc(val);        << 
459   if(val) { ActivateDNA(); }                   << 
460 }                                              << 
461                                                << 
462 G4bool G4EmParameters::DNAElectronMsc() const  << 
463 {                                              << 
464   return fCParameters->DNAElectronMsc();       << 
465 }                                              << 
466                                                << 
467 void G4EmParameters::SetGeneralProcessActive(G << 
468 {                                              << 
469   if(IsLocked()) { return; }                   << 
470   gener = val;                                 << 
471 }                                              << 
472                                                << 
473 G4bool G4EmParameters::GeneralProcessActive()  << 
474 {                                              << 
475   return gener;                                << 
476 }                                              << 
477                                                << 
478 void G4EmParameters::SetEmSaturation(G4EmSatur << 
479 {                                              << 
480   if(IsLocked()) { return; }                   << 
481   birks = (nullptr != ptr);                    << 
482   if(emSaturation != ptr) {                    << 
483     delete emSaturation;                       << 
484     emSaturation = ptr;                        << 
485   }                                               336   }
486 }                                                 337 }
487                                                   338 
488 G4bool G4EmParameters::RetrieveMuDataFromFile( << 339 G4double G4EmParameters::MinSubRange() const
489 {                                              << 
490   return fMuDataFromFile;                      << 
491 }                                              << 
492                                                << 
493 void G4EmParameters::SetRetrieveMuDataFromFile << 
494 {                                              << 
495   fMuDataFromFile = v;                         << 
496 }                                              << 
497                                                << 
498 void G4EmParameters::SetOnIsolated(G4bool val) << 
499 {                                              << 
500   if(IsLocked()) { return; }                   << 
501   onIsolated = val;                            << 
502 }                                              << 
503                                                << 
504 G4bool G4EmParameters::OnIsolated() const      << 
505 {                                              << 
506   return onIsolated;                           << 
507 }                                              << 
508                                                << 
509 void G4EmParameters::SetEnableSamplingTable(G4 << 
510 {                                              << 
511   if(IsLocked()) { return; }                   << 
512   fSamplingTable = val;                        << 
513 }                                              << 
514                                                << 
515 G4bool G4EmParameters::EnableSamplingTable() c << 
516 {                                              << 
517   return fSamplingTable;                       << 
518 }                                              << 
519                                                << 
520 G4bool G4EmParameters::PhotoeffectBelowKShell( << 
521 {                                              << 
522   return fPEKShell;                            << 
523 }                                              << 
524                                                << 
525 void G4EmParameters::SetPhotoeffectBelowKShell << 
526 {                                              << 
527   if(IsLocked()) { return; }                   << 
528   fPEKShell = v;                               << 
529 }                                              << 
530                                                << 
531 G4bool G4EmParameters::MscPositronCorrection() << 
532 {                                              << 
533   return fMscPosiCorr;                         << 
534 }                                              << 
535                                                << 
536 void G4EmParameters::SetMscPositronCorrection( << 
537 {                                              << 
538   if(IsLocked()) { return; }                   << 
539   fMscPosiCorr = v;                            << 
540 }                                              << 
541                                                << 
542 G4bool G4EmParameters::UseEPICS2017XS() const  << 
543 {                                              << 
544   return fUseEPICS2017XS;                      << 
545 }                                              << 
546                                                << 
547 void G4EmParameters::SetUseEPICS2017XS(G4bool  << 
548 {                                              << 
549   if(IsLocked()) { return; }                   << 
550   fUseEPICS2017XS = v;                         << 
551 }                                              << 
552                                                << 
553 G4bool G4EmParameters::Use3GammaAnnihilationOn << 
554 {                                              << 
555   return f3GammaAnnihilationOnFly;             << 
556 }                                              << 
557                                                << 
558 void G4EmParameters::Set3GammaAnnihilationOnFl << 
559 {                                              << 
560   if(IsLocked()) { return; }                   << 
561   f3GammaAnnihilationOnFly = v;                << 
562 }                                              << 
563                                                << 
564 G4bool G4EmParameters::UseRiGePairProductionMo << 
565 {                                              << 
566   return fUseRiGePairProductionModel;          << 
567 }                                              << 
568                                                << 
569 void G4EmParameters::SetUseRiGePairProductionM << 
570 {                                              << 
571   if (IsLocked()) { return; }                  << 
572   fUseRiGePairProductionModel = v;             << 
573 }                                              << 
574                                                << 
575 void G4EmParameters::ActivateDNA()             << 
576 {                                              << 
577   if(IsLocked()) { return; }                   << 
578   fDNA = true;                                 << 
579 }                                              << 
580                                                << 
581 void G4EmParameters::SetIsPrintedFlag(G4bool v << 
582 {                                                 340 {
583   fIsPrinted = val;                            << 341   return minSubRange;
584 }                                              << 
585                                                << 
586 G4bool G4EmParameters::IsPrintLocked() const   << 
587 {                                              << 
588   return fIsPrinted;                           << 
589 }                                              << 
590                                                << 
591 G4EmSaturation* G4EmParameters::GetEmSaturatio << 
592 {                                              << 
593   if(nullptr == emSaturation) {                << 
594 #ifdef G4MULTITHREADED                         << 
595     G4MUTEXLOCK(&emParametersMutex);           << 
596     if(nullptr == emSaturation) {              << 
597 #endif                                         << 
598       emSaturation = new G4EmSaturation(1);    << 
599 #ifdef G4MULTITHREADED                         << 
600     }                                          << 
601     G4MUTEXUNLOCK(&emParametersMutex);         << 
602 #endif                                         << 
603   }                                            << 
604   birks = true;                                << 
605   return emSaturation;                         << 
606 }                                                 342 }
607                                                   343 
608 void G4EmParameters::SetMinEnergy(G4double val    344 void G4EmParameters::SetMinEnergy(G4double val)
609 {                                                 345 {
610   if(IsLocked()) { return; }                   << 346   G4AutoLock l(&EmParametersMutex);
611   if(val > 1.e-3*CLHEP::eV && val < maxKinEner << 347   if(val > 1.e-3*eV && val < maxKinEnergy) {
612     minKinEnergy = val;                           348     minKinEnergy = val;
                                                   >> 349     nbins = nbinsPerDecade*G4lrint(std::log10(maxKinEnergy/minKinEnergy));
613   } else {                                        350   } else {
614     G4ExceptionDescription ed;                    351     G4ExceptionDescription ed;
615     ed << "Value of MinKinEnergy - is out of r << 352     ed << "Value of MinKinEnergy is out of range: " << val/MeV 
616        << " MeV is ignored";                      353        << " MeV is ignored"; 
617     PrintWarning(ed);                             354     PrintWarning(ed);
618   }                                               355   }
619 }                                                 356 }
620                                                   357 
621 G4double G4EmParameters::MinKinEnergy() const     358 G4double G4EmParameters::MinKinEnergy() const
622 {                                                 359 {
623   return minKinEnergy;                            360   return minKinEnergy;
624 }                                                 361 }
625                                                   362 
626 void G4EmParameters::SetMaxEnergy(G4double val    363 void G4EmParameters::SetMaxEnergy(G4double val)
627 {                                                 364 {
628   if(IsLocked()) { return; }                   << 365   G4AutoLock l(&EmParametersMutex);
629   if(val > std::max(minKinEnergy,599.9*CLHEP:: << 366   if(val > minKinEnergy && val < 1.e+7*TeV) {
630     maxKinEnergy = val;                           367     maxKinEnergy = val;
                                                   >> 368     nbins = nbinsPerDecade*G4lrint(std::log10(maxKinEnergy/minKinEnergy));
631   } else {                                        369   } else {
632     G4ExceptionDescription ed;                    370     G4ExceptionDescription ed;
633     ed << "Value of MaxKinEnergy is out of ran    371     ed << "Value of MaxKinEnergy is out of range: " 
634        << val/CLHEP::GeV                       << 372        << val/GeV << " GeV is ignored"; 
635        << " GeV is ignored; allowed range 600  << 
636     PrintWarning(ed);                             373     PrintWarning(ed);
637   }                                               374   }
638 }                                                 375 }
639                                                   376 
640 G4double G4EmParameters::MaxKinEnergy() const     377 G4double G4EmParameters::MaxKinEnergy() const
641 {                                                 378 {
642   return maxKinEnergy;                            379   return maxKinEnergy;
643 }                                                 380 }
644                                                   381 
645 void G4EmParameters::SetMaxEnergyForCSDARange(    382 void G4EmParameters::SetMaxEnergyForCSDARange(G4double val)
646 {                                                 383 {
647   if(IsLocked()) { return; }                   << 384   G4AutoLock l(&EmParametersMutex);
648   if(val > minKinEnergy && val <= 100*CLHEP::T << 385   if(val > minKinEnergy && val <= 100*TeV) {
649     maxKinEnergyCSDA = val;                       386     maxKinEnergyCSDA = val;
650   } else {                                        387   } else {
651     G4ExceptionDescription ed;                    388     G4ExceptionDescription ed;
652     ed << "Value of MaxKinEnergyCSDA is out of    389     ed << "Value of MaxKinEnergyCSDA is out of range: " 
653        << val/CLHEP::GeV << " GeV is ignored;  << 390        << val/GeV << " GeV is ignored"; 
654        << minKinEnergy << " MeV - 100 TeV";    << 
655     PrintWarning(ed);                             391     PrintWarning(ed);
656   }                                               392   }
657 }                                                 393 }
658                                                   394 
659 G4double G4EmParameters::MaxEnergyForCSDARange    395 G4double G4EmParameters::MaxEnergyForCSDARange() const
660 {                                                 396 {
661   return maxKinEnergyCSDA;                        397   return maxKinEnergyCSDA; 
662 }                                                 398 }
663                                                   399 
664 void G4EmParameters::SetLowestElectronEnergy(G    400 void G4EmParameters::SetLowestElectronEnergy(G4double val)
665 {                                                 401 {
666   if(IsLocked()) { return; }                   << 402   G4AutoLock l(&EmParametersMutex);
667   if(val >= 0.0) { lowestElectronEnergy = val; << 403   if(val >= 0.0) {
                                                   >> 404     lowestElectronEnergy = val;
                                                   >> 405   } else {
                                                   >> 406     G4ExceptionDescription ed;
                                                   >> 407     ed << "Value of lowestElectronEnergy is out of range: " 
                                                   >> 408        << val/MeV << " MeV is ignored"; 
                                                   >> 409     PrintWarning(ed);
                                                   >> 410   }
668 }                                                 411 }
669                                                   412 
670 G4double G4EmParameters::LowestElectronEnergy(    413 G4double G4EmParameters::LowestElectronEnergy() const
671 {                                                 414 {
672   return lowestElectronEnergy;                    415   return lowestElectronEnergy; 
673 }                                                 416 }
674                                                   417 
675 void G4EmParameters::SetLowestMuHadEnergy(G4do    418 void G4EmParameters::SetLowestMuHadEnergy(G4double val)
676 {                                                 419 {
677   if(IsLocked()) { return; }                   << 420   G4AutoLock l(&EmParametersMutex);
678   if(val >= 0.0) { lowestMuHadEnergy = val; }  << 421   if(val >= 0.0) {
                                                   >> 422     lowestMuHadEnergy = val;
                                                   >> 423   } else {
                                                   >> 424     G4ExceptionDescription ed;
                                                   >> 425     ed << "Value of lowestMuHadEnergy is out of range: " 
                                                   >> 426        << val/MeV << " MeV is ignored"; 
                                                   >> 427     PrintWarning(ed);
                                                   >> 428   }
679 }                                                 429 }
680                                                   430 
681 G4double G4EmParameters::LowestMuHadEnergy() c    431 G4double G4EmParameters::LowestMuHadEnergy() const
682 {                                                 432 {
683   return lowestMuHadEnergy;                       433   return lowestMuHadEnergy; 
684 }                                                 434 }
685                                                   435 
686 void G4EmParameters::SetLowestTripletEnergy(G4 << 
687 {                                              << 
688   if(IsLocked()) { return; }                   << 
689   if(val > 0.0) { lowestTripletEnergy = val; } << 
690 }                                              << 
691                                                << 
692 G4double G4EmParameters::LowestTripletEnergy() << 
693 {                                              << 
694   return lowestTripletEnergy;                  << 
695 }                                              << 
696                                                << 
697 void G4EmParameters::SetMaxNIELEnergy(G4double << 
698 {                                              << 
699   if(IsLocked()) { return; }                   << 
700   if(val >= 0.0) { maxNIELEnergy = val; }      << 
701 }                                              << 
702                                                << 
703 G4double G4EmParameters::MaxNIELEnergy() const << 
704 {                                              << 
705   return maxNIELEnergy;                        << 
706 }                                              << 
707                                                << 
708 void G4EmParameters::SetMaxEnergyFor5DMuPair(G << 
709 {                                              << 
710   if(IsLocked()) { return; }                   << 
711   if(val > 0.0) { max5DEnergyForMuPair = val;  << 
712 }                                              << 
713                                                << 
714 G4double G4EmParameters::MaxEnergyFor5DMuPair( << 
715 {                                              << 
716   return max5DEnergyForMuPair;                 << 
717 }                                              << 
718                                                << 
719 void G4EmParameters::SetLinearLossLimit(G4doub    436 void G4EmParameters::SetLinearLossLimit(G4double val)
720 {                                                 437 {
721   if(IsLocked()) { return; }                   << 438   G4AutoLock l(&EmParametersMutex);
722   if(val > 0.0 && val < 0.5) {                    439   if(val > 0.0 && val < 0.5) {
723     linLossLimit = val;                           440     linLossLimit = val;
724   } else {                                        441   } else {
725     G4ExceptionDescription ed;                    442     G4ExceptionDescription ed;
726     ed << "Value of linLossLimit is out of ran    443     ed << "Value of linLossLimit is out of range: " << val 
727        << " is ignored";                          444        << " is ignored"; 
728     PrintWarning(ed);                             445     PrintWarning(ed);
729   }                                               446   }
730 }                                                 447 }
731                                                   448 
732 G4double G4EmParameters::LinearLossLimit() con    449 G4double G4EmParameters::LinearLossLimit() const
733 {                                                 450 {
734   return linLossLimit;                            451   return linLossLimit;
735 }                                                 452 }
736                                                   453 
737 void G4EmParameters::SetBremsstrahlungTh(G4dou    454 void G4EmParameters::SetBremsstrahlungTh(G4double val)
738 {                                                 455 {
739   if(IsLocked()) { return; }                   << 456   G4AutoLock l(&EmParametersMutex);
740   if(val > 0.0) {                                 457   if(val > 0.0) {
741     bremsTh = val;                                458     bremsTh = val;
742   } else {                                        459   } else {
743     G4ExceptionDescription ed;                    460     G4ExceptionDescription ed;
744     ed << "Value of bremsstrahlung threshold i    461     ed << "Value of bremsstrahlung threshold is out of range: " 
745        << val/GeV << " GeV is ignored";           462        << val/GeV << " GeV is ignored"; 
746     PrintWarning(ed);                             463     PrintWarning(ed);
747   }                                               464   }
748 }                                                 465 }
749                                                   466 
750 G4double G4EmParameters::BremsstrahlungTh() co    467 G4double G4EmParameters::BremsstrahlungTh() const 
751 {                                                 468 {
752   return bremsTh;                                 469   return bremsTh;
753 }                                                 470 }
754                                                   471 
755 void G4EmParameters::SetMuHadBremsstrahlungTh( << 
756 {                                              << 
757   if(IsLocked()) { return; }                   << 
758   if(val > 0.0) {                              << 
759     bremsMuHadTh = val;                        << 
760   } else {                                     << 
761     G4ExceptionDescription ed;                 << 
762     ed << "Value of bremsstrahlung threshold i << 
763        << val/GeV << " GeV is ignored";        << 
764     PrintWarning(ed);                          << 
765   }                                            << 
766 }                                              << 
767                                                << 
768 G4double G4EmParameters::MuHadBremsstrahlungTh << 
769 {                                              << 
770   return bremsMuHadTh;                         << 
771 }                                              << 
772                                                << 
773 void G4EmParameters::SetLambdaFactor(G4double     472 void G4EmParameters::SetLambdaFactor(G4double val)
774 {                                                 473 {
775   if(IsLocked()) { return; }                   << 474   G4AutoLock l(&EmParametersMutex);
776   if(val > 0.0 && val < 1.0) {                    475   if(val > 0.0 && val < 1.0) {
777     lambdaFactor = val;                           476     lambdaFactor = val;
778   } else {                                        477   } else {
779     G4ExceptionDescription ed;                    478     G4ExceptionDescription ed;
780     ed << "Value of lambda factor is out of ra    479     ed << "Value of lambda factor is out of range: " << val 
781        << " is ignored";                          480        << " is ignored"; 
782     PrintWarning(ed);                             481     PrintWarning(ed);
783   }                                               482   }
784 }                                                 483 }
785                                                   484 
786 G4double G4EmParameters::LambdaFactor() const     485 G4double G4EmParameters::LambdaFactor() const 
787 {                                                 486 {
788   return lambdaFactor;                            487   return lambdaFactor;
789 }                                                 488 }
790                                                   489 
791 void G4EmParameters::SetFactorForAngleLimit(G4    490 void G4EmParameters::SetFactorForAngleLimit(G4double val)
792 {                                                 491 {
793   if(IsLocked()) { return; }                   << 492   G4AutoLock l(&EmParametersMutex);
794   if(val > 0.0) {                                 493   if(val > 0.0) {
795     factorForAngleLimit = val;                    494     factorForAngleLimit = val;
796   } else {                                        495   } else {
797     G4ExceptionDescription ed;                    496     G4ExceptionDescription ed;
798     ed << "Value of factor for enegry limit is    497     ed << "Value of factor for enegry limit is out of range: " 
799        << val << " is ignored";                   498        << val << " is ignored"; 
800     PrintWarning(ed);                             499     PrintWarning(ed);
801   }                                               500   }
802 }                                                 501 }
803                                                   502 
804 G4double G4EmParameters::FactorForAngleLimit()    503 G4double G4EmParameters::FactorForAngleLimit() const 
805 {                                                 504 {
806   return factorForAngleLimit;                     505   return factorForAngleLimit;
807 }                                                 506 }
808                                                   507 
809 void G4EmParameters::SetMscThetaLimit(G4double    508 void G4EmParameters::SetMscThetaLimit(G4double val)
810 {                                                 509 {
811   if(IsLocked()) { return; }                   << 510   G4AutoLock l(&EmParametersMutex);
812   if(val >= 0.0 && val <= pi) {                   511   if(val >= 0.0 && val <= pi) {
813     thetaLimit = val;                             512     thetaLimit = val;
814   } else {                                        513   } else {
815     G4ExceptionDescription ed;                    514     G4ExceptionDescription ed;
816     ed << "Value of polar angle limit is out o    515     ed << "Value of polar angle limit is out of range: " 
817        << val << " is ignored";                   516        << val << " is ignored"; 
818     PrintWarning(ed);                             517     PrintWarning(ed);
819   }                                               518   }
820 }                                                 519 }
821                                                   520 
822 G4double G4EmParameters::MscThetaLimit() const    521 G4double G4EmParameters::MscThetaLimit() const 
823 {                                                 522 {
824   return thetaLimit;                              523   return thetaLimit;
825 }                                                 524 }
826                                                   525 
827 void G4EmParameters::SetMscEnergyLimit(G4doubl << 
828 {                                              << 
829   if(IsLocked()) { return; }                   << 
830   if(val >= 0.0) {                             << 
831     energyLimit = val;                         << 
832   } else {                                     << 
833     G4ExceptionDescription ed;                 << 
834     ed << "Value of msc energy limit is out of << 
835        << val << " is ignored";                << 
836     PrintWarning(ed);                          << 
837   }                                            << 
838 }                                              << 
839                                                << 
840 G4double G4EmParameters::MscEnergyLimit() cons << 
841 {                                              << 
842   return energyLimit;                          << 
843 }                                              << 
844                                                << 
845 void G4EmParameters::SetMscRangeFactor(G4doubl    526 void G4EmParameters::SetMscRangeFactor(G4double val)
846 {                                                 527 {
847   if(IsLocked()) { return; }                   << 528   G4AutoLock l(&EmParametersMutex);
848   if(val > 0.0 && val < 1.0) {                    529   if(val > 0.0 && val < 1.0) {
                                                   >> 530     //G4cout << " G4EmParameters::SetMscRangeFactor: " << val << G4endl;
849     rangeFactor = val;                            531     rangeFactor = val;
850   } else {                                        532   } else {
851     G4ExceptionDescription ed;                    533     G4ExceptionDescription ed;
852     ed << "Value of rangeFactor is out of rang    534     ed << "Value of rangeFactor is out of range: " 
853        << val << " is ignored";                   535        << val << " is ignored"; 
854     PrintWarning(ed);                             536     PrintWarning(ed);
855   }                                               537   }
856 }                                                 538 }
857                                                   539 
858 G4double G4EmParameters::MscRangeFactor() cons    540 G4double G4EmParameters::MscRangeFactor() const 
859 {                                                 541 {
860   return rangeFactor;                             542   return rangeFactor;
861 }                                                 543 }
862                                                   544 
863 void G4EmParameters::SetMscMuHadRangeFactor(G4    545 void G4EmParameters::SetMscMuHadRangeFactor(G4double val)
864 {                                                 546 {
865   if(IsLocked()) { return; }                   << 547   G4AutoLock l(&EmParametersMutex);
866   if(val > 0.0 && val < 1.0) {                    548   if(val > 0.0 && val < 1.0) {
867     rangeFactorMuHad = val;                       549     rangeFactorMuHad = val;
868   } else {                                        550   } else {
869     G4ExceptionDescription ed;                    551     G4ExceptionDescription ed;
870     ed << "Value of rangeFactorMuHad is out of    552     ed << "Value of rangeFactorMuHad is out of range: " 
871        << val << " is ignored";                   553        << val << " is ignored"; 
872     PrintWarning(ed);                             554     PrintWarning(ed);
873   }                                               555   }
874 }                                                 556 }
875                                                   557 
876 G4double G4EmParameters::MscMuHadRangeFactor()    558 G4double G4EmParameters::MscMuHadRangeFactor() const 
877 {                                                 559 {
878   return rangeFactorMuHad;                        560   return rangeFactorMuHad;
879 }                                                 561 }
880                                                   562 
881 void G4EmParameters::SetMscGeomFactor(G4double    563 void G4EmParameters::SetMscGeomFactor(G4double val)
882 {                                                 564 {
883   if(IsLocked()) { return; }                   << 565   G4AutoLock l(&EmParametersMutex);
884   if(val >= 1.0) {                                566   if(val >= 1.0) {
885     geomFactor = val;                             567     geomFactor = val;
886   } else {                                        568   } else {
887     G4ExceptionDescription ed;                    569     G4ExceptionDescription ed;
888     ed << "Value of geomFactor is out of range    570     ed << "Value of geomFactor is out of range: " 
889        << val << " is ignored";                   571        << val << " is ignored"; 
890     PrintWarning(ed);                             572     PrintWarning(ed);
891   }                                               573   }
892 }                                                 574 }
893                                                   575 
894 G4double G4EmParameters::MscGeomFactor() const    576 G4double G4EmParameters::MscGeomFactor() const 
895 {                                                 577 {
896   return geomFactor;                              578   return geomFactor;
897 }                                                 579 }
898                                                   580 
899 void G4EmParameters::SetMscSafetyFactor(G4doub << 
900 {                                              << 
901   if(IsLocked()) { return; }                   << 
902   if(val >= 0.1) {                             << 
903     safetyFactor = val;                        << 
904   } else {                                     << 
905     G4ExceptionDescription ed;                 << 
906     ed << "Value of safetyFactor is out of ran << 
907        << val << " is ignored";                << 
908     PrintWarning(ed);                          << 
909   }                                            << 
910 }                                              << 
911                                                << 
912 G4double G4EmParameters::MscSafetyFactor() con << 
913 {                                              << 
914   return safetyFactor;                         << 
915 }                                              << 
916                                                << 
917 void G4EmParameters::SetMscLambdaLimit(G4doubl << 
918 {                                              << 
919   if(IsLocked()) { return; }                   << 
920   if(val >= 0.0) {                             << 
921     lambdaLimit = val;                         << 
922   } else {                                     << 
923     G4ExceptionDescription ed;                 << 
924     ed << "Value of lambdaLimit is out of rang << 
925        << val << " is ignored";                << 
926     PrintWarning(ed);                          << 
927   }                                            << 
928 }                                              << 
929                                                << 
930 G4double G4EmParameters::MscLambdaLimit() cons << 
931 {                                              << 
932   return lambdaLimit;                          << 
933 }                                              << 
934                                                << 
935 void G4EmParameters::SetMscSkin(G4double val)     581 void G4EmParameters::SetMscSkin(G4double val)
936 {                                                 582 {
937   if(IsLocked()) { return; }                   << 583   G4AutoLock l(&EmParametersMutex);
938   if(val >= 1.0) {                                584   if(val >= 1.0) {
939     skin = val;                                   585     skin = val;
940   } else {                                        586   } else {
941     G4ExceptionDescription ed;                    587     G4ExceptionDescription ed;
942     ed << "Value of skin is out of range: "       588     ed << "Value of skin is out of range: " 
943        << val << " is ignored";                   589        << val << " is ignored"; 
944     PrintWarning(ed);                             590     PrintWarning(ed);
945   }                                               591   }
946 }                                                 592 }
947                                                   593 
948 G4double G4EmParameters::MscSkin() const          594 G4double G4EmParameters::MscSkin() const 
949 {                                                 595 {
950   return skin;                                    596   return skin;
951 }                                                 597 }
952                                                   598 
953 void G4EmParameters::SetScreeningFactor(G4doub << 599 void G4EmParameters::SetNumberOfBins(G4int val)
954 {                                                 600 {
955   if(IsLocked()) { return; }                   << 601   G4AutoLock l(&EmParametersMutex);
956   if(val > 0.0) {                              << 602   if(val >= 5 && val < 10000000) {
957     factorScreen = val;                        << 603     nbins = val;
                                                   >> 604     nbinsPerDecade = G4lrint(nbins/std::log10(maxKinEnergy/minKinEnergy));
958   } else {                                        605   } else {
959     G4ExceptionDescription ed;                    606     G4ExceptionDescription ed;
960     ed << "Value of factorScreen is out of ran << 607     ed << "Value of number of bins is out of range: " 
961        << val << " is ignored";                   608        << val << " is ignored"; 
962     PrintWarning(ed);                             609     PrintWarning(ed);
963   }                                               610   }
964 }                                                 611 }
965                                                   612 
966 G4double G4EmParameters::ScreeningFactor() con << 
967 {                                              << 
968   return factorScreen;                         << 
969 }                                              << 
970                                                << 
971 void G4EmParameters::SetStepFunction(G4double  << 
972 {                                              << 
973   if(IsLocked()) { return; }                   << 
974   fBParameters->SetStepFunction(v1, v2);       << 
975 }                                              << 
976                                                << 
977 void G4EmParameters::SetStepFunctionMuHad(G4do << 
978 {                                              << 
979   if(IsLocked()) { return; }                   << 
980   fBParameters->SetStepFunctionMuHad(v1, v2);  << 
981 }                                              << 
982                                                << 
983 void G4EmParameters::SetStepFunctionLightIons( << 
984 {                                              << 
985   if(IsLocked()) { return; }                   << 
986   fBParameters->SetStepFunctionLightIons(v1, v << 
987 }                                              << 
988                                                << 
989 void G4EmParameters::SetStepFunctionIons(G4dou << 
990 {                                              << 
991   if(IsLocked()) { return; }                   << 
992   fBParameters->SetStepFunctionIons(v1, v2);   << 
993 }                                              << 
994                                                << 
995 void G4EmParameters::FillStepFunction(const G4 << 
996 {                                              << 
997   fBParameters->FillStepFunction(part, proc);  << 
998 }                                              << 
999                                                << 
1000 G4int G4EmParameters::NumberOfBins() const       613 G4int G4EmParameters::NumberOfBins() const 
1001 {                                                614 {
1002   return nbinsPerDecade*G4lrint(std::log10(ma << 615   return nbins;
1003 }                                                616 }
1004                                                  617 
1005 void G4EmParameters::SetNumberOfBinsPerDecade    618 void G4EmParameters::SetNumberOfBinsPerDecade(G4int val)
1006 {                                                619 {
1007   if(IsLocked()) { return; }                  << 620   G4AutoLock l(&EmParametersMutex);
1008   if(val >= 5 && val < 1000000) {                621   if(val >= 5 && val < 1000000) {
1009     nbinsPerDecade = val;                        622     nbinsPerDecade = val;
                                                   >> 623     nbins = nbinsPerDecade*G4lrint(std::log10(maxKinEnergy/minKinEnergy));
1010   } else {                                       624   } else {
1011     G4ExceptionDescription ed;                   625     G4ExceptionDescription ed;
1012     ed << "Value of number of bins per decade    626     ed << "Value of number of bins per decade is out of range: " 
1013        << val << " is ignored";                  627        << val << " is ignored"; 
1014     PrintWarning(ed);                            628     PrintWarning(ed);
1015   }                                              629   }
1016 }                                                630 }
1017                                                  631 
1018 G4int G4EmParameters::NumberOfBinsPerDecade()    632 G4int G4EmParameters::NumberOfBinsPerDecade() const 
1019 {                                                633 {
1020   return nbinsPerDecade;                         634   return nbinsPerDecade; 
1021 }                                                635 }
1022                                                  636 
1023 void G4EmParameters::SetVerbose(G4int val)       637 void G4EmParameters::SetVerbose(G4int val)
1024 {                                                638 {
1025   if(IsLocked()) { return; }                  << 639   G4AutoLock l(&EmParametersMutex);
1026   verbose = val;                                 640   verbose = val;
1027   workerVerbose = std::min(workerVerbose, ver    641   workerVerbose = std::min(workerVerbose, verbose);
1028 }                                                642 }
1029                                                  643 
1030 G4int G4EmParameters::Verbose() const            644 G4int G4EmParameters::Verbose() const 
1031 {                                                645 {
1032   return verbose;                                646   return verbose;
1033 }                                                647 }
1034                                                  648 
1035 void G4EmParameters::SetWorkerVerbose(G4int v    649 void G4EmParameters::SetWorkerVerbose(G4int val)
1036 {                                                650 {
1037   if(IsLocked()) { return; }                  << 651   G4AutoLock l(&EmParametersMutex);
1038   workerVerbose = val;                           652   workerVerbose = val;
1039 }                                                653 }
1040                                                  654 
1041 G4int G4EmParameters::WorkerVerbose() const      655 G4int G4EmParameters::WorkerVerbose() const 
1042 {                                                656 {
1043   return workerVerbose;                          657   return workerVerbose;
1044 }                                                658 }
1045                                                  659 
1046 void G4EmParameters::SetNumberForFreeVector(G << 
1047 {                                             << 
1048   if(IsLocked()) { return; }                  << 
1049   nForFreeVector = val;                       << 
1050 }                                             << 
1051                                               << 
1052 G4int G4EmParameters::NumberForFreeVector() c << 
1053 {                                             << 
1054   return nForFreeVector;                      << 
1055 }                                             << 
1056                                               << 
1057 void G4EmParameters::SetTransportationWithMsc << 
1058 {                                             << 
1059   if(IsLocked()) { return; }                  << 
1060   fTransportationWithMsc = val;               << 
1061 }                                             << 
1062                                               << 
1063 G4TransportationWithMscType G4EmParameters::T << 
1064 {                                             << 
1065   return fTransportationWithMsc;              << 
1066 }                                             << 
1067                                               << 
1068 void G4EmParameters::SetFluctuationType(G4EmF << 
1069 {                                             << 
1070   if(IsLocked()) { return; }                  << 
1071   fFluct = val;                               << 
1072 }                                             << 
1073                                               << 
1074 G4EmFluctuationType G4EmParameters::Fluctuati << 
1075 {                                             << 
1076   return fFluct;                              << 
1077 }                                             << 
1078                                               << 
1079 void G4EmParameters::SetPositronAtRestModelTy << 
1080 {                                             << 
1081   if(IsLocked()) { return; }                  << 
1082   fPositronium = val;                         << 
1083 }                                             << 
1084                                               << 
1085 G4PositronAtRestModelType G4EmParameters::Pos << 
1086 {                                             << 
1087   return fPositronium;                        << 
1088 }                                             << 
1089                                               << 
1090 void G4EmParameters::SetMscStepLimitType(G4Ms    660 void G4EmParameters::SetMscStepLimitType(G4MscStepLimitType val)
1091 {                                                661 {
1092   if(IsLocked()) { return; }                  << 662   G4AutoLock l(&EmParametersMutex);
1093   mscStepLimit = val;                            663   mscStepLimit = val;
1094 }                                                664 }
1095                                                  665 
1096 G4MscStepLimitType G4EmParameters::MscStepLim    666 G4MscStepLimitType G4EmParameters::MscStepLimitType() const 
1097 {                                                667 {
1098   return mscStepLimit;                           668   return mscStepLimit;
1099 }                                                669 }
1100                                                  670 
1101 void G4EmParameters::SetMscMuHadStepLimitType    671 void G4EmParameters::SetMscMuHadStepLimitType(G4MscStepLimitType val)
1102 {                                                672 {
1103   if(IsLocked()) { return; }                  << 673   G4AutoLock l(&EmParametersMutex);
1104   mscStepLimitMuHad = val;                       674   mscStepLimitMuHad = val;
1105 }                                                675 }
1106                                                  676 
1107 G4MscStepLimitType G4EmParameters::MscMuHadSt    677 G4MscStepLimitType G4EmParameters::MscMuHadStepLimitType() const 
1108 {                                                678 {
1109   return mscStepLimitMuHad;                      679   return mscStepLimitMuHad;
1110 }                                                680 }
1111                                                  681 
1112 void G4EmParameters::SetSingleScatteringType( << 
1113 {                                             << 
1114   if(IsLocked()) { return; }                  << 
1115   fSStype = val;                              << 
1116 }                                             << 
1117                                               << 
1118 G4eSingleScatteringType G4EmParameters::Singl << 
1119 {                                             << 
1120   return fSStype;                             << 
1121 }                                             << 
1122                                               << 
1123 void                                          << 
1124 G4EmParameters::SetNuclearFormfactorType(G4Nu << 
1125 {                                             << 
1126   if(IsLocked()) { return; }                  << 
1127   nucFormfactor = val;                        << 
1128 }                                             << 
1129                                               << 
1130 G4NuclearFormfactorType G4EmParameters::Nucle << 
1131 {                                             << 
1132   return nucFormfactor;                       << 
1133 }                                             << 
1134                                               << 
1135 void G4EmParameters::SetDNAeSolvationSubType( << 
1136 {                                             << 
1137   if(IsLocked()) { return; }                  << 
1138   fCParameters->SetDNAeSolvationSubType(val); << 
1139   ActivateDNA();                              << 
1140 }                                             << 
1141                                               << 
1142 G4DNAModelSubType G4EmParameters::DNAeSolvati << 
1143 {                                             << 
1144   return fCParameters->DNAeSolvationSubType() << 
1145 }                                             << 
1146                                               << 
1147 void G4EmParameters::SetConversionType(G4int  << 
1148 {                                             << 
1149   if(IsLocked()) { return; }                  << 
1150   tripletConv = val;                          << 
1151 }                                             << 
1152                                               << 
1153 G4int G4EmParameters::GetConversionType() con << 
1154 {                                             << 
1155   return tripletConv;                         << 
1156 }                                             << 
1157                                               << 
1158 void G4EmParameters::SetPIXECrossSectionModel    682 void G4EmParameters::SetPIXECrossSectionModel(const G4String& sss)
1159 {                                                683 {
1160   if(IsLocked()) { return; }                  << 684   G4cout << "G4EmParameters::SetPIXECrossSectionModel " << sss << G4endl;
1161   fCParameters->SetPIXECrossSectionModel(sss) << 685   G4AutoLock l(&EmParametersMutex);
                                                   >> 686   namePIXE = sss;
1162 }                                                687 }
1163                                                  688 
1164 const G4String& G4EmParameters::PIXECrossSect    689 const G4String& G4EmParameters::PIXECrossSectionModel()
1165 {                                                690 {
1166   return fCParameters->PIXECrossSectionModel( << 691   return namePIXE;
1167 }                                                692 }
1168                                                  693 
1169 void G4EmParameters::SetPIXEElectronCrossSect    694 void G4EmParameters::SetPIXEElectronCrossSectionModel(const G4String& sss)
1170 {                                                695 {
1171   if(IsLocked()) { return; }                  << 696   G4AutoLock l(&EmParametersMutex);
1172   fCParameters->SetPIXEElectronCrossSectionMo << 697   nameElectronPIXE = sss;
1173 }                                                698 }
1174                                                  699 
1175 const G4String& G4EmParameters::PIXEElectronC    700 const G4String& G4EmParameters::PIXEElectronCrossSectionModel()
1176 {                                                701 {
1177   return fCParameters->PIXEElectronCrossSecti << 702   return nameElectronPIXE;
1178 }                                             << 
1179                                               << 
1180 void G4EmParameters::SetLivermoreDataDir(cons << 
1181 {                                             << 
1182   if(IsLocked()) { return; }                  << 
1183   fCParameters->SetLivermoreDataDir(sss);     << 
1184 }                                             << 
1185                                               << 
1186 const G4String& G4EmParameters::LivermoreData << 
1187 {                                             << 
1188   return fCParameters->LivermoreDataDir();    << 
1189 }                                                703 }
1190                                                  704 
1191 void G4EmParameters::PrintWarning(G4Exception << 705 void G4EmParameters::PrintWarning(G4ExceptionDescription& ed)
1192 {                                                706 {
1193   G4Exception("G4EmParameters", "em0044", Jus    707   G4Exception("G4EmParameters", "em0044", JustWarning, ed);
1194 }                                                708 }
1195                                                  709 
1196 void G4EmParameters::AddPAIModel(const G4Stri    710 void G4EmParameters::AddPAIModel(const G4String& particle,
1197                                  const G4Stri    711                                  const G4String& region,
1198                                  const G4Stri    712                                  const G4String& type)
1199 {                                                713 {
1200   if(IsLocked()) { return; }                  << 714   G4String r = region;
1201   fBParameters->AddPAIModel(particle, region, << 715   if(r == "" || r == "world" || r == "World") r = "DefaultRegionForTheWorld";
                                                   >> 716   G4int nreg =  m_regnamesPAI.size();
                                                   >> 717   for(G4int i=0; i<nreg; ++i) {
                                                   >> 718     if((m_particlesPAI[i] == particle || 
                                                   >> 719         m_particlesPAI[i] == "all" || 
                                                   >> 720         particle == "all") && 
                                                   >> 721        (m_regnamesPAI[i] == r || 
                                                   >> 722         m_regnamesPAI[i] == "DefaultRegionForTheWorld" || 
                                                   >> 723         r == "DefaultRegionForTheWorld") ) {
                                                   >> 724 
                                                   >> 725       m_typesPAI[i] = type;
                                                   >> 726       if(particle == "all") m_particlesPAI[i] = particle;
                                                   >> 727       if(r == "DefaultRegionForTheWorld") { m_regnamesPAI[i] = r; }
                                                   >> 728       return;
                                                   >> 729     }
                                                   >> 730   }
                                                   >> 731   m_particlesPAI.push_back(particle);
                                                   >> 732   m_regnamesPAI.push_back(r);
                                                   >> 733   m_typesPAI.push_back(type);
1202 }                                                734 }
1203                                                  735 
1204 const std::vector<G4String>& G4EmParameters::    736 const std::vector<G4String>& G4EmParameters::ParticlesPAI() const
1205 {                                                737 {
1206   return fBParameters->ParticlesPAI();        << 738   return m_particlesPAI;
1207 }                                                739 }
1208                                                  740 
1209 const std::vector<G4String>& G4EmParameters::    741 const std::vector<G4String>& G4EmParameters::RegionsPAI() const
1210 {                                                742 {
1211   return fBParameters->RegionsPAI();          << 743   return m_regnamesPAI;
1212 }                                                744 }
1213                                                  745 
1214 const std::vector<G4String>& G4EmParameters::    746 const std::vector<G4String>& G4EmParameters::TypesPAI() const
1215 {                                                747 {
1216   return fBParameters->TypesPAI();            << 748   return m_typesPAI;
1217 }                                                749 }
1218                                                  750 
1219 void G4EmParameters::AddMicroElec(const G4Str    751 void G4EmParameters::AddMicroElec(const G4String& region)
1220 {                                                752 {
1221   if(IsLocked()) { return; }                  << 753   G4String r = region;
1222   fCParameters->AddMicroElec(region);         << 754   if(r == "" || r == "world" || r == "World") r = "DefaultRegionForTheWorld";
                                                   >> 755   G4int nreg =  m_regnamesME.size();
                                                   >> 756   for(G4int i=0; i<nreg; ++i) {
                                                   >> 757     if(r == m_regnamesME[i]) { return; }
                                                   >> 758   }
                                                   >> 759   m_regnamesME.push_back(r);
1223 }                                                760 }
1224                                                  761 
1225 const std::vector<G4String>& G4EmParameters::    762 const std::vector<G4String>& G4EmParameters::RegionsMicroElec() const
1226 {                                                763 {
1227   return fCParameters->RegionsMicroElec();    << 764   return m_regnamesME;
1228 }                                                765 }
1229                                                  766 
1230 void G4EmParameters::AddDNA(const G4String& r    767 void G4EmParameters::AddDNA(const G4String& region, const G4String& type)
1231 {                                                768 {
1232   if(IsLocked()) { return; }                  << 769   G4String r = region;
1233   fCParameters->AddDNA(region, type);         << 770   if(r == "" || r == "world" || r == "World") r = "DefaultRegionForTheWorld";
1234   ActivateDNA();                              << 771   G4int nreg =  m_regnamesDNA.size();
                                                   >> 772   for(G4int i=0; i<nreg; ++i) {
                                                   >> 773     if(r == m_regnamesDNA[i]) { return; }
                                                   >> 774   }
                                                   >> 775   m_regnamesDNA.push_back(r);
                                                   >> 776   m_typesDNA.push_back(type);
1235 }                                                777 }
1236                                                  778 
1237 const std::vector<G4String>& G4EmParameters::    779 const std::vector<G4String>& G4EmParameters::RegionsDNA() const
1238 {                                                780 {
1239   return fCParameters->RegionsDNA();          << 781   return m_regnamesDNA;
1240 }                                                782 }
1241                                                  783 
1242 const std::vector<G4String>& G4EmParameters::    784 const std::vector<G4String>& G4EmParameters::TypesDNA() const
1243 {                                                785 {
1244   return fCParameters->TypesDNA();            << 786   return m_typesDNA;
1245 }                                             << 
1246                                               << 
1247 void G4EmParameters::AddPhysics(const G4Strin << 
1248 {                                             << 
1249   if(IsLocked()) { return; }                  << 
1250   fBParameters->AddPhysics(region, type);     << 
1251 }                                             << 
1252                                               << 
1253 const std::vector<G4String>& G4EmParameters:: << 
1254 {                                             << 
1255   return fBParameters->RegionsPhysics();      << 
1256 }                                             << 
1257                                               << 
1258 const std::vector<G4String>& G4EmParameters:: << 
1259 {                                             << 
1260   return fBParameters->TypesPhysics();        << 
1261 }                                             << 
1262                                               << 
1263 void G4EmParameters::SetSubCutRegion(const G4 << 
1264 {                                             << 
1265   if(IsLocked()) { return; }                  << 
1266   fBParameters->SetSubCutRegion(region);      << 
1267 }                                                787 }
1268                                                  788 
1269 void                                          << 789 std::ostream& G4EmParameters::StreamInfo(std::ostream& os) const
1270 G4EmParameters::SetDeexActiveRegion(const G4S << 
1271                                     G4bool aa << 
1272 {                                                790 {
1273   if(IsLocked()) { return; }                  << 791   G4int prec = os.precision(5);
1274   fCParameters->SetDeexActiveRegion(region, a << 
1275 }                                             << 
1276                                               << 
1277 void                                          << 
1278 G4EmParameters::SetProcessBiasingFactor(const << 
1279                                         G4dou << 
1280 {                                             << 
1281   if(IsLocked()) { return; }                  << 
1282   fBParameters->SetProcessBiasingFactor(procn << 
1283 }                                             << 
1284                                               << 
1285 void                                          << 
1286 G4EmParameters::ActivateForcedInteraction(con << 
1287                                           con << 
1288                                           G4d << 
1289                                           G4b << 
1290 {                                             << 
1291   if(IsLocked() && !gener) { return; }        << 
1292   fBParameters->ActivateForcedInteraction(pro << 
1293 }                                             << 
1294                                               << 
1295 void                                          << 
1296 G4EmParameters::ActivateSecondaryBiasing(cons << 
1297                                          cons << 
1298                                          G4do << 
1299                                          G4do << 
1300 {                                             << 
1301   if(IsLocked()) { return; }                  << 
1302   fBParameters->ActivateSecondaryBiasing(proc << 
1303 }                                             << 
1304                                               << 
1305 void G4EmParameters::DefineRegParamForLoss(G4 << 
1306 {                                             << 
1307   fBParameters->DefineRegParamForLoss(ptr);   << 
1308 }                                             << 
1309                                               << 
1310 void G4EmParameters::DefineRegParamForEM(G4VE << 
1311 {                                             << 
1312   fBParameters->DefineRegParamForEM(ptr);     << 
1313 }                                             << 
1314                                               << 
1315 G4bool G4EmParameters::QuantumEntanglement()  << 
1316 {                                             << 
1317   return fBParameters->QuantumEntanglement(); << 
1318 }                                             << 
1319                                               << 
1320 void G4EmParameters::SetQuantumEntanglement(G << 
1321 {                                             << 
1322   if(IsLocked()) { return; }                  << 
1323   fBParameters->SetQuantumEntanglement(v);    << 
1324 }                                             << 
1325                                               << 
1326 G4bool G4EmParameters::GetDirectionalSplittin << 
1327   return fBParameters->GetDirectionalSplittin << 
1328 }                                             << 
1329                                               << 
1330 void G4EmParameters::SetDirectionalSplitting( << 
1331 {                                             << 
1332   if(IsLocked()) { return; }                  << 
1333   fBParameters->SetDirectionalSplitting(v);   << 
1334 }                                             << 
1335                                               << 
1336 void G4EmParameters::SetDirectionalSplittingT << 
1337 {                                             << 
1338   if(IsLocked()) { return; }                  << 
1339   fBParameters->SetDirectionalSplittingTarget << 
1340 }                                             << 
1341                                               << 
1342 G4ThreeVector G4EmParameters::GetDirectionalS << 
1343 {                                             << 
1344   return fBParameters->GetDirectionalSplittin << 
1345 }                                             << 
1346                                               << 
1347 void G4EmParameters::SetDirectionalSplittingR << 
1348 {                                             << 
1349   if(IsLocked()) { return; }                  << 
1350   fBParameters->SetDirectionalSplittingRadius << 
1351 }                                             << 
1352                                               << 
1353 G4double G4EmParameters::GetDirectionalSplitt << 
1354 {                                             << 
1355   return fBParameters->GetDirectionalSplittin << 
1356 }                                             << 
1357                                               << 
1358 void G4EmParameters::DefineRegParamForDeex(G4 << 
1359 {                                             << 
1360   fCParameters->DefineRegParamForDeex(ptr);   << 
1361 }                                             << 
1362                                               << 
1363 const G4String& G4EmParameters::GetDirLEDATA( << 
1364 {                                             << 
1365   return fDirLEDATA;                          << 
1366 }                                             << 
1367                                               << 
1368 void G4EmParameters::StreamInfo(std::ostream& << 
1369 {                                             << 
1370   G4long prec = os.precision(5);              << 
1371   os << "====================================    792   os << "=======================================================================" << "\n";
1372   os << "======                 Electromagnet    793   os << "======                 Electromagnetic Physics Parameters      ========" << "\n";
1373   os << "====================================    794   os << "=======================================================================" << "\n";
                                                   >> 795   os << "Fluctuations of dE/dx are enabled                  " <<lossFluctuation << "\n";
                                                   >> 796   os << "Build CSDA range enabled                           " <<buildCSDARange << "\n";
1374   os << "LPM effect enabled                      797   os << "LPM effect enabled                                 " <<flagLPM << "\n";
1375   os << "Enable creation and use of sampling  << 798   os << "Spline of EM tables enabled                        " <<spline << "\n";
                                                   >> 799   os << "Use cut as a final range enabled                   " <<finalRange << "\n";
1376   os << "Apply cuts on all EM processes          800   os << "Apply cuts on all EM processes                     " <<applyCuts << "\n";
1377   const char* transportationWithMsc = "Disabl << 801   os << "Fluorescence enabled                               " <<fluo << "\n";
1378   if(fTransportationWithMsc == G4Transportati << 802   os << "Fluorescence Bearden data files enabled            " <<beardenFluoDir << "\n";
1379     transportationWithMsc = "Enabled";        << 803   os << "Auger electron production enabled                  " <<auger << "\n";
1380   } else if (fTransportationWithMsc == G4Tran << 804   os << "Auger cascade enabled                              " <<augerCascade << "\n";
1381     transportationWithMsc = "MultipleSteps";  << 805   os << "PIXE atomic de-excitation enabled                  " <<pixe << "\n";
1382   }                                           << 806   os << "De-excitation module ignores cuts                  " <<deexIgnoreCut << "\n";
1383   os << "Use combined TransportationWithMsc   << 807   os << "Msc lateraral displacement for e+- enabled         " <<lateralDisplacement << "\n";
1384   os << "Use general process                  << 808   os << "Msc lateraral displacement for muons and hadrons   " <<muhadLateralDisplacement << "\n";
1385   os << "Enable linear polarisation for gamma << 809   os << "Msc lateraral displacement beyond geometry safety  " <<latDisplacementBeyondSafety << "\n";
1386   os << "Enable photoeffect sampling below K- << 810   os << "Enable angular generator interface                 " 
1387   os << "Enable sampling of quantum entanglem << 811      <<useAngGeneratorForIonisation << "\n";
1388      <<fBParameters->QuantumEntanglement()  < << 812   os << "Use Mott correction for e- scattering              " 
1389   os << "X-section factor for integral approa << 813      <<useMottCorrection << "\n";
                                                   >> 814 
                                                   >> 815   os << "Factor of cut reduction for sub-cutoff method      " <<minSubRange << "\n";
1390   os << "Min kinetic energy for tables           816   os << "Min kinetic energy for tables                      " 
1391      <<G4BestUnit(minKinEnergy,"Energy") << "    817      <<G4BestUnit(minKinEnergy,"Energy") << "\n";
1392   os << "Max kinetic energy for tables           818   os << "Max kinetic energy for tables                      " 
1393      <<G4BestUnit(maxKinEnergy,"Energy") << "    819      <<G4BestUnit(maxKinEnergy,"Energy") << "\n";
1394   os << "Number of bins per decade of a table << 820   os << "Max kinetic energy for CSDA tables                 " 
1395   os << "Verbose level                        << 821      <<G4BestUnit(maxKinEnergyCSDA,"Energy") << "\n";
1396   os << "Verbose level for worker thread      << 
1397   os << "Bremsstrahlung energy threshold abov << 
1398      << "  primary e+- is added to the list o << 
1399      <<G4BestUnit(bremsTh,"Energy") << "\n";  << 
1400   os << "Bremsstrahlung energy threshold abov << 
1401      << "  muon/hadron is added to the list o << 
1402      <<G4BestUnit(bremsMuHadTh,"Energy") << " << 
1403   G4String name3g = "SimplePositronium";      << 
1404   if (fPositronium == fAllisonPositronium) {  << 
1405   else if (fPositronium == fOrePowell) { name << 
1406   else if (fPositronium == fOrePowellPolar) { << 
1407   os << "Positron annihilation at rest model  << 
1408                                               << 
1409   os << "Enable 3 gamma annihilation on fly   << 
1410      << f3GammaAnnihilationOnFly << "\n";     << 
1411   os << "Lowest triplet kinetic energy        << 
1412      <<G4BestUnit(lowestTripletEnergy,"Energy << 
1413   os << "Enable sampling of gamma linear pola << 
1414   os << "5D gamma conversion model type       << 
1415   os << "5D gamma conversion model on isolate << 
1416   if(max5DEnergyForMuPair>0.0) {              << 
1417   os << "5D gamma conversion limit for muon p << 
1418      << max5DEnergyForMuPair/CLHEP::GeV << "  << 
1419   }                                           << 
1420   os << "Use Ricardo-Gerardo pair production  << 
1421      << fUseRiGePairProductionModel << "\n";  << 
1422   os << "Livermore data directory             << 
1423      << fCParameters->LivermoreDataDir() << " << 
1424                                               << 
1425   os << "==================================== << 
1426   os << "======                 Ionisation Pa << 
1427   os << "==================================== << 
1428   os << "Step function for e+-                << 
1429      <<"("<<fBParameters->GetStepFunctionP1() << 
1430      << fBParameters->GetStepFunctionP2()/CLH << 
1431   os << "Step function for muons/hadrons      << 
1432      <<"("<<fBParameters->GetStepFunctionMuHa << 
1433      << fBParameters->GetStepFunctionMuHadP2( << 
1434   os << "Step function for light ions         << 
1435      <<"("<<fBParameters->GetStepFunctionLigh << 
1436      << fBParameters->GetStepFunctionLightIon << 
1437   os << "Step function for general ions       << 
1438      <<"("<<fBParameters->GetStepFunctionIons << 
1439      << fBParameters->GetStepFunctionIonsP2() << 
1440   os << "Lowest e+e- kinetic energy              822   os << "Lowest e+e- kinetic energy                         " 
1441      <<G4BestUnit(lowestElectronEnergy,"Energ    823      <<G4BestUnit(lowestElectronEnergy,"Energy") << "\n";
1442   os << "Lowest muon/hadron kinetic energy       824   os << "Lowest muon/hadron kinetic energy                  " 
1443      <<G4BestUnit(lowestMuHadEnergy,"Energy")    825      <<G4BestUnit(lowestMuHadEnergy,"Energy") << "\n";
1444   os << "Use ICRU90 data                      << 826   os << "Linear loss limit " <<linLossLimit << "\n";
1445   os << "Fluctuations of dE/dx are enabled    << 827   os << "Bremsstrahlung energy threshold above which \n" 
1446   G4String namef = "Universal";               << 828      << "  primary is added to the list of secondary        " 
1447   if(fFluct == fUrbanFluctuation) { namef = " << 829      <<G4BestUnit(bremsTh,"Energy") << "\n";
1448   else if(fFluct == fDummyFluctuation) { name << 830   os << "X-section factor for integral approach             " <<lambdaFactor << "\n";
1449   os << "Type of fluctuation model for lepton << 
1450   os << "Use built-in Birks satuaration       << 
1451   os << "Build CSDA range enabled             << 
1452   os << "Use cut as a final range enabled     << 
1453   os << "Enable angular generator interface   << 
1454      <<useAngGeneratorForIonisation << "\n";  << 
1455   os << "Max kinetic energy for CSDA tables   << 
1456      <<G4BestUnit(maxKinEnergyCSDA,"Energy")  << 
1457   os << "Max kinetic energy for NIEL computat << 
1458      <<G4BestUnit(maxNIELEnergy,"Energy") <<  << 
1459   os << "Linear loss limit                    << 
1460   os << "Read data from file for e+e- pair pr << 
1461                                               << 
1462   os << "==================================== << 
1463   os << "======                 Multiple Scat << 
1464   os << "==================================== << 
1465   os << "Type of msc step limit algorithm for << 
1466   os << "Type of msc step limit algorithm for << 
1467   os << "Msc lateral displacement for e+- ena << 
1468   os << "Msc lateral displacement for muons a << 
1469   os << "Urban msc model lateral displacement << 
1470   os << "Range factor for msc step limit for  << 
1471   os << "Range factor for msc step limit for  << 
1472   os << "Geometry factor for msc step limitat << 
1473   os << "Safety factor for msc step limit for << 
1474   os << "Skin parameter for msc step limitati << 
1475   os << "Lambda limit for msc step limit for  << 
1476   os << "Use Mott correction for e- scatterin << 
1477   os << "Factor used for dynamic computation     831   os << "Factor used for dynamic computation of angular \n" 
1478      << "  limit between single and multiple     832      << "  limit between single and multiple scattering     " << factorForAngleLimit << "\n";
1479   os << "Fixed angular limit between single \    833   os << "Fixed angular limit between single \n"
1480      << "  and multiple scattering               834      << "  and multiple scattering                          " 
1481      << thetaLimit/CLHEP::rad << " rad\n";    << 835      <<thetaLimit/rad << " rad" << "\n";
1482   os << "Upper energy limit for e+- multiple  << 836   os << "Range factor for msc step limit for e+-            " <<rangeFactor << "\n";
1483      << energyLimit/CLHEP::MeV << " MeV\n";   << 837   os << "Range factor for msc step limit for muons/hadrons  " <<rangeFactorMuHad << "\n";
1484   os << "Type of electron single scattering m << 838   os << "Geometry factor for msc step limitation of e+-     " <<geomFactor << "\n";
1485   os << "Type of nuclear form-factor          << 839   os << "Skin parameter for msc step limitation of e+-      " <<skin << "\n";
1486   os << "Screening factor                     << 
1487   os << "==================================== << 
1488                                                  840 
1489   if(fCParameters->Fluo()) {                  << 841   os << "Number of bins in tables                           " <<nbins   << "\n";
1490   os << "======                 Atomic Deexci << 842   os << "Number of bins per decade of a table               " <<nbinsPerDecade << "\n";
1491   os << "==================================== << 843   os << "Verbose level                                      " <<verbose << "\n";
1492   os << "Fluorescence enabled                 << 844   os << "Verbose level for worker thread                    " <<workerVerbose << "\n";
1493   G4String named = "fluor";                   << 845 
1494   G4EmFluoDirectory fdir = FluoDirectory();   << 846   os << "Type of msc step limit algorithm for e+-           " <<mscStepLimit << "\n";
1495   if(fdir == fluoBearden) { named = "fluor_Be << 847   os << "Type of msc step limit algorithm for muons/hadrons " <<mscStepLimitMuHad << "\n";
1496   else if(fdir == fluoANSTO) { named = "fluor << 848 
1497   else if(fdir == fluoXDB_EADL) { named = "fl << 849   os << "Type of PIXE cross section for hadrons             " <<namePIXE << "\n";
1498   os << "Directory in G4LEDATA for fluorescen << 850   os << "Type of PIXE cross section for e+-                 " <<nameElectronPIXE << "\n";
1499   os << "Auger electron cascade enabled       << 
1500      <<fCParameters->Auger() << "\n";         << 
1501   os << "PIXE atomic de-excitation enabled    << 
1502   os << "De-excitation module ignores cuts    << 
1503      <<fCParameters->DeexcitationIgnoreCut()  << 
1504   os << "Type of PIXE cross section for hadro << 
1505      <<fCParameters->PIXECrossSectionModel()  << 
1506   os << "Type of PIXE cross section for e+-   << 
1507      <<fCParameters->PIXEElectronCrossSection << 
1508   os << "==================================== << 
1509   }                                           << 
1510   if(fDNA) {                                  << 
1511   os << "======                 DNA Physics P << 
1512   os << "====================================    851   os << "=======================================================================" << "\n";
1513   os << "Use fast sampling in DNA models      << 
1514      << fCParameters->DNAFast() << "\n";      << 
1515   os << "Use Stationary option in DNA models  << 
1516      << fCParameters->DNAStationary() << "\n" << 
1517   os << "Use DNA with multiple scattering of  << 
1518      << fCParameters->DNAElectronMsc() << "\n << 
1519   os << "Use DNA e- solvation model type      << 
1520      << fCParameters->DNAeSolvationSubType()  << 
1521   auto chemModel = fCParameters->GetChemTimeS << 
1522   if(fCParameters->GetChemTimeStepModel() !=  << 
1523   {                                           << 
1524     std::vector<G4String> ChemModel{"Unknown" << 
1525     os << "Use DNA Chemistry model            << 
1526        << ChemModel.at((std::size_t)chemModel << 
1527   }                                           << 
1528   os << "==================================== << 
1529   }                                           << 
1530   os.precision(prec);                            852   os.precision(prec);
                                                   >> 853   return os;
1531 }                                                854 }
1532                                                  855 
1533 void G4EmParameters::Dump()                   << 856 void G4EmParameters::Dump() const
1534 {                                                857 {
1535   if(fIsPrinted) return;                      << 
1536                                               << 
1537 #ifdef G4MULTITHREADED                        << 
1538   G4MUTEXLOCK(&emParametersMutex);            << 
1539 #endif                                        << 
1540   StreamInfo(G4cout);                            858   StreamInfo(G4cout);
1541 #ifdef G4MULTITHREADED                        << 
1542   G4MUTEXUNLOCK(&emParametersMutex);          << 
1543 #endif                                        << 
1544 }                                                859 }
1545                                                  860 
1546 std::ostream& operator<< (std::ostream& os, c    861 std::ostream& operator<< (std::ostream& os, const G4EmParameters& par)
1547 {                                                862 {
1548   par.StreamInfo(os);                         << 863   return par.StreamInfo(os);
1549   return os;                                  << 
1550 }                                                864 }
1551                                                  865 
1552 G4bool G4EmParameters::IsLocked() const       << 
1553 {                                             << 
1554   return (!G4Threading::IsMasterThread() ||   << 
1555     (fStateManager->GetCurrentState() != G4St << 
1556            fStateManager->GetCurrentState() ! << 
1557      fStateManager->GetCurrentState() != G4St << 
1558 }                                             << 
1559                                               << 
1560                                               << 
1561 void G4EmParameters::SetTimeStepModel(const G << 
1562 {                                             << 
1563   fCParameters-> SetChemTimeStepModel(model); << 
1564 }                                             << 
1565                                               << 
1566 G4ChemTimeStepModel G4EmParameters::GetTimeSt << 
1567 {                                             << 
1568   return fCParameters->GetChemTimeStepModel() << 
1569 }                                             << 
1570 //....oooOO0OOooo........oooOO0OOooo........o    866 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
                                                   >> 867 
1571                                                  868