Geant4-11
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends
G4HadronicProcessStore Class Reference

#include <G4HadronicProcessStore.hh>

Public Member Functions

void Clean ()
 
void DeRegister (G4HadronicProcess *)
 
void DeRegisterExtraProcess (G4VProcess *)
 
void Dump (G4int level)
 
void DumpHtml ()
 
G4HadronicProcessFindProcess (const G4ParticleDefinition *, G4HadronicProcessType subType)
 
G4bool GetBuildXSTable () const
 
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)
 
G4double GetCaptureCrossSectionPerVolume (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
 
G4double GetChargeExchangeCrossSectionPerAtom (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
 
G4double GetChargeExchangeCrossSectionPerIsotope (const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
 
G4double GetChargeExchangeCrossSectionPerVolume (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
 
G4double GetCrossSectionPerAtom (const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Element *element, const G4Material *material=nullptr)
 
G4double GetCrossSectionPerVolume (const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Material *material)
 
G4double GetElasticCrossSectionPerAtom (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
 
G4double GetElasticCrossSectionPerIsotope (const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
 
G4double GetElasticCrossSectionPerVolume (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
 
G4double GetFissionCrossSectionPerAtom (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
 
G4double GetFissionCrossSectionPerIsotope (const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
 
G4double GetFissionCrossSectionPerVolume (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
 
G4double GetInelasticCrossSectionPerAtom (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
 
G4double GetInelasticCrossSectionPerIsotope (const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
 
G4double GetInelasticCrossSectionPerVolume (const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
 
G4int GetVerbose ()
 
void PrintHtml (const G4ParticleDefinition *, std::ofstream &)
 
void PrintInfo (const G4ParticleDefinition *)
 
void PrintModelHtml (const G4HadronicInteraction *model) const
 
void Register (G4HadronicProcess *)
 
void RegisterExtraProcess (G4VProcess *)
 
void RegisterInteraction (G4HadronicProcess *, G4HadronicInteraction *)
 
void RegisterParticle (G4HadronicProcess *, const G4ParticleDefinition *)
 
void RegisterParticleForExtraProcess (G4VProcess *, const G4ParticleDefinition *)
 
void SetBuildXSTable (G4bool val)
 
void SetEpReportLevel (G4int level)
 
void SetProcessAbsLevel (G4double absoluteLevel)
 
void SetProcessRelLevel (G4double relativeLevel)
 
void SetVerbose (G4int val)
 
 ~G4HadronicProcessStore ()
 

Static Public Member Functions

static G4HadronicProcessStoreInstance ()
 

Private Types

typedef G4HadronicInteractionHI
 
typedef G4HadronicProcessHP
 
typedef const G4ParticleDefinitionPD
 

Private Member Functions

 G4HadronicProcessStore ()
 
G4String HtmlFileName (const G4String &) const
 
void Print (G4int idxProcess, G4int idxParticle)
 

Private Attributes

G4bool buildTableStart
 
G4bool buildXSTable
 
PD currentParticle
 
HP currentProcess
 
std::multimap< PD, G4VProcess * > ep_map
 
std::vector< G4VProcess * > extraProcess
 
G4DynamicParticle localDP
 
std::multimap< HP, HIm_map
 
std::vector< G4HadronicInteraction * > model
 
std::vector< G4StringmodelName
 
G4int n_extra
 
G4int n_model
 
G4int n_part
 
G4int n_proc
 
std::multimap< PD, HPp_map
 
G4HadronicParametersparam
 
std::vector< PDparticle
 
std::vector< G4HadronicProcess * > process
 
G4HadronicEPTestMessengertheEPTestMessenger
 
PD theGenericIon
 
std::vector< G4intwasPrinted
 

Static Private Attributes

static G4ThreadLocal G4HadronicProcessStoreinstance
 

Friends

class G4ThreadLocalSingleton< G4HadronicProcessStore >
 

Detailed Description

Definition at line 68 of file G4HadronicProcessStore.hh.

Member Typedef Documentation

◆ HI

Definition at line 230 of file G4HadronicProcessStore.hh.

◆ HP

Definition at line 229 of file G4HadronicProcessStore.hh.

◆ PD

Definition at line 228 of file G4HadronicProcessStore.hh.

Constructor & Destructor Documentation

◆ ~G4HadronicProcessStore()

G4HadronicProcessStore::~G4HadronicProcessStore ( )

Definition at line 76 of file G4HadronicProcessStore.cc.

77{
78 Clean();
79 delete theEPTestMessenger;
80}
G4HadronicEPTestMessenger * theEPTestMessenger

References Clean(), and theEPTestMessenger.

◆ G4HadronicProcessStore()

G4HadronicProcessStore::G4HadronicProcessStore ( )
private

Definition at line 103 of file G4HadronicProcessStore.cc.

104{
105 n_proc = 0;
106 n_part = 0;
107 n_model= 0;
108 n_extra= 0;
109 currentProcess = nullptr;
110 currentParticle = nullptr;
114 buildTableStart = true;
115 buildXSTable = false;
117}
static G4HadronicParameters * Instance()
G4HadronicParameters * param
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()

References buildTableStart, buildXSTable, currentParticle, currentProcess, G4ParticleTable::FindParticle(), G4ParticleTable::GetParticleTable(), G4HadronicParameters::Instance(), n_extra, n_model, n_part, n_proc, param, theEPTestMessenger, and theGenericIon.

Member Function Documentation

◆ Clean()

void G4HadronicProcessStore::Clean ( )

Definition at line 84 of file G4HadronicProcessStore.cc.

85{
86 for(auto& itr : process)
87 delete itr;
88 process.clear();
89
90 for(auto& itr : extraProcess)
91 delete itr;
92 extraProcess.clear();
93
94 m_map.clear();
95 p_map.clear();
96
97 n_extra = 0;
98 n_proc = 0;
99}
std::multimap< PD, HP > p_map
std::multimap< HP, HI > m_map
std::vector< G4HadronicProcess * > process
std::vector< G4VProcess * > extraProcess

References extraProcess, m_map, n_extra, n_proc, p_map, and process.

Referenced by ~G4HadronicProcessStore().

◆ DeRegister()

void G4HadronicProcessStore::DeRegister ( G4HadronicProcess proc)

Definition at line 467 of file G4HadronicProcessStore.cc.

468{
469 for(G4int i=0; i<n_proc; ++i) {
470 if(process[i] == proc) {
471 process[i] = nullptr;
473 return;
474 }
475 }
476}
int G4int
Definition: G4Types.hh:85
void DeRegisterExtraProcess(G4VProcess *)

References DeRegisterExtraProcess(), n_proc, and process.

Referenced by G4HadronicProcess::~G4HadronicProcess().

◆ DeRegisterExtraProcess()

void G4HadronicProcessStore::DeRegisterExtraProcess ( G4VProcess proc)

Definition at line 532 of file G4HadronicProcessStore.cc.

533{
534 for(G4int i=0; i<n_extra; ++i) {
535 if(extraProcess[i] == proc) {
536 extraProcess[i] = nullptr;
537 if(1 < param->GetVerboseLevel()) {
538 G4cout << "Extra Process: " << i << " "
539 <<proc->GetProcessName()<< " is deregisted " << G4endl;
540 }
541 return;
542 }
543 }
544}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
Definition: G4VProcess.hh:382

References extraProcess, G4cout, G4endl, G4VProcess::GetProcessName(), G4HadronicParameters::GetVerboseLevel(), n_extra, and param.

Referenced by DeRegister(), and G4MuonMinusAtomicCapture::~G4MuonMinusAtomicCapture().

◆ Dump()

void G4HadronicProcessStore::Dump ( G4int  level)

Definition at line 748 of file G4HadronicProcessStore.cc.

749{
750 G4int level = std::max(param->GetVerboseLevel(), verb);
751 if (0 == level) return;
752
753 G4cout
754 << "\n====================================================================\n"
755 << std::setw(60) << "HADRONIC PROCESSES SUMMARY (verbose level "
756 << level << ")" << G4endl;
757
758 for (G4int i=0; i<n_part; ++i) {
759 PD part = particle[i];
760 G4String pname = part->GetParticleName();
761 G4bool yes = false;
762
763 if (level == 1 && (pname == "proton" ||
764 pname == "neutron" ||
765 pname == "deuteron" ||
766 pname == "triton" ||
767 pname == "He3" ||
768 pname == "alpha" ||
769 pname == "pi+" ||
770 pname == "pi-" ||
771 pname == "gamma" ||
772 pname == "e+" ||
773 pname == "e-" ||
774 pname == "mu+" ||
775 pname == "mu-" ||
776 pname == "kaon+" ||
777 pname == "kaon-" ||
778 pname == "lambda" ||
779 pname == "anti_lambda" ||
780 pname == "sigma-" ||
781 pname == "D-" ||
782 pname == "B-" ||
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;
791 if (yes) {
792 // main processes
793 std::multimap<PD,HP,std::less<PD> >::iterator it;
794
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);
798 G4int j=0;
799 for (; j<n_proc; ++j) {
800 if (process[j] == proc) { Print(j, i); }
801 }
802 }
803 }
804
805 // extra processes
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) {
809 G4VProcess* proc = (itp->second);
810 if (wasPrinted[i] == 0) {
811 G4cout << "\n---------------------------------------------------\n"
812 << std::setw(50) << "Hadronic Processes for "
813 << part->GetParticleName() << "\n";
814 wasPrinted[i] = 1;
815 }
816 G4cout << "\n Process: " << proc->GetProcessName() << G4endl;
817 }
818 }
819 }
820 }
821
822 G4cout << "\n================================================================"
823 << G4endl;
824}
bool G4bool
Definition: G4Types.hh:86
const G4ParticleDefinition * PD
std::vector< G4int > wasPrinted
void Print(G4int idxProcess, G4int idxParticle)
std::multimap< PD, G4VProcess * > ep_map
T max(const T t1, const T t2)
brief Return the largest of the two arguments
string pname
Definition: eplot.py:33

References ep_map, G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4HadronicParameters::GetVerboseLevel(), G4INCL::Math::max(), n_part, n_proc, p_map, param, particle, eplot::pname, Print(), process, and wasPrinted.

Referenced by PrintInfo().

◆ DumpHtml()

void G4HadronicProcessStore::DumpHtml ( )

Definition at line 576 of file G4HadronicProcessStore.cc.

577{
578 // Automatic generation of html documentation page for physics lists
579 // List processes, models and cross sections for the most important
580 // particles in descending order of importance
581
582 char* dirName = std::getenv("G4PhysListDocDir");
583 char* physListName = std::getenv("G4PhysListName");
584 if (dirName && physListName) {
585
586 // Open output file with path name
587 G4String pathName = G4String(dirName) + "/" + G4String(physListName) + ".html";
588 std::ofstream outFile;
589 outFile.open(pathName);
590
591 // Write physics list summary file
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";
599 outFile << "<ul>\n";
600
601 PrintHtml(G4Proton::Proton(), outFile);
602 PrintHtml(G4Neutron::Neutron(), outFile);
603 PrintHtml(G4PionPlus::PionPlus(), outFile);
605 PrintHtml(G4Gamma::Gamma(), outFile);
607// PrintHtml(G4MuonMinus::MuonMinus(), outFile);
611 PrintHtml(G4Lambda::Lambda(), outFile);
612 PrintHtml(G4Alpha::Alpha(), outFile);
614
615 outFile << "</ul>\n";
616 outFile << "</body>\n";
617 outFile << "</html>\n";
618 outFile.close();
619 }
620}
static G4Alpha * Alpha()
Definition: G4Alpha.cc:88
static G4Electron * Electron()
Definition: G4Electron.cc:93
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:92
void PrintHtml(const G4ParticleDefinition *, std::ofstream &)
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:112
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:112
static G4Lambda * Lambda()
Definition: G4Lambda.cc:107
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Positron * Positron()
Definition: G4Positron.cc:93
static G4Proton * Proton()
Definition: G4Proton.cc:92

References G4Alpha::Alpha(), G4Electron::Electron(), G4Gamma::Gamma(), G4GenericIon::GenericIon(), G4KaonMinus::KaonMinus(), G4KaonPlus::KaonPlus(), G4Lambda::Lambda(), G4Neutron::Neutron(), G4PionMinus::PionMinus(), G4PionPlus::PionPlus(), G4Positron::Positron(), PrintHtml(), and G4Proton::Proton().

Referenced by PrintInfo().

◆ FindProcess()

G4HadronicProcess * G4HadronicProcessStore::FindProcess ( const G4ParticleDefinition part,
G4HadronicProcessType  subType 
)

Definition at line 919 of file G4HadronicProcessStore.cc.

921{
922 bool isNew = false;
923 G4HadronicProcess* hp = nullptr;
925
926 if(part != currentParticle) {
927 const G4ParticleDefinition* p = part;
928 if(p->GetBaryonNumber() > 4 && p->GetParticleType() == "nucleus") {
929 p = theGenericIon;
930 }
931 if(p != currentParticle) {
932 isNew = true;
933 currentParticle = p;
934 }
935 }
936 if(!isNew) {
937 if(!currentProcess) {
938 isNew = true;
939 } else if(subType == currentProcess->GetProcessSubType()) {
940 hp = currentProcess;
941 } else {
942 isNew = true;
943 }
944 }
945 if(isNew) {
946 std::multimap<PD,HP,std::less<PD> >::iterator it;
947 for(it=p_map.lower_bound(currentParticle);
948 it!=p_map.upper_bound(currentParticle); ++it) {
949 if(it->first == currentParticle &&
950 subType == (it->second)->GetProcessSubType()) {
951 hp = it->second;
952 break;
953 }
954 }
955 currentProcess = hp;
956 }
957 return hp;
958}
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
const G4String & GetParticleType() const
G4int GetProcessSubType() const
Definition: G4VProcess.hh:400

References currentParticle, currentProcess, G4ParticleDefinition::GetBaryonNumber(), G4ParticleDefinition::GetParticleType(), G4VProcess::GetProcessSubType(), localDP, p_map, G4DynamicParticle::SetDefinition(), and theGenericIon.

Referenced by GetCaptureCrossSectionPerAtom(), GetChargeExchangeCrossSectionPerAtom(), GetElasticCrossSectionPerAtom(), GetFissionCrossSectionPerAtom(), and GetInelasticCrossSectionPerAtom().

◆ GetBuildXSTable()

G4bool G4HadronicProcessStore::GetBuildXSTable ( ) const

Definition at line 555 of file G4HadronicProcessStore.cc.

556{
557 return buildXSTable;
558}

References buildXSTable.

◆ GetCaptureCrossSectionPerAtom()

G4double G4HadronicProcessStore::GetCaptureCrossSectionPerAtom ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Element anElement,
const G4Material mat = nullptr 
)

Definition at line 280 of file G4HadronicProcessStore.cc.

284{
285 G4HadronicProcess* hp = FindProcess(aParticle, fCapture);
286 localDP.SetKineticEnergy(kineticEnergy);
287 G4double cross = 0.0;
288 if(hp) {
289 cross = hp->GetElementCrossSection(&localDP,anElement,mat);
290 }
291 return cross;
292}
double G4double
Definition: G4Types.hh:83
void SetKineticEnergy(G4double aEnergy)
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=nullptr)

References fCapture, FindProcess(), G4HadronicProcess::GetElementCrossSection(), localDP, and G4DynamicParticle::SetKineticEnergy().

Referenced by GetCaptureCrossSectionPerVolume(), and GetCrossSectionPerAtom().

◆ GetCaptureCrossSectionPerIsotope()

G4double G4HadronicProcessStore::GetCaptureCrossSectionPerIsotope ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
G4int  Z,
G4int  A 
)

Definition at line 296 of file G4HadronicProcessStore.cc.

300{
301 return 0.0;
302}

◆ GetCaptureCrossSectionPerVolume()

G4double G4HadronicProcessStore::GetCaptureCrossSectionPerVolume ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Material material 
)

Definition at line 260 of file G4HadronicProcessStore.cc.

264{
265 G4double cross = 0.0;
266 const G4ElementVector* theElementVector = material->GetElementVector();
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]*
273 GetCaptureCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
274 }
275 return cross;
276}
std::vector< const G4Element * > G4ElementVector
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
string material
Definition: eplot.py:19

References GetCaptureCrossSectionPerAtom(), and eplot::material.

Referenced by GetCrossSectionPerVolume().

◆ GetChargeExchangeCrossSectionPerAtom()

G4double G4HadronicProcessStore::GetChargeExchangeCrossSectionPerAtom ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Element anElement,
const G4Material mat = nullptr 
)

Definition at line 372 of file G4HadronicProcessStore.cc.

376{
378 localDP.SetKineticEnergy(kineticEnergy);
379 G4double cross = 0.0;
380 if(hp) {
381 cross = hp->GetElementCrossSection(&localDP,anElement,mat);
382 }
383 return cross;
384}
@ fChargeExchange

References fChargeExchange, FindProcess(), G4HadronicProcess::GetElementCrossSection(), localDP, and G4DynamicParticle::SetKineticEnergy().

Referenced by GetChargeExchangeCrossSectionPerVolume(), and GetCrossSectionPerAtom().

◆ GetChargeExchangeCrossSectionPerIsotope()

G4double G4HadronicProcessStore::GetChargeExchangeCrossSectionPerIsotope ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
G4int  Z,
G4int  A 
)

Definition at line 388 of file G4HadronicProcessStore.cc.

392{
393 return 0.0;
394}

◆ GetChargeExchangeCrossSectionPerVolume()

G4double G4HadronicProcessStore::GetChargeExchangeCrossSectionPerVolume ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Material material 
)

Definition at line 352 of file G4HadronicProcessStore.cc.

356{
357 G4double cross = 0.0;
358 const G4ElementVector* theElementVector = material->GetElementVector();
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]*
365 GetChargeExchangeCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
366 }
367 return cross;
368}
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)

