Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:15

0001 // ----------------------------------------------------------------------
0002 //
0003 // ParticleIDMethods.hh
0004 // Author:  Lynn Garren
0005 //
0006 //  various utilities to extract information from the particle ID
0007 //
0008 //  In the standard numbering scheme, the PID digits (base 10) are:
0009 //            +/- n nr nl nq1 nq2 nq3 nj
0010 //  It is expected that any 7 digit number used as a PID will adhere to 
0011 //  the Monte Carlo numbering scheme documented by the PDG.
0012 //  Note that many "new" particles not explicitly defined already 
0013 //  can be expressed within this numbering scheme. 
0014 //
0015 //  These are the same methods that can be found in HepPDT::ParticleID
0016 // ----------------------------------------------------------------------
0017 #ifndef PARTICLE_ID_METHODS_HH
0018 #define PARTICLE_ID_METHODS_HH
0019 
0020 namespace HepPID {
0021 
0022 ///  PID digits (base 10) are: n nr nl nq1 nq2 nq3 nj
0023 ///  The location enum provides a convenient index into the PID.
0024 enum location { nj=1, nq3, nq2, nq1, nl, nr, n, n8, n9, n10 };
0025 
0026 /// return the digit at a named location in the PID
0027 unsigned short digit( location loc, const int & pid );
0028 
0029 /// if this is a nucleus (ion), get A
0030 /// Ion numbers are +/- 10LZZZAAAI. 
0031 int A(const int & pid );
0032 
0033 /// if this is a nucleus (ion), get Z
0034 /// Ion numbers are +/- 10LZZZAAAI. 
0035 int Z(const int & pid );
0036 
0037 /// if this is a nucleus (ion), get nLambda
0038 /// Ion numbers are +/- 10LZZZAAAI. 
0039 int lambda( const int & pid );
0040 
0041 /// absolute value of particle ID
0042 int           abspid( const int & pid );
0043 
0044 /// extract fundamental ID (1-100) if this is a "fundamental" particle
0045 int    fundamentalID( const int & pid );
0046 /// if this is a fundamental particle, does it have a valid antiparticle?
0047 bool hasFundamentalAnti( const int & pid );
0048 
0049 /// returns everything beyond the 7th digit 
0050 /// (e.g. outside the standard numbering scheme)
0051 int extraBits( const int & pid );
0052 
0053 // ---  boolean methods:
0054 //
0055 /// is this a valid ID?
0056 bool isValid( const int & pid );
0057 /// is this a valid meson ID?
0058 bool isMeson( const int & pid );
0059 /// is this a valid baryon ID?
0060 bool isBaryon( const int & pid );
0061 /// is this a valid diquark ID?
0062 bool isDiQuark( const int & pid );
0063 /// is this a valid hadron ID?
0064 bool isHadron( const int & pid );
0065 /// is this a valid lepton ID?
0066 bool isLepton( const int & pid );
0067 /// is this a valid ion ID?
0068 bool isNucleus( const int & pid );
0069 /// is this a valid pentaquark ID?
0070 bool isPentaquark( const int & pid );
0071 /// is this a valid SUSY ID?
0072 bool isSUSY( const int & pid );
0073 /// is this a valid R-hadron ID?
0074 bool isRhadron( const int & pid );
0075 /// is this a valid Dyon (magnetic monopole) ID?
0076 bool isDyon( const int & pid );
0077 /// Check for QBall or any exotic particle with electric charge beyond the qqq scheme
0078 /// Ad-hoc numbering for such particles is 100xxxx0, where xxxx is the charge in tenths. 
0079 bool isQBall( const int & pid );
0080 
0081 /// does this particle contain an up quark?
0082 bool hasUp( const int & pid );
0083 /// does this particle contain a down quark?
0084 bool hasDown( const int & pid );
0085 /// does this particle contain a strange quark?
0086 bool hasStrange( const int & pid );
0087 /// does this particle contain a charm quark?
0088 bool hasCharm( const int & pid );
0089 /// does this particle contain a bottom quark?
0090 bool hasBottom( const int & pid );
0091 /// does this particle contain a top quark?
0092 bool hasTop( const int & pid );
0093 
0094 // ---  other information
0095 //
0096 /// jSpin returns 2J+1, where J is the total spin
0097 int  jSpin( const int & pid );
0098 /// sSpin returns 2S+1, where S is the spin
0099 int  sSpin( const int & pid );
0100 /// lSpin returns 2L+1, where L is the orbital angular momentum
0101 int  lSpin( const int & pid );
0102 /// return 3 times the charge (3 x quark charge is an int)
0103 /// If this is a Q-ball, return 30 times the charge.
0104 int threeCharge( const int & pid );
0105 /// return the actual charge
0106 double charge( const int & pid );
0107 
0108 
0109 } // HepPID
0110 
0111 #endif // PARTICLE_ID_METHODS_HH