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) );
static G4Deuteron * Deuteron()
static G4Electron * Electron()
void Init(G4int aScheme, G4int aRange)
G4InterpolationScheme GetScheme(G4int index) const
G4ReactionProduct * Sample(G4double anEnergy, G4double massCode, G4double mass)
G4double Interpolate(G4InterpolationScheme aScheme, G4double x, G4double x1, G4double x2, G4double y1, G4double y2) const
void SetCoeff(G4int i, G4int l, G4double coeff)
void SetManager(G4InterpolationManager &aManager)
G4double SampleDiscreteTwoBody(G4double anEnergy)
void Merge(G4NeutronHPVector *active, G4NeutronHPVector *passive)
void SetX(G4int i, G4double e)
G4int GetVectorLength() const
G4double GetX(G4int i) const
G4double GetY(G4double x)
void SetData(G4int i, G4double x, G4double y)
void SetInterpolationManager(const G4InterpolationManager &aManager)
void SetY(G4int i, G4double x)
static G4Neutron * Neutron()
static G4Positron * Positron()
static G4Proton * Proton()
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetTotalMomentum() const
void SetKineticEnergy(const G4double en)
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
static G4Triton * Triton()
G4ReactionProduct * GetNeutron()
G4ReactionProduct * GetTarget()