52 HepMC::GenVertex* Vtx =
new HepMC::GenVertex( HepMC::FourVector(0.,0.,0.) );
56 fEvt =
new HepMC::GenEvent() ;
64 int py6PID = HepPID::translatePDTtoPythia( particleID );
67 double pt=0,
y=0, u=0, ee=0, the=0;
78 pyjets.p[4][ip-1]=mass;
80 ee = 0.5*
std::sqrt(mass*mass+pt*pt)*(u*u+1)/u;
82 double pz =
std::sqrt(ee*ee-pt*pt-mass*mass);
83 if (
y < 0. ) pz *= -1;
88 if ( pz < 0. ) the +=
M_PI ;
90 py1ent_(ip, py6PID, ee, the, phi);
96 double px = pyjets.p[0][ip-1];
97 double py = pyjets.p[1][ip-1];
98 pz = pyjets.p[2][ip-1];
100 HepMC::FourVector
p(px,py,pz,ee) ;
103 Part->suggest_barcode( ip ) ;
104 Vtx->add_particle_out(Part);
110 fEvt->add_vertex(Vtx);
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
CLHEP::HepRandomEngine & getEngineReference()
PtYDistributor * fPtYGenerator
virtual ~Pythia6PtYDistGun()
std::vector< int > fPartIDs
void py1ent_(int &ip, int &kf, double &pe, double &the, double &phi)
Pythia6Service * fPy6Service