References GetChargeExchangeCrossSectionPerAtom(), and eplot::material.

Referenced by GetCrossSectionPerVolume().

◆ GetCrossSectionPerAtom()

G4double G4HadronicProcessStore::GetCrossSectionPerAtom ( const G4ParticleDefinition particle,
G4double  kineticEnergy,
const G4VProcess process,
const G4Element element,
const G4Material material = nullptr 
)

Definition at line 121 of file G4HadronicProcessStore.cc.

127{
128 G4double cross = 0.;
129 G4int subType = proc->GetProcessSubType();
130 if (subType == fHadronElastic)
131 cross = GetElasticCrossSectionPerAtom(part,energy,element,material);
132 else if (subType == fHadronInelastic)
133 cross = GetInelasticCrossSectionPerAtom(part,energy,element,material);
134 else if (subType == fCapture)
135 cross = GetCaptureCrossSectionPerAtom(part,energy,element,material);
136 else if (subType == fFission)
137 cross = GetFissionCrossSectionPerAtom(part,energy,element,material);
138 else if (subType == fChargeExchange)
140 return cross;
141}
@ fHadronElastic
@ fHadronInelastic
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4double energy(const ThreeVector &p, const G4double m)

References G4INCL::KinematicsUtils::energy(), fCapture, fChargeExchange, fFission, fHadronElastic, fHadronInelastic, GetCaptureCrossSectionPerAtom(), GetChargeExchangeCrossSectionPerAtom(), GetElasticCrossSectionPerAtom(), GetFissionCrossSectionPerAtom(), GetInelasticCrossSectionPerAtom(), G4VProcess::GetProcessSubType(), and eplot::material.

