Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/utils/src/G4EmExtraParameters.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/G4EmExtraParameters.cc (Version 11.3.0) and /processes/electromagnetic/utils/src/G4EmExtraParameters.cc (Version 10.6.p1)


  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:     G4EmExtraParameters              31 // File name:     G4EmExtraParameters
 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 "G4EmExtraParameters.hh"                  42 #include "G4EmExtraParameters.hh"
 43 #include "G4ParticleDefinition.hh"             << 
 44 #include "G4PhysicalConstants.hh"                  43 #include "G4PhysicalConstants.hh"
 45 #include "G4UnitsTable.hh"                         44 #include "G4UnitsTable.hh"
 46 #include "G4SystemOfUnits.hh"                      45 #include "G4SystemOfUnits.hh"
 47 #include "G4VEmProcess.hh"                         46 #include "G4VEmProcess.hh"
 48 #include "G4VEnergyLossProcess.hh"                 47 #include "G4VEnergyLossProcess.hh"
 49 #include "G4EmExtraParametersMessenger.hh"         48 #include "G4EmExtraParametersMessenger.hh"
 50 #include "G4RegionStore.hh"                        49 #include "G4RegionStore.hh"
 51 #include "G4Region.hh"                             50 #include "G4Region.hh"
 52                                                    51 
 53 //....oooOO0OOooo........oooOO0OOooo........oo     52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 54                                                    53 
 55 G4EmExtraParameters::G4EmExtraParameters()         54 G4EmExtraParameters::G4EmExtraParameters()
 56 {                                                  55 {
 57   theMessenger = new G4EmExtraParametersMessen     56   theMessenger = new G4EmExtraParametersMessenger(this);
 58   Initialise();                                    57   Initialise();
 59 }                                                  58 }
 60                                                    59 
 61 //....oooOO0OOooo........oooOO0OOooo........oo     60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 62                                                    61 
 63 G4EmExtraParameters::~G4EmExtraParameters()        62 G4EmExtraParameters::~G4EmExtraParameters()
 64 {                                                  63 {
 65   delete theMessenger;                             64   delete theMessenger;
 66 }                                                  65 }
 67                                                    66 
 68 //....oooOO0OOooo........oooOO0OOooo........oo     67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 69                                                    68 
 70 void G4EmExtraParameters::Initialise()             69 void G4EmExtraParameters::Initialise()
 71 {                                                  70 {
 72   quantumEntanglement = false;                     71   quantumEntanglement = false;
 73   directionalSplitting = false;                    72   directionalSplitting = false;
 74   directionalSplittingTarget.set(0.,0.,0.);        73   directionalSplittingTarget.set(0.,0.,0.);
 75   directionalSplittingRadius = 0.;                 74   directionalSplittingRadius = 0.;
 76                                                    75 
 77   dRoverRange = 0.2;                               76   dRoverRange = 0.2;
 78   finalRange = CLHEP::mm;                          77   finalRange = CLHEP::mm;
 79   dRoverRangeMuHad = 0.2;                          78   dRoverRangeMuHad = 0.2;
 80   finalRangeMuHad = 0.1*CLHEP::mm;                 79   finalRangeMuHad = 0.1*CLHEP::mm;
 81   dRoverRangeLIons = 0.2;                      << 
 82   finalRangeLIons = 0.1*CLHEP::mm;             << 
 83   dRoverRangeIons = 0.2;                       << 
 84   finalRangeIons = 0.1*CLHEP::mm;              << 
 85                                                    80 
 86   m_regnamesForced.clear();                        81   m_regnamesForced.clear();
 87   m_procForced.clear();                            82   m_procForced.clear();
 88   m_lengthForced.clear();                          83   m_lengthForced.clear();
 89   m_weightForced.clear();                          84   m_weightForced.clear();
 90   m_regnamesSubCut.clear();                        85   m_regnamesSubCut.clear();
                                                   >>  86   m_subCuts.clear();
 91 }                                                  87 }
 92                                                    88 
 93 //....oooOO0OOooo........oooOO0OOooo........oo     89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
 94                                                    90 
 95                                                    91 
 96 void G4EmExtraParameters::PrintWarning(G4Excep     92 void G4EmExtraParameters::PrintWarning(G4ExceptionDescription& ed) const
 97 {                                                  93 {
 98   G4Exception("G4EmExtraParameters", "em0044",     94   G4Exception("G4EmExtraParameters", "em0044", JustWarning, ed);
 99 }                                                  95 }
100                                                    96 
101 G4String G4EmExtraParameters::CheckRegion(cons     97 G4String G4EmExtraParameters::CheckRegion(const G4String& reg) const
102 {                                                  98 {
103   G4String r = reg;                                99   G4String r = reg;
104   if(r == "" || r == "world" || r == "World")     100   if(r == "" || r == "world" || r == "World") {
105     r = "DefaultRegionForTheWorld";               101     r = "DefaultRegionForTheWorld";
106   }                                               102   }
107   return r;                                       103   return r;
108 }                                                 104 }
109                                                   105 
110 void G4EmExtraParameters::SetStepFunction(G4do    106 void G4EmExtraParameters::SetStepFunction(G4double v1, G4double v2)
111 {                                                 107 {
112   if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {         108   if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
113     dRoverRange = v1;                             109     dRoverRange = v1;
114     finalRange = v2;                              110     finalRange = v2;
115   } else {                                        111   } else {
116     G4ExceptionDescription ed;                    112     G4ExceptionDescription ed;
117     ed << "Values of step function are out of     113     ed << "Values of step function are out of range: " 
118        << v1 << ", " << v2/CLHEP::mm << " mm -    114        << v1 << ", " << v2/CLHEP::mm << " mm - are ignored"; 
119     PrintWarning(ed);                             115     PrintWarning(ed);
120   }                                               116   }
121 }                                                 117 }
122                                                   118 
123 G4double G4EmExtraParameters::GetStepFunctionP    119 G4double G4EmExtraParameters::GetStepFunctionP1() const
124 {                                                 120 {
125   return dRoverRange;                             121   return dRoverRange;
126 }                                                 122 }
127                                                   123 
128 G4double G4EmExtraParameters::GetStepFunctionP    124 G4double G4EmExtraParameters::GetStepFunctionP2() const
129 {                                                 125 {
130   return finalRange;                              126   return finalRange;
131 }                                                 127 }
132                                                   128 
133 void G4EmExtraParameters::SetStepFunctionMuHad    129 void G4EmExtraParameters::SetStepFunctionMuHad(G4double v1, G4double v2)
134 {                                                 130 {
135   if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {         131   if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
136     dRoverRangeMuHad = v1;                        132     dRoverRangeMuHad = v1;
137     finalRangeMuHad = v2;                         133     finalRangeMuHad = v2;
138   } else {                                        134   } else {
139     G4ExceptionDescription ed;                    135     G4ExceptionDescription ed;
140     ed << "Values of step function are out of     136     ed << "Values of step function are out of range: " 
141        << v1 << ", " << v2/CLHEP::mm << " mm -    137        << v1 << ", " << v2/CLHEP::mm << " mm - are ignored"; 
142     PrintWarning(ed);                             138     PrintWarning(ed);
143   }                                               139   }
144 }                                                 140 }
145                                                   141 
146 G4double G4EmExtraParameters::GetStepFunctionM    142 G4double G4EmExtraParameters::GetStepFunctionMuHadP1() const
147 {                                                 143 {
148   return dRoverRangeMuHad;                        144   return dRoverRangeMuHad;
149 }                                                 145 }
150                                                   146 
151 G4double G4EmExtraParameters::GetStepFunctionM    147 G4double G4EmExtraParameters::GetStepFunctionMuHadP2() const
152 {                                                 148 {
153   return finalRangeMuHad;                         149   return finalRangeMuHad;
154 }                                                 150 }
155                                                   151 
156 void G4EmExtraParameters::SetStepFunctionLight << 
157 {                                              << 
158   if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {      << 
159     dRoverRangeLIons = v1;                     << 
160     finalRangeLIons = v2;                      << 
161   } else {                                     << 
162     G4ExceptionDescription ed;                 << 
163     ed << "Values of step function are out of  << 
164        << v1 << ", " << v2/CLHEP::mm << " mm - << 
165     PrintWarning(ed);                          << 
166   }                                            << 
167 }                                              << 
168                                                << 
169 G4double G4EmExtraParameters::GetStepFunctionL << 
170 {                                              << 
171   return dRoverRangeLIons;                     << 
172 }                                              << 
173                                                << 
174 G4double G4EmExtraParameters::GetStepFunctionL << 
175 {                                              << 
176   return finalRangeLIons;                      << 
177 }                                              << 
178                                                << 
179 void G4EmExtraParameters::SetStepFunctionIons( << 
180 {                                              << 
181   if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {      << 
182     dRoverRangeIons = v1;                      << 
183     finalRangeIons = v2;                       << 
184   } else {                                     << 
185     G4ExceptionDescription ed;                 << 
186     ed << "Values of step function are out of  << 
187        << v1 << ", " << v2/CLHEP::mm << " mm - << 
188     PrintWarning(ed);                          << 
189   }                                            << 
190 }                                              << 
191                                                << 
192 G4double G4EmExtraParameters::GetStepFunctionI << 
193 {                                              << 
194   return dRoverRangeIons;                      << 
195 }                                              << 
196                                                << 
197 G4double G4EmExtraParameters::GetStepFunctionI << 
198 {                                              << 
199   return finalRangeIons;                       << 
200 }                                              << 
201                                                << 
202 void G4EmExtraParameters::FillStepFunction(con << 
203 {                                              << 
204   // electron and positron                     << 
205   if (11 == std::abs(part->GetPDGEncoding()))  << 
206     proc->SetStepFunction(dRoverRange, finalRa << 
207                                                << 
208     // all heavy ions                          << 
209   } else if ("GenericIon" == part->GetParticle << 
210     proc->SetStepFunction(dRoverRangeIons, fin << 
211                                                << 
212     // light nucleus and anti-nucleus          << 
213   } else if (part->GetParticleType() == "nucle << 
214     proc->SetStepFunction(dRoverRangeLIons, fi << 
215                                                << 
216     // other particles                         << 
217   } else {                                     << 
218     proc->SetStepFunction(dRoverRangeMuHad, fi << 
219   }                                            << 
220 }                                              << 
221                                                << 
222 void G4EmExtraParameters::AddPAIModel(const G4    152 void G4EmExtraParameters::AddPAIModel(const G4String& particle,
223                                       const G4    153                                       const G4String& region,
224                                       const G4    154                                       const G4String& type)
225 {                                                 155 {
226   G4String r = CheckRegion(region);               156   G4String r = CheckRegion(region);
227   std::size_t nreg =  m_regnamesPAI.size();    << 157   G4int nreg =  m_regnamesPAI.size();
228                                                << 158   for(G4int i=0; i<nreg; ++i) {
229   // in previously defined region other partic << 159     if((m_particlesPAI[i] == particle || 
230   // type should be overrided for the same reg << 160         m_particlesPAI[i] == "all" || 
231   for(std::size_t i=0; i<nreg; ++i) {          << 161         particle == "all") && 
232     if(m_regnamesPAI[i] == r) {                << 162        (m_regnamesPAI[i] == r || 
233       if (particle == "all") {                 << 163         m_regnamesPAI[i] == "DefaultRegionForTheWorld" || 
234   m_particlesPAI[i] = particle;                << 164         r == "DefaultRegionForTheWorld") ) {
235   m_typesPAI[i] = type;                        << 165 
236         return;                                << 166       m_typesPAI[i] = type;
237       } else if(m_particlesPAI[i] == particle  << 167       if(particle == "all") { m_particlesPAI[i] = particle; }
238   m_typesPAI[i] = type;                        << 168       if(r == "DefaultRegionForTheWorld") { m_regnamesPAI[i] = r; }
239         return;                                << 169       return;
240       }                                        << 
241     }                                             170     }
242   }                                               171   }
243   // new regions and/or particles              << 
244   m_particlesPAI.push_back(particle);             172   m_particlesPAI.push_back(particle);
245   m_regnamesPAI.push_back(std::move(r));       << 173   m_regnamesPAI.push_back(r);
246   m_typesPAI.push_back(type);                     174   m_typesPAI.push_back(type);
247 }                                                 175 }
248                                                   176 
249 const std::vector<G4String>& G4EmExtraParamete    177 const std::vector<G4String>& G4EmExtraParameters::ParticlesPAI() const
250 {                                                 178 {
251   return m_particlesPAI;                          179   return m_particlesPAI;
252 }                                                 180 }
253                                                   181 
254 const std::vector<G4String>& G4EmExtraParamete    182 const std::vector<G4String>& G4EmExtraParameters::RegionsPAI() const
255 {                                                 183 {
256   return m_regnamesPAI;                           184   return m_regnamesPAI;
257 }                                                 185 }
258                                                   186 
259 const std::vector<G4String>& G4EmExtraParamete    187 const std::vector<G4String>& G4EmExtraParameters::TypesPAI() const
260 {                                                 188 {
261   return m_typesPAI;                              189   return m_typesPAI;
262 }                                                 190 }
263                                                   191 
264 void G4EmExtraParameters::AddPhysics(const G4S    192 void G4EmExtraParameters::AddPhysics(const G4String& region, 
265                                      const G4S    193                                      const G4String& type)
266 {                                                 194 {
267   G4String r = CheckRegion(region);               195   G4String r = CheckRegion(region);
268   std::size_t nreg =  m_regnamesPhys.size();   << 196   G4int nreg =  m_regnamesPhys.size();
269   for(std::size_t i=0; i<nreg; ++i) {          << 197   for(G4int i=0; i<nreg; ++i) {
270     if(r == m_regnamesPhys[i]) { return; }        198     if(r == m_regnamesPhys[i]) { return; }
271   }                                               199   }
272   m_regnamesPhys.push_back(std::move(r));      << 200   m_regnamesPhys.push_back(r);
273   m_typesPhys.push_back(type);                    201   m_typesPhys.push_back(type);
274 }                                                 202 }
275                                                   203 
276 const std::vector<G4String>& G4EmExtraParamete    204 const std::vector<G4String>& G4EmExtraParameters::RegionsPhysics() const
277 {                                                 205 {
278   return m_regnamesPhys;                          206   return m_regnamesPhys;
279 }                                                 207 }
280                                                   208 
281 const std::vector<G4String>& G4EmExtraParamete    209 const std::vector<G4String>& G4EmExtraParameters::TypesPhysics() const
282 {                                                 210 {
283   return m_typesPhys;                             211   return m_typesPhys;
284 }                                                 212 }
285                                                   213 
286 void G4EmExtraParameters::SetSubCutRegion(cons << 214 void G4EmExtraParameters::SetSubCutoff(G4bool val, const G4String& region)
287 {                                                 215 {
288   const G4String& r = CheckRegion(region);     << 216   G4String r = CheckRegion(region);
289   std::size_t nreg =  m_regnamesSubCut.size(); << 217   G4int nreg =  m_regnamesSubCut.size();
290   for(std::size_t i=0; i<nreg; ++i) {          << 218   for(G4int i=0; i<nreg; ++i) {
291     if(r == m_regnamesSubCut[i]) {                219     if(r == m_regnamesSubCut[i]) { 
                                                   >> 220       m_subCuts[i] = val;
292       return;                                     221       return; 
293     }                                             222     }
294   }                                               223   }
295   m_regnamesSubCut.push_back(r);                  224   m_regnamesSubCut.push_back(r);
                                                   >> 225   m_subCuts.push_back(val);
296 }                                                 226 }
297                                                   227 
298 void                                              228 void 
299 G4EmExtraParameters::SetProcessBiasingFactor(c    229 G4EmExtraParameters::SetProcessBiasingFactor(const G4String& procname, 
300                                              G    230                                              G4double val, G4bool wflag)
301 {                                                 231 {
302   if(val > 0.0) {                                 232   if(val > 0.0) {
303     std::size_t n =  m_procBiasedXS.size();    << 233     G4int n =  m_procBiasedXS.size();
304     for(std::size_t i=0; i<n; ++i) {           << 234     for(G4int i=0; i<n; ++i) {
305       if(procname == m_procBiasedXS[i]) {         235       if(procname == m_procBiasedXS[i]) { 
306   m_factBiasedXS[i] = val;                        236   m_factBiasedXS[i] = val;
307   m_weightBiasedXS[i]= wflag;                     237   m_weightBiasedXS[i]= wflag;
308   return;                                         238   return; 
309       }                                           239       }
310     }                                             240     }
311     m_procBiasedXS.push_back(procname);           241     m_procBiasedXS.push_back(procname);
312     m_factBiasedXS.push_back(val);                242     m_factBiasedXS.push_back(val);
313     m_weightBiasedXS.push_back(wflag);            243     m_weightBiasedXS.push_back(wflag);
314   } else {                                        244   } else {
315     G4ExceptionDescription ed;                    245     G4ExceptionDescription ed;
316     ed << "Process: " << procname << " XS bias    246     ed << "Process: " << procname << " XS biasing factor " 
317        << val << " is negative - ignored";        247        << val << " is negative - ignored"; 
318     PrintWarning(ed);                             248     PrintWarning(ed);
319   }                                               249   }
320 }                                                 250 }
321                                                   251 
322 void                                              252 void 
323 G4EmExtraParameters::ActivateForcedInteraction    253 G4EmExtraParameters::ActivateForcedInteraction(const G4String& procname, 
324                                                   254                                                const G4String& region,
325                                                   255                                                G4double length, 
326                                                   256                                                G4bool wflag)
327 {                                                 257 {
328   const G4String& r = CheckRegion(region);     << 258   G4String r = CheckRegion(region);
329   if(length >= 0.0) {                             259   if(length >= 0.0) {
330     std::size_t n =  m_procForced.size();      << 260     G4int n =  m_procForced.size();
331     for(std::size_t i=0; i<n; ++i) {           << 261     for(G4int i=0; i<n; ++i) {
332       if(procname == m_procForced[i] && r == m    262       if(procname == m_procForced[i] && r == m_regnamesForced[i] ) { 
333   m_lengthForced[i] = length;                     263   m_lengthForced[i] = length;
334   m_weightForced[i] = wflag;                   << 264   m_weightForced[i]= wflag;
335   return;                                         265   return; 
336       }                                           266       }
337     }                                             267     }
338     m_regnamesForced.push_back(r);                268     m_regnamesForced.push_back(r);
339     m_procForced.push_back(procname);             269     m_procForced.push_back(procname);
340     m_lengthForced.push_back(length);             270     m_lengthForced.push_back(length);
341     m_weightForced.push_back(wflag);              271     m_weightForced.push_back(wflag);
342   } else {                                        272   } else {
343     G4ExceptionDescription ed;                    273     G4ExceptionDescription ed;
344     ed << "Process: " << procname << " in regi    274     ed << "Process: " << procname << " in region " << r
345        << " : forced interacttion length= "       275        << " : forced interacttion length= " 
346        << length << " is negative - ignored";     276        << length << " is negative - ignored"; 
347     PrintWarning(ed);                             277     PrintWarning(ed);
348   }                                               278   }
349 }                                                 279 }
350                                                   280 
351 void                                              281 void 
352 G4EmExtraParameters::ActivateSecondaryBiasing(    282 G4EmExtraParameters::ActivateSecondaryBiasing(const G4String& procname,
353                                                   283                                               const G4String& region, 
354                                                   284                                               G4double factor,
355                                                   285                                               G4double energyLim)
356 {                                                 286 {
357   const G4String& r = CheckRegion(region);     << 287   G4String r = CheckRegion(region);
358   if(factor >= 0.0 && energyLim >= 0.0) {         288   if(factor >= 0.0 && energyLim >= 0.0) {
359     std::size_t n =  m_procBiasedSec.size();   << 289     G4int n =  m_procBiasedSec.size();
360     for(std::size_t i=0; i<n; ++i) {           << 290     for(G4int i=0; i<n; ++i) {
361       if(procname == m_procBiasedSec[i] && r =    291       if(procname == m_procBiasedSec[i] && r == m_regnamesBiasedSec[i] ) { 
362   m_factBiasedSec[i] = factor;                    292   m_factBiasedSec[i] = factor;
363   m_elimBiasedSec[i] = energyLim;                 293   m_elimBiasedSec[i] = energyLim;
364   return;                                         294   return; 
365       }                                           295       }
366     }                                             296     }
367     m_regnamesBiasedSec.push_back(r);             297     m_regnamesBiasedSec.push_back(r);
368     m_procBiasedSec.push_back(procname);          298     m_procBiasedSec.push_back(procname);
369     m_factBiasedSec.push_back(factor);            299     m_factBiasedSec.push_back(factor);
370     m_elimBiasedSec.push_back(energyLim);         300     m_elimBiasedSec.push_back(energyLim);
371   } else {                                        301   } else {
372     G4ExceptionDescription ed;                    302     G4ExceptionDescription ed;
373     ed << "Process: " << procname << " in regi    303     ed << "Process: " << procname << " in region " << r
374        << " : secondary bised factor= "           304        << " : secondary bised factor= " 
375        << factor << ", Elim= " << energyLim <<    305        << factor << ", Elim= " << energyLim <<  " - ignored"; 
376     PrintWarning(ed);                             306     PrintWarning(ed);
377   }                                               307   }
378 }                                                 308 }
379                                                   309 
380 void G4EmExtraParameters::DefineRegParamForLos << 310 void G4EmExtraParameters::DefineRegParamForLoss(G4VEnergyLossProcess* ptr, 
                                                   >> 311                                                 G4bool isElectron) const
381 {                                                 312 {
382   const G4RegionStore* regionStore = G4RegionS << 313   if(isElectron) { ptr->SetStepFunction(dRoverRange, finalRange, false); }
383   std::size_t n = m_regnamesSubCut.size();     << 314   else { ptr->SetStepFunction(dRoverRangeMuHad, finalRangeMuHad, false); }
384   for(std::size_t i=0; i<n; ++i) {             << 315 
                                                   >> 316   G4RegionStore* regionStore = G4RegionStore::GetInstance();
                                                   >> 317   G4int n = m_regnamesSubCut.size();
                                                   >> 318   for(G4int i=0; i<n; ++i) { 
385     const G4Region* reg = regionStore->GetRegi    319     const G4Region* reg = regionStore->GetRegion(m_regnamesSubCut[i], false);
386     if(nullptr != reg) { ptr->ActivateSubCutof << 320     if(reg) { ptr->ActivateSubCutoff(m_subCuts[i], reg); }
387   }                                               321   }
388   n = m_procBiasedXS.size();                      322   n = m_procBiasedXS.size();
389   for(std::size_t i=0; i<n; ++i) {             << 323   for(G4int i=0; i<n; ++i) {
390     if(ptr->GetProcessName() == m_procBiasedXS    324     if(ptr->GetProcessName() == m_procBiasedXS[i]) {
391       ptr->SetCrossSectionBiasingFactor(m_fact    325       ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i], 
392           m_weightBiasedXS[i]);                   326           m_weightBiasedXS[i]);
393       break;                                      327       break; 
394     }                                             328     }
395   }                                               329   }
396   n = m_procForced.size();                        330   n = m_procForced.size();
397   for(std::size_t i=0; i<n; ++i) {             << 331   for(G4int i=0; i<n; ++i) {
398     if(ptr->GetProcessName() == m_procForced[i    332     if(ptr->GetProcessName() == m_procForced[i]) {
399       ptr->ActivateForcedInteraction(m_lengthF    333       ptr->ActivateForcedInteraction(m_lengthForced[i],
400              m_regnamesForced[i],                 334              m_regnamesForced[i],
401              m_weightForced[i]);                  335              m_weightForced[i]);
402       break;                                      336       break; 
403     }                                             337     }
404   }                                               338   }
405   n = m_procBiasedSec.size();                     339   n = m_procBiasedSec.size();
406   for(std::size_t i=0; i<n; ++i) {             << 340   for(G4int i=0; i<n; ++i) {
407     if(ptr->GetProcessName() == m_procBiasedSe    341     if(ptr->GetProcessName() == m_procBiasedSec[i]) {
408       ptr->ActivateSecondaryBiasing(m_regnames    342       ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
409             m_factBiasedSec[i],                   343             m_factBiasedSec[i], 
410             m_elimBiasedSec[i]);                  344             m_elimBiasedSec[i]);
411       break;                                      345       break; 
412     }                                             346     }
413   }                                               347   }
414 }                                                 348 }
415                                                   349 
416 void G4EmExtraParameters::DefineRegParamForEM(    350 void G4EmExtraParameters::DefineRegParamForEM(G4VEmProcess* ptr) const
417 {                                                 351 {
418   std::size_t n = m_procBiasedXS.size();       << 352   G4int n = m_procBiasedXS.size();
419   for(std::size_t i=0; i<n; ++i) {             << 353   for(G4int i=0; i<n; ++i) {
420     if(ptr->GetProcessName() == m_procBiasedXS    354     if(ptr->GetProcessName() == m_procBiasedXS[i]) {
421       ptr->SetCrossSectionBiasingFactor(m_fact    355       ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i], 
422           m_weightBiasedXS[i]);                   356           m_weightBiasedXS[i]);
423       break;                                      357       break; 
424     }                                             358     }
425   }                                               359   }
426   n = m_procForced.size();                        360   n = m_procForced.size();
427   for(std::size_t i=0; i<n; ++i) {             << 361   for(G4int i=0; i<n; ++i) {
428     if(ptr->GetProcessName() == m_procForced[i    362     if(ptr->GetProcessName() == m_procForced[i]) {
429       ptr->ActivateForcedInteraction(m_lengthF    363       ptr->ActivateForcedInteraction(m_lengthForced[i],
430              m_regnamesForced[i],                 364              m_regnamesForced[i],
431              m_weightForced[i]);                  365              m_weightForced[i]);
432       break;                                      366       break; 
433     }                                             367     }
434   }                                               368   }
435   n = m_procBiasedSec.size();                     369   n = m_procBiasedSec.size();
436   for(std::size_t i=0; i<n; ++i) {             << 370   for(G4int i=0; i<n; ++i) {
437     if(ptr->GetProcessName() == m_procBiasedSe    371     if(ptr->GetProcessName() == m_procBiasedSec[i]) {
438       ptr->ActivateSecondaryBiasing(m_regnames    372       ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
439             m_factBiasedSec[i],                   373             m_factBiasedSec[i], 
440             m_elimBiasedSec[i]);                  374             m_elimBiasedSec[i]);
441       break;                                      375       break; 
442     }                                             376     }
443   }                                               377   }
444 }                                                 378 }
445                                                   379 
446 G4bool G4EmExtraParameters::QuantumEntanglemen    380 G4bool G4EmExtraParameters::QuantumEntanglement()
447 {                                                 381 {
448   return quantumEntanglement;                     382   return quantumEntanglement;
449 }                                                 383 }
450                                                   384 
451 void G4EmExtraParameters::SetQuantumEntangleme    385 void G4EmExtraParameters::SetQuantumEntanglement(G4bool v)
452 {                                                 386 {
453   quantumEntanglement = v;                        387   quantumEntanglement = v;
454 }                                                 388 }
455                                                   389 
456 G4bool G4EmExtraParameters::GetDirectionalSpli    390 G4bool G4EmExtraParameters::GetDirectionalSplitting() { 
457   return directionalSplitting;                    391   return directionalSplitting; 
458 }                                                 392 }
459                                                   393 
460 void G4EmExtraParameters::SetDirectionalSplitt    394 void G4EmExtraParameters::SetDirectionalSplitting(G4bool v) 
461 {                                                 395 { 
462   directionalSplitting = v;                       396   directionalSplitting = v; 
463 }                                                 397 }
464                                                   398 
465 void                                              399 void 
466 G4EmExtraParameters::SetDirectionalSplittingTa    400 G4EmExtraParameters::SetDirectionalSplittingTarget(const G4ThreeVector& v)
467 {                                                 401 { 
468   directionalSplittingTarget = v;                 402   directionalSplittingTarget = v; 
469 }                                                 403 }
470                                                   404 
471 G4ThreeVector G4EmExtraParameters::GetDirectio    405 G4ThreeVector G4EmExtraParameters::GetDirectionalSplittingTarget() const
472 {                                                 406 { 
473   return directionalSplittingTarget;              407   return directionalSplittingTarget; 
474 }                                                 408 }
475                                                   409 
476 void G4EmExtraParameters::SetDirectionalSplitt    410 void G4EmExtraParameters::SetDirectionalSplittingRadius(G4double r)
477 {                                                 411 { 
478   directionalSplittingRadius = r;                 412   directionalSplittingRadius = r; 
479 }                                                 413 }
480                                                   414 
481 G4double G4EmExtraParameters::GetDirectionalSp    415 G4double G4EmExtraParameters::GetDirectionalSplittingRadius()
482 {                                                 416 { 
483   return directionalSplittingRadius;              417   return directionalSplittingRadius; 
484 }                                                 418 }
485                                                   419 
486 //....oooOO0OOooo........oooOO0OOooo........oo    420 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
487                                                   421