CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  mInputGenCollection (iConfig.getParameter<edm::InputTag> ("srcGen")),
15 // rhoTag (iConfig.getParameter<edm::InputTag> ("srcRho")),
16  mOutputFile (iConfig.getUntrackedParameter<std::string>("OutputFile","")),
17  JetType (iConfig.getUntrackedParameter<std::string>("JetType")),
18  mRecoJetPtThreshold (iConfig.getParameter<double> ("recoJetPtThreshold")),
19  mMatchGenPtThreshold (iConfig.getParameter<double> ("matchGenPtThreshold")),
20  mGenEnergyFractionThreshold (iConfig.getParameter<double> ("genEnergyFractionThreshold")),
21  mRThreshold (iConfig.getParameter<double> ("RThreshold")),
22  JetCorrectionService (iConfig.getParameter<std::string> ("JetCorrections"))
23 {
24  std::string inputCollectionLabel(mInputCollection.label());
25 
26 // std::size_t foundCaloCollection = inputCollectionLabel.find("Calo");
27 // std::size_t foundJPTCollection = inputCollectionLabel.find("JetPlusTrack");
28 // std::size_t foundPFCollection = inputCollectionLabel.find("PF");
29 
30  isCaloJet = (std::string("calo")==JetType);
31  isJPTJet = (std::string("jpt") ==JetType);
32  isPFJet = (std::string("pf") ==JetType);
33 
34  //consumes
35  pvToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag("offlinePrimaryVertices"));
36  caloTowersToken_ = consumes<CaloTowerCollection>(edm::InputTag("towerMaker"));
37  if (isCaloJet) caloJetsToken_ = consumes<reco::CaloJetCollection>(mInputCollection);
38  if (isJPTJet) jptJetsToken_ = consumes<reco::JPTJetCollection>(mInputCollection);
39  if (isPFJet) pfJetsToken_ = consumes<reco::PFJetCollection>(mInputCollection);
40  genJetsToken_ = consumes<reco::GenJetCollection>(edm::InputTag(mInputGenCollection));
41  evtToken_ = consumes<edm::HepMCProduct>(edm::InputTag("generator"));
42 
43 
44  // Events variables
45  mNvtx = 0;
46 
47  // Jet parameters
48  mEta = 0;
49  mPhi = 0;
50  mEnergy = 0;
51  mP = 0;
52  mPt = 0;
53  mMass = 0;
54  mConstituents = 0;
55  mHadTiming = 0;
56  mEmTiming = 0;
57  mJetArea = 0;
58 // mRho = 0;
59 
60  // Corrected jets
61  mCorrJetPt = 0;
62  mCorrJetEta = 0;
63  mCorrJetPhi = 0;
64  mCorrJetEta_Pt40 = 0;
65  mCorrJetPhi_Pt40 = 0;
66 
67  // Corrected jets profiles
84 
85  // Generation
86  mGenEta = 0;
87  mGenPhi = 0;
88  mGenPt = 0;
89  mGenEtaFirst = 0;
90  mGenPhiFirst = 0;
91  mPtHat = 0;
92  mDeltaEta = 0;
93  mDeltaPhi = 0;
94  mDeltaPt = 0;
95 
111 
112  // Generation profiles
124 
125  // Some jet algebra
126  mEtaFirst = 0;
127  mPhiFirst = 0;
128  mPtFirst = 0;
129  mMjj = 0;
130  mNJetsEta_B_20_40 = 0;
131  mNJetsEta_E_20_40 = 0;
132  mNJetsEta_B_40 = 0;
133  mNJetsEta_E_40 = 0;
134  mNJets1 = 0;
135  mNJets2 = 0;
136 
137 // // PFJet specific
138 // mHadEnergyInHF = 0;
139 // mEmEnergyInHF = 0;
140 // mChargedEmEnergy = 0;
141 // mChargedHadronEnergy = 0;
142 // mNeutralEmEnergy = 0;
143 // mNeutralHadronEnergy = 0;
144 
145  // ---- Calo Jet specific information ----
147  maxEInEmTowers = 0;
149  maxEInHadTowers = 0;
153  emEnergyFraction = 0;
155  hadEnergyInHB = 0;
157  hadEnergyInHO = 0;
159  hadEnergyInHE = 0;
161  hadEnergyInHF = 0;
163  emEnergyInEB = 0;
165  emEnergyInEE = 0;
167  emEnergyInHF = 0;
169  towersArea = 0;
171  n90 = 0;
173  n60 = 0;
174 
175  // ---- JPT Jet specific information ----
177  elecMultiplicity = 0;
178 
179  // ---- JPT or PF Jet specific information ----
181  muonMultiplicity = 0;
185  chargedEmEnergy = 0;
187  neutralEmEnergy = 0;
200 
201  // ---- PF Jet specific information ----
203  photonEnergy = 0;
207  electronEnergy = 0;
211  muonEnergy = 0;
213  muonEnergyFraction = 0;
215  HFHadronEnergy = 0;
219  HFEMEnergy = 0;
221  HFEMEnergyFraction = 0;
227  photonMultiplicity = 0;
233  HFEMMultiplicity = 0;
235  chargedMuEnergy = 0;
240 
241 
242  DQMStore* dbe = &*edm::Service<DQMStore>();
243 
244  if (dbe) {
245  dbe->setCurrentFolder("JetMET/JetValidation/"+mInputCollection.label());
246 
247  double log10PtMin = 0.50;
248  double log10PtMax = 3.75;
249  int log10PtBins = 26;
250 
251  double etaRange[91] = {-6.0, -5.8, -5.6, -5.4, -5.2, -5.0, -4.8, -4.6, -4.4, -4.2,
252  -4.0, -3.8, -3.6, -3.4, -3.2, -3.0, -2.9, -2.8, -2.7, -2.6,
253  -2.5, -2.4, -2.3, -2.2, -2.1, -2.0, -1.9, -1.8, -1.7, -1.6,
254  -1.5, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9, -0.8, -0.7, -0.6,
255  -0.5, -0.4, -0.3, -0.2, -0.1,
256  0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
257  1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9,
258  2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9,
259  3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8,
260  5.0, 5.2, 5.4, 5.6, 5.8, 6.0};
261 
262  // Event variables
263  mNvtx = dbe->book1D("Nvtx", "number of vertices", 60, 0, 60);
264 
265  // Jet parameters
266  mEta = dbe->book1D("Eta", "Eta", 120, -6, 6);
267  mPhi = dbe->book1D("Phi", "Phi", 70, -3.5, 3.5);
268  mPt = dbe->book1D("Pt", "Pt", 100, 0, 1000);
269  mP = dbe->book1D("P", "P", 100, 0, 1000);
270  mEnergy = dbe->book1D("Energy", "Energy", 100, 0, 1000);
271  mMass = dbe->book1D("Mass", "Mass", 100, 0, 200);
272  mConstituents = dbe->book1D("Constituents", "Constituents", 100, 0, 100);
273  mHadTiming = dbe->book1D("HadTiming", "HadTiming", 75, -50, 100);
274  mEmTiming = dbe->book1D("EmTiming", "EmTiming", 75, -50, 100);
275  mJetArea = dbe->book1D("JetArea", "JetArea", 100, 0, 4);
276 // mRho = dbe->book1D("Rho", "Rho", 100, 0, 5);
277 
278  // Corrected jets
279  if (!JetCorrectionService.empty()) {
280  mCorrJetPt = dbe->book1D("CorrJetPt", "CorrJetPt", 150, 0, 1500);
281  mCorrJetEta = dbe->book1D("CorrJetEta", "CorrJetEta Pt>20", 60, -6, 6);
282  mCorrJetPhi = dbe->book1D("CorrJetPhi", "CorrJetPhi Pt>20", 70, -3.5, 3.5);
283  mCorrJetEta_Pt40 = dbe->book1D("CorrJetEta_Pt40", "CorrJetEta Pt>40", 60, -6, 6);
284  mCorrJetPhi_Pt40 = dbe->book1D("CorrJetPhi_Pt40", "CorrJetPhi Pt>40", 70, -3.5, 3.5);
285 
286  // Corrected jets profiles
287  mPtCorrOverReco_Pt_B = dbe->bookProfile("PtCorrOverReco_Pt_B", "0<|eta|<1.5", log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
288  mPtCorrOverReco_Pt_E = dbe->bookProfile("PtCorrOverReco_Pt_E", "1.5<|eta|<3", log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
289  mPtCorrOverReco_Pt_F = dbe->bookProfile("PtCorrOverReco_Pt_F", "3<|eta|<6", log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
290 
291  mPtCorrOverReco_Eta_20_40 = dbe->bookProfile("PtCorrOverReco_Eta_20_40", "20<genPt<40", 90, etaRange, 0, 5, " ");
292  mPtCorrOverReco_Eta_40_200 = dbe->bookProfile("PtCorrOverReco_Eta_40_200", "40<genPt<200", 90, etaRange, 0, 5, " ");
293  mPtCorrOverReco_Eta_200_600 = dbe->bookProfile("PtCorrOverReco_Eta_200_600", "200<genPt<600", 90, etaRange, 0, 5, " ");
294  mPtCorrOverReco_Eta_600_1500 = dbe->bookProfile("PtCorrOverReco_Eta_600_1500", "600<genPt<1500", 90, etaRange, 0, 5, " ");
295  mPtCorrOverReco_Eta_1500_3500 = dbe->bookProfile("PtCorrOverReco_Eta_1500_3500", "1500<genPt<3500", 90, etaRange, 0, 5, " ");
296 
297  mPtCorrOverGen_GenPt_B = dbe->bookProfile("PtCorrOverGen_GenPt_B", "0<|eta|<1.5", log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
298  mPtCorrOverGen_GenPt_E = dbe->bookProfile("PtCorrOverGen_GenPt_E", "1.5<|eta|<3", log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
299  mPtCorrOverGen_GenPt_F = dbe->bookProfile("PtCorrOverGen_GenPt_F", "3<|eta|<6", log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
300 
301  mPtCorrOverGen_GenEta_20_40 = dbe->bookProfile("PtCorrOverGen_GenEta_20_40", "20<genPt<40;#eta", 90, etaRange, 0.8, 1.2, " ");
302  mPtCorrOverGen_GenEta_40_200 = dbe->bookProfile("PtCorrOverGen_GenEta_40_200", "40<genPt<200;#eta", 90, etaRange, 0.8, 1.2, " ");
303  mPtCorrOverGen_GenEta_200_600 = dbe->bookProfile("PtCorrOverGen_GenEta_200_600", "200<genPt<600;#eta", 90, etaRange, 0.8, 1.2, " ");
304  mPtCorrOverGen_GenEta_600_1500 = dbe->bookProfile("PtCorrOverGen_GenEta_600_1500", "600<genPt<1500;#eta", 90, etaRange, 0.8, 1.2, " ");
305  mPtCorrOverGen_GenEta_1500_3500 = dbe->bookProfile("PtCorrOverGen_GenEta_1500_3500", "1500<genPt<3500;#eta", 90, etaRange, 0.8, 1.2, " ");
306  }
307 
308  mGenEta = dbe->book1D("GenEta", "GenEta", 120, -6, 6);
309  mGenPhi = dbe->book1D("GenPhi", "GenPhi", 70, -3.5, 3.5);
310  mGenPt = dbe->book1D("GenPt", "GenPt", 100, 0, 1000);
311  mGenEtaFirst = dbe->book1D("GenEtaFirst", "GenEtaFirst", 120, -6, 6);
312  mGenPhiFirst = dbe->book1D("GenPhiFirst", "GenPhiFirst", 70, -3.5, 3.5);
313  mPtHat = dbe->book1D("PtHat", "PtHat", 100, 0, 1000);
314  mDeltaEta = dbe->book1D("DeltaEta", "DeltaEta", 100, -0.5, 0.5);
315  mDeltaPhi = dbe->book1D("DeltaPhi", "DeltaPhi", 100, -0.5, 0.5);
316  mDeltaPt = dbe->book1D("DeltaPt", "DeltaPt", 100, -1.0, 1.0);
317 
318  mPtRecoOverGen_B_20_40 = dbe->book1D("PtRecoOverGen_B_20_40", "20<genpt<40", 50, 0, 2);
319  mPtRecoOverGen_E_20_40 = dbe->book1D("PtRecoOverGen_E_20_40", "20<genpt<40", 50, 0, 2);
320  mPtRecoOverGen_F_20_40 = dbe->book1D("PtRecoOverGen_F_20_40", "20<genpt<40", 50, 0, 2);
321  mPtRecoOverGen_B_40_200 = dbe->book1D("PtRecoOverGen_B_40_200", "40<genpt<200", 50, 0, 2);
322  mPtRecoOverGen_E_40_200 = dbe->book1D("PtRecoOverGen_E_40_200", "40<genpt<200", 50, 0, 2);
323  mPtRecoOverGen_F_40_200 = dbe->book1D("PtRecoOverGen_F_40_200", "40<genpt<200", 50, 0, 2);
324  mPtRecoOverGen_B_200_600 = dbe->book1D("PtRecoOverGen_B_200_600", "200<genpt<600", 50, 0, 2);
325  mPtRecoOverGen_E_200_600 = dbe->book1D("PtRecoOverGen_E_200_600", "200<genpt<600", 50, 0, 2);
326  mPtRecoOverGen_F_200_600 = dbe->book1D("PtRecoOverGen_F_200_600", "200<genpt<600", 50, 0, 2);
327  mPtRecoOverGen_B_600_1500 = dbe->book1D("PtRecoOverGen_B_600_1500", "600<genpt<1500", 50, 0, 2);
328  mPtRecoOverGen_E_600_1500 = dbe->book1D("PtRecoOverGen_E_600_1500", "600<genpt<1500", 50, 0, 2);
329  mPtRecoOverGen_F_600_1500 = dbe->book1D("PtRecoOverGen_F_600_1500", "600<genpt<1500", 50, 0, 2);
330  mPtRecoOverGen_B_1500_3500 = dbe->book1D("PtRecoOverGen_B_1500_3500", "1500<genpt<3500", 50, 0, 2);
331  mPtRecoOverGen_E_1500_3500 = dbe->book1D("PtRecoOverGen_E_1500_3500", "1500<genpt<3500", 50, 0, 2);
332  mPtRecoOverGen_F_1500_3500 = dbe->book1D("PtRecoOverGen_F_1500_3500", "1500<genpt<3500", 50, 0, 2);
333 
334  // Generation profiles
335  mPtRecoOverGen_GenPt_B = dbe->bookProfile("PtRecoOverGen_GenPt_B", "0<|eta|<1.5", log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
336  mPtRecoOverGen_GenPt_E = dbe->bookProfile("PtRecoOverGen_GenPt_E", "1.5<|eta|<3", log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
337  mPtRecoOverGen_GenPt_F = dbe->bookProfile("PtRecoOverGen_GenPt_F", "3<|eta|<6", log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
338  mPtRecoOverGen_GenPhi_B = dbe->bookProfile("PtRecoOverGen_GenPhi_B", "0<|eta|<1.5", 70, -3.5, 3.5, 0, 2, " ");
339  mPtRecoOverGen_GenPhi_E = dbe->bookProfile("PtRecoOverGen_GenPhi_E", "1.5<|eta|<3", 70, -3.5, 3.5, 0, 2, " ");
340  mPtRecoOverGen_GenPhi_F = dbe->bookProfile("PtRecoOverGen_GenPhi_F", "3<|eta|<6", 70, -3.5, 3.5, 0, 2, " ");
341  mPtRecoOverGen_GenEta_20_40 = dbe->bookProfile("PtRecoOverGen_GenEta_20_40", "20<genpt<40", 50, etaRange, 0, 2, " ");
342  mPtRecoOverGen_GenEta_40_200 = dbe->bookProfile("PtRecoOverGen_GenEta_40_200", "40<genpt<200", 50, etaRange, 0, 2, " ");
343  mPtRecoOverGen_GenEta_200_600 = dbe->bookProfile("PtRecoOverGen_GenEta_200_600", "200<genpt<600", 50, etaRange, 0, 2, " ");
344  mPtRecoOverGen_GenEta_600_1500 = dbe->bookProfile("PtRecoOverGen_GenEta_600_1500", "600<genpt<1500", 50, etaRange, 0, 2, " ");
345  mPtRecoOverGen_GenEta_1500_3500 = dbe->bookProfile("PtRecoOverGen_GenEta_1500_3500", "1500<genpt<3500", 50, etaRange, 0, 2, " ");
346 
347  // Some jet algebra
348  //------------------------------------------------------------------------
349  mEtaFirst = dbe->book1D("EtaFirst", "EtaFirst", 120, -6, 6);
350  mPhiFirst = dbe->book1D("PhiFirst", "PhiFirst", 70, -3.5, 3.5);
351  mPtFirst = dbe->book1D("PtFirst", "PtFirst", 50, 0, 1000);
352  mMjj = dbe->book1D("Mjj", "Mjj", 100, 0, 2000);
353  mNJetsEta_B_20_40 = dbe->book1D("NJetsEta_B_20_40", "NJetsEta_B 20<Pt<40", 15, 0, 15);
354  mNJetsEta_E_20_40 = dbe->book1D("NJetsEta_E_20_40", "NJetsEta_E 20<Pt<40", 15, 0, 15);
355  mNJetsEta_B_40 = dbe->book1D("NJetsEta_B", "NJetsEta_B 40<Pt", 15, 0, 15);
356  mNJetsEta_E_40 = dbe->book1D("NJetsEta_E", "NJetsEta_E 40<Pt", 15, 0, 15);
357  mNJets_40 = dbe->book1D("NJets", "NJets 40>Pt", 15, 0, 15);
358  mNJets1 = dbe->bookProfile("NJets1", "Number of jets above Pt threshold", 100, 0, 200, 100, 0, 50, "s");
359  mNJets2 = dbe->bookProfile("NJets2", "Number of jets above Pt threshold", 100, 0, 4000, 100, 0, 50, "s");
360 
361 
362  // PFJet specific
363  //------------------------------------------------------------------------
364 // if (isPFJet) {
365 // mChargedEmEnergy = dbe->book1D("ChargedEmEnergy", "ChargedEmEnergy", 100, 0, 500);
366 // mChargedHadronEnergy = dbe->book1D("ChargedHadronEnergy", "ChargedHadronEnergy", 100, 0, 500);
367 // mNeutralEmEnergy = dbe->book1D("NeutralEmEnergy", "NeutralEmEnergy", 100, 0, 500);
368 // mNeutralHadronEnergy = dbe->book1D("NeutralHadronEnergy", "NeutralHadronEnergy", 100, 0, 500);
369 // mHadEnergyInHF = dbe->book1D("HadEnergyInHF", "HadEnergyInHF", 100, 0, 2500);
370 // mEmEnergyInHF = dbe->book1D("EmEnergyInHF", "EmEnergyInHF", 100, -20, 450);
371 // }
372  // ---- Calo Jet specific information ----
373  if (isCaloJet) {
374  maxEInEmTowers = dbe->book1D("maxEInEmTowers", "maxEInEmTowers", 50,0,500);
375  maxEInHadTowers = dbe->book1D("maxEInHadTowers", "maxEInHadTowers", 50,0,500);
376  energyFractionHadronic = dbe->book1D("energyFractionHadronic", "energyFractionHadronic", 50,0,1);
377  emEnergyFraction = dbe->book1D("emEnergyFraction", "emEnergyFraction", 50,0,1);
378  hadEnergyInHB = dbe->book1D("hadEnergyInHB", "hadEnergyInHB", 50,0,500);
379  hadEnergyInHO = dbe->book1D("hadEnergyInHO", "hadEnergyInHO", 50,0,500);
380  hadEnergyInHE = dbe->book1D("hadEnergyInHE", "hadEnergyInHE", 50,0,500);
381  hadEnergyInHF = dbe->book1D("hadEnergyInHF", "hadEnergyInHF", 50,0,500);
382  emEnergyInEB = dbe->book1D("emEnergyInEB", "emEnergyInEB", 50,0,500);
383  emEnergyInEE = dbe->book1D("emEnergyInEE", "emEnergyInEE", 50,0,500);
384  emEnergyInHF = dbe->book1D("emEnergyInHF", "emEnergyInHF", 50,0,500);
385  towersArea = dbe->book1D("towersArea", "towersArea", 50,0,1);
386  n90 = dbe->book1D("n90", "n90", 30,0,30);
387  n60 = dbe->book1D("n60", "n60", 30,0,30);
388  }
389  // ---- JPT Jet specific information ----
390  if (isJPTJet) {
391  elecMultiplicity = dbe->book1D("elecMultiplicity", "elecMultiplicity", 10,0,10);
392  }
393  // ---- JPT or PF Jet specific information ----
394  if (isPFJet or isJPTJet) {
395  muonMultiplicity = dbe->book1D("muonMultiplicity", "muonMultiplicity", 10,0,10);
396  chargedMultiplicity = dbe->book1D("chargedMultiplicity", "chargedMultiplicity", 100,0,100);
397  chargedEmEnergy = dbe->book1D("chargedEmEnergy", "chargedEmEnergy", 100,0,500);
398  neutralEmEnergy = dbe->book1D("neutralEmEnergy", "neutralEmEnergy", 100,0,500);
399  chargedHadronEnergy = dbe->book1D("chargedHadronEnergy", "chargedHadronEnergy", 100,0,500);
400  neutralHadronEnergy = dbe->book1D("neutralHadronEnergy", "neutralHadronEnergy", 100,0,500);
401  chargedHadronEnergyFraction = dbe->book1D("chargedHadronEnergyFraction", "chargedHadronEnergyFraction", 50,0,1);
402  neutralHadronEnergyFraction = dbe->book1D("neutralHadronEnergyFraction", "neutralHadronEnergyFraction", 50,0,1);
403  chargedEmEnergyFraction = dbe->book1D("chargedEmEnergyFraction", "chargedEmEnergyFraction", 50,0,1);
404  neutralEmEnergyFraction = dbe->book1D("neutralEmEnergyFraction", "neutralEmEnergyFraction", 50,0,1);
405  }
406  // ---- PF Jet specific information ----
407  if (isPFJet) {
408  photonEnergy = dbe->book1D("photonEnergy", "photonEnergy", 50,0,500);
409  photonEnergyFraction = dbe->book1D("photonEnergyFraction", "photonEnergyFraction", 50,0,1);
410  electronEnergy = dbe->book1D("electronEnergy", "electronEnergy", 50,0,500);
411  electronEnergyFraction = dbe->book1D("electronEnergyFraction", "electronEnergyFraction", 50,0,1);
412  muonEnergy = dbe->book1D("muonEnergy", "muonEnergy", 50,0,500);
413  muonEnergyFraction = dbe->book1D("muonEnergyFraction", "muonEnergyFraction", 50,0,1);
414  HFHadronEnergy = dbe->book1D("HFHadronEnergy", "HFHadronEnergy", 50,0,500);
415  HFHadronEnergyFraction = dbe->book1D("HFHadronEnergyFraction", "HFHadronEnergyFraction", 50,0,1);
416  HFEMEnergy = dbe->book1D("HFEMEnergy", "HFEMEnergy", 50,0,500);
417  HFEMEnergyFraction = dbe->book1D("HFEMEnergyFraction", "HFEMEnergyFraction", 50,0,1);
418  chargedHadronMultiplicity = dbe->book1D("chargedHadronMultiplicity", "chargedHadronMultiplicity", 50,0,50);
419  neutralHadronMultiplicity = dbe->book1D("neutralHadronMultiplicity", "neutralHadronMultiplicity", 50,0,50);
420  photonMultiplicity = dbe->book1D("photonMultiplicity", "photonMultiplicity", 10,0,10);
421  electronMultiplicity = dbe->book1D("electronMultiplicity", "electronMultiplicity", 10,0,10);
422  HFHadronMultiplicity = dbe->book1D("HFHadronMultiplicity", "HFHadronMultiplicity", 50,0,50);
423  HFEMMultiplicity = dbe->book1D("HFEMMultiplicity", "HFEMMultiplicity", 50,0,50);
424  chargedMuEnergy = dbe->book1D("chargedMuEnergy", "chargedMuEnergy", 50,0,500);
425  chargedMuEnergyFraction = dbe->book1D("chargedMuEnergyFraction", "chargedMuEnergyFraction", 50,0,1);
426  neutralMultiplicity = dbe->book1D("neutralMultiplicity", "neutralMultiplicity", 50,0,50);
427  }
428  }
429 
430  if (mOutputFile.empty ())
431  {
432  LogInfo("OutputInfo") << " Histograms will NOT be saved";
433  }
434  else
435  {
436  LogInfo("OutputInfo") << " Histograms will be saved to file:" << mOutputFile;
437  }
438 }
439 
440 
441 //------------------------------------------------------------------------------
442 // ~JetTester
443 //------------------------------------------------------------------------------
445 
446 
447 //------------------------------------------------------------------------------
448 // beginJob
449 //------------------------------------------------------------------------------
451 
452 
453 //------------------------------------------------------------------------------
454 // endJob
455 //------------------------------------------------------------------------------
457 {
458  if (!mOutputFile.empty() && &*edm::Service<DQMStore>())
459  {
461  }
462 }
463 
464 
465 //------------------------------------------------------------------------------
466 // analyze
467 //------------------------------------------------------------------------------
468 void JetTester::analyze(const edm::Event& mEvent, const edm::EventSetup& mSetup)
469 {
470  // Get the primary vertices
471  //----------------------------------------------------------------------------
473  mEvent.getByToken(pvToken_, pvHandle);
474 
475  int nGoodVertices = 0;
476 
477  if (pvHandle.isValid())
478  {
479  for (unsigned i=0; i<pvHandle->size(); i++)
480  {
481  if ((*pvHandle)[i].ndof() > 4 &&
482  (fabs((*pvHandle)[i].z()) <= 24) &&
483  (fabs((*pvHandle)[i].position().rho()) <= 2))
484  nGoodVertices++;
485  }
486  }
487 
488  mNvtx->Fill(nGoodVertices);
489 
490 
491  // Get the CaloTower collection
492  //----------------------------------------------------------------------------
494  mEvent.getByToken(caloTowersToken_, caloTowers);
495 
496  if (caloTowers.isValid())
497  {
498  for (CaloTowerCollection::const_iterator cal=caloTowers->begin();
499  cal!=caloTowers->end(); ++cal)
500  {
501  mHadTiming->Fill(cal->hcalTime());
502  mEmTiming ->Fill(cal->ecalTime());
503  }
504  }
505 
506 
507 // // Get the jet rho
508 // //----------------------------------------------------------------------------
509 // edm::Handle<double> pRho;
510 // mEvent.getByToken(rhoTag, pRho);
511 //
512 // if (pRho.isValid())
513 // {
514 // double jetRho = *pRho;
515 //
516 // if (mRho) mRho->Fill(jetRho);
517 // }
518 
519 
520  // Get the Jet collection
521  //----------------------------------------------------------------------------
522  math::XYZTLorentzVector p4tmp[2];
523 
524  std::vector<Jet> recoJets;
525  recoJets.clear();
526 
530 
531  if (isCaloJet) mEvent.getByToken(caloJetsToken_, caloJets);
532  if (isJPTJet) mEvent.getByToken(jptJetsToken_, jptJets);
533  if (isPFJet) mEvent.getByToken(pfJetsToken_, pfJets);
534 
535  if (isCaloJet && !caloJets.isValid()) return;
536  if (isJPTJet && !jptJets.isValid()) return;
537  if (isPFJet && !pfJets.isValid()) return;
538 
539  if (isCaloJet)
540  {
541  for (unsigned ijet=0; ijet<caloJets->size(); ijet++)
542  recoJets.push_back((*caloJets)[ijet]);
543  }
544 
545  if (isJPTJet)
546  {
547  for (unsigned ijet=0; ijet<jptJets->size(); ijet++)
548  recoJets.push_back((*jptJets)[ijet]);
549  }
550 
551  if (isPFJet) {
552  for (unsigned ijet=0; ijet<pfJets->size(); ijet++)
553  recoJets.push_back((*pfJets)[ijet]);
554  }
555 
556  int nJet = 0;
557  int nJet_E_20_40 = 0;
558  int nJet_B_20_40 = 0;
559  int nJet_E_40 = 0;
560  int nJet_B_40 = 0;
561  int nJet_40 = 0;
562 
563  for (unsigned ijet=0; ijet<recoJets.size(); ijet++) {
564  if ( (recoJets[ijet].pt() > 20.) and (recoJets[ijet].pt() < mRecoJetPtThreshold)) {
565  if (fabs(recoJets[ijet].eta()) > 1.5)
566  nJet_E_20_40++;
567  else
568  nJet_B_20_40++;
569  }
570  if (recoJets[ijet].pt() > mRecoJetPtThreshold) {
571  //counting forward and barrel jets
572  if (fabs(recoJets[ijet].eta()) > 1.5)
573  nJet_E_40++;
574  else
575  nJet_B_40++;
576  nJet_40++;
577 
578  if (mEta) mEta->Fill(recoJets[ijet].eta());
579 
580  if (mJetArea) mJetArea ->Fill(recoJets[ijet].jetArea());
581  if (mPhi) mPhi ->Fill(recoJets[ijet].phi());
582  if (mEnergy) mEnergy ->Fill(recoJets[ijet].energy());
583  if (mP) mP ->Fill(recoJets[ijet].p());
584  if (mPt) mPt ->Fill(recoJets[ijet].pt());
585  if (mMass) mMass ->Fill(recoJets[ijet].mass());
586  if (mConstituents) mConstituents->Fill(recoJets[ijet].nConstituents());
587 
588  if (ijet == 0) {
589  if (mEtaFirst) mEtaFirst->Fill(recoJets[ijet].eta());
590  if (mPhiFirst) mPhiFirst->Fill(recoJets[ijet].phi());
591  if (mPtFirst) mPtFirst ->Fill(recoJets[ijet].pt());
592  }
593 
594  if (ijet == 0) {nJet++; p4tmp[0] = recoJets[ijet].p4();}
595  if (ijet == 1) {nJet++; p4tmp[1] = recoJets[ijet].p4();}
596 
597  // if (isPFJet || isCaloJet) {
598  // if (mHadEnergyInHF) mHadEnergyInHF ->Fill((*pfJets)[ijet].HFHadronEnergy());
599  // if (mEmEnergyInHF) mEmEnergyInHF ->Fill((*pfJets)[ijet].HFEMEnergy());
600  // if (mChargedEmEnergy) mChargedEmEnergy ->Fill((*pfJets)[ijet].chargedEmEnergy());
601  // if (mChargedHadronEnergy) mChargedHadronEnergy->Fill((*pfJets)[ijet].chargedHadronEnergy());
602  // if (mNeutralEmEnergy) mNeutralEmEnergy ->Fill((*pfJets)[ijet].neutralEmEnergy());
603  // if (mNeutralHadronEnergy) mNeutralHadronEnergy->Fill((*pfJets)[ijet].neutralHadronEnergy());
604  // }
605 
606 
607  // ---- Calo Jet specific information ----
608  if (isCaloJet) {
609  maxEInEmTowers ->Fill((*caloJets)[ijet].maxEInEmTowers());
610  maxEInHadTowers ->Fill((*caloJets)[ijet].maxEInHadTowers());
611  energyFractionHadronic ->Fill((*caloJets)[ijet].energyFractionHadronic());
612  emEnergyFraction ->Fill((*caloJets)[ijet].emEnergyFraction());
613  hadEnergyInHB ->Fill((*caloJets)[ijet].hadEnergyInHB());
614  hadEnergyInHO ->Fill((*caloJets)[ijet].hadEnergyInHO());
615  hadEnergyInHE ->Fill((*caloJets)[ijet].hadEnergyInHE());
616  hadEnergyInHF ->Fill((*caloJets)[ijet].hadEnergyInHF());
617  emEnergyInEB ->Fill((*caloJets)[ijet].emEnergyInEB());
618  emEnergyInEE ->Fill((*caloJets)[ijet].emEnergyInEE());
619  emEnergyInHF ->Fill((*caloJets)[ijet].emEnergyInHF());
620  towersArea ->Fill((*caloJets)[ijet].towersArea());
621  n90 ->Fill((*caloJets)[ijet].n90());
622  n60 ->Fill((*caloJets)[ijet].n60());
623  }
624  // ---- JPT Jet specific information ----
625  if (isJPTJet) {
626  elecMultiplicity ->Fill((*jptJets)[ijet].elecMultiplicity());
627  }
628  // ---- JPT or PF Jet specific information ----
629  if (isPFJet) {
630  muonMultiplicity ->Fill((*pfJets)[ijet].muonMultiplicity());
631  chargedMultiplicity ->Fill((*pfJets)[ijet].chargedMultiplicity());
632  chargedEmEnergy ->Fill((*pfJets)[ijet].chargedEmEnergy());
633  neutralEmEnergy ->Fill((*pfJets)[ijet].neutralEmEnergy());
634  chargedHadronEnergy ->Fill((*pfJets)[ijet].chargedHadronEnergy());
635  neutralHadronEnergy ->Fill((*pfJets)[ijet].neutralHadronEnergy());
640  }
641  if (isJPTJet) {
642  muonMultiplicity ->Fill((*jptJets)[ijet].muonMultiplicity());
643  chargedMultiplicity ->Fill((*jptJets)[ijet].chargedMultiplicity());
644  chargedEmEnergy ->Fill((*jptJets)[ijet].chargedEmEnergy());
645  neutralEmEnergy ->Fill((*jptJets)[ijet].neutralEmEnergy());
646  chargedHadronEnergy ->Fill((*jptJets)[ijet].chargedHadronEnergy());
647  neutralHadronEnergy ->Fill((*jptJets)[ijet].neutralHadronEnergy());
652  }
653  // ---- PF Jet specific information ----
654  if (isPFJet) {
655  photonEnergy ->Fill((*pfJets)[ijet].photonEnergy());
656  photonEnergyFraction ->Fill((*pfJets)[ijet].photonEnergyFraction());
657  electronEnergy ->Fill((*pfJets)[ijet].electronEnergy());
659  muonEnergy ->Fill((*pfJets)[ijet].muonEnergy());
660  muonEnergyFraction ->Fill((*pfJets)[ijet].muonEnergyFraction());
661  HFHadronEnergy ->Fill((*pfJets)[ijet].HFHadronEnergy());
663  HFEMEnergy ->Fill((*pfJets)[ijet].HFEMEnergy());
664  HFEMEnergyFraction ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
667  photonMultiplicity ->Fill((*pfJets)[ijet].photonMultiplicity());
668  electronMultiplicity ->Fill((*pfJets)[ijet].electronMultiplicity());
669  HFHadronMultiplicity ->Fill((*pfJets)[ijet].HFHadronMultiplicity());
670  HFEMMultiplicity ->Fill((*pfJets)[ijet].HFEMMultiplicity());
671  chargedMuEnergy ->Fill((*pfJets)[ijet].chargedMuEnergy());
673  neutralMultiplicity ->Fill((*pfJets)[ijet].neutralMultiplicity());
674  }
675  }
676  }
677 
678  if (mNJetsEta_B_20_40) mNJetsEta_B_20_40->Fill(nJet_B_20_40);
679  if (mNJetsEta_E_20_40) mNJetsEta_E_20_40->Fill(nJet_E_20_40);
680  if (mNJetsEta_B_40) mNJetsEta_B_40->Fill(nJet_B_40);
681  if (mNJetsEta_E_40) mNJetsEta_E_40->Fill(nJet_E_40);
682  if (mNJets_40) mNJets_40->Fill(nJet_40);
683  if (nJet >= 2)
684  {
685  if (mMjj) mMjj->Fill((p4tmp[0]+p4tmp[1]).mass());
686  }
687 
688 
689  // Count jets above pt cut
690  //----------------------------------------------------------------------------
691  for (int istep=0; istep<100; ++istep)
692  {
693  int njets1 = 0;
694  int njets2 = 0;
695 
696  float ptStep1 = (istep * ( 200. / 100.));
697  float ptStep2 = (istep * (4000. / 100.));
698 
699  for (unsigned ijet=0; ijet<recoJets.size(); ijet++) {
700  if (recoJets[ijet].pt() > ptStep1) njets1++;
701  if (recoJets[ijet].pt() > ptStep2) njets2++;
702  }
703  mNJets1->Fill(ptStep1, njets1);
704  mNJets2->Fill(ptStep2, njets2);
705  }
706 
707 
708  // Corrected jets
709  //----------------------------------------------------------------------------
710  double scale = -999;
711 
712  if (!JetCorrectionService.empty())
713  {
715  for (unsigned ijet=0; ijet<recoJets.size(); ijet++) {
716  Jet correctedJet = recoJets[ijet];
717 
718  if (isCaloJet) scale = corrector->correction((*caloJets)[ijet], mEvent, mSetup);
719  if (isJPTJet) scale = corrector->correction((*jptJets)[ijet], mEvent, mSetup);
720  if (isPFJet) scale = corrector->correction((*pfJets)[ijet], mEvent, mSetup);
721 
722  correctedJet.scaleEnergy(scale);
723 
724  if (correctedJet.pt() < 20) continue;
725 
726  mCorrJetEta->Fill(correctedJet.eta());
727  mCorrJetPhi->Fill(correctedJet.phi());
728  mCorrJetPt ->Fill(correctedJet.pt());
729  if (correctedJet.pt() >= 40) {
730  mCorrJetEta_Pt40->Fill(correctedJet.eta());
731  mCorrJetPhi_Pt40->Fill(correctedJet.phi());
732  }
733 
734  double ijetEta = recoJets[ijet].eta();
735  double ijetPt = recoJets[ijet].pt();
736  double ratio = correctedJet.pt() / ijetPt;
737 
738  if (fabs(ijetEta) < 1.5) mPtCorrOverReco_Pt_B->Fill(log10(ijetPt), ratio);
739  else if (fabs(ijetEta) < 3.0) mPtCorrOverReco_Pt_E->Fill(log10(ijetPt), ratio);
740  else if (fabs(ijetEta) < 6.0) mPtCorrOverReco_Pt_F->Fill(log10(ijetPt), ratio);
741 
742  if (ijetPt < 40) mPtCorrOverReco_Eta_20_40 ->Fill(ijetEta, ratio);
743  else if (ijetPt < 200) mPtCorrOverReco_Eta_40_200 ->Fill(ijetEta, ratio);
744  else if (ijetPt < 600) mPtCorrOverReco_Eta_200_600 ->Fill(ijetEta, ratio);
745  else if (ijetPt < 1500) mPtCorrOverReco_Eta_600_1500 ->Fill(ijetEta, ratio);
746  else if (ijetPt < 3500) mPtCorrOverReco_Eta_1500_3500->Fill(ijetEta, ratio);
747  }
748  }
749 
750 
751  //----------------------------------------------------------------------------
752  //
753  // Generation
754  //
755  //----------------------------------------------------------------------------
756  if (!mEvent.isRealData())
757  {
758  // Get ptHat
759  //------------------------------------------------------------------------
761  mEvent.getByToken(evtToken_, evt);
762 
763  if (evt.isValid()) {
764  HepMC::GenEvent* myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
765  double ptHat = myGenEvent->event_scale();
766  if (mPtHat) mPtHat->Fill(ptHat);
767  delete myGenEvent;
768  }
769  // Gen jets
770  //------------------------------------------------------------------------
772  mEvent.getByToken(genJetsToken_, genJets);
773 
774  if (!genJets.isValid()) return;
775 
776  for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
777  if (mGenEta) mGenEta->Fill(gjet->eta());
778  if (mGenPhi) mGenPhi->Fill(gjet->phi());
779  if (mGenPt) mGenPt ->Fill(gjet->pt());
780  if (gjet == genJets->begin()) {
781  if (mGenEtaFirst) mGenEtaFirst->Fill(gjet->eta());
782  if (mGenPhiFirst) mGenPhiFirst->Fill(gjet->phi());
783  }
784  }
785 
786  // Match RecoJets to GenJets
787  //------------------------------------------------------------------------
788  JetMatchingTools jetMatching(mEvent);
789 
790  if (!(mInputGenCollection.label().empty())) {
791  for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) {
792  if (fabs(gjet->eta()) > 6.) continue; // Out of the detector
793  if (gjet->pt() < mMatchGenPtThreshold) continue;
794  if (recoJets.size() <= 0) continue;
795  // pt response
796  //------------------------------------------------------------
797  if (!JetCorrectionService.empty()) {
798  int iMatch = -1;
799  double CorrdeltaRBest = 999;
800  double CorrJetPtBest = 0;
801  for (unsigned ijet=0; ijet<recoJets.size(); ++ijet) {
802  Jet correctedJet = recoJets[ijet];
803  correctedJet.scaleEnergy(scale);
804  double CorrJetPt = correctedJet.pt();
805  if (CorrJetPt > 10) {
806  double CorrdR = deltaR(gjet->eta(), gjet->phi(), correctedJet.eta(), correctedJet.phi());
807  if (CorrdR < CorrdeltaRBest) {
808  CorrdeltaRBest = CorrdR;
809  CorrJetPtBest = CorrJetPt;
810  iMatch = ijet;
811  }
812  }
813  }
814  if (iMatch<0) continue;
815  fillMatchHists(gjet->eta(), gjet->phi(), gjet->pt(), recoJets[iMatch].eta(), recoJets[iMatch].phi(), recoJets[iMatch].pt());
816 
817  if (CorrdeltaRBest < mRThreshold) {
818  double response = CorrJetPtBest / gjet->pt();
819 
820  if (fabs(gjet->eta()) < 1.5) mPtCorrOverGen_GenPt_B->Fill(log10(gjet->pt()), response);
821  else if (fabs(gjet->eta()) < 3.0) mPtCorrOverGen_GenPt_E->Fill(log10(gjet->pt()), response);
822  else if (fabs(gjet->eta()) < 6.0) mPtCorrOverGen_GenPt_F->Fill(log10(gjet->pt()), response);
823 
824  if (gjet->pt() > 20) {
825  if (gjet->pt() < 40) mPtCorrOverGen_GenEta_20_40 ->Fill(gjet->eta(), response);
826  else if (gjet->pt() < 200) mPtCorrOverGen_GenEta_40_200 ->Fill(gjet->eta(), response);
827  else if (gjet->pt() < 600) mPtCorrOverGen_GenEta_200_600 ->Fill(gjet->eta(), response);
828  else if (gjet->pt() < 1500) mPtCorrOverGen_GenEta_600_1500 ->Fill(gjet->eta(), response);
829  else if (gjet->pt() < 3500) mPtCorrOverGen_GenEta_1500_3500->Fill(gjet->eta(), response);
830  }
831  }
832  }
833  }
834  }
835  }
836 }
837 
838 
839 //------------------------------------------------------------------------------
840 // fillMatchHists
841 //------------------------------------------------------------------------------
842 void JetTester::fillMatchHists(const double GenEta,
843  const double GenPhi,
844  const double GenPt,
845  const double RecoEta,
846  const double RecoPhi,
847  const double RecoPt)
848 {
849  if (GenPt > mMatchGenPtThreshold) {
850  mDeltaEta->Fill(GenEta - RecoEta);
851  mDeltaPhi->Fill(GenPhi - RecoPhi);
852  mDeltaPt ->Fill((GenPt - RecoPt) / GenPt);
853  }
854 
855  if (fabs(GenEta) < 1.5)
856  {
857  mPtRecoOverGen_GenPt_B ->Fill(log10(GenPt), RecoPt / GenPt);
858  mPtRecoOverGen_GenPhi_B->Fill(GenPhi, RecoPt / GenPt);
859 
860  if (GenPt > 20 && GenPt < 40) mPtRecoOverGen_B_20_40 ->Fill(RecoPt / GenPt);
861  else if (GenPt < 200) mPtRecoOverGen_B_40_200 ->Fill(RecoPt / GenPt);
862  else if (GenPt < 600) mPtRecoOverGen_B_200_600 ->Fill(RecoPt / GenPt);
863  else if (GenPt < 1500) mPtRecoOverGen_B_600_1500 ->Fill(RecoPt / GenPt);
864  else if (GenPt < 3500) mPtRecoOverGen_B_1500_3500->Fill(RecoPt / GenPt);
865  }
866  else if (fabs(GenEta) < 3.0)
867  {
868  mPtRecoOverGen_GenPt_E ->Fill(log10(GenPt), RecoPt / GenPt);
869  mPtRecoOverGen_GenPhi_E->Fill(GenPhi, RecoPt / GenPt);
870 
871  if (GenPt > 20 && GenPt < 40) mPtRecoOverGen_E_20_40 ->Fill(RecoPt / GenPt);
872  else if (GenPt < 200) mPtRecoOverGen_E_40_200 ->Fill(RecoPt / GenPt);
873  else if (GenPt < 600) mPtRecoOverGen_E_200_600 ->Fill(RecoPt / GenPt);
874  else if (GenPt < 1500) mPtRecoOverGen_E_600_1500 ->Fill(RecoPt / GenPt);
875  else if (GenPt < 3500) mPtRecoOverGen_E_1500_3500->Fill(RecoPt / GenPt);
876  }
877  else if (fabs(GenEta) < 6.0)
878  {
879  mPtRecoOverGen_GenPt_F ->Fill (log10(GenPt), RecoPt / GenPt);
880  mPtRecoOverGen_GenPhi_F->Fill (GenPhi, RecoPt / GenPt);
881 
882  if (GenPt > 20 && GenPt < 40) mPtRecoOverGen_F_20_40 ->Fill(RecoPt / GenPt);
883  else if (GenPt < 200) mPtRecoOverGen_F_40_200 ->Fill(RecoPt / GenPt);
884  else if (GenPt < 600) mPtRecoOverGen_F_200_600 ->Fill(RecoPt / GenPt);
885  else if (GenPt < 1500) mPtRecoOverGen_F_600_1500 ->Fill(RecoPt / GenPt);
886  else if (GenPt < 3500) mPtRecoOverGen_F_1500_3500->Fill(RecoPt / GenPt);
887  }
888 
889  if (GenPt > 20 && GenPt < 40) mPtRecoOverGen_GenEta_20_40 ->Fill(GenEta, RecoPt / GenPt);
890  else if (GenPt < 200) mPtRecoOverGen_GenEta_40_200 ->Fill(GenEta, RecoPt / GenPt);
891  else if (GenPt < 600) mPtRecoOverGen_GenEta_200_600 ->Fill(GenEta, RecoPt / GenPt);
892  else if (GenPt < 1500) mPtRecoOverGen_GenEta_600_1500 ->Fill(GenEta, RecoPt / GenPt);
893  else if (GenPt < 3500) mPtRecoOverGen_GenEta_1500_3500->Fill(GenEta, RecoPt / GenPt);
894 }
MonitorElement * mNJetsEta_B_40
Definition: JetTester.h:159
MonitorElement * mPtRecoOverGen_E_20_40
Definition: JetTester.h:124
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: JetTester.h:64
MonitorElement * mPtCorrOverGen_GenEta_40_200
Definition: JetTester.h:107
MonitorElement * mPtCorrOverReco_Pt_E
Definition: JetTester.h:96
MonitorElement * hadEnergyInHE
Definition: JetTester.h:180
MonitorElement * mNvtx
Definition: JetTester.h:73
MonitorElement * HFHadronEnergyFraction
Definition: JetTester.h:210
MonitorElement * mPtRecoOverGen_B_20_40
Definition: JetTester.h:123
MonitorElement * mPtCorrOverGen_GenPt_F
Definition: JetTester.h:105
MonitorElement * mPtRecoOverGen_F_40_200
Definition: JetTester.h:128
edm::EDGetTokenT< reco::GenJetCollection > genJetsToken_
Definition: JetTester.h:69
MonitorElement * neutralHadronEnergy
Definition: JetTester.h:196
MonitorElement * electronEnergyFraction
Definition: JetTester.h:206
MonitorElement * mPtRecoOverGen_B_200_600
Definition: JetTester.h:129
MonitorElement * HFEMEnergyFraction
Definition: JetTester.h:212
bool isPFJet
Definition: JetTester.h:230
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
MonitorElement * mPtRecoOverGen_GenPt_F
Definition: JetTester.h:142
MonitorElement * mMjj
Definition: JetTester.h:156
edm::InputTag mInputGenCollection
Definition: JetTester.h:58
MonitorElement * mPtFirst
Definition: JetTester.h:155
virtual void beginJob()
Definition: JetTester.cc:450
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
Definition: JetTester.h:66
MonitorElement * photonEnergyFraction
Definition: JetTester.h:204
MonitorElement * neutralMultiplicity
Definition: JetTester.h:221
MonitorElement * mDeltaPhi
Definition: JetTester.h:120
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
Base class for all types of Jets.
Definition: Jet.h:20
bool isCaloJet
Definition: JetTester.h:228
Definition: DDAxes.h:10
MonitorElement * mPtRecoOverGen_GenPhi_E
Definition: JetTester.h:144
MonitorElement * mPtRecoOverGen_GenEta_20_40
Definition: JetTester.h:146
MonitorElement * hadEnergyInHB
Definition: JetTester.h:178
std::vector< CaloTower >::const_iterator const_iterator
MonitorElement * mPtCorrOverReco_Eta_40_200
Definition: JetTester.h:99
MonitorElement * photonMultiplicity
Definition: JetTester.h:215
MonitorElement * mCorrJetPhi
Definition: JetTester.h:91
MonitorElement * energyFractionHadronic
Definition: JetTester.h:176
double mMatchGenPtThreshold
Definition: JetTester.h:225
MonitorElement * mPtRecoOverGen_E_40_200
Definition: JetTester.h:127
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:444
MonitorElement * mNJets2
Definition: JetTester.h:163
MonitorElement * mPtCorrOverReco_Eta_200_600
Definition: JetTester.h:100
MonitorElement * muonEnergyFraction
Definition: JetTester.h:208
MonitorElement * n90
Definition: JetTester.h:186
MonitorElement * mPtRecoOverGen_GenPhi_B
Definition: JetTester.h:143
T eta() const
MonitorElement * mEtaFirst
Definition: JetTester.h:153
bool isRealData() const
Definition: EventBase.h:60
float float float z
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
MonitorElement * emEnergyFraction
Definition: JetTester.h:177
std::string JetCorrectionService
Definition: JetTester.h:233
MonitorElement * mCorrJetEta
Definition: JetTester.h:90
MonitorElement * photonEnergy
Definition: JetTester.h:203
MonitorElement * towersArea
Definition: JetTester.h:185
void Fill(long long x)
MonitorElement * hadEnergyInHF
Definition: JetTester.h:181
MonitorElement * HFHadronMultiplicity
Definition: JetTester.h:217
MonitorElement * mGenPt
Definition: JetTester.h:115
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
MonitorElement * muonEnergy
Definition: JetTester.h:207
MonitorElement * electronMultiplicity
Definition: JetTester.h:216
MonitorElement * mPtRecoOverGen_B_600_1500
Definition: JetTester.h:132
MonitorElement * mEnergy
Definition: JetTester.h:80
MonitorElement * elecMultiplicity
Definition: JetTester.h:189
MonitorElement * mPtRecoOverGen_GenPt_E
Definition: JetTester.h:141
MonitorElement * mNJetsEta_E_40
Definition: JetTester.h:160
MonitorElement * mEta
Definition: JetTester.h:76
MonitorElement * mGenEtaFirst
Definition: JetTester.h:116
MonitorElement * mNJetsEta_B_20_40
Definition: JetTester.h:157
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
MonitorElement * chargedMuEnergy
Definition: JetTester.h:219
MonitorElement * mPtRecoOverGen_F_1500_3500
Definition: JetTester.h:137
MonitorElement * mDeltaEta
Definition: JetTester.h:119
MonitorElement * mNJets_40
Definition: JetTester.h:161
MonitorElement * HFHadronEnergy
Definition: JetTester.h:209
MonitorElement * mNJetsEta_E_20_40
Definition: JetTester.h:158
MonitorElement * mDeltaPt
Definition: JetTester.h:121
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * mPtRecoOverGen_B_40_200
Definition: JetTester.h:126
MonitorElement * mPtRecoOverGen_B_1500_3500
Definition: JetTester.h:135
MonitorElement * mPtRecoOverGen_F_200_600
Definition: JetTester.h:131
MonitorElement * mPhiFirst
Definition: JetTester.h:154
MonitorElement * mP
Definition: JetTester.h:79
void fillMatchHists(const double GenEta, const double GenPhi, const double GenPt, const double RecoEta, const double RecoPhi, const double RecoPt)
Definition: JetTester.cc:842
edm::EDGetTokenT< reco::JPTJetCollection > jptJetsToken_
Definition: JetTester.h:68
MonitorElement * mEmTiming
Definition: JetTester.h:84
MonitorElement * mPtCorrOverGen_GenPt_B
Definition: JetTester.h:103
MonitorElement * mPtCorrOverReco_Eta_600_1500
Definition: JetTester.h:101
MonitorElement * n60
Definition: JetTester.h:187
MonitorElement * mGenEta
Definition: JetTester.h:113
MonitorElement * hadEnergyInHO
Definition: JetTester.h:179
MonitorElement * mPhi
Definition: JetTester.h:77
virtual void endJob()
Definition: JetTester.cc:456
MonitorElement * mPtCorrOverGen_GenEta_200_600
Definition: JetTester.h:108
MonitorElement * mPt
Definition: JetTester.h:78
edm::InputTag mInputCollection
Definition: JetTester.h:57
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1186
MonitorElement * emEnergyInHF
Definition: JetTester.h:184
MonitorElement * mPtRecoOverGen_E_200_600
Definition: JetTester.h:130
JetTester(const edm::ParameterSet &)
Definition: JetTester.cc:12
MonitorElement * mPtRecoOverGen_GenPhi_F
Definition: JetTester.h:145
MonitorElement * chargedHadronEnergyFraction
Definition: JetTester.h:197
MonitorElement * mPtRecoOverGen_E_600_1500
Definition: JetTester.h:133
bool isJPTJet
Definition: JetTester.h:229
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * mPtHat
Definition: JetTester.h:118
MonitorElement * chargedHadronEnergy
Definition: JetTester.h:195
MonitorElement * mPtCorrOverReco_Pt_B
Definition: JetTester.h:95
edm::EDGetTokenT< CaloTowerCollection > caloTowersToken_
Definition: JetTester.h:65
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
MonitorElement * mPtRecoOverGen_GenPt_B
Definition: JetTester.h:140
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
MonitorElement * mPtCorrOverReco_Eta_1500_3500
Definition: JetTester.h:102
MonitorElement * mJetArea
Definition: JetTester.h:85
edm::EDGetTokenT< edm::HepMCProduct > evtToken_
Definition: JetTester.h:70
MonitorElement * mMass
Definition: JetTester.h:81
MonitorElement * HFEMMultiplicity
Definition: JetTester.h:218
MonitorElement * chargedEmEnergy
Definition: JetTester.h:193
MonitorElement * mPtRecoOverGen_GenEta_40_200
Definition: JetTester.h:147
MonitorElement * mPtRecoOverGen_E_1500_3500
Definition: JetTester.h:136
MonitorElement * mPtRecoOverGen_F_600_1500
Definition: JetTester.h:134
std::string mOutputFile
Definition: JetTester.h:60
MonitorElement * chargedMuEnergyFraction
Definition: JetTester.h:220
MonitorElement * electronEnergy
Definition: JetTester.h:205
MonitorElement * emEnergyInEE
Definition: JetTester.h:183
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:50
tuple recoJets
Definition: RecoJets_cff.py:56
MonitorElement * mPtCorrOverGen_GenEta_20_40
Definition: JetTester.h:106
double mRecoJetPtThreshold
Definition: JetTester.h:224
MonitorElement * mPtCorrOverGen_GenEta_1500_3500
Definition: JetTester.h:110
MonitorElement * mGenPhi
Definition: JetTester.h:114
MonitorElement * maxEInHadTowers
Definition: JetTester.h:175
MonitorElement * mCorrJetEta_Pt40
Definition: JetTester.h:92
std::string const & label() const
Definition: InputTag.h:42
MonitorElement * emEnergyInEB
Definition: JetTester.h:182
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: JetTester.h:67
MonitorElement * mConstituents
Definition: JetTester.h:82
MonitorElement * maxEInEmTowers
Definition: JetTester.h:174
MonitorElement * mPtRecoOverGen_F_20_40
Definition: JetTester.h:125
MonitorElement * mGenPhiFirst
Definition: JetTester.h:117
MonitorElement * mCorrJetPt
Definition: JetTester.h:89
list save
Definition: cuy.py:1163
MonitorElement * mPtCorrOverGen_GenPt_E
Definition: JetTester.h:104
MonitorElement * mPtRecoOverGen_GenEta_600_1500
Definition: JetTester.h:149
MonitorElement * mHadTiming
Definition: JetTester.h:83
MonitorElement * mPtRecoOverGen_GenEta_200_600
Definition: JetTester.h:148
MonitorElement * mPtCorrOverReco_Eta_20_40
Definition: JetTester.h:98
MonitorElement * chargedEmEnergyFraction
Definition: JetTester.h:199
MonitorElement * mPtCorrOverReco_Pt_F
Definition: JetTester.h:97
MonitorElement * muonMultiplicity
Definition: JetTester.h:191
MonitorElement * neutralHadronEnergyFraction
Definition: JetTester.h:198
double mRThreshold
Definition: JetTester.h:227
MonitorElement * neutralEmEnergy
Definition: JetTester.h:194
MonitorElement * chargedHadronMultiplicity
Definition: JetTester.h:213
std::string JetType
Definition: JetTester.h:61
MonitorElement * mPtRecoOverGen_GenEta_1500_3500
Definition: JetTester.h:150
MonitorElement * mNJets1
Definition: JetTester.h:162
virtual float pt() const GCC11_FINAL
transverse momentum
MonitorElement * mPtCorrOverGen_GenEta_600_1500
Definition: JetTester.h:109
MonitorElement * chargedMultiplicity
Definition: JetTester.h:192
tuple pfJets
Definition: pfJets_cff.py:8
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: JetTester.cc:468
MonitorElement * HFEMEnergy
Definition: JetTester.h:211
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * mCorrJetPhi_Pt40
Definition: JetTester.h:93
MonitorElement * neutralHadronMultiplicity
Definition: JetTester.h:214
MonitorElement * neutralEmEnergyFraction
Definition: JetTester.h:200
Definition: DDAxes.h:10