Rivet
1.8.0
|
00001 // ---------------------------------------------------------------------- 00002 // 00003 // ParticleIDMethods.hh 00004 // Author: Lynn Garren, Andy Buckley 00005 // 00006 // various utilities to extract information from the particle ID 00007 // 00008 // In the standard numbering scheme, the PID digits (base 10) are: 00009 // +/- n nr nl nq1 nq2 nq3 nj 00010 // It is expected that any 7 digit number used as a PID will adhere to 00011 // the Monte Carlo numbering scheme documented by the PDG. 00012 // Note that many "new" particles not explicitly defined already 00013 // can be expressed within this numbering scheme. 00014 // 00015 // These are the same methods that can be found in HepPDT::ParticleID 00016 // ---------------------------------------------------------------------- 00017 #ifndef RIVET_PARTICLE_ID_METHODS_HH 00018 #define RIVET_PARTICLE_ID_METHODS_HH 00019 00020 #include "Rivet/Particle.hh" 00021 00022 00023 namespace Rivet { 00024 00025 namespace PID { 00026 00027 00029 00030 00031 // /// if this is a nucleus (ion), get A 00032 // /// Ion numbers are +/- 10LZZZAAAI. 00033 // int A(const int & pid ); 00034 00035 // /// if this is a nucleus (ion), get Z 00036 // /// Ion numbers are +/- 10LZZZAAAI. 00037 // int Z(const int & pid ); 00038 00039 // /// if this is a nucleus (ion), get nLambda 00040 // /// Ion numbers are +/- 10LZZZAAAI. 00041 // int lambda( const int & pid ); 00042 00044 int abspid( const int & pid ); 00045 00046 00048 bool isValid( const int & pid ); 00050 bool isMeson( const int & pid ); 00052 bool isBaryon( const int & pid ); 00054 bool isDiQuark( const int & pid ); 00056 bool isHadron( const int & pid ); 00058 bool isLepton( const int & pid ); 00060 bool isNucleus( const int & pid ); 00062 bool isPentaquark( const int & pid ); 00064 bool isSUSY( const int & pid ); 00066 bool isRhadron( const int & pid ); 00067 00069 bool hasUp( const int & pid ); 00071 bool hasDown( const int & pid ); 00073 bool hasStrange( const int & pid ); 00075 bool hasCharm( const int & pid ); 00077 bool hasBottom( const int & pid ); 00079 bool hasTop( const int & pid ); 00080 00082 int jSpin( const int & pid ); 00084 int sSpin( const int & pid ); 00086 int lSpin( const int & pid ); 00087 00089 int threeCharge( const int & pid ); 00091 inline double charge( const int & pid ) { return threeCharge(pid)/3.0; } 00092 00094 00095 00097 00098 00099 00101 00102 00105 // int A(const Particle& p) { return A(p.pdgId()); } 00106 00109 // int Z(const Particle& p) { return Z(p.pdgId()); } 00110 00113 // int lambda( const Particle& p) { return lambda(p.pdgId()); } 00114 00116 inline int abspid( const Particle& p) { return abspid(p.pdgId()); } 00117 00119 inline bool isMeson( const Particle& p ) { return isMeson(p.pdgId()); } 00121 inline bool isBaryon( const Particle& p ) { return isBaryon(p.pdgId()); } 00123 inline bool isDiQuark( const Particle& p ) { return isDiQuark(p.pdgId()); } 00125 inline bool isHadron( const Particle& p ) { return isHadron(p.pdgId()); } 00127 inline bool isLepton( const Particle& p ) { return isLepton(p.pdgId()); } 00129 inline bool isNucleus( const Particle& p ) { return isNucleus(p.pdgId()); } 00131 inline bool isPentaquark( const Particle& p ) { return isPentaquark(p.pdgId()); } 00133 inline bool isSUSY( const Particle& p ) { return isSUSY(p.pdgId()); } 00135 inline bool isRhadron( const Particle& p ) { return isRhadron(p.pdgId()); } 00136 00138 inline bool hasUp( const Particle& p ) { return hasUp(p.pdgId()); } 00140 inline bool hasDown( const Particle& p ) { return hasDown(p.pdgId()); } 00142 inline bool hasStrange( const Particle& p ) { return hasStrange(p.pdgId()); } 00144 inline bool hasCharm( const Particle& p ) { return hasCharm(p.pdgId()); } 00146 inline bool hasBottom( const Particle& p ) { return hasBottom(p.pdgId()); } 00148 inline bool hasTop( const Particle& p ) { return hasTop(p.pdgId()); } 00149 00151 inline int jSpin( const Particle& p ) { return jSpin(p.pdgId()); } 00153 inline int sSpin( const Particle& p ) { return sSpin(p.pdgId()); } 00155 inline int lSpin( const Particle& p ) { return lSpin(p.pdgId()); } 00156 00158 inline int threeCharge( const Particle& p ) { return threeCharge(p.pdgId()); } 00160 inline double charge( const Particle& p ) { return threeCharge(p)/3.0; } 00161 00163 00164 } 00165 00166 } 00167 00168 #endif