ParticleIdUtils.hh
// ----------------------------------------------------------------------
//
// ParticleIDMethods.hh
// Author: Lynn Garren, Andy Buckley
//
// various utilities to extract information from the particle ID
//
// In the standard numbering scheme, the PID digits (base 10) are:
// +/- n nr nl nq1 nq2 nq3 nj
// It is expected that any 7 digit number used as a PID will adhere to
// the Monte Carlo numbering scheme documented by the PDG.
// Note that many "new" particles not explicitly defined already
// can be expressed within this numbering scheme.
//
// These are the same methods that can be found in HepPDT::ParticleID
// ----------------------------------------------------------------------
#ifndef RIVET_PARTICLE_ID_METHODS_HH
#define RIVET_PARTICLE_ID_METHODS_HH
#include "Rivet/Particle.hh"
namespace Rivet {
namespace PID {
// /// if this is a nucleus (ion), get A
// /// Ion numbers are +/- 10LZZZAAAI.
// int A(const int & pid );
// /// if this is a nucleus (ion), get Z
// /// Ion numbers are +/- 10LZZZAAAI.
// int Z(const int & pid );
// /// if this is a nucleus (ion), get nLambda
// /// Ion numbers are +/- 10LZZZAAAI.
// int lambda( const int & pid );
int abspid( const int & pid );
bool isValid( const int & pid );
bool isMeson( const int & pid );
bool isBaryon( const int & pid );
bool isDiQuark( const int & pid );
bool isHadron( const int & pid );
bool isLepton( const int & pid );
bool isNucleus( const int & pid );
bool isPentaquark( const int & pid );
bool isSUSY( const int & pid );
bool isRhadron( const int & pid );
bool hasUp( const int & pid );
bool hasDown( const int & pid );
bool hasStrange( const int & pid );
bool hasCharm( const int & pid );
bool hasBottom( const int & pid );
bool hasTop( const int & pid );
int jSpin( const int & pid );
int sSpin( const int & pid );
int lSpin( const int & pid );
int threeCharge( const int & pid );
inline double charge( const int & pid ) { return threeCharge(pid)/3.0; }
// int A(const Particle& p) { return A(p.pdgId()); }
// int Z(const Particle& p) { return Z(p.pdgId()); }
// int lambda( const Particle& p) { return lambda(p.pdgId()); }
inline int abspid( const Particle& p) { return abspid(p.pdgId()); }
inline bool isMeson( const Particle& p ) { return isMeson(p.pdgId()); }
inline bool isBaryon( const Particle& p ) { return isBaryon(p.pdgId()); }
inline bool isDiQuark( const Particle& p ) { return isDiQuark(p.pdgId()); }
inline bool isHadron( const Particle& p ) { return isHadron(p.pdgId()); }
inline bool isLepton( const Particle& p ) { return isLepton(p.pdgId()); }
inline bool isNucleus( const Particle& p ) { return isNucleus(p.pdgId()); }
inline bool isPentaquark( const Particle& p ) { return isPentaquark(p.pdgId()); }
inline bool isSUSY( const Particle& p ) { return isSUSY(p.pdgId()); }
inline bool isRhadron( const Particle& p ) { return isRhadron(p.pdgId()); }
inline bool hasUp( const Particle& p ) { return hasUp(p.pdgId()); }
inline bool hasDown( const Particle& p ) { return hasDown(p.pdgId()); }
inline bool hasStrange( const Particle& p ) { return hasStrange(p.pdgId()); }
inline bool hasCharm( const Particle& p ) { return hasCharm(p.pdgId()); }
inline bool hasBottom( const Particle& p ) { return hasBottom(p.pdgId()); }
inline bool hasTop( const Particle& p ) { return hasTop(p.pdgId()); }
inline int jSpin( const Particle& p ) { return jSpin(p.pdgId()); }
inline int sSpin( const Particle& p ) { return sSpin(p.pdgId()); }
inline int lSpin( const Particle& p ) { return lSpin(p.pdgId()); }
inline int threeCharge( const Particle& p ) { return threeCharge(p.pdgId()); }
inline double charge( const Particle& p ) { return threeCharge(p)/3.0; }
}
}
#endif