40 : theHadronicInteractionCounter(0)
48 theHadronicInteractionCounter = right.theHadronicInteractionCounter;
49 theHadronicInteraction = right.theHadronicInteraction;
56 theHadronicInteractionCounter = right.theHadronicInteractionCounter;
57 theHadronicInteraction = right.theHadronicInteraction;
65 if(0 < theHadronicInteractionCounter) {
66 for(
G4int i=0; i<theHadronicInteractionCounter; ++i) {
67 if(a == theHadronicInteraction[i]) {
return; }
70 theHadronicInteraction.push_back(a);
71 ++theHadronicInteractionCounter;
81 if(0 == theHadronicInteractionCounter) {
83 "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;
95 for (
G4int i = 0; i<theHadronicInteractionCounter; ++i) {
96 if ( theHadronicInteraction[i]->IsApplicable( aHadProjectile, aTargetNucleus ) ) {
97 G4double low = theHadronicInteraction[i]->GetMinEnergy( aMaterial, anElement );
101 G4double high = theHadronicInteraction[i]->GetMaxEnergy( aMaterial, anElement );
102 if (low <= kineticEnergy && high > kineticEnergy) {
118 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="
119 <<theHadronicInteractionCounter<<
", Ek="
120 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()
123 for(
G4int j=0; j<theHadronicInteractionCounter; ++j)
130 "GetHadronicInteraction: No Model found");
136 if( (emi2<=emi1 && ema2>=ema1) || (emi2>=emi1 && ema2<=ema1) )
138 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="
139 <<theHadronicInteractionCounter<<
", Ek="
140 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()
143 for(
G4int j=0; j<theHadronicInteractionCounter; ++j)
150 "GetHadronicInteraction: Energy ranges of two models fully overlapping");
155 if( (ema1-kineticEnergy) < rand*(ema1-emi2) ) {
161 if( (ema2-kineticEnergy) < rand*(ema2-emi1) ) {
170 "GetHadronicInteraction: More than two competing models in this energy range");
173 return theHadronicInteraction[mem];
182 if(0 == theHadronicInteractionCounter) {
184 "GetHadronicInteraction: NO MODELS STORED");
186 G4int cou = 0, memory = 0, memor2 = 0;
187 G4double emi1 = 0.0, ema1 = 0.0, emi2 = 0.0, ema2 = 0.0;
189 for (
G4int i = 0; i<theHadronicInteractionCounter; ++i) {
190 G4double low = theHadronicInteraction[i]->GetMinEnergy( aMaterial, anElement );
194 G4double high = theHadronicInteraction[i]->GetMaxEnergy( aMaterial, anElement );
195 if (low <= kineticEnergy && high > kineticEnergy) {
210 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="
211 <<theHadronicInteractionCounter<<
", Ek="
212 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()
215 for(
G4int j=0; j<theHadronicInteractionCounter; ++j)
222 "GetHadronicInteraction: No Model found");
228 if( (emi2<=emi1 && ema2>=ema1) || (emi2>=emi1 && ema2<=ema1) )
230 G4cout<<
"G4EnergyRangeManager:GetHadronicInteraction: counter="
231 <<theHadronicInteractionCounter<<
", Ek="
232 <<kineticEnergy<<
", Material = "<<aMaterial->
GetName()
235 for(
G4int j=0; j<theHadronicInteractionCounter; ++j)
242 "GetHadronicInteraction: Energy ranges of two models fully overlapping");
247 if( (ema1-kineticEnergy) < rand*(ema1-emi2) ) {
253 if( (ema2-kineticEnergy) < rand*(ema2-emi1) ) {
262 "GetHadronicInteraction: More than two competing models in this energy range");
265 return theHadronicInteraction[mem];
268 std::vector<G4HadronicInteraction*>&
271 return theHadronicInteraction;
278 for (
G4int i = 0 ; i < theHadronicInteractionCounter; i++) {
279 G4cout <<
" HadronicModel " << i <<
":"
280 << theHadronicInteraction[i]->GetModelName() <<
G4endl;
282 G4cout <<
" Minimum Energy "
283 << theHadronicInteraction[i]->GetMinEnergy()/
GeV <<
" [GeV], "
285 << theHadronicInteraction[i]->GetMaxEnergy()/
GeV <<
" [GeV]"
294 for ( std::vector<G4HadronicInteraction*>::iterator
295 it = theHadronicInteraction.begin() ; it != theHadronicInteraction.end() ; it++ ) {
296 (*it)->BuildPhysicsTable( aParticleType );
G4double GetMinEnergy() const
void RegisterMe(G4HadronicInteraction *a)
G4double GetMaxEnergy() const
std::vector< ExP01TrackerHit * > a
void Dump(G4int verbose=0)
G4HadronicInteraction * GetHadronicInteraction(const G4HadProjectile &aHadProjectile, G4Nucleus &aTargetNucleus, const G4Material *aMaterial, const G4Element *anElement) const
const G4String & GetName() const
std::vector< G4HadronicInteraction * > & GetHadronicInteractionList()
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * GetDefinition() const
G4EnergyRangeManager & operator=(const G4EnergyRangeManager &right)
G4double GetKineticEnergy() const
void BuildPhysicsTable(const G4ParticleDefinition &)
static constexpr double GeV
const G4String & GetName() const
G4int GetBaryonNumber() const