50 <<
" pythia did not accept MSTU(12)=12345";
53 produces<HepMCProduct>();
90 call_pyinit(
"NONE",
"",
"", 0.0);
92 std::cout <<
" FYI: MSTU(10)=1 is ENFORCED in Py6-PGuns, for technical reasons"
110 for (
int iprt=
fPartIDs.size(); iprt<pyjets.n; iprt++ )
112 int parent = pyjets.k[2][iprt];
118 parentPart->set_status( 2 );
120 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex(HepMC::FourVector(pyjets.v[0][iprt],
124 DecVtx->add_particle_in( parentPart );
128 HepMC::FourVector pmom(pyjets.p[0][iprt],pyjets.p[1][iprt],
129 pyjets.p[2][iprt],pyjets.p[3][iprt] );
132 if ( pyjets.k[0][iprt] >= 1 && pyjets.k[0][iprt] <= 10 )
136 else if ( pyjets.k[0][iprt] >= 11 && pyjets.k[0][iprt] <= 20 )
140 else if ( pyjets.k[0][iprt] >= 21 && pyjets.k[0][iprt] <= 30 )
144 else if ( pyjets.k[0][iprt] >= 31 && pyjets.k[0][iprt] <= 100 )
146 dstatus = pyjets.k[0][iprt];
150 HepPID::translatePythiatoPDT( pyjets.k[1][iprt] ),
152 daughter->suggest_barcode( iprt+1 );
153 DecVtx->add_particle_out( daughter );
157 for ( iprt1=iprt+1; iprt1<pyjets.n; iprt1++ )
159 if ( pyjets.k[2][iprt1] != parent )
break;
161 HepMC::FourVector pmomN(pyjets.p[0][iprt1],pyjets.p[1][iprt1],
162 pyjets.p[2][iprt1],pyjets.p[3][iprt1] );
165 if ( pyjets.k[0][iprt1] >= 1 && pyjets.k[0][iprt1] <= 10 )
169 else if ( pyjets.k[0][iprt1] >= 11 && pyjets.k[0][iprt1] <= 20 )
173 else if ( pyjets.k[0][iprt1] >= 21 && pyjets.k[0][iprt1] <= 30 )
177 else if ( pyjets.k[0][iprt1] >= 31 && pyjets.k[0][iprt1] <= 100 )
179 dstatus = pyjets.k[0][iprt1];
183 HepPID::translatePythiatoPDT( pyjets.k[1][iprt1] ),
185 daughterN->suggest_barcode( iprt1+1 );
186 DecVtx->add_particle_out( daughterN );
192 fEvt->add_vertex( DecVtx );
206 fEvt->set_beam_particles(0,0);
231 std::auto_ptr<HepMCProduct> bare_product(
new HepMCProduct());
233 if(
fEvt) bare_product->addHepMCData(
fEvt );
235 evt.
put(bare_product);
243 double& ee,
double&
eta,
double&
phi )
246 if ( ip < 2 )
return 0;
249 int py6PID = HepPID::translatePDTtoPythia( particleID );
251 int pythiaCode =
pycomp_(py6PID);
253 int has_antipart = pydat2.kchg[3-1][pythiaCode-1];
254 int particleID2 = has_antipart ? -1 * particleID : particleID;
255 int py6PID2 = has_antipart ? -1 * py6PID : py6PID;
256 double the = 2.*atan(
exp(eta));
258 if (phi > 2.* M_PI) {phi = phi - 2.*
M_PI;}
261 pyjets.p[4][ip-1] = pyjets.p[4][ip-2];
263 py1ent_(ip, py6PID2, ee, the, phi);
265 double px = pyjets.p[0][ip-1];
266 double py = pyjets.p[1][ip-1];
267 double pz = pyjets.p[2][ip-1];
268 HepMC::FourVector ap(px,py,pz,ee) ;
271 APart->suggest_barcode( ip ) ;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
bool call_pygive(const std::string &line)
HepMC::GenParticle * addAntiParticle(int &, int &, double &, double &, double &)
void produce(edm::Event &, const edm::EventSetup &)
virtual void generateEvent()=0
void call_pylist(int mode)
void attachPy6DecaysToGenEvent()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void loadEvent(edm::Event &)
void beginRun(edm::Run &, edm::EventSetup const &)
void py1ent_(int &ip, int &kf, double &pe, double &the, double &phi)
Pythia6Service * fPy6Service
void endRun(edm::Run &, edm::EventSetup const &)
std::vector< int > fPartIDs