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;
126 G4int nEnergy_Legendre;
127 theData >> nEnergy_Legendre;
131 G4int tempdep, nLegendre;
133 for (
G4int i = 0 ; i < nEnergy_Legendre ; i++ )
135 theData >> temp >> energy >> tempdep >> nLegendre;
140 for (
G4int ii = 0 ; ii < nLegendre ; ii++ )
151 theData >> nEnergy_Prob;
155 for (
G4int i=0 ; i < nEnergy_Prob ; i++ )
157 theData >> temp >> energy >> tempdep >> nPoints;
165 G4cout <<
"Warning Transition Energy of repFlag3 is not consistent." <<
G4endl;
171 for(
G4int ii = 0 ; ii < nPoints ; ii++ )
174 theData >> costh >> prob;
187 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
227 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
228 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
234 boosted.
Lorentz(theNeutron, theTarget);
264 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
266 if(cosTh<-1.1) {
return 0; }
275 theNeutron.
Lorentz(theNeutron, theTarget);
281 G4double ap = (mT+eE)*(mT-eE) + (p0+mN)*(p0-mN);
282 G4double a = 4*(eE+p0*cosTh)*(eE-p0*cosTh);
285 G4double en = (-b+std::sqrt(b*b - 4*a*c) )/(2*a);
286 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
290 theNeutron.
Lorentz(theNeutron, -1.*theTarget);
292 theNeutron.
Lorentz(theNeutron, theCMS);
296 theNeutron.
Lorentz(theNeutron, -1.*theCMS);
297 theTarget.
Lorentz(theTarget, -1.*theCMS);
304 theNeutron.
Lorentz(theNeutron, theCMS);
305 theTarget.
Lorentz(theTarget, theCMS);
308 G4double cms_theta=cmsMom_tmp.theta();
311 tempVector.setX(std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
312 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
313 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
314 tempVector.setY(std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
315 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
316 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
317 tempVector.setZ(std::cos(theta)*std::cos(cms_theta)
318 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
339 theNeutron.
Lorentz(theNeutron, -1.*theCMS);
349 theTarget.
Lorentz(theTarget, -1.*theCMS);
362 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::ApplyYourSelf frameflag incorrect");
static G4ParticleHPManager * GetInstance()
G4ParticleHPPartial * theProbArray
void Init(G4int i, G4double e, G4int n)
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
const G4ParticleDefinition * GetDefinition() const
G4ParticleHPNames theNames
G4double Sample(G4double x)
G4double GetKineticEnergy() const
void SetTotalEnergy(const G4double en)
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack)
G4ErrorTarget * theTarget
static G4Triton * Triton()
static G4Proton * Proton()
static const G4double A[nN]
const G4LorentzVector & Get4Momentum() const
static G4Deuteron * Deuteron()
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)
G4HadFinalState theResult
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 SetMomentumChange(const G4ThreeVector &aV)