42 aDataFile >> theAngularDistributionType >> targetMass;
43 aDataFile >> frameFlag;
44 if(theAngularDistributionType == 0 )
48 else if(theAngularDistributionType==1)
56 G4int tempdep, nLegendre;
58 for (i=0; i<nEnergy; i++)
60 aDataFile >> temp >> energy >> tempdep >> nLegendre;
62 theCoefficients->
Init(i, energy, nLegendre);
65 for(ii=0; ii<nLegendre; ii++)
68 theCoefficients->
SetCoeff(i, ii+1, coeff);
72 else if (theAngularDistributionType==2)
81 for(
G4int i=0; i<nEnergy; i++)
83 aDataFile >> temp >> energy >> tempdep;
85 theProbArray->
SetT(i, temp);
86 theProbArray->
SetX(i, energy);
87 theProbArray->
InitData(i, aDataFile);
93 G4cout <<
"unknown distribution found for Angular"<<
G4endl;
94 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
125 boosted.
Lorentz(theNeutron, theTarget);
136 else if(theAngularDistributionType == 1) {cosTh = theCoefficients->
SampleMax(kineticEnergy);}
137 else if(theAngularDistributionType == 2) {cosTh = theProbArray->
Sample(kineticEnergy);}
139 G4cout <<
"unknown distribution found for Angular"<<
G4endl;
140 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
146 G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
149 else if(frameFlag == 2)
152 boostedN.
Lorentz(theNeutron, theTarget);
164 else if(theAngularDistributionType == 1) {cosTh = theCoefficients->
SampleMax(kineticEnergy);}
165 else if(theAngularDistributionType == 2) {cosTh = theProbArray->
Sample(kineticEnergy);}
167 G4cout <<
"unknown distribution found for Angular"<<
G4endl;
168 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
199 G4ThreeVector temp(sinth*std::cos(phi), sinth*std::sin(phi), std::cos(theta) );
252 G4double kinE = (A1+1-A1prim)/(A1+1)/(A1+1)*(A1*kineticEnergy+(1+A1)*QValue);
256 if ( mom2 > 0.0 ) mom = std::sqrt( mom2 );
264 boostedT.
Lorentz(theTarget, theTarget);
274 G4double cmsMom = std::sqrt(the3trafo*the3trafo);
275 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
279 aHadron.
Lorentz(aHadron, trafo);
284 throw G4HadronicException(__FILE__, __LINE__,
"Tried to sample non isotropic neutron angular");
286 aHadron.
Lorentz(aHadron, -1.*theTarget);
G4double SampleMax(G4double energy)
G4double GetTotalMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetKineticEnergy(const G4double en)
void Init(G4int i, G4double e, G4int n)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetCoeff(G4int i, G4int l, G4double coeff)
void SetT(G4int i, G4double x)
void SetMass(const G4double mas)
G4GLOB_DLL std::ostream G4cout
void SetX(G4int i, G4double x)
void SetTotalEnergy(const G4double en)
void InitData(G4int i, std::istream &aDataFile, G4double unit=1.)
void Init(std::istream &aDataFile)
void InitInterpolation(std::istream &aDataFile)
G4double GetKineticEnergy() const
void SampleAndUpdate(G4ReactionProduct &aNeutron)
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void InitInterpolation(G4int i, std::istream &aDataFile)
void SetTemperature(G4int i, G4double temp)
G4double Sample(G4double x)