85 if(
nullptr == mod) {
return; }
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(emin0);
106 highEnergy.push_back(emax0);
113 size_t n = models.size();
115 G4cout <<
"### G4EmConfigurator::AddModels n= " << n <<
G4endl;
118 for(
size_t i=0; i<n; ++i) {
119 if(
nullptr != models[i]) {
123 SetModelForRegion(models[i],flucModels[i],reg,
124 particles[i],processes[i],
125 lowEnergy[i],highEnergy[i]);
135void G4EmConfigurator::SetModelForRegion(
G4VEmModel* mod,
142 if(
nullptr == mod) {
return; }
144 G4cout <<
" G4EmConfigurator::SetModelForRegion: " << mod->
GetName()
146 G4cout <<
" For " << particleName
147 <<
" and " << processName
148 <<
" in the region <" << reg->
GetName()
149 <<
" Emin(MeV)= " << emin/MeV
150 <<
" Emax(MeV)= " << emax/MeV;
151 if(
nullptr != fm) {
G4cout <<
" FLmodel " << fm->
GetName(); }
157 myParticleIterator->
reset();
158 while( (*myParticleIterator)() ) {
162 (particleName ==
"all") ||
163 (particleName ==
"charged" && part->
GetPDGCharge() != 0.0)) {
171 G4cout <<
"Check process <" << processName <<
"> for "
172 << particleName <<
" in list of " << np <<
" processes"
176 for(
G4int i=0; i<np; ++i) {
177 if(processName == (*plist)[i]->GetProcessName()) {
182 G4bool isCombinedMscTrans =
false;
184 if(
nullptr == proc) {
185 if(processName ==
"msc") {
186 for(
G4int i=0; i<np; ++i) {
188 if(
nullptr != trans) {
189 G4cout <<
"G4TransportationWithMsc is found out!" <<
G4endl;
190 isCombinedMscTrans =
true;
196 if(
nullptr == proc) {
198 G4cout <<
"### G4EmConfigurator WARNING: fails to find a process <"
199 << processName <<
"> for " << particleName <<
G4endl;
205 if(!UpdateModelEnergyRange(mod, emin, emax)) {
return; }
209 if(isCombinedMscTrans &&
nullptr != msc) {
212 G4cout <<
"### Added msc model order= " << index <<
" for "
216 }
else if(10 == ii &&
nullptr != msc) {
221 G4cout <<
"### Added msc model order= " << index <<
" for "
222 << particleName <<
" and " << processName <<
G4endl;
225 }
else if(2 <= ii && 4 >= ii) {
230 G4cout <<
"### Added eloss model order= " << index <<
" for "
231 << particleName <<
" and " << processName <<
G4endl;
239 G4cout <<
"### Added em model order= " << index <<
" for "
240 << particleName <<
" and " << processName <<
G4endl;
255 size_t n = particles.size();
257 G4cout <<
" G4EmConfigurator::PrepareModels for EnergyLoss n= "
264 for(
size_t i=0; i<n; ++i) {
266 if(processName == processes[i]) {
267 if((particleName == particles[i]) ||
268 (particles[i] ==
"all") ||
269 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
277 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
280 G4cout <<
"### Added eloss model order= " << index <<
" for "
281 << particleName <<
" and " << processName
285 }
else if(
nullptr != fm) {
301 size_t n = particles.size();
303 G4cout <<
" G4EmConfigurator::PrepareModels for EM process n= "
310 for(
size_t i=0; i<n; ++i) {
311 if(processName == processes[i]) {
312 if((particleName == particles[i]) ||
313 (particles[i] ==
"all") ||
314 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
321 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
324 G4cout <<
"### Added em model order= " << index <<
" for "
325 << particleName <<
" and " << processName <<
G4endl;
343 size_t n = particles.size();
345 G4cout <<
" G4EmConfigurator::PrepareModels for MSC process n= "
352 for(
size_t i=0; i<n; ++i) {
353 if(processName == processes[i]) {
354 if((particleName == particles[i]) ||
355 (particles[i] ==
"all") ||
356 (particles[i] ==
"charged" && aParticle->
GetPDGCharge() != 0.0)) {
362 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) {
401 G4cout <<
"### G4EmConfigurator WARNING: empty energy interval"
403 <<
"> Emin(MeV)= " << e1/CLHEP::MeV
404 <<
"> Emax(MeV)= " << e2/CLHEP::MeV
412 <<
" 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)
static const G4Region * FindRegion(const G4String ®ionName, const G4int verbose=0)
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
const G4String & GetName() const
void AddMscModel(G4VMscModel *mscModel, G4int order=0, const G4Region *region=nullptr)
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 AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=nullptr, const G4Region *region=nullptr)
void SetFluctModel(G4VEmFluctuationModel *)
void AddEmModel(G4int order, G4VMscModel *, const G4Region *region=nullptr)
G4int GetProcessSubType() const
const G4String & GetProcessName() const