45 aDataFile >> theAngularDistributionType >> targetMass;
46 aDataFile >> frameFlag;
47 if (theAngularDistributionType == 0) {
50 else if (theAngularDistributionType == 1) {
57 G4int tempdep, nLegendre;
59 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++) {
67 theCoefficients->
SetCoeff(i, ii + 1, coeff);
71 else if (theAngularDistributionType == 2) {
79 for (
G4int i = 0; i < nEnergy; i++) {
80 aDataFile >> temp >> energy >> tempdep;
82 theProbArray->
SetT(i, temp);
83 theProbArray->
SetX(i, energy);
84 theProbArray->
InitData(i, aDataFile);
89 G4cout <<
"unknown distribution found for Angular: " << theAngularDistributionType <<
G4endl;
90 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
120 boosted.
Lorentz(*fCache.
Get().theProjectileRP, *fCache.
Get().theTarget);
133 else if (theAngularDistributionType == 1) {
134 cosTh = theCoefficients->
SampleMax(kineticEnergy);
136 else if (theAngularDistributionType == 2) {
137 cosTh = theProbArray->
Sample(kineticEnergy);
140 G4cout <<
"unknown distribution found for Angular: " << theAngularDistributionType <<
G4endl;
141 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
147 G4ThreeVector temp(en * sinth * std::cos(phi), en * sinth * std::sin(phi),
148 en * std::cos(theta));
151 else if (frameFlag == 2)
154 boostedN.
Lorentz(*fCache.
Get().theProjectileRP, *fCache.
Get().theTarget);
168 else if (theAngularDistributionType == 1) {
169 cosTh = theCoefficients->
SampleMax(kineticEnergy);
171 else if (theAngularDistributionType == 2) {
172 cosTh = theProbArray->
Sample(kineticEnergy);
175 G4cout <<
"unknown distribution found for Angular: " << theAngularDistributionType <<
G4endl;
176 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
207 G4ThreeVector temp(sinth * std::cos(phi), sinth * std::sin(phi), std::cos(theta));
261 (A1 + 1 - A1prim) / (A1 + 1) / (A1 + 1) * (A1 * kineticEnergy + (1 + A1) * QValue);
266 mom = std::sqrt(mom2);
275 boostedT.
Lorentz(*fCache.
Get().theTarget, *fCache.
Get().theTarget);
282 G4ThreeVector the3trafo = -the3Target - the3IncidentParticle;
285 G4double cmsMom = std::sqrt(the3trafo * the3trafo);
286 G4double sqrts = std::sqrt((totE - cmsMom) * (totE + cmsMom));
290 aHadron.
Lorentz(aHadron, trafo);
293 throw G4HadronicException(__FILE__, __LINE__,
"Tried to sample non isotropic neutron angular");
295 aHadron.
Lorentz(aHadron, -1. * (*fCache.
Get().theTarget));
void Init(std::istream &aDataFile)
void SampleAndUpdate(G4ReactionProduct &anIncidentParticle)
void SetCoeff(G4int i, G4int l, G4double coeff)
void Init(G4int i, G4double e, G4int n)
void SetTemperature(G4int i, G4double temp)
void InitInterpolation(std::istream &aDataFile)
G4double SampleMax(G4double energy)
G4double Sample(G4double x)
void SetT(G4int i, G4double x)
void SetX(G4int i, G4double x)
void InitData(G4int i, std::istream &aDataFile, G4double unit=1.)
void InitInterpolation(G4int i, std::istream &aDataFile)