34#define INCLXX_IN_GEANT4_MODE 1
50 G4double Fmax = std::sqrt(std::pow(xN/(xN+1.),N)/(xN+1.));
53 unsigned long loopCounter = 0;
54 const unsigned long maxLoopCounter = 10000000;
57 F = std::sqrt(std::pow(chi,N)*(1.-chi));
59 }
while (loopCounter<maxLoopCounter && Fmax*
Random::shoot() > F);
69 const size_t N = particles.size();
72 std::transform(particles.begin(), particles.end(), masses.begin(), std::mem_fn(&
Particle::getMass));
73 std::partial_sum(masses.begin(), masses.end(), sumMasses.begin());
82 Particle *restParticle = particles.front();
87 for (ParticleList::reverse_iterator p=particles.rbegin(); k>0; ++p, --k) {
89 T *= (k>1) ? betaKopylov(k) : 0.;
95 (*p)->setMomentum(PFragCM);
96 (*p)->adjustEnergyFromMomentum();
97 restParticle->
setMass(restMass);
102 restParticle->
boost(boostV);
106 restParticle->
setMass(masses[0]);
ThreeVector boostVector() const
void setMass(G4double mass)
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
G4double getMass() const
Get the cached particle mass.
void boost(const ThreeVector &aBoostVector)
void generate(const G4double sqrtS, ParticleList &particles)
Generate momenta according to a uniform, non-Lorentz-invariant phase-space model.
void setY(G4double ay)
Set the y coordinate.
void setZ(G4double az)
Set the z coordinate.
void setX(G4double ax)
Set the x coordinate.
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
ThreeVector normVector(G4double norm=1.)