84 throw G4HadronicException(__FILE__, __LINE__,
"G4NeutronHPDiscreteTwoBody: Unknown ion case 2");
90 for(i=0; i<nEnergy; i++)
93 if(theCoeff[i].GetEnergy()>anEnergy)
break;
95 if(it==0||it==nEnergy-1)
97 if(theCoeff[it].GetRepresentation()==0)
107 else if(theCoeff[it].GetRepresentation()==12)
111 aManager.
Init(
LINLIN, theCoeff[it].GetNumberOfPoly()/2);
118 theStore.
SetX(i/2, theCoeff[it].GetCoeff(i));
119 theStore.
SetY(i/2, theCoeff[it].GetCoeff(i+1));
122 cosTh = theStore.
Sample();
124 else if(theCoeff[it].GetRepresentation()==14)
128 aManager.
Init(
LOGLIN, theCoeff[it].GetNumberOfPoly()/2);
135 theStore.
SetX(i/2, theCoeff[it].GetCoeff(i));
136 theStore.
SetY(i/2, theCoeff[it].GetCoeff(i+1));
139 cosTh = theStore.
Sample();
143 throw G4HadronicException(__FILE__, __LINE__,
"unknown representation type in Two-body scattering");
148 if(theCoeff[it].GetRepresentation() == theCoeff[it-1].GetRepresentation())
150 if(theCoeff[it].GetRepresentation()==0)
154 theStore.
SetCoeff(0, &(theCoeff[it-1]));
155 theStore.
SetCoeff(1, &(theCoeff[it]));
163 else if(theCoeff[it].GetRepresentation()==12)
167 aManager1.
Init(
LINLIN, theCoeff[it-1].GetNumberOfPoly()/2);
174 theBuff1.
SetX(i/2, theCoeff[it-1].GetCoeff(i));
175 theBuff1.
SetY(i/2, theCoeff[it-1].GetCoeff(i+1));
180 aManager2.
Init(
LINLIN, theCoeff[it].GetNumberOfPoly()/2);
186 theBuff2.
SetX(i/2, theCoeff[it].GetCoeff(i));
187 theBuff2.
SetY(i/2, theCoeff[it].GetCoeff(i+1));
205 mu = theBuff1.
GetX(i);
206 y1 = theBuff1.
GetY(i);
207 y2 = theBuff2.
GetY(mu);
213 mu = theBuff2.
GetX(i);
214 y1 = theBuff2.
GetY(i);
215 y2 = theBuff1.
GetY(mu);
219 theStore.
Merge(&theStore1, &theStore2);
220 cosTh = theStore.
Sample();
222 else if(theCoeff[it].GetRepresentation()==14)
226 aManager1.
Init(
LOGLIN, theCoeff[it-1].GetNumberOfPoly()/2);
233 theBuff1.
SetX(i/2, theCoeff[it-1].GetCoeff(i));
234 theBuff1.
SetY(i/2, theCoeff[it-1].GetCoeff(i+1));
240 aManager2.
Init(
LOGLIN, theCoeff[it].GetNumberOfPoly()/2);
247 theBuff2.
SetX(i/2, theCoeff[it].GetCoeff(i));
248 theBuff2.
SetY(i/2, theCoeff[it].GetCoeff(i+1));
266 mu = theBuff1.
GetX(i);
267 y1 = theBuff1.
GetY(i);
268 y2 = theBuff2.
GetY(mu);
274 mu = theBuff2.
GetX(i);
275 y1 = theBuff2.
GetY(i);
276 y2 = theBuff1.
GetY(mu);
280 theStore.
Merge(&theStore1, &theStore2);
281 cosTh = theStore.
Sample();
285 throw G4HadronicException(__FILE__, __LINE__,
"Two neighbouring distributions with different interpolation");
290 throw G4HadronicException(__FILE__, __LINE__,
"unknown representation type in Two-body scattering, case 2");
306 G4double E1 = (A1+1)*(A1+1)/A1/A1*anEnergy;
314 G4ThreeVector tempVector(mtot*sinth*std::cos(phi), mtot*sinth*std::sin(phi), mtot*std::cos(theta) );