|
[Rivet-svn] r4216 - in trunk: . include/Rivet include/Rivet/Math src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgSat Mar 9 21:37:52 GMT 2013
Author: buckley Date: Sat Mar 9 21:37:52 2013 New Revision: 4216 Log: Adding many more 'popular' particle ID code named-consts and aliases, and updating the RapScheme enum with ETA -> ETARAP, and fixing affected analyses (plus other opportunistic tidying / minor bug-fixing). Modified: trunk/ChangeLog trunk/include/Rivet/Math/MathHeader.hh trunk/include/Rivet/ParticleName.hh trunk/src/Analyses/ATLAS_2011_I944826.cc trunk/src/Analyses/CMS_2012_I1087342.cc Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Sat Mar 9 21:35:08 2013 (r4215) +++ trunk/ChangeLog Sat Mar 9 21:37:52 2013 (r4216) @@ -1,5 +1,10 @@ 2013-03-09 Andy Buckley <andy.buckley at cern.ch> + * Adding many more 'popular' particle ID code named-consts and + aliases, and updating the RapScheme enum with ETA -> ETARAP, and + fixing affected analyses (plus other opportunistic tidying / minor + bug-fixing). + * Fixing a symbol misnaming in ATLAS_2012_I1119557. 2013-03-07 Andy Buckley <andy.buckley at cern.ch> Modified: trunk/include/Rivet/Math/MathHeader.hh ============================================================================== --- trunk/include/Rivet/Math/MathHeader.hh Sat Mar 9 21:35:08 2013 (r4215) +++ trunk/include/Rivet/Math/MathHeader.hh Sat Mar 9 21:37:52 2013 (r4216) @@ -57,7 +57,7 @@ enum Sign { MINUS = -1, ZERO = 0, PLUS = 1 }; /// Enum for rapidity variable to be used in calculating \f$ R \f$, applying rapidity cuts, etc. - enum RapScheme { PSEUDORAPIDITY = 0, ETA = 0, RAPIDITY = 1, YRAP = 1 }; + enum RapScheme { PSEUDORAPIDITY = 0, ETARAP = 0, RAPIDITY = 1, YRAP = 1 }; /// Enum for range of \f$ \phi \f$ to be mapped into enum PhiMapping { MINUSPI_PLUSPI, ZERO_2PI, ZERO_PI }; Modified: trunk/include/Rivet/ParticleName.hh ============================================================================== --- trunk/include/Rivet/ParticleName.hh Sat Mar 9 21:35:08 2013 (r4215) +++ trunk/include/Rivet/ParticleName.hh Sat Mar 9 21:37:52 2013 (r4216) @@ -4,68 +4,153 @@ #include "Rivet/Particle.fhh" #include "Rivet/Exceptions.hh" - namespace Rivet { - /// @name Static const convenience particle ID names + /// Static const convenience particle ID names + + + /// Special wildcard particle name + static const PdgId ANY = 10000; + + /// @name Charged leptons //@{ static const PdgId ELECTRON = 11; - static const PdgId POSITRON = -11; - static const PdgId PROTON = 2212; - static const PdgId ANTIPROTON = -2212; - static const PdgId PHOTON = 22; - static const PdgId NEUTRON = 2112; - static const PdgId ANTINEUTRON = -2112; + static const PdgId POSITRON = -ELECTRON; + static const PdgId EMINUS = ELECTRON; + static const PdgId EPLUS = POSITRON; static const PdgId MUON = 13; - static const PdgId ANTIMUON = -13; + static const PdgId ANTIMUON = -MUON; + static const PdgId TAU = 15; + static const PdgId ANTITAU = -TAU; + //@} + + /// @name Neutrinos + //@{ static const PdgId NU_E = 12; - static const PdgId NU_EBAR = -12; + static const PdgId NU_EBAR = -NU_E; static const PdgId NU_MU = 14; - static const PdgId NU_MUBAR = -14; + static const PdgId NU_MUBAR = -NU_MU; static const PdgId NU_TAU = 16; - static const PdgId NU_TAUBAR = -16; - static const PdgId PIPLUS = 211; - static const PdgId PIMINUS = -211; - static const PdgId PI0 = 111; - static const PdgId K0L = 130; - static const PdgId K0S = 310; - static const PdgId KPLUS = 321; - static const PdgId KMINUS = -321; - static const PdgId LAMBDA = 3122; - static const PdgId LAMBDABAR = -3122; - static const PdgId XIMINUS = 3312; - static const PdgId XIPLUS = -3312; - static const PdgId OMEGAMINUS = 3334; - static const PdgId OMEGAPLUS = -3334; - static const PdgId TAU = 15; - static const PdgId ANTITAU = -15; - static const PdgId EMINUS = 11; - static const PdgId EPLUS = -11; - static const PdgId P = 2212; - static const PdgId PBAR = -2212; + static const PdgId NU_TAUBAR = -NU_TAU; + //@} + + /// @name Bosons + //@{ + static const PdgId PHOTON = 22; + static const PdgId GAMMA = PHOTON; static const PdgId GLUON = 21; - static const PdgId GAMMA = 22; static const PdgId WPLUSBOSON = 24; - static const PdgId WMINUSBOSON = -24; - static const PdgId ZBOSON = 23; - static const PdgId HIGGS = 25; + static const PdgId WMINUSBOSON = -WPLUSBOSON; + static const PdgId WPLUS = WPLUSBOSON; + static const PdgId WMINUS = WMINUSBOSON; + static const PdgId Z0BOSON = 23; + static const PdgId ZBOSON = Z0BOSON; + static const PdgId Z0 = Z0BOSON; + static const PdgId HIGGSBOSON = 25; + static const PdgId HIGGS = HIGGSBOSON; + //@} + + /// @name Quarks + //@{ static const PdgId DQUARK = 1; static const PdgId UQUARK = 2; static const PdgId SQUARK = 3; static const PdgId CQUARK = 4; static const PdgId BQUARK = 5; static const PdgId TQUARK = 6; - static const PdgId ANY = 10000; - // static const PdgId PHOTOELECTRON; - // static const PdgId PHOTOPOSITRON; - // static const PdgId PHOTOMUON; - // static const PdgId PHOTOANTIMUON; - // static const PdgId PHOTOTAU; - // static const PdgId PHOTOANTITAU; //@} + /// @name Nucleons + //@{ + static const PdgId PROTON = 2212; + static const PdgId ANTIPROTON = -PROTON; + static const PdgId PBAR = ANTIPROTON; + static const PdgId NEUTRON = 2112; + static const PdgId ANTINEUTRON = -NEUTRON; + //@} + + /// @name Light mesons + //@{ + static const PdgId PI0 = 111; + static const PdgId PIPLUS = 211; + static const PdgId PIMINUS = -PIPLUS; + static const PdgId K0L = 130; + static const PdgId K0S = 310; + static const PdgId KPLUS = 321; + static const PdgId KMINUS = -KPLUS; + static const PdgId ETA = 221; + static const PdgId ETAPRIME = 331; + static const PdgId PHI = 333; + static const PdgId OMEGA = 223; + //@} + + /// @name Charmonia + //@{ + static const PdgId ETAC = 441; + static const PdgId JPSI = 443; + static const PdgId PSI2S = 100443; + //@} + + /// @name Charm mesons + //@{ + static const PdgId D0 = 421; + static const PdgId DPLUS = 411; + static const PdgId DMINUS = -DPLUS; + static const PdgId DSPLUS = 431; + static const PdgId DSMINUS = -DSPLUS; + //@} + + /// @name Bottomonia + //@{ + static const PdgId ETAB = 551; + static const PdgId UPSILON1S = 553; + static const PdgId UPSILON2S = 100553; + static const PdgId UPSILON3S = 200553; + static const PdgId UPSILON4S = 300553; + //@} + + /// @name b mesons + //@{ + static const PdgId B0 = 511; + static const PdgId BPLUS = 521; + static const PdgId BMINUS = -BPLUS; + static const PdgId B0S = 531; + static const PdgId BCPLUS = 541; + static const PdgId BCMINUS = -BCPLUS; + //@} + /// @name Baryons + //@{ + static const PdgId LAMBDA = 3122; + static const PdgId SIGMA0 = 3212; + static const PdgId SIGMAPLUS = 3222; + static const PdgId SIGMAMINUS = 3112; + static const PdgId LAMBDACPLUS = 4122; + static const PdgId LAMBDACMINUS = 4122; + static const PdgId LAMBDAB = 5122; + static const PdgId XI0 = 3322; + static const PdgId XIMINUS = 3312; + static const PdgId XIPLUS = -XIMINUS; + static const PdgId OMEGAMINUS = 3334; + static const PdgId OMEGAPLUS = -OMEGAPLUS; + //@} + + /// @name Exotic/weird stuff + //@{ + static const PdgId REGGEON = 110; + static const PdgId POMERON = 990; + static const PdgId ODDERON = 9990; + static const PdgId GRAVITON = 39; + static const PdgId NEUTRALINO1 = 1000022; + static const PdgId GRAVITINO = 1000039; + static const PdgId GLUINO = 1000021; + /// @todo Add axion, black hole remnant, etc. on demand + //@} + + + + /// Handler for particle name code <-> string conversion class ParticleNames { public: @@ -79,15 +164,12 @@ return _instance->_particleId(pname); } - public: const std::string& _particleName(PdgId pid); - PdgId _particleId(const std::string& pname); - private: ParticleNames() { @@ -114,12 +196,6 @@ _add_pid_name(ZBOSON, "ZBOSON"); _add_pid_name(HIGGS, "HIGGS"); _add_pid_name(ANTITAU, "ANTITAU"); - // _add_pid_name(PHOTOELECTRON, "PHOTOELECTRON"); - // _add_pid_name(PHOTOPOSITRON, "PHOTOPOSITRON"); - // _add_pid_name(PHOTOMUON, "PHOTOMUON"); - // _add_pid_name(PHOTOANTIMUON, "PHOTOANTIMUON"); - // _add_pid_name(PHOTOTAU, "PHOTOTAU"); - // _add_pid_name(PHOTOANTITAU, "PHOTOANTITAU"); _add_pid_name(ANY, "*"); } @@ -128,7 +204,6 @@ _names_ids[pname] = pid; } - static ParticleNames* _instance; std::map<PdgId, std::string> _ids_names; Modified: trunk/src/Analyses/ATLAS_2011_I944826.cc ============================================================================== --- trunk/src/Analyses/ATLAS_2011_I944826.cc Sat Mar 9 21:35:08 2013 (r4215) +++ trunk/src/Analyses/ATLAS_2011_I944826.cc Sat Mar 9 21:37:52 2013 (r4216) @@ -42,7 +42,7 @@ .acceptIdPair(MUON) .acceptIdPair(PIPLUS) .acceptIdPair(KPLUS) - .acceptIdPair(P); + .acceptIdPair(PROTON); addProjection(nstable, "nstable"); if (fuzzyEquals(sqrtS()*GeV, 7000, 1E-3)) { Modified: trunk/src/Analyses/CMS_2012_I1087342.cc ============================================================================== --- trunk/src/Analyses/CMS_2012_I1087342.cc Sat Mar 9 21:35:08 2013 (r4215) +++ trunk/src/Analyses/CMS_2012_I1087342.cc Sat Mar 9 21:37:52 2013 (r4216) @@ -25,31 +25,31 @@ _hist_jetpt_central = bookHisto1D(3,1,1); } - void analyze(const Event &event) { + void analyze(const Event& event) { const double weight = event.weight(); - const FastJets &fj = applyProjection<FastJets>(event,"Jets"); - const Jets jets = fj.jets(35*GeV, 150*GeV, -4.7, 4.7, ETA); + const FastJets& fj = applyProjection<FastJets>(event,"Jets"); + const Jets jets = fj.jets(35*GeV, 150*GeV, -4.7, 4.7, ETARAP); - double cjet_pt=0.0; - double fjet_pt=0.0; + double cjet_pt = 0.0; + double fjet_pt = 0.0; - foreach(const Jet &j, jets) { - if(j.momentum().eta() > 3.2 || j.momentum().eta() < -3.2) { - _hist_jetpt_fwdincl -> fill(j.momentum().pT(), weight); + foreach(const Jet& j, jets) { + double pT = j.momentum().pT(); + if (j.momentum().eta() > 3.2 || j.momentum().eta() < -3.2) { + _hist_jetpt_fwdincl->fill(j.momentum().pT()/GeV, weight); } - double pT = j.momentum().pT()*GeV; if (fabs(j.momentum().eta()) < 2.8) { - if(cjet_pt < pT) cjet_pt = pT; + if (cjet_pt < pT) cjet_pt = pT; } if (fabs(j.momentum().eta()) < 4.7 && fabs(j.momentum().eta()) > 3.2) { - if(fjet_pt < pT) fjet_pt = pT; + if (fjet_pt < pT) fjet_pt = pT; } } - if (cjet_pt > 35 && fjet_pt > 35) { - _hist_jetpt_forward->fill(fjet_pt, weight); - _hist_jetpt_central->fill(cjet_pt, weight); + if (cjet_pt > 35*GeV && fjet_pt > 35*GeV) { + _hist_jetpt_forward->fill(fjet_pt/GeV, weight); + _hist_jetpt_central->fill(cjet_pt/GeV, weight); } } @@ -62,6 +62,7 @@ private: + Histo1DPtr _hist_jetpt_fwdincl; Histo1DPtr _hist_jetpt_forward; Histo1DPtr _hist_jetpt_central;
More information about the Rivet-svn mailing list |