#include <G4EmConfigurator.hh>
Public Member Functions | |
G4EmConfigurator (G4int verboseLevel=1) | |
~G4EmConfigurator () | |
void | SetExtraEmModel (const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String ®ionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=0) |
void | AddModels () |
void | PrepareModels (const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p) |
void | PrepareModels (const G4ParticleDefinition *aParticle, G4VEmProcess *p) |
void | PrepareModels (const G4ParticleDefinition *aParticle, G4VMultipleScattering *p) |
void | Clear () |
void | SetVerbose (G4int value) |
Definition at line 63 of file G4EmConfigurator.hh.
G4EmConfigurator::G4EmConfigurator | ( | G4int | verboseLevel = 1 |
) |
G4EmConfigurator::~G4EmConfigurator | ( | ) |
void G4EmConfigurator::AddModels | ( | ) |
Definition at line 111 of file G4EmConfigurator.cc.
References Clear(), G4cout, G4endl, and CLHEP::detail::n.
00112 { 00113 size_t n = models.size(); 00114 if(0 < verbose) { 00115 G4cout << "### G4EmConfigurator::AddModels n= " << n << G4endl; 00116 } 00117 if(n > 0) { 00118 for(size_t i=0; i<n; ++i) { 00119 if(models[i]) { 00120 G4Region* reg = FindRegion(regions[i]); 00121 if(reg) { 00122 --index; 00123 SetModelForRegion(models[i],flucModels[i],reg, 00124 particles[i],processes[i], 00125 lowEnergy[i],highEnergy[i]); 00126 } 00127 } 00128 } 00129 } 00130 Clear(); 00131 }
void G4EmConfigurator::Clear | ( | ) |
Definition at line 352 of file G4EmConfigurator.cc.
Referenced by AddModels(), and G4LossTableManager::BuildPhysicsTable().
00353 { 00354 particles.clear(); 00355 processes.clear(); 00356 models.clear(); 00357 flucModels.clear(); 00358 regions.clear(); 00359 lowEnergy.clear(); 00360 highEnergy.clear(); 00361 }
void G4EmConfigurator::PrepareModels | ( | const G4ParticleDefinition * | aParticle, | |
G4VMultipleScattering * | p | |||
) |
Definition at line 315 of file G4EmConfigurator.cc.
References G4VMultipleScattering::AddEmModel(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGCharge(), G4VProcess::GetProcessName(), and CLHEP::detail::n.
00317 { 00318 size_t n = particles.size(); 00319 if(1 < verbose) { 00320 G4cout << " G4EmConfigurator::PrepareModels for MSC process n= " 00321 << n << G4endl; 00322 } 00323 00324 if(n > 0) { 00325 G4String particleName = aParticle->GetParticleName(); 00326 G4String processName = p->GetProcessName(); 00327 for(size_t i=0; i<n; ++i) { 00328 if(processName == processes[i]) { 00329 if((particleName == particles[i]) || 00330 (particles[i] == "all") || 00331 (particles[i] == "charged" && aParticle->GetPDGCharge() != 0.0)) { 00332 G4Region* reg = FindRegion(regions[i]); 00333 if(reg) { 00334 --index; 00335 G4VEmModel* mod = models[i]; 00336 if(mod) { 00337 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) { 00338 p->AddEmModel(index,mod,reg); 00339 G4cout << "### Added msc model order= " << index << " for " 00340 << particleName << " and " << processName << G4endl; 00341 } 00342 } 00343 } 00344 } 00345 } 00346 } 00347 } 00348 }
void G4EmConfigurator::PrepareModels | ( | const G4ParticleDefinition * | aParticle, | |
G4VEmProcess * | p | |||
) |
Definition at line 274 of file G4EmConfigurator.cc.
References G4VEmProcess::AddEmModel(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGCharge(), G4VProcess::GetProcessName(), and CLHEP::detail::n.
00276 { 00277 size_t n = particles.size(); 00278 if(1 < verbose) { 00279 G4cout << " G4EmConfigurator::PrepareModels for EM process n= " 00280 << n << G4endl; 00281 } 00282 if(n > 0) { 00283 G4String particleName = aParticle->GetParticleName(); 00284 G4String processName = p->GetProcessName(); 00285 //G4cout << particleName << " " << particleName << G4endl; 00286 for(size_t i=0; i<n; ++i) { 00287 if(processName == processes[i]) { 00288 if((particleName == particles[i]) || 00289 (particles[i] == "all") || 00290 (particles[i] == "charged" && aParticle->GetPDGCharge() != 0.0)) { 00291 G4Region* reg = FindRegion(regions[i]); 00292 //G4cout << "Region " << reg << G4endl; 00293 if(reg) { 00294 --index; 00295 G4VEmModel* mod = models[i]; 00296 if(mod) { 00297 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) { 00298 p->AddEmModel(index,mod,reg); 00299 if(1 < verbose) { 00300 G4cout << "### Added em model order= " << index << " for " 00301 << particleName << " and " << processName << G4endl; 00302 } 00303 } 00304 } 00305 } 00306 } 00307 } 00308 } 00309 } 00310 }
void G4EmConfigurator::PrepareModels | ( | const G4ParticleDefinition * | aParticle, | |
G4VEnergyLossProcess * | p | |||
) |
Definition at line 229 of file G4EmConfigurator.cc.
References G4VEnergyLossProcess::AddEmModel(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGCharge(), G4VProcess::GetProcessName(), CLHEP::detail::n, and G4VEnergyLossProcess::SetFluctModel().
Referenced by G4LossTableManager::PreparePhysicsTable().
00231 { 00232 size_t n = particles.size(); 00233 if(1 < verbose) { 00234 G4cout << " G4EmConfigurator::PrepareModels for EnergyLoss n= " 00235 << n << G4endl; 00236 } 00237 if(n > 0) { 00238 G4String particleName = aParticle->GetParticleName(); 00239 G4String processName = p->GetProcessName(); 00240 //G4cout << particleName << " " << processName << G4endl; 00241 for(size_t i=0; i<n; ++i) { 00242 //G4cout << particles[i] << " " << processes[i] << G4endl; 00243 if(processName == processes[i]) { 00244 if((particleName == particles[i]) || 00245 (particles[i] == "all") || 00246 (particles[i] == "charged" && aParticle->GetPDGCharge() != 0.0)) { 00247 G4Region* reg = FindRegion(regions[i]); 00248 //G4cout << "Region " << reg << G4endl; 00249 if(reg) { 00250 --index; 00251 G4VEmModel* mod = models[i]; 00252 G4VEmFluctuationModel* fm = flucModels[i]; 00253 if(mod) { 00254 if(UpdateModelEnergyRange(mod, lowEnergy[i], highEnergy[i])) { 00255 p->AddEmModel(index,mod,fm,reg); 00256 if(1 < verbose) { 00257 G4cout << "### Added eloss model order= " << index << " for " 00258 << particleName << " and " << processName << G4endl; 00259 } 00260 } 00261 } else if(fm) { 00262 p->SetFluctModel(fm); 00263 } 00264 } 00265 } 00266 } 00267 } 00268 } 00269 }
void G4EmConfigurator::SetExtraEmModel | ( | const G4String & | particleName, | |
const G4String & | processName, | |||
G4VEmModel * | , | |||
const G4String & | regionName = "" , |
|||
G4double | emin = 0.0 , |
|||
G4double | emax = DBL_MAX , |
|||
G4VEmFluctuationModel * | fm = 0 | |||
) |
Definition at line 77 of file G4EmConfigurator.cc.
References G4cout, G4endl, and G4VEmModel::GetName().
00084 { 00085 if(1 < verbose) { 00086 G4cout << " G4EmConfigurator::SetExtraEmModel " << mod->GetName() 00087 << " for " << particleName 00088 << " and " << processName 00089 << " in the region <" << regionName 00090 << "> Emin(MeV)= " << emin/MeV 00091 << " Emax(MeV)= " << emax/MeV 00092 << G4endl; 00093 } 00094 if(mod || fm) { 00095 models.push_back(mod); 00096 flucModels.push_back(fm); 00097 } else { 00098 models.push_back(new G4DummyModel()); 00099 flucModels.push_back(0); 00100 } 00101 00102 particles.push_back(particleName); 00103 processes.push_back(processName); 00104 regions.push_back(regionName); 00105 lowEnergy.push_back(emin); 00106 highEnergy.push_back(emax); 00107 }
void G4EmConfigurator::SetVerbose | ( | G4int | value | ) | [inline] |