Rivet::PID Namespace Reference
Enumeration Type Documentation
Function Documentation
Definition at line 79 of file ParticleIdUtils.cc. References abspid(), and isNucleus(). Referenced by Rivet::diagonalize().
absolute value of particle ID Definition at line 35 of file ParticleIdUtils.cc. Referenced by A(), abspid(), digit(), extraBits(), fundamentalID(), isBaryon(), isDiQuark(), isMeson(), isNucleus(), jSpin(), lambda(), threeCharge(), and Z(). {
return (pid < 0) ? -pid : pid;
}
absolute value of particle ID if this is a nucleus (ion), get A Ion numbers are +/- 10LZZZAAAI. if this is a nucleus (ion), get Z Ion numbers are +/- 10LZZZAAAI. if this is a nucleus (ion), get nLambda Ion numbers are +/- 10LZZZAAAI. Definition at line 116 of file ParticleIdUtils.hh. References abspid(), and Particle::pdgId(). { return abspid(p.pdgId()); }
return the charge Definition at line 91 of file ParticleIdUtils.hh. References threeCharge(). Referenced by ATLAS_2012_I1094568::analyze(), and threeCharge(). { return threeCharge(pid)/3.0; }
return the charge Definition at line 160 of file ParticleIdUtils.hh. References threeCharge(). { return threeCharge(p)/3.0; }
return the digit at a named location in the PID Definition at line 47 of file ParticleIdUtils.cc. References abspid(). Referenced by fundamentalID(), hasBottom(), hasCharm(), hasDown(), hasStrange(), hasTop(), hasUp(), isBaryon(), isDiQuark(), isMeson(), isNucleus(), isPentaquark(), isRhadron(), isSUSY(), lambda(), lSpin(), sSpin(), and threeCharge(). { // PID digits (base 10) are: n nr nl nq1 nq2 nq3 nj // the location enum provides a convenient index into the PID int numerator = (int) std::pow(10.0,(loc-1)); return (abspid(pid)/numerator)%10; }
if this is a fundamental particle, does it have a valid antiparticle? returns everything beyond the 7th digit (e.g. outside the standard numbering scheme) Definition at line 41 of file ParticleIdUtils.cc. References abspid(). Referenced by fundamentalID(), hasBottom(), hasCharm(), hasDown(), hasStrange(), hasTop(), hasUp(), isBaryon(), isDiQuark(), isHadron(), isLepton(), isMeson(), isPentaquark(), isRhadron(), isSUSY(), isValid(), jSpin(), and threeCharge(). { return abspid(pid)/10000000; }
extract fundamental ID (1-100) if this is a "fundamental" particle Definition at line 57 of file ParticleIdUtils.cc. References abspid(), digit(), extraBits(), nq1, and nq2. Referenced by hasBottom(), hasCharm(), hasDown(), hasStrange(), hasTop(), hasUp(), isBaryon(), isDiQuark(), isLepton(), isMeson(), isSUSY(), isValid(), jSpin(), and threeCharge().
does this particle contain a bottom quark? Definition at line 318 of file ParticleIdUtils.cc. References digit(), extraBits(), fundamentalID(), nq1, nq2, and nq3. Referenced by ATLAS_2012_I1094568::analyze(), Jet::containsBottom(), and hasBottom().
does this particle contain a bottom quark? Definition at line 146 of file ParticleIdUtils.hh. References hasBottom(), and Particle::pdgId(). { return hasBottom(p.pdgId()); }
does this particle contain a charm quark? Definition at line 310 of file ParticleIdUtils.cc. References digit(), extraBits(), fundamentalID(), nq1, nq2, and nq3. Referenced by Jet::containsCharm(), and hasCharm().
does this particle contain a charm quark? Definition at line 144 of file ParticleIdUtils.hh. References hasCharm(), and Particle::pdgId(). { return hasCharm(p.pdgId()); }
does this particle contain a down quark? Definition at line 294 of file ParticleIdUtils.cc. References digit(), extraBits(), fundamentalID(), nq1, nq2, and nq3. Referenced by hasDown().
does this particle contain a down quark? Definition at line 140 of file ParticleIdUtils.hh. References hasDown(), and Particle::pdgId(). { return hasDown(p.pdgId()); }
does this particle contain a strange quark? Definition at line 302 of file ParticleIdUtils.cc. References digit(), extraBits(), fundamentalID(), nq1, nq2, and nq3. Referenced by hasStrange().
does this particle contain a strange quark? Definition at line 142 of file ParticleIdUtils.hh. References hasStrange(), and Particle::pdgId(). { return hasStrange(p.pdgId()); }
does this particle contain a top quark? Definition at line 326 of file ParticleIdUtils.cc. References digit(), extraBits(), fundamentalID(), nq1, nq2, and nq3. Referenced by hasTop().
does this particle contain a top quark? Definition at line 148 of file ParticleIdUtils.hh. References hasTop(), and Particle::pdgId(). { return hasTop(p.pdgId()); }
does this particle contain an up quark? Definition at line 286 of file ParticleIdUtils.cc. References digit(), extraBits(), fundamentalID(), nq1, nq2, and nq3. Referenced by hasUp().
does this particle contain an up quark? Definition at line 138 of file ParticleIdUtils.hh. References hasUp(), and Particle::pdgId(). { return hasUp(p.pdgId()); }
is this a valid baryon ID? Definition at line 169 of file ParticleIdUtils.cc. References abspid(), digit(), extraBits(), fundamentalID(), nj, nq1, nq2, and nq3. Referenced by isBaryon(), isHadron(), isValid(), and threeCharge(). { if( extraBits(pid) > 0 ) { return false; } if( abspid(pid) <= 100 ) { return false; } if( fundamentalID(pid) <= 100 && fundamentalID(pid) > 0 ) { return false; } if( abspid(pid) == 2110 || abspid(pid) == 2210 ) { return true; } if( digit(nj,pid) > 0 && digit(nq3,pid) > 0 && digit(nq2,pid) > 0 && digit(nq1,pid) > 0 ) { return true; } return false; }
is this a valid baryon ID? Definition at line 121 of file ParticleIdUtils.hh. References isBaryon(), and Particle::pdgId(). { return isBaryon(p.pdgId()); }
is this a valid diquark ID? Definition at line 181 of file ParticleIdUtils.cc. References abspid(), digit(), extraBits(), fundamentalID(), nj, nq1, nq2, and nq3. Referenced by isDiQuark(), isValid(), and threeCharge(). { if( extraBits(pid) > 0 ) { return false; } if( abspid(pid) <= 100 ) { return false; } if( fundamentalID(pid) <= 100 && fundamentalID(pid) > 0 ) { return false; } if( digit(nj,pid) > 0 && digit(nq3,pid) == 0 && digit(nq2,pid) > 0 && digit(nq1,pid) > 0 ) { // diquark signature // EvtGen uses the diquarks for quark pairs, so, for instance, // 5501 is a valid "diquark" for EvtGen //if( digit(nj) == 1 && digit(nq2) == digit(nq1) ) { // illegal // return false; //} else { return true; //} } return false; }
is this a valid diquark ID? Definition at line 123 of file ParticleIdUtils.hh. References isDiQuark(), and Particle::pdgId(). { return isDiQuark(p.pdgId()); }
is this a valid hadron ID? Definition at line 200 of file ParticleIdUtils.cc. References extraBits(), isBaryon(), isMeson(), and isPentaquark(). Referenced by CMS_2010_S8656010::analyze(), CMS_2010_S8547297::analyze(), CMS_2011_S8884919::analyze(), ATLAS_2012_I1094568::analyze(), Jet::containsBottom(), Jet::containsCharm(), LHCB_2011_I917009::getLifeTime(), Rivet::hadronFilter(), Jet::hadronicEnergy(), isHadron(), Rivet::isInvisibleFilter(), Rivet::nonHadronFilter(), Multiplicity::project(), and DISKinematics::project(). { if( extraBits(pid) > 0 ) { return false; } if( isMeson(pid) ) { return true; } if( isBaryon(pid) ) { return true; } if( isPentaquark(pid) ) { return true; } return false; }
is this a valid hadron ID? Definition at line 125 of file ParticleIdUtils.hh. References isHadron(), and Particle::pdgId(). { return isHadron(p.pdgId()); }
is this a valid lepton ID? Definition at line 209 of file ParticleIdUtils.cc. References extraBits(), and fundamentalID(). Referenced by isLepton(), ChargedLeptons::project(), and DISLepton::project(). { if( extraBits(pid) > 0 ) { return false; } if( fundamentalID(pid) >= 11 && fundamentalID(pid) <= 18 ) { return true; } return false; }
is this a valid lepton ID? Definition at line 127 of file ParticleIdUtils.hh. References isLepton(), and Particle::pdgId(). { return isLepton(p.pdgId()); }
is this a valid meson ID? Definition at line 145 of file ParticleIdUtils.cc. References abspid(), digit(), extraBits(), fundamentalID(), nj, nq1, nq2, and nq3. Referenced by isHadron(), isMeson(), isValid(), lSpin(), sSpin(), and threeCharge(). { if( extraBits(pid) > 0 ) { return false; } if( abspid(pid) <= 100 ) { return false; } if( fundamentalID(pid) <= 100 && fundamentalID(pid) > 0 ) { return false; } int aid = abspid(pid); if( aid == 130 || aid == 310 || aid == 210 ) { return true; } // EvtGen uses some odd numbers if( aid == 150 || aid == 350 || aid == 510 || aid == 530 ) { return true; } // pomeron, etc. if( pid == 110 || pid == 990 || pid == 9990 ) { return true; } if( digit(nj,pid) > 0 && digit(nq3,pid) > 0 && digit(nq2,pid) > 0 && digit(nq1,pid) == 0 ) { // check for illegal antiparticles if( digit(nq3,pid) == digit(nq2,pid) && pid < 0 ) { return false; } else { return true; } } return false; }
is this a valid meson ID? Definition at line 119 of file ParticleIdUtils.hh. References isMeson(), and Particle::pdgId(). { return isMeson(p.pdgId()); }
is this a valid ion ID? Definition at line 223 of file ParticleIdUtils.cc. References abspid(), digit(), n10, and n9. Referenced by A(), isNucleus(), isValid(), lambda(), and Z(). { // a proton can also be a Hydrogen nucleus if( abspid(pid) == 2212 ) { return true; } // new standard: +/- 10LZZZAAAI if( ( digit(n10,pid) == 1 ) && ( digit(n9,pid) == 0 ) ) { // charge should always be less than or equal to baryon number // the following line is A >= Z if( (abspid(pid)/10)%1000 >= (abspid(pid)/10000)%1000 ) { return true; } } return false; }
is this a valid ion ID? Definition at line 129 of file ParticleIdUtils.hh. References isNucleus(), and Particle::pdgId(). { return isNucleus(p.pdgId()); }
is this a valid pentaquark ID? Definition at line 237 of file ParticleIdUtils.cc. References digit(), extraBits(), n, nj, nl, nq1, nq2, nq3, and nr. Referenced by isHadron(), isPentaquark(), and isValid(). { // a pentaquark is of the form 9abcdej, // where j is the spin and a, b, c, d, and e are quarks if( extraBits(pid) > 0 ) { return false; } if( digit(n,pid) != 9 ) { return false; } if( digit(nr,pid) == 9 || digit(nr,pid) == 0 ) { return false; } if( digit(nj,pid) == 9 || digit(nl,pid) == 0 ) { return false; } if( digit(nq1,pid) == 0 ) { return false; } if( digit(nq2,pid) == 0 ) { return false; } if( digit(nq3,pid) == 0 ) { return false; } if( digit(nj,pid) == 0 ) { return false; } // check ordering if( digit(nq2,pid) > digit(nq1,pid) ) { return false; } if( digit(nq1,pid) > digit(nl,pid) ) { return false; } if( digit(nl,pid) > digit(nr,pid) ) { return false; } return true; }
is this a valid pentaquark ID? Definition at line 131 of file ParticleIdUtils.hh. References isPentaquark(), and Particle::pdgId(). { return isPentaquark(p.pdgId()); }
is this a valid R-hadron ID? Definition at line 269 of file ParticleIdUtils.cc. References digit(), extraBits(), isSUSY(), n, nj, nq2, nq3, and nr. Referenced by isRhadron(), and isValid(). { // an R-hadron is of the form 10abcdj, // where j is the spin and a, b, c, and d are quarks or gluons if( extraBits(pid) > 0 ) { return false; } if( digit(n,pid) != 1 ) { return false; } if( digit(nr,pid) != 0 ) { return false; } // make sure this isn't a SUSY particle if( isSUSY(pid) ) { return false; } // All R-hadrons have at least 3 core digits if( digit(nq2,pid) == 0 ) { return false; } if( digit(nq3,pid) == 0 ) { return false; } if( digit(nj,pid) == 0 ) { return false; } return true; }
is this a valid R-hadron ID? Definition at line 135 of file ParticleIdUtils.hh. References isRhadron(), and Particle::pdgId(). { return isRhadron(p.pdgId()); }
is this a valid SUSY ID? Definition at line 257 of file ParticleIdUtils.cc. References digit(), extraBits(), fundamentalID(), n, and nr. Referenced by isRhadron(), isSUSY(), and isValid().
is this a valid SUSY ID? Definition at line 133 of file ParticleIdUtils.hh. References isSUSY(), and Particle::pdgId(). { return isSUSY(p.pdgId()); }
is this a valid ID? Definition at line 102 of file ParticleIdUtils.cc. References extraBits(), fundamentalID(), isBaryon(), isDiQuark(), isMeson(), isNucleus(), isPentaquark(), isRhadron(), and isSUSY(). { if( extraBits(pid) > 0 ) { if( isNucleus(pid) ) { return true; } return false; } if( isSUSY(pid) ) { return true; } if( isRhadron(pid) ) { return true; } // Meson signature if( isMeson(pid) ) { return true; } // Baryon signature if( isBaryon(pid) ) { return true; } // DiQuark signature if( isDiQuark(pid) ) { return true; } // fundamental particle if( fundamentalID(pid) > 0 ) { if(pid > 0 ) { return true; } else { // AB - disabled this to remove need for PID -> name lookup. //if( hasFundamentalAnti(pid) ) { return true; } return false; } } // pentaquark if( isPentaquark(pid) ) { return true; } // don't recognize this number return false; }
jSpin returns 2J+1, where J is the total spin Definition at line 337 of file ParticleIdUtils.cc. References abspid(), extraBits(), and fundamentalID(). Referenced by jSpin(). { if( fundamentalID(pid) > 0 ) { // some of these are known int fund = fundamentalID(pid); if( fund > 0 && fund < 7 ) return 2; if( fund == 9 ) return 3; if( fund > 10 && fund < 17 ) return 2; if( fund > 20 && fund < 25 ) return 3; return 0; } else if( extraBits(pid) > 0 ) { return 0; } return abspid(pid)%10; }
jSpin returns 2J+1, where J is the total spin Definition at line 151 of file ParticleIdUtils.hh. References jSpin(), and Particle::pdgId(). { return jSpin(p.pdgId()); }
Definition at line 89 of file ParticleIdUtils.cc. References abspid(), digit(), isNucleus(), and n8.
lSpin returns 2L+1, where L is the orbital angular momentum Definition at line 378 of file ParticleIdUtils.cc. References digit(), isMeson(), n, nj, and nl. Referenced by lSpin(). { if( !isMeson(pid) ) { return 0; } int inl = digit(nl,pid); //int tent = digit(n,pid); int js = digit(nj,pid); if( digit(n,pid) == 9 ) { return 0; } // tentative ID if( inl == 0 && js == 3 ) { return 0; } else if( inl == 0 && js == 5 ) { return 1; } else if( inl == 0 && js == 7 ) { return 2; } else if( inl == 0 && js == 9 ) { return 3; } else if( inl == 0 && js == 1 ) { return 0; } else if( inl == 1 && js == 3 ) { return 1; } else if( inl == 1 && js == 5 ) { return 2; } else if( inl == 1 && js == 7 ) { return 3; } else if( inl == 1 && js == 9 ) { return 4; } else if( inl == 2 && js == 3 ) { return 1; } else if( inl == 2 && js == 5 ) { return 2; } else if( inl == 2 && js == 7 ) { return 3; } else if( inl == 2 && js == 9 ) { return 4; } else if( inl == 1 && js == 1 ) { return 1; } else if( inl == 3 && js == 3 ) { return 2; } else if( inl == 3 && js == 5 ) { return 3; } else if( inl == 3 && js == 7 ) { return 4; } else if( inl == 3 && js == 9 ) { return 5; } // default to zero return 0; }
lSpin returns 2L+1, where L is the orbital angular momentum Definition at line 155 of file ParticleIdUtils.hh. References lSpin(), and Particle::pdgId(). { return lSpin(p.pdgId()); }
sSpin returns 2S+1, where S is the spin Definition at line 353 of file ParticleIdUtils.cc. References digit(), isMeson(), n, nj, and nl. Referenced by sSpin(). { if( !isMeson(pid) ) { return 0; } int inl = digit(nl,pid); //int tent = digit(n,pid); int js = digit(nj,pid); if( digit(n,pid) == 9 ) { return 0; } // tentative ID //if( tent == 9 ) { return 0; } // tentative assignment if( inl == 0 && js >= 3 ) { return 1; } else if( inl == 0 && js == 1 ) { return 0; } else if( inl == 1 && js >= 3 ) { return 0; } else if( inl == 2 && js >= 3 ) { return 1; } else if( inl == 1 && js == 1 ) { return 1; } else if( inl == 3 && js >= 3 ) { return 1; } // default to zero return 0; }
sSpin returns 2S+1, where S is the spin Definition at line 153 of file ParticleIdUtils.hh. References Particle::pdgId(), and sSpin(). { return sSpin(p.pdgId()); }
return 3 times the charge (3 x quark charge is an int) Definition at line 427 of file ParticleIdUtils.cc. References abspid(), charge(), digit(), extraBits(), fundamentalID(), isBaryon(), isDiQuark(), isMeson(), nj, nq1, nq2, and nq3. Referenced by H1_1994_S2919893::analyze(), CDF_1993_S2742446::analyze(), D0_2008_S7837160::analyze(), MC_WJETS::analyze(), D0_2010_S8821313::analyze(), ATLAS_2012_I1183818::analyze(), MC_WPOL::analyze(), ATLAS_2012_I1126136::analyze(), MC_ZZJETS::analyze(), ATLAS_2012_I1095236::analyze(), ATLAS_2012_CONF_2012_109::analyze(), MC_SUSY::analyze(), charge(), Rivet::chargedParticleFilter(), ATLAS_2011_I944826::daughtersSurviveCuts(), Rivet::isInvisibleFilter(), Jet::neutralEnergy(), ChargedFinalState::project(), NeutralFinalState::project(), ClusteredPhotons::project(), LeptonClusters::project(), ZFinder::project(), WFinder::project(), and threeCharge(). { int charge=0; int ida, sid; unsigned short q1, q2, q3; static int ch100[100] = { -1, 2,-1, 2,-1, 2,-1, 2, 0, 0, -3, 0,-3, 0,-3, 0,-3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; q1 = digit(nq1,pid); q2 = digit(nq2,pid); q3 = digit(nq3,pid); ida = abspid(pid); sid = fundamentalID(pid); if( ida == 0 || extraBits(pid) > 0 ) { // ion or illegal return 0; } else if( sid > 0 && sid <= 100 ) { // use table charge = ch100[sid-1]; if(ida==1000017 || ida==1000018) { charge = 0; } if(ida==1000034 || ida==1000052) { charge = 0; } if(ida==1000053 || ida==1000054) { charge = 0; } if(ida==5100061 || ida==5100062) { charge = 6; } } else if( digit(nj,pid) == 0 ) { // KL, Ks, or undefined return 0; } else if( isMeson(pid) ) { // mesons if( q2 == 3 || q2 == 5 ) { charge = ch100[q3-1] - ch100[q2-1]; } else { charge = ch100[q2-1] - ch100[q3-1]; } } else if( isDiQuark(pid) ) { // diquarks charge = ch100[q2-1] + ch100[q1-1]; } else if( isBaryon(pid) ) { // baryons charge = ch100[q3-1] + ch100[q2-1] + ch100[q1-1]; } else { // unknown return 0; } if( charge == 0 ) { return 0; } else if( pid < 0 ) { charge = -charge; } return charge; }
return 3 times the charge (3 x quark charge is an int) Definition at line 158 of file ParticleIdUtils.hh. References Particle::pdgId(), and threeCharge(). { return threeCharge(p.pdgId()); }
Definition at line 70 of file ParticleIdUtils.cc. References abspid(), and isNucleus(). Generated on Fri Dec 21 2012 15:04:45 for The Rivet MC analysis system by ![]() |