49 const std::vector<G4double>& masses,
50 std::vector<G4LorentzVector>& finalState) {
58 if (masses.size() == 2U)
69 const std::vector<G4double>& masses)
const {
71 (initialMass > 0. && masses.size() >= 2 &&
72 initialMass >= std::accumulate(masses.begin(),masses.end(),0.));
75 G4cout <<
GetName() <<
"::IsDecayAllowed? initialMass " << initialMass
76 <<
" " << masses.size() <<
" masses sum "
77 << std::accumulate(masses.begin(),masses.end(),0.) <<
G4endl;
92 G4double PSQ = (M0+M1+M2)*(M0+M1-M2)*(M0-M1+M2)*(M0-M1-M2);
94 G4cout <<
GetName() <<
": problem of decay of M(GeV) " << M0/GeV
95 <<
" to M1(GeV) " << M1/GeV <<
" and M2(GeV) " << M2/GeV
96 <<
" PSQ(MeV) " << PSQ/MeV <<
" < 0" <<
G4endl;
98 if (PSQ < -CLHEP::eV) {
105 return std::sqrt(PSQ)/(2.*M0);
123 const G4String& vname, std::ostream& os)
const {
124 os <<
" " << vname <<
"(" << v.size() <<
") ";
125 std::copy(v.begin(), v.end(), std::ostream_iterator<G4double>(os,
" "));
G4GLOB_DLL std::ostream G4cout
virtual void GenerateTwoBody(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)=0
G4double UniformTheta() const
void Generate(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
const G4String & GetName() const
virtual G4bool IsDecayAllowed(G4double initialMass, const std::vector< G4double > &masses) const
void PrintVector(const std::vector< G4double > &v, const G4String &name, std::ostream &os) const
G4double UniformPhi() const
G4double TwoBodyMomentum(G4double M0, G4double M1, G4double M2) const
virtual void GenerateMultiBody(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)=0