42#include "CLHEP/Vector/LorentzVector.h"
54 int *,
int *,
int *,
int *,
int *,
55 double *,
double *,
double *,
56 double *,
double *,
double *,
57 double *,
double *,
double *);
60extern void evtgen_(
float svertex[3],
float *e_cms,
float *beta_zs,
71 if (getenv(
"EVTINFO")){
78 const char*
const pdtTableName,
83 report(
INFO,
"EvtGen") <<
"Initializing EvtGen"<<endl;
85 report(
INFO,
"EvtGen") <<
"Storing known decay models"<<endl;
88 report(
INFO,
"EvtGen") <<
"Main decay file name :"<<decayName<<endl;
89 report(
INFO,
"EvtGen") <<
"PDT table file name :"<<pdtTableName<<endl;
91 report(
INFO,
"EvtGen") <<
"Initializing RadCorr=PHOTOS"<<endl;
95 report(
INFO,
"EvtGen") <<
"No RadCorr engine given in "
96 <<
"EvtGen::EvtGen constructor, "
97 <<
"will use default EvtPHOTOS."<<endl;
110 if (randomEngine==0){
113 report(
INFO,
"EvtGen") <<
"No random engine given in "
114 <<
"EvtGen::EvtGen constructor, "
115 <<
"will use default EvtRandomEngine."<<endl;
121 report(
INFO,
"EvtGen") <<
"Done initializing EvtGen"<<endl;
130 if ( uDecayName[0] == 0) {
131 report(
INFO,
"EvtGen") <<
"Is not reading a user decay file!"<<endl;
134 indec.open(uDecayName);
138 report(
INFO,
"EvtGen") <<
"Reading "<<uDecayName
139 <<
" to override decay table."<<endl;
143 report(
INFO,
"EvtGen") <<
"Can not find UDECAY file '"
144 <<uDecayName<<
"'. Stopping"<<endl;
208 report(
ERROR,
"EvtGen") <<
"Your event has been rejected 10000 times!"<<endl;
227 p_init.
set(
P.t(),
P.x(),
P.y(),
P.z());
259 EvtId list_of_stable[10];
263 list_of_stable[0]=
EvtId(-1,-1);
275 for(i=0;i<evtstdhep.
getNPart();i++){
288 p4=evtstdhep.
getP4(i);
289 x4=evtstdhep.
getX4(i);
303 &partnum,&jmotherfirst,&jmotherlast,
304 &jdaugfirst,&jdauglast,
double P(RecMdcKalTrack *trk)
void begevtgenstore_(int *, int *, int *, int *, int *, int *, int *, int *, int *, double *, double *, double *, double *, double *, double *, double *, double *, double *)
void evtgen_(float svertex[3], float *e_cms, float *beta_zs, int *mode)
ostream & report(Severity severity, const char *facility)
static void readDecayFile(const std::string dec_name)
static void printSummary()
void readUDecay(const char *const udecay_name)
void generateDecay(int stdhepid, EvtVector4R P, EvtVector4R D, EvtStdHep *evtStdHep, EvtSpinDensity *spinDensity=0)
void generateEvent(int stdhepid, HepLorentzVector P, HepLorentzVector D)
EvtGen(const char *const decayName, const char *const pdtTableName, EvtRandomEngine *randomEngine=0, EvtAbsRadCorr *isrEngine=0)
void readPDT(const std::string fname)
static EvtId evtIdFromStdHep(int stdhep)
static EvtParticle * particleFactory(EvtSpinType::spintype spinType)
void setVectorSpinDensity()
EvtParticle * getDaug(int i)
void makeStdHep(EvtStdHep &stdhep, EvtSecondary &secondary, EvtId *stable_parent_ihep)
static void setRadCorrEngine(EvtAbsRadCorr *isrEngine)
static void setRandomEngine(EvtRandomEngine *randomEngine)
static void initRejectFlag()
static int getRejectFlag()
void translate(EvtVector4R d)
int getFirstMother(int i)
int getLastDaughter(int i)
int getFirstDaughter(int i)
void set(int i, double d)
void init(EvtId part_n, double e, double px, double py, double pz)