57 : verboseLevel(verbose), theAlgorithm(0) {
67 G4cout <<
" >>> G4HadDecayGenerator";
75 : verboseLevel(verbose), theAlgorithm(alg) {
77 G4cout <<
" >>> G4HadDecayGenerator";
93 G4cerr <<
"G4HadDecayGenerator: bad algorithm code " << alg <<
G4endl;
100 G4cerr <<
"G4HadDecayGenerator: no algorithm specified" <<
G4endl;
113 static const G4String& none =
"NONE";
122 const std::vector<G4double>& masses,
123 std::vector<G4LorentzVector>& finalState) {
125 G4cout <<
" >>> G4HadDecayGenerator::Generate (mass)" <<
G4endl;
129 if (masses.size() == 1U)
133 return !finalState.empty();
140 const std::vector<G4double>& masses,
141 std::vector<G4LorentzVector>& finalState) {
143 G4cout <<
" >>> G4HadDecayGenerator::Generate (particle)" <<
G4endl;
152 const std::vector<G4double>& masses,
153 std::vector<G4LorentzVector>& finalState) {
155 G4cout <<
" >>> G4HadDecayGenerator::Generate (frame)" <<
G4endl;
160 for (
size_t i=0; i<finalState.size(); i++) {
161 finalState[i].boost(bv);
173 const std::vector<G4double>& masses,
174 std::vector<G4LorentzVector>& finalState)
const {
176 G4cout <<
" >>> G4HadDecayGenerator::GenerateOneBody" <<
G4endl;
181 if (masses.size() != 1U)
return false;
182 if (std::fabs(initialMass-masses[0]) >
eV)
return false;
const G4String & GetAlgorithmName() const
void SetVerboseLevel(G4int verbose)
G4HadDecayGenerator(Algorithm alg=Kopylov, G4int verbose=0)
G4double GetPDGMass() const
G4bool GenerateOneBody(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState) const
void ReportInvalidAlgorithm(Algorithm alg) const
virtual void SetVerboseLevel(G4int verbose)
static constexpr double eV
G4GLOB_DLL std::ostream G4cerr
G4VHadDecayAlgorithm * theAlgorithm
G4bool Generate(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
G4GLOB_DLL std::ostream G4cout
virtual ~G4HadDecayGenerator()
Hep3Vector boostVector() const
CLHEP::HepLorentzVector G4LorentzVector
void Generate(G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
void ReportMissingAlgorithm() const
const G4String & GetName() const