CMS 3D CMS Logo

JetTester.cc
Go to the documentation of this file.
1 // Producer for validation histograms for Calo, JPT and PF jet objects
2 // F. Ratnikov, Sept. 7, 2006
3 // Modified by Chiyoung Jeong, Feb. 2, 2010
4 // Modified by J. Piedra, Sept. 11, 2013
5 
6 #include "JetTester.h"
7 
8 using namespace edm;
9 using namespace reco;
10 using namespace std;
11 
13  : mInputCollection(iConfig.getParameter<edm::InputTag>("src")),
14  // rhoTag (iConfig.getParameter<edm::InputTag>
15  // ("srcRho")),
16  JetType(iConfig.getUntrackedParameter<std::string>("JetType")),
17  mRecoJetPtThreshold(iConfig.getParameter<double>("recoJetPtThreshold")),
18  mMatchGenPtThreshold(iConfig.getParameter<double>("matchGenPtThreshold")),
19  mRThreshold(iConfig.getParameter<double>("RThreshold")) {
20  std::string inputCollectionLabel(mInputCollection.label());
21 
22  isCaloJet = (std::string("calo") == JetType);
23  isPFJet = (std::string("pf") == JetType);
24  isMiniAODJet = (std::string("miniaod") == JetType);
25  if (!isMiniAODJet) {
26  mJetCorrector = iConfig.getParameter<edm::InputTag>("JetCorrections");
27  }
28 
29  // consumes
30  pvToken_ = consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("primVertex"));
31  if (isCaloJet)
32  caloJetsToken_ = consumes<reco::CaloJetCollection>(mInputCollection);
33  if (isPFJet)
34  pfJetsToken_ = consumes<reco::PFJetCollection>(mInputCollection);
35  if (isMiniAODJet)
36  patJetsToken_ = consumes<pat::JetCollection>(mInputCollection);
37  mInputGenCollection = iConfig.getParameter<edm::InputTag>("srcGen");
38  genJetsToken_ = consumes<reco::GenJetCollection>(edm::InputTag(mInputGenCollection));
39  evtToken_ = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
40  if (!isMiniAODJet && !mJetCorrector.label().empty()) {
41  jetCorrectorToken_ = consumes<reco::JetCorrector>(mJetCorrector);
42  }
43 
44  // Events variables
45  mNvtx = nullptr;
46 
47  // Jet parameters
48  mEta = nullptr;
49  mPhi = nullptr;
50  mEnergy = nullptr;
51  mP = nullptr;
52  mPt = nullptr;
53  mMass = nullptr;
54  mConstituents = nullptr;
55  mJetArea = nullptr;
56  // mRho = 0;
57 
58  // Corrected jets
59  mCorrJetPt = nullptr;
60  mCorrJetEta = nullptr;
61  mCorrJetPhi = nullptr;
62  mCorrJetEta_Pt40 = nullptr;
63  mCorrJetPhi_Pt40 = nullptr;
64 
65  // Corrected jets profiles
66  mPtCorrOverReco_Pt_B = nullptr;
67  mPtCorrOverReco_Pt_E = nullptr;
68  mPtCorrOverReco_Pt_F = nullptr;
69  mPtCorrOverReco_Eta_20_40 = nullptr;
76  mPtCorrOverReco_Eta_3500 = nullptr;
77  mPtCorrOverGen_GenPt_B = nullptr;
78  mPtCorrOverGen_GenPt_E = nullptr;
79  mPtCorrOverGen_GenPt_F = nullptr;
88 
89  // Generation
90  mGenEta = nullptr;
91  mGenPhi = nullptr;
92  mGenPt = nullptr;
93  mGenEtaFirst = nullptr;
94  mGenPhiFirst = nullptr;
95  mPtHat = nullptr;
96  mDeltaEta = nullptr;
97  mDeltaPhi = nullptr;
98  mDeltaPt = nullptr;
99 
100  mPtRecoOverGen_B_20_40 = nullptr;
101  mPtRecoOverGen_E_20_40 = nullptr;
102  mPtRecoOverGen_F_20_40 = nullptr;
103  mPtRecoOverGen_B_40_200 = nullptr;
104  mPtRecoOverGen_E_40_200 = nullptr;
105  mPtRecoOverGen_F_40_200 = nullptr;
106  mPtRecoOverGen_B_200_600 = nullptr;
107  mPtRecoOverGen_E_200_600 = nullptr;
108  mPtRecoOverGen_F_200_600 = nullptr;
109  mPtRecoOverGen_B_600_1500 = nullptr;
110  mPtRecoOverGen_E_600_1500 = nullptr;
111  mPtRecoOverGen_F_600_1500 = nullptr;
112  mPtRecoOverGen_B_1500_3500 = nullptr;
113  mPtRecoOverGen_E_1500_3500 = nullptr;
114  mPtRecoOverGen_F_1500_3500 = nullptr;
115  mPtRecoOverGen_B_3500_5000 = nullptr;
116  mPtRecoOverGen_E_3500_5000 = nullptr;
117  mPtRecoOverGen_B_5000_6500 = nullptr;
118  mPtRecoOverGen_E_5000_6500 = nullptr;
119  mPtRecoOverGen_B_3500 = nullptr;
120  mPtRecoOverGen_E_3500 = nullptr;
121  mPtRecoOverGen_F_3500 = nullptr;
122 
123  // Generation profiles
124  mPtRecoOverGen_GenPt_B = nullptr;
125  mPtRecoOverGen_GenPt_E = nullptr;
126  mPtRecoOverGen_GenPt_F = nullptr;
127  mPtRecoOverGen_GenPhi_B = nullptr;
128  mPtRecoOverGen_GenPhi_E = nullptr;
129  mPtRecoOverGen_GenPhi_F = nullptr;
130  mPtRecoOverGen_GenEta_20_40 = nullptr;
137  mPtRecoOverGen_GenEta_3500 = nullptr;
138 
139  // Some jet algebra
140  mEtaFirst = nullptr;
141  mPhiFirst = nullptr;
142  mPtFirst = nullptr;
143  mMjj = nullptr;
144  mNJetsEta_B_20_40 = nullptr;
145  mNJetsEta_E_20_40 = nullptr;
146  mNJetsEta_B_40 = nullptr;
147  mNJetsEta_E_40 = nullptr;
148  mNJets1 = nullptr;
149  mNJets2 = nullptr;
150 
151  // // PFJet specific
152  // mHadEnergyInHF = 0;
153  // mEmEnergyInHF = 0;
154  // mChargedEmEnergy = 0;
155  // mChargedHadronEnergy = 0;
156  // mNeutralEmEnergy = 0;
157  // mNeutralHadronEnergy = 0;
158 
159  // ---- Calo Jet specific information ----
161  maxEInEmTowers = nullptr;
163  maxEInHadTowers = nullptr;
165  energyFractionHadronic = nullptr;
167  emEnergyFraction = nullptr;
169  hadEnergyInHB = nullptr;
171  hadEnergyInHO = nullptr;
173  hadEnergyInHE = nullptr;
175  hadEnergyInHF = nullptr;
177  emEnergyInEB = nullptr;
179  emEnergyInEE = nullptr;
181  emEnergyInHF = nullptr;
183  towersArea = nullptr;
186  n90 = nullptr;
189  n60 = nullptr;
190 
191  // ---- JPT Jet specific information ----
193  // elecMultiplicity = 0;
194 
195  // ---- JPT or PF Jet specific information ----
197  muonMultiplicity = nullptr;
199  chargedMultiplicity = nullptr;
201  chargedEmEnergy = nullptr;
203  neutralEmEnergy = nullptr;
205  chargedHadronEnergy = nullptr;
207  neutralHadronEnergy = nullptr;
209  chargedHadronEnergyFraction = nullptr;
211  neutralHadronEnergyFraction = nullptr;
213  chargedEmEnergyFraction = nullptr;
215  neutralEmEnergyFraction = nullptr;
216 
217  // ---- PF Jet specific information ----
219  photonEnergy = nullptr;
221  photonEnergyFraction = nullptr;
223  electronEnergy = nullptr;
225  electronEnergyFraction = nullptr;
227  muonEnergy = nullptr;
229  muonEnergyFraction = nullptr;
231  HFHadronEnergy = nullptr;
233  HFHadronEnergyFraction = nullptr;
235  HFEMEnergy = nullptr;
237  HFEMEnergyFraction = nullptr;
239  chargedHadronMultiplicity = nullptr;
241  neutralHadronMultiplicity = nullptr;
243  photonMultiplicity = nullptr;
245  electronMultiplicity = nullptr;
247  HFHadronMultiplicity = nullptr;
249  HFEMMultiplicity = nullptr;
251  chargedMuEnergy = nullptr;
253  chargedMuEnergyFraction = nullptr;
255  neutralMultiplicity = nullptr;
256 
258  HOEnergy = nullptr;
260  HOEnergyFraction = nullptr;
261 
262  hadronFlavor = nullptr;
263  partonFlavor = nullptr;
264  genPartonPDGID = nullptr;
265 }
266 
268  ibooker.setCurrentFolder("JetMET/JetValidation/" + mInputCollection.label());
269 
270  double log10PtMin = 0.50;
271  double log10PtMax = 3.75;
272  int log10PtBins = 26;
273 
274  // if eta range changed here need change in JetTesterPostProcessor as well
275  double etaRange[91] = {-6.0, -5.8, -5.6, -5.4, -5.2, -5.0, -4.8, -4.6, -4.4, -4.2, -4.0, -3.8, -3.6, -3.4, -3.2, -3.0,
276  -2.9, -2.8, -2.7, -2.6, -2.5, -2.4, -2.3, -2.2, -2.1, -2.0, -1.9, -1.8, -1.7, -1.6, -1.5, -1.4,
277  -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0.0, 0.1, 0.2,
278  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8,
279  1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.2, 3.4, 3.6, 3.8,
280  4.0, 4.2, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0};
281 
282  // Event variables
283  mNvtx = ibooker.book1D("Nvtx", "number of vertices", 60, 0, 60);
284 
285  // Jet parameters
286  mEta = ibooker.book1D("Eta", "Eta", 120, -6, 6);
287  mPhi = ibooker.book1D("Phi", "Phi", 70, -3.5, 3.5);
288  mPt = ibooker.book1D("Pt", "Pt", 100, 0, 1000);
289  mP = ibooker.book1D("P", "P", 100, 0, 1000);
290  mEnergy = ibooker.book1D("Energy", "Energy", 100, 0, 1000);
291  mMass = ibooker.book1D("Mass", "Mass", 100, 0, 200);
292  mConstituents = ibooker.book1D("Constituents", "Constituents", 100, 0, 100);
293  mJetArea = ibooker.book1D("JetArea", "JetArea", 100, 0, 4);
294  // jet flavors contained in MiniAOD
295  if (isMiniAODJet) {
296  hadronFlavor = ibooker.book1D("HadronFlavor", "HadronFlavor", 44, -22, 22);
297  partonFlavor = ibooker.book1D("PartonFlavor", "PartonFlavor", 44, -22, 22);
298  genPartonPDGID = ibooker.book1D("genPartonPDGID", "genPartonPDGID", 44, -22, 22);
299  }
300  // Corrected jets
301  if (isMiniAODJet || !mJetCorrector.label().empty()) { // if correction label is filled, but
302  // fill also for MiniAOD though
303  mCorrJetPt = ibooker.book1D("CorrJetPt", "CorrJetPt", 150, 0, 1500);
304  mCorrJetEta = ibooker.book1D("CorrJetEta", "CorrJetEta Pt>20", 60, -6, 6);
305  mCorrJetPhi = ibooker.book1D("CorrJetPhi", "CorrJetPhi Pt>20", 70, -3.5, 3.5);
306  mCorrJetEta_Pt40 = ibooker.book1D("CorrJetEta_Pt40", "CorrJetEta Pt>40", 60, -6, 6);
307  mCorrJetPhi_Pt40 = ibooker.book1D("CorrJetPhi_Pt40", "CorrJetPhi Pt>40", 70, -3.5, 3.5);
308 
309  // Corrected jets profiles
311  ibooker.bookProfile("PtCorrOverReco_Pt_B", "0<|eta|<1.5", log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
313  ibooker.bookProfile("PtCorrOverReco_Pt_E", "1.5<|eta|<3", log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
315  ibooker.bookProfile("PtCorrOverReco_Pt_F", "3<|eta|<6", log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
316 
317  mPtCorrOverReco_Eta_20_40 = ibooker.bookProfile("PtCorrOverReco_Eta_20_40", "20<genPt<40", 90, etaRange, 0, 5, " ");
319  ibooker.bookProfile("PtCorrOverReco_Eta_40_200", "40<genPt<200", 90, etaRange, 0, 5, " ");
321  ibooker.bookProfile("PtCorrOverReco_Eta_200_600", "200<genPt<600", 90, etaRange, 0, 5, " ");
323  ibooker.bookProfile("PtCorrOverReco_Eta_600_1500", "600<genPt<1500", 90, etaRange, 0, 5, " ");
325  ibooker.bookProfile("PtCorrOverReco_Eta_1500_3500", "1500<genPt<3500", 90, etaRange, 0, 5, " ");
327  ibooker.bookProfile("PtCorrOverReco_Eta_3500_5000", "3500<genPt<5000", 90, etaRange, 0, 5, " ");
329  ibooker.bookProfile("PtCorrOverReco_Eta_5000_6500", "5000<genPt<6500", 90, etaRange, 0, 5, " ");
330  mPtCorrOverReco_Eta_3500 = ibooker.bookProfile("PtCorrOverReco_Eta_3500", "genPt>3500", 90, etaRange, 0, 5, " ");
331 
333  ibooker.bookProfile("PtCorrOverGen_GenPt_B", "0<|eta|<1.5", log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
335  ibooker.bookProfile("PtCorrOverGen_GenPt_E", "1.5<|eta|<3", log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
337  ibooker.bookProfile("PtCorrOverGen_GenPt_F", "3<|eta|<6", log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
338  // if eta range changed here need change in JetTesterPostProcessor as well
340  ibooker.bookProfile("PtCorrOverGen_GenEta_20_40", "20<genPt<40;#eta", 90, etaRange, 0.8, 1.2, " ");
342  ibooker.bookProfile("PtCorrOverGen_GenEta_40_200", "40<genPt<200;#eta", 90, etaRange, 0.8, 1.2, " ");
344  ibooker.bookProfile("PtCorrOverGen_GenEta_200_600", "200<genPt<600;#eta", 90, etaRange, 0.8, 1.2, " ");
346  ibooker.bookProfile("PtCorrOverGen_GenEta_600_1500", "600<genPt<1500;#eta", 90, etaRange, 0.8, 1.2, " ");
348  ibooker.bookProfile("PtCorrOverGen_GenEta_1500_3500", "1500<genPt<3500;#eta", 90, etaRange, 0.8, 1.2, " ");
350  ibooker.bookProfile("PtCorrOverGen_GenEta_3500_5000", "3500<genPt<5000;#eta", 90, etaRange, 0.8, 1.2, " ");
352  ibooker.bookProfile("PtCorrOverGen_GenEta_5000_6500", "5000<genPt<6500;#eta", 90, etaRange, 0.8, 1.2, " ");
354  ibooker.bookProfile("PtCorrOverGen_GenEta_3500", "genPt>3500;#eta", 90, etaRange, 0.8, 1.2, " ");
355  }
356 
357  mGenEta = ibooker.book1D("GenEta", "GenEta", 120, -6, 6);
358  mGenPhi = ibooker.book1D("GenPhi", "GenPhi", 70, -3.5, 3.5);
359  mGenPt = ibooker.book1D("GenPt", "GenPt", 100, 0, 1000);
360  mGenEtaFirst = ibooker.book1D("GenEtaFirst", "GenEtaFirst", 120, -6, 6);
361  mGenPhiFirst = ibooker.book1D("GenPhiFirst", "GenPhiFirst", 70, -3.5, 3.5);
362  mPtHat = ibooker.book1D("PtHat", "PtHat", 100, 0, 1000);
363  mDeltaEta = ibooker.book1D("DeltaEta", "DeltaEta", 100, -0.5, 0.5);
364  mDeltaPhi = ibooker.book1D("DeltaPhi", "DeltaPhi", 100, -0.5, 0.5);
365  mDeltaPt = ibooker.book1D("DeltaPt", "DeltaPt", 100, -1.0, 1.0);
366 
367  mPtRecoOverGen_B_20_40 = ibooker.book1D("PtRecoOverGen_B_20_40", "20<genpt<40", 90, 0, 2);
368  mPtRecoOverGen_E_20_40 = ibooker.book1D("PtRecoOverGen_E_20_40", "20<genpt<40", 90, 0, 2);
369  mPtRecoOverGen_F_20_40 = ibooker.book1D("PtRecoOverGen_F_20_40", "20<genpt<40", 90, 0, 2);
370  mPtRecoOverGen_B_40_200 = ibooker.book1D("PtRecoOverGen_B_40_200", "40<genpt<200", 90, 0, 2);
371  mPtRecoOverGen_E_40_200 = ibooker.book1D("PtRecoOverGen_E_40_200", "40<genpt<200", 90, 0, 2);
372  mPtRecoOverGen_F_40_200 = ibooker.book1D("PtRecoOverGen_F_40_200", "40<genpt<200", 90, 0, 2);
373  mPtRecoOverGen_B_200_600 = ibooker.book1D("PtRecoOverGen_B_200_600", "200<genpt<600", 90, 0, 2);
374  mPtRecoOverGen_E_200_600 = ibooker.book1D("PtRecoOverGen_E_200_600", "200<genpt<600", 90, 0, 2);
375  mPtRecoOverGen_F_200_600 = ibooker.book1D("PtRecoOverGen_F_200_600", "200<genpt<600", 90, 0, 2);
376  mPtRecoOverGen_B_600_1500 = ibooker.book1D("PtRecoOverGen_B_600_1500", "600<genpt<1500", 90, 0, 2);
377  mPtRecoOverGen_E_600_1500 = ibooker.book1D("PtRecoOverGen_E_600_1500", "600<genpt<1500", 90, 0, 2);
378  mPtRecoOverGen_F_600_1500 = ibooker.book1D("PtRecoOverGen_F_600_1500", "600<genpt<1500", 90, 0, 2);
379  mPtRecoOverGen_B_1500_3500 = ibooker.book1D("PtRecoOverGen_B_1500_3500", "1500<genpt<3500", 90, 0, 2);
380  mPtRecoOverGen_E_1500_3500 = ibooker.book1D("PtRecoOverGen_E_1500_3500", "1500<genpt<3500", 90, 0, 2);
381  mPtRecoOverGen_F_1500_3500 = ibooker.book1D("PtRecoOverGen_F_1500_3500", "1500<genpt<3500", 90, 0, 2);
382  mPtRecoOverGen_B_3500_5000 = ibooker.book1D("PtRecoOverGen_B_3500_5000", "3500<genpt<5000", 90, 0, 2);
383  mPtRecoOverGen_E_3500_5000 = ibooker.book1D("PtRecoOverGen_E_3500_5000", "3500<genpt<5000", 90, 0, 2);
384  mPtRecoOverGen_B_5000_6500 = ibooker.book1D("PtRecoOverGen_B_5000_6500", "5000<genpt<6500", 90, 0, 2);
385  mPtRecoOverGen_E_5000_6500 = ibooker.book1D("PtRecoOverGen_E_5000_6500", "5000<genpt<6500", 90, 0, 2);
386  mPtRecoOverGen_B_3500 = ibooker.book1D("PtRecoOverGen_B_3500", "genpt>3500", 90, 0, 2);
387  mPtRecoOverGen_E_3500 = ibooker.book1D("PtRecoOverGen_E_3500", "genpt>3500", 90, 0, 2);
388  mPtRecoOverGen_F_3500 = ibooker.book1D("PtRecoOverGen_F_3500", "genpt>3500", 90, 0, 2);
389 
390  mMassRecoOverGen_B_20_40 = ibooker.book1D("MassRecoOverGen_B_20_40", "20<genpt<40", 90, 0, 3);
391  mMassRecoOverGen_E_20_40 = ibooker.book1D("MassRecoOverGen_E_20_40", "20<genpt<40", 90, 0, 3);
392  mMassRecoOverGen_F_20_40 = ibooker.book1D("MassRecoOverGen_F_20_40", "20<genpt<40", 90, 0, 3);
393  mMassRecoOverGen_B_40_200 = ibooker.book1D("MassRecoOverGen_B_40_200", "40<genpt<200", 90, 0, 3);
394  mMassRecoOverGen_E_40_200 = ibooker.book1D("MassRecoOverGen_E_40_200", "40<genpt<200", 90, 0, 3);
395  mMassRecoOverGen_F_40_200 = ibooker.book1D("MassRecoOverGen_F_40_200", "40<genpt<200", 90, 0, 3);
396  mMassRecoOverGen_B_200_500 = ibooker.book1D("MassRecoOverGen_B_200_500", "200<genpt<500", 90, 0, 3);
397  mMassRecoOverGen_E_200_500 = ibooker.book1D("MassRecoOverGen_E_200_500", "200<genpt<500", 90, 0, 3);
398  mMassRecoOverGen_F_200_500 = ibooker.book1D("MassRecoOverGen_F_200_500", "200<genpt<500", 90, 0, 3);
399  mMassRecoOverGen_B_500_750 = ibooker.book1D("MassRecoOverGen_B_500_750", "500<genpt<750", 90, 0, 3);
400  mMassRecoOverGen_E_500_750 = ibooker.book1D("MassRecoOverGen_E_500_750", "500<genpt<750", 90, 0, 3);
401  mMassRecoOverGen_F_500_750 = ibooker.book1D("MassRecoOverGen_F_500_750", "500<genpt<750", 90, 0, 3);
402  mMassRecoOverGen_B_750_1000 = ibooker.book1D("MassRecoOverGen_B_750_1000", "750<genpt<1000", 90, 0, 3);
403  mMassRecoOverGen_E_750_1000 = ibooker.book1D("MassRecoOverGen_E_750_1000", "750<genpt<1000", 90, 0, 3);
404  mMassRecoOverGen_F_750_1000 = ibooker.book1D("MassRecoOverGen_F_750_1000", "750<genpt<1000", 90, 0, 3);
405  mMassRecoOverGen_B_1000_1500 = ibooker.book1D("MassRecoOverGen_B_1000_1500", "1000<genpt<1500", 90, 0, 3);
406  mMassRecoOverGen_E_1000_1500 = ibooker.book1D("MassRecoOverGen_E_1000_1500", "1000<genpt<1500", 90, 0, 3);
407  mMassRecoOverGen_F_1000_1500 = ibooker.book1D("MassRecoOverGen_F_1000_1500", "1000<genpt<1500", 90, 0, 3);
408  mMassRecoOverGen_B_1500_3500 = ibooker.book1D("MassRecoOverGen_B_1500_3500", "1500<genpt<3500", 90, 0, 3);
409  mMassRecoOverGen_E_1500_3500 = ibooker.book1D("MassRecoOverGen_E_1500_3500", "1500<genpt<3500", 90, 0, 3);
410  mMassRecoOverGen_F_1500 = ibooker.book1D("MassRecoOverGen_F_1500", "genpt>1500", 90, 0, 3);
411  mMassRecoOverGen_B_3500_5000 = ibooker.book1D("MassRecoOverGen_B_3500_5000", "3500<genpt<5000", 90, 0, 3);
412  mMassRecoOverGen_E_3500_5000 = ibooker.book1D("MassRecoOverGen_E_3500_5000", "3500<genpt<5000", 90, 0, 3);
413  mMassRecoOverGen_B_5000 = ibooker.book1D("MassRecoOverGen_B_5000", "genpt>5000", 90, 0, 3);
414  mMassRecoOverGen_E_5000 = ibooker.book1D("MassRecoOverGen_E_5000", "genpt>5000", 90, 0, 3);
415 
416  // Generation profiles
418  ibooker.bookProfile("PtRecoOverGen_GenPt_B", "0<|eta|<1.5", log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
420  ibooker.bookProfile("PtRecoOverGen_GenPt_E", "1.5<|eta|<3", log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
422  ibooker.bookProfile("PtRecoOverGen_GenPt_F", "3<|eta|<6", log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
423  mPtRecoOverGen_GenPhi_B = ibooker.bookProfile("PtRecoOverGen_GenPhi_B", "0<|eta|<1.5", 70, -3.5, 3.5, 0, 2, " ");
424  mPtRecoOverGen_GenPhi_E = ibooker.bookProfile("PtRecoOverGen_GenPhi_E", "1.5<|eta|<3", 70, -3.5, 3.5, 0, 2, " ");
425  mPtRecoOverGen_GenPhi_F = ibooker.bookProfile("PtRecoOverGen_GenPhi_F", "3<|eta|<6", 70, -3.5, 3.5, 0, 2, " ");
426  // if eta range changed here need change in JetTesterPostProcessor as well
428  ibooker.bookProfile("PtRecoOverGen_GenEta_20_40", "20<genpt<40", 90, etaRange, 0, 2, " ");
430  ibooker.bookProfile("PtRecoOverGen_GenEta_40_200", "40<genpt<200", 90, etaRange, 0, 2, " ");
432  ibooker.bookProfile("PtRecoOverGen_GenEta_200_600", "200<genpt<600", 90, etaRange, 0, 2, " ");
434  ibooker.bookProfile("PtRecoOverGen_GenEta_600_1500", "600<genpt<1500", 90, etaRange, 0, 2, " ");
436  ibooker.bookProfile("PtRecoOverGen_GenEta_1500_3500", "1500<genpt<3500", 90, etaRange, 0, 2, " ");
438  ibooker.bookProfile("PtRecoOverGen_GenEta_3500_5000", "3500<genpt<5000", 90, etaRange, 0, 2, " ");
440  ibooker.bookProfile("PtRecoOverGen_GenEta_5000_6500", "5000<genpt<6500", 90, etaRange, 0, 2, " ");
441  mPtRecoOverGen_GenEta_3500 = ibooker.bookProfile("PtRecoOverGen_GenEta_3500", "genpt>3500", 90, etaRange, 0, 2, " ");
442 
443  // Some jet algebra
444  //------------------------------------------------------------------------
445  mEtaFirst = ibooker.book1D("EtaFirst", "EtaFirst", 120, -6, 6);
446  mPhiFirst = ibooker.book1D("PhiFirst", "PhiFirst", 70, -3.5, 3.5);
447  mPtFirst = ibooker.book1D("PtFirst", "PtFirst", 50, 0, 1000);
448  mMjj = ibooker.book1D("Mjj", "Mjj", 100, 0, 2000);
449  mNJetsEta_B_20_40 = ibooker.book1D("NJetsEta_B_20_40", "NJetsEta_B 20<Pt<40", 15, 0, 15);
450  mNJetsEta_E_20_40 = ibooker.book1D("NJetsEta_E_20_40", "NJetsEta_E 20<Pt<40", 15, 0, 15);
451  mNJetsEta_B_40 = ibooker.book1D("NJetsEta_B", "NJetsEta_B 40<Pt", 15, 0, 15);
452  mNJetsEta_E_40 = ibooker.book1D("NJetsEta_E", "NJetsEta_E 40<Pt", 15, 0, 15);
453  mNJets_40 = ibooker.book1D("NJets", "NJets 40>Pt", 15, 0, 15);
454  mNJets1 = ibooker.bookProfile("NJets1", "Number of jets above Pt threshold", 100, 0, 200, 100, 0, 50, "s");
455  mNJets2 = ibooker.bookProfile("NJets2", "Number of jets above Pt threshold", 100, 0, 4000, 100, 0, 50, "s");
456 
457  if (isCaloJet) {
458  maxEInEmTowers = ibooker.book1D("maxEInEmTowers", "maxEInEmTowers", 50, 0, 500);
459  maxEInHadTowers = ibooker.book1D("maxEInHadTowers", "maxEInHadTowers", 50, 0, 500);
460  energyFractionHadronic = ibooker.book1D("energyFractionHadronic", "energyFractionHadronic", 50, 0, 1);
461  emEnergyFraction = ibooker.book1D("emEnergyFraction", "emEnergyFraction", 50, 0, 1);
462  hadEnergyInHB = ibooker.book1D("hadEnergyInHB", "hadEnergyInHB", 50, 0, 500);
463  hadEnergyInHO = ibooker.book1D("hadEnergyInHO", "hadEnergyInHO", 50, 0, 500);
464  hadEnergyInHE = ibooker.book1D("hadEnergyInHE", "hadEnergyInHE", 50, 0, 500);
465  hadEnergyInHF = ibooker.book1D("hadEnergyInHF", "hadEnergyInHF", 50, 0, 500);
466  emEnergyInEB = ibooker.book1D("emEnergyInEB", "emEnergyInEB", 50, 0, 500);
467  emEnergyInEE = ibooker.book1D("emEnergyInEE", "emEnergyInEE", 50, 0, 500);
468  emEnergyInHF = ibooker.book1D("emEnergyInHF", "emEnergyInHF", 50, 0, 500);
469  towersArea = ibooker.book1D("towersArea", "towersArea", 50, 0, 1);
470  n90 = ibooker.book1D("n90", "n90", 30, 0, 30);
471  n60 = ibooker.book1D("n60", "n60", 30, 0, 30);
472  }
473 
474  if (isPFJet || isMiniAODJet) {
475  muonMultiplicity = ibooker.book1D("muonMultiplicity", "muonMultiplicity", 10, 0, 10);
476  chargedMultiplicity = ibooker.book1D("chargedMultiplicity", "chargedMultiplicity", 100, 0, 100);
477  chargedEmEnergy = ibooker.book1D("chargedEmEnergy", "chargedEmEnergy", 100, 0, 500);
478  neutralEmEnergy = ibooker.book1D("neutralEmEnergy", "neutralEmEnergy", 100, 0, 500);
479  chargedHadronEnergy = ibooker.book1D("chargedHadronEnergy", "chargedHadronEnergy", 100, 0, 500);
480  neutralHadronEnergy = ibooker.book1D("neutralHadronEnergy", "neutralHadronEnergy", 100, 0, 500);
482  ibooker.book1D("chargedHadronEnergyFraction", "chargedHadronEnergyFraction", 50, 0, 1);
484  ibooker.book1D("neutralHadronEnergyFraction", "neutralHadronEnergyFraction", 50, 0, 1);
485  chargedEmEnergyFraction = ibooker.book1D("chargedEmEnergyFraction", "chargedEmEnergyFraction", 50, 0, 1);
486  neutralEmEnergyFraction = ibooker.book1D("neutralEmEnergyFraction", "neutralEmEnergyFraction", 50, 0, 1);
487  photonEnergy = ibooker.book1D("photonEnergy", "photonEnergy", 50, 0, 500);
488  photonEnergyFraction = ibooker.book1D("photonEnergyFraction", "photonEnergyFraction", 50, 0, 1);
489  electronEnergy = ibooker.book1D("electronEnergy", "electronEnergy", 50, 0, 500);
490  electronEnergyFraction = ibooker.book1D("electronEnergyFraction", "electronEnergyFraction", 50, 0, 1);
491  muonEnergy = ibooker.book1D("muonEnergy", "muonEnergy", 50, 0, 500);
492  muonEnergyFraction = ibooker.book1D("muonEnergyFraction", "muonEnergyFraction", 50, 0, 1);
493  HFHadronEnergy = ibooker.book1D("HFHadronEnergy", "HFHadronEnergy", 50, 0, 500);
494  HFHadronEnergyFraction = ibooker.book1D("HFHadronEnergyFraction", "HFHadronEnergyFraction", 50, 0, 1);
495  HFEMEnergy = ibooker.book1D("HFEMEnergy", "HFEMEnergy", 50, 0, 500);
496  HFEMEnergyFraction = ibooker.book1D("HFEMEnergyFraction", "HFEMEnergyFraction", 50, 0, 1);
497  chargedHadronMultiplicity = ibooker.book1D("chargedHadronMultiplicity", "chargedHadronMultiplicity", 50, 0, 50);
498  neutralHadronMultiplicity = ibooker.book1D("neutralHadronMultiplicity", "neutralHadronMultiplicity", 50, 0, 50);
499  photonMultiplicity = ibooker.book1D("photonMultiplicity", "photonMultiplicity", 10, 0, 10);
500  electronMultiplicity = ibooker.book1D("electronMultiplicity", "electronMultiplicity", 10, 0, 10);
501  HFHadronMultiplicity = ibooker.book1D("HFHadronMultiplicity", "HFHadronMultiplicity", 50, 0, 50);
502  HFEMMultiplicity = ibooker.book1D("HFEMMultiplicity", "HFEMMultiplicity", 50, 0, 50);
503  chargedMuEnergy = ibooker.book1D("chargedMuEnergy", "chargedMuEnergy", 50, 0, 500);
504  chargedMuEnergyFraction = ibooker.book1D("chargedMuEnergyFraction", "chargedMuEnergyFraction", 50, 0, 1);
505  neutralMultiplicity = ibooker.book1D("neutralMultiplicity", "neutralMultiplicity", 50, 0, 50);
506  HOEnergy = ibooker.book1D("HOEnergy", "HOEnergy", 50, 0, 500);
507  HOEnergyFraction = ibooker.book1D("HOEnergyFraction", "HOEnergyFraction", 50, 0, 1);
508  }
509 }
510 
511 //------------------------------------------------------------------------------
512 // ~JetTester
513 //------------------------------------------------------------------------------
515 
516 //------------------------------------------------------------------------------
517 // analyze
518 //------------------------------------------------------------------------------
519 void JetTester::analyze(const edm::Event &mEvent, const edm::EventSetup &mSetup) {
520  // Get the primary vertices
521  //----------------------------------------------------------------------------
523  mEvent.getByToken(pvToken_, pvHandle);
524 
525  int nGoodVertices = 0;
526 
527  if (pvHandle.isValid()) {
528  for (unsigned i = 0; i < pvHandle->size(); i++) {
529  if ((*pvHandle)[i].ndof() > 4 && (fabs((*pvHandle)[i].z()) <= 24) && (fabs((*pvHandle)[i].position().rho()) <= 2))
530  nGoodVertices++;
531  }
532  }
533 
534  mNvtx->Fill(nGoodVertices);
535 
536  // // Get the jet rho
537  // //----------------------------------------------------------------------------
538  // edm::Handle<double> pRho;
539  // mEvent.getByToken(rhoTag, pRho);
540  //
541  // if (pRho.isValid())
542  // {
543  // double jetRho = *pRho;
544  //
545  // if (mRho) mRho->Fill(jetRho);
546  // }
547 
548  // Get the Jet collection
549  //----------------------------------------------------------------------------
550  math::XYZTLorentzVector p4tmp[2];
551 
552  std::vector<Jet> recoJets;
553  recoJets.clear();
554 
557  // edm::Handle<JPTJetCollection> jptJets;
559 
560  if (isCaloJet)
562  if (isPFJet)
563  mEvent.getByToken(pfJetsToken_, pfJets);
564  // if (isJPTJet) mEvent.getByToken(jptJetsToken_, jptJets);
565  if (isMiniAODJet)
567 
568  if (isCaloJet && !caloJets.isValid())
569  return;
570  if (isPFJet && !pfJets.isValid())
571  return;
572  // if (isJPTJet && !jptJets.isValid()) return;
573  if (isMiniAODJet && !patJets.isValid())
574  return;
575 
576  if (isCaloJet) {
577  for (unsigned ijet = 0; ijet < caloJets->size(); ijet++)
578  recoJets.push_back((*caloJets)[ijet]);
579  }
580 
581  /* if (isJPTJet)
582  {
583  for (unsigned ijet=0; ijet<jptJets->size(); ijet++)
584  recoJets.push_back((*jptJets)[ijet]);
585  }*/
586 
587  if (isPFJet) {
588  for (unsigned ijet = 0; ijet < pfJets->size(); ijet++)
589  recoJets.push_back((*pfJets)[ijet]);
590  }
591  if (isMiniAODJet) {
592  for (unsigned ijet = 0; ijet < patJets->size(); ijet++)
593  recoJets.push_back((*patJets)[ijet]);
594  }
595 
596  int nJet = 0;
597  int nJet_E_20_40 = 0;
598  int nJet_B_20_40 = 0;
599  int nJet_E_40 = 0;
600  int nJet_B_40 = 0;
601  int nJet_40 = 0;
602 
603  int index_first_jet = -1;
604  double pt_first = -1;
605 
606  int index_second_jet = -1;
607  double pt_second = -1;
608 
609  for (unsigned ijet = 0; ijet < recoJets.size(); ijet++) {
610  bool pass_lowjet = false;
611  bool pass_mediumjet = false;
612  if (!isMiniAODJet) {
613  if ((recoJets[ijet].pt() > 20.) && (recoJets[ijet].pt() < mRecoJetPtThreshold)) {
614  pass_lowjet = true;
615  }
616  }
617  if (isMiniAODJet) {
618  if ((recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected")) > 20. &&
619  ((recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected")) < mRecoJetPtThreshold)) {
620  pass_lowjet = true;
621  }
622  }
623  if (pass_lowjet) {
624  if (fabs(recoJets[ijet].eta()) > 1.5)
625  nJet_E_20_40++;
626  else
627  nJet_B_20_40++;
628  }
629  if (!isMiniAODJet) {
630  if (recoJets[ijet].pt() > mRecoJetPtThreshold) {
631  pass_mediumjet = true;
632  }
633  }
634  if (isMiniAODJet) {
635  if ((recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected")) > mRecoJetPtThreshold) {
636  pass_mediumjet = true;
637  }
638  }
639  if (pass_mediumjet) {
640  if (isMiniAODJet) {
641  if ((recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected")) > pt_first) {
642  pt_second = pt_first;
643  pt_first = recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected");
644  index_second_jet = index_first_jet;
645  index_first_jet = ijet;
646  } else if ((recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected")) > pt_second) {
647  index_second_jet = ijet;
648  pt_second = recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected");
649  }
650  }
651  // counting forward and barrel jets
652  if (fabs(recoJets[ijet].eta()) > 1.5)
653  nJet_E_40++;
654  else
655  nJet_B_40++;
656  nJet_40++;
657 
658  if (mEta)
659  mEta->Fill(recoJets[ijet].eta());
660 
661  if (mJetArea)
662  mJetArea->Fill(recoJets[ijet].jetArea());
663  if (mPhi)
664  mPhi->Fill(recoJets[ijet].phi());
665  if (!isMiniAODJet) {
666  if (mEnergy)
667  mEnergy->Fill(recoJets[ijet].energy());
668  if (mP)
669  mP->Fill(recoJets[ijet].p());
670  if (mPt)
671  mPt->Fill(recoJets[ijet].pt());
672  if (mMass)
673  mMass->Fill(recoJets[ijet].mass());
674  } else {
675  if (mEnergy)
676  mEnergy->Fill(recoJets[ijet].energy() * (*patJets)[ijet].jecFactor("Uncorrected"));
677  if (mP)
678  mP->Fill(recoJets[ijet].p() * (*patJets)[ijet].jecFactor("Uncorrected"));
679  if (mPt)
680  mPt->Fill(recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected"));
681  if (mMass)
682  mMass->Fill(recoJets[ijet].mass() * (*patJets)[ijet].jecFactor("Uncorrected"));
683  }
684  if (mConstituents)
686  if (!isMiniAODJet) {
687  if (ijet == 0) {
688  if (mEtaFirst)
689  mEtaFirst->Fill(recoJets[ijet].eta());
690  if (mPhiFirst)
691  mPhiFirst->Fill(recoJets[ijet].phi());
692  if (mPtFirst)
693  mPtFirst->Fill(recoJets[ijet].pt());
694  }
695 
696  if (ijet == 0) {
697  nJet++;
698  p4tmp[0] = recoJets[ijet].p4();
699  }
700  if (ijet == 1) {
701  nJet++;
702  p4tmp[1] = recoJets[ijet].p4();
703  }
704  }
705  // if (isPFJet || isCaloJet) {
706  // if (mHadEnergyInHF) mHadEnergyInHF
707  // ->Fill((*pfJets)[ijet].HFHadronEnergy()); if (mEmEnergyInHF)
708  // mEmEnergyInHF ->Fill((*pfJets)[ijet].HFEMEnergy()); if
709  // (mChargedEmEnergy) mChargedEmEnergy
710  // ->Fill((*pfJets)[ijet].chargedEmEnergy()); if
711  // (mChargedHadronEnergy)
712  // mChargedHadronEnergy->Fill((*pfJets)[ijet].chargedHadronEnergy());
713  // if (mNeutralEmEnergy) mNeutralEmEnergy
714  // ->Fill((*pfJets)[ijet].neutralEmEnergy()); if
715  // (mNeutralHadronEnergy)
716  // mNeutralHadronEnergy->Fill((*pfJets)[ijet].neutralHadronEnergy());
717  // }
718 
719  // ---- Calo Jet specific information ----
720  if (isCaloJet) {
729  emEnergyInEB->Fill((*caloJets)[ijet].emEnergyInEB());
730  emEnergyInEE->Fill((*caloJets)[ijet].emEnergyInEE());
731  emEnergyInHF->Fill((*caloJets)[ijet].emEnergyInHF());
732  towersArea->Fill((*caloJets)[ijet].towersArea());
733  n90->Fill((*caloJets)[ijet].n90());
734  n60->Fill((*caloJets)[ijet].n60());
735  }
736  // ---- PF Jet specific information ----
737  if (isPFJet) {
748  photonEnergy->Fill((*pfJets)[ijet].photonEnergy());
752  muonEnergy->Fill((*pfJets)[ijet].muonEnergy());
756  HFEMEnergy->Fill((*pfJets)[ijet].HFEMEnergy());
767  HOEnergy->Fill((*pfJets)[ijet].hoEnergy());
768  HOEnergyFraction->Fill((*pfJets)[ijet].hoEnergyFraction());
769  }
770  if (isMiniAODJet && (*patJets)[ijet].isPFJet()) {
781  photonEnergy->Fill((*patJets)[ijet].photonEnergy());
785  muonEnergy->Fill((*patJets)[ijet].muonEnergy());
789  HFEMEnergy->Fill((*patJets)[ijet].HFEMEnergy());
800  HOEnergy->Fill((*patJets)[ijet].hoEnergy());
801  HOEnergyFraction->Fill((*patJets)[ijet].hoEnergyFraction());
802  }
803  } // fill quantities for medium jets
804  }
805 
806  if (mNJetsEta_B_20_40)
807  mNJetsEta_B_20_40->Fill(nJet_B_20_40);
808  if (mNJetsEta_E_20_40)
809  mNJetsEta_E_20_40->Fill(nJet_E_20_40);
810  if (mNJetsEta_B_40)
811  mNJetsEta_B_40->Fill(nJet_B_40);
812  if (mNJetsEta_E_40)
813  mNJetsEta_E_40->Fill(nJet_E_40);
814  if (mNJets_40)
815  mNJets_40->Fill(nJet_40);
816  if (!isMiniAODJet) {
817  if (nJet >= 2) {
818  if (mMjj)
819  mMjj->Fill((p4tmp[0] + p4tmp[1]).mass());
820  }
821  } else {
822  if (index_first_jet > -1) {
823  if (mEtaFirst)
824  mEtaFirst->Fill(recoJets[index_first_jet].eta());
825  if (mPhiFirst)
826  mPhiFirst->Fill(recoJets[index_first_jet].phi());
827  if (mPtFirst)
828  mPtFirst->Fill(recoJets[index_first_jet].pt() * (*patJets)[index_first_jet].jecFactor("Uncorrected"));
829  nJet++;
830  p4tmp[0] = recoJets[index_first_jet].p4() * (*patJets)[index_first_jet].jecFactor("Uncorrected");
831  }
832  if (index_second_jet > -1) {
833  nJet++;
834  p4tmp[1] = recoJets[index_second_jet].p4() * (*patJets)[index_second_jet].jecFactor("Uncorrected");
835  }
836  if (nJet >= 2) {
837  if (mMjj)
838  mMjj->Fill((p4tmp[0] + p4tmp[1]).mass());
839  }
840  }
841 
842  // Count jets above pt cut
843  //----------------------------------------------------------------------------
844  for (int istep = 0; istep < 100; ++istep) {
845  int njets1 = 0;
846  int njets2 = 0;
847 
848  float ptStep1 = (istep * (200. / 100.));
849  float ptStep2 = (istep * (4000. / 100.));
850 
851  for (unsigned ijet = 0; ijet < recoJets.size(); ijet++) {
852  if (!isMiniAODJet) {
853  if (recoJets[ijet].pt() > ptStep1)
854  njets1++;
855  if (recoJets[ijet].pt() > ptStep2)
856  njets2++;
857  } else {
858  if ((recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected")) > ptStep1)
859  njets1++;
860  if ((recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected")) > ptStep2)
861  njets2++;
862  }
863  mNJets1->Fill(ptStep1, njets1);
864  mNJets2->Fill(ptStep2, njets2);
865  }
866  }
867 
868  // Corrected jets
869  //----------------------------------------------------------------------------
870  double scale = -999;
872  bool pass_correction_flag = false;
873  if (!isMiniAODJet && !mJetCorrector.label().empty()) {
874  mEvent.getByToken(jetCorrectorToken_, jetCorr);
875  if (jetCorr.isValid()) {
876  pass_correction_flag = true;
877  }
878  }
879  if (isMiniAODJet) {
880  pass_correction_flag = true;
881  }
882  for (unsigned ijet = 0; ijet < recoJets.size(); ijet++) {
883  Jet correctedJet = recoJets[ijet];
884  if (pass_correction_flag) {
885  if (isCaloJet)
886  scale = jetCorr->correction((*caloJets)[ijet]);
887  if (isPFJet)
888  scale = jetCorr->correction((*pfJets)[ijet]);
889  // if (isJPTJet) scale = jetCorr->correction((*jptJets)[ijet]);
890  if (!isMiniAODJet) {
891  correctedJet.scaleEnergy(scale);
892  }
893 
894  if (correctedJet.pt() < 20)
895  continue;
896 
897  if (isMiniAODJet) {
898  if (hadronFlavor)
899  hadronFlavor->Fill((*patJets)[ijet].hadronFlavour());
900  if (partonFlavor)
901  partonFlavor->Fill((*patJets)[ijet].partonFlavour());
902  if (genPartonPDGID && (*patJets)[ijet].genParton() != nullptr)
903  genPartonPDGID->Fill((*patJets)[ijet].genParton()->pdgId());
904  }
905 
906  mCorrJetEta->Fill(correctedJet.eta());
907  mCorrJetPhi->Fill(correctedJet.phi());
908  mCorrJetPt->Fill(correctedJet.pt());
909  if (correctedJet.pt() >= 40) {
910  mCorrJetEta_Pt40->Fill(correctedJet.eta());
911  mCorrJetPhi_Pt40->Fill(correctedJet.phi());
912  }
913 
914  double ijetEta = recoJets[ijet].eta();
915  double ijetPt = recoJets[ijet].pt();
916  if (isMiniAODJet) {
917  ijetPt = recoJets[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected");
918  }
919  double ratio = correctedJet.pt() / ijetPt;
920  if (isMiniAODJet) {
921  ratio = 1. / (*patJets)[ijet].jecFactor("Uncorrected");
922  }
923 
924  if (fabs(ijetEta) < 1.5)
925  mPtCorrOverReco_Pt_B->Fill(log10(ijetPt), ratio);
926  else if (fabs(ijetEta) < 3.0)
927  mPtCorrOverReco_Pt_E->Fill(log10(ijetPt), ratio);
928  else if (fabs(ijetEta) < 6.0)
929  mPtCorrOverReco_Pt_F->Fill(log10(ijetPt), ratio);
930 
931  if (ijetPt < 40)
933  else if (ijetPt < 200)
935  else if (ijetPt < 600)
937  else if (ijetPt < 1500)
939  else if (ijetPt < 3500)
941  else if (ijetPt < 5000)
943  else if (ijetPt < 6500)
945  if (ijetPt > 3500)
947  }
948  }
949 
950  //----------------------------------------------------------------------------
951  //
952  // Generation
953  //
954  //----------------------------------------------------------------------------
955  if (!mEvent.isRealData()) {
956  // Get ptHat
957  //------------------------------------------------------------------------
959  mEvent.getByToken(evtToken_, myGenEvt);
960 
961  if (myGenEvt.isValid()) {
962  if (myGenEvt->hasBinningValues()) {
963  double ptHat = myGenEvt->binningValues()[0];
964  if (mPtHat)
965  mPtHat->Fill(ptHat);
966  }
967  }
968  // Gen jets
969  //------------------------------------------------------------------------
972 
973  if (!genJets.isValid())
974  return;
975 
976  for (GenJetCollection::const_iterator gjet = genJets->begin(); gjet != genJets->end(); gjet++) {
977  // for MiniAOD we have here intrinsic thresholds, introduce also threshold
978  // for RECO
979  if (gjet->pt() > mMatchGenPtThreshold) {
980  if (mGenEta)
981  mGenEta->Fill(gjet->eta());
982  if (mGenPhi)
983  mGenPhi->Fill(gjet->phi());
984  if (mGenPt)
985  mGenPt->Fill(gjet->pt());
986  if (gjet == genJets->begin()) {
987  if (mGenEtaFirst)
988  mGenEtaFirst->Fill(gjet->eta());
989  if (mGenPhiFirst)
990  mGenPhiFirst->Fill(gjet->phi());
991  }
992  }
993  }
994 
995  if (!(mInputGenCollection.label().empty())) {
996  for (GenJetCollection::const_iterator gjet = genJets->begin(); gjet != genJets->end(); gjet++) {
997  if (fabs(gjet->eta()) > 6.)
998  continue; // Out of the detector
999  if (gjet->pt() < mMatchGenPtThreshold)
1000  continue;
1001  if (recoJets.empty())
1002  continue;
1003  // pt response
1004  //------------------------------------------------------------
1005  int iMatch = -1;
1006  double CorrdeltaRBest = 999;
1007  double CorrJetPtBest = 0;
1008  double CorrJetMassBest = 0;
1009  for (unsigned ijet = 0; ijet < recoJets.size(); ++ijet) {
1010  Jet correctedJet = recoJets[ijet];
1011  if (pass_correction_flag && !isMiniAODJet) {
1012  if (isCaloJet)
1013  scale = jetCorr->correction((*caloJets)[ijet]);
1014  if (isPFJet)
1015  scale = jetCorr->correction((*pfJets)[ijet]);
1016  correctedJet.scaleEnergy(scale);
1017  }
1018  double CorrJetPt = correctedJet.pt();
1019  if (CorrJetPt > 10) {
1020  double CorrdR = deltaR(gjet->eta(), gjet->phi(), correctedJet.eta(), correctedJet.phi());
1021  if (CorrdR < CorrdeltaRBest) {
1022  CorrJetMassBest = correctedJet.mass();
1023  CorrdeltaRBest = CorrdR;
1024  CorrJetPtBest = CorrJetPt;
1025  iMatch = ijet;
1026  }
1027  }
1028  }
1029  if (iMatch < 0)
1030  continue;
1031  // use mass after jet energy correction -> for MiniAOD that is the case
1032  // per default
1033  if (!isMiniAODJet) {
1034  fillMatchHists(gjet->eta(),
1035  gjet->phi(),
1036  gjet->pt(),
1037  gjet->mass(),
1038  recoJets[iMatch].eta(),
1039  recoJets[iMatch].phi(),
1040  recoJets[iMatch].pt(),
1041  CorrJetMassBest);
1042  } else {
1043  fillMatchHists(gjet->eta(),
1044  gjet->phi(),
1045  gjet->pt(),
1046  gjet->mass(),
1047  (*patJets)[iMatch].eta(),
1048  (*patJets)[iMatch].phi(),
1049  (*patJets)[iMatch].pt() * (*patJets)[iMatch].jecFactor("Uncorrected"),
1050  recoJets[iMatch].mass());
1051  }
1052  if (pass_correction_flag) { // fill only for corrected jets
1053  if (CorrdeltaRBest < mRThreshold) {
1054  double response = CorrJetPtBest / gjet->pt();
1055 
1056  if (fabs(gjet->eta()) < 1.5)
1057  mPtCorrOverGen_GenPt_B->Fill(log10(gjet->pt()), response);
1058  else if (fabs(gjet->eta()) < 3.0)
1059  mPtCorrOverGen_GenPt_E->Fill(log10(gjet->pt()), response);
1060  else if (fabs(gjet->eta()) < 6.0)
1061  mPtCorrOverGen_GenPt_F->Fill(log10(gjet->pt()), response);
1062 
1063  if (gjet->pt() > 20) {
1064  if (gjet->pt() < 40)
1065  mPtCorrOverGen_GenEta_20_40->Fill(gjet->eta(), response);
1066  else if (gjet->pt() < 200)
1067  mPtCorrOverGen_GenEta_40_200->Fill(gjet->eta(), response);
1068  else if (gjet->pt() < 600)
1069  mPtCorrOverGen_GenEta_200_600->Fill(gjet->eta(), response);
1070  else if (gjet->pt() < 1500)
1071  mPtCorrOverGen_GenEta_600_1500->Fill(gjet->eta(), response);
1072  else if (gjet->pt() < 3500)
1073  mPtCorrOverGen_GenEta_1500_3500->Fill(gjet->eta(), response);
1074  else if (gjet->pt() < 5000)
1075  mPtCorrOverGen_GenEta_3500_5000->Fill(gjet->eta(), response);
1076  else if (gjet->pt() < 6500)
1077  mPtCorrOverGen_GenEta_5000_6500->Fill(gjet->eta(), response);
1078  if (gjet->pt() > 3500)
1079  mPtCorrOverGen_GenEta_3500->Fill(gjet->eta(), response);
1080  }
1081  }
1082  }
1083  }
1084  }
1085  }
1086 }
1087 
1088 //------------------------------------------------------------------------------
1089 // fillMatchHists
1090 //------------------------------------------------------------------------------
1091 void JetTester::fillMatchHists(const double GenEta,
1092  const double GenPhi,
1093  const double GenPt,
1094  const double GenMass,
1095  const double RecoEta,
1096  const double RecoPhi,
1097  const double RecoPt,
1098  const double RecoMass) {
1099  if (GenPt > mMatchGenPtThreshold) {
1100  mDeltaEta->Fill(GenEta - RecoEta);
1101  mDeltaPhi->Fill(GenPhi - RecoPhi);
1102  mDeltaPt->Fill((GenPt - RecoPt) / GenPt);
1103  }
1104 
1105  if (fabs(GenEta) < 1.5) {
1106  mPtRecoOverGen_GenPt_B->Fill(log10(GenPt), RecoPt / GenPt);
1107  mPtRecoOverGen_GenPhi_B->Fill(GenPhi, RecoPt / GenPt);
1108 
1109  if (GenPt > 20 && GenPt < 40)
1110  mMassRecoOverGen_B_20_40->Fill(RecoMass / GenMass);
1111  else if (GenPt < 200)
1112  mMassRecoOverGen_B_40_200->Fill(RecoMass / GenMass);
1113  else if (GenPt < 500)
1114  mMassRecoOverGen_B_200_500->Fill(RecoMass / GenMass);
1115  else if (GenPt < 750)
1116  mMassRecoOverGen_B_500_750->Fill(RecoMass / GenMass);
1117  else if (GenPt < 1000)
1118  mMassRecoOverGen_B_750_1000->Fill(RecoMass / GenMass);
1119  else if (GenPt < 1500)
1120  mMassRecoOverGen_B_1000_1500->Fill(RecoMass / GenMass);
1121  else if (GenPt < 3500)
1122  mMassRecoOverGen_B_1500_3500->Fill(RecoMass / GenMass);
1123  else if (GenPt < 5000)
1124  mMassRecoOverGen_B_3500_5000->Fill(RecoMass / GenMass);
1125  else if (GenPt >= 5000)
1126  mMassRecoOverGen_B_5000->Fill(RecoMass / GenMass);
1127 
1128  if (GenPt > 20 && GenPt < 40)
1129  mPtRecoOverGen_B_20_40->Fill(RecoPt / GenPt);
1130  else if (GenPt < 200)
1131  mPtRecoOverGen_B_40_200->Fill(RecoPt / GenPt);
1132  else if (GenPt < 600)
1133  mPtRecoOverGen_B_200_600->Fill(RecoPt / GenPt);
1134  else if (GenPt < 1500)
1135  mPtRecoOverGen_B_600_1500->Fill(RecoPt / GenPt);
1136  else if (GenPt < 3500)
1137  mPtRecoOverGen_B_1500_3500->Fill(RecoPt / GenPt);
1138  else if (GenPt < 5000)
1139  mPtRecoOverGen_B_3500_5000->Fill(RecoPt / GenPt);
1140  else if (GenPt < 6500)
1141  mPtRecoOverGen_B_5000_6500->Fill(RecoPt / GenPt);
1142  if (GenPt > 3500)
1143  mPtRecoOverGen_B_3500->Fill(RecoPt / GenPt);
1144  } else if (fabs(GenEta) < 3.0) {
1145  mPtRecoOverGen_GenPt_E->Fill(log10(GenPt), RecoPt / GenPt);
1146  mPtRecoOverGen_GenPhi_E->Fill(GenPhi, RecoPt / GenPt);
1147 
1148  if (GenPt > 20 && GenPt < 40)
1149  mPtRecoOverGen_E_20_40->Fill(RecoPt / GenPt);
1150  else if (GenPt < 200)
1151  mPtRecoOverGen_E_40_200->Fill(RecoPt / GenPt);
1152  else if (GenPt < 600)
1153  mPtRecoOverGen_E_200_600->Fill(RecoPt / GenPt);
1154  else if (GenPt < 1500)
1155  mPtRecoOverGen_E_600_1500->Fill(RecoPt / GenPt);
1156  else if (GenPt < 3500)
1157  mPtRecoOverGen_E_1500_3500->Fill(RecoPt / GenPt);
1158  else if (GenPt < 5000)
1159  mPtRecoOverGen_E_3500_5000->Fill(RecoPt / GenPt);
1160  else if (GenPt < 6500)
1161  mPtRecoOverGen_E_5000_6500->Fill(RecoPt / GenPt);
1162  if (GenPt > 3500)
1163  mPtRecoOverGen_E_3500->Fill(RecoPt / GenPt);
1164 
1165  if (GenPt > 20 && GenPt < 40)
1166  mMassRecoOverGen_E_20_40->Fill(RecoMass / GenMass);
1167  else if (GenPt < 200)
1168  mMassRecoOverGen_E_40_200->Fill(RecoMass / GenMass);
1169  else if (GenPt < 500)
1170  mMassRecoOverGen_E_200_500->Fill(RecoMass / GenMass);
1171  else if (GenPt < 750)
1172  mMassRecoOverGen_E_500_750->Fill(RecoMass / GenMass);
1173  else if (GenPt < 1000)
1174  mMassRecoOverGen_E_750_1000->Fill(RecoMass / GenMass);
1175  else if (GenPt < 1500)
1176  mMassRecoOverGen_E_1000_1500->Fill(RecoMass / GenMass);
1177  else if (GenPt < 3500)
1178  mMassRecoOverGen_E_1500_3500->Fill(RecoMass / GenMass);
1179  else if (GenPt < 5000)
1180  mMassRecoOverGen_E_3500_5000->Fill(RecoMass / GenMass);
1181  else if (GenPt >= 5000)
1182  mMassRecoOverGen_E_5000->Fill(RecoMass / GenMass);
1183 
1184  } else if (fabs(GenEta) < 6.0) {
1185  mPtRecoOverGen_GenPt_F->Fill(log10(GenPt), RecoPt / GenPt);
1186  mPtRecoOverGen_GenPhi_F->Fill(GenPhi, RecoPt / GenPt);
1187 
1188  if (GenPt > 20 && GenPt < 40)
1189  mPtRecoOverGen_F_20_40->Fill(RecoPt / GenPt);
1190  else if (GenPt < 200)
1191  mPtRecoOverGen_F_40_200->Fill(RecoPt / GenPt);
1192  else if (GenPt < 600)
1193  mPtRecoOverGen_F_200_600->Fill(RecoPt / GenPt);
1194  else if (GenPt < 1500)
1195  mPtRecoOverGen_F_600_1500->Fill(RecoPt / GenPt);
1196  else if (GenPt < 3500)
1197  mPtRecoOverGen_F_1500_3500->Fill(RecoPt / GenPt);
1198  if (GenPt > 3500)
1199  mPtRecoOverGen_F_3500->Fill(RecoPt / GenPt);
1200 
1201  if (GenPt > 20 && GenPt < 40)
1202  mMassRecoOverGen_F_20_40->Fill(RecoMass / GenMass);
1203  else if (GenPt < 200)
1204  mMassRecoOverGen_F_40_200->Fill(RecoMass / GenMass);
1205  else if (GenPt < 500)
1206  mMassRecoOverGen_F_200_500->Fill(RecoMass / GenMass);
1207  else if (GenPt < 750)
1208  mMassRecoOverGen_F_500_750->Fill(RecoMass / GenMass);
1209  else if (GenPt < 1000)
1210  mMassRecoOverGen_F_750_1000->Fill(RecoMass / GenMass);
1211  else if (GenPt < 1500)
1212  mMassRecoOverGen_F_1000_1500->Fill(RecoMass / GenMass);
1213  else if (GenPt >= 1500)
1214  mMassRecoOverGen_F_1500->Fill(RecoMass / GenMass);
1215  }
1216 
1217  if (GenPt > 20 && GenPt < 40)
1218  mPtRecoOverGen_GenEta_20_40->Fill(GenEta, RecoPt / GenPt);
1219  else if (GenPt < 200)
1220  mPtRecoOverGen_GenEta_40_200->Fill(GenEta, RecoPt / GenPt);
1221  else if (GenPt < 600)
1222  mPtRecoOverGen_GenEta_200_600->Fill(GenEta, RecoPt / GenPt);
1223  else if (GenPt < 1500)
1224  mPtRecoOverGen_GenEta_600_1500->Fill(GenEta, RecoPt / GenPt);
1225  else if (GenPt < 3500)
1226  mPtRecoOverGen_GenEta_1500_3500->Fill(GenEta, RecoPt / GenPt);
1227  else if (GenPt < 5000)
1228  mPtRecoOverGen_GenEta_3500_5000->Fill(GenEta, RecoPt / GenPt);
1229  else if (GenPt < 6500)
1230  mPtRecoOverGen_GenEta_5000_6500->Fill(GenEta, RecoPt / GenPt);
1231  if (GenPt > 3500)
1232  mPtRecoOverGen_GenEta_3500->Fill(GenEta, RecoPt / GenPt);
1233 }
MonitorElement * mMassRecoOverGen_F_1500
Definition: JetTester.h:169
MonitorElement * mNJetsEta_B_40
Definition: JetTester.h:202
MonitorElement * mPtRecoOverGen_E_20_40
Definition: JetTester.h:129
MonitorElement * mPtRecoOverGen_B_5000_6500
Definition: JetTester.h:145
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: JetTester.h:65
MonitorElement * mPtCorrOverGen_GenEta_40_200
Definition: JetTester.h:109
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * mPtCorrOverReco_Pt_E
Definition: JetTester.h:95
MonitorElement * genPartonPDGID
Definition: JetTester.h:262
MonitorElement * hadEnergyInHE
Definition: JetTester.h:215
MonitorElement * mNvtx
Definition: JetTester.h:74
MonitorElement * HFHadronEnergyFraction
Definition: JetTester.h:244
MonitorElement * mPtRecoOverGen_B_20_40
Definition: JetTester.h:128
const std::vector< double > & binningValues() const
MonitorElement * mPtCorrOverGen_GenPt_F
Definition: JetTester.h:107
MonitorElement * mPtRecoOverGen_F_40_200
Definition: JetTester.h:133
edm::EDGetTokenT< reco::GenJetCollection > genJetsToken_
Definition: JetTester.h:68
bool isMiniAODJet
Definition: JetTester.h:270
MonitorElement * mMassRecoOverGen_F_750_1000
Definition: JetTester.h:163
MonitorElement * mPtRecoOverGen_GenEta_3500
Definition: JetTester.h:193
MonitorElement * HOEnergy
Definition: JetTester.h:256
virtual void scaleEnergy(double fScale)
scale energy of the jet
MonitorElement * mMassRecoOverGen_E_1500_3500
Definition: JetTester.h:168
MonitorElement * neutralHadronEnergy
Definition: JetTester.h:230
double pt() const final
transverse momentum
MonitorElement * electronEnergyFraction
Definition: JetTester.h:240
MonitorElement * mPtRecoOverGen_B_200_600
Definition: JetTester.h:134
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: JetTester.cc:267
MonitorElement * HFEMEnergyFraction
Definition: JetTester.h:246
bool isPFJet
Definition: JetTester.h:269
MonitorElement * mPtRecoOverGen_E_3500_5000
Definition: JetTester.h:144
MonitorElement * mPtRecoOverGen_GenPt_F
Definition: JetTester.h:182
MonitorElement * mMjj
Definition: JetTester.h:199
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
edm::InputTag mInputGenCollection
Definition: JetTester.h:60
MonitorElement * mPtFirst
Definition: JetTester.h:198
MonitorElement * mMassRecoOverGen_B_3500_5000
Definition: JetTester.h:170
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
Definition: JetTester.h:66
MonitorElement * photonEnergyFraction
Definition: JetTester.h:238
edm::EDGetTokenT< pat::JetCollection > patJetsToken_
Definition: JetTester.h:70
MonitorElement * neutralMultiplicity
Definition: JetTester.h:255
MonitorElement * mPtRecoOverGen_F_3500
Definition: JetTester.h:177
MonitorElement * mDeltaPhi
Definition: JetTester.h:125
MonitorElement * mPtRecoOverGen_GenEta_3500_5000
Definition: JetTester.h:191
MonitorElement * mMassRecoOverGen_B_1500_3500
Definition: JetTester.h:167
bool isCaloJet
Definition: JetTester.h:268
MonitorElement * mMassRecoOverGen_E_500_750
Definition: JetTester.h:159
edm::InputTag mJetCorrector
Definition: JetTester.h:61
MonitorElement * mMassRecoOverGen_F_40_200
Definition: JetTester.h:154
MonitorElement * mPtRecoOverGen_GenPhi_E
Definition: JetTester.h:184
MonitorElement * mPtRecoOverGen_GenEta_20_40
Definition: JetTester.h:186
MonitorElement * hadEnergyInHB
Definition: JetTester.h:213
MonitorElement * mPtCorrOverReco_Eta_40_200
Definition: JetTester.h:98
MonitorElement * photonMultiplicity
Definition: JetTester.h:249
MonitorElement * mCorrJetPhi
Definition: JetTester.h:90
MonitorElement * mMassRecoOverGen_B_200_500
Definition: JetTester.h:155
MonitorElement * energyFractionHadronic
Definition: JetTester.h:211
double mMatchGenPtThreshold
Definition: JetTester.h:266
MonitorElement * mMassRecoOverGen_F_20_40
Definition: JetTester.h:151
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
MonitorElement * mPtRecoOverGen_E_40_200
Definition: JetTester.h:132
edm::EDGetTokenT< reco::JetCorrector > jetCorrectorToken_
Definition: JetTester.h:71
MonitorElement * mNJets2
Definition: JetTester.h:206
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * mPtCorrOverReco_Eta_200_600
Definition: JetTester.h:99
MonitorElement * muonEnergyFraction
Definition: JetTester.h:242
MonitorElement * n90
Definition: JetTester.h:221
MonitorElement * mPtRecoOverGen_GenPhi_B
Definition: JetTester.h:183
MonitorElement * mEtaFirst
Definition: JetTester.h:196
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:46
MonitorElement * mPtRecoOverGen_E_5000_6500
Definition: JetTester.h:146
MonitorElement * mMassRecoOverGen_B_5000
Definition: JetTester.h:172
MonitorElement * mPtCorrOverGen_GenEta_3500_5000
Definition: JetTester.h:113
void fillMatchHists(const double GenEta, const double GenPhi, const double GenPt, const double GenMass, const double RecoEta, const double RecoPhi, const double RecoPt, const double RecoMass)
Definition: JetTester.cc:1091
MonitorElement * emEnergyFraction
Definition: JetTester.h:212
MonitorElement * mMassRecoOverGen_B_40_200
Definition: JetTester.h:152
MonitorElement * mCorrJetEta
Definition: JetTester.h:89
MonitorElement * mPtCorrOverReco_Eta_3500
Definition: JetTester.h:104
MonitorElement * photonEnergy
Definition: JetTester.h:237
MonitorElement * towersArea
Definition: JetTester.h:220
MonitorElement * hadEnergyInHF
Definition: JetTester.h:216
MonitorElement * HFHadronMultiplicity
Definition: JetTester.h:251
MonitorElement * mGenPt
Definition: JetTester.h:120
void Fill(long long x)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
MonitorElement * muonEnergy
Definition: JetTester.h:241
MonitorElement * electronMultiplicity
Definition: JetTester.h:250
MonitorElement * mPtRecoOverGen_B_600_1500
Definition: JetTester.h:137
MonitorElement * mEnergy
Definition: JetTester.h:81
MonitorElement * mMassRecoOverGen_F_500_750
Definition: JetTester.h:160
MonitorElement * mPtRecoOverGen_GenPt_E
Definition: JetTester.h:181
MonitorElement * mNJetsEta_E_40
Definition: JetTester.h:203
MonitorElement * mEta
Definition: JetTester.h:77
MonitorElement * mGenEtaFirst
Definition: JetTester.h:121
MonitorElement * mNJetsEta_B_20_40
Definition: JetTester.h:200
MonitorElement * mPtRecoOverGen_B_3500
Definition: JetTester.h:175
MonitorElement * chargedMuEnergy
Definition: JetTester.h:253
MonitorElement * mPtRecoOverGen_F_1500_3500
Definition: JetTester.h:142
MonitorElement * mDeltaEta
Definition: JetTester.h:124
MonitorElement * mNJets_40
Definition: JetTester.h:204
MonitorElement * HFHadronEnergy
Definition: JetTester.h:243
MonitorElement * mNJetsEta_E_20_40
Definition: JetTester.h:201
MonitorElement * hadronFlavor
Definition: JetTester.h:260
Definition: Jet.py:1
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
MonitorElement * mDeltaPt
Definition: JetTester.h:126
MonitorElement * mPtRecoOverGen_B_40_200
Definition: JetTester.h:131
MonitorElement * mPtRecoOverGen_B_1500_3500
Definition: JetTester.h:140
MonitorElement * mPtRecoOverGen_F_200_600
Definition: JetTester.h:136
MonitorElement * mPhiFirst
Definition: JetTester.h:197
MonitorElement * mP
Definition: JetTester.h:80
MonitorElement * mMassRecoOverGen_B_500_750
Definition: JetTester.h:158
edm::EDGetTokenT< GenEventInfoProduct > evtToken_
Definition: JetTester.h:69
MonitorElement * mPtCorrOverGen_GenPt_B
Definition: JetTester.h:105
MonitorElement * mPtCorrOverReco_Eta_600_1500
Definition: JetTester.h:100
MonitorElement * n60
Definition: JetTester.h:222
MonitorElement * mPtCorrOverReco_Eta_5000_6500
Definition: JetTester.h:103
MonitorElement * mPtCorrOverReco_Eta_3500_5000
Definition: JetTester.h:102
MonitorElement * HOEnergyFraction
Definition: JetTester.h:257
MonitorElement * mGenEta
Definition: JetTester.h:118
MonitorElement * hadEnergyInHO
Definition: JetTester.h:214
MonitorElement * mPhi
Definition: JetTester.h:78
MonitorElement * mPtRecoOverGen_E_3500
Definition: JetTester.h:176
MonitorElement * mMassRecoOverGen_F_1000_1500
Definition: JetTester.h:166
MonitorElement * mPtCorrOverGen_GenEta_3500
Definition: JetTester.h:115
MonitorElement * mPtCorrOverGen_GenEta_200_600
Definition: JetTester.h:110
MonitorElement * mPt
Definition: JetTester.h:79
edm::InputTag mInputCollection
Definition: JetTester.h:59
MonitorElement * emEnergyInHF
Definition: JetTester.h:219
MonitorElement * mPtRecoOverGen_E_200_600
Definition: JetTester.h:135
MonitorElement * mMassRecoOverGen_E_750_1000
Definition: JetTester.h:162
JetTester(const edm::ParameterSet &)
Definition: JetTester.cc:12
MonitorElement * mPtRecoOverGen_GenPhi_F
Definition: JetTester.h:185
MonitorElement * chargedHadronEnergyFraction
Definition: JetTester.h:231
MonitorElement * mPtRecoOverGen_E_600_1500
Definition: JetTester.h:138
MonitorElement * mMassRecoOverGen_E_40_200
Definition: JetTester.h:153
MonitorElement * mPtHat
Definition: JetTester.h:123
MonitorElement * chargedHadronEnergy
Definition: JetTester.h:229
MonitorElement * mPtCorrOverReco_Pt_B
Definition: JetTester.h:94
MonitorElement * mPtRecoOverGen_GenPt_B
Definition: JetTester.h:180
MonitorElement * mMassRecoOverGen_B_20_40
Definition: JetTester.h:149
MonitorElement * mPtCorrOverReco_Eta_1500_3500
Definition: JetTester.h:101
MonitorElement * mJetArea
Definition: JetTester.h:84
MonitorElement * mMassRecoOverGen_B_750_1000
Definition: JetTester.h:161
MonitorElement * mMass
Definition: JetTester.h:82
MonitorElement * HFEMMultiplicity
Definition: JetTester.h:252
MonitorElement * chargedEmEnergy
Definition: JetTester.h:227
MonitorElement * mPtRecoOverGen_GenEta_40_200
Definition: JetTester.h:187
MonitorElement * mPtRecoOverGen_E_1500_3500
Definition: JetTester.h:141
MonitorElement * mMassRecoOverGen_B_1000_1500
Definition: JetTester.h:164
MonitorElement * mMassRecoOverGen_E_200_500
Definition: JetTester.h:156
~JetTester() override
Definition: JetTester.cc:514
MonitorElement * mPtRecoOverGen_F_600_1500
Definition: JetTester.h:139
MonitorElement * mMassRecoOverGen_E_5000
Definition: JetTester.h:173
MonitorElement * chargedMuEnergyFraction
Definition: JetTester.h:254
MonitorElement * electronEnergy
Definition: JetTester.h:239
MonitorElement * emEnergyInEE
Definition: JetTester.h:218
MonitorElement * mPtCorrOverGen_GenEta_20_40
Definition: JetTester.h:108
double mRecoJetPtThreshold
Definition: JetTester.h:265
MonitorElement * mPtCorrOverGen_GenEta_1500_3500
Definition: JetTester.h:112
MonitorElement * mGenPhi
Definition: JetTester.h:119
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * maxEInHadTowers
Definition: JetTester.h:210
MonitorElement * mCorrJetEta_Pt40
Definition: JetTester.h:91
MonitorElement * emEnergyInEB
Definition: JetTester.h:217
MonitorElement * mMassRecoOverGen_E_1000_1500
Definition: JetTester.h:165
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: JetTester.h:67
MonitorElement * mConstituents
Definition: JetTester.h:83
MonitorElement * maxEInEmTowers
Definition: JetTester.h:209
MonitorElement * mPtRecoOverGen_F_20_40
Definition: JetTester.h:130
MonitorElement * mGenPhiFirst
Definition: JetTester.h:122
fixed size matrix
MonitorElement * mCorrJetPt
Definition: JetTester.h:88
HLT enums.
MonitorElement * mMassRecoOverGen_E_3500_5000
Definition: JetTester.h:171
double mass() const final
mass
MonitorElement * mPtCorrOverGen_GenPt_E
Definition: JetTester.h:106
MonitorElement * mPtRecoOverGen_GenEta_600_1500
Definition: JetTester.h:189
static int position[264][3]
Definition: ReadPGInfo.cc:289
bool isRealData() const
Definition: EventBase.h:62
MonitorElement * mPtRecoOverGen_GenEta_200_600
Definition: JetTester.h:188
MonitorElement * mMassRecoOverGen_F_200_500
Definition: JetTester.h:157
MonitorElement * mPtCorrOverReco_Eta_20_40
Definition: JetTester.h:97
MonitorElement * chargedEmEnergyFraction
Definition: JetTester.h:233
MonitorElement * mPtCorrOverReco_Pt_F
Definition: JetTester.h:96
MonitorElement * muonMultiplicity
Definition: JetTester.h:225
MonitorElement * neutralHadronEnergyFraction
Definition: JetTester.h:232
double mRThreshold
Definition: JetTester.h:267
MonitorElement * neutralEmEnergy
Definition: JetTester.h:228
bool hasBinningValues() const
MonitorElement * chargedHadronMultiplicity
Definition: JetTester.h:247
MonitorElement * mPtRecoOverGen_B_3500_5000
Definition: JetTester.h:143
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::string JetType
Definition: JetTester.h:62
MonitorElement * mPtRecoOverGen_GenEta_1500_3500
Definition: JetTester.h:190
MonitorElement * mNJets1
Definition: JetTester.h:205
MonitorElement * mPtCorrOverGen_GenEta_600_1500
Definition: JetTester.h:111
MonitorElement * chargedMultiplicity
Definition: JetTester.h:226
MonitorElement * partonFlavor
Definition: JetTester.h:261
double phi() const final
momentum azimuthal angle
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: JetTester.cc:519
MonitorElement * HFEMEnergy
Definition: JetTester.h:245
MonitorElement * mMassRecoOverGen_E_20_40
Definition: JetTester.h:150
MonitorElement * mCorrJetPhi_Pt40
Definition: JetTester.h:92
MonitorElement * neutralHadronMultiplicity
Definition: JetTester.h:248
Definition: Run.h:45
MonitorElement * neutralEmEnergyFraction
Definition: JetTester.h:234
MonitorElement * mPtRecoOverGen_GenEta_5000_6500
Definition: JetTester.h:192
MonitorElement * mPtCorrOverGen_GenEta_5000_6500
Definition: JetTester.h:114
double eta() const final
momentum pseudorapidity