Geant4  10.02.p03
G4HadronicProcessStore Class Reference

#include <G4HadronicProcessStore.hh>

Collaboration diagram for G4HadronicProcessStore:

Public Member Functions

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

Static Public Member Functions

static G4HadronicProcessStoreInstance ()
 

Private Types

typedef const G4ParticleDefinitionPD
 
typedef G4HadronicProcessHP
 
typedef G4HadronicInteractionHI
 

Private Member Functions

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

Private Attributes

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

Static Private Attributes

static G4ThreadLocal G4HadronicProcessStoreinstance = 0
 

Friends

class G4ThreadLocalSingleton< G4HadronicProcessStore >
 

Detailed Description

Definition at line 68 of file G4HadronicProcessStore.hh.

Member Typedef Documentation

◆ HI

Definition at line 222 of file G4HadronicProcessStore.hh.

◆ HP

Definition at line 221 of file G4HadronicProcessStore.hh.

◆ PD

Definition at line 220 of file G4HadronicProcessStore.hh.

Constructor & Destructor Documentation

◆ ~G4HadronicProcessStore()

G4HadronicProcessStore::~G4HadronicProcessStore ( )

Definition at line 80 of file G4HadronicProcessStore.cc.

81 {
82  Clean();
83  delete theEPTestMessenger;
84 }
G4HadronicEPTestMessenger * theEPTestMessenger
Here is the call graph for this function:

◆ G4HadronicProcessStore()

G4HadronicProcessStore::G4HadronicProcessStore ( )
private

Definition at line 115 of file G4HadronicProcessStore.cc.

