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);
G4DLLIMPORT std::ostream G4cout
void Init(std::ifstream &aDataFile)
void SampleAndUpdate(G4ReactionProduct &aNeutron)
void SetCoeff(G4int i, G4int l, G4double coeff)
G4double SampleMax(G4double energy)
void Init(G4int i, G4double e, G4int n)
void InitInterpolation(std::ifstream &aDataFile)
void SetTemperature(G4int i, G4double temp)
void InitData(G4int i, std::ifstream &aDataFile, G4double unit=1.)
void InitInterpolation(G4int i, std::ifstream &aDataFile)
void SetT(G4int i, G4double x)
G4double Sample(G4double x)
void SetX(G4int i, G4double x)
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)