56 double the = 2.*atan(
exp(-eta));
62 double pp = pt /
sin(the);
63 double ee =
sqrt( pp*pp + mass*mass );
65 double px = pt *
cos(phi);
66 double py = pt *
sin(phi);
67 double pz = pp *
cos(the);
69 if ( !((
fMasterGen->particleData).isParticle( particleID )) ){
75 (
fMasterGen->event).append( 21, 23, 101, 102, px, py, pz, ee, mass );
91 (
fMasterGen->event).
append( -particleID, 23, 0, 101, -px, -py, -pz, ee, mass );
92 }
else if (
std::abs(particleID) == 21){
95 if ( (
fMasterGen->particleData).isParticle( -particleID ) ) {
110 event().reset(
new HepMC::GenEvent);
edm::GeneratorFilter< gen::Py8PtGun, gen::ExternalDecayDriver > Pythia8PtGun
T getParameter(std::string const &) const
std::auto_ptr< Pythia8::Pythia > fMasterGen
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
std::auto_ptr< HepMC::GenEvent > & event()
const char * classname() const override
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::vector< int > fPartIDs
P8RndmEngine & randomEngine()
bool generatePartonsAndHadronize() override
Py8PtGun(edm::ParameterSet const &)
HepMC::Pythia8ToHepMC toHepMC