#include <G4HadronicProcessStore.hh>
Definition at line 68 of file G4HadronicProcessStore.hh.
G4HadronicProcessStore::~G4HadronicProcessStore | ( | ) |
Definition at line 76 of file G4HadronicProcessStore.cc.
References G4CrossSectionDataSetRegistry::Clean(), G4HadronicInteractionRegistry::Clean(), Clean(), G4CrossSectionDataSetRegistry::Instance(), and G4HadronicInteractionRegistry::Instance().
00077 { 00078 Clean(); 00079 G4HadronicInteractionRegistry::Instance()->Clean(); 00080 G4CrossSectionDataSetRegistry::Instance()->Clean(); 00081 delete theEPTestMessenger; 00082 }
void G4HadronicProcessStore::Clean | ( | ) |
Definition at line 86 of file G4HadronicProcessStore.cc.
Referenced by ~G4HadronicProcessStore().
00087 { 00088 G4int i; 00089 //G4cout << "G4HadronicProcessStore::Clean() Nproc= " << n_proc 00090 // << " Nextra= " << n_extra << G4endl; 00091 if(n_proc > 0) { 00092 for (i=0; i<n_proc; ++i) { 00093 if( process[i] ) { 00094 //G4cout << "G4HadronicProcessStore::Clean() delete hadronic " << i << G4endl; 00095 //G4cout << process[i]->GetProcessName() << G4endl; 00096 G4HadronicProcess* p = process[i]; 00097 process[i] = 0; 00098 delete p; 00099 } 00100 } 00101 } 00102 if(n_extra > 0) { 00103 for(i=0; i<n_extra; ++i) { 00104 if(extraProcess[i]) { 00105 //G4cout << "G4HadronicProcessStore::Clean() delete extra " 00106 // << i << G4endl; 00107 //G4cout << extraProcess[i]->GetProcessName() << G4endl; 00108 G4VProcess* p = extraProcess[i]; 00109 extraProcess[i] = 0; 00110 delete p; 00111 } 00112 } 00113 } 00114 //G4cout << "G4HadronicProcessStore::Clean() done" << G4endl; 00115 n_extra = 0; 00116 n_proc = 0; 00117 }
void G4HadronicProcessStore::DeRegister | ( | G4HadronicProcess * | ) |
Definition at line 470 of file G4HadronicProcessStore.cc.
Referenced by G4HadronicProcess::~G4HadronicProcess().
00471 { 00472 if(0 == n_proc) return; 00473 for(G4int i=0; i<n_proc; ++i) { 00474 if(process[i] == proc) { 00475 process[i] = 0; 00476 return; 00477 } 00478 } 00479 }
void G4HadronicProcessStore::DeRegisterExtraProcess | ( | G4VProcess * | ) |
Definition at line 530 of file G4HadronicProcessStore.cc.
Referenced by G4AntiNeutronAnnihilationAtRest::~G4AntiNeutronAnnihilationAtRest(), G4AntiProtonAnnihilationAtRest::~G4AntiProtonAnnihilationAtRest(), G4HadronStoppingProcess::~G4HadronStoppingProcess(), G4KaonMinusAbsorption::~G4KaonMinusAbsorption(), G4KaonMinusAbsorptionAtRest::~G4KaonMinusAbsorptionAtRest(), G4MuonMinusCaptureAtRest::~G4MuonMinusCaptureAtRest(), G4NeutronCaptureAtRest::~G4NeutronCaptureAtRest(), G4PiMinusAbsorptionAtRest::~G4PiMinusAbsorptionAtRest(), and G4PionMinusAbsorptionAtRest::~G4PionMinusAbsorptionAtRest().
00531 { 00532 //G4cout << "Deregister Extra Process: " << proc << " "<<proc->GetProcessName()<< G4endl; 00533 if(0 == n_extra) { return; } 00534 for(G4int i=0; i<n_extra; ++i) { 00535 if(extraProcess[i] == proc) { 00536 extraProcess[i] = 0; 00537 //G4cout << "Extra Process: " << i << " is deregisted " << G4endl; 00538 return; 00539 } 00540 } 00541 }
void G4HadronicProcessStore::Dump | ( | G4int | level | ) |
Definition at line 678 of file G4HadronicProcessStore.cc.
References G4cout, G4endl, and G4VProcess::GetProcessName().
Referenced by PrintInfo().
00679 { 00680 if(level > 0) { 00681 G4cout << "==============================================================" 00682 << "==============================" 00683 << G4endl; 00684 G4cout << " HADRONIC PROCESSES SUMMARY (verbose level " << level 00685 << ")" << G4endl; 00686 } 00687 for(G4int i=0; i<n_part; ++i) { 00688 PD part = particle[i]; 00689 G4String pname = part->GetParticleName(); 00690 G4bool yes = false; 00691 if(level >= 2) yes = true; 00692 00693 else if(level == 1 && (pname == "proton" || 00694 pname == "neutron" || 00695 pname == "pi+" || 00696 pname == "pi-" || 00697 pname == "gamma" || 00698 pname == "e+" || 00699 pname == "e-" || 00700 pname == "mu+" || 00701 pname == "mu-" || 00702 pname == "kaon+" || 00703 pname == "kaon-" || 00704 pname == "lambda" || 00705 pname == "GenericIon" || 00706 pname == "anti_neutron" || 00707 pname == "anti_proton")) yes = true; 00708 if(yes) { 00709 // main processes 00710 std::multimap<PD,HP,std::less<PD> >::iterator it; 00711 00712 for(it=p_map.lower_bound(part); it!=p_map.upper_bound(part); ++it) { 00713 if(it->first == part) { 00714 HP proc = (it->second); 00715 G4int j=0; 00716 for(; j<n_proc; ++j) { 00717 if(process[j] == proc) { 00718 Print(j, i); 00719 } 00720 } 00721 } 00722 } 00723 // extra processes 00724 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp; 00725 for(itp=ep_map.lower_bound(part); itp!=ep_map.upper_bound(part); ++itp) { 00726 if(itp->first == part) { 00727 G4VProcess* proc = (itp->second); 00728 if(wasPrinted[i] == 0) { 00729 wasPrinted[i] = 1; 00730 G4cout<<G4endl; 00731 G4cout << " Hadronic Processes for <" 00732 <<part->GetParticleName() << ">" << G4endl; 00733 } 00734 G4cout << " " << proc->GetProcessName() << G4endl; 00735 } 00736 } 00737 } 00738 } 00739 if(level > 0) { 00740 G4cout << "==============================================================" 00741 << "==============================" 00742 << G4endl; 00743 } 00744 }
void G4HadronicProcessStore::DumpHtml | ( | ) |
Definition at line 556 of file G4HadronicProcessStore.cc.
References G4Alpha::Alpha(), G4Electron::Electron(), G4Gamma::Gamma(), G4KaonMinus::KaonMinus(), G4KaonPlus::KaonPlus(), G4Lambda::Lambda(), G4Neutron::Neutron(), G4PionMinus::PionMinus(), G4PionPlus::PionPlus(), G4Positron::Positron(), PrintHtml(), and G4Proton::Proton().
Referenced by PrintInfo().
00557 { 00558 // Automatic generation of html documentation page for physics lists 00559 // List processes, models and cross sections for the most important 00560 // particles in descending order of importance 00561 00562 char* dirName = getenv("G4PhysListDocDir"); 00563 char* physListName = getenv("G4PhysListName"); 00564 if (dirName && physListName) { 00565 00566 // Open output file with path name 00567 G4String pathName = G4String(dirName) + "/" + G4String(physListName) + ".html"; 00568 std::ofstream outFile; 00569 outFile.open(pathName); 00570 00571 // Write physics list summary file 00572 outFile << "<html>\n"; 00573 outFile << "<head>\n"; 00574 outFile << "<title>Physics List Summary</title>\n"; 00575 outFile << "</head>\n"; 00576 outFile << "<body>\n"; 00577 outFile << "<h2> Summary of Hadronic Processes, Models and Cross Sections for Physics List " 00578 << G4String(physListName) << "</h2>\n"; 00579 outFile << "<ul>\n"; 00580 00581 PrintHtml(G4Proton::Proton(), outFile); 00582 PrintHtml(G4Neutron::Neutron(), outFile); 00583 PrintHtml(G4PionPlus::PionPlus(), outFile); 00584 PrintHtml(G4PionMinus::PionMinus(), outFile); 00585 PrintHtml(G4Gamma::Gamma(), outFile); 00586 PrintHtml(G4Electron::Electron(), outFile); 00587 // PrintHtml(G4MuonMinus::MuonMinus(), outFile); 00588 PrintHtml(G4Positron::Positron(), outFile); 00589 PrintHtml(G4KaonPlus::KaonPlus(), outFile); 00590 PrintHtml(G4KaonMinus::KaonMinus(), outFile); 00591 PrintHtml(G4Lambda::Lambda(), outFile); 00592 PrintHtml(G4Alpha::Alpha(), outFile); 00593 00594 outFile << "</ul>\n"; 00595 outFile << "</body>\n"; 00596 outFile << "</html>\n"; 00597 outFile.close(); 00598 } 00599 }
G4HadronicProcess * G4HadronicProcessStore::FindProcess | ( | const G4ParticleDefinition * | , | |
G4HadronicProcessType | subType | |||
) |
Definition at line 814 of file G4HadronicProcessStore.cc.
References G4VProcess::GetProcessSubType(), and G4DynamicParticle::SetDefinition().
Referenced by GetCaptureCrossSectionPerAtom(), GetChargeExchangeCrossSectionPerAtom(), GetElasticCrossSectionPerAtom(), GetFissionCrossSectionPerAtom(), and GetInelasticCrossSectionPerAtom().
00816 { 00817 bool isNew = false; 00818 G4HadronicProcess* hp = 0; 00819 00820 if(part != currentParticle) { 00821 isNew = true; 00822 currentParticle = part; 00823 localDP.SetDefinition(part); 00824 } else if(!currentProcess) { 00825 isNew = true; 00826 } else if(subType == currentProcess->GetProcessSubType()) { 00827 hp = currentProcess; 00828 } else { 00829 isNew = true; 00830 } 00831 00832 if(isNew) { 00833 std::multimap<PD,HP,std::less<PD> >::iterator it; 00834 for(it=p_map.lower_bound(part); it!=p_map.upper_bound(part); ++it) { 00835 if(it->first == part && subType == (it->second)->GetProcessSubType()) { 00836 hp = it->second; 00837 break; 00838 } 00839 } 00840 currentProcess = hp; 00841 } 00842 00843 return hp; 00844 }
G4double G4HadronicProcessStore::GetCaptureCrossSectionPerAtom | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Element * | anElement, | |||
const G4Material * | mat = 0 | |||
) |
Definition at line 290 of file G4HadronicProcessStore.cc.
References fCapture, FindProcess(), G4HadronicProcess::GetElementCrossSection(), and G4DynamicParticle::SetKineticEnergy().
Referenced by GetCaptureCrossSectionPerVolume(), and GetCrossSectionPerAtom().
00294 { 00295 G4HadronicProcess* hp = FindProcess(aParticle, fCapture); 00296 localDP.SetKineticEnergy(kineticEnergy); 00297 G4double cross = 0.0; 00298 if(hp) { 00299 cross = hp->GetElementCrossSection(&localDP,anElement,mat); 00300 } 00301 return cross; 00302 }
G4double G4HadronicProcessStore::GetCaptureCrossSectionPerIsotope | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
G4int | Z, | |||
G4int | A | |||
) |
G4double G4HadronicProcessStore::GetCaptureCrossSectionPerVolume | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Material * | material | |||
) |
Definition at line 271 of file G4HadronicProcessStore.cc.
References GetCaptureCrossSectionPerAtom(), G4Material::GetElementVector(), G4Material::GetNumberOfElements(), and G4Material::GetVecNbOfAtomsPerVolume().
Referenced by GetCrossSectionPerVolume().
00275 { 00276 G4double cross = 0.0; 00277 const G4ElementVector* theElementVector = material->GetElementVector(); 00278 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume(); 00279 size_t nelm = material->GetNumberOfElements(); 00280 for (size_t i=0; i<nelm; ++i) { 00281 const G4Element* elm = (*theElementVector)[i]; 00282 cross += theAtomNumDensityVector[i]* 00283 GetCaptureCrossSectionPerAtom(aParticle,kineticEnergy,elm,material); 00284 } 00285 return cross; 00286 }
G4double G4HadronicProcessStore::GetChargeExchangeCrossSectionPerAtom | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Element * | anElement, | |||
const G4Material * | mat = 0 | |||
) |
Definition at line 380 of file G4HadronicProcessStore.cc.
References fChargeExchange, FindProcess(), G4HadronicProcess::GetElementCrossSection(), and G4DynamicParticle::SetKineticEnergy().
Referenced by GetChargeExchangeCrossSectionPerVolume(), and GetCrossSectionPerAtom().
00384 { 00385 G4HadronicProcess* hp = FindProcess(aParticle, fChargeExchange); 00386 localDP.SetKineticEnergy(kineticEnergy); 00387 G4double cross = 0.0; 00388 if(hp) { 00389 cross = hp->GetElementCrossSection(&localDP,anElement,mat); 00390 } 00391 return cross; 00392 }
G4double G4HadronicProcessStore::GetChargeExchangeCrossSectionPerIsotope | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
G4int | Z, | |||
G4int | A | |||
) |
G4double G4HadronicProcessStore::GetChargeExchangeCrossSectionPerVolume | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Material * | material | |||
) |
Definition at line 361 of file G4HadronicProcessStore.cc.
References GetChargeExchangeCrossSectionPerAtom(), G4Material::GetElementVector(), G4Material::GetNumberOfElements(), and G4Material::GetVecNbOfAtomsPerVolume().
Referenced by GetCrossSectionPerVolume().
00365 { 00366 G4double cross = 0.0; 00367 const G4ElementVector* theElementVector = material->GetElementVector(); 00368 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume(); 00369 size_t nelm = material->GetNumberOfElements(); 00370 for (size_t i=0; i<nelm; ++i) { 00371 const G4Element* elm = (*theElementVector)[i]; 00372 cross += theAtomNumDensityVector[i]* 00373 GetChargeExchangeCrossSectionPerAtom(aParticle,kineticEnergy,elm,material); 00374 } 00375 return cross; 00376 }
G4double G4HadronicProcessStore::GetCrossSectionPerAtom | ( | const G4ParticleDefinition * | particle, | |
G4double | kineticEnergy, | |||
const G4VProcess * | process, | |||
const G4Element * | element | |||
) |
Definition at line 135 of file G4HadronicProcessStore.cc.
References fCapture, fChargeExchange, fFission, fHadronElastic, fHadronInelastic, GetCaptureCrossSectionPerAtom(), GetChargeExchangeCrossSectionPerAtom(), GetElasticCrossSectionPerAtom(), GetFissionCrossSectionPerAtom(), GetInelasticCrossSectionPerAtom(), and G4VProcess::GetProcessSubType().
00140 { 00141 G4double cross = 0.; 00142 G4int subType = proc->GetProcessSubType(); 00143 if (subType == fHadronElastic) 00144 cross = GetElasticCrossSectionPerAtom(part,energy,element); 00145 else if (subType == fHadronInelastic) 00146 cross = GetInelasticCrossSectionPerAtom(part,energy,element); 00147 else if (subType == fCapture) 00148 cross = GetCaptureCrossSectionPerAtom(part,energy,element); 00149 else if (subType == fFission) 00150 cross = GetFissionCrossSectionPerAtom(part,energy,element); 00151 else if (subType == fChargeExchange) 00152 cross = GetChargeExchangeCrossSectionPerAtom(part,energy,element); 00153 return cross; 00154 }
G4double G4HadronicProcessStore::GetCrossSectionPerVolume | ( | const G4ParticleDefinition * | particle, | |
G4double | kineticEnergy, | |||
const G4VProcess * | process, | |||
const G4Material * | material | |||
) |
Definition at line 158 of file G4HadronicProcessStore.cc.
References fCapture, fChargeExchange, fFission, fHadronElastic, fHadronInelastic, GetCaptureCrossSectionPerVolume(), GetChargeExchangeCrossSectionPerVolume(), GetElasticCrossSectionPerVolume(), GetFissionCrossSectionPerVolume(), GetInelasticCrossSectionPerVolume(), and G4VProcess::GetProcessSubType().
00163 { 00164 G4double cross = 0.; 00165 G4int subType = proc->GetProcessSubType(); 00166 if (subType == fHadronElastic) 00167 cross = GetElasticCrossSectionPerVolume(part,energy,material); 00168 else if (subType == fHadronInelastic) 00169 cross = GetInelasticCrossSectionPerVolume(part,energy,material); 00170 else if (subType == fCapture) 00171 cross = GetCaptureCrossSectionPerVolume(part,energy,material); 00172 else if (subType == fFission) 00173 cross = GetFissionCrossSectionPerVolume(part,energy,material); 00174 else if (subType == fChargeExchange) 00175 cross = GetChargeExchangeCrossSectionPerVolume(part,energy,material); 00176 return cross; 00177 }
G4double G4HadronicProcessStore::GetElasticCrossSectionPerAtom | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Element * | anElement, | |||
const G4Material * | mat = 0 | |||
) |
Definition at line 200 of file G4HadronicProcessStore.cc.
References fHadronElastic, FindProcess(), G4HadronicProcess::GetElementCrossSection(), and G4DynamicParticle::SetKineticEnergy().
Referenced by GetCrossSectionPerAtom(), and GetElasticCrossSectionPerVolume().
00204 { 00205 G4HadronicProcess* hp = FindProcess(aParticle, fHadronElastic); 00206 G4double cross = 0.0; 00207 localDP.SetKineticEnergy(kineticEnergy); 00208 if(hp) { 00209 cross = hp->GetElementCrossSection(&localDP,anElement,mat); 00210 } 00211 return cross; 00212 }
G4double G4HadronicProcessStore::GetElasticCrossSectionPerIsotope | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
G4int | Z, | |||
G4int | A | |||
) |
G4double G4HadronicProcessStore::GetElasticCrossSectionPerVolume | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Material * | material | |||
) |
Definition at line 181 of file G4HadronicProcessStore.cc.
References GetElasticCrossSectionPerAtom(), G4Material::GetElementVector(), G4Material::GetNumberOfElements(), and G4Material::GetVecNbOfAtomsPerVolume().
Referenced by GetCrossSectionPerVolume().
00185 { 00186 G4double cross = 0.0; 00187 const G4ElementVector* theElementVector = material->GetElementVector(); 00188 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume(); 00189 size_t nelm = material->GetNumberOfElements(); 00190 for (size_t i=0; i<nelm; ++i) { 00191 const G4Element* elm = (*theElementVector)[i]; 00192 cross += theAtomNumDensityVector[i]* 00193 GetElasticCrossSectionPerAtom(aParticle,kineticEnergy,elm,material); 00194 } 00195 return cross; 00196 }
G4double G4HadronicProcessStore::GetFissionCrossSectionPerAtom | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Element * | anElement, | |||
const G4Material * | mat = 0 | |||
) |
Definition at line 335 of file G4HadronicProcessStore.cc.
References fFission, FindProcess(), G4HadronicProcess::GetElementCrossSection(), and G4DynamicParticle::SetKineticEnergy().
Referenced by GetCrossSectionPerAtom(), and GetFissionCrossSectionPerVolume().
00339 { 00340 G4HadronicProcess* hp = FindProcess(aParticle, fFission); 00341 localDP.SetKineticEnergy(kineticEnergy); 00342 G4double cross = 0.0; 00343 if(hp) { 00344 cross = hp->GetElementCrossSection(&localDP,anElement,mat); 00345 } 00346 return cross; 00347 }
G4double G4HadronicProcessStore::GetFissionCrossSectionPerIsotope | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
G4int | Z, | |||
G4int | A | |||
) |
G4double G4HadronicProcessStore::GetFissionCrossSectionPerVolume | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Material * | material | |||
) |
Definition at line 316 of file G4HadronicProcessStore.cc.
References G4Material::GetElementVector(), GetFissionCrossSectionPerAtom(), G4Material::GetNumberOfElements(), and G4Material::GetVecNbOfAtomsPerVolume().
Referenced by GetCrossSectionPerVolume().
00320 { 00321 G4double cross = 0.0; 00322 const G4ElementVector* theElementVector = material->GetElementVector(); 00323 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume(); 00324 size_t nelm = material->GetNumberOfElements(); 00325 for (size_t i=0; i<nelm; i++) { 00326 const G4Element* elm = (*theElementVector)[i]; 00327 cross += theAtomNumDensityVector[i]* 00328 GetFissionCrossSectionPerAtom(aParticle,kineticEnergy,elm,material); 00329 } 00330 return cross; 00331 }
G4double G4HadronicProcessStore::GetInelasticCrossSectionPerAtom | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Element * | anElement, | |||
const G4Material * | mat = 0 | |||
) |
Definition at line 245 of file G4HadronicProcessStore.cc.
References fHadronInelastic, FindProcess(), G4HadronicProcess::GetElementCrossSection(), and G4DynamicParticle::SetKineticEnergy().
Referenced by GetCrossSectionPerAtom(), and GetInelasticCrossSectionPerVolume().
00249 { 00250 G4HadronicProcess* hp = FindProcess(aParticle, fHadronInelastic); 00251 localDP.SetKineticEnergy(kineticEnergy); 00252 G4double cross = 0.0; 00253 if(hp) { 00254 cross = hp->GetElementCrossSection(&localDP,anElement,mat); 00255 } 00256 return cross; 00257 }
G4double G4HadronicProcessStore::GetInelasticCrossSectionPerIsotope | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
G4int | Z, | |||
G4int | A | |||
) |
G4double G4HadronicProcessStore::GetInelasticCrossSectionPerVolume | ( | const G4ParticleDefinition * | aParticle, | |
G4double | kineticEnergy, | |||
const G4Material * | material | |||
) |
Definition at line 226 of file G4HadronicProcessStore.cc.
References G4Material::GetElementVector(), GetInelasticCrossSectionPerAtom(), G4Material::GetNumberOfElements(), and G4Material::GetVecNbOfAtomsPerVolume().
Referenced by GetCrossSectionPerVolume().
00230 { 00231 G4double cross = 0.0; 00232 const G4ElementVector* theElementVector = material->GetElementVector(); 00233 const G4double* theAtomNumDensityVector = material->GetVecNbOfAtomsPerVolume(); 00234 size_t nelm = material->GetNumberOfElements(); 00235 for (size_t i=0; i<nelm; ++i) { 00236 const G4Element* elm = (*theElementVector)[i]; 00237 cross += theAtomNumDensityVector[i]* 00238 GetInelasticCrossSectionPerAtom(aParticle,kineticEnergy,elm,material); 00239 } 00240 return cross; 00241 }
G4int G4HadronicProcessStore::GetVerbose | ( | ) |
G4HadronicProcessStore * G4HadronicProcessStore::Instance | ( | ) | [static] |
Definition at line 65 of file G4HadronicProcessStore.cc.
Referenced by G4PionMinusAbsorptionAtRest::BuildPhysicsTable(), G4PiMinusAbsorptionAtRest::BuildPhysicsTable(), G4NeutronCaptureAtRest::BuildPhysicsTable(), G4MuonMinusCaptureAtRest::BuildPhysicsTable(), G4KaonMinusAbsorptionAtRest::BuildPhysicsTable(), G4KaonMinusAbsorption::BuildPhysicsTable(), G4HadronStoppingProcess::BuildPhysicsTable(), G4HadronicProcess::BuildPhysicsTable(), G4AntiProtonAnnihilationAtRest::BuildPhysicsTable(), G4AntiNeutronAnnihilationAtRest::BuildPhysicsTable(), G4HadronInelasticQBBC::ConstructProcess(), G4AntiNeutronAnnihilationAtRest::G4AntiNeutronAnnihilationAtRest(), G4AntiProtonAnnihilationAtRest::G4AntiProtonAnnihilationAtRest(), G4HadronicProcess::G4HadronicProcess(), G4HadronStoppingProcess::G4HadronStoppingProcess(), G4KaonMinusAbsorption::G4KaonMinusAbsorption(), G4KaonMinusAbsorptionAtRest::G4KaonMinusAbsorptionAtRest(), G4MuonMinusCaptureAtRest::G4MuonMinusCaptureAtRest(), G4NeutronCaptureAtRest::G4NeutronCaptureAtRest(), G4PiMinusAbsorptionAtRest::G4PiMinusAbsorptionAtRest(), G4PionMinusAbsorptionAtRest::G4PionMinusAbsorptionAtRest(), G4PionMinusAbsorptionAtRest::PreparePhysicsTable(), G4PiMinusAbsorptionAtRest::PreparePhysicsTable(), G4NeutronCaptureAtRest::PreparePhysicsTable(), G4MuonMinusCaptureAtRest::PreparePhysicsTable(), G4KaonMinusAbsorptionAtRest::PreparePhysicsTable(), G4KaonMinusAbsorption::PreparePhysicsTable(), G4HadronStoppingProcess::PreparePhysicsTable(), G4HadronicProcess::PreparePhysicsTable(), G4AntiProtonAnnihilationAtRest::PreparePhysicsTable(), G4AntiNeutronAnnihilationAtRest::PreparePhysicsTable(), G4HadronicProcess::RegisterMe(), G4AntiNeutronAnnihilationAtRest::~G4AntiNeutronAnnihilationAtRest(), G4AntiProtonAnnihilationAtRest::~G4AntiProtonAnnihilationAtRest(), G4HadronicProcess::~G4HadronicProcess(), G4HadronStoppingProcess::~G4HadronStoppingProcess(), G4KaonMinusAbsorption::~G4KaonMinusAbsorption(), G4KaonMinusAbsorptionAtRest::~G4KaonMinusAbsorptionAtRest(), G4MuonMinusCaptureAtRest::~G4MuonMinusCaptureAtRest(), G4NeutronCaptureAtRest::~G4NeutronCaptureAtRest(), G4PiMinusAbsorptionAtRest::~G4PiMinusAbsorptionAtRest(), and G4PionMinusAbsorptionAtRest::~G4PionMinusAbsorptionAtRest().
00066 { 00067 if(0 == theInstance) { 00068 static G4HadronicProcessStore manager; 00069 theInstance = &manager; 00070 } 00071 return theInstance; 00072 }
void G4HadronicProcessStore::PrintHtml | ( | const G4ParticleDefinition * | , | |
std::ofstream & | ||||
) |
Definition at line 602 of file G4HadronicProcessStore.cc.
References G4CrossSectionDataStore::DumpHtml(), G4HadronicProcess::GetCrossSectionDataStore(), G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), and PrintModelHtml().
Referenced by DumpHtml().
00604 { 00605 // Automatic generation of html documentation page for physics lists 00606 // List processes for the most important particles in descending order 00607 // of importance 00608 00609 outFile << "<br> <li><h2><font color=\" ff0000 \">" 00610 << theParticle->GetParticleName() << "</font></h2></li>\n"; 00611 00612 typedef std::multimap<PD,HP,std::less<PD> > PDHPmap; 00613 typedef std::multimap<HP,HI,std::less<HP> > HPHImap; 00614 00615 std::pair<PDHPmap::iterator, PDHPmap::iterator> itpart = 00616 p_map.equal_range(theParticle); 00617 00618 // Loop over processes assigned to particle 00619 00620 G4HadronicProcess* theProcess; 00621 for (PDHPmap::iterator it = itpart.first; it != itpart.second; ++it) { 00622 theProcess = (*it).second; 00623 outFile << "<br> <b><font color=\" 0000ff \">process : <a href=\"" 00624 << theProcess->GetProcessName() << ".html\"> " 00625 << theProcess->GetProcessName() << "</a></font></b>\n"; 00626 outFile << "<ul>\n"; 00627 outFile << " <li><b><font color=\" 00AA00 \">models : </font></b>\n"; 00628 00629 // Loop over models assigned to process 00630 std::pair<HPHImap::iterator, HPHImap::iterator> itmod = 00631 m_map.equal_range(theProcess); 00632 00633 outFile << " <ul>\n"; 00634 for (HPHImap::iterator jt = itmod.first; jt != itmod.second; ++jt) { 00635 outFile << " <li><b><a href=\"" << (*jt).second->GetModelName() << ".html\"> " 00636 << (*jt).second->GetModelName() << "</a>" 00637 << " from " << (*jt).second->GetMinEnergy()/GeV 00638 << " GeV to " << (*jt).second->GetMaxEnergy()/GeV 00639 << " GeV </b></li>\n"; 00640 00641 // Print ModelDescription, ignore that we overwrite files n-times. 00642 PrintModelHtml((*jt).second); 00643 00644 } 00645 outFile << " </ul>\n"; 00646 outFile << " </li>\n"; 00647 00648 // List cross sections assigned to process 00649 outFile << " <li><b><font color=\" 00AA00 \">cross sections : </font></b>\n"; 00650 outFile << " <ul>\n"; 00651 theProcess->GetCrossSectionDataStore()->DumpHtml(*theParticle, outFile); 00652 // << " \n"; 00653 outFile << " </ul>\n"; 00654 00655 outFile << " </li>\n"; 00656 outFile << "</ul>\n"; 00657 } 00658 }
void G4HadronicProcessStore::PrintInfo | ( | const G4ParticleDefinition * | ) |
Definition at line 544 of file G4HadronicProcessStore.cc.
References Dump(), and DumpHtml().
Referenced by G4PionMinusAbsorptionAtRest::BuildPhysicsTable(), G4PiMinusAbsorptionAtRest::BuildPhysicsTable(), G4NeutronCaptureAtRest::BuildPhysicsTable(), G4MuonMinusCaptureAtRest::BuildPhysicsTable(), G4KaonMinusAbsorptionAtRest::BuildPhysicsTable(), G4KaonMinusAbsorption::BuildPhysicsTable(), G4HadronStoppingProcess::BuildPhysicsTable(), G4HadronicProcess::BuildPhysicsTable(), G4AntiProtonAnnihilationAtRest::BuildPhysicsTable(), and G4AntiNeutronAnnihilationAtRest::BuildPhysicsTable().
00545 { 00546 // Trigger particle/process/model printout only when last particle is 00547 // registered 00548 if(buildTableStart && part == particle[n_part - 1]) { 00549 buildTableStart = false; 00550 Dump(verbose); 00551 if (getenv("G4PhysListDocDir") ) DumpHtml(); 00552 } 00553 }
void G4HadronicProcessStore::PrintModelHtml | ( | const G4HadronicInteraction * | model | ) | const |
Definition at line 660 of file G4HadronicProcessStore.cc.
References G4HadronicInteraction::GetModelName(), and G4HadronicInteraction::ModelDescription().
Referenced by PrintHtml().
00661 { 00662 G4String dirName(getenv("G4PhysListDocDir")); 00663 G4String pathName = dirName + "/" + mod->GetModelName() + ".html"; 00664 std::ofstream outModel; 00665 outModel.open(pathName); 00666 outModel << "<html>\n"; 00667 outModel << "<head>\n"; 00668 outModel << "<title>Description of " << mod->GetModelName() << "</title>\n"; 00669 outModel << "</head>\n"; 00670 outModel << "<body>\n"; 00671 00672 mod->ModelDescription(outModel); 00673 00674 outModel << "</body>\n"; 00675 outModel << "</html>\n"; 00676 00677 }
void G4HadronicProcessStore::Register | ( | G4HadronicProcess * | ) |
Definition at line 406 of file G4HadronicProcessStore.cc.
Referenced by G4HadronicProcess::G4HadronicProcess().
00407 { 00408 if(0 < n_proc) { 00409 for(G4int i=0; i<n_proc; ++i) { 00410 if(process[i] == proc) { return; } 00411 } 00412 } 00413 // G4cout << "G4HadronicProcessStore::Register hadronic " << n_proc 00414 // << " " << proc->GetProcessName() << G4endl; 00415 ++n_proc; 00416 process.push_back(proc); 00417 }
void G4HadronicProcessStore::RegisterExtraProcess | ( | G4VProcess * | ) |
Definition at line 483 of file G4HadronicProcessStore.cc.
Referenced by G4HadronInelasticQBBC::ConstructProcess(), G4AntiNeutronAnnihilationAtRest::G4AntiNeutronAnnihilationAtRest(), G4AntiProtonAnnihilationAtRest::G4AntiProtonAnnihilationAtRest(), G4HadronStoppingProcess::G4HadronStoppingProcess(), G4KaonMinusAbsorption::G4KaonMinusAbsorption(), G4KaonMinusAbsorptionAtRest::G4KaonMinusAbsorptionAtRest(), G4MuonMinusCaptureAtRest::G4MuonMinusCaptureAtRest(), G4NeutronCaptureAtRest::G4NeutronCaptureAtRest(), G4PiMinusAbsorptionAtRest::G4PiMinusAbsorptionAtRest(), and G4PionMinusAbsorptionAtRest::G4PionMinusAbsorptionAtRest().
00484 { 00485 if(0 < n_extra) { 00486 for(G4int i=0; i<n_extra; ++i) { 00487 if(extraProcess[i] == proc) { return; } 00488 } 00489 } 00490 //G4cout << "Extra Process: " << n_extra << " " << proc->GetProcessName() 00491 // << " " << proc << G4endl; 00492 00493 n_extra++; 00494 extraProcess.push_back(proc); 00495 }
void G4HadronicProcessStore::RegisterInteraction | ( | G4HadronicProcess * | , | |
G4HadronicInteraction * | ||||
) |
Definition at line 451 of file G4HadronicProcessStore.cc.
References G4HadronicInteraction::GetModelName().
Referenced by G4HadronicProcess::RegisterMe().
00453 { 00454 G4int i=0; 00455 for(; i<n_proc; ++i) {if(process[i] == proc) { break; }} 00456 G4int k=0; 00457 for(; k<n_model; ++k) {if(model[k] == mod) { break; }} 00458 00459 m_map.insert(std::multimap<HP,HI>::value_type(proc,mod)); 00460 00461 if(k == n_model) { 00462 ++n_model; 00463 model.push_back(mod); 00464 modelName.push_back(mod->GetModelName()); 00465 } 00466 }
void G4HadronicProcessStore::RegisterParticle | ( | G4HadronicProcess * | , | |
const G4ParticleDefinition * | ||||
) |
Definition at line 421 of file G4HadronicProcessStore.cc.
Referenced by G4HadronicProcess::PreparePhysicsTable().
00423 { 00424 G4int i=0; 00425 for(; i<n_proc; ++i) {if(process[i] == proc) break;} 00426 G4int j=0; 00427 for(; j<n_part; ++j) {if(particle[j] == part) break;} 00428 00429 if(j == n_part) { 00430 ++n_part; 00431 particle.push_back(part); 00432 wasPrinted.push_back(0); 00433 } 00434 00435 // the pair should be added? 00436 if(i < n_proc) { 00437 std::multimap<PD,HP,std::less<PD> >::iterator it; 00438 for(it=p_map.lower_bound(part); it!=p_map.upper_bound(part); ++it) { 00439 if(it->first == part) { 00440 HP process2 = (it->second); 00441 if(proc == process2) { return; } 00442 } 00443 } 00444 } 00445 00446 p_map.insert(std::multimap<PD,HP>::value_type(part,proc)); 00447 }
void G4HadronicProcessStore::RegisterParticleForExtraProcess | ( | G4VProcess * | , | |
const G4ParticleDefinition * | ||||
) |
Definition at line 499 of file G4HadronicProcessStore.cc.
Referenced by G4PionMinusAbsorptionAtRest::PreparePhysicsTable(), G4PiMinusAbsorptionAtRest::PreparePhysicsTable(), G4NeutronCaptureAtRest::PreparePhysicsTable(), G4MuonMinusCaptureAtRest::PreparePhysicsTable(), G4KaonMinusAbsorptionAtRest::PreparePhysicsTable(), G4KaonMinusAbsorption::PreparePhysicsTable(), G4HadronStoppingProcess::PreparePhysicsTable(), G4AntiProtonAnnihilationAtRest::PreparePhysicsTable(), and G4AntiNeutronAnnihilationAtRest::PreparePhysicsTable().
00502 { 00503 G4int i=0; 00504 for(; i<n_extra; ++i) { if(extraProcess[i] == proc) { break; } } 00505 G4int j=0; 00506 for(; j<n_part; ++j) { if(particle[j] == part) { break; } } 00507 00508 if(j == n_part) { 00509 ++n_part; 00510 particle.push_back(part); 00511 wasPrinted.push_back(0); 00512 } 00513 00514 // the pair should be added? 00515 if(i < n_extra) { 00516 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator it; 00517 for(it=ep_map.lower_bound(part); it!=ep_map.upper_bound(part); ++it) { 00518 if(it->first == part) { 00519 G4VProcess* process2 = (it->second); 00520 if(proc == process2) { return; } 00521 } 00522 } 00523 } 00524 00525 ep_map.insert(std::multimap<PD,G4VProcess*>::value_type(part,proc)); 00526 }
void G4HadronicProcessStore::SetEpReportLevel | ( | G4int | level | ) |
Definition at line 846 of file G4HadronicProcessStore.cc.
References G4cout.
Referenced by G4HadronicEPTestMessenger::SetNewValue().
00847 { 00848 G4cout << " Setting energy/momentum report level to " << level 00849 << " for " << process.size() << " hadronic processes " << G4endl; 00850 for (G4int i = 0; i < G4int(process.size()); ++i) { 00851 process[i]->SetEpReportLevel(level); 00852 } 00853 }
void G4HadronicProcessStore::SetProcessAbsLevel | ( | G4double | absoluteLevel | ) |
Definition at line 855 of file G4HadronicProcessStore.cc.
References G4cout, G4HadronicProcess::GetEnergyMomentumCheckLevels(), and G4HadronicProcess::SetEnergyMomentumCheckLevels().
Referenced by G4HadronicEPTestMessenger::SetNewValue().
00856 { 00857 G4cout << " Setting absolute energy/momentum test level to " << abslevel << G4endl; 00858 G4double rellevel = 0.0; 00859 G4HadronicProcess* theProcess = 0; 00860 for (G4int i = 0; i < G4int(process.size()); ++i) { 00861 theProcess = process[i]; 00862 rellevel = theProcess->GetEnergyMomentumCheckLevels().first; 00863 theProcess->SetEnergyMomentumCheckLevels(rellevel, abslevel); 00864 } 00865 }
void G4HadronicProcessStore::SetProcessRelLevel | ( | G4double | relativeLevel | ) |
Definition at line 867 of file G4HadronicProcessStore.cc.
References G4cout, G4HadronicProcess::GetEnergyMomentumCheckLevels(), and G4HadronicProcess::SetEnergyMomentumCheckLevels().
Referenced by G4HadronicEPTestMessenger::SetNewValue().
00868 { 00869 G4cout << " Setting relative energy/momentum test level to " << rellevel << G4endl; 00870 G4double abslevel = 0.0; 00871 G4HadronicProcess* theProcess = 0; 00872 for (G4int i = 0; i < G4int(process.size()); ++i) { 00873 theProcess = process[i]; 00874 abslevel = theProcess->GetEnergyMomentumCheckLevels().second; 00875 theProcess->SetEnergyMomentumCheckLevels(rellevel, abslevel); 00876 } 00877 }
void G4HadronicProcessStore::SetVerbose | ( | G4int | val | ) |
Definition at line 793 of file G4HadronicProcessStore.cc.
00794 { 00795 verbose = val; 00796 G4int i; 00797 for(i=0; i<n_proc; ++i) { 00798 if(process[i]) { process[i]->SetVerboseLevel(val); } 00799 } 00800 for(i=0; i<n_model; ++i) { 00801 if(model[i]) { model[i]->SetVerboseLevel(val); } 00802 } 00803 }