CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
28 
29  DECLARE_VARIABLE(jetEta ,float);
30  DECLARE_VARIABLE(jetPt ,float);
31 
32  DECLARE_VARIABLE(nCharged ,float);
33  DECLARE_VARIABLE(nNeutrals,float);
34 
35  DECLARE_VARIABLE(dZ ,float);
36  DECLARE_VARIABLE(nParticles ,float);
37 
38  DECLARE_VARIABLE(dR2Mean ,float);
39  void RMS(const float val) { dR2Mean(val); }
40  const float & RMS() const { return dR2Mean(); }
41 
42  DECLARE_VARIABLE(dRMean ,float);
43 
44  DECLARE_VARIABLE(frac01 ,float);
45  DECLARE_VARIABLE(frac02 ,float);
46  DECLARE_VARIABLE(frac03 ,float);
47  DECLARE_VARIABLE(frac04 ,float);
48  DECLARE_VARIABLE(frac05 ,float);
49  DECLARE_VARIABLE(frac06 ,float);
50  DECLARE_VARIABLE(frac07 ,float);
51 
52  DECLARE_VARIABLE(beta ,float);
53  DECLARE_VARIABLE(betaStar ,float);
54  DECLARE_VARIABLE(betaClassic ,float);
55  DECLARE_VARIABLE(betaStarClassic ,float);
56 
57  DECLARE_VARIABLE(ptD ,float);
58 
59  DECLARE_VARIABLE(nvtx ,float);
60 };
61 
62 // ----------------------------------------------------------------------------------------------------
64 public:
65  friend class PileupJetIdAlgo;
66 
69 
70  PileupJetIdentifier & operator= (const StoredPileupJetIdentifier & lhs) { ((StoredPileupJetIdentifier &)(*this)) = lhs; return *this;}
71 
72  enum Id {
73  kTight = 0,
74  kMedium = 1,
75  kLoose = 2
76  };
77 
78  static bool passJetId(int flag, Id level) { return ( flag & (1 << level) ) != 0 ; }
79 
80  DECLARE_VARIABLE(idFlag ,int);
81  bool passJetId (Id level) { return passJetId(idFlag_,level); }
82 
83  DECLARE_VARIABLE(mva ,float);
84 
85  DECLARE_VARIABLE(jetPhi ,float);
86  DECLARE_VARIABLE(jetM ,float);
87 
88  DECLARE_VARIABLE(chgEMfrac ,float);
89  DECLARE_VARIABLE(neuEMfrac ,float);
90  DECLARE_VARIABLE(chgHadrfrac,float);
91  DECLARE_VARIABLE(neuHadrfrac,float);
92 
93  DECLARE_VARIABLE(d0 ,float);
94  DECLARE_VARIABLE(leadPt ,float);
95  DECLARE_VARIABLE(leadEta ,float);
96  DECLARE_VARIABLE(leadPhi ,float);
97  DECLARE_VARIABLE(secondPt ,float);
98  DECLARE_VARIABLE(secondEta ,float);
99  DECLARE_VARIABLE(secondPhi ,float);
100  DECLARE_VARIABLE(leadNeutPt ,float);
101  DECLARE_VARIABLE(leadNeutEta,float);
102  DECLARE_VARIABLE(leadNeutPhi,float);
103  DECLARE_VARIABLE(leadEmPt ,float);
104  DECLARE_VARIABLE(leadEmEta ,float);
105  DECLARE_VARIABLE(leadEmPhi ,float);
106  DECLARE_VARIABLE(leadChPt ,float);
107  DECLARE_VARIABLE(leadChEta ,float);
108  DECLARE_VARIABLE(leadChPhi ,float);
109 
110  DECLARE_VARIABLE(dRLeadCent ,float);
111  DECLARE_VARIABLE(dRLead2nd ,float);
112  DECLARE_VARIABLE(dRMeanNeut ,float);
113  DECLARE_VARIABLE(dRMeanEm ,float);
114  DECLARE_VARIABLE(dRMeanCh ,float);
115 
116  DECLARE_VARIABLE(ptMean ,float);
117  DECLARE_VARIABLE(ptRMS ,float);
118  DECLARE_VARIABLE(pt2A ,float);
119  DECLARE_VARIABLE(ptDCh ,float);
120  DECLARE_VARIABLE(ptDNe ,float);
121  DECLARE_VARIABLE(sumPt ,float);
122  DECLARE_VARIABLE(sumChPt ,float);
123  DECLARE_VARIABLE(sumNePt ,float);
124 
125  DECLARE_VARIABLE(leadFrac ,float);
126  DECLARE_VARIABLE(secondFrac ,float);
127  DECLARE_VARIABLE(thirdFrac ,float);
128  DECLARE_VARIABLE(fourthFrac ,float);
129 
130  DECLARE_VARIABLE(leadChFrac ,float);
131  DECLARE_VARIABLE(secondChFrac ,float);
132  DECLARE_VARIABLE(thirdChFrac ,float);
133  DECLARE_VARIABLE(fourthChFrac ,float);
134 
135  DECLARE_VARIABLE(leadNeutFrac ,float);
136  DECLARE_VARIABLE(secondNeutFrac ,float);
137  DECLARE_VARIABLE(thirdNeutFrac ,float);
138  DECLARE_VARIABLE(fourthNeutFrac ,float);
139 
140  DECLARE_VARIABLE(leadEmFrac ,float);
141  DECLARE_VARIABLE(secondEmFrac ,float);
142  DECLARE_VARIABLE(thirdEmFrac ,float);
143  DECLARE_VARIABLE(fourthEmFrac ,float);
144 
145  DECLARE_VARIABLE(jetW ,float);
146  DECLARE_VARIABLE(etaW ,float);
147  DECLARE_VARIABLE(phiW ,float);
148 
149  DECLARE_VARIABLE(majW ,float);
150  DECLARE_VARIABLE(minW ,float);
151 
152  DECLARE_VARIABLE(chFrac01 ,float);
153  DECLARE_VARIABLE(chFrac02 ,float);
154  DECLARE_VARIABLE(chFrac03 ,float);
155  DECLARE_VARIABLE(chFrac04 ,float);
156  DECLARE_VARIABLE(chFrac05 ,float);
157  DECLARE_VARIABLE(chFrac06 ,float);
158  DECLARE_VARIABLE(chFrac07 ,float);
159 
160  DECLARE_VARIABLE(neutFrac01 ,float);
161  DECLARE_VARIABLE(neutFrac02 ,float);
162  DECLARE_VARIABLE(neutFrac03 ,float);
163  DECLARE_VARIABLE(neutFrac04 ,float);
164  DECLARE_VARIABLE(neutFrac05 ,float);
165  DECLARE_VARIABLE(neutFrac06 ,float);
166  DECLARE_VARIABLE(neutFrac07 ,float);
167 
168  DECLARE_VARIABLE(emFrac01 ,float);
169  DECLARE_VARIABLE(emFrac02 ,float);
170  DECLARE_VARIABLE(emFrac03 ,float);
171  DECLARE_VARIABLE(emFrac04 ,float);
172  DECLARE_VARIABLE(emFrac05 ,float);
173  DECLARE_VARIABLE(emFrac06 ,float);
174  DECLARE_VARIABLE(emFrac07 ,float);
175 
176 };
177 
178 #undef DECLARE_VARIABLE
179 
180 #endif
const double beta
void RMS(const float val)
a.k.a RMS
static bool passJetId(int flag, Id level)
bool passJetId(Id level)
PileupJetIdentifier & operator=(const StoredPileupJetIdentifier &lhs)
DECLARE_VARIABLE(jetEta, float)
unsigned int nCharged(const GenJet &jet)
const float & RMS() const
DECLARE_VARIABLE(idFlag, int)
tuple level
Definition: testEve_cfg.py:34