12 #ifndef HAMMER_TOOLS_PDG
13 #define HAMMER_TOOLS_PDG
54 std::vector<PdgId>
toPdgList(
const std::string& name)
const;
62 double getMass(
const std::string& name)
const;
72 void setMass(
const std::string& name,
double value);
80 double getWidth(
const std::string& name)
const;
90 void setWidth(
const std::string& name,
double value);
153 std::vector<std::pair<PdgId, std::vector<PdgId>>>
expandToValidVertices(
const std::string& name)
const;
171 void addBR(
PdgId parent,
const std::vector<PdgId>& daughters,
const double br);
235 std::map<HashId, std::pair<double, PdgId>>
_brs;
237 std::map<std::string, std::vector<PdgId>>
_names;
static const PdgId DSSD0STARPLUS
size_t getSpinMultiplicities(const std::vector< PdgId > &ids) const
return where is the spin of particle i from a list of particle PDG codes
static const PdgId ELECTRON
static const PdgId RHOPLUS
static const PdgId POSITRON
static const PdgId LAMBDACPLUS
static const PdgId DSSD2STARPLUS
void init()
initializes the data tables
bool isMeson(PdgId id) const
check whether a PDG code corresponds to a meson
static const PdgId PHOTON
void addBR(PdgId parent, const std::vector< PdgId > &daughters, const double br)
add BRs
static const PdgId DSTARMINUS
Hammer data types declarations.
static const PdgId ANTINEUTRON
static const PdgId DSSDS1MINUS
std::vector< HashId > expandToValidVertexUIDs(const std::string &name, const bool &hadOnly=false) const
static const PdgId BCMINUS
static const PdgId ANTITAU
std::map< HashId, std::pair< double, PdgId > > _brs
static const PdgId SIGMAPLUS
void setWidth(PdgId id, double value)
set the particle width by PDG code
PdgId abspid(PdgId id) const
takes the absolute value of a PDG code
static const PdgId SIGMA0
static const PdgId DSPLUS
static const PdgId WBOSON
static const PdgId LAMBDA
static const PdgId DSTARPLUS
static const PdgId UPSILON1S
std::vector< PdgId > toPdgList(const std::string &name) const
return a list of PDG codes corresponding to a particle name E.g.
static const PdgId ETAPRIME
static const PdgId ANTIMUON
size_t getSpinMultiplicity(PdgId id) const
return where s is the particle spin from a PDG code
static const PdgId NU_EBAR
static const PdgId NEUTRON
std::vector< std::pair< PdgId, std::vector< PdgId > > > expandToValidVertices(const std::string &name) const
static const PdgId NU_TAUBAR
static const PdgId LAMBDACMINUS
static const PdgId DSSDS0STARPLUS
std::map< PdgId, double > _widths
static const PdgId DSSD1PLUS
static const PdgId DSSDS1STARPLUS
static const PdgId SIGMAMINUS
static const PdgId DSSD0STARMINUS
void setMass(PdgId id, double value)
set the particle mass by PDG code
PdgId fundamentalID(PdgId id) const
int getBaryonNumber(PdgId id) const
the particle baryon number from a PDG code
PID & operator=(const PID &)=delete
static const PdgId NU_TAU
static const PdgId DSSDS1STARMINUS
bool isLepton(PdgId id) const
check whether a PDG code corresponds to a charged lepton
Pdg forward declarations.
static const PdgId BCPLUS
static const PdgId DSSD1MINUS
static const PdgId UPSILON3S
int getThreeCharge(PdgId id) const
return where q is the particle electric charge from a PDG code
static const PdgId UPSILON2S
static const PdgId XIPLUS
PdgId toPdgCode(const std::string &name) const
convert a particle name to its PDG code.
static const PdgId LAMBDAB
static const PdgId RHOMINUS
static const PdgId DSSD1STARPLUS
std::map< PdgId, double > _masses
Hammer class for dealing with particle data.
bool isDiQuark(PdgId id) const
check whether a PDG code corresponds to a diquark
PdgId extraBits(PdgId id) const
static const PdgId NU_MUBAR
static const PdgId DSSD1STAR
static const PdgId PROTON
static const PdgId UPSILON4S
double getWidth(PdgId id) const
particle width from a PDG code
static const PdgId DSSTARPLUS
static const PdgId OMEGAMINUS
static const PdgId DSSTARMINUS
static const PdgId DSSDS2STARMINUS
static const PdgId KMINUS
static const PdgId XIMINUS
static const PdgId DSSD0STAR
static const PdgId DSSDS0STARMINUS
bool isBaryon(PdgId id) const
check whether a PDG code corresponds to a baryon
static const PdgId DSSD1STARMINUS
static const PdgId DSSDS2STARPLUS
static const PdgId ANTIPROTON
static const PdgId DSSD2STAR
unsigned short digit(location loc, PdgId pid) const
extracts a digit from a PDG code
bool isHadron(PdgId id) const
check whether a PDG code corresponds to a hadron
int getLeptonNumber(PdgId id) const
the particle lepton number from a PDG code
static const PdgId PIPLUS
bool isNeutrino(PdgId id) const
check whether a PDG code corresponds to a neutrino
bool isPentaquark(PdgId id) const
check whether a PDG code corresponds to a pentaquark
static const PdgId EMINUS
std::tuple< int, int, int > getLeptonFlavorNumber(PdgId id) const
the particle lepton numbers for each flavor from a PDG code
static const PdgId BMINUS
static const PdgId DMINUS
static const PdgId DSMINUS
static const PdgId DSSDS1PLUS
static PID * getPIDInstance()
static const PdgId PIMINUS
static const PdgId DSSD2STARMINUS
std::map< std::string, std::vector< PdgId > > _names
std::map< HashId, double > getPartialWidths()
get partial Widths
static const PdgId OMEGAPLUS
double getMass(PdgId id) const
particle mass from a PDG code