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