19 :
Pythia6ParticleGun(pset), fMinEta(0.), fMaxEta(0.), fMinE(0.), fMaxE(0.), fMinP(0.), fMaxP(0.) {
39 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(0., 0., 0.));
51 double phi,
eta, the, ee,
pp;
55 int py6PID = HepPID::translatePDTtoPythia(particleID);
60 the = std::acos(-1. + 2. *
pyr_(&dum));
70 pyjets.p[4][ip - 1] =
mass;
74 py1ent_(ip, py6PID, ee, the, phi);
78 totPx += pyjets.p[0][ip - 1];
79 totPy += pyjets.p[1][ip - 1];
80 totPz += pyjets.p[2][ip - 1];
81 totE += pyjets.p[3][ip - 1];
89 totM =
std::sqrt(totE * totE - (totPx * totPx + totPy * totPy + totPz * totPz));
100 the = 2. * atan(
exp(-eta));
104 double betaZ = pp / ee *
std::cos(the);
111 double rothe = 0, rophi = 0.;
113 pyrobo_(first,
last, rothe, rophi, betaX, betaY, betaZ);
118 for (
int i = 0;
i < pyjets.n;
i++) {
119 HepMC::FourVector
p(pyjets.p[0][
i], pyjets.p[1][
i], pyjets.p[2][
i], pyjets.p[3][
i]);
121 Part->suggest_barcode(
i + 1);
122 Vtx->add_particle_out(Part);
124 fEvt->add_vertex(Vtx);
T getParameter(std::string const &) const
Sin< T >::type sin(const T &t)
void generateEvent(CLHEP::HepRandomEngine *) override
#define DEFINE_FWK_MODULE(type)
Cos< T >::type cos(const T &t)
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 &)