CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPDL Class Reference

#include <EvtPDL.hh>

Public Member Functions

 EvtPDL ()
 
 ~EvtPDL ()
 
void read (const char *fname)
 
void readPDT (const std::string fname)
 

Static Public Member Functions

static double getMeanMass (EvtId i)
 
static double getMass (EvtId i)
 
static double getRandMass (EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
 
static double getMassProb (EvtId i, double mass, double massPar, int nDaug, double *massDau)
 
static double getMaxMass (EvtId i)
 
static double getMinMass (EvtId i)
 
static double getMaxRange (EvtId i)
 
static double getWidth (EvtId i)
 
static double getctau (EvtId i)
 
static int getStdHep (EvtId id)
 
static int getLundKC (EvtId id)
 
static EvtId evtIdFromStdHep (int stdhep)
 
static EvtId chargeConj (EvtId id)
 
static int chg3 (EvtId i)
 
static EvtSpinType::spintype getSpinType (EvtId i)
 
static EvtId getId (const std::string &name)
 
static std::string name (EvtId i)
 
static void alias (EvtId num, const std::string &newname)
 
static void aliasChgConj (EvtId a, EvtId abar)
 
static int entries ()
 
static void reSetMass (EvtId i, double mass)
 
static void reSetWidth (EvtId i, double width)
 
static void reSetMassMin (EvtId i, double mass)
 
static void reSetMassMax (EvtId i, double mass)
 
static void reSetBlatt (EvtId i, double blatt)
 
static void includeBirthFactor (EvtId i, bool yesno)
 
static void includeDecayFactor (EvtId i, bool yesno)
 
static void addFactorPn (EvtId i, double factor)
 
static void changeLS (EvtId i, std::string &newLS)
 
static void setPWForDecay (EvtId i, int spin, EvtId d1, EvtId d2)
 
static void setPWForBirthL (EvtId i, int spin, EvtId par, EvtId othD)
 
static void fixLSForSP8 (EvtId i)
 

Detailed Description

Definition at line 33 of file EvtPDL.hh.

Constructor & Destructor Documentation

◆ EvtPDL()

EvtPDL::EvtPDL ( )

Definition at line 43 of file EvtPDL.cc.

43 {
44
45 if (first!=0) {
46 first=0;
47 _nentries=0;
48 _firstAlias=999999;
49 }
50
51}

◆ ~EvtPDL()

EvtPDL::~EvtPDL ( )

Definition at line 54 of file EvtPDL.cc.

54 {
55
56}

Member Function Documentation

◆ addFactorPn()

static void EvtPDL::addFactorPn ( EvtId i,
double factor )
inlinestatic

Definition at line 75 of file EvtPDL.hh.

75{partlist()[i.getId()].addFactorPn(factor);}
int getId() const
Definition EvtId.hh:41

Referenced by EvtDecayTable::readDecayFile().

◆ alias()

void EvtPDL::alias ( EvtId num,
const std::string & newname )
static

Definition at line 259 of file EvtPDL.cc.

259 {
260
261 int i;
262
263 if ( _firstAlias < partlist().size() ) {
264 for(i=_firstAlias;i<partlist().size();i--){
265 if (newname==partlist()[i].getName()){
266 report(WARNING,"EvtGen")<<"Redefining alias:"<<newname.c_str()<<" will be ignored!"<<endl;
267 return;
268 }
269 }
270 }
271 else{
272 _firstAlias=partlist().size();
273 }
274
275 partlist().push_back(partlist()[num.getId()]);
276 int entry=partlist().size()-1;
277 partlist()[entry].setName(newname);
278 assert(_particleNameLookup.find(std::string(newname))==
279 _particleNameLookup.end());
280 _particleNameLookup[std::string(newname)]=entry;
281 partlist()[entry].setId(EvtId(num.getId(),entry));
282 //Lange - Dec7, 2003. Unset the charge conjugate.
283 partlist()[entry].setIdChgConj(EvtId(-1,-1));
284
285}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ WARNING
Definition EvtReport.hh:50
Definition EvtId.hh:27
int num[96]
Definition ranlxd.c:373

Referenced by EvtDecayTable::readDecayFile().

◆ aliasChgConj()

void EvtPDL::aliasChgConj ( EvtId a,
EvtId abar )
static

Definition at line 191 of file EvtPDL.cc.

191 {
192
193 if (EvtPDL::chargeConj(EvtId(a.getId(),a.getId()))!=
194 EvtId(abar.getId(),abar.getId())) {
195
196 report(ERROR,"EvtGen")<<"Can't charge conjugate the two aliases:"
197 <<EvtPDL::name(a).c_str()<<" and "<<EvtPDL::name(abar).c_str()<<endl;
198
199 ::abort();
200
201 }
202
203 partlist()[a.getAlias()].setIdChgConj(abar);
204 partlist()[abar.getAlias()].setIdChgConj(a);
205
206}
@ ERROR
Definition EvtReport.hh:49
int getAlias() const
Definition EvtId.hh:43
static std::string name(EvtId i)
Definition EvtPDL.hh:64
static EvtId chargeConj(EvtId id)
Definition EvtPDL.cc:208

Referenced by EvtDecayTable::readDecayFile().

◆ changeLS()

static void EvtPDL::changeLS ( EvtId i,
std::string & newLS )
inlinestatic

Definition at line 76 of file EvtPDL.hh.

76{ partlist()[i.getId()].newLineShape(newLS);}

Referenced by EvtDecayTable::readDecayFile().

◆ chargeConj()

EvtId EvtPDL::chargeConj ( EvtId id)
static

Definition at line 208 of file EvtPDL.cc.

208 {
209 EvtId idchg=partlist()[id.getAlias()].getIdChgConj();
210
211 if (idchg!=EvtId(-1,-1)) return idchg;
212
213 if (id.getId()!=id.getAlias()){
214 if (chargeConj(EvtId(id.getId(),id.getId()))==EvtId(id.getId(),id.getId())){
215
216 partlist()[id.getAlias()].setIdChgConj(id);
217 return id;
218 }
219 }
220
221 if (id.getAlias()!=id.getId()) {
222
223 report(ERROR,"EvtGen")<<"Trying to charge conjugate alias particle:"
224 <<name(id).c_str()<<" without defining the alias!"<<endl;
225
226 ::abort();
227
228 }
229
230 int i;
231
232 for (i=0;i<partlist().size();i++){
233 if (partlist()[i].getStdHep()==-partlist()[id.getId()].getStdHep()){
234 partlist()[id.getId()].setIdChgConj(partlist()[i].getId());
235 return partlist()[i].getId();
236 }
237 }
238
239 partlist()[id.getId()].setIdChgConj(id);
240 return id;
241
242}
static int getStdHep(EvtId id)
Definition EvtPDL.hh:56
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:287

Referenced by aliasChgConj(), EvtParticleDecay::chargeConj(), chargeConj(), EvtSSDCP::decay(), EvtSVSCPiso::decay(), EvtSSDCP::init(), EvtVSSBMixCPT::init(), and EvtDecayTable::readDecayFile().

◆ chg3()

static int EvtPDL::chg3 ( EvtId i)
inlinestatic

Definition at line 60 of file EvtPDL.hh.

60{return partlist()[i.getId()].getChg3();}

Referenced by EvtbTosllVectorAmp::CalcAmp(), EvtDecayBase::checkQ(), EvtSVSCPiso::decay(), EvtPto3P::dp(), EvtSVSCPiso::initProbMax(), and readPDT().

◆ entries()

static int EvtPDL::entries ( )
inlinestatic

Definition at line 67 of file EvtPDL.hh.

67{ return partlist().size();}

Referenced by EvtDecayTable::printSummary(), and EvtDecayTable::readDecayFile().

◆ evtIdFromStdHep()

EvtId EvtPDL::evtIdFromStdHep ( int stdhep)
static

Definition at line 244 of file EvtPDL.cc.

244 {
245
246 int i;
247
248 for (i=0;i<partlist().size();i++){
249 if (partlist()[i].getStdHep()==stdhep)
250 return partlist()[i].getId();
251 }
252
253 return EvtId(-1,-1);
254
255}

Referenced by EvtJetSet::decay(), EvtJscont::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtPycont::decay(), EvtPyGaGa::decay(), EvtPythia::decay(), EvtTauola::decay(), EvtGen::generateDecay(), EvtGen::generateEvent(), EvtCPUtil::incoherentMix(), EvtConExc::init(), EvtXsection::setBW(), and EvtXsection::Xsection_c().

◆ fixLSForSP8()

static void EvtPDL::fixLSForSP8 ( EvtId i)
inlinestatic

Definition at line 79 of file EvtPDL.hh.

79{ partlist()[i.getId()].fixLSForSP8();}

Referenced by EvtDecayTable::readDecayFile().

◆ getctau()

static double EvtPDL::getctau ( EvtId i)
inlinestatic

◆ getId()

EvtId EvtPDL::getId ( const std::string & name)
static

Definition at line 287 of file EvtPDL.cc.

287 {
288
289 std::map<std::string,int>::iterator it=_particleNameLookup.find(std::string(name));
290 if (it==_particleNameLookup.end()) return EvtId(-1,-1);
291
292 return partlist()[it->second].getId();
293
294}

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), chargeConj(), EvtIdSet::contains(), EvtBHadronic::decay(), EvtBsquark::decay(), EvtBto2piCPiso::decay(), EvtBTo3piCP::decay(), EvtBTo4piCP::decay(), EvtBtoKpiCPiso::decay(), EvtBToKpipiCP::decay(), EvtBtoXsll::decay(), EvtCBTo3piMPP::decay(), EvtCBTo3piP00::decay(), EvtDDalitz::decay(), EvtDeBD::decay(), EvtGoityRoberts::decay(), EvtHypWK::decay(), EvtIntervalDecayAmp< T >::decay(), EvtJ2BB2::decay(), EvtJetSet::decay(), EvtKstarnunu::decay(), EvtKstarstargamma::decay(), EvtLNuGamma::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtParticle::decay(), EvtPhiDalitz::decay(), EvtPythia::decay(), EvtSLN::decay(), EvtSSDCP::decay(), EvtSSSCP::decay(), EvtSSSCPpng::decay(), EvtSSSCPT::decay(), EvtSTSCP::decay(), EvtSVPCP::decay(), EvtSVSCP::decay(), EvtSVSCPiso::decay(), EvtSVSCPLH::decay(), EvtSVSNONCPEIGEN::decay(), EvtSVVCP::decay(), EvtSVVCPLH::decay(), EvtSVVNONCPEIGEN::decay(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauola::decay(), EvtTauScalarnu::decay(), EvtTauVectornu::decay(), EvtVectorIsr::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSSBMixCPT::decay(), EvtVSSMix::decay(), EvtPHOTOS::doRadCorr(), EvtDalitzReso::evaluate(), EvtAmpA1(), EvtAmpA2(), EvtDalitzPlot::EvtDalitzPlot(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtIdSet::EvtIdSet(), EvtConExc::findMaxXS(), EvtConExc::gamHXSection(), EvtMultiChannelParser::getDecayMode(), EvtFSPick::getIndex(), EvtbTosllBallFF::getScalarFF(), EvtISGW2FF::getscalarff(), EvtISGW2FF::gettensorff(), EvtbTosllBallFF::getVectorFF(), EvtISGW2FF::getvectorff(), EvtSLBKPoleFF::getvectorff(), EvtPsi3Sdecay::getVId(), EvtCPUtil::incoherentMix(), EvtAV2GV::init(), EvtBtoXsll::init(), EvtConExc::init(), EvtDDalitz::init(), EvtJPE::init(), EvtJpipi::init(), EvtP2GC0::init(), EvtP2GC1::init(), EvtP2GC2::init(), EvtS2GV::init(), EvtSSDCP::init(), EvtSVSCPLH::init(), EvtVub::init(), EvtVubHybrid::init(), EvtVVpipi::init(), EvtVVPIPI_WEIGHTED::init(), EvtConExc::init_Br_ee(), EvtConExc::init_mode(), EvtParticle::initDecay(), EvtBto2piCPiso::initProbMax(), EvtBtoKpiCPiso::initProbMax(), EvtISGW2::initProbMax(), EvtCPUtil::OtherB(), EvtCPUtil::OtherB(), EvtPto3PAmpFactory::processAmp(), EvtDecayTable::readDecayFile(), and EvtFSPick::setFinalStatePar().

◆ getLundKC()

static int EvtPDL::getLundKC ( EvtId id)
inlinestatic

Definition at line 57 of file EvtPDL.hh.

57{return partlist()[id.getId()].getLundKC();}

◆ getMass()

◆ getMassProb()

static double EvtPDL::getMassProb ( EvtId i,
double mass,
double massPar,
int nDaug,
double * massDau )
inlinestatic

Definition at line 48 of file EvtPDL.hh.

48{ return partlist()[i.getId()].getMassProb(mass,massPar,nDaug,massDau);}
double mass

Referenced by EvtParticle::compMassProb().

◆ getMaxMass()

static double EvtPDL::getMaxMass ( EvtId i)
inlinestatic

◆ getMaxRange()

static double EvtPDL::getMaxRange ( EvtId i)
inlinestatic

Definition at line 53 of file EvtPDL.hh.

53{return partlist()[i.getId()].getMaxRange();}

◆ getMeanMass()

◆ getMinMass()

◆ getRandMass()

static double EvtPDL::getRandMass ( EvtId i,
EvtId * parId,
int nDaug,
EvtId * dauId,
EvtId * othDaugId,
double maxMass,
double * dauMasses )
inlinestatic

Definition at line 47 of file EvtPDL.hh.

47{return partlist()[i.getId()].getRandMass(parId,nDaug,dauId,othDaugId,maxMass,dauMasses);}

Referenced by EvtParticle::initDecay().

◆ getSpinType()

◆ getStdHep()

◆ getWidth()

◆ includeBirthFactor()

static void EvtPDL::includeBirthFactor ( EvtId i,
bool yesno )
inlinestatic

Definition at line 73 of file EvtPDL.hh.

73{partlist()[i.getId()].includeBirthFactor(yesno);}

Referenced by EvtDecayTable::readDecayFile().

◆ includeDecayFactor()

static void EvtPDL::includeDecayFactor ( EvtId i,
bool yesno )
inlinestatic

Definition at line 74 of file EvtPDL.hh.

74{partlist()[i.getId()].includeDecayFactor(yesno);}

Referenced by EvtDecayTable::readDecayFile().

◆ name()

static std::string EvtPDL::name ( EvtId i)
inlinestatic

◆ read()

void EvtPDL::read ( const char * fname)

Definition at line 58 of file EvtPDL.cc.

59{
60 readPDT(fname);
61}
void readPDT(const std::string fname)
Definition EvtPDL.cc:63

◆ readPDT()

void EvtPDL::readPDT ( const std::string fname)

Definition at line 63 of file EvtPDL.cc.

63 {
64
65
66 ifstream indec;
67
68 indec.open(fname.c_str());
69
70 char cmnd[100];
71 char xxxx[100];
72
73 char pname[100];
74 int stdhepid;
75 double mass;
76 double pwidth;
77 double pmaxwidth;
78 int chg3;
79 int spin2;
80 double ctau;
81 int lundkc;
82 EvtId i;
83
84 if (!indec) {
85 report(ERROR,"EvtGen") << "Could not open:"<<fname.c_str()<<"EvtPDL"<<endl;
86 return;
87 }
88
89 do{
90
91 char ch,ch1;
92
93 do{
94
95 indec.get(ch);
96 if (ch=='\n') indec.get(ch);
97 if (ch!='*') {
98 indec.putback(ch);
99 }
100 else{
101 while (indec.get(ch1),ch1!='\n');
102 }
103 } while(ch=='*');
104
105 indec >> cmnd;
106
107 if (strcmp(cmnd,"end")){
108
109 if (!strcmp(cmnd,"add")){
110
111 indec >> xxxx;
112 indec >> xxxx;
113 indec >> pname;
114 indec >> stdhepid;
115 indec >> mass;
116 indec >> pwidth;
117 indec >> pmaxwidth;
118 indec >> chg3;
119 indec >> spin2;
120 indec >> ctau;
121 indec >> lundkc;
122
123
124 i=EvtId(_nentries,_nentries);
125
126 EvtPartProp tmp;
127
129
130 if (spin2==0) tmp.setSpinType(EvtSpinType::SCALAR);
131 if (spin2==1) tmp.setSpinType(EvtSpinType::DIRAC);
132 if (spin2==2) tmp.setSpinType(EvtSpinType::VECTOR);
133 if (spin2==3) tmp.setSpinType(EvtSpinType::RARITASCHWINGER);
134 if (spin2==4) tmp.setSpinType(EvtSpinType::TENSOR);
135 if (spin2==5) tmp.setSpinType(EvtSpinType::SPIN5HALF);
136 if (spin2==6) tmp.setSpinType(EvtSpinType::SPIN3);
137 if (spin2==7) tmp.setSpinType(EvtSpinType::SPIN7HALF);
138 if (spin2==8) tmp.setSpinType(EvtSpinType::SPIN4);
139 if (spin2==2 && mass < 0.0001 ) tmp.setSpinType(EvtSpinType::PHOTON);
140 if (spin2==1 && mass < 0.0001 ) tmp.setSpinType(EvtSpinType::NEUTRINO);
141
142
143 if (!strcmp(pname,"string")){
145 }
146
147 if (!strcmp(pname,"vpho")){
149 }
150
151
152 tmp.setId(i);
153 tmp.setIdChgConj(EvtId(-1,-1));
154 tmp.setStdHep(stdhepid);
155 tmp.setLundKC(lundkc);
156 tmp.setName(pname);
157 assert(_particleNameLookup.find(std::string(pname))==
158 _particleNameLookup.end());
159 _particleNameLookup[std::string(pname)]=_nentries;
160 tmp.setctau(ctau);
161 tmp.setChg3(chg3);
162 //report(INFO,"EvtGen") << "particle,chg3:"<<i<<","<<chg3<<endl;
163
164 tmp.initLineShape(mass,pwidth,pmaxwidth);
165
166
167 partlist().push_back(tmp);
168 _nentries++;
169
170 }
171
172 // if find a set read information and discard it
173
174 if (!strcmp(cmnd,"set")){
175
176 indec >> xxxx;
177 indec >> xxxx;
178 indec >> xxxx;
179 indec >> xxxx;
180 }
181
182 }
183
184 }while(strcmp(cmnd,"end"));
185
186 setUpConstsPdt();
187
188}
TChain ch("t1")
static int chg3(EvtId i)
Definition EvtPDL.hh:60
void initLineShape(double mass, double width, double maxRange)
void setName(std::string pname)
void setStdHep(int stdhep)
void setChg3(int c3)
void setSpinType(EvtSpinType::spintype stype)
void setIdChgConj(EvtId idchgconj)
void setLundKC(int lundkc)
void setId(EvtId id)
void setctau(double tau)

Referenced by EvtGen::EvtGen(), and read().

◆ reSetBlatt()

static void EvtPDL::reSetBlatt ( EvtId i,
double blatt )
inlinestatic

Definition at line 72 of file EvtPDL.hh.

72{partlist()[i.getId()].reSetBlatt(blatt);}

Referenced by EvtDecayTable::readDecayFile().

◆ reSetMass()

static void EvtPDL::reSetMass ( EvtId i,
double mass )
inlinestatic

Definition at line 68 of file EvtPDL.hh.

68{ partlist()[i.getId()].reSetMass(mass);}

Referenced by EvtDecayTable::readDecayFile().

◆ reSetMassMax()

static void EvtPDL::reSetMassMax ( EvtId i,
double mass )
inlinestatic

Definition at line 71 of file EvtPDL.hh.

71{ partlist()[i.getId()].reSetMassMax(mass);}

Referenced by EvtDecayTable::readDecayFile().

◆ reSetMassMin()

static void EvtPDL::reSetMassMin ( EvtId i,
double mass )
inlinestatic

Definition at line 70 of file EvtPDL.hh.

70{ partlist()[i.getId()].reSetMassMin(mass);}

Referenced by EvtDecayTable::readDecayFile().

◆ reSetWidth()

static void EvtPDL::reSetWidth ( EvtId i,
double width )
inlinestatic

Definition at line 69 of file EvtPDL.hh.

69{ partlist()[i.getId()].reSetWidth(width);}

Referenced by EvtDecayTable::readDecayFile().

◆ setPWForBirthL()

static void EvtPDL::setPWForBirthL ( EvtId i,
int spin,
EvtId par,
EvtId othD )
static

◆ setPWForDecay()

static void EvtPDL::setPWForDecay ( EvtId i,
int spin,
EvtId d1,
EvtId d2 )
inlinestatic

Definition at line 77 of file EvtPDL.hh.

77{ partlist()[i.getId()].setPWForDecay(spin,d1,d2);}

Referenced by EvtDecayTable::readDecayFile().


The documentation for this class was generated from the following files: