67 if(0 == theInstance) {
69 theInstance = &manager;
81 delete theEPTestMessenger;
92 for (i=0; i<n_proc; ++i) {
103 for(i=0; i<n_extra; ++i) {
104 if(extraProcess[i]) {
121G4HadronicProcessStore::G4HadronicProcessStore()
130 buildTableStart =
true;
190 for (
size_t i=0; i<nelm; ++i) {
191 const G4Element* elm = (*theElementVector)[i];
192 cross += theAtomNumDensityVector[i]*
235 for (
size_t i=0; i<nelm; ++i) {
236 const G4Element* elm = (*theElementVector)[i];
237 cross += theAtomNumDensityVector[i]*
280 for (
size_t i=0; i<nelm; ++i) {
281 const G4Element* elm = (*theElementVector)[i];
282 cross += theAtomNumDensityVector[i]*
325 for (
size_t i=0; i<nelm; i++) {
326 const G4Element* elm = (*theElementVector)[i];
327 cross += theAtomNumDensityVector[i]*
370 for (
size_t i=0; i<nelm; ++i) {
371 const G4Element* elm = (*theElementVector)[i];
372 cross += theAtomNumDensityVector[i]*
409 for(
G4int i=0; i<n_proc; ++i) {
410 if(process[i] == proc) {
return; }
416 process.push_back(proc);
425 for(; i<n_proc; ++i) {
if(process[i] == proc)
break;}
427 for(; j<n_part; ++j) {
if(particle[j] == part)
break;}
431 particle.push_back(part);
432 wasPrinted.push_back(0);
437 std::multimap<PD,HP,std::less<PD> >::iterator it;
438 for(it=p_map.lower_bound(part); it!=p_map.upper_bound(part); ++it) {
439 if(it->first == part) {
440 HP process2 = (it->second);
441 if(proc == process2) {
return; }
446 p_map.insert(std::multimap<PD,HP>::value_type(part,proc));
455 for(; i<n_proc; ++i) {
if(process[i] == proc) {
break; }}
457 for(; k<n_model; ++k) {
if(model[k] == mod) {
break; }}
459 m_map.insert(std::multimap<HP,HI>::value_type(proc,mod));
463 model.push_back(mod);
472 if(0 == n_proc)
return;
473 for(
G4int i=0; i<n_proc; ++i) {
474 if(process[i] == proc) {
486 for(
G4int i=0; i<n_extra; ++i) {
487 if(extraProcess[i] == proc) {
return; }
494 extraProcess.push_back(proc);
504 for(; i<n_extra; ++i) {
if(extraProcess[i] == proc) {
break; } }
506 for(; j<n_part; ++j) {
if(particle[j] == part) {
break; } }
510 particle.push_back(part);
511 wasPrinted.push_back(0);
516 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator it;
517 for(it=ep_map.lower_bound(part); it!=ep_map.upper_bound(part); ++it) {
518 if(it->first == part) {
520 if(proc == process2) {
return; }
525 ep_map.insert(std::multimap<PD,G4VProcess*>::value_type(part,proc));
533 if(0 == n_extra) {
return; }
534 for(
G4int i=0; i<n_extra; ++i) {
535 if(extraProcess[i] == proc) {
548 if(buildTableStart && part == particle[n_part - 1]) {
549 buildTableStart =
false;
551 if (getenv(
"G4PhysListDocDir") )
DumpHtml();
562 char* dirName = getenv(
"G4PhysListDocDir");
563 char* physListName = getenv(
"G4PhysListName");
564 if (dirName && physListName) {
568 std::ofstream outFile;
569 outFile.open(pathName);
572 outFile <<
"<html>\n";
573 outFile <<
"<head>\n";
574 outFile <<
"<title>Physics List Summary</title>\n";
575 outFile <<
"</head>\n";
576 outFile <<
"<body>\n";
577 outFile <<
"<h2> Summary of Hadronic Processes, Models and Cross Sections for Physics List "
578 <<
G4String(physListName) <<
"</h2>\n";
594 outFile <<
"</ul>\n";
595 outFile <<
"</body>\n";
596 outFile <<
"</html>\n";
603 std::ofstream& outFile)
609 outFile <<
"<br> <li><h2><font color=\" ff0000 \">"
612 typedef std::multimap<PD,HP,std::less<PD> > PDHPmap;
613 typedef std::multimap<HP,HI,std::less<HP> > HPHImap;
615 std::pair<PDHPmap::iterator, PDHPmap::iterator> itpart =
616 p_map.equal_range(theParticle);
621 for (PDHPmap::iterator it = itpart.first; it != itpart.second; ++it) {
622 theProcess = (*it).second;
623 outFile <<
"<br> <b><font color=\" 0000ff \">process : <a href=\""
627 outFile <<
" <li><b><font color=\" 00AA00 \">models : </font></b>\n";
630 std::pair<HPHImap::iterator, HPHImap::iterator> itmod =
631 m_map.equal_range(theProcess);
633 outFile <<
" <ul>\n";
634 for (HPHImap::iterator jt = itmod.first; jt != itmod.second; ++jt) {
635 outFile <<
" <li><b><a href=\"" << (*jt).second->GetModelName() <<
".html\"> "
636 << (*jt).second->GetModelName() <<
"</a>"
637 <<
" from " << (*jt).second->GetMinEnergy()/GeV
638 <<
" GeV to " << (*jt).second->GetMaxEnergy()/GeV
639 <<
" GeV </b></li>\n";
645 outFile <<
" </ul>\n";
646 outFile <<
" </li>\n";
649 outFile <<
" <li><b><font color=\" 00AA00 \">cross sections : </font></b>\n";
650 outFile <<
" <ul>\n";
653 outFile <<
" </ul>\n";
655 outFile <<
" </li>\n";
656 outFile <<
"</ul>\n";
662 G4String dirName(getenv(
"G4PhysListDocDir"));
664 std::ofstream outModel;
665 outModel.open(pathName);
666 outModel <<
"<html>\n";
667 outModel <<
"<head>\n";
668 outModel <<
"<title>Description of " << mod->
GetModelName() <<
"</title>\n";
669 outModel <<
"</head>\n";
670 outModel <<
"<body>\n";
674 outModel <<
"</body>\n";
675 outModel <<
"</html>\n";
681 G4cout <<
"=============================================================="
682 <<
"=============================="
684 G4cout <<
" HADRONIC PROCESSES SUMMARY (verbose level " << level
687 for(
G4int i=0; i<n_part; ++i) {
688 PD part = particle[i];
691 if(level >= 2) yes =
true;
693 else if(level == 1 && (pname ==
"proton" ||
694 pname ==
"neutron" ||
705 pname ==
"GenericIon" ||
706 pname ==
"anti_neutron" ||
707 pname ==
"anti_proton")) yes =
true;
710 std::multimap<PD,HP,std::less<PD> >::iterator it;
712 for(it=p_map.lower_bound(part); it!=p_map.upper_bound(part); ++it) {
713 if(it->first == part) {
714 HP proc = (it->second);
716 for(; j<n_proc; ++j) {
717 if(process[j] == proc) {
724 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp;
725 for(itp=ep_map.lower_bound(part); itp!=ep_map.upper_bound(part); ++itp) {
726 if(itp->first == part) {
728 if(wasPrinted[i] == 0) {
731 G4cout <<
" Hadronic Processes for <"
740 G4cout <<
"=============================================================="
741 <<
"=============================="
747void G4HadronicProcessStore::Print(
G4int idxProc,
G4int idxPart)
751 if(wasPrinted[idxPart] == 0) {
752 wasPrinted[idxPart] = 1;
754 G4cout <<
" Hadronic Processes for <"
756 G4cout <<
" ------------------------"
757 <<
"-----------" <<
G4endl;
761 std::multimap<HP,HI,std::less<HP> >::iterator ih;
765 for(ih=m_map.lower_bound(proc); ih!=m_map.upper_bound(proc); ++ih) {
766 if(ih->first == proc) {
769 for(; i<n_model; ++i) {
770 if(model[i] == hi) {
break; }
774 G4cout << std::setw(28) << modelName[i]
776 << std::setw(4) << hi->GetMinEnergy()/GeV
778 << hi->GetMaxEnergy()/GeV
797 for(i=0; i<n_proc; ++i) {
798 if(process[i]) { process[i]->SetVerboseLevel(val); }
800 for(i=0; i<n_model; ++i) {
801 if(model[i]) { model[i]->SetVerboseLevel(val); }
820 if(part != currentParticle) {
822 currentParticle = part;
824 }
else if(!currentProcess) {
833 std::multimap<PD,HP,std::less<PD> >::iterator it;
834 for(it=p_map.lower_bound(part); it!=p_map.upper_bound(part); ++it) {
835 if(it->first == part && subType == (it->second)->GetProcessSubType()) {
848 G4cout <<
" Setting energy/momentum report level to " << level
849 <<
" for " << process.size() <<
" hadronic processes " <<
G4endl;
850 for (
G4int i = 0; i <
G4int(process.size()); ++i) {
851 process[i]->SetEpReportLevel(level);
857 G4cout <<
" Setting absolute energy/momentum test level to " << abslevel <<
G4endl;
860 for (
G4int i = 0; i <
G4int(process.size()); ++i) {
861 theProcess = process[i];
869 G4cout <<
" Setting relative energy/momentum test level to " << rellevel <<
G4endl;
872 for (
G4int i = 0; i <
G4int(process.size()); ++i) {
873 theProcess = process[i];
std::vector< G4Element * > G4ElementVector
G4DLLIMPORT std::ostream G4cout
static G4CrossSectionDataSetRegistry * Instance()
void DumpPhysicsTable(const G4ParticleDefinition &)
void DumpHtml(const G4ParticleDefinition &, std::ofstream &)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(G4double aEnergy)
static G4Electron * Electron()
static G4HadronicInteractionRegistry * Instance()
virtual void ModelDescription(std::ostream &outFile) const
const G4String & GetModelName() const
void DeRegister(G4HadronicProcess *)
G4double GetCaptureCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetCrossSectionPerVolume(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Material *material)
~G4HadronicProcessStore()
G4double GetCaptureCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void RegisterParticle(G4HadronicProcess *, const G4ParticleDefinition *)
G4double GetChargeExchangeCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
void PrintHtml(const G4ParticleDefinition *, std::ofstream &)
void SetProcessAbsLevel(G4double absoluteLevel)
G4double GetChargeExchangeCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetFissionCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4double GetCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Element *element)
G4double GetInelasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
void SetProcessRelLevel(G4double relativeLevel)
void DeRegisterExtraProcess(G4VProcess *)
void RegisterExtraProcess(G4VProcess *)
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
void SetEpReportLevel(G4int level)
static G4HadronicProcessStore * Instance()
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
void RegisterInteraction(G4HadronicProcess *, G4HadronicInteraction *)
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
void SetVerbose(G4int val)
void Register(G4HadronicProcess *)
void PrintModelHtml(const G4HadronicInteraction *model) const
G4double GetElasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
void PrintInfo(const G4ParticleDefinition *)
G4double GetFissionCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
G4CrossSectionDataStore * GetCrossSectionDataStore()
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=0)
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4Lambda * Lambda()
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
static G4Neutron * Neutron()
const G4String & GetParticleName() const
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4Positron * Positron()
static G4Proton * Proton()
G4int GetProcessSubType() const
const G4String & GetProcessName() const