69 const std::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 (
auto 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)