11 #include "ThirdParty/EvtGen/EvtGenKine.hh" 12 #include "ThirdParty/EvtGen/EvtRandom.hh" 13 #include "ThirdParty/EvtGen/EvtVector4R.hh" 21 const std::vector<double> &FinalStateMasses_,
22 const std::vector<ComPWA::pid> &FinalStatePIDs_)
23 : CMSP4(CMSP4_), FinalStateMasses(FinalStateMasses_),
24 FinalStatePIDs(FinalStatePIDs_),
27 throw std::runtime_error(
"EvtGenGenerator::EvtGenGenerator() | at least " 28 "two final state particles are required!");
35 KinematicsInfo.getFinalStateMasses(),
36 KinematicsInfo.getFinalStatePIDs()) {}
45 for (
unsigned int i = 0; i < NumberOfEvents; ++i) {
48 double weight = EvtGenKine::PhaseSpace(
52 double ampRnd = RandomGenerator();
53 if (ampRnd > weight) {
58 std::vector<FourMomentum> FourMomenta;
59 for (
auto const &p4 : FourVectors) {
60 FourMomenta.push_back(
61 FourMomentum(p4.get(1), p4.get(2), p4.get(3), p4.get(0)));
66 GeneratedPhsp.Events.push_back(
ComPWA::Event{FourMomenta, 1.0});
ComPWA four momentum class.
std::vector< ComPWA::pid > FinalStatePIDs
std::vector< double > FinalStateMasses
double invariantMass() const
void setRandomNumberGenerator(UniformRealNumberGenerator &NumberGenerator_)
EvtGenGenerator(const ComPWA::FourMomentum &CMSP4_, const std::vector< double > &FinalStateMasses_, const std::vector< ComPWA::pid > &FinalStatePIDs_)
UniformRealNumberGenerator * NumberGenerator
ComPWA::EventCollection generate(unsigned int NumberOfEvents, UniformRealNumberGenerator &RandomGenerator) const final
Data structure containing all kinematic information of a physics event.
ComPWA::FourMomentum CMSP4
std::unique_ptr< ComPWA::Data::EvtGen::EvtGenStdRandomEngine > RandomEngine