175 const G4double* theAtomNumDensityVector =
176 material->GetVecNbOfAtomsPerVolume();
177 size_t nelm =
material->GetNumberOfElements();
178 for (
size_t i=0; i<nelm; ++i) {
179 const G4Element* elm = (*theElementVector)[i];
180 cross += theAtomNumDensityVector[i]*
221 const G4double* theAtomNumDensityVector =
222 material->GetVecNbOfAtomsPerVolume();
223 size_t nelm =
material->GetNumberOfElements();
224 for (
size_t i=0; i<nelm; ++i) {
225 const G4Element* elm = (*theElementVector)[i];
226 cross += theAtomNumDensityVector[i]*
267 const G4double* theAtomNumDensityVector =
268 material->GetVecNbOfAtomsPerVolume();
269 size_t nelm =
material->GetNumberOfElements();
270 for (
size_t i=0; i<nelm; ++i) {
271 const G4Element* elm = (*theElementVector)[i];
272 cross += theAtomNumDensityVector[i]*
313 const G4double* theAtomNumDensityVector =
314 material->GetVecNbOfAtomsPerVolume();
315 size_t nelm =
material->GetNumberOfElements();
316 for (
size_t i=0; i<nelm; i++) {
317 const G4Element* elm = (*theElementVector)[i];
318 cross += theAtomNumDensityVector[i]*
359 const G4double* theAtomNumDensityVector =
360 material->GetVecNbOfAtomsPerVolume();
361 size_t nelm =
material->GetNumberOfElements();
362 for (
size_t i=0; i<nelm; ++i) {
363 const G4Element* elm = (*theElementVector)[i];
364 cross += theAtomNumDensityVector[i]*
401 if(
process[i] == proc) {
return; }
404 G4cout <<
"G4HadronicProcessStore::Register hadronic " <<
n_proc
422 G4cout <<
"G4HadronicProcessStore::RegisterParticle "
434 std::multimap<PD,HP,std::less<PD> >::iterator it;
435 for(it=
p_map.lower_bound(part); it!=
p_map.upper_bound(part); ++it) {
436 if(it->first == part) {
437 HP process2 = (it->second);
438 if(proc == process2) {
return; }
443 p_map.insert(std::multimap<PD,HP>::value_type(part,proc));
456 m_map.insert(std::multimap<HP,HI>::value_type(proc,mod));
460 model.push_back(mod);
488 if(
process[i] == hproc) {
return; }
518 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator it;
519 for(it=
ep_map.lower_bound(part); it!=
ep_map.upper_bound(part); ++it) {
520 if(it->first == part) {
522 if(proc == process2) {
return; }
527 ep_map.insert(std::multimap<PD,G4VProcess*>::value_type(part,proc));
538 G4cout <<
"Extra Process: " << i <<
" "
569 if (std::getenv(
"G4PhysListDocDir") )
DumpHtml();
582 char* dirName = std::getenv(
"G4PhysListDocDir");
583 char* physListName = std::getenv(
"G4PhysListName");
584 if (dirName && physListName) {
588 std::ofstream outFile;
589 outFile.open(pathName);
592 outFile <<
"<html>\n";
593 outFile <<
"<head>\n";
594 outFile <<
"<title>Physics List Summary</title>\n";
595 outFile <<
"</head>\n";
596 outFile <<
"<body>\n";
597 outFile <<
"<h2> Summary of Hadronic Processes, Models and Cross Sections for Physics List "
598 <<
G4String(physListName) <<
"</h2>\n";
615 outFile <<
"</ul>\n";
616 outFile <<
"</body>\n";
617 outFile <<
"</html>\n";
625 std::ofstream& outFile)
631 outFile <<
"<br> <li><h2><font color=\" ff0000 \">"
634 typedef std::multimap<PD,HP,std::less<PD> > PDHPmap;
635 typedef std::multimap<HP,HI,std::less<HP> > HPHImap;
637 std::pair<PDHPmap::iterator, PDHPmap::iterator> itpart =
638 p_map.equal_range(theParticle);
643 for (PDHPmap::iterator it = itpart.first; it != itpart.second; ++it) {
644 theProcess = (*it).second;
649 outFile <<
"<br> <b><font color=\" 0000ff \">process : "
654 outFile <<
" <li><b><font color=\" 00AA00 \">models : </font></b>\n";
656 std::pair<HPHImap::iterator, HPHImap::iterator> itmod =
657 m_map.equal_range(theProcess);
659 outFile <<
" <ul>\n";
660 G4String physListName(std::getenv(
"G4PhysListName"));
662 for (HPHImap::iterator jt = itmod.first; jt != itmod.second; ++jt) {
663 outFile <<
" <li><b><a href=\"" << physListName <<
"_"
665 << (*jt).second->GetModelName() <<
"</a>"
666 <<
" from " << (*jt).second->GetMinEnergy()/
GeV
667 <<
" GeV to " << (*jt).second->GetMaxEnergy()/
GeV
668 <<
" GeV </b></li>\n";
674 outFile <<
" </ul>\n";
675 outFile <<
" </li>\n";
678 outFile <<
" <li><b><font color=\" 00AA00 \">cross sections : </font></b>\n";
679 outFile <<
" <ul>\n";
682 outFile <<
" </ul>\n";
684 outFile <<
" </li>\n";
685 outFile <<
"</ul>\n";
691 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp;
692 for (itp=
ep_map.lower_bound(theParticle); itp!=
ep_map.upper_bound(theParticle); ++itp) {
693 if (itp->first == theParticle) {
695 outFile <<
"<br> <b><font color=\" 0000ff \">process : "
700 outFile <<
" </li>\n";
701 outFile <<
"</ul>\n";
712 G4String dirName(std::getenv(
"G4PhysListDocDir"));
713 G4String physListName(std::getenv(
"G4PhysListName"));
715 std::ofstream outModel;
716 outModel.open(pathName);
717 outModel <<
"<html>\n";
718 outModel <<
"<head>\n";
719 outModel <<
"<title>Description of " << mod->
GetModelName()
721 outModel <<
"</head>\n";
722 outModel <<
"<body>\n";
726 outModel <<
"</body>\n";
727 outModel <<
"</html>\n";
740 return ch ==
' ' ?
'_' : ch;
751 if (0 == level)
return;
754 <<
"\n====================================================================\n"
755 << std::setw(60) <<
"HADRONIC PROCESSES SUMMARY (verbose level "
756 << level <<
")" <<
G4endl;
763 if (level == 1 && (
pname ==
"proton" ||
764 pname ==
"neutron" ||
765 pname ==
"deuteron" ||
779 pname ==
"anti_lambda" ||
783 pname ==
"GenericIon" ||
784 pname ==
"anti_neutron" ||
785 pname ==
"anti_proton" ||
786 pname ==
"anti_deuteron" ||
787 pname ==
"anti_triton" ||
788 pname ==
"anti_He3" ||
789 pname ==
"anti_alpha")) yes =
true;
790 if (level > 1) yes =
true;
793 std::multimap<PD,HP,std::less<PD> >::iterator it;
795 for (it=
p_map.lower_bound(part); it!=
p_map.upper_bound(part); ++it) {
796 if (it->first == part) {
797 HP proc = (it->second);
806 std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp;
807 for(itp=
ep_map.lower_bound(part); itp!=
ep_map.upper_bound(part); ++itp) {
808 if(itp->first == part) {
811 G4cout <<
"\n---------------------------------------------------\n"
812 << std::setw(50) <<
"Hadronic Processes for "
822 G4cout <<
"\n================================================================"
832 if(part ==
nullptr || proc ==
nullptr) {
return; }
834 G4cout <<
"\n---------------------------------------------------\n"
835 << std::setw(50) <<
"Hadronic Processes for "
843 G4String stringEnergyPerNucleon =
"";
846 stringEnergyPerNucleon =
"/n";
854 if(pdg == 2212 || pdg == 2112) {
856 }
else if(std::abs(pdg) == 211) {
862 if(pdg == 2212 || pdg == 2112) {
864 }
else if(std::abs(pdg) == 211) {
870 if(std::abs(fact - 1.0) > 1.e-6) {
871 G4cout <<
" XSfactor= " << fact;
876 std::multimap<HP,HI,std::less<HP> >::iterator ih;
877 for(ih=
m_map.lower_bound(proc); ih!=
m_map.upper_bound(proc); ++ih) {
878 if(ih->first == proc) {
882 if(
model[i] == hi) {
break; }
906 if(
model[i]) {
model[i]->SetVerboseLevel(val); }
946 std::multimap<PD,HP,std::less<PD> >::iterator it;
950 subType == (it->second)->GetProcessSubType()) {
964 G4cout <<
" Setting energy/momentum report level to " << level
965 <<
" for " <<
process.size() <<
" hadronic processes " <<
G4endl;
967 process[i]->SetEpReportLevel(level);
975 G4cout <<
" Setting absolute energy/momentum test level to " << abslevel
990 G4cout <<
" Setting relative energy/momentum test level to " << rellevel
std::vector< const G4Element * > G4ElementVector
static constexpr double GeV
G4GLOB_DLL std::ostream G4cout
void DumpHtml(const G4ParticleDefinition &, std::ofstream &) const
void DumpPhysicsTable(const G4ParticleDefinition &)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(G4double aEnergy)
static G4Electron * Electron()
static G4GenericIon * Definition()
static G4GenericIon * GenericIon()
static G4HadronicInteractionRegistry * Instance()
virtual void ModelDescription(std::ostream &outFile) const
G4double GetMinEnergy() const
const G4String & GetModelName() const
G4double GetMaxEnergy() const
G4bool ApplyFactorXS() const
G4double XSFactorPionElastic() const
static G4HadronicParameters * Instance()
G4int GetVerboseLevel() const
G4double XSFactorNucleonElastic() const
G4double XSFactorHadronInelastic() const
G4double XSFactorPionInelastic() const
G4double XSFactorHadronElastic() const
G4double XSFactorNucleonInelastic() const
void DeRegister(G4HadronicProcess *)
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
G4double GetCaptureCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
std::vector< G4HadronicInteraction * > model
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)
std::multimap< PD, HP > p_map
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)
std::multimap< HP, HI > m_map
G4String HtmlFileName(const G4String &) const
G4double GetChargeExchangeCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetFissionCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
std::vector< G4HadronicProcess * > process
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 SetBuildXSTable(G4bool val)
G4DynamicParticle localDP
std::vector< G4int > wasPrinted
void Print(G4int idxProcess, G4int idxParticle)
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
G4HadronicParameters * param
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
void RegisterExtraProcess(G4VProcess *)
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
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 *)
G4HadronicEPTestMessenger * theEPTestMessenger
G4double GetCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Element *element, const G4Material *material=nullptr)
std::vector< G4String > modelName
std::vector< G4VProcess * > extraProcess
void SetVerbose(G4int val)
std::multimap< PD, G4VProcess * > ep_map
std::vector< PD > particle
G4bool GetBuildXSTable() const
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)
void ProcessDescription(std::ostream &outFile) const override
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=nullptr)
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
G4CrossSectionDataStore * GetCrossSectionDataStore()
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4Lambda * Lambda()
static G4Neutron * Neutron()
const G4String & GetParticleType() const
G4int GetPDGEncoding() const
G4int GetBaryonNumber() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4Positron * Positron()
static G4Proton * Proton()
virtual void ProcessDescription(std::ostream &outfile) const
G4int GetProcessSubType() const
const G4String & GetProcessName() const
G4double energy(const ThreeVector &p, const G4double m)
T max(const T t1, const T t2)
brief Return the largest of the two arguments