◆ GetCrossSectionPerVolume()

G4double G4HadronicProcessStore::GetCrossSectionPerVolume ( const G4ParticleDefinition particle,
G4double  kineticEnergy,
const G4VProcess process,
const G4Material material 
)

Definition at line 145 of file G4HadronicProcessStore.cc.

150{
151 G4double cross = 0.;
152 G4int subType = proc->GetProcessSubType();
153 if (subType == fHadronElastic)
155 else if (subType == fHadronInelastic)
157 else if (subType == fCapture)
159 else if (subType == fFission)
161 else if (subType == fChargeExchange)
163 return cross;
164}
G4double GetCaptureCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetChargeExchangeCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetFissionCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)

References G4INCL::KinematicsUtils::energy(), fCapture, fChargeExchange, fFission, fHadronElastic, fHadronInelastic, GetCaptureCrossSectionPerVolume(), GetChargeExchangeCrossSectionPerVolume(), GetElasticCrossSectionPerVolume(), GetFissionCrossSectionPerVolume(), GetInelasticCrossSectionPerVolume(), G4VProcess::GetProcessSubType(), and eplot::material.

◆ GetElasticCrossSectionPerAtom()

G4double G4HadronicProcessStore::GetElasticCrossSectionPerAtom ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Element anElement,
const G4Material mat = 0 
)

