82 G4int tempdep, nLegendre;
84 for (i=0; i<nEnergy; i++)
86 theData >> temp >> energy >> tempdep >> nLegendre;
91 for(ii=0; ii<nLegendre; ii++)
106 G4int tempdep, nPoints;
107 for(
G4int i=0; i<nEnergy; i++)
109 theData >> temp >> energy >> tempdep >> nPoints;
115 for(
G4int ii=0; ii<nPoints; ii++)
118 theData >> costh >> prob;
127 G4int nEnergy_Legendre;
128 theData >> nEnergy_Legendre;
129 if ( nEnergy_Legendre <= 0 ) {
130 std::stringstream iss;
131 iss <<
"G4ParticleHPElasticFS::Init Data Error repFlag is 3 but nEnergy_Legendre <= 0";
138 G4int tempdep, nLegendre;
140 for (
G4int i = 0 ; i < nEnergy_Legendre ; i++ )
142 theData >> temp >> energy >> tempdep >> nLegendre;
147 for (
G4int ii = 0 ; ii < nLegendre ; ii++ )
158 theData >> nEnergy_Prob;
162 for (
G4int i=0 ; i < nEnergy_Prob ; i++ )
164 theData >> temp >> energy >> tempdep >> nPoints;
172 G4cout <<
"Warning Transition Energy of repFlag3 is not consistent." <<
G4endl;
178 for(
G4int ii = 0 ; ii < nPoints ; ii++ )
181 theData >> costh >> prob;
195 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
236 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
237 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
243 boosted.
Lorentz(theNeutron, theTarget);
273 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
275 if(cosTh<-1.1) {
return 0; }
284 theNeutron.
Lorentz(theNeutron, theTarget);
290 G4double ap = (mT+eE)*(mT-eE) + (p0+mN)*(p0-mN);
291 G4double a = 4*(eE+p0*cosTh)*(eE-p0*cosTh);
294 G4double en = (-b+std::sqrt(b*b - 4*a*c) )/(2*a);
295 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
299 theNeutron.
Lorentz(theNeutron, -1.*theTarget);
301 theNeutron.
Lorentz(theNeutron, theCMS);
305 theNeutron.
Lorentz(theNeutron, -1.*theCMS);
306 theTarget.
Lorentz(theTarget, -1.*theCMS);
313 theNeutron.
Lorentz(theNeutron, theCMS);
314 theTarget.
Lorentz(theTarget, theCMS);
320 tempVector.
setX(std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
321 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
322 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
323 tempVector.
setY(std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
324 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
325 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
326 tempVector.
setZ(std::cos(theta)*std::cos(cms_theta)
327 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
348 theNeutron.
Lorentz(theNeutron, -1.*theCMS);
358 theTarget.
Lorentz(theTarget, -1.*theCMS);
371 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::ApplyYourSelf frameflag incorrect");
static G4ParticleHPManager * GetInstance()
std::vector< ExP01TrackerHit * > a
static G4IonTable * GetIonTable()
void SetMomentumChange(const G4ThreeVector &aV)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetX(G4int i, G4double x)
void SetTemperature(G4int i, G4double temp)
G4ParticleHPLegendreStore * theCoefficients
void SetCoeff(G4int i, G4int l, G4double coeff)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
G4double Sample(G4double x)
G4double GetPDGMass() const
void SetTotalEnergy(const G4double en)
void SetMass(const G4double mas)
void SetEnergyChange(G4double anEnergy)
void GetDataStream(G4String, std::istringstream &iss)
G4double GetTotalEnergy() const
void SetKineticEnergy(const G4double en)
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
G4double GetKineticEnergy() const
static G4Pow * GetInstance()
const G4Material * GetMaterial() const
G4double powA(G4double A, G4double y) const
G4Cache< G4HadFinalState * > theResult
G4ParticleHPNames theNames
static constexpr double twopi
G4ErrorTarget * theTarget
G4double GetTotalMomentum() const
double A(double temperature)
void SetY(G4int i, G4int j, G4double y)
void Init(G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)
static constexpr double eV
G4ThreeVector GetMomentum() const
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void Put(const value_type &val) const
const G4LorentzVector & Get4Momentum() const
G4double GetKineticEnergy() const
const G4ParticleDefinition * GetDefinition() const
void InitInterpolation(std::istream &aDataFile)
G4ParticleHPPartial * theProbArray
void SetMomentum(const G4ThreeVector &momentum)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4GLOB_DLL std::ostream G4cout
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack)
G4double SampleElastic(G4double anEnergy)
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void InitInterpolation(G4int i, std::istream &aDataFile)
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
void SetT(G4int i, G4double x)
void Init(G4int i, G4double e, G4int n)
void SetStatusChange(G4HadFinalStateStatus aS)
G4double GetTemperature() const