130 const std::vector<G4String>& regnamesPAI = theParameters->
RegionsPAI();
131 if(regnamesPAI.size() > 0)
135 const std::vector<G4String>& regnamesME = theParameters->
RegionsMicroElec();
136 if(regnamesME.size() > 0)
140 const std::vector<G4String>& regnamesMSC = theParameters->
RegionsPhysics();
141 if(regnamesMSC.size() > 0)
149void G4EmModelActivator::ActivateEmOptions()
151 const std::vector<G4String>& regnamesPhys = theParameters->
RegionsPhysics();
152 std::size_t nreg = regnamesPhys.size();
153 if(0 == nreg) {
return; }
156 G4cout <<
"### G4EmModelActivator::ActivateEmOptions for " << nreg <<
" regions"
159 const std::vector<G4String>& typesPhys = theParameters->
TypesPhysics();
182 for(std::size_t i=0; i<nreg; ++i) {
183 const G4String reg = regnamesPhys[i];
186 G4cout << i <<
". region <" << reg <<
">; physics type <"
187 << typesPhys[i] <<
"> region ptr: " << region <<
G4endl;
190 if(baseName == typesPhys[i]) {
continue; }
192 if(
"G4EmStandard" == typesPhys[i]) {
194 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
197 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
199 }
else if(
"G4EmStandard_opt1" == typesPhys[i] ||
"G4EmStandard_opt2" == typesPhys[i]) {
201 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
204 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
206 }
else if(
"G4EmStandard_opt3" == typesPhys[i]) {
210 SetMscParameters(elec, msc, typesPhys[i]);
212 proc = FindOrAddProcess(elec,
"CoulombScat");
216 SetMscParameters(posi, msc, typesPhys[i]);
218 proc = FindOrAddProcess(posi,
"CoulombScat");
222 SetMscParameters(prot, msc, typesPhys[i]);
224 proc = FindOrAddProcess(prot,
"CoulombScat");
232 proc = FindOrAddProcess(phot,
"Rayl");
234 proc = FindOrAddProcess(phot,
"compt");
237 }
else if(
"G4EmStandard_opt4" == typesPhys[i]) {
239 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
242 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
251 proc = FindOrAddProcess(phot,
"Rayl");
253 proc = FindOrAddProcess(phot,
"compt");
258 proc = FindOrAddProcess(phot,
"conv");
261 }
else if(
"G4EmStandardGS" == typesPhys[i]) {
263 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
266 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
268 }
else if(
"G4EmStandardWVI" == typesPhys[i]) {
270 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
273 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
282 }
else if(
"G4EmStandardSS" == typesPhys[i]) {
286 if(
nullptr != particle && 0.0 != particle->
GetPDGCharge()) {
287 proc = FindOrAddProcess(particle,
"CoulombScat");
288 if(
nullptr != proc) {
293 pm->AddDiscreteProcess(proc);
307 if(particleName ==
"mu+" || particleName ==
"mu-") {
321 }
else if(
"G4EmLivermore" == typesPhys[i]) {
324 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
327 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
336 FindOrAddProcess(phot,
"Rayl");
344 em_config->
SetExtraEmModel(
"e-",
"eBrem", mod, reg, 0.0, highEnergyLimit);
353 }
else if(
"G4EmPenelope" == typesPhys[i]) {
356 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
359 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
368 FindOrAddProcess(phot,
"Rayl");
374 em_config->
SetExtraEmModel(
"e-",
"eIoni", mod, reg, 0.0, highEnergyLimit, uf);
376 em_config->
SetExtraEmModel(
"e-",
"eBrem", mod, reg, 0.0, highEnergyLimit);
380 em_config->
SetExtraEmModel(
"e+",
"eIoni", mod, reg, 0.0, highEnergyLimit, uf);
382 em_config->
SetExtraEmModel(
"e+",
"eBrem", mod, reg, 0.0, highEnergyLimit);
384 em_config->
SetExtraEmModel(
"e+",
"annihil", mod, reg, 0.0, highEnergyLimit);
395 G4cout <<
"### G4EmModelActivator::ActivateEmOptions WARNING: \n"
396 <<
" EM Physics configuration name <" << typesPhys[i]
397 <<
"> is not known - ignored" <<
G4endl;
405void G4EmModelActivator::ActivatePAI()
407 const std::vector<G4String> regnamesPAI = theParameters->
RegionsPAI();
408 std::size_t nreg = regnamesPAI.size();
409 if(0 == nreg) {
return; }
412 G4cout <<
"### G4EmModelActivator::ActivatePAI for " << nreg <<
" regions"
415 const std::vector<G4String> particlesPAI = theParameters->
ParticlesPAI();
416 const std::vector<G4String> typesPAI = theParameters->
TypesPAI();
429 for(std::size_t i = 0; i < nreg; ++i) {
431 if(particlesPAI[i] !=
"all") {
434 G4cout <<
"### WARNING: ActivatePAI::FindParticle fails to find "
435 << particlesPAI[i] <<
G4endl;
441 G4cout <<
"### WARNING: ActivatePAI::GetRegion fails to find "
442 << regnamesPAI[i] <<
G4endl;
447 if(p == elec || p == posi)
449 else if (p == mupl || p == mumi)
452 {
name =
"ionIoni"; }
456 if(!proc->IsIonisationProcess()) {
continue; }
460 if(name != namep) {
continue; }
462 if(namep !=
"hIoni" && namep !=
"muIoni" &&
463 namep !=
"eIoni" && namep !=
"ionIoni")
467 if(namep ==
"eIoni") emin = 110*CLHEP::eV;
468 else if(namep ==
"muIoni") emin = 5*CLHEP::keV;
472 if(typesPAI[i] ==
"PAIphoton" || typesPAI[i] ==
"pai_photon") {
486 if(namep ==
"eIoni") {
489 proc->SetFluctModel(fm0);
491 }
else if(namep ==
"ionIoni") {
494 proc->SetFluctModel(fm0);
500 proc->SetFluctModel(fm0);
508 G4cout <<
"### G4EmModelActivator: add <" << typesPAI[i]
509 <<
"> model for " << particlesPAI[i]
510 <<
" in the " << regnamesPAI[i]
511 <<
" Emin(keV)= " << emin/CLHEP::keV <<
G4endl;
519void G4EmModelActivator::ActivateMicroElec()
522 std::size_t nreg = regnamesME.size();
530 G4cout <<
"### G4EmModelActivator::ActivateMicroElec for " << nreg
542 G4bool emsc = HasMsc(eman);
575 for(std::size_t i = 0; i < nreg; ++i)
579 G4cout <<
"### MicroElec models are activated for G4Region " << reg
581 <<
" Energy limits for e- elastic: " << elowest/eV <<
" eV - "
582 << elimel/MeV <<
" MeV"
584 <<
" Energy limits for e- inelastic: " << elowest/eV <<
" eV - "
585 << elimin/MeV <<
" MeV"
587 <<
" Energy limits for hadrons/ions: " << pmin/MeV <<
" MeV - "
588 << pmax/MeV <<
" MeV"
601 em_config->
SetExtraEmModel(
"e-",
"CoulombScat", mod, reg, 0.0, elimel);
606 "e-G4MicroElecElastic",
624 "e-G4MicroElecInelastic",
653 "p_G4MicroElecInelastic",
682 "ion_G4MicroElecInelastic",
697 for(
G4int i = 0; i < nproc; ++i)
720 SetMscParameters(part, mscmod, type);
725 SetMscParameters(part, msc, type);
729 FindOrAddProcess(part,
"CoulombScat");
742 if(phys ==
"G4EmStandard_opt1" || phys ==
"G4EmStandard_opt2") {
745 }
else if(phys ==
"G4EmStandard_opt3") {
747 }
else if(phys ==
"G4EmStandard_opt4" || phys ==
"G4EmLivermore" || phys ==
"G4EmPenelope") {
751 }
else if(phys ==
"G4EmStandardGS") {
755 if(phys !=
"G4EmStandard" && phys !=
"G4EmStandard_opt1" && phys !=
"G4EmStandard_opt2") {
772 for(
auto i=0; i<
n; ++i) {
773 auto ptr = (*emproc)[i];
777 }
else if(ptr->GetProcessName() == name) {
780 if(
nullptr != proc) {
return proc; }
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 > & EmChargedPartNames() const
static const G4Region * FindRegion(const G4String ®ionName, const G4int verbose=0)
static G4GenericIon * GenericIon()
static G4LossTableManager * Instance()
G4EmConfigurator * EmConfigurator()
const std::vector< G4VEnergyLossProcess * > & GetEnergyLossProcessVector()
G4VAtomDeexcitation * AtomDeexcitation()
static G4MuonMinus * MuonMinus()
static G4MuonPlus * MuonPlus()
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4int GetPDGEncoding() 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 AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
void SetEmModel(G4VEmModel *, G4int index=0)
void SetRangeFactor(G4double)
void SetLateralDisplasmentFlag(G4bool val)
void SetStepLimitType(G4MscStepLimitType)
const G4String & GetProcessName() const
const char * name(G4int ptype)