Definition at line 188 of file G4HadronicProcessStore.cc.

192{
194 G4double cross = 0.0;
195 localDP.SetKineticEnergy(kineticEnergy);
196 if(hp) {
197 cross = hp->GetElementCrossSection(&localDP,anElement,mat);
198 }
199 return cross;
200}

References fHadronElastic, FindProcess(), G4HadronicProcess::GetElementCrossSection(), localDP, and G4DynamicParticle::SetKineticEnergy().

Referenced by GetCrossSectionPerAtom(), and GetElasticCrossSectionPerVolume().

◆ GetElasticCrossSectionPerIsotope()

G4double G4HadronicProcessStore::GetElasticCrossSectionPerIsotope ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
G4int  Z,
G4int  A 
)

Definition at line 204 of file G4HadronicProcessStore.cc.

208{
209 return 0.0;
210}

◆ GetElasticCrossSectionPerVolume()

G4double G4HadronicProcessStore::GetElasticCrossSectionPerVolume ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Material material 
)

Definition at line 168 of file G4HadronicProcessStore.cc.

172{
173 G4double cross = 0.0;
174 const G4ElementVector* theElementVector = material->GetElementVector();
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]*
181 GetElasticCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
182 }
183 return cross;
184}

References GetElasticCrossSectionPerAtom(), and eplot::material.

Referenced by GetCrossSectionPerVolume().

◆ GetFissionCrossSectionPerAtom()

G4double G4HadronicProcessStore::GetFissionCrossSectionPerAtom ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Element anElement,
const G4Material mat = nullptr 
)

Definition at line 326 of file G4HadronicProcessStore.cc.

330{
331 G4HadronicProcess* hp = FindProcess(aParticle, fFission);
332 localDP.SetKineticEnergy(kineticEnergy);
333 G4double cross = 0.0;
334 if(hp) {
335 cross = hp->GetElementCrossSection(&localDP,anElement,mat);
336 }
337 return cross;
338}

References fFission, FindProcess(), G4HadronicProcess::GetElementCrossSection(), localDP, and G4DynamicParticle::SetKineticEnergy().

Referenced by GetCrossSectionPerAtom(), and GetFissionCrossSectionPerVolume().

◆ GetFissionCrossSectionPerIsotope()

G4double G4HadronicProcessStore::GetFissionCrossSectionPerIsotope ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
G4int  Z,
G4int  A 
)

Definition at line 342 of file G4HadronicProcessStore.cc.

346{
347 return 0.0;
348}

◆ GetFissionCrossSectionPerVolume()

G4double G4HadronicProcessStore::GetFissionCrossSectionPerVolume ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Material material 
)

Definition at line 306 of file G4HadronicProcessStore.cc.

310{
311 G4double cross = 0.0;
312 const G4ElementVector* theElementVector = material->GetElementVector();
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]*
319 GetFissionCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
320 }
321 return cross;
322}

References GetFissionCrossSectionPerAtom(), and eplot::material.

Referenced by GetCrossSectionPerVolume().

◆ GetInelasticCrossSectionPerAtom()

G4double G4HadronicProcessStore::GetInelasticCrossSectionPerAtom ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Element anElement,
const G4Material mat = nullptr 
)

