41 : theHadronicInteractionCounter(0)
43 for (
G4int i = 0; i < G4EnergyRangeManager::MAX_NUMBER_OF_MODELS; i++)
44 theHadronicInteraction[i] = 0;
51 theHadronicInteractionCounter = right.theHadronicInteractionCounter;
52 for (
G4int i = 0; i < theHadronicInteractionCounter; ++i)
53 theHadronicInteraction[i] = right.theHadronicInteraction[i];
62 theHadronicInteractionCounter = right.theHadronicInteractionCounter;
63 for (
G4int i=0; i<theHadronicInteractionCounter; ++i)
64 theHadronicInteraction[i] = right.theHadronicInteraction[i];
72 if (theHadronicInteractionCounter+1 > MAX_NUMBER_OF_MODELS) {
75 theHadronicInteraction[ theHadronicInteractionCounter++ ] =
a;
86 "GetHadronicInteraction: NO MODELS STORED");
88 G4int cou = 0, memory = 0, memor2 = 0;
89 G4double emi1 = 0.0, ema1 = 0.0, emi2 = 0.0, ema2 = 0.0;
91 for (
G4int i = 0; i < counter; i++) {
97 if (low < kineticEnergy && high >= kineticEnergy) {
112 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="<<counter<<
", Ek="
113 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()<<
", Element = "
115 for(
G4int j=0; j<counter; j++ )
122 "GetHadronicInteraction: No Model found");
128 if( (emi2<=emi1 && ema2>=ema1) || (emi2>=emi1 && ema2<=ema1) )
130 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="<<counter<<
", Ek="
131 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()<<
", Element = "
133 if(counter)
for(
G4int j=0; j<counter; j++ )
140 "GetHadronicInteraction: Energy ranges of two models fully overlapping");
145 if( (ema1-kineticEnergy)/(ema1-emi2)<rand )
150 if( (ema2-kineticEnergy)/(ema2-emi1)<rand )
158 "GetHadronicInteraction: More than two competing models in this energy range");
161 return theHadronicInteraction[mem];
169 for (
G4int i = 0 ; i < theHadronicInteractionCounter; i++) {
170 G4cout <<
" HadronicModel " << i <<
":"
174 <<
"Maximum Energy " << theHadronicInteraction[i]->
GetMaxEnergy()/
GeV <<
" [GeV]"
G4double GetMinEnergy() const
void RegisterMe(G4HadronicInteraction *a)
G4double GetMaxEnergy() const
void Dump(G4int verbose=0)
const G4String & GetName() const
const G4String & GetModelName() const
G4GLOB_DLL std::ostream G4cout
G4EnergyRangeManager & operator=(const G4EnergyRangeManager &right)
G4int GetHadronicInteractionCounter() const
const G4String & GetName() const
G4HadronicInteraction * GetHadronicInteraction(const G4double kineticEnergy, const G4Material *aMaterial, const G4Element *anElement) const