49 HepMC::GenVertex* Vtx =
new HepMC::GenVertex( HepMC::FourVector(0.,0.,0.) );
53 fEvt =
new HepMC::GenEvent() ;
61 int py6PID = HepPID::translatePDTtoPythia( particleID );
64 double pt=0, y=0, u=0, ee=0, the=0;
75 pyjets.p[4][ip-1]=mass;
77 ee = 0.5*
std::sqrt(mass*mass+pt*pt)*(u*u+1)/u;
79 double pz =
std::sqrt(ee*ee-pt*pt-mass*mass);
80 if ( y < 0. ) pz *= -1;
85 if ( pz < 0. ) the +=
M_PI ;
87 py1ent_(ip, py6PID, ee, the, phi);
93 double px = pyjets.p[0][ip-1];
94 double py = pyjets.p[1][ip-1];
95 pz = pyjets.p[2][ip-1];
97 HepMC::FourVector
p(px,py,pz,ee) ;
100 Part->suggest_barcode( ip ) ;
101 Vtx->add_particle_out(Part);
107 fEvt->add_vertex(Vtx);
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
double firePt(CLHEP::HepRandomEngine *)
double fireY(CLHEP::HepRandomEngine *)
PtYDistributor * fPtYGenerator
virtual ~Pythia6PtYDistGun()
std::vector< int > fPartIDs
void generateEvent(CLHEP::HepRandomEngine *)
Geom::Phi< T > phi() const
void py1ent_(int &ip, int &kf, double &pe, double &the, double &phi)
Pythia6Service * fPy6Service