116 {
117  n_proc = 0;
118  n_part = 0;
119  n_model= 0;
120  n_extra= 0;
121  currentProcess = 0;
122  currentParticle = 0;
123  theGenericIon =
125  verbose = 1;
126  buildTableStart = true;
128 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4HadronicEPTestMessenger * theEPTestMessenger
static G4ParticleTable * GetParticleTable()
Here is the call graph for this function:

Member Function Documentation

◆ Clean()

void G4HadronicProcessStore::Clean ( )

Definition at line 88 of file G4HadronicProcessStore.cc.

89 {
90  G4int i;
91  //std::cout << "G4HadronicProcessStore::Clean() Nproc= " << n_proc
92  // << " Nextra= " << n_extra << std::endl;
93  for (i=0; i<n_proc; ++i) {
94  if( process[i] ) {
95  //G4cout << "G4HadronicProcessStore::Clean() delete hadronic "
96  // << i << " " << process[i]->GetProcessName() << G4endl;
97  delete process[i];
98  }
99  }
100  for(i=0; i<n_extra; ++i) {
101  if(extraProcess[i]) {
102  // G4cout << "G4HadronicProcessStore::Clean() delete extra proc "
103  //<< i << " " << extraProcess[i]->GetProcessName() << G4endl;
104  delete extraProcess[i];
105  extraProcess[i] = 0;
106  }
107  }
108  //std::cout << "G4HadronicProcessStore::Clean() done" << std::endl;
109  n_extra = 0;
110  n_proc = 0;
111 }
std::vector< G4HadronicProcess * > process
int G4int
Definition: G4Types.hh:78
std::vector< G4VProcess * > extraProcess
Here is the caller graph for this function:

◆ DeRegister()

void G4HadronicProcessStore::DeRegister ( G4HadronicProcess proc)

Definition at line 477 of file G4HadronicProcessStore.cc.

478 {
479  for(G4int i=0; i<n_proc; ++i) {
480  if(process[i] == proc) {
481  process[i] = 0;
483  return;
484  }
485  }
486 }
void DeRegisterExtraProcess(G4VProcess *)
std::vector< G4HadronicProcess * > process
int G4int
Definition: G4Types.hh:78
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeRegisterExtraProcess()

void G4HadronicProcessStore::DeRegisterExtraProcess ( G4VProcess proc)

Definition at line 542 of file G4HadronicProcessStore.cc.

543 {
544  for(G4int i=0; i<n_extra; ++i) {
545  if(extraProcess[i] == proc) {
546  extraProcess[i] = 0;
547  if(1 < verbose) {
548  G4cout << "Extra Process: " << i << " "
549  <<proc->GetProcessName()<< " is deregisted " << G4endl;
550  }
551  return;
552  }
553  }
554 }
int G4int
Definition: G4Types.hh:78
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4GLOB_DLL std::ostream G4cout
std::vector< G4VProcess * > extraProcess
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dump()

void G4HadronicProcessStore::Dump ( G4int  level)

Definition at line 729 of file G4HadronicProcessStore.cc.

730 {
731  if (level == 0) return;
732 
733  G4cout
734  << "\n====================================================================\n"
735  << std::setw(60) << "HADRONIC PROCESSES SUMMARY (verbose level " << level
736  << ")" << G4endl;
737 
738  for (G4int i=0; i<n_part; ++i) {
739  PD part = particle[i];
740  G4String pname = part->GetParticleName();
741  G4bool yes = false;
742 
743  if (level == 1 && (pname == "proton" ||
744  pname == "neutron" ||
745  pname == "deuteron" ||
746  pname == "triton" ||
747  pname == "He3" ||
748  pname == "alpha" ||
749  pname == "pi+" ||
750  pname == "pi-" ||
751  pname == "gamma" ||
752  pname == "e+" ||
753  pname == "e-" ||
754  pname == "mu+" ||
755  pname == "mu-" ||
756  pname == "kaon+" ||
757  pname == "kaon-" ||
758  pname == "lambda" ||
759  pname == "GenericIon" ||
760  pname == "anti_neutron" ||
761  pname == "anti_proton" ||
762  pname == "anti_deuteron" ||
763  pname == "anti_triton" ||
764  pname == "anti_He3" ||
765  pname == "anti_alpha")) yes = true;
766  if (level > 1) yes = true;
767  if (yes) {
768  // main processes
769  std::multimap<PD,HP,std::less<PD> >::iterator it;
770 
771  for (it=p_map.lower_bound(part); it!=p_map.upper_bound(part); ++it) {
772  if (it->first == part) {
773  HP proc = (it->second);
774  G4int j=0;
775  for (; j<n_proc; ++j) {
776  if (process[j] == proc) { Print(j, i); }
777  }
778  }
779  }
780 
781  // extra processes
782  std::multimap<PD,G4VProcess*,std::less<PD> >::iterator itp;
783  for(itp=ep_map.lower_bound(part); itp!=ep_map.upper_bound(part); ++itp) {
784  if(itp->first == part) {
785  G4VProcess* proc = (itp->second);
786  if (wasPrinted[i] == 0) {
787  G4cout << "\n---------------------------------------------------\n"
788  << std::setw(50) << "Hadronic Processes for "
789  << part->GetParticleName() << "\n";
790  wasPrinted[i] = 1;
791  }
792  G4cout << "\n Process: " << proc->GetProcessName() << G4endl;
793  }
794  }
795  }
796  }
797 
798  G4cout << "\n================================================================"
799  << G4endl;
800 }
const G4ParticleDefinition * PD
std::vector< G4HadronicProcess * > process
std::vector< G4int > wasPrinted
std::multimap< PD, G4VProcess * > ep_map
int G4int
Definition: G4Types.hh:78
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
TString part[npart]
std::multimap< PD, HP > p_map
void Print(G4int idxProcess, G4int idxParticle)
string pname
Definition: eplot.py:33
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpHtml()

void G4HadronicProcessStore::DumpHtml ( )

Definition at line 571 of file G4HadronicProcessStore.cc.

572 {
573  // Automatic generation of html documentation page for physics lists
574  // List processes, models and cross sections for the most important
575  // particles in descending order of importance
576 
577  char* dirName = getenv("G4PhysListDocDir");
578  char* physListName = getenv("G4PhysListName");
579  if (dirName && physListName) {
580 
581  // Open output file with path name
582  G4String pathName = G4String(dirName) + "/" + G4String(physListName) + ".html";
583  std::ofstream outFile;
584  outFile.open(pathName);
585 
586  // Write physics list summary file
587  outFile << "<html>\n";
588  outFile << "<head>\n";
589  outFile << "<title>Physics List Summary</title>\n";
590  outFile << "</head>\n";
591  outFile << "<body>\n";
592  outFile << "<h2> Summary of Hadronic Processes, Models and Cross Sections for Physics List "
593  << G4String(physListName) << "</h2>\n";
594  outFile << "<ul>\n";
595 
596  PrintHtml(G4Proton::Proton(), outFile);
597  PrintHtml(G4Neutron::Neutron(), outFile);
598  PrintHtml(G4PionPlus::PionPlus(), outFile);
599  PrintHtml(G4PionMinus::PionMinus(), outFile);
600  PrintHtml(G4Gamma::Gamma(), outFile);
601  PrintHtml(G4Electron::Electron(), outFile);
602 // PrintHtml(G4MuonMinus::MuonMinus(), outFile);
603  PrintHtml(G4Positron::Positron(), outFile);
604  PrintHtml(G4KaonPlus::KaonPlus(), outFile);
605  PrintHtml(G4KaonMinus::KaonMinus(), outFile);
606  PrintHtml(G4Lambda::Lambda(), outFile);
607  PrintHtml(G4Alpha::Alpha(), outFile);
608 
609  outFile << "</ul>\n";
610  outFile << "</body>\n";
611  outFile << "</html>\n";
612  outFile.close();
613  }
614 }
void PrintHtml(const G4ParticleDefinition *, std::ofstream &)
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static G4Positron * Positron()
Definition: G4Positron.cc:94
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
static G4Electron * Electron()
Definition: G4Electron.cc:94
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4Lambda * Lambda()
Definition: G4Lambda.cc:108
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindProcess()

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

Definition at line 869 of file G4HadronicProcessStore.cc.

871 {
872  bool isNew = false;
873  G4HadronicProcess* hp = 0;
874  localDP.SetDefinition(part);
875 
876  if(part != currentParticle) {
877  const G4ParticleDefinition* p = part;
878  if(p->GetBaryonNumber() > 4 && p->GetParticleType() == "nucleus") {
879  p = theGenericIon;
880  }
881  if(p != currentParticle) {
882  isNew = true;
883  currentParticle = p;
884  }
885  }
886  if(!isNew) {
887  if(!currentProcess) {
888  isNew = true;
889  } else if(subType == currentProcess->GetProcessSubType()) {
890  hp = currentProcess;
891  } else {
892  isNew = true;
893  }
894  }
895  if(isNew) {
896  std::multimap<PD,HP,std::less<PD> >::iterator it;
897  for(it=p_map.lower_bound(currentParticle);
898  it!=p_map.upper_bound(currentParticle); ++it) {
899  if(it->first == currentParticle &&
900  subType == (it->second)->GetProcessSubType()) {
901  hp = it->second;
902  break;
903  }
904  }
905  currentProcess = hp;
906  }
907  return hp;
908 }
const G4String & GetParticleType() const
G4int GetProcessSubType() const
Definition: G4VProcess.hh:426
TString part[npart]
std::multimap< PD, HP > p_map
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCaptureCrossSectionPerAtom()

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

Definition at line 290 of file G4HadronicProcessStore.cc.

294 {
295  G4HadronicProcess* hp = FindProcess(aParticle, fCapture);
296  localDP.SetKineticEnergy(kineticEnergy);
297  G4double cross = 0.0;
298  if(hp) {
299  cross = hp->GetElementCrossSection(&localDP,anElement,mat);
300  }
301  return cross;
302 }
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void SetKineticEnergy(G4double aEnergy)
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=0)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCaptureCrossSectionPerIsotope()

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

