ParticleIdUtils.hh
Go to the documentation of this file.
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_UTILS_HH 00018 #define RIVET_PARTICLE_ID_UTILS_HH 00019 00020 namespace Rivet { 00021 00022 namespace PID { 00023 00024 00025 /// @name PID operations on Rivet::Particle wrapper 00026 //@{ 00027 00028 // /// if this is a nucleus (ion), get A 00029 // /// Ion numbers are +/- 10LZZZAAAI. 00030 // int A(const int & pid ); 00031 00032 // /// if this is a nucleus (ion), get Z 00033 // /// Ion numbers are +/- 10LZZZAAAI. 00034 // int Z(const int & pid ); 00035 00036 // /// if this is a nucleus (ion), get nLambda 00037 // /// Ion numbers are +/- 10LZZZAAAI. 00038 // int lambda( const int & pid ); 00039 00040 /// Absolute value of particle ID 00041 int abspid( const int & pid ); 00042 00043 /// Is this a valid ID? 00044 bool isValid( const int & pid ); 00045 /// Is this a valid meson ID? 00046 bool isMeson( const int & pid ); 00047 /// Is this a valid baryon ID? 00048 bool isBaryon( const int & pid ); 00049 /// Is this a valid diquark ID? 00050 bool isDiQuark( const int & pid ); 00051 /// Is this a valid hadron ID? 00052 bool isHadron( const int & pid ); 00053 /// Is this a valid lepton ID? 00054 bool isLepton( const int & pid ); 00055 /// Is this a neutrino ID? 00056 bool isNeutrino( const int & pid ); 00057 /// Is this a valid ion ID? 00058 bool isNucleus( const int & pid ); 00059 /// Is this a valid pentaquark ID? 00060 bool isPentaquark( const int & pid ); 00061 /// Is this a valid SUSY ID? 00062 bool isSUSY( const int & pid ); 00063 /// Is this a valid R-hadron ID? 00064 bool isRhadron( const int & pid ); 00065 00066 /// Does this particle contain an up quark? 00067 bool hasUp( const int & pid ); 00068 /// Does this particle contain a down quark? 00069 bool hasDown( const int & pid ); 00070 /// Does this particle contain a strange quark? 00071 bool hasStrange( const int & pid ); 00072 /// Does this particle contain a charm quark? 00073 bool hasCharm( const int & pid ); 00074 /// Does this particle contain a bottom quark? 00075 bool hasBottom( const int & pid ); 00076 /// Does this particle contain a top quark? 00077 bool hasTop( const int & pid ); 00078 00079 /// jSpin returns 2J+1, where J is the total spin 00080 int jSpin( const int & pid ); 00081 /// sSpin returns 2S+1, where S is the spin 00082 int sSpin( const int & pid ); 00083 /// lSpin returns 2L+1, where L is the orbital angular momentum 00084 int lSpin( const int & pid ); 00085 00086 /// Return 3 times the charge (3 x quark charge is an int) 00087 int threeCharge( const int & pid ); 00088 /// Return the charge 00089 inline double charge( const int & pid ) { return threeCharge(pid)/3.0; } 00090 00091 //@} 00092 00093 00094 } 00095 00096 } 00097 00098 #endif Generated on Thu Feb 6 2014 17:38:46 for The Rivet MC analysis system by ![]() |