126 const std::vector<G4String>& regnamesPAI = theParameters->
RegionsPAI();
127 if(regnamesPAI.size() > 0)
131 const std::vector<G4String>& regnamesME = theParameters->
RegionsMicroElec();
132 if(regnamesME.size() > 0)
136 const std::vector<G4String>& regnamesMSC = theParameters->
RegionsPhysics();
137 if(regnamesMSC.size() > 0)
145void G4EmModelActivator::ActivateEmOptions()
147 const std::vector<G4String>& regnamesPhys = theParameters->
RegionsPhysics();
148 G4int nreg = regnamesPhys.size();
149 if(0 == nreg) {
return; }
152 G4cout <<
"### G4EmModelActivator::ActivateEmOptions for " << nreg <<
" regions"
155 const std::vector<G4String>& typesPhys = theParameters->
TypesPhysics();
177 for(
G4int i=0; i<nreg; ++i) {
180 G4cout << i <<
". region <" << reg <<
">; type <" << typesPhys[i] <<
"> "
184 if(baseName == typesPhys[i]) {
continue; }
186 if(
"G4EmStandard" == typesPhys[i]) {
188 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
191 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
193 }
else if(
"G4EmStandard_opt1" == typesPhys[i] ||
"G4EmStandard_opt2" == typesPhys[i]) {
195 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
198 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
200 }
else if(
"G4EmStandard_opt3" == typesPhys[i]) {
204 SetMscParameters(elec, msc, typesPhys[i]);
206 FindOrAddProcess(elec,
"CoulombScat");
210 SetMscParameters(posi, msc, typesPhys[i]);
212 FindOrAddProcess(posi,
"CoulombScat");
216 SetMscParameters(prot, msc, typesPhys[i]);
218 FindOrAddProcess(prot,
"CoulombScat");
226 FindOrAddProcess(phot,
"Rayl");
229 FindOrAddProcess(phot,
"phot");
232 FindOrAddProcess(phot,
"compt");
236 }
else if(
"G4EmStandard_opt4" == typesPhys[i]) {
238 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
241 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
250 FindOrAddProcess(phot,
"Rayl");
253 FindOrAddProcess(phot,
"compt");
260 }
else if(
"G4EmStandardGS" == typesPhys[i]) {
262 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
265 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
267 }
else if(
"G4EmStandardWVI" == typesPhys[i]) {
269 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
272 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
281 }
else if(
"G4EmStandardSS" == typesPhys[i] &&
282 baseName !=
"G4EmStandard_opt3") {
284 for(
const auto& particleName : emList.
PartNames()) {
287 FindOrAddProcess(particle,
"CoulombScat");
292 if(particleName ==
"mu+" || particleName ==
"mu-") {
306 }
else if(
"G4EmLivermore" == typesPhys[i]) {
309 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
312 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
321 FindOrAddProcess(phot,
"Rayl");
329 em_config->
SetExtraEmModel(
"e-",
"eBrem", mod, reg, 0.0, highEnergyLimit);
338 }
else if(
"G4EmPenelope" == typesPhys[i]) {
341 AddStandardScattering(elec, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
344 AddStandardScattering(posi, em_config, msc, reg, mscEnergyLimit, highEnergy, typesPhys[i]);
353 FindOrAddProcess(phot,
"Rayl");
359 em_config->
SetExtraEmModel(
"e-",
"eIoni", mod, reg, 0.0, highEnergyLimit, uf);
361 em_config->
SetExtraEmModel(
"e-",
"eBrem", mod, reg, 0.0, highEnergyLimit);
365 em_config->
SetExtraEmModel(
"e+",
"eIoni", mod, reg, 0.0, highEnergyLimit, uf);
367 em_config->
SetExtraEmModel(
"e+",
"eBrem", mod, reg, 0.0, highEnergyLimit);
369 em_config->
SetExtraEmModel(
"e+",
"annihil", mod, reg, 0.0, highEnergyLimit);
380 G4cout <<
"### G4EmModelActivator::ActivateEmOptions WARNING: \n"
381 <<
" EM Physics configuration name <" << typesPhys[i]
382 <<
"> is not known - ignored" <<
G4endl;
390void G4EmModelActivator::ActivatePAI()
392 const std::vector<G4String> regnamesPAI = theParameters->
RegionsPAI();
393 G4int nreg = regnamesPAI.size();
394 if(0 == nreg) {
return; }
397 G4cout <<
"### G4EmModelActivator::ActivatePAI for " << nreg <<
" regions"
400 const std::vector<G4String> particlesPAI = theParameters->
ParticlesPAI();
401 const std::vector<G4String> typesPAI = theParameters->
TypesPAI();
414 for(
G4int i = 0; i < nreg; ++i) {
416 if(particlesPAI[i] !=
"all") {
419 G4cout <<
"### WARNING: ActivatePAI::FindParticle fails to find "
420 << particlesPAI[i] <<
G4endl;
426 G4cout <<
"### WARNING: ActivatePAI::GetRegion fails to find "
427 << regnamesPAI[i] <<
G4endl;
432 if(p == elec || p == posi)
434 else if (p == mupl || p == mumi)
437 {
name =
"ionIoni"; }
441 if(!proc->IsIonisationProcess()) {
continue; }
443 G4String namep = proc->GetProcessName();
445 if(name != namep) {
continue; }
447 if(namep !=
"hIoni" && namep !=
"muIoni" &&
448 namep !=
"eIoni" && namep !=
"ionIoni")
452 if(namep ==
"eIoni") emin = 110*CLHEP::eV;
453 else if(namep ==
"muIoni") emin = 5*CLHEP::keV;
457 if(typesPAI[i] ==
"PAIphoton" || typesPAI[i] ==
"pai_photon") {
468 proc->AddEmModel(0, em, fm, r);
471 if(namep ==
"eIoni") {
474 }
else if(namep ==
"ionIoni") {
482 proc->AddEmModel(-1, em, fm, r);
485 G4cout <<
"### G4EmModelActivator: add <" << typesPAI[i]
486 <<
"> model for " << particlesPAI[i]
487 <<
" in the " << regnamesPAI[i]
488 <<
" Emin(keV)= " << emin/CLHEP::keV <<
G4endl;
496void G4EmModelActivator::ActivateMicroElec()
499 G4int nreg = regnamesME.size();
507 G4cout <<
"### G4EmModelActivator::ActivateMicroElec for " << nreg
519 G4bool emsc = HasMsc(eman);
552 for(
G4int i = 0; i < nreg; ++i)
556 G4cout <<
"### MicroElec models are activated for G4Region " << reg
558 <<
" Energy limits for e- elastic: " << elowest/eV <<
" eV - "
559 << elimel/MeV <<
" MeV"
561 <<
" Energy limits for e- inelastic: " << elowest/eV <<
" eV - "
562 << elimin/MeV <<
" MeV"
564 <<
" Energy limits for hadrons/ions: " << pmin/MeV <<
" MeV - "
565 << pmax/MeV <<
" MeV"
578 em_config->
SetExtraEmModel(
"e-",
"CoulombScat", mod, reg, 0.0, elimel);
583 "e-G4MicroElecElastic",
601 "e-G4MicroElecInelastic",
630 "p_G4MicroElecInelastic",
659 "ion_G4MicroElecInelastic",
674 for(
G4int i = 0; i < nproc; ++i)
697 SetMscParameters(part, mscmod, type);
702 SetMscParameters(part, msc, type);
706 FindOrAddProcess(part,
"CoulombScat");
719 if(phys ==
"G4EmStandard_opt1" || phys ==
"G4EmStandard_opt2") {
722 }
else if(phys ==
"G4EmStandard_opt3") {
724 }
else if(phys ==
"G4EmStandard_opt4" || phys ==
"G4EmLivermore" || phys ==
"G4EmPenelope") {
728 }
else if(phys ==
"G4EmStandardGS") {
732 if(phys !=
"G4EmStandard" && phys !=
"G4EmStandard_opt1" && phys !=
"G4EmStandard_opt2") {
747 for(
G4int i = 0; i<nproc; ++i) {
748 if(((*pv)[i])->GetProcessName() == name) {
return; }
750 if(name ==
"CoulombScat") {
754 }
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)