Definition at line 306 of file G4HadronicProcessStore.cc.

310 {
311  return 0.0;
312 }

◆ GetCaptureCrossSectionPerVolume()

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

Definition at line 270 of file G4HadronicProcessStore.cc.

274 {
275  G4double cross = 0.0;
276  const G4ElementVector* theElementVector = material->GetElementVector();
277  const G4double* theAtomNumDensityVector =
278  material->GetVecNbOfAtomsPerVolume();
279  size_t nelm = material->GetNumberOfElements();
280  for (size_t i=0; i<nelm; ++i) {
281  const G4Element* elm = (*theElementVector)[i];
282  cross += theAtomNumDensityVector[i]*
283  GetCaptureCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
284  }
285  return cross;
286 }
std::vector< G4Element * > G4ElementVector
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
double G4double
Definition: G4Types.hh:76
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetChargeExchangeCrossSectionPerAtom()

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

Definition at line 382 of file G4HadronicProcessStore.cc.

386 {
388  localDP.SetKineticEnergy(kineticEnergy);
389  G4double cross = 0.0;
390  if(hp) {
391  cross = hp->GetElementCrossSection(&localDP,anElement,mat);
392  }
393  return cross;
394 }
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void SetKineticEnergy(G4double aEnergy)
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=0)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetChargeExchangeCrossSectionPerIsotope()

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

Definition at line 398 of file G4HadronicProcessStore.cc.

402 {
403  return 0.0;
404 }

◆ GetChargeExchangeCrossSectionPerVolume()

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

Definition at line 362 of file G4HadronicProcessStore.cc.

366 {
367  G4double cross = 0.0;
368  const G4ElementVector* theElementVector = material->GetElementVector();
369  const G4double* theAtomNumDensityVector =
370  material->GetVecNbOfAtomsPerVolume();
371  size_t nelm = material->GetNumberOfElements();
372  for (size_t i=0; i<nelm; ++i) {
373  const G4Element* elm = (*theElementVector)[i];
374  cross += theAtomNumDensityVector[i]*
375  GetChargeExchangeCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
376  }
377  return cross;
378 }
std::vector< G4Element * > G4ElementVector
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCrossSectionPerAtom()

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

Definition at line 131 of file G4HadronicProcessStore.cc.

