128 const std::vector<G4String>& regnamesPAI = theParameters->
RegionsPAI();
129 if(regnamesPAI.size() > 0)
133 const std::vector<G4String>& regnamesME = theParameters->
RegionsMicroElec();
134 if(regnamesME.size() > 0)
138 const std::vector<G4String>& regnamesMSC = theParameters->
RegionsPhysics();
139 if(regnamesMSC.size() > 0)
147void G4EmModelActivator::ActivateEmOptions()
149 const std::vector<G4String>& regnamesPhys = theParameters->
RegionsPhysics();
150 std::size_t nreg = regnamesPhys.size();
151 if(0 == nreg) {
return; }
154 G4cout <<
"### G4EmModelActivator::ActivateEmOptions for " << nreg <<
" regions"
157 const std::vector<G4String>& typesPhys = theParameters->
TypesPhysics();
179 for(std::size_t i=0; i<nreg; ++i) {
182 G4cout << i <<
". region <" << reg <<
">; type <" << typesPhys[i] <<
"> "
186 if(baseName == typesPhys[i]) {
continue; }
188 if(
"G4EmStandard" == typesPhys[i]) {
190 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
193 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
195 }
else if(
"G4EmStandard_opt1" == typesPhys[i] ||
"G4EmStandard_opt2" == typesPhys[i]) {
197 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
200 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
202 }
else if(
"G4EmStandard_opt3" == typesPhys[i]) {
206 SetMscParameters(elec, msc, typesPhys[i]);
208 FindOrAddProcess(elec,
"CoulombScat");
212 SetMscParameters(posi, msc, typesPhys[i]);
214 FindOrAddProcess(posi,
"CoulombScat");
218 SetMscParameters(prot, msc, typesPhys[i]);
220 FindOrAddProcess(prot,
"CoulombScat");
228 FindOrAddProcess(phot,
"Rayl");
231 FindOrAddProcess(phot,
"phot");
234 FindOrAddProcess(phot,
"compt");
238 }
else if(
"G4EmStandard_opt4" == typesPhys[i]) {
240 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
243 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
252 FindOrAddProcess(phot,
"Rayl");
255 FindOrAddProcess(phot,
"phot");
257 FindOrAddProcess(phot,
"compt");
263 FindOrAddProcess(phot,
"conv");
267 }
else if(
"G4EmStandardGS" == typesPhys[i]) {
269 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
272 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
274 }
else if(
"G4EmStandardWVI" == typesPhys[i]) {
276 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
279 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
288 }
else if(
"G4EmStandardSS" == typesPhys[i] &&
289 baseName !=
"G4EmStandard_opt3") {
291 for(
const auto& particleName : emList.
PartNames()) {
294 FindOrAddProcess(particle,
"CoulombScat");
299 if(particleName ==
"mu+" || particleName ==
"mu-") {
313 }
else if(
"G4EmLivermore" == typesPhys[i]) {
316 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
319 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
328 FindOrAddProcess(phot,
"Rayl");
336 em_config->
SetExtraEmModel(
"e-",
"eBrem", mod, reg, 0.0, highEnergyLimit);
345 }
else if(
"G4EmPenelope" == typesPhys[i]) {
348 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
351 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
360 FindOrAddProcess(phot,
"Rayl");
366 em_config->
SetExtraEmModel(
"e-",
"eIoni", mod, reg, 0.0, highEnergyLimit, uf);
368 em_config->
SetExtraEmModel(
"e-",
"eBrem", mod, reg, 0.0, highEnergyLimit);
372 em_config->
SetExtraEmModel(
"e+",
"eIoni", mod, reg, 0.0, highEnergyLimit, uf);
374 em_config->
SetExtraEmModel(
"e+",
"eBrem", mod, reg, 0.0, highEnergyLimit);
376 em_config->
SetExtraEmModel(
"e+",
"annihil", mod, reg, 0.0, highEnergyLimit);
387 G4cout <<
"### G4EmModelActivator::ActivateEmOptions WARNING: \n"
388 <<
" EM Physics configuration name <" << typesPhys[i]
389 <<
"> is not known - ignored" <<
G4endl;
397void G4EmModelActivator::ActivatePAI()
399 const std::vector<G4String> regnamesPAI = theParameters->
RegionsPAI();
400 std::size_t nreg = regnamesPAI.size();
401 if(0 == nreg) {
return; }
404 G4cout <<
"### G4EmModelActivator::ActivatePAI for " << nreg <<
" regions"
407 const std::vector<G4String> particlesPAI = theParameters->
ParticlesPAI();
408 const std::vector<G4String> typesPAI = theParameters->
TypesPAI();
421 for(std::size_t i = 0; i < nreg; ++i) {
423 if(particlesPAI[i] !=
"all") {
426 G4cout <<
"### WARNING: ActivatePAI::FindParticle fails to find "
427 << particlesPAI[i] <<
G4endl;
433 G4cout <<
"### WARNING: ActivatePAI::GetRegion fails to find "
434 << regnamesPAI[i] <<
G4endl;
439 if(p == elec || p == posi)
441 else if (p == mupl || p == mumi)
444 {
name =
"ionIoni"; }
448 if(!proc->IsIonisationProcess()) {
continue; }
450 G4String namep = proc->GetProcessName();
452 if(name != namep) {
continue; }
454 if(namep !=
"hIoni" && namep !=
"muIoni" &&
455 namep !=
"eIoni" && namep !=
"ionIoni")
459 if(namep ==
"eIoni") emin = 110*CLHEP::eV;
460 else if(namep ==
"muIoni") emin = 5*CLHEP::keV;
464 if(typesPAI[i] ==
"PAIphoton" || typesPAI[i] ==
"pai_photon") {
478 if(namep ==
"eIoni") {
481 proc->SetFluctModel(fm0);
483 }
else if(namep ==
"ionIoni") {
486 proc->SetFluctModel(fm0);
492 proc->SetFluctModel(fm0);
496 proc->AddEmModel(-1, em0, fm0, r);
498 proc->AddEmModel(-1, em, fm, r);
500 G4cout <<
"### G4EmModelActivator: add <" << typesPAI[i]
501 <<
"> model for " << particlesPAI[i]
502 <<
" in the " << regnamesPAI[i]
503 <<
" Emin(keV)= " << emin/CLHEP::keV <<
G4endl;
511void G4EmModelActivator::ActivateMicroElec()
514 std::size_t nreg = regnamesME.size();
522 G4cout <<
"### G4EmModelActivator::ActivateMicroElec for " << nreg
534 G4bool emsc = HasMsc(eman);
567 for(std::size_t i = 0; i < nreg; ++i)
571 G4cout <<
"### MicroElec models are activated for G4Region " << reg
573 <<
" Energy limits for e- elastic: " << elowest/eV <<
" eV - "
574 << elimel/MeV <<
" MeV"
576 <<
" Energy limits for e- inelastic: " << elowest/eV <<
" eV - "
577 << elimin/MeV <<
" MeV"
579 <<
" Energy limits for hadrons/ions: " << pmin/MeV <<
" MeV - "
580 << pmax/MeV <<
" MeV"
593 em_config->
SetExtraEmModel(
"e-",
"CoulombScat", mod, reg, 0.0, elimel);
598 "e-G4MicroElecElastic",
616 "e-G4MicroElecInelastic",
645 "p_G4MicroElecInelastic",
674 "ion_G4MicroElecInelastic",
689 for(
G4int i = 0; i < nproc; ++i)
712 SetMscParameters(part, mscmod, type);
717 SetMscParameters(part, msc, type);
721 FindOrAddProcess(part,
"CoulombScat");
734 if(phys ==
"G4EmStandard_opt1" || phys ==
"G4EmStandard_opt2") {
737 }
else if(phys ==
"G4EmStandard_opt3") {
739 }
else if(phys ==
"G4EmStandard_opt4" || phys ==
"G4EmLivermore" || phys ==
"G4EmPenelope") {
743 }
else if(phys ==
"G4EmStandardGS") {
747 if(phys !=
"G4EmStandard" && phys !=
"G4EmStandard_opt1" && phys !=
"G4EmStandard_opt2") {
762 for(
G4int i = 0; i<nproc; ++i) {
763 if(((*pv)[i])->GetProcessName() == name) {
return; }
765 if(name ==
"CoulombScat") {
769 }
else if(name ==
"Rayl") {
G4GLOB_DLL std::ostream G4cout
static G4Electron * Electron()
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String ®ionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=nullptr)
G4EmModelActivator(const G4String &emphys="")
void SetNumberOfBinsPerDecade(G4int val)
static G4EmParameters * Instance()
const std::vector< G4String > & TypesPhysics() const
void SetMscThetaLimit(G4double val)
G4double MscEnergyLimit() const
const std::vector< G4String > & RegionsPAI() const
void SetDeexActiveRegion(const G4String ®ion, G4bool fdeex, G4bool fauger, G4bool fpixe)
const std::vector< G4String > & ParticlesPAI() const
const std::vector< G4String > & RegionsPhysics() const
void DefineRegParamForDeex(G4VAtomDeexcitation *) const
G4double MaxKinEnergy() const
void SetUseMottCorrection(G4bool val)
const std::vector< G4String > & RegionsMicroElec() const
const std::vector< G4String > & TypesPAI() const
const std::vector< G4String > & PartNames() const
static G4GenericIon * GenericIon()
static G4LossTableManager * Instance()
G4EmConfigurator * EmConfigurator()
const std::vector< G4VEnergyLossProcess * > & GetEnergyLossProcessVector()
G4VAtomDeexcitation * AtomDeexcitation()
static G4MuonMinus * MuonMinus()
static G4MuonPlus * MuonPlus()
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4Positron * Positron()
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4int GetProcessListLength() const
G4ProcessVector * GetProcessList() const
static G4Proton * Proton()
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void SetPolarAngleLimit(G4double)
void SetHighEnergyLimit(G4double)
void SetActivationLowEnergyLimit(G4double)
void SetLowEnergyLimit(G4double)
void SetActivationHighEnergyLimit(G4double)
void SetEmModel(G4VEmModel *, G4int index=0)
void SetRangeFactor(G4double)
void SetLateralDisplasmentFlag(G4bool val)
void SetStepLimitType(G4MscStepLimitType)
const char * name(G4int ptype)