//-------------------------------------------------------------------------- // // Environment: // This software is part of the EvtGen package developed jointly // for the BaBar and CLEO collaborations. If you use all or part // of it, please give an appropriate acknowledgement. // // Copyright Information: See EvtGen/COPYRIGHT // Copyright (C) 1998 Caltech, UCSB // // Module: EvtPycont.cc // // Description: Routine to generate e+e- --> q\barq via Jetset // // Modification history: // // PCK August 4, 1997 Module created // RS October 28, 2002 copied from EvtJscont.cc // //------------------------------------------------------------------------ // #include "EvtGenBase/EvtPatches.hh" #include #include "EvtGenBase/EvtParticle.hh" #include "EvtGenBase/EvtDecayTable.hh" #include "EvtGenBase/EvtPDL.hh" #include "EvtGenModels/EvtPycont.hh" #include "EvtGenModels/EvtPythia.hh" #include "EvtGenBase/EvtId.hh" #include "EvtGenBase/EvtReport.hh" #include #include using std::endl; extern "C" { extern void pystat_(int &); extern struct { int dc[18]; } decaych_; } EvtPycont::~EvtPycont() { // int i=1; // pystat_(i); } std::string EvtPycont::getName() { return "PYCONT"; } EvtDecayBase* EvtPycont::clone() { return new EvtPycont; } void EvtPycont::init() { // check that there are 1 argument if ( getNArg() != 12 && getNArg() != 0 ) { report(ERROR,"EvtGen") << "EvtPYCONT expects " << " 12 arguments (d u s c b t e nu_e mu nu_mu tau nu_tau) but found: " << getNArg() <mass(); int i,more; int ndaugjs; int kf[100]; EvtId id[100]; int type[MAX_DAUG]; double px[100],py[100],pz[100],e[100]; if ( p->getNDaug() != 0 ) { return;} do{ EvtPythia::pythiacont(&energy,&ndaugjs,kf,px,py,pz,e); for(i=0;i=e[i]*e[i]) e[i]=sqrt(px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i])+0.0000000000001; p4[i].set(e[i],px[i],py[i],pz[i]); } int channel=EvtDecayTable::inChannelList(p->getId(),ndaugjs,id); more=((channel!=-1)&&(channel!=p->getChannel())); }while(more); p->makeDaughters(ndaugjs,id); for(i=0;igetDaug(i)->init( id[i], p4[i] ); return ; }