CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFJetTester.cc
Go to the documentation of this file.
1 // Producer for validation histograms for CaloJet objects
2 // F. Ratnikov, Sept. 7, 2006
3 // Modified by J F Novak July 10, 2008
4 // $Id: PFJetTester.cc,v 1.32 2013/01/01 21:46:23 kovitang Exp $
5 
11 
13 
16 
20 
21 //I don't know which of these I actually need yet
28 
30 
32 
33 #include "PFJetTester.h"
34 
35 #include <cmath>
36 
38 
39 using namespace edm;
40 using namespace reco;
41 using namespace std;
42 
43 namespace {
44  bool is_B (const reco::Jet& fJet) {return fabs (fJet.eta()) < 1.3;}
45  bool is_E (const reco::Jet& fJet) {return fabs (fJet.eta()) >= 1.3 && fabs (fJet.eta()) < 3.;}
46  bool is_F (const reco::Jet& fJet) {return fabs (fJet.eta()) >= 3.;}
47 }
48 
50  : mInputCollection (iConfig.getParameter<edm::InputTag>( "src" )),
51  mInputGenCollection (iConfig.getParameter<edm::InputTag>( "srcGen" )),
52  mOutputFile (iConfig.getUntrackedParameter<std::string>("outputFile", "")),
53  mMatchGenPtThreshold (iConfig.getParameter<double>("genPtThreshold")),
54  mGenEnergyFractionThreshold (iConfig.getParameter<double>("genEnergyFractionThreshold")),
55  mReverseEnergyFractionThreshold (iConfig.getParameter<double>("reverseEnergyFractionThreshold")),
56  mRThreshold (iConfig.getParameter<double>("RThreshold")),
57  JetCorrectionService (iConfig.getParameter<std::string> ("JetCorrectionService" )),
58  mTurnOnEverything (iConfig.getUntrackedParameter<std::string>("TurnOnEverything",""))
59 {
62  = mP = mP_80 = mPt = mPt_80
66  // = mMaxEInEmTowers = mMaxEInHadTowers
67  // = mHadEnergyInHO = mHadEnergyInHB = mHadEnergyInHE
69  // = mHadEnergyInHO_80 = mHadEnergyInHB_80 = mHadEnergyInHE_80
70  // = mHadEnergyInHO_3000 = mHadEnergyInHB_3000 = mHadEnergyInHE_3000
71  // = mEmEnergyInEB = mEmEnergyInEE
73  // = mEmEnergyInEB_80 = mEmEnergyInEE_80
74  // = mEmEnergyInEB_3000 = mEmEnergyInEE_3000
75  // = mEnergyFractionHadronic = mEnergyFractionEm
76  // = mHFLong = mHFTotal = mHFLong_80 = mHFLong_3000 = mHFShort = mHFShort_80 = mHFShort_3000
77  // = mN90
84  //= mCaloMEx = mCaloMEx_3000 = mCaloMEy = mCaloMEy_3000 = mCaloMETSig = mCaloMETSig_3000
85  //= mCaloMET = mCaloMET_3000 = mCaloMETPhi = mCaloSumET = mCaloSumET_3000
88  //= mAllGenJetsPt = mMatchedGenJetsPt = mAllGenJetsEta = mMatchedGenJetsEta
89  //= mGenJetMatchEnergyFraction = mReverseMatchEnergyFraction = mRMatch
90  = mDeltaEta = mDeltaPhi //= mEScale = mlinEScale = mDeltaE
91  //= mHadEnergyProfile = mEmEnergyProfile = mJetEnergyProfile
92  // = mHadJetEnergyProfile = mEMJetEnergyProfile
94  //= mpTScaleB_s = mpTScaleE_s = mpTScaleF_s
97  //= mpTScale_30_200_s = mpTScale_200_600_s = mpTScale_600_1500_s = mpTScale_1500_3500_s
99 
104  /*
105  = mpTScale1D_30_200 = mpTScale1D_200_600 = mpTScale1D_600_1500 = mpTScale1D_1500_3500
106  = mHBEne = mHBTime = mHEEne = mHETime = mHFEne = mHFTime = mHOEne = mHOTime
107  = mEBEne = mEBTime = mEEEne = mEETime
108  */
110 
111  //Corr Jet
118  = nvtx_0_30 = nvtx_0_60
129  = mNJetsEtaF_30
131  = 0;
132 
133  DQMStore* dbe = &*edm::Service<DQMStore>();
134  if (dbe) {
135  dbe->setCurrentFolder("JetMET/RecoJetsV/PFJetTask_" + mInputCollection.label());
136  //
137  numberofevents = dbe->book1D("numberofevents","numberofevents", 3, 0 , 2);
138  //
139  mEta = dbe->book1D("Eta", "Eta", 120, -6, 6);
140  mEtaFineBin = dbe->book1D("EtaFineBin_Pt10", "EtaFineBin_Pt10", 600, -6, 6);
141  /*
142  mEtaFineBin1p = dbe->book1D("EtaFineBin1p_Pt10", "EtaFineBin1p_Pt10", 100, 0, 1.3);
143  mEtaFineBin2p = dbe->book1D("EtaFineBin2p_Pt10", "EtaFineBin2p_Pt10", 100, 1.3, 3);
144  mEtaFineBin3p = dbe->book1D("EtaFineBin3p_Pt10", "EtaFineBin3p_Pt10", 100, 3, 5);
145  mEtaFineBin1m = dbe->book1D("EtaFineBin1m_Pt10", "EtaFineBin1m_Pt10", 100, -1.3, 0);
146  mEtaFineBin2m = dbe->book1D("EtaFineBin2m_Pt10", "EtaFineBin2m_Pt10", 100, -3, -1.3);
147  mEtaFineBin3m = dbe->book1D("EtaFineBin3m_Pt10", "EtaFineBin3m_Pt10", 100, -5, -3);
148  */
149  //
150  mPhi = dbe->book1D("Phi", "Phi", 70, -3.5, 3.5);
151  mPhiFineBin = dbe->book1D("PhiFineBin_Pt10", "PhiFineBin_Pt10", 350, -3.5, 3.5);
152  //
153  mE = dbe->book1D("E", "E", 100, 0, 500);
154  mE_80 = dbe->book1D("E_80", "E_80", 100, 0, 4000);
155  //
156  mP = dbe->book1D("P", "P", 100, 0, 500);
157  mP_80 = dbe->book1D("P_80", "P_80", 100, 0, 4000);
158  //
159  mPt = dbe->book1D("Pt", "Pt", 100, 0, 150);
160  mPt_80 = dbe->book1D("Pt_80", "Pt_80", 100, 0, 4000);
161  //
162  mMass = dbe->book1D("Mass", "Mass", 100, 0, 200);
163  mMass_80 = dbe->book1D("Mass_80", "Mass_80", 100, 0, 500);
164  //
165  mConstituents = dbe->book1D("Constituents", "# of Constituents", 100, 0, 100);
166  mConstituents_80 = dbe->book1D("Constituents_80", "# of Constituents_80", 40, 0, 40);
167  //
168  mEtaFirst = dbe->book1D("EtaFirst", "EtaFirst", 120, -6, 6);
169  mPhiFirst = dbe->book1D("PhiFirst", "PhiFirst", 70, -3.5, 3.5);
170  mPtFirst = dbe->book1D("PtFirst", "PtFirst", 100, 0, 50);
171  mPtFirst_80 = dbe->book1D("PtFirst_80", "PtFirst_80", 100, 0, 140);
172  mPtFirst_3000 = dbe->book1D("PtFirst_3000", "PtFirst_3000", 100, 0, 4000);
173  //
174  mMjj = dbe->book1D("Mjj", "Mjj", 100, 0, 2000);
175  mMjj_3000 = dbe->book1D("Mjj_3000", "Mjj_3000", 100, 0, 10000);
176  mDelEta = dbe->book1D("DelEta", "DelEta", 100, -.5, .5);
177  mDelPhi = dbe->book1D("DelPhi", "DelPhi", 100, -.5, .5);
178  mDelPt = dbe->book1D("DelPt", "DelPt", 100, -1, 1);
179  //
180  // mMaxEInEmTowers = dbe->book1D("MaxEInEmTowers", "MaxEInEmTowers", 100, 0, 100);
181  // mMaxEInHadTowers = dbe->book1D("MaxEInHadTowers", "MaxEInHadTowers", 100, 0, 100);
182  // mHadEnergyInHO = dbe->book1D("HadEnergyInHO", "HadEnergyInHO", 100, 0, 10);
183  // mHadEnergyInHB = dbe->book1D("HadEnergyInHB", "HadEnergyInHB", 100, 0, 50);
184  mHadEnergyInHF = dbe->book1D("HadEnergyInHF", "HadEnergyInHF", 100, 0, 2500);
185  mHadEnergyInHF_80 = dbe->book1D("HadEnergyInHF_80", "HadEnergyInHF_80", 100, 0, 3000);
186  mHadEnergyInHF_3000 = dbe->book1D("HadEnergyInHF_3000", "HadEnergyInHF_3000", 100, 0, 1800);
187  // mHadEnergyInHE = dbe->book1D("HadEnergyInHE", "HadEnergyInHE", 100, 0, 100);
188  //
189  // mHadEnergyInHO_80 = dbe->book1D("HadEnergyInHO_80", "HadEnergyInHO_80", 100, 0, 50);
190  // mHadEnergyInHB_80 = dbe->book1D("HadEnergyInHB_80", "HadEnergyInHB_80", 100, 0, 200);
191  // mHadEnergyInHE_80 = dbe->book1D("HadEnergyInHE_80", "HadEnergyInHE_80", 100, 0, 1000);
192  // mHadEnergyInHO_3000 = dbe->book1D("HadEnergyInHO_3000", "HadEnergyInHO_3000", 100, 0, 500);
193  // mHadEnergyInHB_3000 = dbe->book1D("HadEnergyInHB_3000", "HadEnergyInHB_3000", 100, 0, 3000);
194  // mHadEnergyInHE_3000 = dbe->book1D("HadEnergyInHE_3000", "HadEnergyInHE_3000", 100, 0, 2000);
195  //
196  // mEmEnergyInEB = dbe->book1D("EmEnergyInEB", "EmEnergyInEB", 100, 0, 50);
197  // mEmEnergyInEE = dbe->book1D("EmEnergyInEE", "EmEnergyInEE", 100, 0, 50);
198  mEmEnergyInHF = dbe->book1D("EmEnergyInHF", "EmEnergyInHF", 100, -20, 450);
199  mEmEnergyInHF_80 = dbe->book1D("EmEnergyInHF_80", "EmEnergyInHF_80", 100, -20, 440);
200  mEmEnergyInHF_3000 = dbe->book1D("EmEnergyInHF_3000", "EmEnergyInHF_3000", 100, -20, 190);
201  // mEmEnergyInEB_80 = dbe->book1D("EmEnergyInEB_80", "EmEnergyInEB_80", 100, 0, 200);
202  // mEmEnergyInEE_80 = dbe->book1D("EmEnergyInEE_80", "EmEnergyInEE_80", 100, 0, 1000);
203  // mEmEnergyInEB_3000= dbe->book1D("EmEnergyInEB_3000", "EmEnergyInEB_3000", 100, 0, 3000);
204  // mEmEnergyInEE_3000= dbe->book1D("EmEnergyInEE_3000", "EmEnergyInEE_3000", 100, 0, 2000);
205  // mEnergyFractionHadronic = dbe->book1D("EnergyFractionHadronic", "EnergyFractionHadronic", 120, -0.1, 1.1);
206  // mEnergyFractionEm = dbe->book1D("EnergyFractionEm", "EnergyFractionEm", 120, -0.1, 1.1);
207  //
208  // mHFTotal = dbe->book1D("HFTotal", "HFTotal", 100, 0, 500);
209  // mHFTotal_80 = dbe->book1D("HFTotal_80", "HFTotal_80", 100, 0, 3000);
210  // mHFTotal_3000 = dbe->book1D("HFTotal_3000", "HFTotal_3000", 100, 0, 6000);
211  // mHFLong = dbe->book1D("HFLong", "HFLong", 100, 0, 500);
212  // mHFLong_80 = dbe->book1D("HFLong_80", "HFLong_80", 100, 0, 200);
213  // mHFLong_3000 = dbe->book1D("HFLong_3000", "HFLong_3000", 100, 0, 1500);
214  // mHFShort = dbe->book1D("HFShort", "HFShort", 100, 0, 500);
215  // mHFShort_80 = dbe->book1D("HFShort_80", "HFShort_80", 100, 0, 200);
216  // mHFShort_3000 = dbe->book1D("HFShort_3000", "HFShort_3000", 100, 0, 1500);
217  //
218  // mN90 = dbe->book1D("N90", "N90", 50, 0, 50);
219  //
220 
221  mChargedEmEnergy_80 = dbe->book1D("ChargedEmEnergy_80","ChargedEmEnergy_80",100,0.,500.);
222  mChargedHadronEnergy_80 = dbe->book1D("ChargedHadronEnergy_80","ChargedHadronEnergy_80",100,0.,500.);
223  mNeutralEmEnergy_80 = dbe->book1D("NeutralEmEnergy_80","NeutralEmEnergy_80",100,0.,500.);
224  mNeutralHadronEnergy_80 = dbe->book1D("NeutralHadronEnergy_80","NeutralHadronEnergy_80",100,0.,500.);
225 
226  mChargedEmEnergy_3000 = dbe->book1D("ChargedEmEnergy_3000","ChargedEmEnergy_3000",100,0.,2000.);
227  mChargedHadronEnergy_3000 = dbe->book1D("ChargedHadronEnergy_3000","ChargedHadronEnergy_3000",100,0.,2000.);
228  mNeutralEmEnergy_3000 = dbe->book1D("NeutralEmEnergy_3000","NeutralEmEnergy_3000",100,0.,2000.);
229  mNeutralHadronEnergy_3000 = dbe->book1D("NeutralHadronEnergy_3000","NeutralHadronEnergy_3000",100,0.,2000.);
230 
231  mChargedEmEnergyFraction_B = dbe->book1D("ChargedEmEnergyFraction_B","ChargedEmEnergyFraction_B",120,-0.1,1.1);
232  mChargedEmEnergyFraction_E = dbe->book1D("ChargedEmEnergyFraction_E","ChargedEmEnergyFraction_E",120,-0.1,1.1);
233  mChargedEmEnergyFraction_F = dbe->book1D("ChargedEmEnergyFraction_F","ChargedEmEnergyFraction_F",120,-0.1,1.1);
234  mChargedHadronEnergyFraction_B = dbe->book1D("ChargedHadronEnergyFraction_B","ChargedHadronEnergyFraction_B",120,-0.1,1.1);
235  mChargedHadronEnergyFraction_E = dbe->book1D("ChargedHadronEnergyFraction_E","ChargedHadronEnergyFraction_E",120,-0.1,1.1);
236  mChargedHadronEnergyFraction_F = dbe->book1D("ChargedHadronEnergyFraction_F","ChargedHadronEnergyFraction_F",120,-0.1,1.1);
237  mNeutralEmEnergyFraction_B = dbe->book1D("NeutralEmEnergyFraction_B","NeutralEmEnergyFraction_B",120,-0.1,1.1);
238  mNeutralEmEnergyFraction_E = dbe->book1D("NeutralEmEnergyFraction_E","NeutralEmEnergyFraction_E",120,-0.1,1.1);
239  mNeutralEmEnergyFraction_F = dbe->book1D("NeutralEmEnergyFraction_F","NeutralEmEnergyFraction_F",120,-0.1,1.1);
240  mNeutralHadronEnergyFraction_B = dbe->book1D("NeutralHadronEnergyFraction_B","NeutralHadronEnergyFraction_B",120,-0.1,1.1);
241  mNeutralHadronEnergyFraction_E = dbe->book1D("NeutralHadronEnergyFraction_E","NeutralHadronEnergyFraction_E",120,-0.1,1.1);
242  mNeutralHadronEnergyFraction_F = dbe->book1D("NeutralHadronEnergyFraction_F","NeutralHadronEnergyFraction_F",120,-0.1,1.1);
243 
244  mGenEta = dbe->book1D("GenEta", "GenEta", 120, -6, 6);
245  mGenPhi = dbe->book1D("GenPhi", "GenPhi", 70, -3.5, 3.5);
246  mGenPt = dbe->book1D("GenPt", "GenPt", 100, 0, 150);
247  mGenPt_80 = dbe->book1D("GenPt_80", "GenPt_80", 100, 0, 1500);
248  //
249  mGenEtaFirst = dbe->book1D("GenEtaFirst", "GenEtaFirst", 100, -5, 5);
250  mGenPhiFirst = dbe->book1D("GenPhiFirst", "GenPhiFirst", 70, -3.5, 3.5);
251  //
252  /*
253  mCaloMEx = dbe->book1D("CaloMEx","CaloMEx",200,-150,150);
254  mCaloMEx_3000 = dbe->book1D("CaloMEx_3000","CaloMEx_3000",100,-500,500);
255  mCaloMEy = dbe->book1D("CaloMEy","CaloMEy",200,-150,150);
256  mCaloMEy_3000 = dbe->book1D("CaloMEy_3000","CaloMEy_3000",100,-500,500);
257  mCaloMETSig = dbe->book1D("CaloMETSig","CaloMETSig",100,0,15);
258  mCaloMETSig_3000 = dbe->book1D("CaloMETSig_3000","CaloMETSig_3000",100,0,50);
259  mCaloMET = dbe->book1D("CaloMET","CaloMET",100,0,150);
260  mCaloMET_3000 = dbe->book1D("CaloMET_3000","CaloMET_3000",100,0,1000);
261  mCaloMETPhi = dbe->book1D("CaloMETPhi","CaloMETPhi",70, -3.5, 3.5);
262  mCaloSumET = dbe->book1D("CaloSumET","CaloSumET",100,0,500);
263  mCaloSumET_3000 = dbe->book1D("CaloSumET_3000","CaloSumET_3000",100,3000,8000);
264  */
265  //
266  mHadTiming = dbe->book1D("HadTiming", "HadTiming", 75, -50, 100);
267  mEmTiming = dbe->book1D("EMTiming", "EMTiming", 75, -50, 100);
268  //
269  mNJetsEtaC = dbe->book1D("NJetsEtaC_Pt10", "NJetsEtaC_Pt10", 15, 0, 15);
270  mNJetsEtaF = dbe->book1D("NJetsEtaF_Pt10", "NJetsEtaF_Pt10", 15, 0, 15);
271  mNJetsEtaF_30 = dbe->book1D("NJetsEtaF_Pt30", "NJetsEtaF_Pt30", 15, 0, 15);
272  //
273  mNJets1 = dbe->bookProfile("NJets1", "NJets1", 100, 0, 200, 100, 0, 50, "s");
274  mNJets2 = dbe->bookProfile("NJets2", "NJets2", 100, 0, 4000, 100, 0, 50, "s");
275  //
276  /*
277  mHBEne = dbe->book1D( "HBEne", "HBEne", 1000, -20, 100 );
278  mHBTime = dbe->book1D( "HBTime", "HBTime", 200, -200, 200 );
279  mHEEne = dbe->book1D( "HEEne", "HEEne", 1000, -20, 100 );
280  mHETime = dbe->book1D( "HETime", "HETime", 200, -200, 200 );
281  mHOEne = dbe->book1D( "HOEne", "HOEne", 1000, -20, 100 );
282  mHOTime = dbe->book1D( "HOTime", "HOTime", 200, -200, 200 );
283  mHFEne = dbe->book1D( "HFEne", "HFEne", 1000, -20, 100 );
284  mHFTime = dbe->book1D( "HFTime", "HFTime", 200, -200, 200 );
285  mEBEne = dbe->book1D( "EBEne", "EBEne", 1000, -20, 100 );
286  mEBTime = dbe->book1D( "EBTime", "EBTime", 200, -200, 200 );
287  mEEEne = dbe->book1D( "EEEne", "EEEne", 1000, -20, 100 );
288  mEETime = dbe->book1D( "EETime", "EETime", 200, -200, 200 );
289  */
290  //
291  mPthat_80 = dbe->book1D("Pthat_80", "Pthat_80", 100, 0.0, 1000.0);
292  mPthat_3000 = dbe->book1D("Pthat_3000", "Pthat_3000", 100, 1000.0, 4000.0);
293 
294  //Corr
295  mCorrJetPt = dbe->book1D("CorrPt", "CorrPt", 100, 0, 150);
296  mCorrJetPt_80 = dbe->book1D("CorrPt_80", "CorrPt_80", 100, 0, 4000);
297  mCorrJetEta = dbe->book1D("CorrEta", "CorrEta", 120, -6, 6);
298  mCorrJetPhi = dbe->book1D("CorrPhi", "CorrPhi", 70, -3.5, 3.5);
299 
300  mjetArea = dbe->book1D("jetArea","jetArea",26,-0.5,12.5);
301 
302  //nvtx
303  nvtx_0_30 = dbe->book1D("nvtx_0_30","nvtx_0_30",31,-0.5,30.5);
304  nvtx_0_60 = dbe->book1D("nvtx_0_60","nvtx_0_60",61,-0.5,60.5);
305 
306  //pT scale with nvtx
307  mpTScale_a_nvtx_0_5 = dbe->book1D("mpTScale_a_nvtx_0_5", "pTScale_a_nvtx_0_5_0<|eta|<1.3_60_120",100, 0, 2);
308  mpTScale_b_nvtx_0_5 = dbe->book1D("mpTScale_b_nvtx_0_5", "pTScale_b_nvtx_0_5_0<|eta|<1.3_200_300",100, 0, 2);
309  mpTScale_c_nvtx_0_5 = dbe->book1D("mpTScale_c_nvtx_0_5", "pTScale_c_nvtx_0_5_0<|eta|<1.3_600_900",100, 0, 2);
310  mpTScale_a_nvtx_5_10 = dbe->book1D("mpTScale_a_nvtx_5_10", "pTScale_a_nvtx_5_10_0<|eta|<1.3_60_120",100, 0, 2);
311  mpTScale_b_nvtx_5_10 = dbe->book1D("mpTScale_b_nvtx_5_10", "pTScale_b_nvtx_5_10_0<|eta|<1.3_200_300",100, 0, 2);
312  mpTScale_c_nvtx_5_10 = dbe->book1D("mpTScale_c_nvtx_5_10", "pTScale_c_nvtx_5_10_0<|eta|<1.3_600_900",100, 0, 2);
313  mpTScale_a_nvtx_10_15 = dbe->book1D("mpTScale_a_nvtx_10_15", "pTScale_a_nvtx_10_15_0<|eta|<1.3_60_120",100, 0, 2);
314  mpTScale_b_nvtx_10_15 = dbe->book1D("mpTScale_b_nvtx_10_15", "pTScale_b_nvtx_10_15_0<|eta|<1.3_200_300",100, 0, 2);
315  mpTScale_c_nvtx_10_15 = dbe->book1D("mpTScale_c_nvtx_10_15", "pTScale_c_nvtx_10_15_0<|eta|<1.3_600_900",100, 0, 2);
316  mpTScale_a_nvtx_15_20 = dbe->book1D("mpTScale_a_nvtx_15_20", "pTScale_a_nvtx_15_20_0<|eta|<1.3_60_120",100, 0, 2);
317  mpTScale_b_nvtx_15_20 = dbe->book1D("mpTScale_b_nvtx_15_20", "pTScale_b_nvtx_15_20_0<|eta|<1.3_200_300",100, 0, 2);
318  mpTScale_c_nvtx_15_20 = dbe->book1D("mpTScale_c_nvtx_15_20", "pTScale_c_nvtx_15_20_0<|eta|<1.3_600_900",100, 0, 2);
319  mpTScale_a_nvtx_20_30 = dbe->book1D("mpTScale_a_nvtx_20_30", "pTScale_a_nvtx_20_30_0<|eta|<1.3_60_120",100, 0, 2);
320  mpTScale_b_nvtx_20_30 = dbe->book1D("mpTScale_b_nvtx_20_30", "pTScale_b_nvtx_20_30_0<|eta|<1.3_200_300",100, 0, 2);
321  mpTScale_c_nvtx_20_30 = dbe->book1D("mpTScale_c_nvtx_20_30", "pTScale_c_nvtx_20_30_0<|eta|<1.3_600_900",100, 0, 2);
322  mpTScale_a_nvtx_30_inf = dbe->book1D("mpTScale_a_nvtx_30_inf", "pTScale_a_nvtx_30_inf_0<|eta|<1.3_60_120",100, 0, 2);
323  mpTScale_b_nvtx_30_inf = dbe->book1D("mpTScale_b_nvtx_30_inf", "pTScale_b_nvtx_30_inf_0<|eta|<1.3_200_300",100, 0, 2);
324  mpTScale_c_nvtx_30_inf = dbe->book1D("mpTScale_c_nvtx_30_inf", "pTScale_c_nvtx_30_inf_0<|eta|<1.3_600_900",100, 0, 2);
325  mpTScale_a = dbe->book1D("mpTScale_a", "pTScale_a_60_120",100, 0, 2);
326  mpTScale_b = dbe->book1D("mpTScale_b", "pTScale_b_200_300",100, 0, 2);
327  mpTScale_c = dbe->book1D("mpTScale_c", "pTScale_c_600_900",100, 0, 2);
328  //
329  double log10PtMin = 0.5; //=3.1622766
330  double log10PtMax = 3.75; //=5623.41325
331  int log10PtBins = 26;
332  //double etaMin = -6.;
333  //double etaMax = 6.;
334  //int etaBins = 50;
335  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,-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,-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,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,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,4.0,4.2,4.4,4.6,4.8,5.0,5.2,5.4,5.6,5.8,6.0};
336 
337  //double linPtMin = 5;
338  //double linPtMax = 155;
339  //int linPtBins = 15;
340 
341  //int log10PtFineBins = 50;
342  /*
343  mAllGenJetsPt = dbe->book1D("GenJetLOGpT", "GenJet LOG(pT_gen)",
344  log10PtBins, log10PtMin, log10PtMax);
345  mMatchedGenJetsPt = dbe->book1D("MatchedGenJetLOGpT", "MatchedGenJet LOG(pT_gen)",
346  log10PtBins, log10PtMin, log10PtMax);
347  mAllGenJetsEta = dbe->book2D("GenJetEta", "GenJet Eta vs LOG(pT_gen)",
348  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax);
349  mMatchedGenJetsEta = dbe->book2D("MatchedGenJetEta", "MatchedGenJet Eta vs LOG(pT_gen)",
350  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax);
351  */
352  //
353  if (mTurnOnEverything.compare("yes")==0) {
354  /*
355  mHadEnergyProfile = dbe->bookProfile2D("HadEnergyProfile", "HadEnergyProfile", 82, -41, 41, 73, 0, 73, 100, 0, 10000, "s");
356  mEmEnergyProfile = dbe->bookProfile2D("EmEnergyProfile", "EmEnergyProfile", 82, -41, 41, 73, 0, 73, 100, 0, 10000, "s");
357  */
358  }
359  //mJetEnergyProfile = dbe->bookProfile2D("JetEnergyProfile", "JetEnergyProfile", 50, -5, 5, 36, -3.1415987, 3.1415987, 100, 0, 10000, "s");
360  // mHadJetEnergyProfile = dbe->bookProfile2D("HadJetEnergyProfile", "HadJetEnergyProfile", 50, -5, 5, 36, -3.1415987, 3.1415987, 100, 0, 10000, "s");
361  // mEMJetEnergyProfile = dbe->bookProfile2D("EMJetEnergyProfile", "EMJetEnergyProfile", 50, -5, 5, 36, -3.1415987, 3.1415987, 100, 0, 10000, "s");
362  //
363  if (mTurnOnEverything.compare("yes")==0) {
364  /*
365  mGenJetMatchEnergyFraction = dbe->book3D("GenJetMatchEnergyFraction", "GenJetMatchEnergyFraction vs LOG(pT_gen) vs eta",
366  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 101, 0, 1.01);
367  mReverseMatchEnergyFraction = dbe->book3D("ReverseMatchEnergyFraction", "ReverseMatchEnergyFraction vs LOG(pT_gen) vs eta",
368  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 101, 0, 1.01);
369  mRMatch = dbe->book3D("RMatch", "delta(R)(Gen-Calo) vs LOG(pT_gen) vs eta",
370  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 30, 0, 3);
371  */
372 /*
373  mDeltaEta = dbe->book3D("DeltaEta", "DeltaEta vs LOG(pT_gen) vs eta",
374  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 100, -1, 1);
375  mDeltaPhi = dbe->book3D("DeltaPhi", "DeltaPhi vs LOG(pT_gen) vs eta",
376  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 100, -1, 1);
377 */
378  /*
379  mEScale = dbe->book3D("EScale", "EnergyScale vs LOG(pT_gen) vs eta",
380  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 100, 0, 2);
381  mlinEScale = dbe->book3D("linEScale", "EnergyScale vs LOG(pT_gen) vs eta",
382  linPtBins, linPtMin, linPtMax, etaBins, etaMin, etaMax, 100, 0, 2);
383  mDeltaE = dbe->book3D("DeltaE", "DeltaE vs LOG(pT_gen) vs eta",
384  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 2000, -200, 200);
385  */
386  //
387  /* mEScale_pt10 = dbe->book3D("EScale_pt10", "EnergyScale vs LOG(pT_gen) vs eta",
388  log10PtBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 100, 0, 2);
389  mEScaleFineBin = dbe->book3D("EScaleFineBins", "EnergyScale vs LOG(pT_gen) vs eta",
390  log10PtFineBins, log10PtMin, log10PtMax, etaBins, etaMin, etaMax, 100, 0, 2);
391 */
392  }
393  /*
394  mpTScaleB_s = dbe->bookProfile("pTScaleB_s", "pTScale_s_0<|eta|<1.3",
395  log10PtBins, log10PtMin, log10PtMax, 0, 2, "s");
396  mpTScaleE_s = dbe->bookProfile("pTScaleE_s", "pTScale_s_1.3<|eta|<3.0",
397  log10PtBins, log10PtMin, log10PtMax, 0, 2, "s");
398  mpTScaleF_s = dbe->bookProfile("pTScaleF_s", "pTScale_s_3.0<|eta|<5.0",
399  log10PtBins, log10PtMin, log10PtMax, 0, 2, "s");
400  */
401  mpTScaleB_d = dbe->bookProfile("pTScaleB_d", "pTScale_d_0<|eta|<1.5",
402  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
403  mpTScaleE_d = dbe->bookProfile("pTScaleE_d", "pTScale_d_1.5<|eta|<3.0",
404  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
405  mpTScaleF_d = dbe->bookProfile("pTScaleF_d", "pTScale_d_3.0<|eta|<6.0",
406  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
407  mpTScalePhiB_d = dbe->bookProfile("pTScalePhiB_d", "pTScalePhi_d_0<|eta|<1.5",
408  70, -3.5, 3.5, 0, 2, " ");
409  mpTScalePhiE_d = dbe->bookProfile("pTScalePhiE_d", "pTScalePhi_d_1.5<|eta|<3.0",
410  70, -3.5, 3.5, 0, 2, " ");
411  mpTScalePhiF_d = dbe->bookProfile("pTScalePhiF_d", "pTScalePhi_d_3.0<|eta|<6.0",
412  70, -3.5, 3.5, 0, 2, " ");
413  /*
414  mpTScale_30_200_s = dbe->bookProfile("pTScale_30_200_s", "pTScale_s_30<pT<200",
415  etaBins, etaMin, etaMax, 0., 2., "s");
416  mpTScale_200_600_s = dbe->bookProfile("pTScale_200_600_s", "pTScale_s_200<pT<600",
417  etaBins, etaMin, etaMax, 0., 2., "s");
418  mpTScale_600_1500_s = dbe->bookProfile("pTScale_600_1500_s", "pTScale_s_600<pT<1500",
419  etaBins, etaMin, etaMax, 0., 2., "s");
420  mpTScale_1500_3500_s = dbe->bookProfile("pTScale_1500_3500_s", "pTScale_s_1500<pt<3500",
421  etaBins, etaMin, etaMax, 0., 2., "s");
422  */
423  mpTScale_30_200_d = dbe->bookProfile("pTScale_30_200_d", "pTScale_d_30<pT<200",
424  90,etaRange, 0., 2., " ");
425  mpTScale_200_600_d = dbe->bookProfile("pTScale_200_600_d", "pTScale_d_200<pT<600",
426  90,etaRange, 0., 2., " ");
427  mpTScale_600_1500_d = dbe->bookProfile("pTScale_600_1500_d", "pTScale_d_600<pT<1500",
428  90,etaRange, 0., 2., " ");
429  mpTScale_1500_3500_d = dbe->bookProfile("pTScale_1500_3500_d", "pTScale_d_1500<pt<3500",
430  90,etaRange, 0., 2., " ");
431 
432  mpTScale1DB_30_200 = dbe->book1D("pTScale1DB_30_200", "pTScale_distribution_for_0<|eta|<1.5_30_200",
433  100, 0, 2);
434  mpTScale1DE_30_200 = dbe->book1D("pTScale1DE_30_200", "pTScale_distribution_for_1.5<|eta|<3.0_30_200",
435  50, 0, 2);
436  mpTScale1DF_30_200 = dbe->book1D("pTScale1DF_30_200", "pTScale_distribution_for_3.0<|eta|<6.0_30_200",
437  50, 0, 2);
438 
439  mpTScale1DB_200_600 = dbe->book1D("pTScale1DB_200_600", "pTScale_distribution_for_0<|eta|<1.5_200_600",
440  100, 0, 2);
441  mpTScale1DE_200_600 = dbe->book1D("pTScale1DE_200_600", "pTScale_distribution_for_1.5<|eta|<3.0_200_600",
442  50, 0, 2);
443  mpTScale1DF_200_600 = dbe->book1D("pTScale1DF_200_600", "pTScale_distribution_for_3.0<|eta|<6.0_200_600",
444  50, 0, 2);
445 
446  mpTScale1DB_600_1500 = dbe->book1D("pTScale1DB_600_1500", "pTScale_distribution_for_0<|eta|<1.5_600_1500",
447  100, 0, 2);
448  mpTScale1DE_600_1500 = dbe->book1D("pTScale1DE_600_1500", "pTScale_distribution_for_1.5<|eta|<3.0_600_1500",
449  50, 0, 2);
450  mpTScale1DF_600_1500 = dbe->book1D("pTScale1DF_600_1500", "pTScale_distribution_for_3.0<|eta|<6.0_600_1500",
451  50, 0, 2);
452 
453  mpTScale1DB_1500_3500 = dbe->book1D("pTScale1DB_1500_3500", "pTScale_distribution_for_0<|eta|<1.5_1500_3500",
454  100, 0, 2);
455  mpTScale1DE_1500_3500 = dbe->book1D("pTScale1DE_1500_3500", "pTScale_distribution_for_1.5<|eta|<3.0_1500_3500",
456  50, 0, 2);
457  mpTScale1DF_1500_3500 = dbe->book1D("pTScale1DF_1500_3500", "pTScale_distribution_for_3.0<|eta|<6.0_1500_3500",
458  50, 0, 2);
459  /*
460  mpTScale1D_30_200 = dbe->book1D("pTScale1D_30_200", "pTScale_distribution_for_30<pT<200",
461  100, 0, 2);
462  mpTScale1D_200_600 = dbe->book1D("pTScale1D_200_600", "pTScale_distribution_for_200<pT<600",
463  100, 0, 2);
464  mpTScale1D_600_1500 = dbe->book1D("pTScale1D_600_1500", "pTScale_distribution_for_600<pT<1500",
465  100, 0, 2);
466  mpTScale1D_1500_3500 = dbe->book1D("pTScale1D_1500_3500", "pTScale_distribution_for_1500<pt<3500",
467  100, 0, 2);
468  */
469 
470  mpTScale_nvtx_0_5 = dbe->bookProfile("pTScale_nvtx_0_5", "pTScale_nvtx_0_5_0<|eta|<1.3",
471  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
472  mpTScale_nvtx_5_10 = dbe->bookProfile("pTScale_nvtx_5_10", "pTScale_nvtx_5_10_0<|eta|<1.3",
473  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
474  mpTScale_nvtx_10_15 = dbe->bookProfile("pTScale_nvtx_10_15", "pTScale_nvtx_10_15_0<|eta|<1.3",
475  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
476  mpTScale_nvtx_15_20 = dbe->bookProfile("pTScale_nvtx_15_20", "pTScale_nvtx_15_20_0<|eta|<1.3",
477  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
478  mpTScale_nvtx_20_30 = dbe->bookProfile("pTScale_nvtx_20_30", "pTScale_nvtx_20_30_0<|eta|<1.3",
479  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
480  mpTScale_nvtx_30_inf = dbe->bookProfile("pTScale_nvtx_30_inf", "pTScale_nvtx_30_inf_0<|eta|<1.3",
481  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
482  mpTScale_pT = dbe->bookProfile("pTScale_pT", "pTScale_vs_pT",
483  log10PtBins, log10PtMin, log10PtMax, 0, 2, " ");
485  mpTRatio = dbe->bookProfile("pTRatio", "pTRatio",
486  log10PtBins, log10PtMin, log10PtMax, 100, 0.,5., " ");
487  mpTRatioB_d = dbe->bookProfile("pTRatioB_d", "pTRatio_d_0<|eta|<1.5",
488  log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
489  mpTRatioE_d = dbe->bookProfile("pTRatioE_d", "pTRatio_d_1.5<|eta|<3.0",
490  log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
491  mpTRatioF_d = dbe->bookProfile("pTRatioF_d", "pTRatio_d_3.0<|eta|<6.0",
492  log10PtBins, log10PtMin, log10PtMax, 0, 5, " ");
493  mpTRatio_30_200_d = dbe->bookProfile("pTRatio_30_200_d", "pTRatio_d_30<pT<200",
494  90,etaRange, 0., 5., " ");
495  mpTRatio_200_600_d = dbe->bookProfile("pTRatio_200_600_d", "pTRatio_d_200<pT<600",
496  90,etaRange, 0., 5., " ");
497  mpTRatio_600_1500_d = dbe->bookProfile("pTRatio_600_1500_d", "pTRatio_d_600<pT<1500",
498  90,etaRange, 0., 5., " "); mpTRatio_1500_3500_d = dbe->bookProfile("pTRatio_1500_3500_d", "pTRatio_d_1500<pt<3500",
499  90,etaRange, 0., 5., " ");
500  mpTResponse = dbe->bookProfile("pTResponse", "pTResponse",
501  log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2, " ");
502  mpTResponseB_d = dbe->bookProfile("pTResponseB_d", "pTResponse_d_0<|eta|<1.5",
503  log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
504  mpTResponseE_d = dbe->bookProfile("pTResponseE_d", "pTResponse_d_1.5<|eta|<3.0",
505  log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
506  mpTResponseF_d = dbe->bookProfile("pTResponseF_d", "pTResponse_d_3.0<|eta|<6.0",
507  log10PtBins, log10PtMin, log10PtMax, 0.8, 1.2, " ");
508  mpTResponse_30_200_d = dbe->bookProfile("pTResponse_30_200_d", "pTResponse_d_30<pT<200",
509  90,etaRange, 0.8, 1.2, " ");
510  mpTResponse_200_600_d = dbe->bookProfile("pTResponse_200_600_d", "pTResponse_d_200<pT<600",
511  90,etaRange, 0.8, 1.2, " ");
512  mpTResponse_600_1500_d = dbe->bookProfile("pTResponse_600_1500_d", "pTResponse_d_600<pT<1500",
513  90,etaRange, 0.8, 1.2, " ");
514  mpTResponse_1500_3500_d = dbe->bookProfile("pTResponse_1500_3500_d", "pTResponse_d_1500<pt<3500",
515  90,etaRange, 0.8, 1.2, " ");
516  mpTResponse_30_d = dbe->bookProfile("pTResponse_30_d", "pTResponse_d_pt>30",
517  90,etaRange, 0.8, 1.2, " ");
518  mpTResponse_nvtx_0_5 = dbe->bookProfile("pTResponse_nvtx_0_5", "pTResponse_nvtx_0_5", log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2, " ");
519  mpTResponse_nvtx_5_10 = dbe->bookProfile("pTResponse_nvtx_5_10", "pTResponse_nvtx_5_10", log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2, " ");
520  mpTResponse_nvtx_10_15 = dbe->bookProfile("pTResponse_nvtx_10_15", "pTResponse_nvtx_10_15", log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2, " ");
521  mpTResponse_nvtx_15_20 = dbe->bookProfile("pTResponse_nvtx_15_20", "pTResponse_nvtx_15_20", log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2, " ");
522  mpTResponse_nvtx_20_30 = dbe->bookProfile("pTResponse_nvtx_20_30", "pTResponse_nvtx_20_30", log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2, " ");
523  mpTResponse_nvtx_30_inf = dbe->bookProfile("pTResponse_nvtx_30_inf", "pTResponse_nvtx_30_inf", log10PtBins, log10PtMin, log10PtMax, 100, 0.8,1.2, " ");
524  }
525 
526  if (mOutputFile.empty ()) {
527  LogInfo("OutputInfo") << " PFJet histograms will NOT be saved";
528  }
529  else {
530  LogInfo("OutputInfo") << " PFJethistograms will be saved to file:" << mOutputFile;
531  }
532 }
533 
535 {
536 }
537 
539 }
540 
543 }
544 
545 
546 void PFJetTester::analyze(const edm::Event& mEvent, const edm::EventSetup& mSetup)
547 {
548  double countsfornumberofevents = 1;
549  numberofevents->Fill(countsfornumberofevents);
550 
551  //get primary vertices
553  try {
554  mEvent.getByLabel( "offlinePrimaryVertices", pvHandle );
555  } catch ( cms::Exception & e ) {
556  //cout <<prefix<<"error: " << e.what() << endl;
557  }
558  vector<reco::Vertex> goodVertices;
559  for (unsigned i = 0; i < pvHandle->size(); i++) {
560  if ( (*pvHandle)[i].ndof() > 4 &&
561  ( fabs((*pvHandle)[i].z()) <= 24. ) &&
562  ( fabs((*pvHandle)[i].position().rho()) <= 2.0 ) )
563  goodVertices.push_back((*pvHandle)[i]);
564  }
565 
566  nvtx_0_30->Fill(goodVertices.size());
567  nvtx_0_60->Fill(goodVertices.size());
568 
569  // *********************************
570  // *** Get pThat
571  // *********************************
572 if (!mEvent.isRealData()){
574  mEvent.getByLabel("generator", evt);
575  if (evt.isValid()) {
576  HepMC::GenEvent * myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
577 
578  double pthat = myGenEvent->event_scale();
579 
580  mPthat_80->Fill(pthat);
581  mPthat_3000->Fill(pthat);
582 
583  delete myGenEvent;
584  }
585 }
586  // ***********************************
587  // *** Get CaloMET
588  // ***********************************
589 /*
590  const CaloMET *calomet;
591  edm::Handle<CaloMETCollection> calo;
592  mEvent.getByLabel("met", calo);
593  if (!calo.isValid()) {
594  edm::LogInfo("OutputInfo") << " failed to retrieve data required by MET Task";
595  edm::LogInfo("OutputInfo") << " MET Task cannot continue...!";
596  } else {
597  const CaloMETCollection *calometcol = calo.product();
598  calomet = &(calometcol->front());
599 
600  double caloSumET = calomet->sumEt();
601  double caloMETSig = calomet->mEtSig();
602  double caloMET = calomet->pt();
603  double caloMEx = calomet->px();
604  double caloMEy = calomet->py();
605  double caloMETPhi = calomet->phi();
606 
607  mCaloMEx->Fill(caloMEx);
608  mCaloMEx_3000->Fill(caloMEx);
609  mCaloMEy->Fill(caloMEy);
610  mCaloMEy_3000->Fill(caloMEy);
611  mCaloMET->Fill(caloMET);
612  mCaloMET_3000->Fill(caloMET);
613  mCaloMETPhi->Fill(caloMETPhi);
614  mCaloSumET->Fill(caloSumET);
615  mCaloSumET_3000->Fill(caloSumET);
616  mCaloMETSig->Fill(caloMETSig);
617  mCaloMETSig_3000->Fill(caloMETSig);
618 
619  }
620 */
621  // ***********************************
622  // *** Get the CaloTower collection
623  // ***********************************
625  mEvent.getByLabel( "towerMaker", caloTowers );
626  if (caloTowers.isValid()) {
627  for( CaloTowerCollection::const_iterator cal = caloTowers->begin(); cal != caloTowers->end(); ++ cal ){
628 
629  //To compensate for the index
630  if (mTurnOnEverything.compare("yes")==0) {
631  /*
632  if (cal->ieta() >> 0 ){mHadEnergyProfile->Fill (cal->ieta()-1, cal->iphi(), cal->hadEnergy());
633  mEmEnergyProfile->Fill (cal->ieta()-1, cal->iphi(), cal->emEnergy());}
634  mHadEnergyProfile->Fill (cal->ieta(), cal->iphi(), cal->hadEnergy());
635  mEmEnergyProfile->Fill (cal->ieta(), cal->iphi(), cal->emEnergy());
636  */
637  }
638 
639  mHadTiming->Fill (cal->hcalTime());
640  mEmTiming->Fill (cal->ecalTime());
641  }
642  }
643 
644  // ***********************************
645  // *** Get the RecHits collection
646  // ***********************************
647  try {
648  std::vector<edm::Handle<HBHERecHitCollection> > colls;
649  mEvent.getManyByType(colls);
650  std::vector<edm::Handle<HBHERecHitCollection> >::iterator i;
651  for (i=colls.begin(); i!=colls.end(); i++) {
652  for (HBHERecHitCollection::const_iterator j=(*i)->begin(); j!=(*i)->end(); j++) {
653  // std::cout << *j << std::endl;
654  /*
655  if (j->id().subdet() == HcalBarrel) {
656  mHBEne->Fill(j->energy());
657  mHBTime->Fill(j->time());
658  }
659  if (j->id().subdet() == HcalEndcap) {
660  mHEEne->Fill(j->energy());
661  mHETime->Fill(j->time());
662  }
663  */
664  }
665  }
666  } catch (...) {
667  edm::LogInfo("OutputInfo") << " No HB/HE RecHits.";
668  }
669 
670  try {
671  std::vector<edm::Handle<HFRecHitCollection> > colls;
672  mEvent.getManyByType(colls);
673  std::vector<edm::Handle<HFRecHitCollection> >::iterator i;
674  for (i=colls.begin(); i!=colls.end(); i++) {
675  for (HFRecHitCollection::const_iterator j=(*i)->begin(); j!=(*i)->end(); j++) {
676  // std::cout << *j << std::endl;
677  /*
678  if (j->id().subdet() == HcalForward) {
679  mHFEne->Fill(j->energy());
680  mHFTime->Fill(j->time());
681  }
682  */
683  }
684  }
685  } catch (...) {
686  edm::LogInfo("OutputInfo") << " No HF RecHits.";
687  }
688 
689  try {
690  std::vector<edm::Handle<HORecHitCollection> > colls;
691  mEvent.getManyByType(colls);
692  std::vector<edm::Handle<HORecHitCollection> >::iterator i;
693  for (i=colls.begin(); i!=colls.end(); i++) {
694  for (HORecHitCollection::const_iterator j=(*i)->begin(); j!=(*i)->end(); j++) {
695  /*
696  if (j->id().subdet() == HcalOuter) {
697  mHOEne->Fill(j->energy());
698  mHOTime->Fill(j->time());
699  }
700  */
701  }
702  }
703  } catch (...) {
704  edm::LogInfo("OutputInfo") << " No HO RecHits.";
705  }
706  try {
707  std::vector<edm::Handle<EBRecHitCollection> > colls;
708  mEvent.getManyByType(colls);
709  std::vector<edm::Handle<EBRecHitCollection> >::iterator i;
710  for (i=colls.begin(); i!=colls.end(); i++) {
711  for (EBRecHitCollection::const_iterator j=(*i)->begin(); j!=(*i)->end(); j++) {
712  // if (j->id() == EcalBarrel) {
713  //mEBEne->Fill(j->energy());
714  //mEBTime->Fill(j->time());
715  // }
716  // std::cout << *j << std::endl;
717  // std::cout << j->id() << std::endl;
718  }
719  }
720  } catch (...) {
721  edm::LogInfo("OutputInfo") << " No EB RecHits.";
722  }
723 
724  try {
725  std::vector<edm::Handle<EERecHitCollection> > colls;
726  mEvent.getManyByType(colls);
727  std::vector<edm::Handle<EERecHitCollection> >::iterator i;
728  for (i=colls.begin(); i!=colls.end(); i++) {
729  for (EERecHitCollection::const_iterator j=(*i)->begin(); j!=(*i)->end(); j++) {
730  // if (j->id().subdet() == EcalEndcap) {
731  //mEEEne->Fill(j->energy());
732  //mEETime->Fill(j->time());
733  // }
734  // std::cout << *j << std::endl;
735  }
736  }
737  } catch (...) {
738  edm::LogInfo("OutputInfo") << " No EE RecHits.";
739  }
740 
741 
742  //***********************************
743  //*** Get the Jet collection
744  //***********************************
745  math::XYZTLorentzVector p4tmp[2];
747  mEvent.getByLabel(mInputCollection, pfJets);
748  if (!pfJets.isValid()) return;
749  PFJetCollection::const_iterator jet = pfJets->begin ();
750  int jetIndex = 0;
751  int nJet = 0;
752  int nJetF = 0;
753  int nJetC = 0;
754  int nJetF_30 =0;
755  for (; jet != pfJets->end (); jet++, jetIndex++) {
756 
757  if (jet->pt() > 10.) {
758  if (fabs(jet->eta()) > 1.5)
759  nJetF++;
760  else
761  nJetC++;
762  }
763  if (jet->pt() > 30.) nJetF_30++;
764  if (jet->pt() > 10.) {
765  if (mEta) mEta->Fill (jet->eta());
766  if (mEtaFineBin) mEtaFineBin->Fill (jet->eta());
767  //if (mEtaFineBin1p) mEtaFineBin1p->Fill (jet->eta());
768  //if (mEtaFineBin2p) mEtaFineBin2p->Fill (jet->eta());
769  //if (mEtaFineBin3p) mEtaFineBin3p->Fill (jet->eta());
770  //if (mEtaFineBin1m) mEtaFineBin1m->Fill (jet->eta());
771  //if (mEtaFineBin2m) mEtaFineBin2m->Fill (jet->eta());
772  //if (mEtaFineBin3m) mEtaFineBin3m->Fill (jet->eta());
773  if (mPhiFineBin) mPhiFineBin->Fill (jet->phi());
774  }
775  if (mjetArea) mjetArea->Fill(jet->jetArea());
776  if (mPhi) mPhi->Fill (jet->phi());
777  if (mE) mE->Fill (jet->energy());
778  if (mE_80) mE_80->Fill (jet->energy());
779  if (mP) mP->Fill (jet->p());
780  if (mP_80) mP_80->Fill (jet->p());
781  if (mPt) mPt->Fill (jet->pt());
782  if (mPt_80) mPt_80->Fill (jet->pt());
783  if (mMass) mMass->Fill (jet->mass());
784  if (mMass_80) mMass_80->Fill (jet->mass());
785  if (mConstituents) mConstituents->Fill (jet->nConstituents());
786  if (mConstituents_80) mConstituents_80->Fill (jet->nConstituents());
787  if (jet == pfJets->begin ()) { // first jet
788  if (mEtaFirst) mEtaFirst->Fill (jet->eta());
789  if (mPhiFirst) mPhiFirst->Fill (jet->phi());
790  if (mPtFirst) mPtFirst->Fill (jet->pt());
791  if (mPtFirst_80) mPtFirst_80->Fill (jet->pt());
792  if (mPtFirst_3000) mPtFirst_3000->Fill (jet->pt());
793  }
794  if (jetIndex == 0) {
795  nJet++;
796  p4tmp[0] = jet->p4();
797  }
798  if (jetIndex == 1) {
799  nJet++;
800  p4tmp[1] = jet->p4();
801  }
802 
803  // if (mMaxEInEmTowers) mMaxEInEmTowers->Fill (jet->maxEInEmTowers());
804  // if (mMaxEInHadTowers) mMaxEInHadTowers->Fill (jet->maxEInHadTowers());
805  // if (mHadEnergyInHO) mHadEnergyInHO->Fill (jet->hadEnergyInHO());
806  // if (mHadEnergyInHO_80) mHadEnergyInHO_80->Fill (jet->hadEnergyInHO());
807  // if (mHadEnergyInHO_3000) mHadEnergyInHO_3000->Fill (jet->hadEnergyInHO());
808  // if (mHadEnergyInHB) mHadEnergyInHB->Fill (jet->hadEnergyInHB());
809  // if (mHadEnergyInHB_80) mHadEnergyInHB_80->Fill (jet->hadEnergyInHB());
810  // if (mHadEnergyInHB_3000) mHadEnergyInHB_3000->Fill (jet->hadEnergyInHB());
811  if (mHadEnergyInHF) mHadEnergyInHF->Fill (jet->HFHadronEnergy());
812  if (mHadEnergyInHF_80) mHadEnergyInHF_80->Fill (jet->HFHadronEnergy());
813  if (mHadEnergyInHF_3000) mHadEnergyInHF_3000->Fill (jet->HFHadronEnergy());
814  // if (mHadEnergyInHE) mHadEnergyInHE->Fill (jet->hadEnergyInHE());
815  // if (mHadEnergyInHE_80) mHadEnergyInHE_80->Fill (jet->hadEnergyInHE());
816  // if (mHadEnergyInHE_3000) mHadEnergyInHE_3000->Fill (jet->hadEnergyInHE());
817  // if (mEmEnergyInEB) mEmEnergyInEB->Fill (jet->emEnergyInEB());
818  // if (mEmEnergyInEB_80) mEmEnergyInEB_80->Fill (jet->emEnergyInEB());
819  // if (mEmEnergyInEB_3000) mEmEnergyInEB_3000->Fill (jet->emEnergyInEB());
820  // if (mEmEnergyInEE) mEmEnergyInEE->Fill (jet->emEnergyInEE());
821  // if (mEmEnergyInEE_80) mEmEnergyInEE_80->Fill (jet->emEnergyInEE());
822  // if (mEmEnergyInEE_3000) mEmEnergyInEE_3000->Fill (jet->emEnergyInEE());
823  if (mEmEnergyInHF) mEmEnergyInHF->Fill (jet->HFEMEnergy());
824  if (mEmEnergyInHF_80) mEmEnergyInHF_80->Fill (jet->HFEMEnergy());
825  if (mEmEnergyInHF_3000) mEmEnergyInHF_3000->Fill (jet->HFEMEnergy());
826  // if (mEnergyFractionHadronic) mEnergyFractionHadronic->Fill (jet->energyFractionHadronic());
827  // if (mEnergyFractionEm) mEnergyFractionEm->Fill (jet->emEnergyFraction());
828  //
829  // if (mHFTotal) mHFTotal->Fill (jet->hadEnergyInHF()+jet->emEnergyInHF());
830  // if (mHFTotal_80) mHFTotal_80->Fill (jet->hadEnergyInHF()+jet->emEnergyInHF());
831  // if (mHFTotal_3000) mHFTotal_3000->Fill (jet->hadEnergyInHF()+jet->emEnergyInHF());
832  // if (mHFLong) mHFLong->Fill (jet->hadEnergyInHF()*0.5+jet->emEnergyInHF());
833  // if (mHFLong_80) mHFLong_80->Fill (jet->hadEnergyInHF()*0.5+jet->emEnergyInHF());
834  // if (mHFLong_3000) mHFLong_3000->Fill (jet->hadEnergyInHF()*0.5+jet->emEnergyInHF());
835  // if (mHFShort) mHFShort->Fill (jet->hadEnergyInHF()*0.5);
836  // if (mHFShort_80) mHFShort_80->Fill (jet->hadEnergyInHF()*0.5);
837  // if (mHFShort_3000) mHFShort_3000->Fill (jet->hadEnergyInHF()*0.5);
838 
839  if (mChargedEmEnergy_80) mChargedEmEnergy_80->Fill (jet->chargedEmEnergy());
840  if (mChargedHadronEnergy_80) mChargedHadronEnergy_80->Fill (jet->chargedHadronEnergy());
841  if (mNeutralEmEnergy_80) mNeutralEmEnergy_80->Fill (jet->neutralEmEnergy());
842  if (mNeutralHadronEnergy_80) mNeutralHadronEnergy_80->Fill (jet->neutralHadronEnergy());
843 
844  if (mChargedEmEnergy_3000) mChargedEmEnergy_3000->Fill (jet->chargedEmEnergy());
845  if (mChargedHadronEnergy_3000) mChargedHadronEnergy_3000->Fill (jet->chargedHadronEnergy());
846  if (mNeutralEmEnergy_3000) mNeutralEmEnergy_3000->Fill (jet->neutralEmEnergy());
847  if (mNeutralHadronEnergy_3000) mNeutralHadronEnergy_3000->Fill (jet->neutralHadronEnergy());
848 
849  if (fabs(jet->eta())<1.5) mChargedEmEnergyFraction_B->Fill (jet->chargedEmEnergyFraction());
850  if (fabs(jet->eta())>1.5 && fabs(jet->eta())<3.0) mChargedEmEnergyFraction_E->Fill (jet->chargedEmEnergyFraction());
851  if (fabs(jet->eta())>3.0 && fabs(jet->eta())<6.0) mChargedEmEnergyFraction_F->Fill (jet->chargedEmEnergyFraction());
852  if (fabs(jet->eta())<1.5) mChargedHadronEnergyFraction_B->Fill (jet->chargedHadronEnergyFraction());
853  if (fabs(jet->eta())>1.5 && fabs(jet->eta())<3.0) mChargedHadronEnergyFraction_E->Fill (jet->chargedHadronEnergyFraction());
854  if (fabs(jet->eta())>3.0 && fabs(jet->eta())<6.0) mChargedHadronEnergyFraction_F->Fill (jet->chargedHadronEnergyFraction());
855  if (fabs(jet->eta())<1.5) mNeutralEmEnergyFraction_B->Fill (jet->neutralEmEnergyFraction());
856  if (fabs(jet->eta())>1.5 && fabs(jet->eta())<3.0) mNeutralEmEnergyFraction_E->Fill (jet->neutralEmEnergyFraction());
857  if (fabs(jet->eta())>3.0 && fabs(jet->eta())<6.0) mNeutralEmEnergyFraction_F->Fill (jet->neutralEmEnergyFraction());
858  if (fabs(jet->eta())<1.5) mNeutralHadronEnergyFraction_B->Fill (jet->neutralHadronEnergyFraction());
859  if (fabs(jet->eta())>1.5 && fabs(jet->eta())<3.0) mNeutralHadronEnergyFraction_E->Fill (jet->neutralHadronEnergyFraction());
860  if (fabs(jet->eta())>3.0 && fabs(jet->eta())<6.0) mNeutralHadronEnergyFraction_F->Fill (jet->neutralHadronEnergyFraction());
861 
862  // if (mN90) mN90->Fill (jet->n90());
863  // mJetEnergyProfile->Fill (jet->eta(), jet->phi(), jet->energy());
864  // mHadJetEnergyProfile->Fill (jet->eta(), jet->phi(), jet->hadEnergyInHO()+jet->hadEnergyInHB()+jet->hadEnergyInHF()+jet->hadEnergyInHE());
865  // mEMJetEnergyProfile->Fill (jet->eta(), jet->phi(), jet->emEnergyInEB()+jet->emEnergyInEE()+jet->emEnergyInHF());
866  }
867 
868  if (mNJetsEtaC) mNJetsEtaC->Fill( nJetC );
869  if (mNJetsEtaF) mNJetsEtaF->Fill( nJetF );
870  if (mNJetsEtaF_30) mNJetsEtaF_30->Fill( nJetF_30 );
871 
872  if (nJet == 2) {
873  if (mMjj) mMjj->Fill( (p4tmp[0]+p4tmp[1]).mass() );
874  if (mMjj_3000) mMjj_3000->Fill( (p4tmp[0]+p4tmp[1]).mass() );
875  }
876 
877  // Count Jets above Pt cut
878  for (int istep = 0; istep < 100; ++istep) {
879  int njet = 0;
880  float ptStep = (istep * (200./100.));
881 
882  for ( PFJetCollection::const_iterator cal = pfJets->begin(); cal != pfJets->end(); ++ cal ) {
883  if ( cal->pt() > ptStep ) njet++;
884  }
885  mNJets1->Fill( ptStep, njet );
886  }
887 
888  for (int istep = 0; istep < 100; ++istep) {
889  int njet = 0;
890  float ptStep = (istep * (4000./100.));
891  for ( PFJetCollection::const_iterator cal = pfJets->begin(); cal != pfJets->end(); ++ cal ) {
892  if ( cal->pt() > ptStep ) njet++;
893  }
894  mNJets2->Fill( ptStep, njet );
895  }
896 
897  // Correction jets
899 
900  for (PFJetCollection::const_iterator jet = pfJets->begin(); jet !=pfJets ->end(); jet++)
901  {
902 
903  PFJet correctedJet = *jet;
904  //double scale = corrector->correction(jet->p4());
905  double scale = corrector->correction(*jet,mEvent,mSetup);
906  correctedJet.scaleEnergy(scale);
907  if(correctedJet.pt()>30){
908  mCorrJetPt->Fill(correctedJet.pt());
909  mCorrJetPt_80->Fill(correctedJet.pt());
910  if(correctedJet.pt()>10) mCorrJetEta->Fill(correctedJet.eta());
911  mCorrJetPhi->Fill(correctedJet.phi());
912  mpTRatio->Fill(log10(jet->pt()),correctedJet.pt()/jet->pt());
913 
914  if (fabs(jet->eta())<1.5) {
915  mpTRatioB_d->Fill(log10(jet->pt()), correctedJet.pt()/jet->pt());
916  }
917 
918  if (fabs(jet->eta())>1.5 && fabs(jet->eta())<3.0) {
919  mpTRatioE_d->Fill (log10(jet->pt()), correctedJet.pt()/jet->pt());
920  }
921  if (fabs(jet->eta())>3.0 && fabs(jet->eta())<6.0) {
922  mpTRatioF_d->Fill (log10(jet->pt()), correctedJet.pt()/jet->pt());
923  }
924  if (jet->pt()>30.0 && jet->pt()<200.0) {
925  mpTRatio_30_200_d->Fill (jet->eta(),correctedJet.pt()/jet->pt());
926  }
927  if (jet->pt()>200.0 && jet->pt()<600.0) {
928  mpTRatio_200_600_d->Fill (jet->eta(),correctedJet.pt()/jet->pt());
929  }
930 if (jet->pt()>600.0 && jet->pt()<1500.0) {
931  mpTRatio_600_1500_d->Fill (jet->eta(),correctedJet.pt()/jet->pt());
932  }
933 if (jet->pt()>1500.0 && jet->pt()<3500.0) {
934  mpTRatio_1500_3500_d->Fill (jet->eta(),correctedJet.pt()/jet->pt());
935  }
936  }
937 
938 
939 
940  }
941 
942 if (!mEvent.isRealData()){
943  // Gen jet analysis
944  Handle<GenJetCollection> genJets;
945  mEvent.getByLabel(mInputGenCollection, genJets);
946  if (!genJets.isValid()) return;
947  GenJetCollection::const_iterator gjet = genJets->begin ();
948  int gjetIndex = 0;
949  for (; gjet != genJets->end (); gjet++, gjetIndex++) {
950  if (mGenEta) mGenEta->Fill (gjet->eta());
951  if (mGenPhi) mGenPhi->Fill (gjet->phi());
952  if (mGenPt) mGenPt->Fill (gjet->pt());
953  if (mGenPt_80) mGenPt_80->Fill (gjet->pt());
954  if (gjet == genJets->begin ()) { // first jet
955  if (mGenEtaFirst) mGenEtaFirst->Fill (gjet->eta());
956  if (mGenPhiFirst) mGenPhiFirst->Fill (gjet->phi());
957  }
958  }
959 
960 
961  // now match PFJets to GenJets
962  JetMatchingTools jetMatching (mEvent);
963  if (!(mInputGenCollection.label().empty())) {
964  // Handle<GenJetCollection> genJets;
965  // mEvent.getByLabel(mInputGenCollection, genJets);
966 
967  std::vector <std::vector <const reco::GenParticle*> > genJetConstituents (genJets->size());
968  std::vector <std::vector <const reco::GenParticle*> > pfJetConstituents (pfJets->size());
969  /*
970  if (mRThreshold > 0) {
971  }
972  else {
973  for (unsigned iGenJet = 0; iGenJet < genJets->size(); ++iGenJet) {
974  genJetConstituents [iGenJet] = jetMatching.getGenParticles ((*genJets) [iGenJet]);
975  }
976 
977  for (unsigned iPFJet = 0; iPFJet < pfJets->size(); ++iPFJet) {
978  pfJetConstituents [iPFJet] = jetMatching.getGenParticles ((*pfJets) [iPFJet], false);
979  }
980  }
981  */
982 
983  for (unsigned iGenJet = 0; iGenJet < genJets->size(); ++iGenJet) { //****************************************************************
984  //for (unsigned iGenJet = 0; iGenJet < 1; ++iGenJet) { // only FIRST Jet !!!!
985  const GenJet& genJet = (*genJets) [iGenJet];
986  double genJetPt = genJet.pt();
987 
988  //std::cout << iGenJet <<". Genjet: pT = " << genJetPt << "GeV" << std::endl; // *****************************************************
989 
990  if (fabs(genJet.eta()) > 6.) continue; // out of detector
991  if (genJetPt < mMatchGenPtThreshold) continue; // no low momentum
992  //double logPtGen = log10 (genJetPt);
993  //mAllGenJetsPt->Fill (logPtGen);
994  //mAllGenJetsEta->Fill (logPtGen, genJet.eta());
995  if (pfJets->size() <= 0) continue; // no PFJets - nothing to match
996  if (mRThreshold > 0) {
997  unsigned iPFJetBest = 0;
998  double deltaRBest = 999.;
999  for (unsigned iPFJet = 0; iPFJet < pfJets->size(); ++iPFJet) {
1000  double dR = deltaR (genJet.eta(), genJet.phi(), (*pfJets) [iPFJet].eta(), (*pfJets) [iPFJet].phi());
1001  if (deltaRBest < mRThreshold && dR < mRThreshold && genJet.pt() > 5.) {
1002  /*
1003  std::cout << "Yet another matched jet for GenJet pt=" << genJet.pt()
1004  << " previous PFJet pt/dr: " << (*pfJets) [iPFJetBest].pt() << '/' << deltaRBest
1005  << " new PFJet pt/dr: " << (*pfJets) [iPFJet].pt() << '/' << dR
1006  << std::endl;
1007  */
1008  }
1009  if (dR < deltaRBest) {
1010  iPFJetBest = iPFJet;
1011  deltaRBest = dR;
1012  }
1013  }
1014  if (mTurnOnEverything.compare("yes")==0) {
1015  //mRMatch->Fill (logPtGen, genJet.eta(), deltaRBest);
1016  }
1017  if (deltaRBest < mRThreshold) { // Matched
1018  fillMatchHists (genJet, (*pfJets) [iPFJetBest],goodVertices);
1019  }
1020 
1022  double CorrdeltaRBest = 999.;
1023  double CorrJetPtBest = 0;
1024  for (PFJetCollection::const_iterator jet = pfJets->begin(); jet !=pfJets ->end(); jet++) {
1025  PFJet correctedJet = *jet;
1026  //double scale = corrector->correction(jet->p4());
1027  double scale = corrector->correction(*jet,mEvent,mSetup);
1028  correctedJet.scaleEnergy(scale);
1029  double CorrJetPt = correctedJet.pt();
1030  if(CorrJetPt>30){
1031  double CorrdR = deltaR (genJet.eta(), genJet.phi(), correctedJet.eta(), correctedJet.phi());
1032  if (CorrdR < CorrdeltaRBest) {
1033  CorrdeltaRBest = CorrdR;
1034  CorrJetPtBest = CorrJetPt;
1035  }
1036  }
1037  }
1038  if (deltaRBest < mRThreshold) { // Matched
1039  mpTResponse->Fill(log10(genJet.pt()),CorrJetPtBest/genJet.pt());
1040 
1041  if (fabs(genJet.eta())<1.5) {
1042  mpTResponseB_d->Fill(log10(genJet.pt()), CorrJetPtBest/genJet.pt());
1043  }
1044 
1045  if (fabs(genJet.eta())>1.5 && fabs(genJet.eta())<3.0) {
1046  mpTResponseE_d->Fill (log10(genJet.pt()), CorrJetPtBest/genJet.pt());
1047  }
1048  if (fabs(genJet.eta())>3.0 && fabs(genJet.eta())<6.0) {
1049  mpTResponseF_d->Fill (log10(genJet.pt()), CorrJetPtBest/genJet.pt());
1050  }
1051  if (genJet.pt()>30.0 && genJet.pt()<200.0) {
1052  mpTResponse_30_200_d->Fill (genJet.eta(),CorrJetPtBest/genJet.pt());
1053  }
1054  if (genJet.pt()>200.0 && genJet.pt()<600.0) {
1055  mpTResponse_200_600_d->Fill (genJet.eta(),CorrJetPtBest/genJet.pt());
1056  }
1057  if (genJet.pt()>600.0 && genJet.pt()<1500.0) {
1058  mpTResponse_600_1500_d->Fill (genJet.eta(),CorrJetPtBest/genJet.pt());
1059  }
1060  if (genJet.pt()>1500.0 && genJet.pt()<3500.0) {
1061  mpTResponse_1500_3500_d->Fill (genJet.eta(),CorrJetPtBest/genJet.pt());
1062  }
1063  if (genJet.pt()>30.0) {
1064  mpTResponse_30_d->Fill (genJet.eta(),CorrJetPtBest/genJet.pt());
1065  }
1066  if(goodVertices.size()<=5) mpTResponse_nvtx_0_5->Fill(log10(genJet.pt()),CorrJetPtBest/genJet.pt());
1067  if(goodVertices.size()>5 && goodVertices.size()<=10) mpTResponse_nvtx_5_10->Fill(log10(genJet.pt()),CorrJetPtBest/genJet.pt());
1068  if(goodVertices.size()>10 && goodVertices.size()<=15) mpTResponse_nvtx_10_15->Fill(log10(genJet.pt()),CorrJetPtBest/genJet.pt());
1069  if(goodVertices.size()>15 && goodVertices.size()<=20) mpTResponse_nvtx_15_20->Fill(log10(genJet.pt()),CorrJetPtBest/genJet.pt());
1070  if(goodVertices.size()>20 && goodVertices.size()<=30) mpTResponse_nvtx_20_30->Fill(log10(genJet.pt()),CorrJetPtBest/genJet.pt());
1071  if(goodVertices.size()>30) mpTResponse_nvtx_30_inf->Fill(log10(genJet.pt()),CorrJetPtBest/genJet.pt());
1072  }
1074 
1075  }
1076  /*
1077  else {
1078  unsigned iPFJetBest = 0;
1079  double energyFractionBest = 0.;
1080  for (unsigned iPFJet = 0; iPFJet < pfJets->size(); ++iPFJet) {
1081  double energyFraction = jetMatching.overlapEnergyFraction (genJetConstituents [iGenJet],
1082  pfJetConstituents [iPFJet]);
1083  if (energyFraction > energyFractionBest) {
1084  iPFJetBest = iPFJet;
1085  energyFractionBest = energyFraction;
1086  }
1087  }
1088  if (mTurnOnEverything.compare("yes")==0) {
1089  mGenJetMatchEnergyFraction->Fill (logPtGen, genJet.eta(), energyFractionBest);
1090  }
1091  if (energyFractionBest > mGenEnergyFractionThreshold) { // good enough
1092  double reverseEnergyFraction = jetMatching.overlapEnergyFraction (pfJetConstituents [iPFJetBest],
1093  genJetConstituents [iGenJet]);
1094  if (mTurnOnEverything.compare("yes")==0) {
1095  mReverseMatchEnergyFraction->Fill (logPtGen, genJet.eta(), reverseEnergyFraction);
1096  }
1097  if (reverseEnergyFraction > mReverseEnergyFractionThreshold) { // Matched
1098  fillMatchHists (genJet, (*pfJets) [iPFJetBest]);
1099  }
1100  }
1101  }
1102  */
1103  }
1104  }
1105 }
1106 
1107 }
1108 
1109 void PFJetTester::fillMatchHists (const reco::GenJet& fGenJet, const reco::PFJet& fPFJet,std::vector<reco::Vertex> goodVertices) {
1110  double logPtGen = log10 (fGenJet.pt());
1111  double PtGen = fGenJet.pt();
1112  double PtPF = fPFJet.pt();
1113  //mMatchedGenJetsPt->Fill (logPtGen);
1114  //mMatchedGenJetsEta->Fill (logPtGen, fGenJet.eta());
1115 
1116  double PtThreshold = 10.;
1117 
1118  if (mTurnOnEverything.compare("yes")==0) {
1119  mDeltaEta->Fill (logPtGen, fGenJet.eta(), fPFJet.eta()-fGenJet.eta());
1120  mDeltaPhi->Fill (logPtGen, fGenJet.eta(), fPFJet.phi()-fGenJet.phi());
1121  //mEScale->Fill (logPtGen, fGenJet.eta(), fPFJet.energy()/fGenJet.energy());
1122  //mlinEScale->Fill (fGenJet.pt(), fGenJet.eta(), fPFJet.energy()/fGenJet.energy());
1123  //mDeltaE->Fill (logPtGen, fGenJet.eta(), fPFJet.energy()-fGenJet.energy());
1124 
1125  mEScaleFineBin->Fill (logPtGen, fGenJet.eta(), fPFJet.energy()/fGenJet.energy());
1126 
1127  if (fGenJet.pt()>PtThreshold) {
1128  mEScale_pt10->Fill (logPtGen, fGenJet.eta(), fPFJet.energy()/fGenJet.energy());
1129 
1130  }
1131 
1132  }
1133  if (fPFJet.pt() > PtThreshold) {
1134  mDelEta->Fill (fGenJet.eta()-fPFJet.eta());
1135  mDelPhi->Fill (fGenJet.phi()-fPFJet.phi());
1136  mDelPt->Fill ((fGenJet.pt()-fPFJet.pt())/fGenJet.pt());
1137  }
1138 
1139  if (fabs(fGenJet.eta())<1.5) {
1140 
1141  //mpTScaleB_s->Fill (log10(PtGen), PtPF/PtGen);
1142  mpTScaleB_d->Fill (log10(PtGen), PtPF/PtGen);
1143  mpTScalePhiB_d->Fill (fGenJet.phi(), PtPF/PtGen);
1144 
1145  if (PtGen>30.0 && PtGen<200.0) {
1146  mpTScale1DB_30_200->Fill (fPFJet.pt()/fGenJet.pt());
1147  }
1148  if (PtGen>200.0 && PtGen<600.0) {
1149  mpTScale1DB_200_600->Fill (fPFJet.pt()/fGenJet.pt());
1150  }
1151  if (PtGen>600.0 && PtGen<1500.0) {
1152  mpTScale1DB_600_1500->Fill (fPFJet.pt()/fGenJet.pt());
1153  }
1154  if (PtGen>1500.0 && PtGen<3500.0) {
1155  mpTScale1DB_1500_3500->Fill (fPFJet.pt()/fGenJet.pt());
1156  }
1157 
1158  }
1159 
1160  if (fabs(fGenJet.eta())>1.5 && fabs(fGenJet.eta())<3.0) {
1161 
1162  //mpTScaleE_s->Fill (log10(PtGen), PtPF/PtGen);
1163  mpTScaleE_d->Fill (log10(PtGen), PtPF/PtGen);
1164  mpTScalePhiE_d->Fill (fGenJet.phi(), PtPF/PtGen);
1165 
1166  if (PtGen>30.0 && PtGen<200.0) {
1167  mpTScale1DE_30_200->Fill (fPFJet.pt()/fGenJet.pt());
1168  }
1169  if (PtGen>200.0 && PtGen<600.0) {
1170  mpTScale1DE_200_600->Fill (fPFJet.pt()/fGenJet.pt());
1171  }
1172  if (PtGen>600.0 && PtGen<1500.0) {
1173  mpTScale1DE_600_1500->Fill (fPFJet.pt()/fGenJet.pt());
1174  }
1175  if (PtGen>1500.0 && PtGen<3500.0) {
1176  mpTScale1DE_1500_3500->Fill (fPFJet.pt()/fGenJet.pt());
1177  }
1178 
1179  }
1180 
1181  if (fabs(fGenJet.eta())>3.0 && fabs(fGenJet.eta())<6.0) {
1182 
1183  //mpTScaleF_s->Fill (log10(PtGen), PtPF/PtGen);
1184  mpTScaleF_d->Fill (log10(PtGen), PtPF/PtGen);
1185  mpTScalePhiF_d->Fill (fGenJet.phi(), PtPF/PtGen);
1186 
1187  if (PtGen>30.0 && PtGen<200.0) {
1188  mpTScale1DF_30_200->Fill (fPFJet.pt()/fGenJet.pt());
1189  }
1190  if (PtGen>200.0 && PtGen<600.0) {
1191  mpTScale1DF_200_600->Fill (fPFJet.pt()/fGenJet.pt());
1192  }
1193  if (PtGen>600.0 && PtGen<1500.0) {
1194  mpTScale1DF_600_1500->Fill (fPFJet.pt()/fGenJet.pt());
1195  }
1196  if (PtGen>1500.0 && PtGen<3500.0) {
1197  mpTScale1DF_1500_3500->Fill (fPFJet.pt()/fGenJet.pt());
1198  }
1199 
1200  }
1201 
1202  if (fGenJet.pt()>30.0 && fGenJet.pt()<200.0) {
1203  //mpTScale_30_200_s->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1204  mpTScale_30_200_d->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1205  //mpTScale1D_30_200->Fill (fPFJet.pt()/fGenJet.pt());
1206  }
1207 
1208  if (fGenJet.pt()>200.0 && fGenJet.pt()<600.0) {
1209  //mpTScale_200_600_s->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1210  mpTScale_200_600_d->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1211  //mpTScale1D_200_600->Fill (fPFJet.pt()/fGenJet.pt());
1212  }
1213 
1214  if (fGenJet.pt()>600.0 && fGenJet.pt()<1500.0) {
1215  //mpTScale_600_1500_s->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1216  mpTScale_600_1500_d->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1217  //mpTScale1D_600_1500->Fill (fPFJet.pt()/fGenJet.pt());
1218  }
1219 
1220  if (fGenJet.pt()>1500.0 && fGenJet.pt()<3500.0) {
1221  //mpTScale_1500_3500_s->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1222  mpTScale_1500_3500_d->Fill (fGenJet.eta(),fPFJet.pt()/fGenJet.pt());
1223  //mpTScale1D_1500_3500->Fill (fPFJet.pt()/fGenJet.pt());
1224  }
1225  if (fabs(fGenJet.eta())<1.3) {
1226  if(fGenJet.pt()>60.0 && fGenJet.pt()<120.0) {
1227  if(goodVertices.size()<=5) mpTScale_a_nvtx_0_5->Fill( PtPF/PtGen);
1228  }
1229  if(fGenJet.pt()>200.0 && fGenJet.pt()<300.0) {
1230  if(goodVertices.size()<=5) mpTScale_b_nvtx_0_5->Fill( PtPF/PtGen);
1231  }
1232  if(fGenJet.pt()>600.0 && fGenJet.pt()<900.0) {
1233  if(goodVertices.size()<=5) mpTScale_c_nvtx_0_5->Fill( PtPF/PtGen);
1234  }
1235 
1236  if(fGenJet.pt()>60.0 && fGenJet.pt()<120.0) {
1237  if(goodVertices.size()>5 && goodVertices.size()<=10) mpTScale_a_nvtx_5_10->Fill( PtPF/PtGen);
1238  }
1239  if(fGenJet.pt()>200.0 && fGenJet.pt()<300.0) {
1240  if(goodVertices.size()>5 && goodVertices.size()<=10) mpTScale_b_nvtx_5_10->Fill( PtPF/PtGen);
1241  }
1242  if(fGenJet.pt()>600.0 && fGenJet.pt()<900.0) {
1243  if(goodVertices.size()>5 && goodVertices.size()<=10) mpTScale_c_nvtx_5_10->Fill( PtPF/PtGen);
1244  }
1245 
1246  if(fGenJet.pt()>60.0 && fGenJet.pt()<120.0) {
1247  if(goodVertices.size()>10 && goodVertices.size()<=15) mpTScale_a_nvtx_10_15->Fill( PtPF/PtGen);
1248  }
1249  if(fGenJet.pt()>200.0 && fGenJet.pt()<300.0) {
1250  if(goodVertices.size()>10 && goodVertices.size()<=15) mpTScale_b_nvtx_10_15->Fill( PtPF/PtGen);
1251  }
1252  if(fGenJet.pt()>600.0 && fGenJet.pt()<900.0) {
1253  if(goodVertices.size()>10 && goodVertices.size()<=15) mpTScale_c_nvtx_10_15->Fill( PtPF/PtGen);
1254  }
1255 
1256  if(fGenJet.pt()>60.0 && fGenJet.pt()<120.0) {
1257  if(goodVertices.size()>15 && goodVertices.size()<=20) mpTScale_a_nvtx_15_20->Fill( PtPF/PtGen);
1258  }
1259  if(fGenJet.pt()>200.0 && fGenJet.pt()<300.0) {
1260  if(goodVertices.size()>15 && goodVertices.size()<=20) mpTScale_b_nvtx_15_20->Fill( PtPF/PtGen);
1261  }
1262  if(fGenJet.pt()>600.0 && fGenJet.pt()<900.0) {
1263  if(goodVertices.size()>15 && goodVertices.size()<=20) mpTScale_c_nvtx_15_20->Fill( PtPF/PtGen);
1264  }
1265 
1266 if(fGenJet.pt()>60.0 && fGenJet.pt()<120.0) {
1267  if(goodVertices.size()>20 && goodVertices.size()<=30) mpTScale_a_nvtx_20_30->Fill( PtPF/PtGen);
1268  }
1269  if(fGenJet.pt()>200.0 && fGenJet.pt()<300.0) {
1270  if(goodVertices.size()>20 && goodVertices.size()<=30) mpTScale_b_nvtx_20_30->Fill( PtPF/PtGen);
1271  }
1272  if(fGenJet.pt()>600.0 && fGenJet.pt()<900.0) {
1273  if(goodVertices.size()>20 && goodVertices.size()<=30) mpTScale_c_nvtx_20_30->Fill( PtPF/PtGen);
1274  }
1275 
1276 if(fGenJet.pt()>60.0 && fGenJet.pt()<120.0) {
1277  if(goodVertices.size()>30) mpTScale_a_nvtx_30_inf->Fill( PtPF/PtGen);
1278  }
1279  if(fGenJet.pt()>200.0 && fGenJet.pt()<300.0) {
1280  if(goodVertices.size()>30) mpTScale_b_nvtx_30_inf->Fill( PtPF/PtGen);
1281  }
1282  if(fGenJet.pt()>600.0 && fGenJet.pt()<900.0) {
1283  if(goodVertices.size()>30) mpTScale_c_nvtx_30_inf->Fill( PtPF/PtGen);
1284  }
1285 
1286  if(goodVertices.size()<=5) mpTScale_nvtx_0_5->Fill(log10(PtGen),PtPF/PtGen);
1287  if(goodVertices.size()>5 && goodVertices.size()<=10) mpTScale_nvtx_5_10->Fill(log10(PtGen),PtPF/PtGen);
1288  if(goodVertices.size()>10 && goodVertices.size()<=15) mpTScale_nvtx_10_15->Fill(log10(PtGen),PtPF/PtGen);
1289  if(goodVertices.size()>15 && goodVertices.size()<=20) mpTScale_nvtx_15_20->Fill(log10(PtGen), PtPF/PtGen);
1290  if(goodVertices.size()>20 && goodVertices.size()<=30) mpTScale_nvtx_20_30->Fill(log10(PtGen), PtPF/PtGen);
1291  if(goodVertices.size()>30) mpTScale_nvtx_30_inf->Fill(log10(PtGen), PtPF/PtGen);
1292 }
1293  if (fabs(fGenJet.eta())<1.3) {
1294  if(fGenJet.pt()>60.0 && fGenJet.pt()<120.0) mpTScale_a->Fill(PtPF/PtGen);
1295  if(fGenJet.pt()>200.0 && fGenJet.pt()<300.0) mpTScale_b->Fill(PtPF/PtGen);
1296  if(fGenJet.pt()>600.0 && fGenJet.pt()<900.0) mpTScale_c->Fill(PtPF/PtGen);
1297  }
1298  mpTScale_pT->Fill (log10(PtGen), PtPF/PtGen);
1299 }
MonitorElement * mPhiFineBin
Definition: PFJetTester.h:58
virtual void endJob()
Definition: PFJetTester.cc:541
MonitorElement * mChargedHadronEnergy_80
Definition: PFJetTester.h:163
void getManyByType(std::vector< Handle< PROD > > &results) const
Definition: Event.h:408
MonitorElement * mDeltaEta
Definition: PFJetTester.h:254
MonitorElement * mGenEta
Definition: PFJetTester.h:236
MonitorElement * mpTScale1DB_30_200
Definition: PFJetTester.h:283
MonitorElement * mNJets1
Definition: PFJetTester.h:154
int i
Definition: DBlmapReader.cc:9
MonitorElement * mpTScale1DF_30_200
Definition: PFJetTester.h:285
MonitorElement * mpTResponseE_d
Definition: PFJetTester.h:93
MonitorElement * mpTScale1DE_1500_3500
Definition: PFJetTester.h:293
MonitorElement * mpTScaleB_d
Definition: PFJetTester.h:266
MonitorElement * mpTScale_b_nvtx_20_30
Definition: PFJetTester.h:124
MonitorElement * mChargedEmEnergy_80
Definition: PFJetTester.h:162
MonitorElement * mpTScale_600_1500_d
Definition: PFJetTester.h:280
MonitorElement * mpTScale_c_nvtx_15_20
Definition: PFJetTester.h:122
MonitorElement * mpTScale_30_200_d
Definition: PFJetTester.h:278
MonitorElement * mpTResponse_600_1500_d
Definition: PFJetTester.h:97
MonitorElement * nvtx_0_60
Definition: PFJetTester.h:104
MonitorElement * nvtx_0_30
Definition: PFJetTester.h:103
MonitorElement * mGenPt
Definition: PFJetTester.h:238
MonitorElement * mpTResponse_30_200_d
Definition: PFJetTester.h:95
edm::InputTag mInputCollection
Definition: PFJetTester.h:37
MonitorElement * mpTScale_nvtx_20_30
Definition: PFJetTester.h:133
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
MonitorElement * mpTScale_200_600_d
Definition: PFJetTester.h:279
MonitorElement * mNeutralEmEnergy_80
Definition: PFJetTester.h:164
MonitorElement * mpTScale1DF_600_1500
Definition: PFJetTester.h:291
MonitorElement * mpTScale1DE_200_600
Definition: PFJetTester.h:287
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
MonitorElement * mChargedEmEnergyFraction_E
Definition: PFJetTester.h:173
MonitorElement * mP
Definition: PFJetTester.h:62
Base class for all types of Jets.
Definition: Jet.h:21
MonitorElement * mpTResponse_1500_3500_d
Definition: PFJetTester.h:98
MonitorElement * mChargedEmEnergy_3000
Definition: PFJetTester.h:167
PFJetTester(const edm::ParameterSet &)
Definition: PFJetTester.cc:49
MonitorElement * mpTScale_a_nvtx_15_20
Definition: PFJetTester.h:120
MonitorElement * mNJetsEtaC
Definition: PFJetTester.h:151
MonitorElement * numberofevents
Definition: PFJetTester.h:46
Definition: DDAxes.h:10
MonitorElement * mpTScale_a
Definition: PFJetTester.h:136
MonitorElement * mpTScaleE_d
Definition: PFJetTester.h:267
std::vector< CaloTower >::const_iterator const_iterator
MonitorElement * mEmEnergyInHF
Definition: PFJetTester.h:201
MonitorElement * mConstituents
Definition: PFJetTester.h:71
MonitorElement * mNeutralHadronEnergy_80
Definition: PFJetTester.h:165
MonitorElement * mCorrJetPt_80
Definition: PFJetTester.h:79
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:445
MonitorElement * mpTScale_b_nvtx_15_20
Definition: PFJetTester.h:121
MonitorElement * mPthat_3000
Definition: PFJetTester.h:233
MonitorElement * mpTRatio_200_600_d
Definition: PFJetTester.h:88
MonitorElement * mMjj_3000
Definition: PFJetTester.h:159
MonitorElement * mpTRatio_600_1500_d
Definition: PFJetTester.h:89
MonitorElement * mNeutralHadronEnergyFraction_F
Definition: PFJetTester.h:183
int njet
Definition: HydjetWrapper.h:91
bool isRealData() const
Definition: EventBase.h:60
MonitorElement * mpTScale_a_nvtx_0_5
Definition: PFJetTester.h:111
MonitorElement * mPtFirst_80
Definition: PFJetTester.h:148
Jets made from PFObjects.
Definition: PFJet.h:22
MonitorElement * mpTScale_pT
Definition: PFJetTester.h:139
virtual double eta() const
momentum pseudorapidity
double double double z
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
MonitorElement * mNJets2
Definition: PFJetTester.h:155
MonitorElement * mPt_80
Definition: PFJetTester.h:66
MonitorElement * mpTScale1DF_1500_3500
Definition: PFJetTester.h:294
MonitorElement * mpTScale1DB_200_600
Definition: PFJetTester.h:286
MonitorElement * mpTRatioE_d
Definition: PFJetTester.h:85
void Fill(long long x)
MonitorElement * mpTResponse_nvtx_5_10
Definition: PFJetTester.h:106
MonitorElement * mpTResponse_nvtx_20_30
Definition: PFJetTester.h:109
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
std::string mOutputFile
Definition: PFJetTester.h:39
MonitorElement * mNeutralEmEnergyFraction_E
Definition: PFJetTester.h:179
MonitorElement * mpTScale_b_nvtx_5_10
Definition: PFJetTester.h:115
MonitorElement * mpTRatioF_d
Definition: PFJetTester.h:86
MonitorElement * mpTScale_nvtx_30_inf
Definition: PFJetTester.h:134
MonitorElement * mpTResponse_nvtx_30_inf
Definition: PFJetTester.h:110
MonitorElement * mpTScale_nvtx_15_20
Definition: PFJetTester.h:132
virtual double energy() const
energy
MonitorElement * mpTResponse_nvtx_15_20
Definition: PFJetTester.h:108
MonitorElement * mpTScale1DB_1500_3500
Definition: PFJetTester.h:292
MonitorElement * mpTScalePhiB_d
Definition: PFJetTester.h:269
MonitorElement * mpTScale_c_nvtx_30_inf
Definition: PFJetTester.h:128
MonitorElement * mPtFirst
Definition: PFJetTester.h:147
MonitorElement * mpTScale_b_nvtx_30_inf
Definition: PFJetTester.h:127
MonitorElement * mNJetsEtaF_30
Definition: PFJetTester.h:135
MonitorElement * mNeutralHadronEnergyFraction_E
Definition: PFJetTester.h:182
MonitorElement * mPtFirst_3000
Definition: PFJetTester.h:149
MonitorElement * mMass_80
Definition: PFJetTester.h:69
double mRThreshold
Definition: PFJetTester.h:308
MonitorElement * mMjj
Definition: PFJetTester.h:158
MonitorElement * mpTScale_a_nvtx_10_15
Definition: PFJetTester.h:117
MonitorElement * mP_80
Definition: PFJetTester.h:63
MonitorElement * mDelEta
Definition: PFJetTester.h:300
MonitorElement * mCorrJetPhi
Definition: PFJetTester.h:82
MonitorElement * mpTScale_b_nvtx_0_5
Definition: PFJetTester.h:112
MonitorElement * mEScale_pt10
Definition: PFJetTester.h:260
MonitorElement * mEmTiming
Definition: PFJetTester.h:75
MonitorElement * mEtaFirst
Definition: PFJetTester.h:142
MonitorElement * mE
Definition: PFJetTester.h:59
MonitorElement * mpTScale1DE_600_1500
Definition: PFJetTester.h:290
int j
Definition: DBlmapReader.cc:9
void fillMatchHists(const reco::GenJet &fGenJet, const reco::PFJet &fPFJet, std::vector< reco::Vertex > goodVertices)
MonitorElement * mMass
Definition: PFJetTester.h:68
MonitorElement * mpTScale_b
Definition: PFJetTester.h:137
MonitorElement * mNeutralEmEnergy_3000
Definition: PFJetTester.h:169
std::string JetCorrectionService
Definition: PFJetTester.h:310
Jets made from MC generator particles.
Definition: GenJet.h:25
MonitorElement * mPhi
Definition: PFJetTester.h:57
MonitorElement * mpTScaleF_d
Definition: PFJetTester.h:268
MonitorElement * mpTRatioB_d
Definition: PFJetTester.h:84
MonitorElement * mpTScale_c_nvtx_10_15
Definition: PFJetTester.h:119
MonitorElement * mChargedEmEnergyFraction_B
Definition: PFJetTester.h:172
MonitorElement * mPt
Definition: PFJetTester.h:65
MonitorElement * mpTScale_c
Definition: PFJetTester.h:138
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:1031
MonitorElement * mpTScale1DE_30_200
Definition: PFJetTester.h:284
MonitorElement * mDelPt
Definition: PFJetTester.h:302
tuple goodVertices
The Good vertices collection needed by the tracking failure filter ________||.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: PFJetTester.cc:546
double mMatchGenPtThreshold
Definition: PFJetTester.h:305
MonitorElement * mConstituents_80
Definition: PFJetTester.h:72
MonitorElement * mHadEnergyInHF_80
Definition: PFJetTester.h:190
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * mpTScale_b_nvtx_10_15
Definition: PFJetTester.h:118
MonitorElement * mNeutralEmEnergyFraction_B
Definition: PFJetTester.h:178
MonitorElement * mHadEnergyInHF
Definition: PFJetTester.h:189
MonitorElement * mGenPhi
Definition: PFJetTester.h:237
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
MonitorElement * mGenPt_80
Definition: PFJetTester.h:239
MonitorElement * mpTScale_a_nvtx_5_10
Definition: PFJetTester.h:114
MonitorElement * mCorrJetEta
Definition: PFJetTester.h:81
MonitorElement * mChargedHadronEnergyFraction_F
Definition: PFJetTester.h:177
virtual void beginJob()
Definition: PFJetTester.cc:538
MonitorElement * mEta
Definition: PFJetTester.h:49
MonitorElement * mGenEtaFirst
Definition: PFJetTester.h:243
MonitorElement * mpTRatio_30_200_d
Definition: PFJetTester.h:87
MonitorElement * mChargedHadronEnergyFraction_E
Definition: PFJetTester.h:176
virtual double pt() const
transverse momentum
edm::InputTag mInputGenCollection
Definition: PFJetTester.h:38
MonitorElement * mCorrJetPt
Definition: PFJetTester.h:78
MonitorElement * mpTScale_1500_3500_d
Definition: PFJetTester.h:281
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:51
MonitorElement * mpTScale1DF_200_600
Definition: PFJetTester.h:288
MonitorElement * mpTScale_c_nvtx_20_30
Definition: PFJetTester.h:125
MonitorElement * mpTScale_nvtx_5_10
Definition: PFJetTester.h:130
MonitorElement * mpTScale_c_nvtx_0_5
Definition: PFJetTester.h:113
MonitorElement * mNeutralHadronEnergy_3000
Definition: PFJetTester.h:170
MonitorElement * mpTScale_nvtx_10_15
Definition: PFJetTester.h:131
std::string const & label() const
Definition: InputTag.h:25
MonitorElement * mpTResponse_nvtx_10_15
Definition: PFJetTester.h:107
MonitorElement * mpTResponse_200_600_d
Definition: PFJetTester.h:96
MonitorElement * mNeutralHadronEnergyFraction_B
Definition: PFJetTester.h:181
MonitorElement * mEmEnergyInHF_3000
Definition: PFJetTester.h:203
MonitorElement * mpTRatio_1500_3500_d
Definition: PFJetTester.h:90
MonitorElement * mEScaleFineBin
Definition: PFJetTester.h:261
MonitorElement * mpTScale_c_nvtx_5_10
Definition: PFJetTester.h:116
MonitorElement * mpTResponse_30_d
Definition: PFJetTester.h:99
MonitorElement * mpTScale_a_nvtx_30_inf
Definition: PFJetTester.h:126
tuple mass
Definition: scaleCards.py:27
MonitorElement * mDelPhi
Definition: PFJetTester.h:301
MonitorElement * mpTResponseF_d
Definition: PFJetTester.h:94
MonitorElement * mHadTiming
Definition: PFJetTester.h:74
MonitorElement * mChargedHadronEnergy_3000
Definition: PFJetTester.h:168
MonitorElement * mpTResponse
Definition: PFJetTester.h:91
MonitorElement * mE_80
Definition: PFJetTester.h:60
MonitorElement * mpTResponseB_d
Definition: PFJetTester.h:92
std::string mTurnOnEverything
Definition: PFJetTester.h:313
MonitorElement * mHadEnergyInHF_3000
Definition: PFJetTester.h:191
MonitorElement * mEtaFineBin
Definition: PFJetTester.h:50
MonitorElement * mPhiFirst
Definition: PFJetTester.h:143
MonitorElement * mNeutralEmEnergyFraction_F
Definition: PFJetTester.h:180
MonitorElement * mpTRatio
Definition: PFJetTester.h:83
MonitorElement * mpTScale1DB_600_1500
Definition: PFJetTester.h:289
MonitorElement * mpTResponse_nvtx_0_5
Definition: PFJetTester.h:105
MonitorElement * mGenPhiFirst
Definition: PFJetTester.h:244
tuple pfJets
Definition: pfJets_cff.py:8
virtual double phi() const
momentum azimuthal angle
MonitorElement * mpTScale_nvtx_0_5
Definition: PFJetTester.h:129
MonitorElement * mpTScalePhiE_d
Definition: PFJetTester.h:270
MonitorElement * mjetArea
Definition: PFJetTester.h:100
MonitorElement * mChargedEmEnergyFraction_F
Definition: PFJetTester.h:174
MonitorElement * mpTScale_a_nvtx_20_30
Definition: PFJetTester.h:123
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
MonitorElement * mChargedHadronEnergyFraction_B
Definition: PFJetTester.h:175
MonitorElement * mDeltaPhi
Definition: PFJetTester.h:255
MonitorElement * mPthat_80
Definition: PFJetTester.h:232
MonitorElement * mEmEnergyInHF_80
Definition: PFJetTester.h:202
MonitorElement * mNJetsEtaF
Definition: PFJetTester.h:152
MonitorElement * mpTScalePhiF_d
Definition: PFJetTester.h:271