Definition at line 234 of file G4HadronicProcessStore.cc.

238{
240 localDP.SetKineticEnergy(kineticEnergy);
241 G4double cross = 0.0;
242 if(hp) {
243 cross = hp->GetElementCrossSection(&localDP,anElement,mat);
244 }
245 return cross;
246}

References fHadronInelastic, FindProcess(), G4HadronicProcess::GetElementCrossSection(), localDP, and G4DynamicParticle::SetKineticEnergy().

Referenced by GetCrossSectionPerAtom(), and GetInelasticCrossSectionPerVolume().

◆ GetInelasticCrossSectionPerIsotope()

G4double G4HadronicProcessStore::GetInelasticCrossSectionPerIsotope ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
G4int  Z,
G4int  A 
)

Definition at line 250 of file G4HadronicProcessStore.cc.

254{
255 return 0.0;
256}

◆ GetInelasticCrossSectionPerVolume()

G4double G4HadronicProcessStore::GetInelasticCrossSectionPerVolume ( const G4ParticleDefinition aParticle,
G4double  kineticEnergy,
const G4Material material 
)

Definition at line 214 of file G4HadronicProcessStore.cc.

218{
219 G4double cross = 0.0;
220 const G4ElementVector* theElementVector = material->GetElementVector();
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]*
227 GetInelasticCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
228 }
229 return cross;
230}

References GetInelasticCrossSectionPerAtom(), and eplot::material.

Referenced by GetCrossSectionPerVolume().

◆ GetVerbose()

G4int G4HadronicProcessStore::GetVerbose ( )

Definition at line 912 of file G4HadronicProcessStore.cc.

913{
914 return param->GetVerboseLevel();
915}

References G4HadronicParameters::GetVerboseLevel(), and param.

◆ HtmlFileName()

G4String G4HadronicProcessStore::HtmlFileName ( const G4String in) const
private

Definition at line 733 of file G4HadronicProcessStore.cc.

734{
735 G4String str(in);
736
737 // replace blanks:
738 std::transform(str.begin(), str.end(), str.begin(), [](char ch)
739 {
740 return ch == ' ' ? '_' : ch;
741 });
742 str=str + ".html";
743 return str;
744}
G4bool transform(G4String &input, const G4String &type)

References G4coutFormatters::anonymous_namespace{G4coutFormatters.cc}::transform().

Referenced by PrintHtml(), and PrintModelHtml().

◆ Instance()

G4HadronicProcessStore * G4HadronicProcessStore::Instance ( void  )
static

◆ Print()

void G4HadronicProcessStore::Print ( G4int  idxProcess,
G4int  idxParticle 
)
private

Definition at line 828 of file G4HadronicProcessStore.cc.

829{
830 G4HadronicProcess* proc = process[idxProc];
831 const G4ParticleDefinition* part = particle[idxPart];
832 if(part == nullptr || proc == nullptr) { return; }
833 if (wasPrinted[idxPart] == 0) {
834 G4cout << "\n---------------------------------------------------\n"
835 << std::setw(50) << "Hadronic Processes for "
836 << part->GetParticleName() << "\n";
837 wasPrinted[idxPart] = 1;
838 }
839
840 G4cout << "\n Process: " << proc->GetProcessName();
841
842 // Append the string "/n" (i.e. "per nucleon") on the kinetic energy of ions.
843 G4String stringEnergyPerNucleon = "";
844 if (part == G4GenericIon::Definition() ||
845 std::abs( part->GetBaryonNumber() ) > 1) {
846 stringEnergyPerNucleon = "/n";
847 }
848 // print cross section factor
849 if(param->ApplyFactorXS()) {
850 G4int pdg = part->GetPDGEncoding();
851 G4int subType = proc->GetProcessSubType();
852 G4double fact = 1.0;
853 if(subType == fHadronInelastic) {
854 if(pdg == 2212 || pdg == 2112) {
856 } else if(std::abs(pdg) == 211) {
858 } else {
860 }
861 } else if(subType == fHadronElastic) {
862 if(pdg == 2212 || pdg == 2112) {
864 } else if(std::abs(pdg) == 211) {
865 fact = param->XSFactorPionElastic();
866 } else {
868 }
869 }
870 if(std::abs(fact - 1.0) > 1.e-6) {
871 G4cout << " XSfactor= " << fact;
872 }
873 }
874
875 HI hi = 0;
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) {
879 hi = ih->second;
880 G4int i=0;
881 for(; i<n_model; ++i) {
882 if(model[i] == hi) { break; }
883 }
884 G4cout << "\n Model: " << std::setw(25) << modelName[i] << ": "
885 << G4BestUnit(hi->GetMinEnergy(), "Energy") << stringEnergyPerNucleon
886 << " ---> "
887 << G4BestUnit(hi->GetMaxEnergy(), "Energy") << stringEnergyPerNucleon;
888 }
889 }
890 G4cout << G4endl;
891
893 csds->DumpPhysicsTable(*part);
894}
#define G4BestUnit(a, b)
void DumpPhysicsTable(const G4ParticleDefinition &)
static G4GenericIon * Definition()
Definition: G4GenericIon.cc:48
G4double XSFactorPionElastic() const
G4double XSFactorNucleonElastic() const
G4double XSFactorHadronInelastic() const
G4double XSFactorPionInelastic() const
G4double XSFactorHadronElastic() const
G4double XSFactorNucleonInelastic() const
std::vector< G4HadronicInteraction * > model
std::vector< G4String > modelName
G4HadronicInteraction * HI
G4CrossSectionDataStore * GetCrossSectionDataStore()
const G4String & GetParticleName() const

