87 G4cout <<
" G4EmConfigurator::SetExtraEmModel " << mod->
GetName()
88 <<
" for " << particleName
89 <<
" and " << processName
90 <<
" in the region <" << regionName
91 <<
"> Emin(MeV)= " << emin/
MeV
92 <<
" Emax(MeV)= " << emax/
MeV
96 models.push_back(mod);
97 flucModels.push_back(fm);
102 particles.push_back(particleName);
103 processes.push_back(processName);
104 regions.push_back(regionName);
105 lowEnergy.push_back(emin);
106 highEnergy.push_back(emax);
113 size_t n = models.size();
115 G4cout <<
"### G4EmConfigurator::AddModels n= " << n <<
G4endl;
118 for(
size_t i=0; i<
n; ++i) {
123 SetModelForRegion(models[i],flucModels[i],reg,
124 particles[i],processes[i],
125 lowEnergy[i],highEnergy[i]);
135 void G4EmConfigurator::SetModelForRegion(
G4VEmModel* mod,
143 G4cout <<
" G4EmConfigurator::SetModelForRegion: " << mod->
GetName()
145 G4cout <<
" For " << particleName
146 <<
" and " << processName
147 <<
" in the region <" << reg->
GetName()
148 <<
" Emin(MeV)= " << emin/
MeV
149 <<
" Emax(MeV)= " << emax/
MeV;
157 theParticleIterator->
reset();
158 while( (*theParticleIterator)() ) {
164 (particleName ==
"all") ||
165 (particleName ==
"charged" && part->
GetPDGCharge() != 0.0)) {
175 for(
G4int i=0; i<np; ++i) {
176 if(processName == (*plist)[i]->GetProcessName()) {
182 G4cout <<
"### G4EmConfigurator WARNING: fails to find a process <"
183 << processName <<
"> for " << particleName <<
G4endl;
188 if(!UpdateModelEnergyRange(mod, emin, emax)) {
return; }
192 if(10 == ii && mod) {
196 G4cout <<
"### Added msc model order= " << index <<
" for "
197 << particleName <<
" and " << processName <<
G4endl;
199 }
else if(2 <= ii && 4 >= ii) {
206 G4cout <<
"### Added eloss model order= " << index <<
" for "
207 << particleName <<
" and " << processName <<
G4endl;
214 G4cout <<
"### Added em model order= " << index <<
" for "
215 << particleName <<
" and " << processName <<
G4endl;
229 size_t n = particles.size();
231 G4cout <<
" G4EmConfigurator::PrepareModels for EnergyLoss n= "
238 for(
size_t i=0; i<
n; ++i) {
240 if(processName == processes[i]) {
241 if((particleName == particles[i]) ||
242 (particles[i] ==
"all") ||
243 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
244 G4Region* reg = FindRegion(regions[i]);
251 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
254 G4cout <<
"### Added eloss model order= " << index <<
" for "
255 << particleName <<
" and " << processName <<
G4endl;
274 size_t n = particles.size();
276 G4cout <<
" G4EmConfigurator::PrepareModels for EM process n= "
283 for(
size_t i=0; i<
n; ++i) {
284 if(processName == processes[i]) {
285 if((particleName == particles[i]) ||
286 (particles[i] ==
"all") ||
287 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
288 G4Region* reg = FindRegion(regions[i]);
294 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
297 G4cout <<
"### Added em model order= " << index <<
" for "
298 << particleName <<
" and " << processName <<
G4endl;
315 size_t n = particles.size();
317 G4cout <<
" G4EmConfigurator::PrepareModels for MSC process n= "
324 for(
size_t i=0; i<
n; ++i) {
325 if(processName == processes[i]) {
326 if((particleName == particles[i]) ||
327 (particles[i] ==
"all") ||
328 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
329 G4Region* reg = FindRegion(regions[i]);
334 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
368 if(r ==
"" || r ==
"world" || r ==
"World") {
369 r =
"DefaultRegionForTheWorld";
373 G4cout <<
"### G4EmConfigurator WARNING: fails to find a region <"
375 }
else if(verbose > 1) {
376 G4cout <<
"### G4EmConfigurator finds out G4Region <" << r <<
">"
391 G4cout <<
"### G4EmConfigurator WARNING: empty energy interval"
402 <<
" Emin(MeV)= " << e1/
MeV <<
" Emax(MeV)= " << e2/
MeV
void SetActivationHighEnergyLimit(G4double)
G4double LowEnergyLimit() const
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
const G4String & GetName() const
G4double HighEnergyLimit() const
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String ®ionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=nullptr)
const G4String & GetName() const
void SetFluctModel(G4VEmFluctuationModel *)
const G4String & GetParticleName() const
static const G4double reg
void SetHighEnergyLimit(G4double)
static G4RegionStore * GetInstance()
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
G4GLOB_DLL std::ostream G4cout
void reset(G4bool ifSkipIon=true)
G4EmConfigurator(G4int verboseLevel=1)
static constexpr double MeV
#define theParticleIterator
const G4String & GetProcessName() const
static const G4double emax
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
static G4ParticleTable * GetParticleTable()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4ProcessManager * GetProcessManager() const
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=nullptr)
static constexpr double MeV
const G4String & GetName() const
void SetLowEnergyLimit(G4double)
G4double GetPDGCharge() const
G4int GetProcessListLength() const
G4int GetProcessSubType() const
G4PTblDicIterator * GetIterator() const
G4ProcessVector * GetProcessList() const