137 {
138  G4double cross = 0.;
139  G4int subType = proc->GetProcessSubType();
140  if (subType == fHadronElastic)
141  cross = GetElasticCrossSectionPerAtom(part,energy,element,material);
142  else if (subType == fHadronInelastic)
143  cross = GetInelasticCrossSectionPerAtom(part,energy,element,material);
144  else if (subType == fCapture)
145  cross = GetCaptureCrossSectionPerAtom(part,energy,element,material);
146  else if (subType == fFission)
147  cross = GetFissionCrossSectionPerAtom(part,energy,element,material);
148  else if (subType == fChargeExchange)
149  cross = GetChargeExchangeCrossSectionPerAtom(part,energy,element,material);
150  return cross;
151 }
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
int G4int
Definition: G4Types.hh:78
double energy
Definition: plottest35.C:25
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
TString part[npart]
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
double G4double
Definition: G4Types.hh:76
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCrossSectionPerVolume()

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

Definition at line 155 of file G4HadronicProcessStore.cc.

160 {
161  G4double cross = 0.;
162  G4int subType = proc->GetProcessSubType();
163  if (subType == fHadronElastic)
164  cross = GetElasticCrossSectionPerVolume(part,energy,material);
165  else if (subType == fHadronInelastic)
167  else if (subType == fCapture)
168  cross = GetCaptureCrossSectionPerVolume(part,energy,material);
169  else if (subType == fFission)
170  cross = GetFissionCrossSectionPerVolume(part,energy,material);
171  else if (subType == fChargeExchange)
173  return cross;
174 }
int G4int
Definition: G4Types.hh:78
double energy
Definition: plottest35.C:25
TString part[npart]
G4double GetChargeExchangeCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetFissionCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetCaptureCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
double G4double
Definition: G4Types.hh:76
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElasticCrossSectionPerAtom()

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

Definition at line 198 of file G4HadronicProcessStore.cc.

202 {
203  G4HadronicProcess* hp = FindProcess(aParticle, fHadronElastic);
204  G4double cross = 0.0;
205  localDP.SetKineticEnergy(kineticEnergy);
206  if(hp) {
207  cross = hp->GetElementCrossSection(&localDP,anElement,mat);
208  }
209  return cross;
210 }
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void SetKineticEnergy(G4double aEnergy)
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=0)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElasticCrossSectionPerIsotope()

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

Definition at line 214 of file G4HadronicProcessStore.cc.

218 {
219  return 0.0;
220 }

◆ GetElasticCrossSectionPerVolume()

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

Definition at line 178 of file G4HadronicProcessStore.cc.

182 {
183  G4double cross = 0.0;
184  const G4ElementVector* theElementVector = material->GetElementVector();
185  const G4double* theAtomNumDensityVector =
186  material->GetVecNbOfAtomsPerVolume();
187  size_t nelm = material->GetNumberOfElements();
188  for (size_t i=0; i<nelm; ++i) {
189  const G4Element* elm = (*theElementVector)[i];
190  cross += theAtomNumDensityVector[i]*
191  GetElasticCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
192  }
193  return cross;
194 }
std::vector< G4Element * > G4ElementVector
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFissionCrossSectionPerAtom()

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

Definition at line 336 of file G4HadronicProcessStore.cc.

340 {
341  G4HadronicProcess* hp = FindProcess(aParticle, fFission);
342  localDP.SetKineticEnergy(kineticEnergy);
343  G4double cross = 0.0;
344  if(hp) {
345  cross = hp->GetElementCrossSection(&localDP,anElement,mat);
346  }
347  return cross;
348 }
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void SetKineticEnergy(G4double aEnergy)
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=0)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFissionCrossSectionPerIsotope()

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

Definition at line 352 of file G4HadronicProcessStore.cc.

356 {
357  return 0.0;
358 }

◆ GetFissionCrossSectionPerVolume()

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

Definition at line 316 of file G4HadronicProcessStore.cc.

320 {
321  G4double cross = 0.0;
322  const G4ElementVector* theElementVector = material->GetElementVector();
323  const G4double* theAtomNumDensityVector =
324  material->GetVecNbOfAtomsPerVolume();
325  size_t nelm = material->GetNumberOfElements();
326  for (size_t i=0; i<nelm; i++) {
327  const G4Element* elm = (*theElementVector)[i];
328  cross += theAtomNumDensityVector[i]*
329  GetFissionCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
330  }
331  return cross;
332 }
std::vector< G4Element * > G4ElementVector
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInelasticCrossSectionPerAtom()

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

Definition at line 244 of file G4HadronicProcessStore.cc.

248 {
250  localDP.SetKineticEnergy(kineticEnergy);
251  G4double cross = 0.0;
252  if(hp) {
253  cross = hp->GetElementCrossSection(&localDP,anElement,mat);
254  }
255  return cross;
256 }
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void SetKineticEnergy(G4double aEnergy)
G4double GetElementCrossSection(const G4DynamicParticle *part, const G4Element *elm, const G4Material *mat=0)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInelasticCrossSectionPerIsotope()

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