References G4HadronicParameters::ApplyFactorXS(), G4GenericIon::Definition(), G4CrossSectionDataStore::DumpPhysicsTable(), fHadronElastic, fHadronInelastic, G4BestUnit, G4cout, G4endl, G4ParticleDefinition::GetBaryonNumber(), G4HadronicProcess::GetCrossSectionDataStore(), G4HadronicInteraction::GetMaxEnergy(), G4HadronicInteraction::GetMinEnergy(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGEncoding(), G4VProcess::GetProcessName(), G4VProcess::GetProcessSubType(), m_map, model, modelName, n_model, param, particle, process, wasPrinted, G4HadronicParameters::XSFactorHadronElastic(), G4HadronicParameters::XSFactorHadronInelastic(), G4HadronicParameters::XSFactorNucleonElastic(), G4HadronicParameters::XSFactorNucleonInelastic(), G4HadronicParameters::XSFactorPionElastic(), and G4HadronicParameters::XSFactorPionInelastic().

Referenced by Dump().

◆ PrintHtml()

void G4HadronicProcessStore::PrintHtml ( const G4ParticleDefinition theParticle,
std::ofstream &  outFile 
)

Definition at line 624 of file G4HadronicProcessStore.cc.

626{
627 // Automatic generation of html documentation page for physics lists
628 // List processes for the most important particles in descending order
629 // of importance
630
631 outFile << "<br> <li><h2><font color=\" ff0000 \">"
632 << theParticle->GetParticleName() << "</font></h2></li>\n";
633
634 typedef std::multimap<PD,HP,std::less<PD> > PDHPmap;
635 typedef std::multimap<HP,HI,std::less<HP> > HPHImap;
636
637 std::pair<PDHPmap::iterator, PDHPmap::iterator> itpart =
638 p_map.equal_range(theParticle);
639
640 // Loop over processes assigned to particle
641
642 G4HadronicProcess* theProcess;
643 for (PDHPmap::iterator it = itpart.first; it != itpart.second; ++it) {
644 theProcess = (*it).second;
645 // description is inline
646 //outFile << "<br> &nbsp;&nbsp; <b><font color=\" 0000ff \">process : <a href=\""
647 // << theProcess->GetProcessName() << ".html\"> "
648 // << theProcess->GetProcessName() << "</a></font></b>\n";
649 outFile << "<br> &nbsp;&nbsp; <b><font color=\" 0000ff \">process : "
650 << theProcess->GetProcessName() << "</font></b>\n";
651 outFile << "<ul>\n";
652 outFile << " <li>";
653 theProcess->ProcessDescription(outFile);
654 outFile << " <li><b><font color=\" 00AA00 \">models : </font></b>\n";
655 // Loop over models assigned to process
656 std::pair<HPHImap::iterator, HPHImap::iterator> itmod =
657 m_map.equal_range(theProcess);
658
659 outFile << " <ul>\n";
660 G4String physListName(std::getenv("G4PhysListName"));
661
662 for (HPHImap::iterator jt = itmod.first; jt != itmod.second; ++jt) {
663 outFile << " <li><b><a href=\"" << physListName << "_"
664 << HtmlFileName((*jt).second->GetModelName()) << "\"> "
665 << (*jt).second->GetModelName() << "</a>"
666 << " from " << (*jt).second->GetMinEnergy()/GeV
667 << " GeV to " << (*jt).second->GetMaxEnergy()/GeV
668 << " GeV </b></li>\n";
669
670 // Print ModelDescription, ignore that we overwrite files n-times.
671 PrintModelHtml((*jt).second);
672
673 }
674 outFile << " </ul>\n";
675 outFile << " </li>\n";
676
677 // List cross sections assigned to process
678 outFile << " <li><b><font color=\" 00AA00 \">cross sections : </font></b>\n";
679 outFile << " <ul>\n";
680 theProcess->GetCrossSectionDataStore()->DumpHtml(*theParticle, outFile);
681 // << " \n";
682 outFile << " </ul>\n";
683
684 outFile << " </li>\n";
685 outFile << "</ul>\n";
686
687 }
688
689 // Loop over extra (G4VProcess) processes
690
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) {
694 G4VProcess* proc = (itp->second);
695 outFile << "<br> &nbsp;&nbsp; <b><font color=\" 0000ff \">process : "
696 << proc->GetProcessName() << "</font></b>\n";
697 outFile << "<ul>\n";
698 outFile << " <li>";
699 proc->ProcessDescription(outFile);
700 outFile << " </li>\n";
701 outFile << "</ul>\n";
702 }
703 }
704
705} // PrintHtml for particle
static constexpr double GeV
Definition: G4SIunits.hh:203
void DumpHtml(const G4ParticleDefinition &, std::ofstream &) const
G4String HtmlFileName(const G4String &) const
void PrintModelHtml(const G4HadronicInteraction *model) const
void ProcessDescription(std::ostream &outFile) const override
virtual void ProcessDescription(std::ostream &outfile) const
Definition: G4VProcess.cc:175

References G4CrossSectionDataStore::DumpHtml(), ep_map, G4HadronicProcess::GetCrossSectionDataStore(), G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), GeV, HtmlFileName(), m_map, p_map, PrintModelHtml(), G4VProcess::ProcessDescription(), and G4HadronicProcess::ProcessDescription().

Referenced by DumpHtml().

◆ PrintInfo()

void G4HadronicProcessStore::PrintInfo ( const G4ParticleDefinition part)

◆ PrintModelHtml()

void G4HadronicProcessStore::PrintModelHtml ( const G4HadronicInteraction model) const

Definition at line 710 of file G4HadronicProcessStore.cc.

711{
712 G4String dirName(std::getenv("G4PhysListDocDir"));
713 G4String physListName(std::getenv("G4PhysListName"));
714 G4String pathName = dirName + "/" + physListName + "_" + HtmlFileName(mod->GetModelName());
715 std::ofstream outModel;
716 outModel.open(pathName);
717 outModel << "<html>\n";
718 outModel << "<head>\n";
719 outModel << "<title>Description of " << mod->GetModelName()
720 << "</title>\n";
721 outModel << "</head>\n";
722 outModel << "<body>\n";
723
724 mod->ModelDescription(outModel);
725
726 outModel << "</body>\n";
727 outModel << "</html>\n";
728
729}

References G4HadronicInteraction::GetModelName(), HtmlFileName(), and G4HadronicInteraction::ModelDescription().

Referenced by PrintHtml().

◆ Register()

