CMS 3D CMS Logo

PileupJetIdentifier.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 //
3 // PileupJetIdentifier
4 //
5 // Author: P. Musella, P. Harris
6 //--------------------------------------------------------------------------------------------------
7 
8 #include <string>
9 #include <map>
10 
11 #ifndef RecoJets_JetProducers_interface_PileupJetIdentifier_h
12 #define RecoJets_JetProducers_interface_PileupJetIdentifier_h
13 
14 #define DECLARE_VARIABLE(NAME,TYPE) \
15  private: \
16  TYPE NAME ## _; \
17  public: \
18  const TYPE & NAME() const { return NAME ## _; } \
19  void NAME(const TYPE val) { NAME ## _ = val; }
20 
21 // ----------------------------------------------------------------------------------------------------
23 public:
24  friend class PileupJetIdAlgo;
25  friend class MVAJetPuId;
26 
29 
32 
35 
36  DECLARE_VARIABLE(dZ ,float);
38 
40  void RMS(const float val) { dR2Mean(val); }
41  const float & RMS() const { return dR2Mean(); }
42 
44 
47 
55 
60 
67 
70 };
71 
72 // ----------------------------------------------------------------------------------------------------
74 public:
75  friend class PileupJetIdAlgo;
76  friend class MVAJetPuId;
77 
80 
81  PileupJetIdentifier & operator= (const StoredPileupJetIdentifier & lhs) { ((StoredPileupJetIdentifier &)(*this)) = lhs; return *this;}
82 
83  enum Id {
84  kTight = 0,
85  kMedium = 1,
86  kLoose = 2
87  };
88 
89  static bool passJetId(int flag, Id level) { return ( flag & (1 << level) ) != 0 ; }
90 
91  DECLARE_VARIABLE(idFlag ,int);
92  bool passJetId (Id level) { return passJetId(idFlag_,level); }
93 
94  DECLARE_VARIABLE(mva ,float);
95 
97  DECLARE_VARIABLE(jetM ,float);
98 
99  DECLARE_VARIABLE(chgEMfrac ,float);
100  DECLARE_VARIABLE(neuEMfrac ,float);
101  DECLARE_VARIABLE(chgHadrfrac,float);
102  DECLARE_VARIABLE(neuHadrfrac,float);
103 
105  DECLARE_VARIABLE(leadPt ,float);
106  DECLARE_VARIABLE(leadEta ,float);
107  DECLARE_VARIABLE(leadPhi ,float);
108  DECLARE_VARIABLE(secondPt ,float);
109  DECLARE_VARIABLE(secondEta ,float);
110  DECLARE_VARIABLE(secondPhi ,float);
111  DECLARE_VARIABLE(leadNeutPt ,float);
112  DECLARE_VARIABLE(leadNeutEta,float);
113  DECLARE_VARIABLE(leadNeutPhi,float);
114  DECLARE_VARIABLE(leadEmPt ,float);
115  DECLARE_VARIABLE(leadEmEta ,float);
116  DECLARE_VARIABLE(leadEmPhi ,float);
117  DECLARE_VARIABLE(leadChPt ,float);
118  DECLARE_VARIABLE(leadChEta ,float);
119  DECLARE_VARIABLE(leadChPhi ,float);
120 
121  DECLARE_VARIABLE(dRLeadCent ,float);
122  DECLARE_VARIABLE(dRLead2nd ,float);
123  DECLARE_VARIABLE(dRMeanNeut ,float);
124  DECLARE_VARIABLE(dRMeanEm ,float);
125  DECLARE_VARIABLE(dRMeanCh ,float);
126 
127  DECLARE_VARIABLE(ptMean ,float);
128  DECLARE_VARIABLE(ptRMS ,float);
129  DECLARE_VARIABLE(pt2A ,float);
130  DECLARE_VARIABLE(ptDCh ,float);
131  DECLARE_VARIABLE(ptDNe ,float);
133  DECLARE_VARIABLE(sumChPt ,float);
134  DECLARE_VARIABLE(sumNePt ,float);
135 
136  DECLARE_VARIABLE(leadFrac ,float);
137  DECLARE_VARIABLE(secondFrac ,float);
138  DECLARE_VARIABLE(thirdFrac ,float);
139  DECLARE_VARIABLE(fourthFrac ,float);
140 
141  DECLARE_VARIABLE(leadChFrac ,float);
142  DECLARE_VARIABLE(secondChFrac ,float);
143  DECLARE_VARIABLE(thirdChFrac ,float);
144  DECLARE_VARIABLE(fourthChFrac ,float);
145 
146  DECLARE_VARIABLE(leadNeutFrac ,float);
147  DECLARE_VARIABLE(secondNeutFrac ,float);
148  DECLARE_VARIABLE(thirdNeutFrac ,float);
149  DECLARE_VARIABLE(fourthNeutFrac ,float);
150 
151  DECLARE_VARIABLE(leadEmFrac ,float);
152  DECLARE_VARIABLE(secondEmFrac ,float);
153  DECLARE_VARIABLE(thirdEmFrac ,float);
154  DECLARE_VARIABLE(fourthEmFrac ,float);
155 
156  DECLARE_VARIABLE(jetW ,float);
157  DECLARE_VARIABLE(etaW ,float);
158  DECLARE_VARIABLE(phiW ,float);
159 
160  //DECLARE_VARIABLE(majW ,float);
161  //DECLARE_VARIABLE(minW ,float);
162 
163  DECLARE_VARIABLE(chFrac01 ,float);
164  DECLARE_VARIABLE(chFrac02 ,float);
165  DECLARE_VARIABLE(chFrac03 ,float);
166  DECLARE_VARIABLE(chFrac04 ,float);
167  DECLARE_VARIABLE(chFrac05 ,float);
168  DECLARE_VARIABLE(chFrac06 ,float);
169  DECLARE_VARIABLE(chFrac07 ,float);
170 
171  DECLARE_VARIABLE(neutFrac01 ,float);
172  DECLARE_VARIABLE(neutFrac02 ,float);
173  DECLARE_VARIABLE(neutFrac03 ,float);
174  DECLARE_VARIABLE(neutFrac04 ,float);
175  DECLARE_VARIABLE(neutFrac05 ,float);
176  DECLARE_VARIABLE(neutFrac06 ,float);
177  DECLARE_VARIABLE(neutFrac07 ,float);
178 
179  DECLARE_VARIABLE(emFrac01 ,float);
180  DECLARE_VARIABLE(emFrac02 ,float);
181  DECLARE_VARIABLE(emFrac03 ,float);
182  DECLARE_VARIABLE(emFrac04 ,float);
183  DECLARE_VARIABLE(emFrac05 ,float);
184  DECLARE_VARIABLE(emFrac06 ,float);
185  DECLARE_VARIABLE(emFrac07 ,float);
186 
187 };
188 
189 #undef DECLARE_VARIABLE
190 
191 #endif
void RMS(const float val)
a.k.a RMS
const float & frac05() const
const float & betaStarClassic() const
const float & frac03() const
const float & betaClassic() const
const float & jetPt() const
static bool passJetId(int flag, Id level)
const float & majW() const
bool passJetId(Id level)
const float & ptD() const
const float & pull() const
const float & frac07() const
const float & beta() const
const float & nNeutrals() const
const float & dZ() const
const float & nvtx() const
const float & frac04() const
const float & frac01() const
const float & frac06() const
const float & rho() const
const float & dR2Mean() const
const float & jetRchg() const
const float & nParticles() const
const float & RMS() const
#define DECLARE_VARIABLE(NAME, TYPE)
const float & betaStar() const
const float & dRMean() const
const float & minW() const
const float & nTrueInt() const
const float & jetR() const
const float & nCharged() const
const float & frac02() const
const float & dRMatch() const
const float & jetEta() const