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


  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 // -------------------------------------------     26 // -------------------------------------------------------------------
 27 //                                                 27 //
 28 // GEANT4 Class file                               28 // GEANT4 Class file
 29 //                                                 29 //
 30 //                                                 30 //
 31 // File name:     G4EmLowEParameters               31 // File name:     G4EmLowEParameters
 32 //                                                 32 //
 33 // Author:        Vladimir Ivanchenko              33 // Author:        Vladimir Ivanchenko
 34 //                                                 34 //
 35 // Creation date: 07.05.2019                       35 // Creation date: 07.05.2019
 36 //                                                 36 //
 37 // -------------------------------------------     37 // -------------------------------------------------------------------
 38 //                                                 38 //
 39 //....oooOO0OOooo........oooOO0OOooo........oo     39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 40 //....oooOO0OOooo........oooOO0OOooo........oo     40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 41                                                    41 
 42 #include "G4EmLowEParameters.hh"                   42 #include "G4EmLowEParameters.hh"
 43 #include "G4PhysicalConstants.hh"                  43 #include "G4PhysicalConstants.hh"
 44 #include "G4UnitsTable.hh"                         44 #include "G4UnitsTable.hh"
 45 #include "G4SystemOfUnits.hh"                      45 #include "G4SystemOfUnits.hh"
 46 #include "G4VAtomDeexcitation.hh"                  46 #include "G4VAtomDeexcitation.hh"
 47 #include "G4EmLowEParametersMessenger.hh"          47 #include "G4EmLowEParametersMessenger.hh"
 48 #include "G4RegionStore.hh"                        48 #include "G4RegionStore.hh"
 49 #include "G4Region.hh"                             49 #include "G4Region.hh"
 50                                                    50 
 51 //....oooOO0OOooo........oooOO0OOooo........oo     51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 52                                                    52 
 53 G4EmLowEParameters::G4EmLowEParameters()           53 G4EmLowEParameters::G4EmLowEParameters()
 54 {                                                  54 {
 55   theMessenger = new G4EmLowEParametersMesseng     55   theMessenger = new G4EmLowEParametersMessenger(this);
 56   Initialise();                                    56   Initialise();
 57 }                                                  57 }
 58                                                    58 
 59 //....oooOO0OOooo........oooOO0OOooo........oo     59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 60                                                    60 
 61 G4EmLowEParameters::~G4EmLowEParameters()          61 G4EmLowEParameters::~G4EmLowEParameters()
 62 {                                                  62 {
 63   delete theMessenger;                             63   delete theMessenger;
 64 }                                                  64 }
 65                                                    65 
 66 //....oooOO0OOooo........oooOO0OOooo........oo     66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 67                                                    67 
 68 void G4EmLowEParameters::Initialise()              68 void G4EmLowEParameters::Initialise()
 69 {                                                  69 {
 70   fluo = false;                                    70   fluo = false;
                                                   >>  71   beardenFluoDir = false;
 71   auger = false;                                   72   auger = false;
 72   pixe = false;                                    73   pixe = false;
 73   deexIgnoreCut = false;                           74   deexIgnoreCut = false;
 74                                                    75 
 75   dnaFast = false;                                 76   dnaFast = false;
 76   dnaStationary = false;                           77   dnaStationary = false;
 77   dnaMsc = false;                                  78   dnaMsc = false;
 78   dnaElectronSolvation = fMeesungnoen2002eSolv     79   dnaElectronSolvation = fMeesungnoen2002eSolvation;
 79   fTimeStepModel = G4ChemTimeStepModel::Unknow << 
 80                                                    80 
 81   fFluoDirectory = fluoDefault;                << 
 82   namePIXE = "Empirical";                          81   namePIXE = "Empirical";
 83   nameElectronPIXE = "Livermore";                  82   nameElectronPIXE = "Livermore";
 84   livDataDir = "epics_2017";                   << 
 85 }                                                  83 }
 86                                                    84 
 87 //....oooOO0OOooo........oooOO0OOooo........oo     85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 88                                                    86 
 89 void G4EmLowEParameters::SetFluo(G4bool val)       87 void G4EmLowEParameters::SetFluo(G4bool val)
 90 {                                                  88 {
 91   fluo = val;                                      89   fluo = val;
 92 }                                                  90 }
 93                                                    91 
 94 G4bool G4EmLowEParameters::Fluo() const            92 G4bool G4EmLowEParameters::Fluo() const
 95 {                                                  93 {
 96   return fluo;                                     94   return fluo;
 97 }                                                  95 }
 98                                                    96 
 99 G4EmFluoDirectory G4EmLowEParameters::FluoDire << 