void G4HadronicProcessStore::Register ( G4HadronicProcess proc)

Definition at line 398 of file G4HadronicProcessStore.cc.

399{
400 for(G4int i=0; i<n_proc; ++i) {
401 if(process[i] == proc) { return; }
402 }
403 if(1 < param->GetVerboseLevel()) {
404 G4cout << "G4HadronicProcessStore::Register hadronic " << n_proc
405 << " " << proc->GetProcessName() << G4endl;
406 }
407 ++n_proc;
408 process.push_back(proc);
409}

References G4cout, G4endl, G4VProcess::GetProcessName(), G4HadronicParameters::GetVerboseLevel(), n_proc, param, and process.

Referenced by G4HadronicProcess::InitialiseLocal().

◆ RegisterExtraProcess()

void G4HadronicProcessStore::RegisterExtraProcess ( G4VProcess proc)

Definition at line 480 of file G4HadronicProcessStore.cc.

481{
482 for(G4int i=0; i<n_extra; ++i) {
483 if(extraProcess[i] == proc) { return; }
484 }
485 G4HadronicProcess* hproc = reinterpret_cast<G4HadronicProcess*>(proc);
486 if(hproc) {
487 for(G4int i=0; i<n_proc; ++i) {
488 if(process[i] == hproc) { return; }
489 }
490 }
491 if(1 < param->GetVerboseLevel()) {
492 G4cout << "Extra Process: " << n_extra
493 << " " << proc->GetProcessName() << G4endl;
494 }
495 ++n_extra;
496 extraProcess.push_back(proc);
497}

References extraProcess, G4cout, G4endl, G4VProcess::GetProcessName(), G4HadronicParameters::GetVerboseLevel(), n_extra, n_proc, param, and process.

Referenced by G4NeutronTrackingCut::ConstructProcess(), G4HadronStoppingProcess::G4HadronStoppingProcess(), G4MuonMinusAtomicCapture::G4MuonMinusAtomicCapture(), and G4RadioactiveDecay::G4RadioactiveDecay().

◆ RegisterInteraction()

void G4HadronicProcessStore::RegisterInteraction ( G4HadronicProcess proc,
G4HadronicInteraction mod 
)

Definition at line 448 of file G4HadronicProcessStore.cc.

450{
451 G4int i=0;
452 for(; i<n_proc; ++i) {if(process[i] == proc) { break; }}
453 G4int k=0;
454 for(; k<n_model; ++k) {if(model[k] == mod) { break; }}
455
456 m_map.insert(std::multimap<HP,HI>::value_type(proc,mod));
457
458 if(k == n_model) {
459 ++n_model;
460 model.push_back(mod);
461 modelName.push_back(mod->GetModelName());
462 }
463}
const G4String & GetModelName() const

References G4HadronicInteraction::GetModelName(), m_map, model, modelName, n_model, n_proc, and process.

Referenced by G4HadronicProcess::RegisterMe().

◆ RegisterParticle()

void G4HadronicProcessStore::RegisterParticle ( G4HadronicProcess proc,
const G4ParticleDefinition part 
)

Definition at line 413 of file G4HadronicProcessStore.cc.

415{
416 G4int i=0;
417 for(; i<n_proc; ++i) {if(process[i] == proc) break;}
418 G4int j=0;
419 for(; j<n_part; ++j) {if(particle[j] == part) break;}
420
421 if(1 < param->GetVerboseLevel()) {
422 G4cout << "G4HadronicProcessStore::RegisterParticle "
423 << part->GetParticleName()
424 << " for " << proc->GetProcessName() << G4endl;
425 }
426 if(j == n_part) {
427 ++n_part;
428 particle.push_back(part);
429 wasPrinted.push_back(0);
430 }
431
432 // the pair should be added?
433 if(i < n_proc) {
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; }
439 }
440 }
441 }
442
443 p_map.insert(std::multimap<PD,HP>::value_type(part,proc));
444}

References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4HadronicParameters::GetVerboseLevel(), n_part, n_proc, p_map, param, particle, process, and wasPrinted.

Referenced by G4HadronicProcess::PreparePhysicsTable().

◆ RegisterParticleForExtraProcess()

void G4HadronicProcessStore::RegisterParticleForExtraProcess ( G4VProcess proc,
const G4ParticleDefinition part 
)

Definition at line 501 of file G4HadronicProcessStore.cc.

504{
505 G4int i=0;
506 for(; i<n_extra; ++i) { if(extraProcess[i] == proc) { break; } }
507 G4int j=0;
508 for(; j<n_part; ++j) { if(particle[j] == part) { break; } }
509
510 if(j == n_part) {
511 ++n_part;
512 particle.push_back(part);
513 wasPrinted.push_back(0);
514 }
515
516 // the pair should be added?
517 if(i < n_extra) {
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) {
521 G4VProcess* process2 = (it->second);
522 if(proc == process2) { return; }
523 }
524 }
525 }
526
527 ep_map.insert(std::multimap<PD,G4VProcess*>::value_type(part,proc));
528}

References ep_map, extraProcess, n_extra, n_part, particle, and wasPrinted.

Referenced by G4RadioactiveDecay::BuildPhysicsTable(), G4NeutronTrackingCut::ConstructProcess(), G4HadronStoppingProcess::PreparePhysicsTable(), and G4MuonMinusAtomicCapture::PreparePhysicsTable().

◆ SetBuildXSTable()

void G4HadronicProcessStore::SetBuildXSTable ( G4bool  val)

Definition at line 548 of file G4HadronicProcessStore.cc.

549{
550 buildXSTable = val;
551}

References buildXSTable.

◆ SetEpReportLevel()

void G4HadronicProcessStore::SetEpReportLevel ( G4int  level)

Definition at line 962 of file G4HadronicProcessStore.cc.

963{
964 G4cout << " Setting energy/momentum report level to " << level
965 << " for " << process.size() << " hadronic processes " << G4endl;
966 for (G4int i = 0; i < G4int(process.size()); ++i) {
967 process[i]->SetEpReportLevel(level);
968 }
969}

References G4cout, G4endl, and process.

