#include <G4LossTableManager.hh>
|
| ~G4LossTableManager () |
|
void | Clear () |
|
void | PreparePhysicsTable (const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p, G4bool theMaster) |
|
void | PreparePhysicsTable (const G4ParticleDefinition *aParticle, G4VEmProcess *p, G4bool theMaster) |
|
void | PreparePhysicsTable (const G4ParticleDefinition *aParticle, G4VMultipleScattering *p, G4bool theMaster) |
|
void | BuildPhysicsTable (const G4ParticleDefinition *aParticle) |
|
void | BuildPhysicsTable (const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p) |
|
void | LocalPhysicsTables (const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p) |
|
G4double | GetDEDX (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple) |
|
G4double | GetSubDEDX (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple) |
|
G4double | GetRange (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple) |
|
G4double | GetCSDARange (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple) |
|
G4double | GetRangeFromRestricteDEDX (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple) |
|
G4double | GetEnergy (const G4ParticleDefinition *aParticle, G4double range, const G4MaterialCutsCouple *couple) |
|
G4double | GetDEDXDispersion (const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double &length) |
|
void | Register (G4VEnergyLossProcess *p) |
|
void | DeRegister (G4VEnergyLossProcess *p) |
|
void | Register (G4VMultipleScattering *p) |
|
void | DeRegister (G4VMultipleScattering *p) |
|
void | Register (G4VEmProcess *p) |
|
void | DeRegister (G4VEmProcess *p) |
|
void | Register (G4VEmModel *p) |
|
void | DeRegister (G4VEmModel *p) |
|
void | Register (G4VEmFluctuationModel *p) |
|
void | DeRegister (G4VEmFluctuationModel *p) |
|
void | RegisterExtraParticle (const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p) |
|
void | SetVerbose (G4int val) |
|
void | SetAtomDeexcitation (G4VAtomDeexcitation *) |
|
void | SetSubCutProducer (G4VSubCutProducer *) |
|
G4bool | IsMaster () const |
|
G4VEnergyLossProcess * | GetEnergyLossProcess (const G4ParticleDefinition *) |
|
const std::vector
< G4VEnergyLossProcess * > & | GetEnergyLossProcessVector () |
|
const std::vector
< G4VEmProcess * > & | GetEmProcessVector () |
|
const std::vector
< G4VMultipleScattering * > & | GetMultipleScatteringVector () |
|
G4EmSaturation * | EmSaturation () |
|
G4EmConfigurator * | EmConfigurator () |
|
G4ElectronIonPair * | ElectronIonPair () |
|
G4EmCorrections * | EmCorrections () |
|
G4VAtomDeexcitation * | AtomDeexcitation () |
|
G4VSubCutProducer * | SubCutProducer () |
|
G4LossTableBuilder * | GetTableBuilder () |
|
Definition at line 100 of file G4LossTableManager.hh.
G4LossTableManager::~G4LossTableManager |
( |
| ) |
|
Definition at line 123 of file G4LossTableManager.cc.
126 for (
G4int i=0; i<n_loss; ++i) {
128 if( loss_vector[i] ) {
129 delete loss_vector[i];
132 size_t msc = msc_vector.size();
133 for (
size_t j=0; j<msc; ++j) {
134 if( msc_vector[j] ) {
delete msc_vector[j]; }
136 size_t emp = emp_vector.size();
137 for (
size_t k=0; k<emp; ++k) {
138 if( emp_vector[k] ) {
delete emp_vector[k]; }
140 size_t mod = mod_vector.size();
141 size_t fmod = fmod_vector.size();
143 for (
size_t a=0; a<mod; ++a) {
145 if(
nullptr != mod_vector[a] ) {
146 for (
size_t b=0; b<fmod; ++b) {
147 if((
G4VEmModel*)(fmod_vector[b]) == mod_vector[a]) {
148 fmod_vector[b] =
nullptr;
151 delete mod_vector[a];
152 mod_vector[a] =
nullptr;
155 for (
size_t b=0; b<fmod; ++b) {
156 if( fmod_vector[b] ) {
delete fmod_vector[b]; }
160 delete emCorrections;
161 delete emConfigurator;
162 delete emElectronIonPair;
163 delete atomDeexcitation;
164 delete subcutProducer;
Definition at line 499 of file G4LossTableManager.cc.
501 if(-1 == run && startInitialisation) {
502 if(emConfigurator) { emConfigurator->
Clear(); }
Definition at line 588 of file G4LossTableManager.cc.
593 G4cout <<
"### G4LossTableManager::BuildPhysicsTable() for "
598 if(-1 == run && startInitialisation) {
599 if(emConfigurator) { emConfigurator->
Clear(); }
600 firstParticle = aParticle;
602 if(startInitialisation) {
605 G4cout <<
"===== G4LossTableManager::BuildPhysicsTable() for run "
606 << run <<
" ===== " << atomDeexcitation <<
G4endl;
608 currentParticle =
nullptr;
609 all_tables_are_built=
true;
613 if ( startInitialisation && aParticle == firstParticle ) {
615 startInitialisation =
false;
617 G4cout <<
"### G4LossTableManager start initilisation for first particle "
621 for (
G4int i=0; i<n_loss; ++i) {
627 tables_are_built[i] =
false;
628 all_tables_are_built=
false;
631 tables_are_built[i] =
true;
639 G4cout <<
" active= " << isActive[i]
640 <<
" table= " << tables_are_built[i]
642 if(base_part_vector[i]) {
643 G4cout <<
" base particle "
644 << base_part_vector[i]->GetParticleName();
649 tables_are_built[i] =
true;
650 part_vector[i] =
nullptr;
656 if (all_tables_are_built) {
return; }
659 all_tables_are_built =
true;
661 for(
G4int i=0; i<n_loss; ++i) {
662 if(p == loss_vector[i] && !tables_are_built[i] && !base_part_vector[i]) {
667 <<
" " << tables_are_built[i] <<
" " << base_part_vector[i] <<
G4endl;
671 CopyTables(curr_part, curr_proc);
673 loss_map[aParticle] =
p;
679 if ( !tables_are_built[i] ) { all_tables_are_built =
false; }
682 G4cout <<
"### G4LossTableManager::BuildPhysicsTable end: "
683 <<
"all_tables_are_built= " << all_tables_are_built <<
" "
686 if(all_tables_are_built) {
688 G4cout <<
"%%%%% All dEdx and Range tables are built for master run= "
689 << run <<
" %%%%%" <<
G4endl;
void SetIonisation(G4bool val)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * BaseParticle() const
const G4String & GetProcessName() const
const G4ParticleDefinition * Particle() const
G4bool IsIonisationProcess() const
void G4LossTableManager::Clear |
( |
| ) |
|
Definition at line 198 of file G4LossTableManager.cc.
200 all_tables_are_built =
false;
201 currentLoss =
nullptr;
202 currentParticle =
nullptr;
206 range_vector.clear();
207 inv_range_vector.clear();
211 base_part_vector.clear();
212 tables_are_built.clear();
Definition at line 263 of file G4LossTableManager.cc.
266 for (
G4int i=0; i<n_loss; ++i) {
267 if(loss_vector[i] == p) { loss_vector[i] =
nullptr; }
Definition at line 289 of file G4LossTableManager.cc.
292 size_t msc = msc_vector.size();
293 for (
size_t i=0; i<msc; ++i) {
294 if(msc_vector[i] == p) { msc_vector[i] =
nullptr; }
Definition at line 316 of file G4LossTableManager.cc.
319 size_t emp = emp_vector.size();
320 for (
size_t i=0; i<emp; ++i) {
321 if(emp_vector[i] == p) { emp_vector[i] =
nullptr; }
Definition at line 338 of file G4LossTableManager.cc.
341 size_t n = mod_vector.size();
342 for (
size_t i=0; i<
n; ++i) {
343 if(mod_vector[i] == p) {
344 mod_vector[i] =
nullptr;
Definition at line 363 of file G4LossTableManager.cc.
365 size_t n = fmod_vector.size();
366 for (
size_t i=0; i<
n; ++i) {
367 if(fmod_vector[i] == p) { fmod_vector[i] =
nullptr; }
Definition at line 361 of file G4LossTableManager.hh.
367 if(currentLoss) { x = currentLoss->
GetCSDARange(kineticEnergy, couple); }
G4double GetCSDARange(G4double &kineticEnergy, const G4MaterialCutsCouple *)
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
Definition at line 335 of file G4LossTableManager.hh.
341 if(currentLoss) { x = currentLoss->
GetDEDX(kineticEnergy, couple); }
G4double GetDEDX(G4double &kineticEnergy, const G4MaterialCutsCouple *)
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
Definition at line 416 of file G4LossTableManager.hh.
const G4ParticleDefinition * GetParticleDefinition() const
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double length)
const std::vector< G4VEmProcess * > & G4LossTableManager::GetEmProcessVector |
( |
| ) |
|
Definition at line 403 of file G4LossTableManager.hh.
G4double GetKineticEnergy(G4double &range, const G4MaterialCutsCouple *)
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
Definition at line 313 of file G4LossTableManager.hh.
317 if(aParticle != currentParticle) {
318 currentParticle = aParticle;
319 std::map<PD,G4VEnergyLossProcess*,std::less<PD> >::const_iterator
pos;
320 if ((pos = loss_map.find(aParticle)) != loss_map.end()) {
321 currentLoss = (*pos).second;
324 if ((pos = loss_map.find(theGenericIon)) != loss_map.end()) {
325 currentLoss = (*pos).second;
static const G4double pos
Definition at line 388 of file G4LossTableManager.hh.
395 x = currentLoss->
GetRange(kineticEnergy, couple);
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
G4double GetRange(G4double &kineticEnergy, const G4MaterialCutsCouple *)
Definition at line 374 of file G4LossTableManager.hh.
381 if(currentLoss) { x = currentLoss->
GetRangeForLoss(kineticEnergy, couple); }
G4double GetRangeForLoss(G4double &kineticEnergy, const G4MaterialCutsCouple *)
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
Definition at line 348 of file G4LossTableManager.hh.
354 if(currentLoss) { x = currentLoss->
GetDEDXForSubsec(kineticEnergy, couple); }
G4double GetDEDXForSubsec(G4double &kineticEnergy, const G4MaterialCutsCouple *)
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
G4bool G4LossTableManager::IsMaster |
( |
| ) |
const |
|
inline |
Definition at line 508 of file G4LossTableManager.cc.
513 G4cout <<
"### G4LossTableManager::LocalPhysicsTable() for "
519 if(-1 == run && startInitialisation) {
520 if(emConfigurator) { emConfigurator->
Clear(); }
521 firstParticle = aParticle;
524 if(startInitialisation) {
527 G4cout <<
"===== G4LossTableManager::LocalPhysicsTable() for run "
528 << run <<
" =====" <<
G4endl;
530 currentParticle =
nullptr;
531 startInitialisation =
false;
532 for (
G4int i=0; i<n_loss; ++i) {
534 tables_are_built[i] =
false;
536 tables_are_built[i] =
true;
537 part_vector[i] =
nullptr;
542 all_tables_are_built=
true;
543 for (
G4int i=0; i<n_loss; ++i) {
544 if(p == loss_vector[i]) {
545 tables_are_built[i] =
true;
553 loss_map[part_vector[i]] =
p;
561 G4cout <<
" for " << part_vector[i]->GetParticleName();
563 G4cout <<
" active= " << isActive[i]
564 <<
" table= " << tables_are_built[i]
569 }
else if(!tables_are_built[i]) {
570 all_tables_are_built =
false;
575 G4cout <<
"### G4LossTableManager::LocalPhysicsTable end"
578 if(all_tables_are_built) {
580 G4cout <<
"%%%%% All dEdx and Range tables for worker are ready for run "
581 << run <<
" %%%%%" <<
G4endl;
G4PhysicsTable * RangeTableForLoss() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4PhysicsTable * DEDXTable() const
const G4ParticleDefinition * BaseParticle() const
const G4String & GetProcessName() const
G4PhysicsTable * InverseRangeTable() const
const G4ParticleDefinition * Particle() const
G4bool IsIonisationProcess() const
Definition at line 400 of file G4LossTableManager.cc.
405 G4cout <<
"G4LossTableManager::PreparePhysicsTable for "
406 << particle->GetParticleName()
408 <<
" loss_vector " << loss_vector.size() <<
G4endl;
411 isMaster = theMaster;
413 if(!startInitialisation) {
416 G4cout <<
"====== G4LossTableManager::PreparePhysicsTable start ====="
423 if(emConfigurator) { emConfigurator->
PrepareModels(particle, p); }
426 for (
G4int j=0; j<n_loss; ++j) {
427 if (p == loss_vector[j] && !part_vector[j]) {
428 part_vector[j] = particle;
429 if(particle->GetParticleName() ==
"GenericIon") {
430 theGenericIon = particle;
435 startInitialisation =
true;
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
Definition at line 441 of file G4LossTableManager.cc.
445 G4cout <<
"G4LossTableManager::PreparePhysicsTable for "
446 << particle->GetParticleName()
449 isMaster = theMaster;
451 if(!startInitialisation) {
454 G4cout <<
"====== G4LossTableManager::PreparePhysicsTable start ====="
461 if(emConfigurator) { emConfigurator->
PrepareModels(particle, p); }
463 startInitialisation =
true;
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
Definition at line 469 of file G4LossTableManager.cc.
474 G4cout <<
"G4LossTableManager::PreparePhysicsTable for "
475 << particle->GetParticleName()
479 isMaster = theMaster;
481 if(!startInitialisation) {
484 G4cout <<
"====== G4LossTableManager::PreparePhysicsTable start ====="
491 if(emConfigurator) { emConfigurator->
PrepareModels(particle, p); }
493 startInitialisation =
true;
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
Definition at line 220 of file G4LossTableManager.cc.
223 for (
G4int i=0; i<n_loss; ++i) {
224 if(loss_vector[i] == p) {
return; }
227 G4cout <<
"G4LossTableManager::Register G4VEnergyLossProcess : "
231 loss_vector.push_back(p);
232 part_vector.push_back(
nullptr);
233 base_part_vector.push_back(
nullptr);
234 dedx_vector.push_back(
nullptr);
235 range_vector.push_back(
nullptr);
236 inv_range_vector.push_back(
nullptr);
237 tables_are_built.push_back(
false);
238 isActive.push_back(
true);
239 all_tables_are_built =
false;
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
Definition at line 273 of file G4LossTableManager.cc.
276 G4int n = msc_vector.size();
277 for (
G4int i=0; i<
n; ++i) {
278 if(msc_vector[i] == p) {
return; }
281 G4cout <<
"G4LossTableManager::Register G4VMultipleScattering : "
284 msc_vector.push_back(p);
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
Definition at line 300 of file G4LossTableManager.cc.
303 G4int n = emp_vector.size();
304 for (
G4int i=0; i<
n; ++i) {
305 if(emp_vector[i] == p) {
return; }
308 G4cout <<
"G4LossTableManager::Register G4VEmProcess : "
311 emp_vector.push_back(p);
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
Definition at line 327 of file G4LossTableManager.cc.
329 mod_vector.push_back(p);
331 G4cout <<
"G4LossTableManager::Register G4VEmModel : "
332 << p->
GetName() <<
" " << p <<
" " << mod_vector.size() <<
G4endl;
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
Definition at line 352 of file G4LossTableManager.cc.
354 fmod_vector.push_back(p);
356 G4cout <<
"G4LossTableManager::Register G4VEmFluctuationModel : "
const G4String & GetName() const
G4GLOB_DLL std::ostream G4cout
Definition at line 373 of file G4LossTableManager.cc.
377 if(!p || !part) {
return; }
378 for (
G4int i=0; i<n_loss; ++i) {
379 if(loss_vector[i] == p) {
return; }
382 G4cout <<
"G4LossTableManager::RegisterExtraParticle "
383 << part->GetParticleName() <<
" G4VEnergyLossProcess : "
387 loss_vector.push_back(p);
388 part_vector.push_back(part);
390 dedx_vector.push_back(
nullptr);
391 range_vector.push_back(
nullptr);
392 inv_range_vector.push_back(
nullptr);
393 tables_are_built.push_back(
false);
394 all_tables_are_built =
false;
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * BaseParticle() const
const G4String & GetProcessName() const
Definition at line 990 of file G4LossTableManager.cc.
992 if(atomDeexcitation != p) {
993 delete atomDeexcitation;
994 atomDeexcitation =
p;
void G4LossTableManager::SetVerbose |
( |
G4int |
val | ) |
|
The documentation for this class was generated from the following files: