File indexing completed on 2024-04-06 12:04:24
0001
0002
0003
0004
0005
0006
0007
0008 #include <string>
0009 #include <map>
0010
0011 #ifndef RecoJets_JetProducers_interface_PileupJetIdentifier_h
0012 #define RecoJets_JetProducers_interface_PileupJetIdentifier_h
0013
0014 #define DECLARE_VARIABLE(NAME, TYPE) \
0015 private: \
0016 TYPE NAME##_ = 0; \
0017 \
0018 public: \
0019 const TYPE &NAME() const { return NAME##_; } \
0020 void NAME(const TYPE val) { NAME##_ = val; }
0021
0022
0023 class StoredPileupJetIdentifier {
0024 public:
0025 friend class PileupJetIdAlgo;
0026 friend class MVAJetPuId;
0027
0028 StoredPileupJetIdentifier();
0029 ~StoredPileupJetIdentifier();
0030
0031 DECLARE_VARIABLE(jetEta, float);
0032 DECLARE_VARIABLE(jetPt, float);
0033
0034 DECLARE_VARIABLE(nCharged, float);
0035 DECLARE_VARIABLE(nNeutrals, float);
0036
0037 DECLARE_VARIABLE(dZ, float);
0038 DECLARE_VARIABLE(nParticles, float);
0039
0040 DECLARE_VARIABLE(dR2Mean, float);
0041 void RMS(const float val) { dR2Mean(val); }
0042 const float &RMS() const { return dR2Mean(); }
0043
0044 DECLARE_VARIABLE(dRMean, float);
0045
0046 DECLARE_VARIABLE(majW, float);
0047 DECLARE_VARIABLE(minW, float);
0048
0049 DECLARE_VARIABLE(frac01, float);
0050 DECLARE_VARIABLE(frac02, float);
0051 DECLARE_VARIABLE(frac03, float);
0052 DECLARE_VARIABLE(frac04, float);
0053 DECLARE_VARIABLE(frac05, float);
0054 DECLARE_VARIABLE(frac06, float);
0055 DECLARE_VARIABLE(frac07, float);
0056
0057 DECLARE_VARIABLE(beta, float);
0058 DECLARE_VARIABLE(betaStar, float);
0059 DECLARE_VARIABLE(betaClassic, float);
0060 DECLARE_VARIABLE(betaStarClassic, float);
0061
0062 DECLARE_VARIABLE(ptD, float);
0063 DECLARE_VARIABLE(rho, float);
0064 DECLARE_VARIABLE(jetR, float);
0065 DECLARE_VARIABLE(jetRchg, float);
0066 DECLARE_VARIABLE(dRMatch, float);
0067 DECLARE_VARIABLE(nTrueInt, float);
0068
0069 DECLARE_VARIABLE(nvtx, float);
0070 DECLARE_VARIABLE(pull, float);
0071 };
0072
0073
0074 class PileupJetIdentifier : public StoredPileupJetIdentifier {
0075 public:
0076 friend class PileupJetIdAlgo;
0077 friend class MVAJetPuId;
0078
0079 PileupJetIdentifier();
0080 ~PileupJetIdentifier();
0081
0082 PileupJetIdentifier &operator=(const StoredPileupJetIdentifier &lhs) {
0083 ((StoredPileupJetIdentifier &)(*this)) = lhs;
0084 return *this;
0085 }
0086
0087 enum Id { kTight = 0, kMedium = 1, kLoose = 2 };
0088
0089 static bool passJetId(int flag, Id level) { return (flag & (1 << level)) != 0; }
0090
0091 DECLARE_VARIABLE(idFlag, int);
0092 bool passJetId(Id level) { return passJetId(idFlag_, level); }
0093
0094 DECLARE_VARIABLE(mva, float);
0095
0096 DECLARE_VARIABLE(jetPhi, float);
0097 DECLARE_VARIABLE(jetM, float);
0098
0099 DECLARE_VARIABLE(chgEMfrac, float);
0100 DECLARE_VARIABLE(neuEMfrac, float);
0101 DECLARE_VARIABLE(chgHadrfrac, float);
0102 DECLARE_VARIABLE(neuHadrfrac, float);
0103
0104 DECLARE_VARIABLE(d0, float);
0105 DECLARE_VARIABLE(leadPt, float);
0106 DECLARE_VARIABLE(leadEta, float);
0107 DECLARE_VARIABLE(leadPhi, float);
0108 DECLARE_VARIABLE(secondPt, float);
0109 DECLARE_VARIABLE(secondEta, float);
0110 DECLARE_VARIABLE(secondPhi, float);
0111 DECLARE_VARIABLE(leadNeutPt, float);
0112 DECLARE_VARIABLE(leadNeutEta, float);
0113 DECLARE_VARIABLE(leadNeutPhi, float);
0114 DECLARE_VARIABLE(leadEmPt, float);
0115 DECLARE_VARIABLE(leadEmEta, float);
0116 DECLARE_VARIABLE(leadEmPhi, float);
0117 DECLARE_VARIABLE(leadChPt, float);
0118 DECLARE_VARIABLE(leadChEta, float);
0119 DECLARE_VARIABLE(leadChPhi, float);
0120
0121 DECLARE_VARIABLE(dRLeadCent, float);
0122 DECLARE_VARIABLE(dRLead2nd, float);
0123 DECLARE_VARIABLE(dRMeanNeut, float);
0124 DECLARE_VARIABLE(dRMeanEm, float);
0125 DECLARE_VARIABLE(dRMeanCh, float);
0126
0127 DECLARE_VARIABLE(ptMean, float);
0128 DECLARE_VARIABLE(ptRMS, float);
0129 DECLARE_VARIABLE(pt2A, float);
0130 DECLARE_VARIABLE(ptDCh, float);
0131 DECLARE_VARIABLE(ptDNe, float);
0132 DECLARE_VARIABLE(sumPt, float);
0133 DECLARE_VARIABLE(sumChPt, float);
0134 DECLARE_VARIABLE(sumNePt, float);
0135
0136 DECLARE_VARIABLE(leadFrac, float);
0137 DECLARE_VARIABLE(secondFrac, float);
0138 DECLARE_VARIABLE(thirdFrac, float);
0139 DECLARE_VARIABLE(fourthFrac, float);
0140
0141 DECLARE_VARIABLE(leadChFrac, float);
0142 DECLARE_VARIABLE(secondChFrac, float);
0143 DECLARE_VARIABLE(thirdChFrac, float);
0144 DECLARE_VARIABLE(fourthChFrac, float);
0145
0146 DECLARE_VARIABLE(leadNeutFrac, float);
0147 DECLARE_VARIABLE(secondNeutFrac, float);
0148 DECLARE_VARIABLE(thirdNeutFrac, float);
0149 DECLARE_VARIABLE(fourthNeutFrac, float);
0150
0151 DECLARE_VARIABLE(leadEmFrac, float);
0152 DECLARE_VARIABLE(secondEmFrac, float);
0153 DECLARE_VARIABLE(thirdEmFrac, float);
0154 DECLARE_VARIABLE(fourthEmFrac, float);
0155
0156 DECLARE_VARIABLE(jetW, float);
0157 DECLARE_VARIABLE(etaW, float);
0158 DECLARE_VARIABLE(phiW, float);
0159
0160
0161
0162
0163 DECLARE_VARIABLE(chFrac01, float);
0164 DECLARE_VARIABLE(chFrac02, float);
0165 DECLARE_VARIABLE(chFrac03, float);
0166 DECLARE_VARIABLE(chFrac04, float);
0167 DECLARE_VARIABLE(chFrac05, float);
0168 DECLARE_VARIABLE(chFrac06, float);
0169 DECLARE_VARIABLE(chFrac07, float);
0170
0171 DECLARE_VARIABLE(neutFrac01, float);
0172 DECLARE_VARIABLE(neutFrac02, float);
0173 DECLARE_VARIABLE(neutFrac03, float);
0174 DECLARE_VARIABLE(neutFrac04, float);
0175 DECLARE_VARIABLE(neutFrac05, float);
0176 DECLARE_VARIABLE(neutFrac06, float);
0177 DECLARE_VARIABLE(neutFrac07, float);
0178
0179 DECLARE_VARIABLE(emFrac01, float);
0180 DECLARE_VARIABLE(emFrac02, float);
0181 DECLARE_VARIABLE(emFrac03, float);
0182 DECLARE_VARIABLE(emFrac04, float);
0183 DECLARE_VARIABLE(emFrac05, float);
0184 DECLARE_VARIABLE(emFrac06, float);
0185 DECLARE_VARIABLE(emFrac07, float);
0186 };
0187
0188 #undef DECLARE_VARIABLE
0189
0190 #endif