BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPDL.hh
Go to the documentation of this file.
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
25#include "EvtGenBase/EvtId.hh"
28#include <vector>
29#include <map>
30
31const int SPIN_NAME_LENGTH = 100;
32
33class EvtPDL {
34
35public:
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 ){ return partlist()[i.getId()].getMass(); }
46 static double getMass(EvtId i ){return partlist()[i.getId()].rollMass();}
47 static double getRandMass(EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId,double maxMass, double *dauMasses ){return partlist()[i.getId()].getRandMass(parId,nDaug,dauId,othDaugId,maxMass,dauMasses);}
48 static double getMassProb(EvtId i, double mass, double massPar, int nDaug, double *massDau) { return partlist()[i.getId()].getMassProb(mass,massPar,nDaug,massDau);}
49
50 static double getMaxMass(EvtId i ){return partlist()[i.getId()].getMassMax();}
51 static double getMinMass(EvtId i ){return partlist()[i.getId()].getMassMin();}
52 //the number we got from PDT
53 static double getMaxRange(EvtId i ){return partlist()[i.getId()].getMaxRange();}
54 static double getWidth(EvtId i ){return partlist()[i.getId()].getWidth();}
55 static double getctau(EvtId i ){return partlist()[i.getId()].getctau();}
56 static int getStdHep(EvtId id ){return partlist()[id.getId()].getStdHep();}
57 static int getLundKC(EvtId id ){return partlist()[id.getId()].getLundKC();}
58 static EvtId evtIdFromStdHep(int stdhep );
59 static EvtId chargeConj(EvtId id );
60 static int chg3(EvtId i ){return partlist()[i.getId()].getChg3();}
62 {return partlist()[i.getId()].getSpinType();}
63 static EvtId getId(const std::string& name );
64 static std::string name(EvtId i){return partlist()[i.getAlias()].getName();}
65 static void alias(EvtId num,const std::string& newname);
66 static void aliasChgConj(EvtId a,EvtId abar);
67 static int entries() { return partlist().size();}
68 static void reSetMass(EvtId i, double mass) { partlist()[i.getId()].reSetMass( mass);}
69 static void reSetWidth(EvtId i, double width) { partlist()[i.getId()].reSetWidth(width);}
70 static void reSetMassMin(EvtId i, double mass) { partlist()[i.getId()].reSetMassMin(mass);}
71 static void reSetMassMax(EvtId i,double mass) { partlist()[i.getId()].reSetMassMax(mass);}
72 static void reSetBlatt(EvtId i,double blatt) {partlist()[i.getId()].reSetBlatt(blatt);}
73 static void includeBirthFactor(EvtId i,bool yesno) {partlist()[i.getId()].includeBirthFactor(yesno);}
74 static void includeDecayFactor(EvtId i,bool yesno) {partlist()[i.getId()].includeDecayFactor(yesno);}
75 static void addFactorPn(EvtId i,double factor) {partlist()[i.getId()].addFactorPn(factor);}
76 static void changeLS(EvtId i, std::string &newLS ) { partlist()[i.getId()].newLineShape(newLS);}
77 static void setPWForDecay(EvtId i, int spin, EvtId d1, EvtId d2) { partlist()[i.getId()].setPWForDecay(spin,d1,d2);}
78 static void setPWForBirthL(EvtId i, int spin, EvtId par, EvtId othD);
79 static void fixLSForSP8(EvtId i) { partlist()[i.getId()].fixLSForSP8();}
80private:
81
82 void setUpConstsPdt();
83
84 static int _firstAlias;
85 static int _nentries;
86
87 static std::vector<EvtPartProp>& partlist() {
88 static std::vector<EvtPartProp> s_partlist;
89 return s_partlist;
90 }
91
92 static std::map<std::string, int> _particleNameLookup;
93
94}; // EvtPDL.h
95
96#endif
97
98
double mass
const int SPIN_NAME_LENGTH
Definition: EvtPDL.hh:31
Definition: EvtId.hh:27
int getAlias() const
Definition: EvtId.hh:43
int getId() const
Definition: EvtId.hh:41
Definition: EvtPDL.hh:33
static double getWidth(EvtId i)
Definition: EvtPDL.hh:54
static int getStdHep(EvtId id)
Definition: EvtPDL.hh:56
static void reSetBlatt(EvtId i, double blatt)
Definition: EvtPDL.hh:72
static double getRandMass(EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
Definition: EvtPDL.hh:47
void read(const char *fname)
Definition: EvtPDL.cc:58
static void addFactorPn(EvtId i, double factor)
Definition: EvtPDL.hh:75
static void fixLSForSP8(EvtId i)
Definition: EvtPDL.hh:79
static void changeLS(EvtId i, std::string &newLS)
Definition: EvtPDL.hh:76
static double getMeanMass(EvtId i)
Definition: EvtPDL.hh:45
static void reSetWidth(EvtId i, double width)
Definition: EvtPDL.hh:69
void readPDT(const std::string fname)
Definition: EvtPDL.cc:63
static void setPWForBirthL(EvtId i, int spin, EvtId par, EvtId othD)
static int entries()
Definition: EvtPDL.hh:67
static void reSetMass(EvtId i, double mass)
Definition: EvtPDL.hh:68
static EvtId evtIdFromStdHep(int stdhep)
Definition: EvtPDL.cc:244
static void alias(EvtId num, const std::string &newname)
Definition: EvtPDL.cc:259
static void includeDecayFactor(EvtId i, bool yesno)
Definition: EvtPDL.hh:74
static void reSetMassMax(EvtId i, double mass)
Definition: EvtPDL.hh:71
static double getMaxRange(EvtId i)
Definition: EvtPDL.hh:53
static std::string name(EvtId i)
Definition: EvtPDL.hh:64
static EvtId chargeConj(EvtId id)
Definition: EvtPDL.cc:208
static double getMassProb(EvtId i, double mass, double massPar, int nDaug, double *massDau)
Definition: EvtPDL.hh:48
static double getMinMass(EvtId i)
Definition: EvtPDL.hh:51
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
static void setPWForDecay(EvtId i, int spin, EvtId d1, EvtId d2)
Definition: EvtPDL.hh:77
static int chg3(EvtId i)
Definition: EvtPDL.hh:60
static int getLundKC(EvtId id)
Definition: EvtPDL.hh:57
EvtPDL()
Definition: EvtPDL.cc:43
static void aliasChgConj(EvtId a, EvtId abar)
Definition: EvtPDL.cc:191
static void includeBirthFactor(EvtId i, bool yesno)
Definition: EvtPDL.hh:73
static double getMaxMass(EvtId i)
Definition: EvtPDL.hh:50
static double getMass(EvtId i)
Definition: EvtPDL.hh:46
static EvtId getId(const std::string &name)
Definition: EvtPDL.cc:287
~EvtPDL()
Definition: EvtPDL.cc:54
static double getctau(EvtId i)
Definition: EvtPDL.hh:55
static void reSetMassMin(EvtId i, double mass)
Definition: EvtPDL.hh:70