41 for(i=0;i<nEnergy;i++)
45 if(theAngular[i].GetEnergy()>anEnergy)
break;
47 if(theAngular[i].GetEnergy()>=anEnergy)
break;
50 if( std::getenv(
"G4PHPTEST") )
G4cout << i <<
" G4ParticleHPContEnergyAngular dataE " << theAngular[i].
GetEnergy() <<
" > " << anEnergy <<
" it_theAngular " << it <<
" interpolation " << theInterpolation <<
G4endl;
57 result = theAngular[0].
Sample(anEnergy, massCode, targetMass,
58 theAngularRep, theInterpolation);
78 result = theAngular[it].
Sample(anEnergy, massCode, targetMass,
79 theAngularRep, theInterpolation);
82 if( std::getenv(
"G4PHPTEST") )
G4cout << i <<
" G4ParticleHPContEnergyAngular To BUILDBYINTERPOLATION " << it <<
" : " << theAngular[it].
GetEnergy()<<
" , " << theAngular[it].
GetNEnergies() <<
" " << it-1 <<
" : " << theAngular[it-1].
GetEnergy()<<
" : " << theAngular[it-1].
GetNEnergies() <<
G4endl;
85 if (fCacheAngular.
Get() == NULL) {
87 fCacheAngular.
Put(angpar);
94 result = fCacheAngular.
Get()->
Sample(anEnergy, massCode, targetMass,
95 theAngularRep, theInterpolation);
112 if(currentMeanEnergy.
Get()<-1)
114 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPContEnergyAngular: Logical error in Product class");
118 result = currentMeanEnergy.
Get();
120 currentMeanEnergy.
Put( -2 );
128 if ( theAngular!= NULL )
130 for (
G4int i = 0 ; i< nEnergy ; i++ )
G4GLOB_DLL std::ostream G4cout
void Put(const value_type &val) const
G4InterpolationScheme GetScheme(G4int index) const
G4ReactionProduct * Sample(G4double anEnergy, G4double massCode, G4double mass, G4int angularRep, G4int interpol)
G4int GetNEnergies() const
void SetPrimary(G4ReactionProduct *aPrimary)
void SetTarget(G4ReactionProduct *aTarget)
void SetInterpolation(G4int theInterpolation)
G4double MeanEnergyOfThisInteraction()
void SetTargetCode(G4double aTargetCode)
void BuildByInterpolation(G4double anEnergy, G4InterpolationScheme aScheme, G4ParticleHPContAngularPar &store1, G4ParticleHPContAngularPar &store2)
G4double MeanEnergyOfThisInteraction()
G4ReactionProduct * Sample(G4double anEnergy, G4double massCode, G4double mass)
G4ReactionProduct * GetProjectileRP()
G4ReactionProduct * GetTarget()