BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/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
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
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
static void reSetBlatt(EvtId i, double blatt)
static double getRandMass(EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
static void addFactorPn(EvtId i, double factor)
static void changeLS(EvtId i, std::string &newLS)
static void reSetWidth(EvtId i, double width)
void readPDT(const std::string fname)
static void setPWForBirthL(EvtId i, int spin, EvtId par, EvtId othD)
static void reSetMass(EvtId i, double mass)
static void alias(EvtId num, const std::string &newname)
static void includeDecayFactor(EvtId i, bool yesno)
static void reSetMassMax(EvtId i, double mass)
static double getMassProb(EvtId i, double mass, double massPar, int nDaug, double *massDau)
static EvtSpinType::spintype getSpinType(EvtId i)
static void setPWForDecay(EvtId i, int spin, EvtId d1, EvtId d2)
static void aliasChgConj(EvtId a, EvtId abar)
static void includeBirthFactor(EvtId i, bool yesno)
static EvtId getId(const std::string &name)
static void reSetMassMin(EvtId i, double mass)