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);
99 flucModels.push_back(0);
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) {
120 G4Region* reg = FindRegion(regions[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;
156 theParticleIterator->
reset();
157 while( (*theParticleIterator)() ) {
163 (particleName ==
"all") ||
164 (particleName ==
"charged" && part->
GetPDGCharge() != 0.0)) {
174 for(
G4int i=0; i<np; ++i) {
175 if(processName == (*plist)[i]->GetProcessName()) {
181 G4cout <<
"### G4EmConfigurator WARNING: fails to find a process <"
182 << processName <<
"> for " << particleName <<
G4endl;
187 if(!UpdateModelEnergyRange(mod, emin, emax)) {
return; }
191 if(10 == ii && mod) {
195 G4cout <<
"### Added msc model order= " << index <<
" for "
196 << particleName <<
" and " << processName <<
G4endl;
199 }
else if(2 <= ii && 4 >= ii) {
206 G4cout <<
"### Added eloss model order= " << index <<
" for "
207 << particleName <<
" and " << processName <<
G4endl;
215 G4cout <<
"### Added em model order= " << index <<
" for "
216 << particleName <<
" and " << processName <<
G4endl;
232 size_t n = particles.size();
234 G4cout <<
" G4EmConfigurator::PrepareModels for EnergyLoss n= "
241 for(
size_t i=0; i<
n; ++i) {
243 if(processName == processes[i]) {
244 if((particleName == particles[i]) ||
245 (particles[i] ==
"all") ||
246 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
247 G4Region* reg = FindRegion(regions[i]);
254 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
257 G4cout <<
"### Added eloss model order= " << index <<
" for "
258 << particleName <<
" and " << processName <<
G4endl;
277 size_t n = particles.size();
279 G4cout <<
" G4EmConfigurator::PrepareModels for EM process n= "
286 for(
size_t i=0; i<
n; ++i) {
287 if(processName == processes[i]) {
288 if((particleName == particles[i]) ||
289 (particles[i] ==
"all") ||
290 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
291 G4Region* reg = FindRegion(regions[i]);
297 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
300 G4cout <<
"### Added em model order= " << index <<
" for "
301 << particleName <<
" and " << processName <<
G4endl;
318 size_t n = particles.size();
320 G4cout <<
" G4EmConfigurator::PrepareModels for MSC process n= "
327 for(
size_t i=0; i<
n; ++i) {
328 if(processName == processes[i]) {
329 if((particleName == particles[i]) ||
330 (particles[i] ==
"all") ||
331 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
332 G4Region* reg = FindRegion(regions[i]);
337 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
339 G4cout <<
"### Added msc model order= " << index <<
" for "
340 << particleName <<
" and " << processName <<
G4endl;
371 if(r ==
"" || r ==
"world" || r ==
"World") {
372 r =
"DefaultRegionForTheWorld";
376 G4cout <<
"### G4EmConfigurator WARNING: fails to find a region <"
378 }
else if(verbose > 1) {
379 G4cout <<
"### G4EmConfigurator finds out G4Region <" << r <<
">"
394 G4cout <<
"### G4EmConfigurator WARNING: empty energy interval"
396 <<
"> Emin(MeV)= " << e1/CLHEP::MeV
397 <<
"> Emax(MeV)= " << e2/CLHEP::MeV
405 <<
" Emin(MeV)= " << e1/
MeV <<
" Emax(MeV)= " << e2/
MeV
G4double LowEnergyLimit() const
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
const G4String & GetName() const
G4double HighEnergyLimit() const
void SetFluctModel(G4VEmFluctuationModel *)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void SetHighEnergyLimit(G4double)
static G4RegionStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
void reset(G4bool ifSkipIon=true)
G4EmConfigurator(G4int verboseLevel=1)
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=0)
const G4String & GetProcessName() const
static G4ParticleTable * GetParticleTable()
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=0)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=0)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
const G4String & GetName() const
void SetLowEnergyLimit(G4double)
G4double GetPDGCharge() const
G4int GetProcessListLength() const
G4int GetProcessSubType() const
G4PTblDicIterator * GetIterator() const
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String ®ionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=0)
#define theParticleIterator
G4ProcessVector * GetProcessList() const