73 double mass = (
fMasterGen->particleData).m0( particleID );
75 pp =
sqrt( ee*ee - mass*mass );
77 double px = pp *
sin(the) *
cos(phi);
78 double py = pp *
sin(the) *
sin(phi);
79 double pz = pp *
cos(the);
81 if ( !((
fMasterGen->particleData).isParticle( particleID )) )
83 particleID = std::fabs(particleID) ;
96 totM =
sqrt( totE*totE - (totPx*totPx+totPy*totPy+totPz*totPz) );
101 ee =
sqrt( totM*totM + pp*pp );
107 the = 2.*atan(
exp(-eta));
111 double betaZ = pp/ee *
std::cos(the);
115 (
fMasterGen->event).bst( betaX, betaY, betaZ );
119 event().reset(
new HepMC::GenEvent);
T getParameter(std::string const &) const
std::auto_ptr< Pythia8::Pythia > fMasterGen
const char * classname() const override
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
virtual double flat() override
std::auto_ptr< HepMC::GenEvent > & event()
Py8JetGun(edm::ParameterSet const &)
Cos< T >::type cos(const T &t)
std::vector< int > fPartIDs
P8RndmEngine & randomEngine()
edm::GeneratorFilter< gen::Py8JetGun, gen::ExternalDecayDriver > Pythia8JetGun
HepMC::Pythia8ToHepMC toHepMC
bool generatePartonsAndHadronize() override