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)
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()
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
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()
Geom::Phi< T > phi() const
bool generatePartonsAndHadronize() override
Py8PtGun(edm::ParameterSet const &)
HepMC::Pythia8ToHepMC toHepMC
tuple size
Write out results.