50 const std::vector<G4double>& masses,
51 std::vector<G4LorentzVector>& finalState) {
59 if (masses.size() == 2U)
70 const std::vector<G4double>& masses)
const {
72 (initialMass > 0. && masses.size() >= 2 &&
73 initialMass >= std::accumulate(masses.begin(),masses.end(),0.));
76 G4cout <<
GetName() <<
"::IsDecayAllowed? initialMass " << initialMass
77 <<
" " << masses.size() <<
" masses sum "
78 << std::accumulate(masses.begin(),masses.end(),0.) <<
G4endl;
93 G4double PSQ = (M0+M1+M2)*(M0+M1-M2)*(M0-M1+M2)*(M0-M1-M2);
96 <<
" to M1(GeV) " << M1/
GeV <<
" and M2(GeV) " << M2/
GeV
97 <<
" PSQ(MeV) " << PSQ/
MeV <<
" < 0" <<
G4endl;
106 return std::sqrt(PSQ)/(2.*M0);
124 const G4String& vname, std::ostream& os)
const {
125 os <<
" " << vname <<
"(" << v.size() <<
") ";
126 std::copy(v.begin(), v.end(), std::ostream_iterator<G4double>(os,
" "));
virtual void GenerateTwoBody(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)=0
G4double UniformTheta() const
virtual G4bool IsDecayAllowed(G4double initialMass, const std::vector< G4double > &masses) const
virtual void GenerateMultiBody(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)=0
static constexpr double twopi
G4GLOB_DLL std::ostream G4cout
void Generate(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
static constexpr double eV
void PrintVector(const std::vector< G4double > &v, const G4String &name, std::ostream &os) const
const G4String & GetName() const
G4double UniformPhi() const
static constexpr double GeV
G4double TwoBodyMomentum(G4double M0, G4double M1, G4double M2) const
static constexpr double MeV