Line data Source code
1 : //--------------------------------------------------------------------------
2 : //
3 : // Environment:
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.
7 : //
8 : // Copyright Information: See EvtGen/COPYRIGHT
9 : // Copyright (C) 1998 Caltech, UCSB
10 : //
11 : // Module: EvtGen/EvtPDL.hh
12 : //
13 : // Description:Class to keep track of particle properties.
14 : //
15 : // Modification history:
16 : //
17 : // DJL/RYD September 25, 1996 Module created
18 : //
19 : //------------------------------------------------------------------------
20 :
21 : #ifndef EVTPDL_HH
22 : #define EVTPDL_HH
23 :
24 : #include "EvtGenBase/EvtPartProp.hh"
25 : #include "EvtGenBase/EvtId.hh"
26 : #include "EvtGenBase/EvtSpinType.hh"
27 : #include "EvtGenBase/EvtStringHash.hh"
28 : #include <vector>
29 : #include <map>
30 :
31 : const int SPIN_NAME_LENGTH = 100;
32 :
33 : class EvtPDL {
34 :
35 : public:
36 :
37 : EvtPDL();
38 :
39 : ~EvtPDL();
40 :
41 : void read(const char* fname);
42 : void readPDT(const std::string fname);
43 :
44 :
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);
49 :
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 );
58 :
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 reSetBlattBirth(EvtId i,double blatt);
77 : static void includeBirthFactor(EvtId i,bool yesno);
78 : static void includeDecayFactor(EvtId i,bool yesno);
79 : static void changeLS(EvtId i, std::string &newLS );
80 : static void setPWForDecay(EvtId i, int spin, EvtId d1, EvtId d2);
81 : static void setPWForBirthL(EvtId i, int spin, EvtId par, EvtId othD);
82 : private:
83 :
84 : void setUpConstsPdt();
85 :
86 : static unsigned int _firstAlias;
87 : static int _nentries;
88 :
89 : static std::vector<EvtPartProp>& partlist() {
90 0 : static std::vector<EvtPartProp> s_partlist;
91 0 : return s_partlist;
92 : }
93 :
94 : static std::map<std::string, int> _particleNameLookup;
95 :
96 : }; // EvtPDL.h
97 :
98 : #endif
99 :
100 :
|