185 const G4double* theAtomNumDensityVector =
188 for (
size_t i=0; i<nelm; ++i) {
189 const G4Element* elm = (*theElementVector)[i];
190 cross += theAtomNumDensityVector[i]*
231 const G4double* theAtomNumDensityVector =
234 for (
size_t i=0; i<nelm; ++i) {
235 const G4Element* elm = (*theElementVector)[i];
236 cross += theAtomNumDensityVector[i]*
277 const G4double* theAtomNumDensityVector =
280 for (
size_t i=0; i<nelm; ++i) {
281 const G4Element* elm = (*theElementVector)[i];
282 cross += theAtomNumDensityVector[i]*
323 const G4double* theAtomNumDensityVector =
326 for (
size_t i=0; i<nelm; i++) {
327 const G4Element* elm = (*theElementVector)[i];
328 cross += theAtomNumDensityVector[i]*
369 const G4double* theAtomNumDensityVector =
372 for (
size_t i=0; i<nelm; ++i) {
373 const G4Element* elm = (*theElementVector)[i];
374 cross += theAtomNumDensityVector[i]*
411 if(
process[i] == proc) {
return; }
414 G4cout <<
"G4HadronicProcessStore::Register hadronic " << n_proc
432 G4cout <<
"G4HadronicProcessStore::RegisterParticle "
444 std::multimap<PD,HP,std::less<PD> >::iterator it;
445 for(it=
p_map.lower_bound(part); it!=
p_map.upper_bound(part); ++it) {
446 if(it->first == part) {
447 HP process2 = (it->second);
448 if(proc == process2) {
return; }
453 p_map.insert(std::multimap<PD,HP>::value_type(part,proc));
466 m_map.insert(std::multimap<HP,HI>::value_type(proc,mod));
470 model.push_back(mod);
498 if(
process[i] == hproc) {
return; }
502 G4cout <<
"Extra Process: " << n_extra
528 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator it;
529 for(it=
ep_map.lower_bound(part); it!=
ep_map.upper_bound(part); ++it) {
530 if(it->first == part) {
532 if(proc == process2) {
return; }
537 ep_map.insert(std::multimap<PD,G4VProcess*>::value_type(part,proc));
548 G4cout <<
"Extra Process: " << i <<
" "
565 if (getenv(
"G4PhysListDocDir") )
DumpHtml();
578 char* dirName = getenv(
"G4PhysListDocDir");
579 char* physListName = getenv(
"G4PhysListName");
580 if (dirName && physListName) {
584 std::ofstream outFile;
585 outFile.open(pathName);
588 outFile <<
"<html>\n";
589 outFile <<
"<head>\n";
590 outFile <<
"<title>Physics List Summary</title>\n";
591 outFile <<
"</head>\n";
592 outFile <<
"<body>\n";
593 outFile <<
"<h2> Summary of Hadronic Processes, Models and Cross Sections for Physics List "
594 <<
G4String(physListName) <<
"</h2>\n";
610 outFile <<
"</ul>\n";
611 outFile <<
"</body>\n";
612 outFile <<
"</html>\n";
620 std::ofstream& outFile)
626 outFile <<
"<br> <li><h2><font color=\" ff0000 \">"
629 typedef std::multimap<PD,HP,std::less<PD> > PDHPmap;
630 typedef std::multimap<HP,HI,std::less<HP> > HPHImap;
632 std::pair<PDHPmap::iterator, PDHPmap::iterator> itpart =
633 p_map.equal_range(theParticle);
638 for (PDHPmap::iterator it = itpart.first; it != itpart.second; ++it) {
639 theProcess = (*it).second;
644 outFile <<
"<br> <b><font color=\" 0000ff \">process : "
649 outFile <<
" <li><b><font color=\" 00AA00 \">models : </font></b>\n";
651 std::pair<HPHImap::iterator, HPHImap::iterator> itmod =
652 m_map.equal_range(theProcess);
654 outFile <<
" <ul>\n";
655 G4String physListName(getenv(
"G4PhysListName"));
657 for (HPHImap::iterator jt = itmod.first; jt != itmod.second; ++jt) {
658 outFile <<
" <li><b><a href=\"" << physListName <<
"_"
660 << (*jt).second->GetModelName() <<
"</a>"
661 <<
" from " << (*jt).second->GetMinEnergy()/
GeV
662 <<
" GeV to " << (*jt).second->GetMaxEnergy()/
GeV
663 <<
" GeV </b></li>\n";
669 outFile <<
" </ul>\n";
670 outFile <<
" </li>\n";
673 outFile <<
" <li><b><font color=\" 00AA00 \">cross sections : </font></b>\n";
674 outFile <<
" <ul>\n";
677 outFile <<
" </ul>\n";
679 outFile <<
" </li>\n";
680 outFile <<
"</ul>\n";
689 G4String dirName(getenv(
"G4PhysListDocDir"));
690 G4String physListName(getenv(
"G4PhysListName"));
692 std::ofstream outModel;
693 outModel.open(pathName);
694 outModel <<
"<html>\n";
695 outModel <<
"<head>\n";
696 outModel <<
"<title>Description of " << mod->
GetModelName()
698 outModel <<
"</head>\n";
699 outModel <<
"<body>\n";
703 outModel <<
"</body>\n";
704 outModel <<
"</html>\n";
715 std::transform(str.begin(), str.end(), str.begin(), [](
char ch) {
716 return ch ==
' ' ?
'_' : ch;
720 for(std::string::iterator it = str.begin(); it != str.end(); ++it) {
721 if(*it ==
' ') *it =
'_';
732 if (level == 0)
return;
735 <<
"\n====================================================================\n"
736 << std::setw(60) <<
"HADRONIC PROCESSES SUMMARY (verbose level " << level
744 if (level == 1 && (pname ==
"proton" ||
745 pname ==
"neutron" ||
746 pname ==
"deuteron" ||
760 pname ==
"GenericIon" ||
761 pname ==
"anti_neutron" ||
762 pname ==
"anti_proton" ||
763 pname ==
"anti_deuteron" ||
764 pname ==
"anti_triton" ||
765 pname ==
"anti_He3" ||
766 pname ==
"anti_alpha")) yes =
true;
767 if (level > 1) yes =
true;
770 std::multimap<PD,HP,std::less<PD> >::iterator it;
772 for (it=
p_map.lower_bound(part); it!=
p_map.upper_bound(part); ++it) {
773 if (it->first == part) {
774 HP proc = (it->second);
783 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp;
784 for(itp=
ep_map.lower_bound(part); itp!=
ep_map.upper_bound(part); ++itp) {
785 if(itp->first == part) {
788 G4cout <<
"\n---------------------------------------------------\n"
789 << std::setw(50) <<
"Hadronic Processes for "
799 G4cout <<
"\n================================================================"
810 G4cout <<
"\n---------------------------------------------------\n"
811 << std::setw(50) <<
"Hadronic Processes for "
819 G4String stringEnergyPerNucleon =
"";
823 stringEnergyPerNucleon =
"/n";
827 std::multimap<HP,HI,std::less<HP> >::iterator ih;
828 for(ih=
m_map.lower_bound(proc); ih!=
m_map.upper_bound(proc); ++ih) {
829 if(ih->first == proc) {
833 if(
model[i] == hi) {
break; }
857 if(
model[i]) {
model[i]->SetVerboseLevel(val); }
897 std::multimap<PD,HP,std::less<PD> >::iterator it;
901 subType == (it->second)->GetProcessSubType()) {
915 G4cout <<
" Setting energy/momentum report level to " << level
916 <<
" for " <<
process.size() <<
" hadronic processes " <<
G4endl;
918 process[i]->SetEpReportLevel(level);
926 G4cout <<
" Setting absolute energy/momentum test level to " << abslevel
941 G4cout <<
" Setting relative energy/momentum test level to " << rellevel
G4double GetMinEnergy() const
void DeRegisterExtraProcess(G4VProcess *)
void PrintModelHtml(const G4HadronicInteraction *model) const
std::vector< G4String > modelName
void SetVerbose(G4int val)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetProcessAbsLevel(G4double absoluteLevel)
G4double GetCaptureCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
void RegisterInteraction(G4HadronicProcess *, G4HadronicInteraction *)
std::vector< G4Element * > G4ElementVector
std::vector< G4HadronicProcess * > process
G4double GetMaxEnergy() const
void PrintHtml(const G4ParticleDefinition *, std::ofstream &)
static G4HadronicProcessStore * Instance()
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
std::vector< PD > particle
~G4HadronicProcessStore()
std::vector< G4int > wasPrinted
static G4GenericIon * Definition()
std::multimap< PD, G4VProcess * > ep_map
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=nullptr)
virtual void ModelDescription(std::ostream &outFile) const
G4DynamicParticle localDP
std::vector< G4HadronicInteraction * > model
G4double GetFissionCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
const G4String & GetModelName() const
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
const G4ElementVector * GetElementVector() const
const G4String & GetParticleName() const
static G4KaonMinus * KaonMinus()
const G4double * GetVecNbOfAtomsPerVolume() const
std::multimap< HP, HI > m_map
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
G4GLOB_DLL std::ostream G4cout
std::vector< G4VProcess * > extraProcess
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void Register(G4HadronicProcess *)
G4double GetChargeExchangeCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4CrossSectionDataStore * GetCrossSectionDataStore()
G4double GetInelasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
static G4Proton * Proton()
static G4PionPlus * PionPlus()
const G4String & GetParticleType() const
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
std::multimap< PD, HP > p_map
static G4Neutron * Neutron()
virtual void ProcessDescription(std::ostream &outFile) const
void RegisterParticle(G4HadronicProcess *, const G4ParticleDefinition *)
void Print(G4int idxProcess, G4int idxParticle)
const G4String & GetProcessName() const
void DeRegister(G4HadronicProcess *)
void SetKineticEnergy(G4double aEnergy)
G4String HtmlFileName(const G4String &) const
void RegisterExtraProcess(G4VProcess *)
G4HadronicEPTestMessenger * theEPTestMessenger
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
static G4Positron * Positron()
void DumpPhysicsTable(const G4ParticleDefinition &)
G4double GetChargeExchangeCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetFissionCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
void DumpHtml(const G4ParticleDefinition &, std::ofstream &) const
static G4ParticleTable * GetParticleTable()
G4double GetElasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double energy(const ThreeVector &p, const G4double m)
static G4HadronicInteractionRegistry * Instance()
G4double GetCrossSectionPerVolume(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Material *material)
static G4PionMinus * PionMinus()
void SetProcessRelLevel(G4double relativeLevel)
static constexpr double GeV
static G4Electron * Electron()
void SetEpReportLevel(G4int level)
G4double GetCaptureCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
size_t GetNumberOfElements() const
static G4Lambda * Lambda()
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
static G4ThreadLocal G4HadronicProcessStore * instance
static G4KaonPlus * KaonPlus()
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4int GetProcessSubType() const
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
G4double GetCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Element *element, const G4Material *material=0)
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4int GetBaryonNumber() const
void PrintInfo(const G4ParticleDefinition *)