50 <<
" pythia did not accept MSTU(12)=12345";
53 produces<HepMCProduct>(
"unsmeared");
76 std::cout <<
" FYI: MSTU(10)=1 is ENFORCED in Py6-PGuns, for technical reasons"
95 call_pyinit(
"NONE",
"",
"", 0.0);
111 for (
int iprt=
fPartIDs.size(); iprt<pyjets.n; iprt++ )
113 int parent = pyjets.k[2][iprt];
119 parentPart->set_status( 2 );
121 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex(HepMC::FourVector(pyjets.v[0][iprt],
125 DecVtx->add_particle_in( parentPart );
129 HepMC::FourVector pmom(pyjets.p[0][iprt],pyjets.p[1][iprt],
130 pyjets.p[2][iprt],pyjets.p[3][iprt] );
133 if ( pyjets.k[0][iprt] >= 1 && pyjets.k[0][iprt] <= 10 )
137 else if ( pyjets.k[0][iprt] >= 11 && pyjets.k[0][iprt] <= 20 )
141 else if ( pyjets.k[0][iprt] >= 21 && pyjets.k[0][iprt] <= 30 )
145 else if ( pyjets.k[0][iprt] >= 31 && pyjets.k[0][iprt] <= 100 )
147 dstatus = pyjets.k[0][iprt];
151 HepPID::translatePythiatoPDT( pyjets.k[1][iprt] ),
153 daughter->suggest_barcode( iprt+1 );
154 DecVtx->add_particle_out( daughter );
158 for ( iprt1=iprt+1; iprt1<pyjets.n; iprt1++ )
160 if ( pyjets.k[2][iprt1] != parent )
break;
162 HepMC::FourVector pmomN(pyjets.p[0][iprt1],pyjets.p[1][iprt1],
163 pyjets.p[2][iprt1],pyjets.p[3][iprt1] );
166 if ( pyjets.k[0][iprt1] >= 1 && pyjets.k[0][iprt1] <= 10 )
170 else if ( pyjets.k[0][iprt1] >= 11 && pyjets.k[0][iprt1] <= 20 )
174 else if ( pyjets.k[0][iprt1] >= 21 && pyjets.k[0][iprt1] <= 30 )
178 else if ( pyjets.k[0][iprt1] >= 31 && pyjets.k[0][iprt1] <= 100 )
180 dstatus = pyjets.k[0][iprt1];
184 HepPID::translatePythiatoPDT( pyjets.k[1][iprt1] ),
186 daughterN->suggest_barcode( iprt1+1 );
187 DecVtx->add_particle_out( daughterN );
193 fEvt->add_vertex( DecVtx );
208 fEvt->set_beam_particles(0,0);
233 std::auto_ptr<HepMCProduct> bare_product(
new HepMCProduct());
235 if(
fEvt) bare_product->addHepMCData(
fEvt );
237 evt.
put(bare_product,
"unsmeared");
245 double& ee,
double&
eta,
double& phi )
248 if ( ip < 2 )
return 0;
251 int py6PID = HepPID::translatePDTtoPythia( particleID );
253 int pythiaCode =
pycomp_(py6PID);
255 int has_antipart = pydat2.kchg[3-1][pythiaCode-1];
256 int particleID2 = has_antipart ? -1 * particleID : particleID;
257 int py6PID2 = has_antipart ? -1 * py6PID : py6PID;
258 double the = 2.*atan(
exp(eta));
260 if (phi > 2.* M_PI) {phi = phi - 2.*
M_PI;}
263 pyjets.p[4][ip-1] = pyjets.p[4][ip-2];
265 py1ent_(ip, py6PID2, ee, the, phi);
267 double px = pyjets.p[0][ip-1];
268 double py = pyjets.p[1][ip-1];
269 double pz = pyjets.p[2][ip-1];
270 HepMC::FourVector ap(px,py,pz,ee) ;
273 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
CLHEP::HepRandomEngine * randomEngine() const
LuminosityBlockIndex index() const
void produce(edm::Event &, const edm::EventSetup &) override
void beginRun(edm::Run const &, edm::EventSetup const &) override
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
bool call_pygive(const std::string &line)
HepMC::GenParticle * addAntiParticle(int &, int &, double &, double &, double &)
virtual void generateEvent(CLHEP::HepRandomEngine *)=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
StreamID streamID() const
volatile std::atomic< bool > shutdown_flag false
std::vector< int > fPartIDs