109 if(Z!=2)
throw G4HadronicException(__FILE__, __LINE__,
"G4NeutronHPContAngularPar: Unknown ion case 1");
121 if( angularRep == 1 )
132 if (
fCache.Get()->fresh == true )
137 fCache.Get()->fresh =
false;
154 if (
theAngular[j].GetValue(0) != 0.0 )
break;
168 running[j+1] = running[j] + delta;
186 if ( j == nDiscreteEnergies ) {
197 if ( j != nEnergies-1 ) {
202 throw G4HadronicException(__FILE__, __LINE__,
"G4NeutronHPContAngularPar: Unexpected non zero value of theAngular[nEnergies-1].GetValue(0)");
207 running[j+1] = running[j] + ( ( e_high - e_low ) * delta );
223 random *= (tot_prob_DIS + tot_prob_CON);
225 if ( random <= ( tot_prob_DIS / ( tot_prob_DIS + tot_prob_CON ) ) || nDiscreteEnergies ==
nEnergies )
231 if ( random < running[ j+1 ] )
255 if ( random < running[ j ] )
266 if ( it != nDiscreteEnergies )
280 if ( it == nDiscreteEnergies ) itt = it+1;
297 fCache.Get()->remaining_energy -= fsEnergy;
309 if (
fCache.Get()->fresh == true )
312 fCache.Get()->fresh =
false;
334 running[i]=running[i-1];
347 if ( nEnergies == 1 || running[nEnergies-1] == 0 )
348 fCache.Get()->currentMeanEnergy = 0.0;
351 fCache.Get()->currentMeanEnergy = weighted/running[nEnergies-1];
355 if ( nEnergies == 1 ) it = 0;
358 if ( running[nEnergies-1] != 0 )
363 if ( random < running [ i ] / running [ nEnergies-1 ] )
break;
368 if ( running [ nEnergies-1 ] == 0 ) it = 0;
392 running[it-1]/running[nEnergies-1],
393 running[it]/running[nEnergies-1],
411 G4double x1 = running[it-1]/running[nEnergies-1];
412 G4double x2 = running[it]/running[nEnergies-1];
432 fCache.Get()->remaining_energy -= fsEnergy;
436 else if(angularRep==2)
445 if(j!=0) running[j]=running[j-1];
456 if ( nEnergies == 1 )
457 fCache.Get()->currentMeanEnergy = 0.0;
459 fCache.Get()->currentMeanEnergy = weighted/running[nEnergies-1];
468 if(randkal<running[j]/running[nEnergies-1])
break;
474 x = randkal*running[nEnergies-1];
487 fsEnergy, y1, y2, cLow,cHigh);
501 G4int residualA = targetA+1-
A;
502 G4int residualZ = targetZ-Z;
507 incidentEnergy, incidentMass,
508 productEnergy, productMass,
509 residualMass, residualA, residualZ,
510 targetMass, targetA, targetZ);
511 cosTh = theKallbach.
Sample(anEnergy);
513 else if(angularRep>10&&angularRep<16)
521 if(i!=0) running[i]=running[i-1];
531 if ( nEnergies == 1 )
532 fCache.Get()->currentMeanEnergy = 0.0;
534 fCache.Get()->currentMeanEnergy = weighted/running[nEnergies-1];
537 if ( nEnergies == 1 ) it = 0;
542 if(random<running[i]/running[nEnergies-1])
break;
558 aMan.
Init(angularRep-10, nAngularParameters-1);
560 cosTh = theStore.
Sample();
576 running[it-1]/running[nEnergies-1],
577 running[it]/running[nEnergies-1],
582 cosTh = theStore.
Sample();
587 G4double x1 = running[it-1]/running[nEnergies-1];
588 G4double x2 = running[it]/running[nEnergies-1];
626 x = theBuff1.
GetX(i);
627 y1 = theBuff1.
GetY(i);
628 y2 = theBuff2.
GetY(i);
635 cosTh = theStore.
Sample();
641 throw G4HadronicException(__FILE__, __LINE__,
"G4NeutronHPContAngularPar::Sample: Unknown angular representation");
648 G4ThreeVector tempVector(mtot*sinth*std::cos(phi), mtot*sinth*std::sin(phi), mtot*std::cos(theta) );
G4double GetY(G4double x)
G4int GetVectorLength() const
void SetInterpolationManager(const G4InterpolationManager &aManager)
G4double SampleMax(G4double energy)
G4double GetTotalMomentum() const
CLHEP::Hep3Vector G4ThreeVector
void SetLabel(G4double aLabel)
G4ReactionProduct * theTarget
void Init(G4int aScheme, G4int aRange)
void SetKineticEnergy(const G4double en)
void Init(G4int i, G4double e, G4int n)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetCoeff(G4int i, G4int l, G4double coeff)
G4double GetX(G4int i) const
G4NeutronHPInterpolator theInt
G4double Interpolate(G4InterpolationScheme aScheme, G4double x, G4double x1, G4double x2, G4double y1, G4double y2) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetY(G4int i, G4double x)
G4double GetWeightedBinIntegral(const G4InterpolationScheme &aScheme, const G4double x1, const G4double x2, const G4double y1, const G4double y2)
G4ReactionProduct * Sample(G4double anEnergy, G4double massCode, G4double mass, G4int angularRep, G4int interpol)
G4InterpolationManager theManager
G4InterpolationScheme GetScheme(G4int index) const
G4double GetBinIntegral(const G4InterpolationScheme &aScheme, const G4double x1, const G4double x2, const G4double y1, const G4double y2)
static G4Triton * Triton()
static G4Proton * Proton()
void SetX(G4int i, G4double e)
static G4Neutron * Neutron()
static const G4double A[nN]
static G4Deuteron * Deuteron()
static G4IonTable * GetIonTable()
G4double Sample(G4double anEnergy)
void Init(std::istream &aDataFile, G4int nPar, G4double unit=1.)
static G4Positron * Positron()
G4double GetPDGMass() const
static G4double GetBindingEnergy(const G4int A, const G4int Z)
void Init(std::istream &aDataFile)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4NeutronHPList * theAngular
void SetManager(G4InterpolationManager &aManager)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double GetValue(G4int i)
G4Cache< toBeCached * > fCache
G4InterpolationScheme GetInverseScheme(G4int index)
static G4Electron * Electron()