50 <<
" pythia did not accept MSTU(12)=12345";
53 produces<HepMCProduct>();
86 call_pyinit(
"NONE",
"",
"", 0.0);
88 std::cout <<
" FYI: MSTU(10)=1 is ENFORCED in Py6-PGuns, for technical reasons"
106 for (
int iprt=
fPartIDs.size(); iprt<pyjets.n; iprt++ )
108 int parent = pyjets.k[2][iprt];
114 parentPart->set_status( 2 );
116 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex(HepMC::FourVector(pyjets.v[0][iprt],
120 DecVtx->add_particle_in( parentPart );
124 HepMC::FourVector pmom(pyjets.p[0][iprt],pyjets.p[1][iprt],
125 pyjets.p[2][iprt],pyjets.p[3][iprt] );
128 if ( pyjets.k[0][iprt] >= 1 && pyjets.k[0][iprt] <= 10 )
132 else if ( pyjets.k[0][iprt] >= 11 && pyjets.k[0][iprt] <= 20 )
136 else if ( pyjets.k[0][iprt] >= 21 && pyjets.k[0][iprt] <= 30 )
140 else if ( pyjets.k[0][iprt] >= 31 && pyjets.k[0][iprt] <= 100 )
142 dstatus = pyjets.k[0][iprt];
146 HepPID::translatePythiatoPDT( pyjets.k[1][iprt] ),
148 daughter->suggest_barcode( iprt+1 );
149 DecVtx->add_particle_out( daughter );
153 for ( iprt1=iprt+1; iprt1<pyjets.n; iprt1++ )
155 if ( pyjets.k[2][iprt1] != parent )
break;
157 HepMC::FourVector pmomN(pyjets.p[0][iprt1],pyjets.p[1][iprt1],
158 pyjets.p[2][iprt1],pyjets.p[3][iprt1] );
161 if ( pyjets.k[0][iprt1] >= 1 && pyjets.k[0][iprt1] <= 10 )
165 else if ( pyjets.k[0][iprt1] >= 11 && pyjets.k[0][iprt1] <= 20 )
169 else if ( pyjets.k[0][iprt1] >= 21 && pyjets.k[0][iprt1] <= 30 )
173 else if ( pyjets.k[0][iprt1] >= 31 && pyjets.k[0][iprt1] <= 100 )
175 dstatus = pyjets.k[0][iprt1];
179 HepPID::translatePythiatoPDT( pyjets.k[1][iprt1] ),
181 daughterN->suggest_barcode( iprt1+1 );
182 DecVtx->add_particle_out( daughterN );
188 fEvt->add_vertex( DecVtx );
202 fEvt->set_beam_particles(0,0);
227 std::auto_ptr<HepMCProduct> bare_product(
new HepMCProduct());
229 if(
fEvt) bare_product->addHepMCData(
fEvt );
231 evt.
put(bare_product);
239 double& ee,
double&
eta,
double&
phi )
242 if ( ip < 2 )
return 0;
245 int py6PID = HepPID::translatePDTtoPythia( particleID );
247 int pythiaCode =
pycomp_(py6PID);
249 int has_antipart = pydat2.kchg[3-1][pythiaCode-1];
250 int particleID2 = has_antipart ? -1 * particleID : particleID;
251 int py6PID2 = has_antipart ? -1 * py6PID : py6PID;
252 double the = 2.*atan(
exp(eta));
254 if (phi > 2.* M_PI) {phi = phi - 2.*
M_PI;}
257 pyjets.p[4][ip-1] = pyjets.p[4][ip-2];
259 py1ent_(ip, py6PID2, ee, the, phi);
261 double px = pyjets.p[0][ip-1];
262 double py = pyjets.p[1][ip-1];
263 double pz = pyjets.p[2][ip-1];
264 HepMC::FourVector ap(px,py,pz,ee) ;
267 APart->suggest_barcode( ip ) ;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
void endRun(edm::Run const &, edm::EventSetup const &) override
void produce(edm::Event &, const edm::EventSetup &) override
void beginRun(edm::Run const &, edm::EventSetup const &) override
bool call_pygive(const std::string &line)
HepMC::GenParticle * addAntiParticle(int &, int &, double &, double &, double &)
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 py1ent_(int &ip, int &kf, double &pe, double &the, double &phi)
Pythia6Service * fPy6Service
std::vector< int > fPartIDs