49 auto Z =
static_cast<G4int>(massCode / 1000);
50 auto A =
static_cast<G4int>(massCode - 1000 * Z);
68 if (Z == 2) result->SetDefinition(
G4He3::He3());
76 "G4ParticleHPNBodyPhaseSpace: Unknown ion case 2");
82 G4double maxE = GetEmax(anEnergy, result->GetMass());
84 maxE = 1. * CLHEP::eV;
88 if (theTotalCount <= 3) {
91 else if (theTotalCount == 4) {
94 else if (theTotalCount == 5) {
100 "NeutronHP Phase-space distribution cannot cope with this number of particles");
103 G4double rand0 = Prob(max, maxE, theTotalCount);
107 G4int icounter_max = 1024;
110 if (icounter > icounter_max) {
111 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of "
112 << __FILE__ <<
"." <<
G4endl;
117 testit = Prob(energy, maxE, theTotalCount);
118 }
while (rand > testit);
119 result->SetKineticEnergy(energy);
126 G4double mtot = result->GetTotalMomentum();
127 G4ThreeVector tempVector(mtot * sinth * std::cos(phi), mtot * sinth * std::sin(phi),
128 mtot * std::cos(theta));
129 result->SetMomentum(tempVector);
131 result->Lorentz(*result, -1. * aCMS);
G4ReactionProduct * Sample(G4double anEnergy, G4double massCode, G4double mass) override
G4ReactionProduct * GetTarget() const
G4ReactionProduct * GetProjectileRP() const