Definition at line 260 of file G4HadronicProcessStore.cc.

264 {
265  return 0.0;
266 }

◆ GetInelasticCrossSectionPerVolume()

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

Definition at line 224 of file G4HadronicProcessStore.cc.

228 {
229  G4double cross = 0.0;
230  const G4ElementVector* theElementVector = material->GetElementVector();
231  const G4double* theAtomNumDensityVector =
232  material->GetVecNbOfAtomsPerVolume();
233  size_t nelm = material->GetNumberOfElements();
234  for (size_t i=0; i<nelm; ++i) {
235  const G4Element* elm = (*theElementVector)[i];
236  cross += theAtomNumDensityVector[i]*
237  GetInelasticCrossSectionPerAtom(aParticle,kineticEnergy,elm,material);
238  }
239  return cross;
240 }
std::vector< G4Element * > G4ElementVector
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetVerbose()

G4int G4HadronicProcessStore::GetVerbose ( )

Definition at line 862 of file G4HadronicProcessStore.cc.

863 {
864  return verbose;
865 }

◆ HtmlFileName()

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

Definition at line 709 of file G4HadronicProcessStore.cc.

710 {
711  G4String str(in);
712  // replace blanks by _ C++11 version:
713 #ifdef G4USE_STD11
714  std::transform(str.begin(), str.end(), str.begin(), [](char ch) {
715  return ch == ' ' ? '_' : ch;
716  });
717 #else
718  // and now in ancient language
719  for(std::string::iterator it = str.begin(); it != str.end(); ++it) {
720  if(*it == ' ') *it = '_';
721  }
722 #endif
723  str=str + ".html";
724  return str;
725 }
Here is the caller graph for this function:

◆ Instance()

G4HadronicProcessStore * G4HadronicProcessStore::Instance ( void  )
static

Definition at line 69 of file G4HadronicProcessStore.cc.

70 {
71  if(!instance) {
73  instance = inst.Instance();
74  }
75  return instance;
76 }
static G4ThreadLocal G4HadronicProcessStore * instance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Print()

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

Definition at line 804 of file G4HadronicProcessStore.cc.

805 {
806  G4HadronicProcess* proc = process[idxProc];
807  const G4ParticleDefinition* part = particle[idxPart];
808  if (wasPrinted[idxPart] == 0) {
809  G4cout << "\n---------------------------------------------------\n"
810  << std::setw(50) << "Hadronic Processes for "
811  << part->GetParticleName() << "\n";
812  wasPrinted[idxPart] = 1;
813  }
814 
815  G4cout << "\n Process: " << proc->GetProcessName();
816 
817  // Append the string "/n" (i.e. "per nucleon") on the kinetic energy of ions.
818  G4String stringEnergyPerNucleon = "";
819  if ( part &&
820  ( part == G4GenericIon::Definition() ||
821  std::abs( part->GetBaryonNumber() ) > 1 ) ) {
822  stringEnergyPerNucleon = "/n";
823  }
824 
825  HI hi = 0;
826  std::multimap<HP,HI,std::less<HP> >::iterator ih;
827  for(ih=m_map.lower_bound(proc); ih!=m_map.upper_bound(proc); ++ih) {
828  if(ih->first == proc) {
829  hi = ih->second;
830  G4int i=0;
831  for(; i<n_model; ++i) {
832  if(model[i] == hi) { break; }
833  }
834  G4cout << "\n Model: " << std::setw(25) << modelName[i] << ": "
835  << G4BestUnit(hi->GetMinEnergy(), "Energy") << stringEnergyPerNucleon
836  << " ---> "
837  << G4BestUnit(hi->GetMaxEnergy(), "Energy") << stringEnergyPerNucleon;
838  }
839  }
840  G4cout << G4endl;
841 
843  csds->DumpPhysicsTable(*part);
844 }
std::vector< G4String > modelName
std::vector< G4HadronicProcess * > process
std::vector< G4int > wasPrinted
static G4GenericIon * Definition()
Definition: G4GenericIon.cc:49
std::vector< G4HadronicInteraction * > model
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
int G4int
Definition: G4Types.hh:78
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
std::multimap< HP, HI > m_map
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4CrossSectionDataStore * GetCrossSectionDataStore()
TString part[npart]
void DumpPhysicsTable(const G4ParticleDefinition &)
G4HadronicInteraction * HI
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintHtml()

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

Definition at line 618 of file G4HadronicProcessStore.cc.

