rivet is hosted by Hepforge, IPPP Durham
ParticleUtils.hh
Go to the documentation of this file.
00001 #ifndef RIVET_PARTICLE_UTILS_HH
00002 #define RIVET_PARTICLE_UTILS_HH
00003 
00004 #include "Rivet/Particle.hh"
00005 
00006 namespace Rivet {
00007 
00008   namespace PID {
00009 
00010 
00011     /// @name PID operations on Rivet::Particle wrapper
00012     //@{
00013 
00014     /// if this is a nucleus (ion), get A
00015     /// Ion numbers are +/- 10LZZZAAAI.
00016     // int A(const Particle& p) { return A(p.pdgId()); }
00017 
00018     /// if this is a nucleus (ion), get Z
00019     /// Ion numbers are +/- 10LZZZAAAI.
00020     // int Z(const Particle& p) { return Z(p.pdgId()); }
00021 
00022     /// if this is a nucleus (ion), get nLambda
00023     /// Ion numbers are +/- 10LZZZAAAI.
00024     // int lambda( const Particle& p) { return lambda(p.pdgId()); }
00025 
00026     /// Absolute value of particle ID
00027     inline int abspid( const Particle& p) { return abspid(p.pdgId()); }
00028 
00029     /// Is this a valid meson ID?
00030     inline bool isMeson( const Particle& p ) { return isMeson(p.pdgId()); }
00031     /// Is this a valid baryon ID?
00032     inline bool isBaryon( const Particle& p ) { return isBaryon(p.pdgId()); }
00033     /// Is this a valid diquark ID?
00034     inline bool isDiQuark( const Particle& p ) { return isDiQuark(p.pdgId()); }
00035     /// Is this a valid hadron ID?
00036     inline bool isHadron( const Particle& p ) { return isHadron(p.pdgId()); }
00037     /// Is this a valid lepton ID?
00038     inline bool isLepton( const Particle& p ) { return isLepton(p.pdgId()); }
00039     /// Is this a valid ion ID?
00040     inline bool isNucleus( const Particle& p ) { return isNucleus(p.pdgId()); }
00041     /// Is this a valid pentaquark ID?
00042     inline bool isPentaquark( const Particle& p ) { return isPentaquark(p.pdgId()); }
00043     /// Is this a valid SUSY ID?
00044     inline bool isSUSY( const Particle& p ) { return isSUSY(p.pdgId()); }
00045     /// Is this a valid R-hadron ID?
00046     inline bool isRhadron( const Particle& p ) { return isRhadron(p.pdgId()); }
00047 
00048     /// Does this particle contain an up quark?
00049     inline bool hasUp( const Particle& p ) { return hasUp(p.pdgId()); }
00050     /// Does this particle contain a down quark?
00051     inline bool hasDown( const Particle& p ) { return hasDown(p.pdgId()); }
00052     /// Does this particle contain a strange quark?
00053     inline bool hasStrange( const Particle& p ) { return hasStrange(p.pdgId()); }
00054     /// Does this particle contain a charm quark?
00055     inline bool hasCharm( const Particle& p ) { return hasCharm(p.pdgId()); }
00056     /// Does this particle contain a bottom quark?
00057     inline bool hasBottom( const Particle& p ) { return hasBottom(p.pdgId()); }
00058     /// Does this particle contain a top quark?
00059     inline bool hasTop( const Particle& p ) { return hasTop(p.pdgId()); }
00060 
00061     /// jSpin returns 2J+1, where J is the total spin
00062     inline int jSpin( const Particle& p ) { return jSpin(p.pdgId()); }
00063     /// sSpin returns 2S+1, where S is the spin
00064     inline int sSpin( const Particle& p ) { return sSpin(p.pdgId()); }
00065     /// lSpin returns 2L+1, where L is the orbital angular momentum
00066     inline int lSpin( const Particle& p ) { return lSpin(p.pdgId()); }
00067 
00068     /// Return 3 times the charge (3 x quark charge is an int)
00069     inline int threeCharge( const Particle& p ) { return threeCharge(p.pdgId()); }
00070     /// Return the charge
00071     inline double charge( const Particle& p ) { return threeCharge(p)/3.0; }
00072 
00073     //@}
00074 
00075 
00076   }
00077 
00078 }
00079 
00080 #endif