1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtGen/EvtPDL.hh
13 // Description:Class to keep track of particle properties.
15 // Modification history:
17 // DJL/RYD September 25, 1996 Module created
19 //------------------------------------------------------------------------
24 #include "EvtGenBase/EvtPartProp.hh"
25 #include "EvtGenBase/EvtId.hh"
26 #include "EvtGenBase/EvtSpinType.hh"
27 #include "EvtGenBase/EvtStringHash.hh"
31 const int SPIN_NAME_LENGTH = 100;
41 void read(const char* fname);
42 void readPDT(const std::string fname);
45 static double getMeanMass(EvtId i );
46 static double getMass(EvtId i );
47 static double getRandMass(EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId,double maxMass, double *dauMasses );
48 static double getMassProb(EvtId i, double mass, double massPar, int nDaug, double *massDau);
50 static double getMaxMass(EvtId i );
51 static double getMinMass(EvtId i );
52 //the number we got from PDT
53 static double getMaxRange(EvtId i );
54 static double getWidth(EvtId i );
55 static double getctau(EvtId i );
56 static int getStdHep(EvtId id );
57 static int getLundKC(EvtId id );
59 // Function to retrieve EvtId from PythiaID
60 static EvtId evtIdFromLundKC(int pythiaId );
61 static EvtId evtIdFromStdHep(int stdhep );
62 static EvtId chargeConj(EvtId id );
63 static int chg3(EvtId i );
64 static EvtSpinType::spintype getSpinType(EvtId i );
65 static EvtId getId(const std::string& name );
66 static std::string name(EvtId i);
67 static void alias(EvtId num,const std::string& newname);
68 static void aliasChgConj(EvtId a,EvtId abar);
69 static size_t entries();
70 static EvtId getEntry(int i);
71 static void reSetMass(EvtId i, double mass);
72 static void reSetWidth(EvtId i, double width);
73 static void reSetMassMin(EvtId i, double mass);
74 static void reSetMassMax(EvtId i,double mass);
75 static void reSetBlatt(EvtId i,double blatt);
76 static void includeBirthFactor(EvtId i,bool yesno);
77 static void includeDecayFactor(EvtId i,bool yesno);
78 static void changeLS(EvtId i, std::string &newLS );
79 static void setPWForDecay(EvtId i, int spin, EvtId d1, EvtId d2);
80 static void setPWForBirthL(EvtId i, int spin, EvtId par, EvtId othD);
81 static void fixLSForSP8(EvtId i) { partlist()[i.getId()].fixLSForSP8();}
84 void setUpConstsPdt();
86 static unsigned int _firstAlias;
89 static std::vector<EvtPartProp>& partlist() {
90 static std::vector<EvtPartProp> s_partlist;
94 static std::map<std::string, int> _particleNameLookup;