620 {
621  // Automatic generation of html documentation page for physics lists
622  // List processes for the most important particles in descending order
623  // of importance
624 
625  outFile << "<br> <li><h2><font color=\" ff0000 \">"
626  << theParticle->GetParticleName() << "</font></h2></li>\n";
627 
628  typedef std::multimap<PD,HP,std::less<PD> > PDHPmap;
629  typedef std::multimap<HP,HI,std::less<HP> > HPHImap;
630 
631  std::pair<PDHPmap::iterator, PDHPmap::iterator> itpart =
632  p_map.equal_range(theParticle);
633 
634  // Loop over processes assigned to particle
635 
636  G4HadronicProcess* theProcess;
637  for (PDHPmap::iterator it = itpart.first; it != itpart.second; ++it) {
638  theProcess = (*it).second;
639  // description is inline
640  //outFile << "<br> &nbsp;&nbsp; <b><font color=\" 0000ff \">process : <a href=\""
641  // << theProcess->GetProcessName() << ".html\"> "
642  // << theProcess->GetProcessName() << "</a></font></b>\n";
643  outFile << "<br> &nbsp;&nbsp; <b><font color=\" 0000ff \">process : "
644  << theProcess->GetProcessName() << "</font></b>\n";
645  outFile << "<ul>\n";
646  outFile << " <li>";
647  theProcess->ProcessDescription(outFile);
648  outFile << " <li><b><font color=\" 00AA00 \">models : </font></b>\n";
649  // Loop over models assigned to process
650  std::pair<HPHImap::iterator, HPHImap::iterator> itmod =
651  m_map.equal_range(theProcess);
652 
653  outFile << " <ul>\n";
654  G4String physListName(getenv("G4PhysListName"));
655 
656  for (HPHImap::iterator jt = itmod.first; jt != itmod.second; ++jt) {
657  outFile << " <li><b><a href=\"" << physListName << "_"
658  << HtmlFileName((*jt).second->GetModelName()) << "\"> "
659  << (*jt).second->GetModelName() << "</a>"
660  << " from " << (*jt).second->GetMinEnergy()/GeV
661  << " GeV to " << (*jt).second->GetMaxEnergy()/GeV
662  << " GeV </b></li>\n";
663 
664  // Print ModelDescription, ignore that we overwrite files n-times.
665  PrintModelHtml((*jt).second);
666 
667  }
668  outFile << " </ul>\n";
669  outFile << " </li>\n";
670 
671  // List cross sections assigned to process
672  outFile << " <li><b><font color=\" 00AA00 \">cross sections : </font></b>\n";
673  outFile << " <ul>\n";
674  theProcess->GetCrossSectionDataStore()->DumpHtml(*theParticle, outFile);
675  // << " \n";
676  outFile << " </ul>\n";
677 
678  outFile << " </li>\n";
679  outFile << "</ul>\n";
680  }
681 }
void DumpHtml(const G4ParticleDefinition &, std::ofstream &) const
void PrintModelHtml(const G4HadronicInteraction *model) const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
std::multimap< HP, HI > m_map
const G4String & GetParticleName() const
G4String HtmlFileName(const G4String &) const
G4CrossSectionDataStore * GetCrossSectionDataStore()
static const double GeV
Definition: G4SIunits.hh:214
std::multimap< PD, HP > p_map
virtual void ProcessDescription(std::ostream &outFile) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintInfo()

void G4HadronicProcessStore::PrintInfo ( const G4ParticleDefinition part)

Definition at line 558 of file G4HadronicProcessStore.cc.

