86 G4cout <<
" G4EmConfigurator::SetExtraEmModel " << mod->
GetName()
87 <<
" for " << particleName
88 <<
" and " << processName
89 <<
" in the region <" << regionName
90 <<
"> Emin(MeV)= " << emin/MeV
91 <<
" Emax(MeV)= " << emax/MeV
95 models.push_back(mod);
96 flucModels.push_back(fm);
101 particles.push_back(particleName);
102 processes.push_back(processName);
103 regions.push_back(regionName);
104 lowEnergy.push_back(emin0);
105 highEnergy.push_back(emax0);
112 size_t n = models.size();
114 G4cout <<
"### G4EmConfigurator::AddModels n= " << n <<
G4endl;
117 for(
size_t i=0; i<n; ++i) {
119 G4Region* reg = FindRegion(regions[i]);
122 SetModelForRegion(models[i],flucModels[i],reg,
123 particles[i],processes[i],
124 lowEnergy[i],highEnergy[i]);
134void 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;
156 myParticleIterator->
reset();
157 while( (*myParticleIterator)() ) {
161 (particleName ==
"all") ||
162 (particleName ==
"charged" && part->
GetPDGCharge() != 0.0)) {
170 G4cout <<
"Check process <" << processName <<
"> for "
171 << particleName <<
" in list of " << np <<
" processes"
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;
187 if(!UpdateModelEnergyRange(mod, emin, emax)) {
return; }
194 G4cout <<
"### Added msc model order= " << index <<
" for "
195 << particleName <<
" and " << processName <<
G4endl;
197 }
else if(2 <= ii && 4 >= ii) {
201 G4cout <<
"### Added eloss model order= " << index <<
" for "
202 << particleName <<
" and " << processName <<
G4endl;
208 G4cout <<
"### Added em model order= " << index <<
" for "
209 << particleName <<
" and " << processName <<
G4endl;
223 size_t n = particles.size();
225 G4cout <<
" G4EmConfigurator::PrepareModels for EnergyLoss n= "
232 for(
size_t i=0; i<n; ++i) {
234 if(processName == processes[i]) {
235 if((particleName == particles[i]) ||
236 (particles[i] ==
"all") ||
237 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
238 G4Region* reg = FindRegion(regions[i]);
245 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
248 G4cout <<
"### Added eloss model order= " << index <<
" for "
249 << particleName <<
" and " << processName <<
G4endl;
268 size_t n = particles.size();
270 G4cout <<
" G4EmConfigurator::PrepareModels for EM process n= "
277 for(
size_t i=0; i<n; ++i) {
278 if(processName == processes[i]) {
279 if((particleName == particles[i]) ||
280 (particles[i] ==
"all") ||
281 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
282 G4Region* reg = FindRegion(regions[i]);
288 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
291 G4cout <<
"### Added em model order= " << index <<
" for "
292 << particleName <<
" and " << processName <<
G4endl;
309 size_t n = particles.size();
311 G4cout <<
" G4EmConfigurator::PrepareModels for MSC process n= "
318 for(
size_t i=0; i<n; ++i) {
319 if(processName == processes[i]) {
320 if((particleName == particles[i]) ||
321 (particles[i] ==
"all") ||
322 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
323 G4Region* reg = FindRegion(regions[i]);
328 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
362 if(r ==
"" || r ==
"world" || r ==
"World") {
363 r =
"DefaultRegionForTheWorld";
367 G4cout <<
"### G4EmConfigurator WARNING: fails to find a region <"
369 }
else if(verbose > 1) {
370 G4cout <<
"### G4EmConfigurator finds out G4Region <" << r <<
">"
385 G4cout <<
"### G4EmConfigurator WARNING: empty energy interval"
387 <<
"> Emin(MeV)= " << e1/CLHEP::MeV
388 <<
"> Emax(MeV)= " << e2/CLHEP::MeV
396 <<
" Emin(MeV)= " << e1/MeV <<
" Emax(MeV)= " << e2/MeV
G4GLOB_DLL std::ostream G4cout
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String ®ionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=nullptr)
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
G4EmConfigurator(G4int verboseLevel=1)
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
void reset(G4bool ifSkipIon=true)
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
G4int GetProcessListLength() const
G4ProcessVector * GetProcessList() const
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
const G4String & GetName() const
const G4String & GetName() const
void SetHighEnergyLimit(G4double)
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void SetActivationHighEnergyLimit(G4double)
const G4String & GetName() const
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
void SetFluctModel(G4VEmFluctuationModel *)
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=nullptr)
G4int GetProcessSubType() const
const G4String & GetProcessName() const