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);