559 {
560  // Trigger particle/process/model printout only when last particle is
561  // registered
562  if(buildTableStart && part == particle[n_part - 1]) {
563  buildTableStart = false;
564  Dump(verbose);
565  if (getenv("G4PhysListDocDir") ) DumpHtml();
566  }
567 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintModelHtml()

void G4HadronicProcessStore::PrintModelHtml ( const G4HadronicInteraction model) const

Definition at line 686 of file G4HadronicProcessStore.cc.

687 {
688  G4String dirName(getenv("G4PhysListDocDir"));
689  G4String physListName(getenv("G4PhysListName"));
690  G4String pathName = dirName + "/" + physListName + "_" + HtmlFileName(mod->GetModelName());
691  std::ofstream outModel;
692  outModel.open(pathName);
693  outModel << "<html>\n";
694  outModel << "<head>\n";
695  outModel << "<title>Description of " << mod->GetModelName()
696  << "</title>\n";
697  outModel << "</head>\n";
698  outModel << "<body>\n";
699 
700  mod->ModelDescription(outModel);
701 
702  outModel << "</body>\n";
703  outModel << "</html>\n";
704 
705 }
G4String HtmlFileName(const G4String &) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Register()

void G4HadronicProcessStore::Register ( G4HadronicProcess proc)

Definition at line 408 of file G4HadronicProcessStore.cc.

409 {
410  for(G4int i=0; i<n_proc; ++i) {
411  if(process[i] == proc) { return; }
412  }
413  if(1 < verbose) {
414  G4cout << "G4HadronicProcessStore::Register hadronic " << n_proc
415  << " " << proc->GetProcessName() << G4endl;
416  }
417  ++n_proc;
418  process.push_back(proc);
419 }
std::vector< G4HadronicProcess * > process
int G4int
Definition: G4Types.hh:78
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterExtraProcess()

void G4HadronicProcessStore::RegisterExtraProcess ( G4VProcess proc)

Definition at line 490 of file G4HadronicProcessStore.cc.

491 {
492  for(G4int i=0; i<n_extra; ++i) {
493  if(extraProcess[i] == proc) { return; }
494  }
495  G4HadronicProcess* hproc = reinterpret_cast<G4HadronicProcess*>(proc);
496  if(hproc) {
497  for(G4int i=0; i<n_proc; ++i) {
498  if(process[i] == hproc) { return; }
499  }
500  }
501  if(1 < verbose) {
502  G4cout << "Extra Process: " << n_extra
503  << " " << proc->GetProcessName() << G4endl;
504  }
505  ++n_extra;
506  extraProcess.push_back(proc);
507 }
std::vector< G4HadronicProcess * > process
int G4int
Definition: G4Types.hh:78
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4GLOB_DLL std::ostream G4cout
std::vector< G4VProcess * > extraProcess
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterInteraction()

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

Definition at line 458 of file G4HadronicProcessStore.cc.

460 {
461  G4int i=0;
462  for(; i<n_proc; ++i) {if(process[i] == proc) { break; }}
463  G4int k=0;
464  for(; k<n_model; ++k) {if(model[k] == mod) { break; }}
465 
466  m_map.insert(std::multimap<HP,HI>::value_type(proc,mod));
467 
468  if(k == n_model) {
469  ++n_model;
470  model.push_back(mod);
471  modelName.push_back(mod->GetModelName());
472  }
473 }
std::vector< G4String > modelName
std::vector< G4HadronicProcess * > process
std::vector< G4HadronicInteraction * > model
int G4int
Definition: G4Types.hh:78
std::multimap< HP, HI > m_map
const G4String & GetModelName() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterParticle()

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

Definition at line 423 of file G4HadronicProcessStore.cc.

425 {
426  G4int i=0;
427  for(; i<n_proc; ++i) {if(process[i] == proc) break;}
428  G4int j=0;
429  for(; j<n_part; ++j) {if(particle[j] == part) break;}
430 
431  if(1 < verbose) {
432  G4cout << "G4HadronicProcessStore::RegisterParticle "
433  << part->GetParticleName()
434  << " for " << proc->GetProcessName() << G4endl;
435  }
436  if(j == n_part) {
437  ++n_part;
438  particle.push_back(part);
439  wasPrinted.push_back(0);
440  }
441 
442  // the pair should be added?
443  if(i < n_proc) {
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; }
449  }
450  }
451  }
452 
453  p_map.insert(std::multimap<PD,HP>::value_type(part,proc));
454 }
std::vector< G4HadronicProcess * > process
std::vector< G4int > wasPrinted
int G4int
Definition: G4Types.hh:78
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
std::multimap< PD, HP > p_map
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterParticleForExtraProcess()

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

Definition at line 511 of file G4HadronicProcessStore.cc.

514 {
515  G4int i=0;
516  for(; i<n_extra; ++i) { if(extraProcess[i] == proc) { break; } }
517  G4int j=0;
518  for(; j<n_part; ++j) { if(particle[j] == part) { break; } }
519 
520  if(j == n_part) {
521  ++n_part;
522  particle.push_back(part);
523  wasPrinted.push_back(0);
524  }
525 
526  // the pair should be added?
527  if(i < 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) {
531  G4VProcess* process2 = (it->second);
532  if(proc == process2) { return; }
533  }
534  }
535  }
536 
537  ep_map.insert(std::multimap<PD,G4VProcess*>::value_type(part,proc));
538 }
std::vector< G4int > wasPrinted
std::multimap< PD, G4VProcess * > ep_map
int G4int
Definition: G4Types.hh:78
std::vector< G4VProcess * > extraProcess
Here is the caller graph for this function:

◆ SetEpReportLevel()

void G4HadronicProcessStore::SetEpReportLevel ( G4int  level)

Definition at line 912 of file G4HadronicProcessStore.cc.

913 {
914  G4cout << " Setting energy/momentum report level to " << level
915  << " for " << process.size() << " hadronic processes " << G4endl;
916  for (G4int i = 0; i < G4int(process.size()); ++i) {
917  process[i]->SetEpReportLevel(level);
918  }
919 }
std::vector< G4HadronicProcess * > process
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ SetProcessAbsLevel()

void G4HadronicProcessStore::SetProcessAbsLevel ( G4double  absoluteLevel)

Definition at line 923 of file G4HadronicProcessStore.cc.

