42 : theHadronicInteractionCounter(0)
44 for (
G4int i = 0; i < G4EnergyRangeManager::MAX_NUMBER_OF_MODELS; i++)
45 theHadronicInteraction[i] = 0;
52 for (
G4int i=0; i<theHadronicInteractionCounter; ++i)
53 theHadronicInteraction[i] = right.theHadronicInteraction[i];
54 theHadronicInteractionCounter = right.theHadronicInteractionCounter;
63 for (
G4int i=0; i<theHadronicInteractionCounter; ++i)
64 theHadronicInteraction[i] = right.theHadronicInteraction[i];
65 theHadronicInteractionCounter = right.theHadronicInteractionCounter;
73 if( theHadronicInteractionCounter+1 > MAX_NUMBER_OF_MODELS )
77 theHadronicInteraction[ theHadronicInteractionCounter++ ] = a;
90 "GetHadronicInteraction: NO MODELS STORED");
92 G4int cou = 0, memory = 0, memor2 = 0;
93 G4double emi1 = 0.0, ema1 = 0.0, emi2 = 0.0, ema2 = 0.0;
94 for(
G4int i=0; i<counter; i++ )
101 if( low < kineticEnergy && high >= kineticEnergy )
117 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="<<counter<<
", Ek="
118 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()<<
", Element = "
120 for(
G4int j=0; j<counter; j++ )
127 "GetHadronicInteraction: No Model found");
133 if( (emi2<=emi1 && ema2>=ema1) || (emi2>=emi1 && ema2<=ema1) )
135 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="<<counter<<
", Ek="
136 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()<<
", Element = "
138 if(counter)
for(
G4int j=0; j<counter; j++ )
145 "GetHadronicInteraction: Energy ranges of two models fully overlapping");
150 if( (ema1-kineticEnergy)/(ema1-emi2)<rand )
155 if( (ema2-kineticEnergy)/(ema2-emi1)<rand )
163 "GetHadronicInteraction: More than two competing models in this energy range");
165 return theHadronicInteraction[mem];
G4DLLIMPORT std::ostream G4cout
const G4String & GetName() const
void RegisterMe(G4HadronicInteraction *a)
G4int GetHadronicInteractionCounter() const
G4EnergyRangeManager & operator=(const G4EnergyRangeManager &right)
G4HadronicInteraction * GetHadronicInteraction(const G4double kineticEnergy, const G4Material *aMaterial, const G4Element *anElement) const
G4double GetMinEnergy() const
G4double GetMaxEnergy() const
const G4String & GetName() const