100 {                                              << 
101   return fFluoDirectory;                       << 
102 }                                              << 
103                                                << 
104 void G4EmLowEParameters::SetFluoDirectory(G4Em << 
105 {                                              << 
106   fFluoDirectory = fluoDefault;                << 
107   if(fluoBearden == val) { fFluoDirectory = fl << 
108   else if(fluoANSTO == val) { fFluoDirectory = << 
109   else if(fluoXDB_EADL == val) { fFluoDirector << 
110 }                                              << 
111                                                << 
112 void G4EmLowEParameters::SetBeardenFluoDir(G4b     97 void G4EmLowEParameters::SetBeardenFluoDir(G4bool val)
113 {                                                  98 {
114   fFluoDirectory = val ? fluoBearden : fluoDef <<  99   beardenFluoDir = val;
115 }                                                 100 }
116                                                   101 
117 void G4EmLowEParameters::SetANSTOFluoDir(G4boo << 102 G4bool G4EmLowEParameters::BeardenFluoDir() const
118 {                                                 103 {
119   fFluoDirectory = val ? fluoANSTO : fluoDefau << 104   return beardenFluoDir;
120 }                                              << 
121                                                << 
122 void G4EmLowEParameters::SetXDB_EADLFluoDir(G4 << 
123 {                                              << 
124   fFluoDirectory = val ? fluoXDB_EADL : fluoDe << 
125 }                                                 105 }
126                                                   106 
127 void G4EmLowEParameters::SetAuger(G4bool val)     107 void G4EmLowEParameters::SetAuger(G4bool val)
128 {                                                 108 {
129   auger = val;                                    109   auger = val;
130   if(val) { fluo = true; }                        110   if(val) { fluo = true; }
131 }                                                 111 }
132                                                   112 
133 G4bool G4EmLowEParameters::Auger() const          113 G4bool G4EmLowEParameters::Auger() const
134 {                                                 114 {
135   return auger;                                   115   return auger;
136 }                                                 116 }
137                                                   117 
138 void G4EmLowEParameters::SetPixe(G4bool val)      118 void G4EmLowEParameters::SetPixe(G4bool val)
139 {                                                 119 {
140   pixe = val;                                     120   pixe = val;
141   if(val) { fluo = true; }                        121   if(val) { fluo = true; }
142 }                                                 122 }
143                                                   123 
144 G4bool G4EmLowEParameters::Pixe() const           124 G4bool G4EmLowEParameters::Pixe() const
145 {                                                 125 {
146   return pixe;                                    126   return pixe;
147 }                                                 127 }
148                                                   128 
149 void G4EmLowEParameters::SetDeexcitationIgnore    129 void G4EmLowEParameters::SetDeexcitationIgnoreCut(G4bool val)
150 {                                                 130 {
151   deexIgnoreCut = val;                            131   deexIgnoreCut = val;
152 }                                                 132 }
153                                                   133 
154 G4bool G4EmLowEParameters::DeexcitationIgnoreC    134 G4bool G4EmLowEParameters::DeexcitationIgnoreCut() const
155 {                                                 135 {
156   return deexIgnoreCut;                           136   return deexIgnoreCut;
157 }                                                 137 }
158                                                   138 
159 void G4EmLowEParameters::SetDNAFast(G4bool val    139 void G4EmLowEParameters::SetDNAFast(G4bool val)
160 {                                                 140 {
161   dnaFast = val;                                  141   dnaFast = val;
162 }                                                 142 }
163                                                   143 
164 G4bool G4EmLowEParameters::DNAFast() const        144 G4bool G4EmLowEParameters::DNAFast() const
165 {                                                 145 {
166   return dnaFast;                                 146   return dnaFast;
167 }                                                 147 }
168                                                   148 
169 void G4EmLowEParameters::SetDNAStationary(G4bo    149 void G4EmLowEParameters::SetDNAStationary(G4bool val)
170 {                                                 150 {
171   dnaStationary = val;                            151   dnaStationary = val;
172 }                                                 152 }
173                                                   153 
174 G4bool G4EmLowEParameters::DNAStationary() con    154 G4bool G4EmLowEParameters::DNAStationary() const
175 {                                                 155 {
176   return dnaStationary;                           156   return dnaStationary;
177 }                                                 157 }
178                                                   158 
179 void G4EmLowEParameters::SetDNAElectronMsc(G4b    159 void G4EmLowEParameters::SetDNAElectronMsc(G4bool val)
180 {                                                 160 {
181   dnaMsc = val;                                   161   dnaMsc = val;
182 }                                                 162 }
183                                                   163 
184 G4bool G4EmLowEParameters::DNAElectronMsc() co    164 G4bool G4EmLowEParameters::DNAElectronMsc() const
185 {                                                 165 {
186   return dnaMsc;                                  166   return dnaMsc;
187 }                                                 167 }
188                                                   168 
189 void G4EmLowEParameters::SetDNAeSolvationSubTy    169 void G4EmLowEParameters::SetDNAeSolvationSubType(G4DNAModelSubType val)
190 {                                                 170 {
191   dnaElectronSolvation = val;                     171   dnaElectronSolvation = val;
192 }                                                 172 }
193                                                   173 
194 G4DNAModelSubType G4EmLowEParameters::DNAeSolv    174 G4DNAModelSubType G4EmLowEParameters::DNAeSolvationSubType() const
195 {                                                 175 {
196   return dnaElectronSolvation;                    176   return dnaElectronSolvation;
197 }                                                 177 }
198                                                   178 
199 void G4EmLowEParameters::SetChemTimeStepModel( << 
200 {                                              << 
201   fTimeStepModel = val;                        << 
202 }                                              << 
203                                                << 
204 G4ChemTimeStepModel G4EmLowEParameters::GetChe << 
205 {                                              << 
206   return fTimeStepModel;                       << 
207 }                                              << 
208                                                << 
209 void G4EmLowEParameters::SetPIXECrossSectionMo    179 void G4EmLowEParameters::SetPIXECrossSectionModel(const G4String& sss)
210 {                                                 180 {
211   namePIXE = sss;                                 181   namePIXE = sss;
212 }                                                 182 }
213                                                   183 
214 const G4String& G4EmLowEParameters::PIXECrossS    184 const G4String& G4EmLowEParameters::PIXECrossSectionModel()
215 {                                                 185 {
216   return namePIXE;                                186   return namePIXE;
217 }                                                 187 }
218                                                   188 
219 void G4EmLowEParameters::SetPIXEElectronCrossS    189 void G4EmLowEParameters::SetPIXEElectronCrossSectionModel(const G4String& sss)
220 {                                                 190 {
221   nameElectronPIXE = sss;                         191   nameElectronPIXE = sss;
222 }                                                 192 }
223                                                   193 
224 const G4String& G4EmLowEParameters::PIXEElectr    194 const G4String& G4EmLowEParameters::PIXEElectronCrossSectionModel()
225 {                                                 195 {
226   return nameElectronPIXE;                        196   return nameElectronPIXE;
227 }                                                 197 }
228                                                   198 
229 void G4EmLowEParameters::SetLivermoreDataDir(c << 
230 {                                              << 
231   livDataDir = sss;                            << 
232 }                                              << 
233                                                << 
234 const G4String& G4EmLowEParameters::LivermoreD << 
235 {                                              << 
236   return livDataDir;                           << 
237 }                                              << 
238                                                << 
239 void G4EmLowEParameters::PrintWarning(G4Except    199 void G4EmLowEParameters::PrintWarning(G4ExceptionDescription& ed) const
240 {                                                 200 {
241   G4Exception("G4EmLowEParameters", "em0044",     201   G4Exception("G4EmLowEParameters", "em0044", JustWarning, ed);
242 }                                                 202 }
243                                                   203 
244 G4String G4EmLowEParameters::CheckRegion(const    204 G4String G4EmLowEParameters::CheckRegion(const G4String& reg) const
245 {                                                 205 {
246   G4String r = reg;                               206   G4String r = reg;
247   if(r == "" || r == "world" || r == "World")     207   if(r == "" || r == "world" || r == "World") {
248     r = "DefaultRegionForTheWorld";               208     r = "DefaultRegionForTheWorld";
249   }                                               209   }
250   return r;                                       210   return r;
251 }                                                 211 }
252                                                   212 
253 void G4EmLowEParameters::AddMicroElec(const G4    213 void G4EmLowEParameters::AddMicroElec(const G4String& region)
254 {                                                 214 {
255   G4String r = CheckRegion(region);               215   G4String r = CheckRegion(region);
256   std::size_t nreg =  m_regnamesME.size();     << 216   G4int nreg =  m_regnamesME.size();
257   for(std::size_t i=0; i<nreg; ++i) {          << 217   for(G4int i=0; i<nreg; ++i) {
258     if(r == m_regnamesME[i]) { return; }          218     if(r == m_regnamesME[i]) { return; }
259   }                                               219   }
260   m_regnamesME.push_back(std::move(r));        << 220   m_regnamesME.push_back(r);
261 }                                                 221 }
262                                                   222 
263 const std::vector<G4String>& G4EmLowEParameter    223 const std::vector<G4String>& G4EmLowEParameters::RegionsMicroElec() const
264 {                                                 224 {
265   return m_regnamesME;                            225   return m_regnamesME;
266 }                                                 226 }
267                                                   227 
268 void G4EmLowEParameters::AddDNA(const G4String    228 void G4EmLowEParameters::AddDNA(const G4String& region, const G4String& type)
269 {                                                 229 {
270   G4String r = CheckRegion(region);               230   G4String r = CheckRegion(region);
271   std::size_t nreg =  m_regnamesDNA.size();    << 231   G4int nreg =  m_regnamesDNA.size();
272   for(std::size_t i=0; i<nreg; ++i) {          << 232   for(G4int i=0; i<nreg; ++i) {
273     if(r == m_regnamesDNA[i]) { return; }         233     if(r == m_regnamesDNA[i]) { return; }
274   }                                               234   }
275   m_regnamesDNA.push_back(std::move(r));       << 235   m_regnamesDNA.push_back(r);
276   m_typesDNA.push_back(type);                     236   m_typesDNA.push_back(type);
277 }                                                 237 }
278                                                   238 
279 const std::vector<G4String>& G4EmLowEParameter    239 const std::vector<G4String>& G4EmLowEParameters::RegionsDNA() const
280 {                                                 240 {
281   return m_regnamesDNA;                           241   return m_regnamesDNA;
282 }                                                 242 }
283                                                   243 
284 const std::vector<G4String>& G4EmLowEParameter    244 const std::vector<G4String>& G4EmLowEParameters::TypesDNA() const
285 {                                                 245 {
286   return m_typesDNA;                              246   return m_typesDNA;
287 }                                                 247 }
288                                                   248 
289 void                                              249 void 
290 G4EmLowEParameters::SetDeexActiveRegion(const     250 G4EmLowEParameters::SetDeexActiveRegion(const G4String& region, G4bool fdeex,
291                                         G4bool    251                                         G4bool fauger, G4bool fpixe)
292 {                                                 252 {
293   if(fdeex) { fluo = true; }                      253   if(fdeex) { fluo = true; }
294   G4String r = CheckRegion(region);               254   G4String r = CheckRegion(region);
295   std::size_t nreg =  m_regnamesDeex.size();   << 255   G4int nreg =  m_regnamesDeex.size();
296   if(0 == nreg && r != "DefaultRegionForTheWor    256   if(0 == nreg && r != "DefaultRegionForTheWorld") {
297     m_regnamesDeex.push_back("DefaultRegionFor    257     m_regnamesDeex.push_back("DefaultRegionForTheWorld");
298     m_fluo.push_back(false);                      258     m_fluo.push_back(false);
299     m_auger.push_back(false);                     259     m_auger.push_back(false);
300     m_pixe.push_back(false);                      260     m_pixe.push_back(false);
301     nreg = 1;                                     261     nreg = 1;
302   }                                               262   }
303   for(std::size_t i=0; i<nreg; ++i) {          << 263   for(G4int i=0; i<nreg; ++i) {
304     if(r == m_regnamesDeex[i]) {                  264     if(r == m_regnamesDeex[i]) { 
305       m_fluo[i] = fdeex;                          265       m_fluo[i] = fdeex;
306       m_auger[i]= fauger;                         266       m_auger[i]= fauger;
307       m_pixe[i] = fpixe;                          267       m_pixe[i] = fpixe;
308       return;                                     268       return; 
309     }                                             269     }
310   }                                               270   }
311   m_regnamesDeex.push_back(std::move(r));      << 271   m_regnamesDeex.push_back(r);
312   m_fluo.push_back(fdeex);                        272   m_fluo.push_back(fdeex);
313   m_auger.push_back(fauger);                      273   m_auger.push_back(fauger);
314   m_pixe.push_back(fpixe);                        274   m_pixe.push_back(fpixe);
315 }                                                 275 }
316                                                   276 
317 void G4EmLowEParameters::DefineRegParamForDeex    277 void G4EmLowEParameters::DefineRegParamForDeex(G4VAtomDeexcitation* ptr) const
318 {                                                 278 {
319   std::size_t n = m_regnamesDeex.size();       << 279   G4int n = m_regnamesDeex.size();
320   for(std::size_t i=0; i<n; ++i) {             << 280   for(G4int i=0; i<n; ++i) {
321     ptr->SetDeexcitationActiveRegion(m_regname    281     ptr->SetDeexcitationActiveRegion(m_regnamesDeex[i],
322              m_fluo[i], m_auger[i], m_pixe[i])    282              m_fluo[i], m_auger[i], m_pixe[i]);
323   }                                               283   }
324 }                                                 284 }
325                                                   285 
326 //....oooOO0OOooo........oooOO0OOooo........oo    286 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
327                                                   287