924 {
925  G4cout << " Setting absolute energy/momentum test level to " << abslevel
926  << G4endl;
927  G4double rellevel = 0.0;
928  G4HadronicProcess* theProcess = 0;
929  for (G4int i = 0; i < G4int(process.size()); ++i) {
930  theProcess = process[i];
931  rellevel = theProcess->GetEnergyMomentumCheckLevels().first;
932  theProcess->SetEnergyMomentumCheckLevels(rellevel, abslevel);
933  }
934 }
std::vector< G4HadronicProcess * > process
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetProcessRelLevel()

void G4HadronicProcessStore::SetProcessRelLevel ( G4double  relativeLevel)

Definition at line 938 of file G4HadronicProcessStore.cc.

939 {
940  G4cout << " Setting relative energy/momentum test level to " << rellevel
941  << G4endl;
942  G4double abslevel = 0.0;
943  G4HadronicProcess* theProcess = 0;
944  for (G4int i = 0; i < G4int(process.size()); ++i) {
945  theProcess = process[i];
946  abslevel = theProcess->GetEnergyMomentumCheckLevels().second;
947  theProcess->SetEnergyMomentumCheckLevels(rellevel, abslevel);
948  }
949 }
std::vector< G4HadronicProcess * > process
std::pair< G4double, G4double > GetEnergyMomentumCheckLevels() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVerbose()

void G4HadronicProcessStore::SetVerbose ( G4int  val)

Definition at line 848 of file G4HadronicProcessStore.cc.

849 {
850  verbose = val;
851  G4int i;
852  for(i=0; i<n_proc; ++i) {
853  if(process[i]) { process[i]->SetVerboseLevel(val); }
854  }
855  for(i=0; i<n_model; ++i) {
856  if(model[i]) { model[i]->SetVerboseLevel(val); }
857  }
858 }
std::vector< G4HadronicProcess * > process
std::vector< G4HadronicInteraction * > model
int G4int
Definition: G4Types.hh:78

Friends And Related Function Documentation

◆ G4ThreadLocalSingleton< G4HadronicProcessStore >

Definition at line 71 of file G4HadronicProcessStore.hh.

Member Data Documentation

◆ buildTableStart

G4bool G4HadronicProcessStore::buildTableStart
private

Definition at line 245 of file G4HadronicProcessStore.hh.

◆ currentParticle

PD G4HadronicProcessStore::currentParticle
private

Definition at line 249 of file G4HadronicProcessStore.hh.

◆ currentProcess

HP G4HadronicProcessStore::currentProcess
private

Definition at line 248 of file G4HadronicProcessStore.hh.

◆ ep_map

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

Definition at line 236 of file G4HadronicProcessStore.hh.

◆ extraProcess

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

Definition at line 235 of file G4HadronicProcessStore.hh.

◆ instance

G4ThreadLocal G4HadronicProcessStore * G4HadronicProcessStore::instance = 0
staticprivate

Definition at line 218 of file G4HadronicProcessStore.hh.

◆ localDP

G4DynamicParticle G4HadronicProcessStore::localDP
private

Definition at line 252 of file G4HadronicProcessStore.hh.

◆ m_map

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

Definition at line 232 of file G4HadronicProcessStore.hh.

◆ model

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

Definition at line 226 of file G4HadronicProcessStore.hh.

◆ modelName

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

Definition at line 227 of file G4HadronicProcessStore.hh.

◆ n_extra

G4int G4HadronicProcessStore::n_extra
private

Definition at line 242 of file G4HadronicProcessStore.hh.

◆ n_model

G4int G4HadronicProcessStore::n_model
private

Definition at line 240 of file G4HadronicProcessStore.hh.

◆ n_part

G4int G4HadronicProcessStore::n_part
private

Definition at line 241 of file G4HadronicProcessStore.hh.

◆ n_proc

G4int G4HadronicProcessStore::n_proc
private

Definition at line 239 of file G4HadronicProcessStore.hh.

◆ p_map

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

Definition at line 231 of file G4HadronicProcessStore.hh.

◆ particle

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

Definition at line 228 of file G4HadronicProcessStore.hh.

◆ process

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

Definition at line 225 of file G4HadronicProcessStore.hh.

◆ theEPTestMessenger

G4HadronicEPTestMessenger* G4HadronicProcessStore::theEPTestMessenger
private

Definition at line 254 of file G4HadronicProcessStore.hh.

◆ theGenericIon

PD G4HadronicProcessStore::theGenericIon
private

Definition at line 250 of file G4HadronicProcessStore.hh.

◆ verbose

G4int G4HadronicProcessStore::verbose
private

Definition at line 244 of file G4HadronicProcessStore.hh.

◆ wasPrinted

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

Definition at line 229 of file G4HadronicProcessStore.hh.


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