71 std::istringstream theData(std::ios::in);
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;
132 G4int tempdep, nLegendre;
134 for (
G4int i = 0 ; i < nEnergy_Legendre ; i++ )
136 theData >> temp >> energy >> tempdep >> nLegendre;
141 for (
G4int ii = 0 ; ii < nLegendre ; ii++ )
152 theData >> nEnergy_Prob;
156 for (
G4int i=0 ; i < nEnergy_Prob ; i++ )
158 theData >> temp >> energy >> tempdep >> nPoints;
166 G4cout <<
"Warning Transition Energy of repFlag3 is not consistent." <<
G4endl;
172 for(
G4int ii = 0 ; ii < nPoints ; ii++ )
175 theData >> costh >> prob;
189 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
230 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
231 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
237 boosted.
Lorentz(theNeutron, theTarget);
267 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
269 if(cosTh<-1.1) {
return 0; }
278 theNeutron.
Lorentz(theNeutron, theTarget);
284 G4double ap = (mT+eE)*(mT-eE) + (p0+mN)*(p0-mN);
285 G4double a = 4*(eE+p0*cosTh)*(eE-p0*cosTh);
288 G4double en = (-b+std::sqrt(b*b - 4*a*c) )/(2*a);
289 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
293 theNeutron.
Lorentz(theNeutron, -1.*theTarget);
295 theNeutron.
Lorentz(theNeutron, theCMS);
299 theNeutron.
Lorentz(theNeutron, -1.*theCMS);
300 theTarget.
Lorentz(theTarget, -1.*theCMS);
307 theNeutron.
Lorentz(theNeutron, theCMS);
308 theTarget.
Lorentz(theTarget, theCMS);
311 G4double cms_theta=cmsMom_tmp.theta();
314 tempVector.setX(std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
315 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
316 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
317 tempVector.setY(std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
318 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
319 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
320 tempVector.setZ(std::cos(theta)*std::cos(cms_theta)
321 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
342 theNeutron.
Lorentz(theNeutron, -1.*theCMS);
352 theTarget.
Lorentz(theTarget, -1.*theCMS);
365 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::ApplyYourSelf frameflag incorrect");
static G4ParticleHPManager * GetInstance()
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
G4ParticleHPPartial * theProbArray
void Init(G4int i, G4double e, G4int n)
G4Cache< G4HadFinalState * > theResult
void SetMomentum(const G4ThreeVector &momentum)
G4double GetTotalMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
CLHEP::Hep3Vector G4ThreeVector
void InitInterpolation(G4int i, std::istream &aDataFile)
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetY(G4int i, G4int j, G4double y)
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
void GetDataStream(G4String, std::istringstream &iss)
void InitInterpolation(std::istream &aDataFile)
void SetStatusChange(G4HadFinalStateStatus aS)
void Init(G4double A, G4double Z, G4int M, G4String &dirName, G4String &aFSType, G4ParticleDefinition *)
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
void SetMass(const G4double mas)
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
const G4ParticleDefinition * GetDefinition() const
G4ParticleHPNames theNames
G4double Sample(G4double x)
G4double GetKineticEnergy() const
void SetTotalEnergy(const G4double en)
static const double twopi
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack)
G4ErrorTarget * theTarget
const G4LorentzVector & Get4Momentum() const
G4ParticleHPLegendreStore * theCoefficients
static G4IonTable * GetIonTable()
G4double GetKineticEnergy() const
void SetTemperature(G4int i, G4double temp)
void SetX(G4int i, G4double x)
void SetEnergyChange(G4double anEnergy)
G4double SampleElastic(G4double anEnergy)
G4double GetTotalEnergy() const
G4double GetPDGMass() const
G4double energy(const ThreeVector &p, const G4double m)
void SetCoeff(G4int i, G4int l, G4double coeff)
G4ThreeVector GetMomentum() const
G4double GetTemperature() const
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void SetT(G4int i, G4double x)
const G4Material * GetMaterial() const
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void Put(const value_type &val) const
void SetMomentumChange(const G4ThreeVector &aV)