59 double the = 2.*atan(
exp(-eta));
63 double mass = (
fMasterGen->particleData).m0( particleID );
65 double pp = pt /
sin(the);
66 double ee =
sqrt( pp*pp + mass*mass );
68 double px = pt *
cos(phi);
69 double py = pt *
sin(phi);
70 double pz = pp *
cos(the);
72 if ( !((
fMasterGen->particleData).isParticle( particleID )) )
74 particleID = std::fabs(particleID) ;
76 if( 1<= fabs(particleID) && fabs(particleID) <= 6)
78 else if (fabs(particleID) == 21)
79 (
fMasterGen->event).append( 21, 23, 101, 102, px, py, pz, ee, mass );
89 if( 1 <= fabs(particleID) && fabs(particleID) <= 6){
90 (
fMasterGen->event).
append( -particleID, 23, 0, 101, -px, -py, -pz, ee, mass );
92 else if (fabs(particleID) == 21){
95 else 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)
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
Sin< T >::type sin(const T &t)
virtual double flat() override
std::auto_ptr< HepMC::GenEvent > & event()
const char * classname() const override
Cos< T >::type cos(const T &t)
std::vector< int > fPartIDs
P8RndmEngine & randomEngine()
Geom::Phi< T > phi() const
bool generatePartonsAndHadronize() override
Py8PtGun(edm::ParameterSet const &)
HepMC::Pythia8ToHepMC toHepMC