Referenced by G4HadronicEPTestMessenger::SetNewValue().

◆ SetProcessAbsLevel()

void G4HadronicProcessStore::SetProcessAbsLevel ( G4double  absoluteLevel)

Definition at line 973 of file G4HadronicProcessStore.cc.

974{
975 G4cout << " Setting absolute energy/momentum test level to " << abslevel
976 << G4endl;
977 G4double rellevel = 0.0;
978 G4HadronicProcess* theProcess = 0;
979 for (G4int i = 0; i < G4int(process.size()); ++i) {
980 theProcess = process[i];
981 rellevel = theProcess->GetEnergyMomentumCheckLevels().first;
982 theProcess->SetEnergyMomentumCheckLevels(rellevel, abslevel);
983 }
984}
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)

References G4cout, G4endl, G4HadronicProcess::GetEnergyMomentumCheckLevels(), process, and G4HadronicProcess::SetEnergyMomentumCheckLevels().

Referenced by G4HadronicEPTestMessenger::SetNewValue().

◆ SetProcessRelLevel()

void G4HadronicProcessStore::SetProcessRelLevel ( G4double  relativeLevel)

Definition at line 988 of file G4HadronicProcessStore.cc.

989{
990 G4cout << " Setting relative energy/momentum test level to " << rellevel
991 << G4endl;
992 G4double abslevel = 0.0;
993 G4HadronicProcess* theProcess = 0;
994 for (G4int i = 0; i < G4int(process.size()); ++i) {
995 theProcess = process[i];
996 abslevel = theProcess->GetEnergyMomentumCheckLevels().second;
997 theProcess->SetEnergyMomentumCheckLevels(rellevel, abslevel);
998 }
999}

References G4cout, G4endl, G4HadronicProcess::GetEnergyMomentumCheckLevels(), process, and G4HadronicProcess::SetEnergyMomentumCheckLevels().

Referenced by G4HadronicEPTestMessenger::SetNewValue().

◆ SetVerbose()

void G4HadronicProcessStore::SetVerbose ( G4int  val)

Definition at line 898 of file G4HadronicProcessStore.cc.

900{
901 G4int i;
902 for(i=0; i<n_proc; ++i) {
903 if(process[i]) { process[i]->SetVerboseLevel(val); }
904 }
905 for(i=0; i<n_model; ++i) {
906 if(model[i]) { model[i]->SetVerboseLevel(val); }
907 }
908}

References model, n_model, n_proc, and process.

Friends And Related Function Documentation

◆ G4ThreadLocalSingleton< G4HadronicProcessStore >

Definition at line 1 of file G4HadronicProcessStore.hh.

Field Documentation

◆ buildTableStart

G4bool G4HadronicProcessStore::buildTableStart
private

Definition at line 254 of file G4HadronicProcessStore.hh.

Referenced by G4HadronicProcessStore(), and PrintInfo().

◆ buildXSTable

G4bool G4HadronicProcessStore::buildXSTable
private

◆ currentParticle

PD G4HadronicProcessStore::currentParticle
private

Definition at line 259 of file G4HadronicProcessStore.hh.

Referenced by FindProcess(), and G4HadronicProcessStore().

◆ currentProcess

HP G4HadronicProcessStore::currentProcess
private

Definition at line 258 of file G4HadronicProcessStore.hh.

Referenced by FindProcess(), and G4HadronicProcessStore().

◆ ep_map

std::multimap<PD,G4VProcess*> G4HadronicProcessStore::ep_map
private

Definition at line 244 of file G4HadronicProcessStore.hh.

Referenced by Dump(), PrintHtml(), and RegisterParticleForExtraProcess().

◆ extraProcess

std::vector<G4VProcess*> G4HadronicProcessStore::extraProcess
private

◆ instance

G4ThreadLocal G4HadronicProcessStore* G4HadronicProcessStore::instance
staticprivate

Definition at line 226 of file G4HadronicProcessStore.hh.

◆ localDP

G4DynamicParticle G4HadronicProcessStore::localDP
private

◆ m_map

std::multimap<HP,HI> G4HadronicProcessStore::m_map
private

Definition at line 240 of file G4HadronicProcessStore.hh.

Referenced by Clean(), Print(), PrintHtml(), and RegisterInteraction().

◆ model

std::vector<G4HadronicInteraction*> G4HadronicProcessStore::model
private

Definition at line 234 of file G4HadronicProcessStore.hh.

Referenced by Print(), RegisterInteraction(), and SetVerbose().

◆ modelName

std::vector<G4String> G4HadronicProcessStore::modelName
private

Definition at line 235 of file G4HadronicProcessStore.hh.

Referenced by Print(), and RegisterInteraction().

◆ n_extra

G4int G4HadronicProcessStore::n_extra
private

◆ n_model

G4int G4HadronicProcessStore::n_model
private

◆ n_part

G4int G4HadronicProcessStore::n_part
private

◆ n_proc

G4int G4HadronicProcessStore::n_proc
private

◆ p_map

std::multimap<PD,HP> G4HadronicProcessStore::p_map
private

Definition at line 239 of file G4HadronicProcessStore.hh.

Referenced by Clean(), Dump(), FindProcess(), PrintHtml(), and RegisterParticle().

◆ param

G4HadronicParameters* G4HadronicProcessStore::param
private

◆ particle

std::vector<PD> G4HadronicProcessStore::particle
private

◆ process

std::vector<G4HadronicProcess*> G4HadronicProcessStore::process
private

◆ theEPTestMessenger

G4HadronicEPTestMessenger* G4HadronicProcessStore::theEPTestMessenger
private

Definition at line 264 of file G4HadronicProcessStore.hh.

Referenced by G4HadronicProcessStore(), and ~G4HadronicProcessStore().

◆ theGenericIon

PD G4HadronicProcessStore::theGenericIon
private

Definition at line 260 of file G4HadronicProcessStore.hh.

Referenced by FindProcess(), and G4HadronicProcessStore().

◆ wasPrinted

std::vector<G4int> G4HadronicProcessStore::wasPrinted
private

The documentation for this class was generated from the following files: