187 const G4double* theAtomNumDensityVector =
190 for (
size_t i=0; i<nelm; ++i) {
191 const G4Element* elm = (*theElementVector)[i];
192 cross += theAtomNumDensityVector[i]*
233 const G4double* theAtomNumDensityVector =
236 for (
size_t i=0; i<nelm; ++i) {
237 const G4Element* elm = (*theElementVector)[i];
238 cross += theAtomNumDensityVector[i]*
279 const G4double* theAtomNumDensityVector =
282 for (
size_t i=0; i<nelm; ++i) {
283 const G4Element* elm = (*theElementVector)[i];
284 cross += theAtomNumDensityVector[i]*
325 const G4double* theAtomNumDensityVector =
328 for (
size_t i=0; i<nelm; i++) {
329 const G4Element* elm = (*theElementVector)[i];
330 cross += theAtomNumDensityVector[i]*
371 const G4double* theAtomNumDensityVector =
374 for (
size_t i=0; i<nelm; ++i) {
375 const G4Element* elm = (*theElementVector)[i];
376 cross += theAtomNumDensityVector[i]*
413 if(
process[i] == proc) {
return; }
416 G4cout <<
"G4HadronicProcessStore::Register hadronic " << n_proc
434 G4cout <<
"G4HadronicProcessStore::RegisterParticle "
446 std::multimap<PD,HP,std::less<PD> >::iterator it;
447 for(it=
p_map.lower_bound(part); it!=
p_map.upper_bound(part); ++it) {
448 if(it->first == part) {
449 HP process2 = (it->second);
450 if(proc == process2) {
return; }
455 p_map.insert(std::multimap<PD,HP>::value_type(part,proc));
468 m_map.insert(std::multimap<HP,HI>::value_type(proc,mod));
472 model.push_back(mod);
500 if(
process[i] == hproc) {
return; }
504 G4cout <<
"Extra Process: " << n_extra
530 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator it;
531 for(it=
ep_map.lower_bound(part); it!=
ep_map.upper_bound(part); ++it) {
532 if(it->first == part) {
534 if(proc == process2) {
return; }
539 ep_map.insert(std::multimap<PD,G4VProcess*>::value_type(part,proc));
550 G4cout <<
"Extra Process: " << i <<
" "
581 if (getenv(
"G4PhysListDocDir") )
DumpHtml();
594 char* dirName = getenv(
"G4PhysListDocDir");
595 char* physListName = getenv(
"G4PhysListName");
596 if (dirName && physListName) {
600 std::ofstream outFile;
601 outFile.open(pathName);
604 outFile <<
"<html>\n";
605 outFile <<
"<head>\n";
606 outFile <<
"<title>Physics List Summary</title>\n";
607 outFile <<
"</head>\n";
608 outFile <<
"<body>\n";
609 outFile <<
"<h2> Summary of Hadronic Processes, Models and Cross Sections for Physics List "
610 <<
G4String(physListName) <<
"</h2>\n";
627 outFile <<
"</ul>\n";
628 outFile <<
"</body>\n";
629 outFile <<
"</html>\n";
637 std::ofstream& outFile)
643 outFile <<
"<br> <li><h2><font color=\" ff0000 \">"
646 typedef std::multimap<PD,HP,std::less<PD> > PDHPmap;
647 typedef std::multimap<HP,HI,std::less<HP> > HPHImap;
649 std::pair<PDHPmap::iterator, PDHPmap::iterator> itpart =
650 p_map.equal_range(theParticle);
655 for (PDHPmap::iterator it = itpart.first; it != itpart.second; ++it) {
656 theProcess = (*it).second;
661 outFile <<
"<br> <b><font color=\" 0000ff \">process : "
666 outFile <<
" <li><b><font color=\" 00AA00 \">models : </font></b>\n";
668 std::pair<HPHImap::iterator, HPHImap::iterator> itmod =
669 m_map.equal_range(theProcess);
671 outFile <<
" <ul>\n";
672 G4String physListName(getenv(
"G4PhysListName"));
674 for (HPHImap::iterator jt = itmod.first; jt != itmod.second; ++jt) {
675 outFile <<
" <li><b><a href=\"" << physListName <<
"_"
677 << (*jt).second->GetModelName() <<
"</a>"
678 <<
" from " << (*jt).second->GetMinEnergy()/
GeV
679 <<
" GeV to " << (*jt).second->GetMaxEnergy()/
GeV
680 <<
" GeV </b></li>\n";
686 outFile <<
" </ul>\n";
687 outFile <<
" </li>\n";
690 outFile <<
" <li><b><font color=\" 00AA00 \">cross sections : </font></b>\n";
691 outFile <<
" <ul>\n";
694 outFile <<
" </ul>\n";
696 outFile <<
" </li>\n";
697 outFile <<
"</ul>\n";
703 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp;
704 for (itp=
ep_map.lower_bound(theParticle); itp!=
ep_map.upper_bound(theParticle); ++itp) {
705 if (itp->first == theParticle) {
707 outFile <<
"<br> <b><font color=\" 0000ff \">process : "
712 outFile <<
" </li>\n";
713 outFile <<
"</ul>\n";
724 G4String dirName(getenv(
"G4PhysListDocDir"));
725 G4String physListName(getenv(
"G4PhysListName"));
727 std::ofstream outModel;
728 outModel.open(pathName);
729 outModel <<
"<html>\n";
730 outModel <<
"<head>\n";
731 outModel <<
"<title>Description of " << mod->
GetModelName()
733 outModel <<
"</head>\n";
734 outModel <<
"<body>\n";
738 outModel <<
"</body>\n";
739 outModel <<
"</html>\n";
750 std::transform(str.begin(), str.end(), str.begin(), [](
char ch) {
751 return ch ==
' ' ?
'_' : ch;
755 for(std::string::iterator it = str.begin(); it != str.end(); ++it) {
756 if(*it ==
' ') *it =
'_';
767 if (level == 0)
return;
770 <<
"\n====================================================================\n"
771 << std::setw(60) <<
"HADRONIC PROCESSES SUMMARY (verbose level " << level
779 if (level == 1 && (pname ==
"proton" ||
780 pname ==
"neutron" ||
781 pname ==
"deuteron" ||
795 pname ==
"GenericIon" ||
796 pname ==
"anti_neutron" ||
797 pname ==
"anti_proton" ||
798 pname ==
"anti_deuteron" ||
799 pname ==
"anti_triton" ||
800 pname ==
"anti_He3" ||
801 pname ==
"anti_alpha")) yes =
true;
802 if (level > 1) yes =
true;
805 std::multimap<PD,HP,std::less<PD> >::iterator it;
807 for (it=
p_map.lower_bound(part); it!=
p_map.upper_bound(part); ++it) {
808 if (it->first == part) {
809 HP proc = (it->second);
818 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp;
819 for(itp=
ep_map.lower_bound(part); itp!=
ep_map.upper_bound(part); ++itp) {
820 if(itp->first == part) {
823 G4cout <<
"\n---------------------------------------------------\n"
824 << std::setw(50) <<
"Hadronic Processes for "
834 G4cout <<
"\n================================================================"
845 G4cout <<
"\n---------------------------------------------------\n"
846 << std::setw(50) <<
"Hadronic Processes for "
854 G4String stringEnergyPerNucleon =
"";
858 stringEnergyPerNucleon =
"/n";
862 std::multimap<HP,HI,std::less<HP> >::iterator ih;
863 for(ih=
m_map.lower_bound(proc); ih!=
m_map.upper_bound(proc); ++ih) {
864 if(ih->first == proc) {
868 if(
model[i] == hi) {
break; }
892 if(
model[i]) {
model[i]->SetVerboseLevel(val); }
932 std::multimap<PD,HP,std::less<PD> >::iterator it;
936 subType == (it->second)->GetProcessSubType()) {
950 G4cout <<
" Setting energy/momentum report level to " << level
951 <<
" for " <<
process.size() <<
" hadronic processes " <<
G4endl;
953 process[i]->SetEpReportLevel(level);
961 G4cout <<
" Setting absolute energy/momentum test level to " << abslevel
976 G4cout <<
" Setting relative energy/momentum test level to " << rellevel
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4GenericIon * GenericIon()
G4double GetFissionCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
static G4PionMinus * PionMinus()
static G4Lambda * Lambda()
~G4HadronicProcessStore()
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetElasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
void SetProcessRelLevel(G4double relativeLevel)
G4double GetCaptureCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
static G4ParticleTable * GetParticleTable()
std::multimap< HP, HI > m_map
void RegisterExtraProcess(G4VProcess *)
void SetKineticEnergy(G4double aEnergy)
G4String HtmlFileName(const G4String &) const
G4double GetMinEnergy() const
void SetEpReportLevel(G4int level)
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
G4double GetCaptureCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetChargeExchangeCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
void DumpPhysicsTable(const G4ParticleDefinition &)
G4double GetCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Element *element, const G4Material *material=nullptr)
void RegisterParticle(G4HadronicProcess *, const G4ParticleDefinition *)
const G4ElementVector * GetElementVector() const
void Register(G4HadronicProcess *)
const G4String & GetParticleName() const
static G4PionPlus * PionPlus()
const G4String & GetParticleType() const
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
std::multimap< PD, HP > p_map
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
void SetBuildXSTable(G4bool val)
void RegisterInteraction(G4HadronicProcess *, G4HadronicInteraction *)
const G4double * GetVecNbOfAtomsPerVolume() const
G4double GetChargeExchangeCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
static G4Proton * Proton()
static G4ThreadLocal G4HadronicProcessStore * instance
void ProcessDescription(std::ostream &outFile) const override
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
G4bool GetBuildXSTable() const
void SetVerbose(G4int val)
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=nullptr)
G4DynamicParticle localDP
void DumpHtml(const G4ParticleDefinition &, std::ofstream &) const
void Print(G4int idxProcess, G4int idxParticle)
G4HadronicEPTestMessenger * theEPTestMessenger
G4int GetBaryonNumber() const
static G4HadronicInteractionRegistry * Instance()
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
static G4GenericIon * Definition()
const G4String & GetProcessName() const
static G4Positron * Positron()
virtual void ModelDescription(std::ostream &outFile) const
static G4Electron * Electron()
void PrintInfo(const G4ParticleDefinition *)
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
static G4HadronicProcessStore * Instance()
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::vector< G4String > modelName
G4double GetFissionCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
void DeRegisterExtraProcess(G4VProcess *)
G4CrossSectionDataStore * GetCrossSectionDataStore()
void SetProcessAbsLevel(G4double absoluteLevel)
std::vector< G4Element * > G4ElementVector
static G4Neutron * Neutron()
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4double GetCrossSectionPerVolume(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Material *material)
void PrintModelHtml(const G4HadronicInteraction *model) const
virtual void ProcessDescription(std::ostream &outfile) const
std::vector< G4int > wasPrinted
G4double GetMaxEnergy() const
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
G4GLOB_DLL std::ostream G4cout
void DeRegister(G4HadronicProcess *)
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
std::multimap< PD, G4VProcess * > ep_map
void PrintHtml(const G4ParticleDefinition *, std::ofstream &)
const XML_Char XML_Content * model
G4double GetInelasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
static constexpr double GeV
std::vector< G4HadronicProcess * > process
std::vector< G4VProcess * > extraProcess
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
size_t GetNumberOfElements() const
std::vector< PD > particle
const G4String & GetModelName() const
G4int GetProcessSubType() const