29#ifndef G4ParticleHPProduct_h
30#define G4ParticleHPProduct_h 1
58 G4int theCurrentMultiplicity;
60 : theProjectileRP(0), theTarget(0), theCurrentMultiplicity(-1) {}
71 char * method = std::getenv(
"G4PHP_MULTIPLICITY_METHOD" );
74 if(
G4String(method) ==
"Poisson" ) {
76 }
else if(
G4String(method) ==
"BetweenInts" ) {
89 theGroundStateQValue = 0.0;
90 theActualStateQValue = 0.0;
96 if(theDist != 0)
delete theDist;
101 aDataFile >> theMassCode>>theMass>>theIsomerFlag>>theDistLaw
102 >> theGroundStateQValue>>theActualStateQValue;
103 if( std::getenv(
"G4PHPTEST") )
104 G4cout <<
" G4ParticleHPProduct :: Init MassCode "
105 << theMassCode <<
" " << theMass <<
" theActualStateQValue "
106 << theActualStateQValue <<
G4endl;
107 if( std::getenv(
"G4PHPTEST") )
108 G4cout <<
" G4ParticleHPProduct :: Init theActualStateQValue "
109 << theActualStateQValue <<
G4endl;
110 theGroundStateQValue*= CLHEP::eV;
111 theActualStateQValue*= CLHEP::eV;
112 theYield.
Init(aDataFile, CLHEP::eV);
120 else if(theDistLaw == 1)
125 else if(theDistLaw == 2)
130 else if(theDistLaw == 3)
135 else if(theDistLaw == 4)
150 else if(theDistLaw == 6)
155 else if(theDistLaw == 7)
162 throw G4HadronicException(__FILE__, __LINE__,
"distribution law unknown to G4ParticleHPProduct");
166 theDist->
SetQValue(theActualStateQValue);
167 theDist->
Init(aDataFile);
176 return theYield.
GetY(anEnergy);
181 fCache.
Get().theProjectileRP = aIncidentPart;
186 fCache.
Get().theTarget = aTarget;
191 return fCache.
Get().theTarget;
196 return fCache.
Get().theProjectileRP;
209 result *= fCache.
Get().theCurrentMultiplicity;
216 return theActualStateQValue;
std::vector< G4ReactionProduct * > G4ReactionProductVector
G4GLOB_DLL std::ostream G4cout
void Put(const value_type &val) const
void Init(std::istream &aDataFile, G4ParticleDefinition *projectile)
G4ReactionProduct * GetProjectileRP()
G4ReactionProductVector * Sample(G4double anEnergy, G4int nParticles)
G4double MeanEnergyOfThisInteraction()
G4ReactionProduct * GetTarget()
G4double GetMeanYield(G4double anEnergy)
void SetTarget(G4ReactionProduct *aTarget)
void SetProjectileRP(G4ReactionProduct *aIncidentPart)
G4int GetMultiplicity(G4double anEnergy)
G4double GetY(G4double x)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
void SetQValue(G4double aValue)
virtual G4double MeanEnergyOfThisInteraction()=0
virtual void Init(std::istream &aDataFile)=0