File indexing completed on 2024-04-06 12:11:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "FastSimulation/Particle/interface/pdg_functions.h"
0017
0018 double pdg::mass(int pdgID, HepPDT::ParticleDataTable const* theTable) {
0019 auto info = theTable->particle(HepPDT::ParticleID(pdgID));
0020 if (info) {
0021 return info->mass().value();
0022 }
0023 return kInvalidMass;
0024 }
0025
0026 double pdg::cTau(int pdgID, HepPDT::ParticleDataTable const* theTable) {
0027 auto info = theTable->particle(HepPDT::ParticleID(pdgID));
0028 double ct = kInvalidCtau;
0029 if (info) {
0030
0031
0032
0033
0034 double w = info->totalWidth().value();
0035 if (w != 0. && pdgID != 1000022) {
0036 ct = 6.582119e-25 / w / 10.;
0037 } else {
0038
0039 unsigned amyId = abs(pdgID);
0040 if (amyId != 22 &&
0041 amyId != 11 &&
0042 amyId != 10 &&
0043 amyId != 12 &&
0044 amyId != 14 &&
0045 amyId != 1000022 &&
0046 amyId != 1000039 &&
0047 amyId != 2112 &&
0048 amyId != 2212 &&
0049 amyId != 101 &&
0050 amyId != 102 &&
0051 amyId != 103 &&
0052 amyId != 104) {
0053 ct = 0.;
0054
0055 }
0056 }
0057 }
0058
0059
0060
0061
0062
0063
0064 return ct;
0065 }