38 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(0., 0., 0.));
50 double phi,
eta, the, ee,
pp;
54 int py6PID = HepPID::translatePDTtoPythia(
particleID);
59 the = std::acos(-1. + 2. *
pyr_(&dum));
69 pyjets.p[4][ip - 1] =
mass;
73 py1ent_(ip, py6PID, ee, the, phi);
77 totPx += pyjets.p[0][ip - 1];
78 totPy += pyjets.p[1][ip - 1];
79 totPz += pyjets.p[2][ip - 1];
80 totE += pyjets.p[3][ip - 1];
88 totM =
std::sqrt(totE * totE - (totPx * totPx + totPy * totPy + totPz * totPz));
99 the = 2. * atan(
exp(-
eta));
110 double rothe = 0, rophi = 0.;
117 for (
int i = 0;
i < pyjets.n;
i++) {
118 HepMC::FourVector
p(pyjets.p[0][
i], pyjets.p[1][
i], pyjets.p[2][
i], pyjets.p[3][
i]);
120 Part->suggest_barcode(
i + 1);
121 Vtx->add_particle_out(Part);
123 fEvt->add_vertex(Vtx);
T getParameter(std::string const &) const
Sin< T >::type sin(const T &t)
void generateEvent(CLHEP::HepRandomEngine *) override
Cos< T >::type cos(const T &t)
#define DEFINE_FWK_MODULE(type)
std::vector< int > fPartIDs
void py1ent_(int &ip, int &kf, double &pe, double &the, double &phi)
Pythia6Service * fPy6Service
~Pythia6JetGun() override
void pyrobo_(int &, int &, double &, double &, double &, double &, double &)