29 #ifndef G4ParticleHPProduct_h
30 #define G4ParticleHPProduct_h 1
58 G4int theCurrentMultiplicity;
59 toBeCached() : theProjectileRP(NULL),
theTarget(NULL),theCurrentMultiplicity(-1) {};
69 char * method = getenv(
"G4PHP_MULTIPLICITY_METHOD" );
71 if(
G4String(method) ==
"Poisson" ) {
73 }
else if(
G4String(method) ==
"BetweenInts" ) {
84 theGroundStateQValue = 0.0;
85 theActualStateQValue = 0.0;
90 if(theDist != 0)
delete theDist;
95 aDataFile >> theMassCode>>theMass>>theIsomerFlag>>theDistLaw
96 >> theGroundStateQValue>>theActualStateQValue;
97 if( getenv(
"G4PHPTEST") )
G4cout <<
" G4ParticleHPProduct :: Init MassCode " << theMassCode <<
" " << theMass <<
" theActualStateQValue " << theActualStateQValue <<
G4endl;
98 if( getenv(
"G4PHPTEST") )
G4cout <<
" G4ParticleHPProduct :: Init theActualStateQValue " << theActualStateQValue <<
G4endl;
108 else if(theDistLaw == 1)
113 else if(theDistLaw == 2)
118 else if(theDistLaw == 3)
123 else if(theDistLaw == 4)
138 else if(theDistLaw == 6)
143 else if(theDistLaw == 7)
150 throw G4HadronicException(__FILE__, __LINE__,
"distribution law unknown to G4ParticleHPProduct");
154 theDist->
SetQValue(theActualStateQValue);
155 theDist->
Init(aDataFile);
164 return theYield.
GetY(anEnergy);
169 fCache.
Get().theProjectileRP = aIncidentPart;
174 fCache.
Get().theTarget = aTarget;
191 result *= fCache.
Get().theCurrentMultiplicity;
G4double G4ParticleHPJENDLHEData::G4double result
void Init(std::istream &aDataFile, G4ParticleDefinition *projectile)
virtual void Init(std::istream &aDataFile)=0
G4ReactionProduct * GetTarget()
void SetProjectileRP(G4ReactionProduct *aIncidentPart)
G4double MeanEnergyOfThisInteraction()
std::vector< G4ReactionProduct * > G4ReactionProductVector
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
G4GLOB_DLL std::ostream G4cout
G4ErrorTarget * theTarget
G4double GetY(G4double x)
static constexpr double eV
G4int GetMultiplicity(G4double anEnergy)
virtual G4double MeanEnergyOfThisInteraction()=0
G4ReactionProductVector * Sample(G4double anEnergy, G4int nParticles)
G4ReactionProduct * GetProjectileRP()
void SetQValue(G4double aValue)
void Put(const value_type &val) const
void SetTarget(G4ReactionProduct *aTarget)
G4double GetMeanYield(G4double anEnergy)