Import Geant4 11.0.2 source tree

This commit is contained in:
Gabriele Cosmo
2022-05-25 15:50:57 +02:00
parent de4f28d823
commit b3bf75a2a1
341 changed files with 93127 additions and 39343 deletions
@@ -79,6 +79,31 @@ class G4ParticleHPContAngularPar
adjustResult = true;
}
G4ParticleHPContAngularPar(G4ParticleHPContAngularPar & val)
{
theEnergy = val.theEnergy;
nEnergies = val.nEnergies;
nDiscreteEnergies = val.nDiscreteEnergies;
nAngularParameters= val.nAngularParameters;
theProjectile = val.theProjectile;
theManager = val.theManager;
theInt = val.theInt;
adjustResult = val.adjustResult;
theMinEner = val.theMinEner;
theMaxEner = val.theMaxEner;
theEnergiesTransformed = val.theEnergiesTransformed;
theDiscreteEnergies = val.theDiscreteEnergies;
theDiscreteEnergiesOwn = val.theDiscreteEnergiesOwn;
fCache.Put(0);
theAngular = new G4ParticleHPList[nEnergies];
for(G4int ie=0;ie<nEnergies;++ie) {
theAngular[ie].SetLabel(val.theAngular[ie].GetLabel());
for(G4int ip=0;ip<nAngularParameters;++ip) {
theAngular[ie].SetValue(ip,val.theAngular[ie].GetValue(ip));
}
}
}
G4ParticleHPContAngularPar(G4ParticleDefinition* projectile);
~G4ParticleHPContAngularPar()
@@ -92,7 +117,7 @@ class G4ParticleHPContAngularPar
G4ReactionProduct* Sample(G4double anEnergy, G4double massCode, G4double mass,
G4int angularRep, G4int interpol);
G4double GetEnergy()
G4double GetEnergy() const
{
if( std::getenv("G4PHPTEST") )
G4cout << this << " G4ParticleHPContAngularPar::GetEnergy "
@@ -125,7 +150,7 @@ class G4ParticleHPContAngularPar
G4ParticleHPContAngularPar & store2);
// NOTE: this interpolates legendre coefficients
void PrepareTableInterpolation(const G4ParticleHPContAngularPar* angularPrev);
void PrepareTableInterpolation();
G4double MeanEnergyOfThisInteraction()
{
@@ -182,7 +207,7 @@ class G4ParticleHPContAngularPar
fCache.Get()->fresh = true;
}
void Dump();
void Dump() const;
private:
@@ -78,9 +78,9 @@ public:
theAngular[i].SetInterpolation(theInterpolation);
#ifndef PHP_AS_HP
if( i != 0 ) {
theAngular[i].PrepareTableInterpolation(&(theAngular[i-1]));
theAngular[i].PrepareTableInterpolation();
} else {
theAngular[i].PrepareTableInterpolation((G4ParticleHPContAngularPar*)0);
theAngular[i].PrepareTableInterpolation();
}
#endif
}
@@ -38,11 +38,7 @@ class G4ParticleHPDataPoint
G4ParticleHPDataPoint(){energy = 0; xSec = 0;}
G4ParticleHPDataPoint(G4double e, G4double x){ energy = e; xSec = x;}
G4ParticleHPDataPoint & operator= (const G4ParticleHPDataPoint & aSet) = default;
// ~G4ParticleHPDataPoint(){}
inline G4double GetEnergy() const {return energy;}
inline G4double GetXsection() const {return xSec;}
@@ -68,7 +68,7 @@ class G4ParticleHPFissionSpectrum : public G4VParticleHPEDis
G4double theta = theThetaDist.GetY(anEnergy);
// here we need to sample Maxwells distribution, if
// need be.
G4double result, cut;
G4double result=0., cut;
G4double range =50*CLHEP::MeV;
G4double max = Maxwell((theta*CLHEP::eV)/2., theta);
G4double value;
@@ -67,7 +67,7 @@ class G4ParticleHPSimpleEvapSpectrum : public G4VParticleHPEDis
inline G4double Sample(G4double anEnergy)
{
G4double theta = theThetaDist.GetY(anEnergy)*CLHEP::eV;
G4double random, cut, max, result;
G4double random, cut, max, result=0.;
max = 10.*theta;
G4int icounter=0;
G4int icounter_max=1024;