90 std::istringstream theData(std::ios::in);
101 G4int tempdep, nLegendre;
103 for (i=0; i < nEnergy; i++) {
104 theData >> temp >>
energy >> tempdep >> nLegendre;
109 for (ii = 0; ii < nLegendre; ii++) {
122 G4int tempdep, nPoints;
123 for (
G4int i = 0; i < nEnergy; i++) {
124 theData >> temp >>
energy >> tempdep >> nPoints;
130 for (
G4int ii = 0; ii < nPoints; ii++) {
132 theData >> costh >> prob;
140 G4int nEnergy_Legendre;
141 theData >> nEnergy_Legendre;
142 if (nEnergy_Legendre <= 0 ) {
143 std::stringstream iss;
144 iss <<
"G4ParticleHPElasticFS::Init Data Error repFlag is 3 but nEnergy_Legendre <= 0";
145 iss <<
"Z, A and M of problematic file is " <<
theNDLDataZ <<
", "
152 G4int tempdep, nLegendre;
154 for (
G4int i = 0; i < nEnergy_Legendre; i++) {
155 theData >> temp >>
energy >> tempdep >> nLegendre;
160 for (
G4int ii = 0; ii < nLegendre; ii++) {
170 theData >> nEnergy_Prob;
174 for (
G4int i = 0; i < nEnergy_Prob; i++) {
175 theData >> temp >>
energy >> tempdep >> nPoints;
182 G4cout <<
"Warning Transition Energy of repFlag3 is not consistent." <<
G4endl;
188 for (
G4int ii = 0; ii < nPoints; ii++) {
190 theData >> costh >> prob;
202 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
238 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
239 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
245 boosted.
Lorentz(theNeutron, theTarget);
268 "G4ParticleHPElasticFS::Init -- unusable number for repFlag");
271 if (cosTh < -1.1) {
return 0; }
284 theNeutron.
Lorentz(theNeutron, theTarget);
291 G4double sqt = std::sqrt(ratio*ratio - 1.0 + cosTh*cosTh);
294 G4double term1 = cosTh*(Einit*ratio + mN)/(mN*ratio + Einit);
304 pcmRot.
setX(px*cosTh*cosPhi - py*sinPhi + pz*sinth*cosPhi);
305 pcmRot.
setY(px*cosTh*sinPhi + py*cosPhi + pz*sinth*sinPhi);
306 pcmRot.
setZ(-px*sinth + pz*cosTh);
308 G4double eN = std::sqrt(pN*pN + mN*mN);
318 theNeutron.
Lorentz(theNeutron, toLab);
319 theTarget.
Lorentz(theTarget, toLab);
333 proj.
boost(boostToCM);
334 targ.
boost(boostToCM);
344 pcmRot.
setX(px*cosTh*cosPhi - py*sinPhi + pz*sinth*cosPhi);
345 pcmRot.
setY(px*cosTh*sinPhi + py*cosPhi + pz*sinth*sinPhi);
346 pcmRot.
setZ(-px*sinth + pz*cosTh);
351 proj.
boost(-boostToCM);
352 targ.
boost(-boostToCM);
373 "G4ParticleHPElasticFS::ApplyYourSelf frameflag incorrect");
static constexpr double twopi
static constexpr double eV
G4GLOB_DLL std::ostream G4cout
HepLorentzVector & boost(double, double, double)
void setVect(const Hep3Vector &)
Hep3Vector findBoostToCM() const
void Put(const value_type &val) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
static G4IonTable * GetIonTable()
G4double GetTemperature() const
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
G4double GetPDGMass() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack)
G4ParticleHPPartial * theProbArray
void Init(G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)
G4ParticleHPLegendreStore * theCoefficients
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
G4Cache< G4HadFinalState * > theResult
G4ParticleHPNames theNames
void SetCoeff(G4int i, G4int l, G4double coeff)
void Init(G4int i, G4double e, G4int n)
void SetTemperature(G4int i, G4double temp)
void InitInterpolation(std::istream &aDataFile)
G4double SampleElastic(G4double anEnergy)
static G4ParticleHPManager * GetInstance()
void GetDataStream(G4String, std::istringstream &iss)
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
G4double Sample(G4double x)
void SetT(G4int i, G4double x)
void SetX(G4int i, G4double x)
void SetY(G4int i, G4int j, G4double y)
void InitInterpolation(G4int i, std::istream &aDataFile)
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetTotalMomentum() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetKineticEnergy(const G4double en)
void SetMass(const G4double mas)
G4double energy(const ThreeVector &p, const G4double m)