CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ElectronMcSignalValidator.cc
Go to the documentation of this file.
1 
2 // user include files
4 
6 
8 
18 
21 
24 
31 
37 
38 #include "CLHEP/Units/GlobalPhysicalConstants.h"
39 #include "TMath.h"
40 #include "TFile.h"
41 #include "TH1F.h"
42 #include "TH1I.h"
43 #include "TH2F.h"
44 #include "TProfile.h"
45 #include "TTree.h"
46 #include <vector>
47 #include <iostream>
48 #include <typeinfo>
49 
50 using namespace reco;
51 
53  mcTruthCollection_ = consumes<reco::GenParticleCollection>(conf.getParameter<edm::InputTag>("mcTruthCollection"));
54  electronCollection_ = consumes<reco::GsfElectronCollection>(conf.getParameter<edm::InputTag>("electronCollection"));
56  consumes<reco::GsfElectronCollection>(conf.getParameter<edm::InputTag>("electronCollectionEndcaps"));
58  consumes<reco::GsfElectronCoreCollection>(conf.getParameter<edm::InputTag>("electronCoreCollection"));
60  consumes<reco::GsfTrackCollection>(conf.getParameter<edm::InputTag>("electronTrackCollection"));
62  consumes<reco::ElectronSeedCollection>(conf.getParameter<edm::InputTag>("electronSeedCollection"));
64  consumes<reco::VertexCollection>(conf.getParameter<edm::InputTag>("offlinePrimaryVertices"));
65  beamSpotTag_ = consumes<reco::BeamSpot>(conf.getParameter<edm::InputTag>("beamSpot"));
66 
67  readAOD_ = conf.getParameter<bool>("readAOD");
68 
69  isoFromDepsTk03Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsTk03"));
70  isoFromDepsTk04Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsTk04"));
72  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalFull03"));
74  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalFull04"));
76  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalReduced03"));
78  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalReduced04"));
79  isoFromDepsHcal03Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsHcal03"));
80  isoFromDepsHcal04Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsHcal04"));
81 
82  maxPt_ = conf.getParameter<double>("MaxPt");
83  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
84  deltaR2_ = conf.getParameter<double>("DeltaR") * conf.getParameter<double>("DeltaR");
85  matchingIDs_ = conf.getParameter<std::vector<int> >("MatchingID");
86  matchingMotherIDs_ = conf.getParameter<std::vector<int> >("MatchingMotherID");
87  inputFile_ = conf.getParameter<std::string>("InputFile");
88  outputFile_ = conf.getParameter<std::string>("OutputFile");
89  inputInternalPath_ = conf.getParameter<std::string>("InputFolderName");
90  outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName");
91 
92  // histos bining and limits
93 
94  edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg");
95 
96  xyz_nbin = histosSet.getParameter<int>("Nbinxyz");
97 
98  p_nbin = histosSet.getParameter<int>("Nbinp");
99  p2D_nbin = histosSet.getParameter<int>("Nbinp2D");
100  p_max = histosSet.getParameter<double>("Pmax");
101 
102  pt_nbin = histosSet.getParameter<int>("Nbinpt");
103  pt2D_nbin = histosSet.getParameter<int>("Nbinpt2D");
104  pteff_nbin = histosSet.getParameter<int>("Nbinpteff");
105  pt_max = histosSet.getParameter<double>("Ptmax");
106 
107  fhits_nbin = histosSet.getParameter<int>("Nbinfhits");
108  fhits_max = histosSet.getParameter<double>("Fhitsmax");
109 
110  lhits_nbin = histosSet.getParameter<int>("Nbinlhits");
111  lhits_max = histosSet.getParameter<double>("Lhitsmax");
112 
113  eop_nbin = histosSet.getParameter<int>("Nbineop");
114  eop2D_nbin = histosSet.getParameter<int>("Nbineop2D");
115  eop_max = histosSet.getParameter<double>("Eopmax");
116  eopmaxsht = histosSet.getParameter<double>("Eopmaxsht");
117 
118  eta_nbin = histosSet.getParameter<int>("Nbineta");
119  eta2D_nbin = histosSet.getParameter<int>("Nbineta2D");
120  eta_min = histosSet.getParameter<double>("Etamin");
121  eta_max = histosSet.getParameter<double>("Etamax");
122 
123  deta_nbin = histosSet.getParameter<int>("Nbindeta");
124  deta_min = histosSet.getParameter<double>("Detamin");
125  deta_max = histosSet.getParameter<double>("Detamax");
126 
127  phi_nbin = histosSet.getParameter<int>("Nbinphi");
128  phi2D_nbin = histosSet.getParameter<int>("Nbinphi2D");
129  phi_min = histosSet.getParameter<double>("Phimin");
130  phi_max = histosSet.getParameter<double>("Phimax");
131 
132  detamatch_nbin = histosSet.getParameter<int>("Nbindetamatch");
133  detamatch2D_nbin = histosSet.getParameter<int>("Nbindetamatch2D");
134  detamatch_min = histosSet.getParameter<double>("Detamatchmin");
135  detamatch_max = histosSet.getParameter<double>("Detamatchmax");
136 
137  dphi_nbin = histosSet.getParameter<int>("Nbindphi");
138  dphi_min = histosSet.getParameter<double>("Dphimin");
139  dphi_max = histosSet.getParameter<double>("Dphimax");
140 
141  dphimatch_nbin = histosSet.getParameter<int>("Nbindphimatch");
142  dphimatch2D_nbin = histosSet.getParameter<int>("Nbindphimatch2D");
143  dphimatch_min = histosSet.getParameter<double>("Dphimatchmin");
144  dphimatch_max = histosSet.getParameter<double>("Dphimatchmax");
145 
146  poptrue_nbin = histosSet.getParameter<int>("Nbinpoptrue");
147  poptrue_min = histosSet.getParameter<double>("Poptruemin");
148  poptrue_max = histosSet.getParameter<double>("Poptruemax");
149 
150  mee_nbin = histosSet.getParameter<int>("Nbinmee");
151  mee_min = histosSet.getParameter<double>("Meemin");
152  mee_max = histosSet.getParameter<double>("Meemax");
153 
154  hoe_nbin = histosSet.getParameter<int>("Nbinhoe");
155  hoe_min = histosSet.getParameter<double>("Hoemin");
156  hoe_max = histosSet.getParameter<double>("Hoemax");
157 
158  error_nbin = histosSet.getParameter<int>("Nbinerror");
159  enerror_max = histosSet.getParameter<double>("Energyerrormax");
160 
161  set_EfficiencyFlag = histosSet.getParameter<bool>("EfficiencyFlag");
162  set_StatOverflowFlag = histosSet.getParameter<bool>("StatOverflowFlag");
163 
164  opv_nbin = histosSet.getParameter<int>("NbinOPV");
165  opv_min = histosSet.getParameter<double>("OPV_min");
166  opv_max = histosSet.getParameter<double>("OPV_max");
167 
168  ele_nbin = histosSet.getParameter<int>("NbinELE");
169  ele_min = histosSet.getParameter<double>("ELE_min");
170  ele_max = histosSet.getParameter<double>("ELE_max");
171 
172  core_nbin = histosSet.getParameter<int>("NbinCORE");
173  core_min = histosSet.getParameter<double>("CORE_min");
174  core_max = histosSet.getParameter<double>("CORE_max");
175 
176  track_nbin = histosSet.getParameter<int>("NbinTRACK");
177  track_min = histosSet.getParameter<double>("TRACK_min");
178  track_max = histosSet.getParameter<double>("TRACK_max");
179 
180  seed_nbin = histosSet.getParameter<int>("NbinSEED");
181  seed_min = histosSet.getParameter<double>("SEED_min");
182  seed_max = histosSet.getParameter<double>("SEED_max");
183 
184  // so to please coverity...
185  h1_mcNum = nullptr;
186  h1_eleNum = nullptr;
187  h1_gamNum = nullptr;
188 
189  h1_recEleNum = nullptr;
190  h1_recCoreNum = nullptr;
191  h1_recTrackNum = nullptr;
192  h1_recSeedNum = nullptr;
193  h1_recOfflineVertices = nullptr;
194 
195  h1_mc_Eta = nullptr;
196  h1_mc_AbsEta = nullptr;
197  h1_mc_P = nullptr;
198  h1_mc_Pt = nullptr;
199  h1_mc_Phi = nullptr;
200  h1_mc_Z = nullptr;
201  h2_mc_PtEta = nullptr;
202 
203  h1_mc_Eta_matched = nullptr;
204  h1_mc_AbsEta_matched = nullptr;
205  h1_mc_Pt_matched = nullptr;
206  h1_mc_Phi_matched = nullptr;
207  h1_mc_Z_matched = nullptr;
208  h2_mc_PtEta_matched = nullptr;
209 
210  h1_mc_Eta_matched_qmisid = nullptr;
211  h1_mc_AbsEta_matched_qmisid = nullptr;
212  h1_mc_Pt_matched_qmisid = nullptr;
213  h1_mc_Phi_matched_qmisid = nullptr;
214  h1_mc_Z_matched_qmisid = nullptr;
215 
216  h1_ele_EoverP_all = nullptr;
217  h1_ele_EoverP_all_barrel = nullptr;
218  h1_ele_EoverP_all_endcaps = nullptr;
219  h1_ele_EseedOP_all = nullptr;
220  h1_ele_EseedOP_all_barrel = nullptr;
221  h1_ele_EseedOP_all_endcaps = nullptr;
222  h1_ele_EoPout_all = nullptr;
223  h1_ele_EeleOPout_all = nullptr;
224  h1_ele_dEtaSc_propVtx_all = nullptr;
227  h1_ele_dPhiSc_propVtx_all = nullptr;
230  h1_ele_dEtaCl_propOut_all = nullptr;
233  h1_ele_dPhiCl_propOut_all = nullptr;
236  h1_ele_TIP_all = nullptr;
237  h1_ele_TIP_all_barrel = nullptr;
238  h1_ele_TIP_all_endcaps = nullptr;
239  h1_ele_HoE_all = nullptr;
240  h1_ele_HoE_all_barrel = nullptr;
241  h1_ele_HoE_all_endcaps = nullptr;
242  h1_ele_vertexEta_all = nullptr;
243  h1_ele_vertexPt_all = nullptr;
244  h1_ele_Et_all = nullptr;
245  h1_ele_mee_all = nullptr;
246  h1_ele_mee_os = nullptr;
247  h1_ele_mee_os_ebeb = nullptr;
248  h1_ele_mee_os_ebee = nullptr;
249  h1_ele_mee_os_eeee = nullptr;
250  h1_ele_mee_os_gg = nullptr;
251  h1_ele_mee_os_gb = nullptr;
252  h1_ele_mee_os_bb = nullptr;
253 
254  h2_ele_E2mnE1vsMee_all = nullptr;
255  h2_ele_E2mnE1vsMee_egeg_all = nullptr;
256 
257  h1_ele_charge = nullptr;
258  h2_ele_chargeVsEta = nullptr;
259  h2_ele_chargeVsPhi = nullptr;
260  h2_ele_chargeVsPt = nullptr;
261  h1_ele_vertexP = nullptr;
262  h1_ele_vertexPt = nullptr;
263  h1_ele_vertexPt_nocut = nullptr;
264  h1_ele_Et = nullptr;
265  h2_ele_vertexPtVsEta = nullptr;
266  h2_ele_vertexPtVsPhi = nullptr;
267  h1_ele_vertexPt_5100 = nullptr;
268  h1_ele_vertexEta = nullptr;
269  h2_ele_vertexEtaVsPhi = nullptr;
270  h1_ele_vertexAbsEta = nullptr;
271  h1_ele_vertexPhi = nullptr;
272  h1_ele_vertexX = nullptr;
273  h1_ele_vertexY = nullptr;
274  h1_ele_vertexZ = nullptr;
275  h1_ele_vertexTIP = nullptr;
276  h2_ele_vertexTIPVsEta = nullptr;
277  h2_ele_vertexTIPVsPhi = nullptr;
278  h2_ele_vertexTIPVsPt = nullptr;
279 
280  h1_scl_En = nullptr;
281  h1_scl_EoEtrue_barrel = nullptr;
282  h1_scl_EoEtrue_endcaps = nullptr;
285  h1_scl_EoEtrue_ebeegap = nullptr;
288  h1_scl_EoEtrue_barrel_new = nullptr;
289  h1_scl_EoEtrue_endcaps_new = nullptr;
292  h1_scl_EoEtrue_ebeegap_new = nullptr;
298  h1_scl_Et = nullptr;
299  h2_scl_EtVsEta = nullptr;
300  h2_scl_EtVsPhi = nullptr;
301  h2_scl_EtaVsPhi = nullptr;
302  h1_scl_Eta = nullptr;
303  h1_scl_Phi = nullptr;
304  h1_scl_ESFrac_endcaps = nullptr;
305 
306  h2_scl_EoEtruePfVsEg = nullptr;
307 
308  h1_scl_SigEtaEta = nullptr;
309  h1_scl_SigEtaEta_barrel = nullptr;
310  h1_scl_SigEtaEta_endcaps = nullptr;
311  h1_scl_SigIEtaIEta = nullptr;
312  h1_scl_SigIEtaIEta_barrel = nullptr;
313  h1_scl_SigIEtaIEta_endcaps = nullptr;
314  h1_scl_SigIEtaIEta_mAOD = nullptr;
320  h1_scl_E1x5 = nullptr;
321  h1_scl_E1x5_barrel = nullptr;
322  h1_scl_E1x5_endcaps = nullptr;
323  h1_scl_E2x5max = nullptr;
324  h1_scl_E2x5max_barrel = nullptr;
325  h1_scl_E2x5max_endcaps = nullptr;
326  h1_scl_E5x5 = nullptr;
327  h1_scl_E5x5_barrel = nullptr;
328  h1_scl_E5x5_endcaps = nullptr;
329  h1_scl_bcl_EtotoEtrue = nullptr;
332 
333  h1_ele_ambiguousTracks = nullptr;
334  h2_ele_ambiguousTracksVsEta = nullptr;
335  h2_ele_ambiguousTracksVsPhi = nullptr;
336  h2_ele_ambiguousTracksVsPt = nullptr;
337  h1_ele_foundHits = nullptr;
338  h1_ele_foundHits_barrel = nullptr;
339  h1_ele_foundHits_endcaps = nullptr;
340  h2_ele_foundHitsVsEta = nullptr;
341  h2_ele_foundHitsVsEta_mAOD = nullptr;
342  h2_ele_foundHitsVsPhi = nullptr;
343  h2_ele_foundHitsVsPt = nullptr;
344  h1_ele_lostHits = nullptr;
345  h1_ele_lostHits_barrel = nullptr;
346  h1_ele_lostHits_endcaps = nullptr;
347  h2_ele_lostHitsVsEta = nullptr;
348  h2_ele_lostHitsVsPhi = nullptr;
349  h2_ele_lostHitsVsPt = nullptr;
350  h1_ele_chi2 = nullptr;
351  h1_ele_chi2_barrel = nullptr;
352  h1_ele_chi2_endcaps = nullptr;
353  h2_ele_chi2VsEta = nullptr;
354  h2_ele_chi2VsPhi = nullptr;
355  h2_ele_chi2VsPt = nullptr;
356 
357  h1_ele_PoPtrue = nullptr;
358  h1_ele_PoPtrue_barrel = nullptr;
359  h1_ele_PoPtrue_endcaps = nullptr;
360 
361  h2_ele_PoPtrueVsEta = nullptr;
362  h2_ele_PoPtrueVsPhi = nullptr;
363  h2_ele_PoPtrueVsPt = nullptr;
364  h2_ele_sigmaIetaIetaVsPt = nullptr;
365 
370  h1_ele_PtoPttrue = nullptr;
371  h1_ele_PtoPttrue_barrel = nullptr;
372  h1_ele_PtoPttrue_endcaps = nullptr;
373  h1_ele_ChargeMnChargeTrue = nullptr;
374  h1_ele_EtaMnEtaTrue = nullptr;
375  h1_ele_EtaMnEtaTrue_barrel = nullptr;
376  h1_ele_EtaMnEtaTrue_endcaps = nullptr;
377  h2_ele_EtaMnEtaTrueVsEta = nullptr;
378  h2_ele_EtaMnEtaTrueVsPhi = nullptr;
379  h2_ele_EtaMnEtaTrueVsPt = nullptr;
380  h1_ele_PhiMnPhiTrue = nullptr;
381  h1_ele_PhiMnPhiTrue_barrel = nullptr;
382  h1_ele_PhiMnPhiTrue_endcaps = nullptr;
383  h1_ele_PhiMnPhiTrue2 = nullptr;
384  h2_ele_PhiMnPhiTrueVsEta = nullptr;
385  h2_ele_PhiMnPhiTrueVsPhi = nullptr;
386  h2_ele_PhiMnPhiTrueVsPt = nullptr;
387  h1_ele_PinMnPout = nullptr;
388  h1_ele_PinMnPout_mode = nullptr;
389  h2_ele_PinMnPoutVsEta_mode = nullptr;
390  h2_ele_PinMnPoutVsPhi_mode = nullptr;
391  h2_ele_PinMnPoutVsPt_mode = nullptr;
392  h2_ele_PinMnPoutVsE_mode = nullptr;
393  h2_ele_PinMnPoutVsChi2_mode = nullptr;
394 
395  h1_ele_outerP = nullptr;
396  h1_ele_outerP_mode = nullptr;
397  h2_ele_outerPVsEta_mode = nullptr;
398  h1_ele_outerPt = nullptr;
399  h1_ele_outerPt_mode = nullptr;
400  h2_ele_outerPtVsEta_mode = nullptr;
401  h2_ele_outerPtVsPhi_mode = nullptr;
402  h2_ele_outerPtVsPt_mode = nullptr;
403  h1_ele_EoP = nullptr;
404  h1_ele_EoP_barrel = nullptr;
405  h1_ele_EoP_endcaps = nullptr;
406  h2_ele_EoPVsEta = nullptr;
407  h2_ele_EoPVsPhi = nullptr;
408  h2_ele_EoPVsE = nullptr;
409  h1_ele_EseedOP = nullptr;
410  h1_ele_EseedOP_barrel = nullptr;
411  h1_ele_EseedOP_endcaps = nullptr;
412  h2_ele_EseedOPVsEta = nullptr;
413  h2_ele_EseedOPVsPhi = nullptr;
414  h2_ele_EseedOPVsE = nullptr;
415  h1_ele_EoPout = nullptr;
416  h1_ele_EoPout_barrel = nullptr;
417  h1_ele_EoPout_endcaps = nullptr;
418  h2_ele_EoPoutVsEta = nullptr;
419  h2_ele_EoPoutVsPhi = nullptr;
420  h2_ele_EoPoutVsE = nullptr;
421  h1_ele_EeleOPout = nullptr;
422  h1_ele_EeleOPout_barrel = nullptr;
423  h1_ele_EeleOPout_endcaps = nullptr;
424  h2_ele_EeleOPoutVsEta = nullptr;
425  h2_ele_EeleOPoutVsPhi = nullptr;
426  h2_ele_EeleOPoutVsE = nullptr;
427 
428  h1_ele_dEtaSc_propVtx = nullptr;
431  h1_ele_dEtaSc_propVtx_mAOD = nullptr;
434  h2_ele_dEtaScVsEta_propVtx = nullptr;
435  h2_ele_dEtaScVsPhi_propVtx = nullptr;
436  h2_ele_dEtaScVsPt_propVtx = nullptr;
437  h1_ele_dPhiSc_propVtx = nullptr;
440  h2_ele_dPhiScVsEta_propVtx = nullptr;
441  h2_ele_dPhiScVsPhi_propVtx = nullptr;
442  h2_ele_dPhiScVsPt_propVtx = nullptr;
443  h1_ele_dEtaCl_propOut = nullptr;
446  h2_ele_dEtaClVsEta_propOut = nullptr;
447  h2_ele_dEtaClVsPhi_propOut = nullptr;
448  h2_ele_dEtaClVsPt_propOut = nullptr;
449  h1_ele_dPhiCl_propOut = nullptr;
452  h1_ele_dPhiCl_propOut_mAOD = nullptr;
455  h2_ele_dPhiClVsEta_propOut = nullptr;
456  h2_ele_dPhiClVsPhi_propOut = nullptr;
457  h2_ele_dPhiClVsPt_propOut = nullptr;
458  h1_ele_dEtaEleCl_propOut = nullptr;
464  h1_ele_dPhiEleCl_propOut = nullptr;
470 
471  h1_ele_seed_subdet2 = nullptr;
472  h1_ele_seed_mask = nullptr;
473  h1_ele_seed_mask_bpix = nullptr;
474  h1_ele_seed_mask_fpix = nullptr;
475  h1_ele_seed_mask_tec = nullptr;
476  h1_ele_seed_dphi2 = nullptr;
477  h2_ele_seed_dphi2VsEta = nullptr;
478  h2_ele_seed_dphi2VsPt = nullptr;
479  h1_ele_seed_dphi2pos = nullptr;
480  h2_ele_seed_dphi2posVsEta = nullptr;
481  h2_ele_seed_dphi2posVsPt = nullptr;
482  h1_ele_seed_drz2 = nullptr;
483  h2_ele_seed_drz2VsEta = nullptr;
484  h2_ele_seed_drz2VsPt = nullptr;
485  h1_ele_seed_drz2pos = nullptr;
486  h2_ele_seed_drz2posVsEta = nullptr;
487  h2_ele_seed_drz2posVsPt = nullptr;
488 
489  h1_ele_classes = nullptr;
490  h1_ele_eta = nullptr;
491  h1_ele_eta_golden = nullptr;
492  h1_ele_eta_bbrem = nullptr;
493  h1_ele_eta_shower = nullptr;
494 
495  h1_ele_HoE = nullptr;
496  h1_ele_HoE_barrel = nullptr;
497  h1_ele_HoE_endcaps = nullptr;
498  h1_ele_HoE_fiducial = nullptr;
499  h2_ele_HoEVsEta = nullptr;
500  h2_ele_HoEVsPhi = nullptr;
501  h2_ele_HoEVsE = nullptr;
502  h1_ele_HoE_mAOD = nullptr;
503  h1_ele_HoE_mAOD_barrel = nullptr;
504  h1_ele_HoE_mAOD_endcaps = nullptr;
505 
506  h1_ele_fbrem = nullptr;
507  h1_ele_fbrem_barrel = nullptr;
508  h1_ele_fbrem_endcaps = nullptr;
509  p1_ele_fbremVsEta_mode = nullptr;
510  p1_ele_fbremVsEta_mean = nullptr;
511  h1_ele_fbrem_mAOD = nullptr;
512  h1_ele_fbrem_mAOD_barrel = nullptr;
513  h1_ele_fbrem_mAOD_endcaps = nullptr;
514  h1_ele_superclusterfbrem = nullptr;
515 
518  h2_ele_PinVsPoutGolden_mode = nullptr;
520  h2_ele_PinVsPoutGolden_mean = nullptr;
526  h1_scl_EoEtrueGolden_barrel = nullptr;
530 
531  h1_ele_mva = nullptr;
532  h1_ele_mva_isolated = nullptr;
533  h1_ele_provenance = nullptr;
534 
535  // isolation
536  h1_ele_tkSumPt_dr03 = nullptr;
537  h1_ele_tkSumPt_dr03_barrel = nullptr;
538  h1_ele_tkSumPt_dr03_endcaps = nullptr;
539  h1_ele_ecalRecHitSumEt_dr03 = nullptr;
546  h1_ele_tkSumPt_dr04 = nullptr;
547  h1_ele_tkSumPt_dr04_barrel = nullptr;
548  h1_ele_tkSumPt_dr04_endcaps = nullptr;
549  h1_ele_ecalRecHitSumEt_dr04 = nullptr;
556 
557  // conversions
558  h1_ele_convFlags = nullptr;
559  h1_ele_convFlags_all = nullptr;
560  h1_ele_convDist = nullptr;
561  h1_ele_convDist_all = nullptr;
562  h1_ele_convDcot = nullptr;
563  h1_ele_convDcot_all = nullptr;
564  h1_ele_convRadius = nullptr;
565  h1_ele_convRadius_all = nullptr;
566 
567  // PF
577 }
578 
581 
582  // prepareStore() ;
583  setBookIndex(-1);
584  setBookPrefix("h");
587 
588  // mc truth collections sizes
589  h1_mcNum = bookH1withSumw2(iBooker, "mcNum", "# mc particles", fhits_nbin, 0., fhits_max, "N_{gen}");
590  h1_eleNum = bookH1withSumw2(iBooker, "mcNum_ele", "# mc electrons", fhits_nbin, 0., fhits_max, "N_{gen ele}");
591  h1_gamNum = bookH1withSumw2(iBooker, "mcNum_gam", "# mc gammas", fhits_nbin, 0., fhits_max, "N_{gen #gamma}");
592 
593  // rec event collections sizes
594  h1_recEleNum = bookH1(iBooker, "recEleNum", "# rec electrons", ele_nbin, ele_min, ele_max, "N_{ele}");
595  h1_recCoreNum = bookH1(iBooker, "recCoreNum", "# rec electron cores", core_nbin, core_min, core_max, "N_{core}");
596  h1_recTrackNum = bookH1(iBooker, "recTrackNum", "# rec gsf tracks", track_nbin, track_min, track_max, "N_{track}");
597  h1_recSeedNum = bookH1(iBooker, "recSeedNum", "# rec electron seeds", seed_nbin, seed_min, seed_max, "N_{seed}");
599  iBooker, "recOfflineVertices", "# rec Offline Primary Vertices", opv_nbin, opv_min, opv_max, "N_{Vertices}");
600 
602  "scl_EoEtrueVsrecOfflineVertices",
603  "E/Etrue vs number of primary vertices",
604  opv_nbin, // 10,
605  opv_min, // 0.,
606  opv_max, // 50.,
607  50,
608  0.,
609  2.5,
610  "N_{primary vertices}",
611  "E/E_{true}");
613  "scl_EoEtrueVsrecOfflineVertices_barrel",
614  "E/Etrue vs number of primary , barrel",
615  opv_nbin, // 10,
616  opv_min, // 0.,
617  opv_max, // 50.,
618  50,
619  0.,
620  2.5,
621  "N_{primary vertices}",
622  "E/E_{true}");
624  "scl_EoEtrueVsrecOfflineVertices_endcaps",
625  "E/Etrue vs number of primary , endcaps",
626  opv_nbin, // 10,
627  opv_min, // 0.,
628  opv_max, // 50.,
629  50,
630  0.,
631  2.5,
632  "N_{primary vertices}",
633  "E/E_{true}");
634 
635  // mc
636  setBookPrefix("h_mc");
637  h1_mc_Eta = bookH1withSumw2(iBooker, "Eta", "gen #eta", eta_nbin, eta_min, eta_max, "#eta");
638  h1_mc_AbsEta = bookH1withSumw2(iBooker, "AbsEta", "gen |#eta|", eta_nbin / 2, 0., eta_max);
639  h1_mc_P = bookH1withSumw2(iBooker, "P", "gen p", p_nbin, 0., p_max, "p (GeV/c)");
640  h1_mc_Pt = bookH1withSumw2(iBooker, "Pt", "gen pt", pteff_nbin, 5., pt_max);
641  h1_mc_Phi = bookH1withSumw2(iBooker, "Phi", "gen phi", phi_nbin, phi_min, phi_max);
642  h1_mc_Z = bookH1withSumw2(iBooker, "Z", "gen z ", xyz_nbin, -25, 25);
643  h2_mc_PtEta =
644  bookH2withSumw2(iBooker, "PtEta", "gen pt vs #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
645 
646  // all electrons
647  setBookPrefix("h_ele");
649  "EoverP_all",
650  "ele E/P_{vertex}, all reco electrons",
651  eop_nbin,
652  0.,
653  eop_max,
654  "E/P_{vertex}",
655  "Events",
656  "ELE_LOGY E1 P");
658  "EoverP_all_barrel",
659  "ele E/P_{vertex}, all reco electrons, barrel",
660  eop_nbin,
661  0.,
662  eop_max,
663  "E/P_{vertex}",
664  "Events",
665  "ELE_LOGY E1 P");
667  "EoverP_all_endcaps",
668  "ele E/P_{vertex}, all reco electrons, endcaps",
669  eop_nbin,
670  0.,
671  eop_max,
672  "E/P_{vertex}",
673  "Events",
674  "ELE_LOGY E1 P");
676  "EseedOP_all",
677  "ele E_{seed}/P_{vertex}, all reco electrons",
678  eop_nbin,
679  0.,
680  eop_max,
681  "E_{seed}/P_{vertex}",
682  "Events",
683  "ELE_LOGY E1 P");
685  "EseedOP_all_barrel",
686  "ele E_{seed}/P_{vertex}, all reco electrons, barrel",
687  eop_nbin,
688  0.,
689  eop_max,
690  "E_{seed}/P_{vertex}",
691  "Events",
692  "ELE_LOGY E1 P");
694  "EseedOP_all_endcaps",
695  "ele E_{seed}/P_{vertex}, all reco electrons, endcaps",
696  eop_nbin,
697  0.,
698  eop_max,
699  "E_{seed}/P_{vertex}",
700  "Events",
701  "ELE_LOGY E1 P");
703  "EoPout_all",
704  "ele E_{seed}/P_{out}, all reco electrons",
705  eop_nbin,
706  0.,
707  eop_max,
708  "E_{seed}/P_{out}",
709  "Events",
710  "ELE_LOGY E1 P");
712  "EeleOPout_all",
713  "ele E_{ele}/P_{out}, all reco electrons",
714  eop_nbin,
715  0.,
716  eop_max,
717  "E_{ele}/P_{out}",
718  "Events",
719  "ELE_LOGY E1 P");
721  "dEtaSc_propVtx_all",
722  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
726  "#eta_{sc} - #eta_{tr}",
727  "Events",
728  "ELE_LOGY E1 P");
730  bookH1withSumw2(iBooker,
731  "dEtaSc_propVtx_all_barrel",
732  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons barrel",
736  "#eta_{sc} - #eta_{tr}",
737  "Events",
738  "ELE_LOGY E1 P");
740  bookH1withSumw2(iBooker,
741  "dEtaSc_propVtx_all_endcaps",
742  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons endcaps",
746  "#eta_{sc} - #eta_{tr}",
747  "Events",
748  "ELE_LOGY E1 P");
750  "dPhiSc_propVtx_all",
751  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
755  "#phi_{sc} - #phi_{tr} (rad)",
756  "Events",
757  "ELE_LOGY E1 P");
759  bookH1withSumw2(iBooker,
760  "dPhiSc_propVtx_all_barrel",
761  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons barrel",
765  "#phi_{sc} - #phi_{tr} (rad)",
766  "Events",
767  "ELE_LOGY E1 P");
769  bookH1withSumw2(iBooker,
770  "dPhiSc_propVtx_all_endcaps",
771  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons endcaps",
775  "#phi_{sc} - #phi_{tr} (rad)",
776  "Events",
777  "ELE_LOGY E1 P");
779  "dEtaCl_propOut_all",
780  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
784  "#eta_{sc} - #eta_{tr}",
785  "Events",
786  "ELE_LOGY E1 P");
788  bookH1withSumw2(iBooker,
789  "dEtaCl_propOut_all_barrel",
790  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons barrel",
794  "#eta_{sc} - #eta_{tr}",
795  "Events",
796  "ELE_LOGY E1 P");
798  bookH1withSumw2(iBooker,
799  "dEtaCl_propOut_all_endcaps",
800  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons endcaps",
804  "#eta_{sc} - #eta_{tr}",
805  "Events",
806  "ELE_LOGY E1 P");
808  "dPhiCl_propOut_all",
809  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
813  "#phi_{sc} - #phi_{tr} (rad)",
814  "Events",
815  "ELE_LOGY E1 P");
817  bookH1withSumw2(iBooker,
818  "dPhiCl_propOut_all_barrel",
819  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons barrel",
823  "#phi_{sc} - #phi_{tr} (rad)",
824  "Events",
825  "ELE_LOGY E1 P");
827  bookH1withSumw2(iBooker,
828  "dPhiCl_propOut_all_endcaps",
829  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons endcaps",
833  "#phi_{sc} - #phi_{tr} (rad)",
834  "Events",
835  "ELE_LOGY E1 P");
837  "HoE_all",
838  "ele hadronic energy / em energy, all reco electrons",
839  hoe_nbin,
840  hoe_min,
841  hoe_max,
842  "H/E",
843  "Events",
844  "ELE_LOGY E1 P");
846  "HoE_all_barrel",
847  "ele hadronic energy / em energy, all reco electrons barrel",
848  hoe_nbin,
849  hoe_min,
850  hoe_max,
851  "H/E",
852  "Events",
853  "ELE_LOGY E1 P");
855  "HoE_all_endcaps",
856  "ele hadronic energy / em energy, all reco electrons endcaps",
857  hoe_nbin,
858  hoe_min,
859  hoe_max,
860  "H/E",
861  "Events",
862  "ELE_LOGY E1 P");
864  "HoE_bc_all",
865  "ele hadronic energy / em energy, all reco electrons, behind cluster",
866  hoe_nbin,
867  hoe_min,
868  hoe_max,
869  "H/E",
870  "Events",
871  "ELE_LOGY E1 P");
873  bookH1withSumw2(iBooker, "vertexPt_all", "ele p_{T}, all reco electrons", pteff_nbin, 5., pt_max, "", "Events");
874  h1_ele_Et_all = bookH1withSumw2(iBooker,
875  "Et_all",
876  "ele ecal E_{T}, all reco electrons",
877  pteff_nbin,
878  5.,
879  pt_max,
880  "E_{T} (GeV)",
881  "Events",
882  "ELE_LOGY E1 P");
884  iBooker, "vertexEta_all", "ele eta, all reco electrons", eta_nbin, eta_min, eta_max, "", "Events");
886  "TIP_all",
887  "ele vertex transverse radius, all reco electrons",
888  100,
889  0.,
890  0.2,
891  "r_{T} (cm)",
892  "Events",
893  "ELE_LOGY E1 P");
895  "TIP_all_barrel",
896  "ele vertex transverse radius, all reco electrons barrel",
897  100,
898  0.,
899  0.2,
900  "r_{T} (cm)",
901  "Events",
902  "ELE_LOGY E1 P");
904  "TIP_all_endcaps",
905  "ele vertex transverse radius, all reco electrons endcaps",
906  100,
907  0.,
908  0.2,
909  "r_{T} (cm)",
910  "Events",
911  "ELE_LOGY E1 P");
913  "mee_all",
914  "ele pairs invariant mass, all reco electrons",
915  mee_nbin,
916  mee_min,
917  mee_max,
918  "m_{ee} (GeV/c^{2})",
919  "Events",
920  "ELE_LOGY E1 P");
921  h1_ele_mee_os = bookH1withSumw2(iBooker,
922  "mee_os",
923  "ele pairs invariant mass, opp. sign",
924  mee_nbin,
925  mee_min,
926  mee_max,
927  "m_{e^{+}e^{-}} (GeV/c^{2})",
928  "Events",
929  "ELE_LOGY E1 P");
931  "mee_os_ebeb",
932  "ele pairs invariant mass, opp. sign, EB-EB",
933  mee_nbin,
934  mee_min,
935  mee_max,
936  "m_{e^{+}e^{-}} (GeV/c^{2})",
937  "Events",
938  "ELE_LOGY E1 P");
940  "mee_os_ebee",
941  "ele pairs invariant mass, opp. sign, EB-EE",
942  mee_nbin,
943  mee_min,
944  mee_max,
945  "m_{e^{+}e^{-}} (GeV/c^{2})",
946  "Events",
947  "ELE_LOGY E1 P");
949  "mee_os_eeee",
950  "ele pairs invariant mass, opp. sign, EE-EE",
951  mee_nbin,
952  mee_min,
953  mee_max,
954  "m_{e^{+}e^{-}} (GeV/c^{2})",
955  "Events",
956  "ELE_LOGY E1 P");
958  "mee_os_gg",
959  "ele pairs invariant mass, opp. sign, good-good",
960  mee_nbin,
961  mee_min,
962  mee_max,
963  "m_{e^{+}e^{-}} (GeV/c^{2})",
964  "Events",
965  "ELE_LOGY E1 P");
967  "mee_os_gb",
968  "ele pairs invariant mass, opp. sign, good-bad",
969  mee_nbin,
970  mee_min,
971  mee_max,
972  "m_{e^{+}e^{-}} (GeV/c^{2})",
973  "Events",
974  "ELE_LOGY E1 P");
976  "mee_os_bb",
977  "ele pairs invariant mass, opp. sign, bad-bad",
978  mee_nbin,
979  mee_min,
980  mee_max,
981  "m_{e^{+}e^{-}} (GeV/c^{2})",
982  "Events",
983  "ELE_LOGY E1 P");
984 
985  // duplicates
986  h2_ele_E2mnE1vsMee_all = bookH2(iBooker,
987  "E2mnE1vsMee_all",
988  "E2 - E1 vs ele pairs invariant mass, all electrons",
989  mee_nbin,
990  mee_min,
991  mee_max,
992  100,
993  -50.,
994  50.,
995  "m_{e^{+}e^{-}} (GeV/c^{2})",
996  "E2 - E1 (GeV)");
998  "E2mnE1vsMee_egeg_all",
999  "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
1000  mee_nbin,
1001  mee_min,
1002  mee_max,
1003  100,
1004  -50.,
1005  50.,
1006  "m_{e^{+}e^{-}} (GeV/c^{2})",
1007  "E2 - E1 (GeV)");
1008 
1009  // charge ID
1011  bookH1withSumw2(iBooker, "ChargeMnChargeTrue", "ele charge - gen charge ", 5, -1., 4., "q_{rec} - q_{gen}");
1012  setBookPrefix("h_mc");
1014  bookH1withSumw2(iBooker, "Eta_matched_qmisid", "charge misid vs gen eta", eta_nbin, eta_min, eta_max);
1016  bookH1withSumw2(iBooker, "AbsEta_matched_qmisid", "charge misid vs gen |eta|", eta_nbin / 2, 0., eta_max);
1018  bookH1withSumw2(iBooker, "Pt_matched_qmisid", "charge misid vs gen transverse momentum", pteff_nbin, 5., pt_max);
1020  bookH1withSumw2(iBooker, "Phi_matched_qmisid", "charge misid vs gen phi", phi_nbin, phi_min, phi_max);
1021  h1_mc_Z_matched_qmisid = bookH1withSumw2(iBooker, "Z_matched_qmisid", "charge misid vs gen z", xyz_nbin, -25, 25);
1022 
1023  // matched electrons
1024  setBookPrefix("h_mc");
1025  h1_mc_Eta_matched = bookH1withSumw2(iBooker, "Eta_matched", "Efficiency vs gen eta", eta_nbin, eta_min, eta_max);
1027  bookH1withSumw2(iBooker, "AbsEta_matched", "Efficiency vs gen |eta|", eta_nbin / 2, 0., eta_max);
1028  h1_mc_Pt_matched = bookH1(iBooker, "Pt_matched", "Efficiency vs gen transverse momentum", pteff_nbin, 5., pt_max);
1029  h1_mc_Phi_matched = bookH1withSumw2(iBooker, "Phi_matched", "Efficiency vs gen phi", phi_nbin, phi_min, phi_max);
1030  h1_mc_Z_matched = bookH1withSumw2(iBooker, "Z_matched", "Efficiency vs gen vertex z", xyz_nbin, -25, 25);
1032  iBooker, "PtEta_matched", "Efficiency vs pt #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
1033  setBookPrefix("h_ele");
1034  h1_ele_charge = bookH1withSumw2(iBooker, "charge", "ele charge", 5, -2.5, 2.5, "charge");
1035  h2_ele_chargeVsEta = bookH2(iBooker, "chargeVsEta", "ele charge vs eta", eta2D_nbin, eta_min, eta_max, 5, -2., 2.);
1036  h2_ele_chargeVsPhi = bookH2(iBooker, "chargeVsPhi", "ele charge vs phi", phi2D_nbin, phi_min, phi_max, 5, -2., 2.);
1037  h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt", "ele charge vs pt", pt_nbin, 0., 100., 5, -2., 2.);
1038  h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP", "ele momentum", p_nbin, 0., p_max, "p_{vertex} (GeV/c)");
1039  h1_ele_vertexPt =
1040  bookH1withSumw2(iBooker, "vertexPt", "ele transverse momentum", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1042  iBooker, "vertexPt_nocut", "pT of prunned electrons", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1043  h1_ele_Et = bookH1withSumw2(iBooker, "Et", "ele ecal E_{T}", pt_nbin, 0., pt_max, "E_{T} (GeV)");
1045  iBooker, "vertexPtVsEta", "ele transverse momentum vs eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 0., pt_max);
1047  iBooker, "vertexPtVsPhi", "ele transverse momentum vs phi", phi2D_nbin, phi_min, phi_max, pt2D_nbin, 0., pt_max);
1048  h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta", "ele momentum eta", eta_nbin, eta_min, eta_max, "#eta");
1050  iBooker, "vertexEtaVsPhi", "ele momentum eta vs phi", eta2D_nbin, eta_min, eta_max, phi2D_nbin, phi_min, phi_max);
1052  bookH1withSumw2(iBooker, "vertexPhi", "ele momentum #phi", phi_nbin, phi_min, phi_max, "#phi (rad)");
1053  h1_ele_vertexX = bookH1withSumw2(iBooker, "vertexX", "ele vertex x", xyz_nbin, -0.6, 0.6, "x (cm)");
1054  h1_ele_vertexY = bookH1withSumw2(iBooker, "vertexY", "ele vertex y", xyz_nbin, -0.6, 0.6, "y (cm)");
1055  h1_ele_vertexZ = bookH1withSumw2(iBooker, "vertexZ", "ele vertex z", xyz_nbin, -25, 25, "z (cm)");
1057  bookH1withSumw2(iBooker, "vertexTIP", "ele transverse impact parameter (wrt gen vtx)", 90, 0., 0.15, "TIP (cm)");
1058  h2_ele_vertexTIPVsEta = bookH2(iBooker,
1059  "vertexTIPVsEta",
1060  "ele transverse impact parameter (wrt gen vtx) vs eta",
1061  eta2D_nbin,
1062  eta_min,
1063  eta_max,
1064  45,
1065  0.,
1066  0.15,
1067  "#eta",
1068  "TIP (cm)");
1069  h2_ele_vertexTIPVsPhi = bookH2(iBooker,
1070  "vertexTIPVsPhi",
1071  "ele transverse impact parameter (wrt gen vtx) vs phi",
1072  phi2D_nbin,
1073  phi_min,
1074  phi_max,
1075  45,
1076  0.,
1077  0.15,
1078  "#phi (rad)",
1079  "TIP (cm)");
1080  h2_ele_vertexTIPVsPt = bookH2(iBooker,
1081  "vertexTIPVsPt",
1082  "ele transverse impact parameter (wrt gen vtx) vs transverse momentum",
1083  pt2D_nbin,
1084  0.,
1085  pt_max,
1086  45,
1087  0.,
1088  0.15,
1089  "p_{T} (GeV/c)",
1090  "TIP (cm)");
1092  iBooker, "PoPtrue", "ele momentum / gen momentum", poptrue_nbin, poptrue_min, poptrue_max, "P/P_{gen}");
1094  "PoPtrue_barrel",
1095  "ele momentum / gen momentum, barrel",
1096  poptrue_nbin,
1097  poptrue_min,
1098  poptrue_max,
1099  "P/P_{gen}");
1101  "PoPtrue_endcaps",
1102  "ele momentum / gen momentum, endcaps",
1103  poptrue_nbin,
1104  poptrue_min,
1105  poptrue_max,
1106  "P/P_{gen}");
1108  "PoPtrueVsEta",
1109  "ele momentum / gen momentum vs eta",
1110  eta2D_nbin,
1111  eta_min,
1112  eta_max,
1113  50,
1114  poptrue_min,
1115  poptrue_max);
1116  h2_ele_PoPtrueVsPhi = bookH2(iBooker,
1117  "PoPtrueVsPhi",
1118  "ele momentum / gen momentum vs phi",
1119  phi2D_nbin,
1120  phi_min,
1121  phi_max,
1122  50,
1123  poptrue_min,
1124  poptrue_max);
1126  iBooker, "PoPtrueVsPt", "ele momentum / gen momentum vs eta", pt2D_nbin, 0., pt_max, 50, poptrue_min, poptrue_max);
1128  bookH2(iBooker, "sigmaIetaIetaVsPt", "SigmaIetaIeta vs pt", 100, 0., pt_max, 100, 0., 0.05);
1130  "PoPtrue_golden_barrel",
1131  "ele momentum / gen momentum, golden, barrel",
1132  poptrue_nbin,
1133  poptrue_min,
1134  poptrue_max,
1135  "P/P_{gen}");
1137  "PoPtrue_golden_endcaps",
1138  "ele momentum / gen momentum, golden, endcaps",
1139  poptrue_nbin,
1140  poptrue_min,
1141  poptrue_max,
1142  "P/P_{gen}");
1144  "PoPtrue_showering_barrel",
1145  "ele momentum / gen momentum, showering, barrel",
1146  poptrue_nbin,
1147  poptrue_min,
1148  poptrue_max,
1149  "P/P_{gen}");
1151  "PoPtrue_showering_endcaps",
1152  "ele momentum / gen momentum, showering, endcaps",
1153  poptrue_nbin,
1154  poptrue_min,
1155  poptrue_max,
1156  "P/P_{gen}");
1158  "PtoPttrue",
1159  "ele transverse momentum / gen transverse momentum",
1160  poptrue_nbin,
1161  poptrue_min,
1162  poptrue_max,
1163  "P_{T}/P_{T}^{gen}");
1165  "PtoPttrue_barrel",
1166  "ele transverse momentum / gen transverse momentum, barrel",
1167  poptrue_nbin,
1168  poptrue_min,
1169  poptrue_max,
1170  "P_{T}/P_{T}^{gen}");
1172  "PtoPttrue_endcaps",
1173  "ele transverse momentum / gen transverse momentum, endcaps",
1174  poptrue_nbin,
1175  poptrue_min,
1176  poptrue_max,
1177  "P_{T}/P_{T}^{gen}");
1179  iBooker, "EtaMnEtaTrue", "ele momentum eta - gen eta", deta_nbin, deta_min, deta_max, "#eta_{rec} - #eta_{gen}");
1181  "EtaMnEtaTrue_barrel",
1182  "ele momentum eta - gen eta barrel",
1183  deta_nbin,
1184  deta_min,
1185  deta_max,
1186  "#eta_{rec} - #eta_{gen}");
1188  "EtaMnEtaTrue_endcaps",
1189  "ele momentum eta - gen eta endcaps",
1190  deta_nbin,
1191  deta_min,
1192  deta_max,
1193  "#eta_{rec} - #eta_{gen}");
1194  h2_ele_EtaMnEtaTrueVsEta = bookH2(iBooker,
1195  "EtaMnEtaTrueVsEta",
1196  "ele momentum eta - gen eta vs eta",
1197  eta2D_nbin,
1198  eta_min,
1199  eta_max,
1200  deta_nbin / 2,
1201  deta_min,
1202  deta_max);
1203  h2_ele_EtaMnEtaTrueVsPhi = bookH2(iBooker,
1204  "EtaMnEtaTrueVsPhi",
1205  "ele momentum eta - gen eta vs phi",
1206  phi2D_nbin,
1207  phi_min,
1208  phi_max,
1209  deta_nbin / 2,
1210  deta_min,
1211  deta_max);
1212  h2_ele_EtaMnEtaTrueVsPt = bookH2(iBooker,
1213  "EtaMnEtaTrueVsPt",
1214  "ele momentum eta - gen eta vs pt",
1215  pt_nbin,
1216  0.,
1217  pt_max,
1218  deta_nbin / 2,
1219  deta_min,
1220  deta_max);
1222  "PhiMnPhiTrue",
1223  "ele momentum phi - gen phi",
1224  dphi_nbin,
1225  dphi_min,
1226  dphi_max,
1227  "#phi_{rec} - #phi_{gen} (rad)");
1229  "PhiMnPhiTrue_barrel",
1230  "ele momentum phi - gen phi barrel",
1231  dphi_nbin,
1232  dphi_min,
1233  dphi_max,
1234  "#phi_{rec} - #phi_{gen} (rad)");
1236  "PhiMnPhiTrue_endcaps",
1237  "ele momentum phi - gen phi endcaps",
1238  dphi_nbin,
1239  dphi_min,
1240  dphi_max,
1241  "#phi_{rec} - #phi_{gen} (rad)");
1243  bookH1(iBooker, "PhiMnPhiTrue2", "ele momentum phi - gen phi", dphimatch2D_nbin, dphimatch_min, dphimatch_max);
1244  h2_ele_PhiMnPhiTrueVsEta = bookH2(iBooker,
1245  "PhiMnPhiTrueVsEta",
1246  "ele momentum phi - gen phi vs eta",
1247  eta2D_nbin,
1248  eta_min,
1249  eta_max,
1250  dphi_nbin / 2,
1251  dphi_min,
1252  dphi_max);
1253  h2_ele_PhiMnPhiTrueVsPhi = bookH2(iBooker,
1254  "PhiMnPhiTrueVsPhi",
1255  "ele momentum phi - gen phi vs phi",
1256  phi2D_nbin,
1257  phi_min,
1258  phi_max,
1259  dphi_nbin / 2,
1260  dphi_min,
1261  dphi_max);
1262  h2_ele_PhiMnPhiTrueVsPt = bookH2(iBooker,
1263  "PhiMnPhiTrueVsPt",
1264  "ele momentum phi - gen phi vs pt",
1265  pt2D_nbin,
1266  0.,
1267  pt_max,
1268  dphi_nbin / 2,
1269  dphi_min,
1270  dphi_max);
1272  iBooker, "ecalEnergyError", "Regression estimate of the ECAL energy error", error_nbin, 0, enerror_max);
1274  iBooker, "ecalEnergyError_barrel", "Regression estimate of the ECAL energy error - barrel", 30, 0, 30);
1276  "ecalEnergyError_endcaps",
1277  "Regression estimate of the ECAL energy error - endcaps",
1278  error_nbin,
1279  0,
1280  enerror_max);
1282  iBooker, "combinedP4Error", "Estimated error on the combined momentum", error_nbin, 0, enerror_max);
1284  iBooker, "combinedP4Error_barrel", "Estimated error on the combined momentum - barrel", 30, 0, 30);
1286  "combinedP4Error_endcaps",
1287  "Estimated error on the combined momentum - endcaps",
1288  error_nbin,
1289  0,
1290  enerror_max);
1291 
1292  // matched electron, superclusters
1293  setBookPrefix("h_scl");
1294  h1_scl_En = bookH1withSumw2(iBooker, "energy", "ele ecal energy", p_nbin, 0., p_max);
1296  bookH1withSumw2(iBooker, "EoEtrue_barrel", "ele ecal energy / gen energy, barrel", 50, 0.2, 1.2, "E/E_{gen}");
1298  iBooker, "EoEtrue_barrel_etagap", "ele ecal energy / gen energy, barrel, etagap", 50, 0.2, 1.2, "E/E_{gen}");
1300  iBooker, "EoEtrue_barrel_phigap", "ele ecal energy / gen energy, barrel, phigap", 50, 0.2, 1.2, "E/E_{gen}");
1302  bookH1withSumw2(iBooker, "EoEtrue_ebeegap", "ele ecal energy / gen energy, ebeegap", 50, 0.2, 1.2, "E/E_{gen}");
1304  bookH1withSumw2(iBooker, "EoEtrue_endcaps", "ele ecal energy / gen energy, endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1306  iBooker, "EoEtrue_endcaps_deegap", "ele ecal energy / gen energy, endcaps, deegap", 50, 0.2, 1.2, "E/E_{gen}");
1308  iBooker, "EoEtrue_endcaps_ringgap", "ele ecal energy / gen energy, endcaps, ringgap", 50, 0.2, 1.2, "E/E_{gen}");
1310  "EoEtrue_barrel_new",
1311  "ele ecal energy / gen energy, barrel",
1312  poptrue_nbin,
1313  poptrue_min,
1314  poptrue_max,
1315  "E/E_{gen}");
1317  "EoEtrue_barrel_new_etagap",
1318  "ele ecal energy / gen energy, barrel, etagap",
1319  poptrue_nbin,
1320  poptrue_min,
1321  poptrue_max,
1322  "E/E_{gen}");
1324  "EoEtrue_barrel_new_phigap",
1325  "ele ecal energy / gen energy, barrel, phigap",
1326  poptrue_nbin,
1327  poptrue_min,
1328  poptrue_max,
1329  "E/E_{gen}");
1331  "EoEtrue_ebeegap_new",
1332  "ele ecal energy / gen energy, ebeegap",
1333  poptrue_nbin,
1334  poptrue_min,
1335  poptrue_max,
1336  "E/E_{gen}");
1338  "EoEtrue_endcaps_new",
1339  "ele ecal energy / gen energy, endcaps",
1340  poptrue_nbin,
1341  poptrue_min,
1342  poptrue_max,
1343  "E/E_{gen}");
1345  "EoEtrue_endcaps_new_deegap",
1346  "ele ecal energy / gen energy, endcaps, deegap",
1347  poptrue_nbin,
1348  poptrue_min,
1349  poptrue_max,
1350  "E/E_{gen}");
1352  "EoEtrue_endcaps_new_ringgap",
1353  "ele ecal energy / gen energy, endcaps, ringgap",
1354  poptrue_nbin,
1355  poptrue_min,
1356  poptrue_max,
1357  "E/E_{gen}");
1358  h1_scl_Et = bookH1withSumw2(iBooker, "et", "ele supercluster transverse energy", pt_nbin, 0., pt_max);
1359  h2_scl_EtVsEta = bookH2(iBooker,
1360  "etVsEta",
1361  "ele supercluster transverse energy vs eta",
1362  eta2D_nbin,
1363  eta_min,
1364  eta_max,
1365  pt_nbin,
1366  0.,
1367  pt_max);
1368  h2_scl_EtVsPhi = bookH2(iBooker,
1369  "etVsPhi",
1370  "ele supercluster transverse energy vs phi",
1371  phi2D_nbin,
1372  phi_min,
1373  phi_max,
1374  pt_nbin,
1375  0.,
1376  pt_max);
1378  iBooker, "etaVsPhi", "ele supercluster eta vs phi", phi2D_nbin, phi_min, phi_max, eta2D_nbin, eta_min, eta_max);
1379  h1_scl_Eta = bookH1withSumw2(iBooker, "eta", "ele supercluster eta", eta_nbin, eta_min, eta_max);
1380  h1_scl_Phi = bookH1withSumw2(iBooker, "phi", "ele supercluster phi", phi_nbin, phi_min, phi_max);
1382  "sigetaeta",
1383  "ele supercluster sigma eta eta",
1384  100,
1385  0.,
1386  0.05,
1387  "#sigma_{#eta #eta}",
1388  "Events",
1389  "ELE_LOGY E1 P");
1391  "sigetaeta_barrel",
1392  "ele supercluster sigma eta eta barrel",
1393  100,
1394  0.,
1395  0.05,
1396  "#sigma_{#eta #eta}",
1397  "Events",
1398  "ELE_LOGY E1 P");
1400  "sigetaeta_endcaps",
1401  "ele supercluster sigma eta eta endcaps",
1402  100,
1403  0.,
1404  0.05,
1405  "#sigma_{#eta #eta}",
1406  "Events",
1407  "ELE_LOGY E1 P");
1409  "sigietaieta",
1410  "ele supercluster sigma ieta ieta",
1411  100,
1412  0.,
1413  0.05,
1414  "#sigma_{i#eta i#eta}",
1415  "Events",
1416  "ELE_LOGY E1 P");
1418  "sigietaieta_barrel",
1419  "ele supercluster sigma ieta ieta, barrel",
1420  100,
1421  0.,
1422  0.05,
1423  "#sigma_{i#eta i#eta}",
1424  "Events",
1425  "ELE_LOGY E1 P");
1427  "sigietaieta_endcaps",
1428  "ele supercluster sigma ieta ieta, endcaps",
1429  100,
1430  0.,
1431  0.05,
1432  "#sigma_{i#eta i#eta}",
1433  "Events",
1434  "ELE_LOGY E1 P");
1436  "SigIEtaIEta_mAOD",
1437  "ele supercluster sigma ieta ieta",
1438  100,
1439  0.,
1440  0.05,
1441  "#sigma_{i#eta i#eta}",
1442  "Events",
1443  "ELE_LOGY E1 P");
1445  "SigIEtaIEta_mAOD_barrel",
1446  "ele supercluster sigma ieta ieta, barrel",
1447  100,
1448  0.,
1449  0.05,
1450  "#sigma_{i#eta i#eta}",
1451  "Events",
1452  "ELE_LOGY E1 P");
1454  "SigIEtaIEta_mAOD_endcaps",
1455  "ele supercluster sigma ieta ieta, endcaps",
1456  100,
1457  0.,
1458  0.05,
1459  "#sigma_{i#eta i#eta}",
1460  "Events",
1461  "ELE_LOGY E1 P");
1463  "full5x5_sigietaieta",
1464  "ele supercluster full5x5 sigma ieta ieta",
1465  100,
1466  0.,
1467  0.05,
1468  "#sigma_{i#eta i#eta}",
1469  "Events",
1470  "ELE_LOGY E1 P");
1472  "full5x5_sigietaieta_barrel",
1473  "ele supercluster full5x5 sigma ieta ieta, barrel",
1474  100,
1475  0.,
1476  0.05,
1477  "#sigma_{i#eta i#eta}",
1478  "Events",
1479  "ELE_LOGY E1 P");
1481  "full5x5_sigietaieta_endcaps",
1482  "ele supercluster full5x5 sigma ieta ieta, endcaps",
1483  100,
1484  0.,
1485  0.05,
1486  "#sigma_{i#eta i#eta}",
1487  "Events",
1488  "ELE_LOGY E1 P");
1490  iBooker, "E1x5", "ele supercluster energy in 1x5", p_nbin, 0., p_max, "E1x5 (GeV)", "Events", "ELE_LOGY E1 P");
1492  "E1x5_barrel",
1493  "ele supercluster energy in 1x5 barrel",
1494  p_nbin,
1495  0.,
1496  p_max,
1497  "E1x5 (GeV)",
1498  "Events",
1499  "ELE_LOGY E1 P");
1501  "E1x5_endcaps",
1502  "ele supercluster energy in 1x5 endcaps",
1503  p_nbin,
1504  0.,
1505  p_max,
1506  "E1x5 (GeV)",
1507  "Events",
1508  "ELE_LOGY E1 P");
1509  h1_scl_E2x5max = bookH1withSumw2(iBooker,
1510  "E2x5max",
1511  "ele supercluster energy in 2x5 max",
1512  p_nbin,
1513  0.,
1514  p_max,
1515  "E2x5 (GeV)",
1516  "Events",
1517  "ELE_LOGY E1 P");
1519  "E2x5max_barrel",
1520  "ele supercluster energy in 2x5 _max barrel",
1521  p_nbin,
1522  0.,
1523  p_max,
1524  "E2x5 (GeV)",
1525  "Events",
1526  "ELE_LOGY E1 P");
1528  "E2x5max_endcaps",
1529  "ele supercluster energy in 2x5 _max endcaps",
1530  p_nbin,
1531  0.,
1532  p_max,
1533  "E2x5 (GeV)",
1534  "Events",
1535  "ELE_LOGY E1 P");
1537  iBooker, "E5x5", "ele supercluster energy in 5x5", p_nbin, 0., p_max, "E5x5 (GeV)", "Events", "ELE_LOGY E1 P");
1539  "E5x5_barrel",
1540  "ele supercluster energy in 5x5 barrel",
1541  p_nbin,
1542  0.,
1543  p_max,
1544  "E5x5 (GeV)",
1545  "Events",
1546  "ELE_LOGY E1 P");
1548  "E5x5_endcaps",
1549  "ele supercluster energy in 5x5 endcaps",
1550  p_nbin,
1551  0.,
1552  p_max,
1553  "E5x5 (GeV)",
1554  "Events",
1555  "ELE_LOGY E1 P");
1556  h2_scl_EoEtruePfVsEg = bookH2(iBooker,
1557  "EoEtruePfVsEg",
1558  "mean mustache SC/true energy vs final SC/true energy",
1559  75,
1560  -0.1,
1561  1.4,
1562  75,
1563  -0.1,
1564  1.4,
1565  "E_{final SC}/E_{gen}",
1566  "E_{mustache}/E_{gen}");
1568  bookH1withSumw2(iBooker, "bcl_EtotoEtrue", "Total basicclusters energy", 50, 0.2, 1.2, "E/E_{gen}");
1570  iBooker, "bcl_EtotoEtrue_barrel", "Total basicclusters energy , barrel", 50, 0.2, 1.2, "E/E_{gen}");
1572  iBooker, "bcl_EtotoEtrue_endcaps", "Total basicclusters energy , endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1574  "ESFrac_endcaps",
1575  "Preshower over SC raw energy , endcaps",
1576  100,
1577  0.,
1578  0.8,
1579  "E_{PS} / E^{raw}_{SC}",
1580  "Events",
1581  "ELE_LOGY E1 P");
1582 
1583  // matched electron, gsf tracks
1584  setBookPrefix("h_ele");
1586  "ambiguousTracks",
1587  "ele # ambiguous tracks",
1588  5,
1589  0.,
1590  5.,
1591  "N_{ambiguous tracks}",
1592  "Events",
1593  "ELE_LOGY E1 P");
1595  bookH2(iBooker, "ambiguousTracksVsEta", "ele # ambiguous tracks vs eta", eta2D_nbin, eta_min, eta_max, 5, 0., 5.);
1597  bookH2(iBooker, "ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", phi2D_nbin, phi_min, phi_max, 5, 0., 5.);
1599  bookH2(iBooker, "ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", pt2D_nbin, 0., pt_max, 5, 0., 5.);
1601  bookH1withSumw2(iBooker, "foundHits", "ele track # found hits", fhits_nbin, 0., fhits_max, "N_{hits}");
1603  iBooker, "foundHits_barrel", "ele track # found hits, barrel", fhits_nbin, 0., fhits_max, "N_{hits}");
1605  iBooker, "foundHits_endcaps", "ele track # found hits, endcaps", fhits_nbin, 0., fhits_max, "N_{hits}");
1606  h2_ele_foundHitsVsEta = bookH2(iBooker,
1607  "foundHitsVsEta",
1608  "ele track # found hits vs eta",
1609  eta2D_nbin,
1610  eta_min,
1611  eta_max,
1612  fhits_nbin,
1613  0.,
1614  fhits_max);
1616  "foundHitsVsEta_mAOD",
1617  "ele track # found hits vs eta",
1618  eta2D_nbin,
1619  eta_min,
1620  eta_max,
1621  fhits_nbin,
1622  0.,
1623  fhits_max);
1624  h2_ele_foundHitsVsPhi = bookH2(iBooker,
1625  "foundHitsVsPhi",
1626  "ele track # found hits vs phi",
1627  phi2D_nbin,
1628  phi_min,
1629  phi_max,
1630  fhits_nbin,
1631  0.,
1632  fhits_max);
1634  iBooker, "foundHitsVsPt", "ele track # found hits vs pt", pt2D_nbin, 0., pt_max, fhits_nbin, 0., fhits_max);
1635  h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits", "ele track # lost hits", 5, 0., 5., "N_{lost hits}");
1637  bookH1withSumw2(iBooker, "lostHits_barrel", "ele track # lost hits, barrel", 5, 0., 5., "N_{lost hits}");
1639  bookH1withSumw2(iBooker, "lostHits_endcaps", "ele track # lost hits, endcaps", 5, 0., 5., "N_{lost hits}");
1641  iBooker, "lostHitsVsEta", "ele track # lost hits vs eta", eta2D_nbin, eta_min, eta_max, lhits_nbin, 0., lhits_max);
1643  iBooker, "lostHitsVsPhi", "ele track # lost hits vs eta", phi2D_nbin, phi_min, phi_max, lhits_nbin, 0., lhits_max);
1645  bookH2(iBooker, "lostHitsVsPt", "ele track # lost hits vs eta", pt2D_nbin, 0., pt_max, lhits_nbin, 0., lhits_max);
1646  h1_ele_chi2 =
1647  bookH1withSumw2(iBooker, "chi2", "ele track #chi^{2}", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1649  iBooker, "chi2_barrel", "ele track #chi^{2}, barrel", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1651  iBooker, "chi2_endcaps", "ele track #chi^{2}, endcaps", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1653  bookH2(iBooker, "chi2VsEta", "ele track #chi^{2} vs eta", eta2D_nbin, eta_min, eta_max, 50, 0., 15.);
1655  bookH2(iBooker, "chi2VsPhi", "ele track #chi^{2} vs phi", phi2D_nbin, phi_min, phi_max, 50, 0., 15.);
1656  h2_ele_chi2VsPt = bookH2(iBooker, "chi2VsPt", "ele track #chi^{2} vs pt", pt2D_nbin, 0., pt_max, 50, 0., 15.);
1658  "PinMnPout",
1659  "ele track inner p - outer p, mean of GSF components",
1660  p_nbin,
1661  0.,
1662  200.,
1663  "P_{vertex} - P_{out} (GeV/c)");
1665  "PinMnPout_mode",
1666  "ele track inner p - outer p, mode of GSF components",
1667  p_nbin,
1668  0.,
1669  100.,
1670  "P_{vertex} - P_{out}, mode of GSF components (GeV/c)");
1672  "PinMnPoutVsEta_mode",
1673  "ele track inner p - outer p vs eta, mode of GSF components",
1674  eta2D_nbin,
1675  eta_min,
1676  eta_max,
1677  p2D_nbin,
1678  0.,
1679  100.);
1681  "PinMnPoutVsPhi_mode",
1682  "ele track inner p - outer p vs phi, mode of GSF components",
1683  phi2D_nbin,
1684  phi_min,
1685  phi_max,
1686  p2D_nbin,
1687  0.,
1688  100.);
1690  "PinMnPoutVsPt_mode",
1691  "ele track inner p - outer p vs pt, mode of GSF components",
1692  pt2D_nbin,
1693  0.,
1694  pt_max,
1695  p2D_nbin,
1696  0.,
1697  100.);
1698  h2_ele_PinMnPoutVsE_mode = bookH2(iBooker,
1699  "PinMnPoutVsE_mode",
1700  "ele track inner p - outer p vs E, mode of GSF components",
1701  p2D_nbin,
1702  0.,
1703  200.,
1704  p2D_nbin,
1705  0.,
1706  100.);
1708  "PinMnPoutVsChi2_mode",
1709  "ele track inner p - outer p vs track chi2, mode of GSF components",
1710  50,
1711  0.,
1712  20.,
1713  p2D_nbin,
1714  0.,
1715  100.);
1717  iBooker, "outerP", "ele track outer p, mean of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1719  iBooker, "outerP_mode", "ele track outer p, mode of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1721  bookH2(iBooker, "outerPVsEta_mode", "ele track outer p vs eta mode", eta2D_nbin, eta_min, eta_max, 50, 0., p_max);
1723  iBooker, "outerPt", "ele track outer p_{T}, mean of GSF components", pt_nbin, 0., pt_max, "P_{T out} (GeV/c)");
1725  "outerPt_mode",
1726  "ele track outer p_{T}, mode of GSF components",
1727  pt_nbin,
1728  0.,
1729  pt_max,
1730  "P_{T out} (GeV/c)");
1731  h2_ele_outerPtVsEta_mode = bookH2(iBooker,
1732  "outerPtVsEta_mode",
1733  "ele track outer p_{T} vs eta, mode of GSF components",
1734  eta2D_nbin,
1735  eta_min,
1736  eta_max,
1737  pt2D_nbin,
1738  0.,
1739  pt_max);
1740  h2_ele_outerPtVsPhi_mode = bookH2(iBooker,
1741  "outerPtVsPhi_mode",
1742  "ele track outer p_{T} vs phi, mode of GSF components",
1743  phi2D_nbin,
1744  phi_min,
1745  phi_max,
1746  pt2D_nbin,
1747  0.,
1748  pt_max);
1749  h2_ele_outerPtVsPt_mode = bookH2(iBooker,
1750  "outerPtVsPt_mode",
1751  "ele track outer p_{T} vs pt, mode of GSF components",
1752  pt2D_nbin,
1753  0.,
1754  100.,
1755  pt2D_nbin,
1756  0.,
1757  pt_max);
1758 
1759  // matched electrons, matching
1761  iBooker, "EoP", "ele E/P_{vertex}", eop_nbin, 0., eop_max, "E/P_{vertex}", "Events", "ELE_LOGY E1 P");
1763  "EoP_barrel",
1764  "ele E/P_{vertex} barrel",
1765  eop_nbin,
1766  0.,
1767  eop_max,
1768  "E/P_{vertex}",
1769  "Events",
1770  "ELE_LOGY E1 P");
1772  "EoP_endcaps",
1773  "ele E/P_{vertex} endcaps",
1774  eop_nbin,
1775  0.,
1776  eop_max,
1777  "E/P_{vertex}",
1778  "Events",
1779  "ELE_LOGY E1 P");
1780  h2_ele_EoPVsEta =
1781  bookH2(iBooker, "EoPVsEta", "ele E/P_{vertex} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1782  h2_ele_EoPVsPhi =
1783  bookH2(iBooker, "EoPVsPhi", "ele E/P_{vertex} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1784  h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE", "ele E/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1785  h1_ele_EseedOP = bookH1withSumw2(iBooker,
1786  "EseedOP",
1787  "ele E_{seed}/P_{vertex}",
1788  eop_nbin,
1789  0.,
1790  eop_max,
1791  "E_{seed}/P_{vertex}",
1792  "Events",
1793  "ELE_LOGY E1 P");
1795  "EseedOP_barrel",
1796  "ele E_{seed}/P_{vertex} barrel",
1797  eop_nbin,
1798  0.,
1799  eop_max,
1800  "E_{seed}/P_{vertex}",
1801  "Events",
1802  "ELE_LOGY E1 P");
1804  "EseedOP_endcaps",
1805  "ele E_{seed}/P_{vertex} endcaps",
1806  eop_nbin,
1807  0.,
1808  eop_max,
1809  "E_{seed}/P_{vertex}",
1810  "Events",
1811  "ELE_LOGY E1 P");
1812  h2_ele_EseedOPVsEta = bookH2(iBooker,
1813  "EseedOPVsEta",
1814  "ele E_{seed}/P_{vertex} vs eta",
1815  eta2D_nbin,
1816  eta_min,
1817  eta_max,
1818  eop2D_nbin,
1819  0.,
1820  eopmaxsht);
1821  h2_ele_EseedOPVsPhi = bookH2(iBooker,
1822  "EseedOPVsPhi",
1823  "ele E_{seed}/P_{vertex} vs phi",
1824  phi2D_nbin,
1825  phi_min,
1826  phi_max,
1827  eop2D_nbin,
1828  0.,
1829  eopmaxsht);
1830  h2_ele_EseedOPVsE = bookH2(iBooker, "EseedOPVsE", "ele E_{seed}/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1832  iBooker, "EoPout", "ele E_{seed}/P_{out}", eop_nbin, 0., eop_max, "E_{seed}/P_{out}", "Events", "ELE_LOGY E1 P");
1834  "EoPout_barrel",
1835  "ele E_{seed}/P_{out} barrel",
1836  eop_nbin,
1837  0.,
1838  eop_max,
1839  "E_{seed}/P_{out}",
1840  "Events",
1841  "ELE_LOGY E1 P");
1843  "EoPout_endcaps",
1844  "ele E_{seed}/P_{out} endcaps",
1845  eop_nbin,
1846  0.,
1847  eop_max,
1848  "E_{seed}/P_{out}",
1849  "Events",
1850  "ELE_LOGY E1 P");
1852  iBooker, "EoPoutVsEta", "ele E_{seed}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1854  iBooker, "EoPoutVsPhi", "ele E_{seed}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1856  bookH2(iBooker, "EoPoutVsE", "ele E_{seed}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1858  iBooker, "EeleOPout", "ele E_{ele}/P_{out}", eop_nbin, 0., eop_max, "E_{ele}/P_{out}", "Events", "ELE_LOGY E1 P");
1860  "EeleOPout_barrel",
1861  "ele E_{ele}/P_{out} barrel",
1862  eop_nbin,
1863  0.,
1864  eop_max,
1865  "E_{ele}/P_{out}",
1866  "Events",
1867  "ELE_LOGY E1 P");
1869  "EeleOPout_endcaps",
1870  "ele E_{ele}/P_{out} endcaps",
1871  eop_nbin,
1872  0.,
1873  eop_max,
1874  "E_{ele}/P_{out}",
1875  "Events",
1876  "ELE_LOGY E1 P");
1878  iBooker, "EeleOPoutVsEta", "ele E_{ele}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1880  iBooker, "EeleOPoutVsPhi", "ele E_{ele}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1882  bookH2(iBooker, "EeleOPoutVsE", "ele E_{ele}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1884  "dEtaSc_propVtx",
1885  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1887  detamatch_min,
1888  detamatch_max,
1889  "#eta_{sc} - #eta_{tr}",
1890  "Events",
1891  "ELE_LOGY E1 P");
1893  "dEtaSc_propVtx_barrel",
1894  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
1896  detamatch_min,
1897  detamatch_max,
1898  "#eta_{sc} - #eta_{tr}",
1899  "Events",
1900  "ELE_LOGY E1 P");
1902  "dEtaSc_propVtx_endcaps",
1903  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
1905  detamatch_min,
1906  detamatch_max,
1907  "#eta_{sc} - #eta_{tr}",
1908  "Events",
1909  "ELE_LOGY E1 P");
1911  "dEtaSc_propVtx_mAOD",
1912  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1914  detamatch_min,
1915  detamatch_max,
1916  "#eta_{sc} - #eta_{tr}",
1917  "Events",
1918  "ELE_LOGY E1 P");
1920  "dEtaSc_propVtx_mAOD_barrel",
1921  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
1923  detamatch_min,
1924  detamatch_max,
1925  "#eta_{sc} - #eta_{tr}",
1926  "Events",
1927  "ELE_LOGY E1 P");
1929  "dEtaSc_propVtx_mAOD_endcaps",
1930  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
1932  detamatch_min,
1933  detamatch_max,
1934  "#eta_{sc} - #eta_{tr}",
1935  "Events",
1936  "ELE_LOGY E1 P");
1938  "dEtaScVsEta_propVtx",
1939  "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
1940  eta2D_nbin,
1941  eta_min,
1942  eta_max,
1944  detamatch_min,
1945  detamatch_max);
1947  "dEtaScVsPhi_propVtx",
1948  "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
1949  phi2D_nbin,
1950  phi_min,
1951  phi_max,
1953  detamatch_min,
1954  detamatch_max);
1956  "dEtaScVsPt_propVtx",
1957  "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
1958  pt2D_nbin,
1959  0.,
1960  pt_max,
1962  detamatch_min,
1963  detamatch_max);
1965  "dPhiSc_propVtx",
1966  "ele #phi_{sc} - #phi_{tr}, prop from vertex",
1968  dphimatch_min,
1969  dphimatch_max,
1970  "#phi_{sc} - #phi_{tr} (rad)",
1971  "Events",
1972  "ELE_LOGY E1 P");
1974  "dPhiSc_propVtx_barrel",
1975  "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
1977  dphimatch_min,
1978  dphimatch_max,
1979  "#phi_{sc} - #phi_{tr} (rad)",
1980  "Events",
1981  "ELE_LOGY E1 P");
1983  "dPhiSc_propVtx_endcaps",
1984  "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
1986  dphimatch_min,
1987  dphimatch_max,
1988  "#phi_{sc} - #phi_{tr} (rad)",
1989  "Events",
1990  "ELE_LOGY E1 P");
1992  "dPhiScVsEta_propVtx",
1993  "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
1994  eta2D_nbin,
1995  eta_min,
1996  eta_max,
1998  dphimatch_min,
1999  dphimatch_max);
2001  "dPhiScVsPhi_propVtx",
2002  "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
2003  phi2D_nbin,
2004  phi_min,
2005  phi_max,
2007  dphimatch_min,
2008  dphimatch_max);
2010  "dPhiScVsPt_propVtx",
2011  "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
2012  pt2D_nbin,
2013  0.,
2014  pt_max,
2016  dphimatch_min,
2017  dphimatch_max);
2019  "dEtaCl_propOut",
2020  "ele #eta_{cl} - #eta_{tr}, prop from outermost",
2022  detamatch_min,
2023  detamatch_max,
2024  "#eta_{seedcl} - #eta_{tr}",
2025  "Events",
2026  "ELE_LOGY E1 P");
2028  "dEtaCl_propOut_barrel",
2029  "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
2031  detamatch_min,
2032  detamatch_max,
2033  "#eta_{seedcl} - #eta_{tr}",
2034  "Events",
2035  "ELE_LOGY E1 P");
2037  "dEtaCl_propOut_endcaps",
2038  "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
2040  detamatch_min,
2041  detamatch_max,
2042  "#eta_{seedcl} - #eta_{tr}",
2043  "Events",
2044  "ELE_LOGY E1 P");
2046  "dEtaClVsEta_propOut",
2047  "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
2048  eta2D_nbin,
2049  eta_min,
2050  eta_max,
2052  detamatch_min,
2053  detamatch_max);
2055  "dEtaClVsPhi_propOut",
2056  "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
2057  phi2D_nbin,
2058  phi_min,
2059  phi_max,
2061  detamatch_min,
2062  detamatch_max);
2064  "dEtaScVsPt_propOut",
2065  "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
2066  pt2D_nbin,
2067  0.,
2068  pt_max,
2070  detamatch_min,
2071  detamatch_max);
2073  "dPhiCl_propOut",
2074  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2076  dphimatch_min,
2077  dphimatch_max,
2078  "#phi_{seedcl} - #phi_{tr} (rad)",
2079  "Events",
2080  "ELE_LOGY E1 P");
2082  "dPhiCl_propOut_barrel",
2083  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2085  dphimatch_min,
2086  dphimatch_max,
2087  "#phi_{seedcl} - #phi_{tr} (rad)",
2088  "Events",
2089  "ELE_LOGY E1 P");
2091  "dPhiCl_propOut_endcaps",
2092  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2094  dphimatch_min,
2095  dphimatch_max,
2096  "#phi_{seedcl} - #phi_{tr} (rad)",
2097  "Events",
2098  "ELE_LOGY E1 P");
2100  "dPhiCl_propOut_mAOD",
2101  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2103  dphimatch_min,
2104  dphimatch_max,
2105  "#phi_{seedcl} - #phi_{tr} (rad)",
2106  "Events",
2107  "ELE_LOGY E1 P");
2109  "dPhiCl_propOut_mAOD_barrel",
2110  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2112  dphimatch_min,
2113  dphimatch_max,
2114  "#phi_{seedcl} - #phi_{tr} (rad)",
2115  "Events",
2116  "ELE_LOGY E1 P");
2118  "dPhiCl_propOut_mAOD_endcaps",
2119  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2121  dphimatch_min,
2122  dphimatch_max,
2123  "#phi_{seedcl} - #phi_{tr} (rad)",
2124  "Events",
2125  "ELE_LOGY E1 P");
2127  "dPhiClVsEta_propOut",
2128  "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
2129  eta2D_nbin,
2130  eta_min,
2131  eta_max,
2133  dphimatch_min,
2134  dphimatch_max);
2136  "dPhiClVsPhi_propOut",
2137  "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
2138  phi2D_nbin,
2139  phi_min,
2140  phi_max,
2142  dphimatch_min,
2143  dphimatch_max);
2145  "dPhiSClsPt_propOut",
2146  "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
2147  pt2D_nbin,
2148  0.,
2149  pt_max,
2151  dphimatch_min,
2152  dphimatch_max);
2154  "dEtaEleCl_propOut",
2155  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
2157  detamatch_min,
2158  detamatch_max,
2159  "#eta_{elecl} - #eta_{tr}",
2160  "Events",
2161  "ELE_LOGY E1 P");
2163  "dEtaEleCl_propOut_barrel",
2164  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
2166  detamatch_min,
2167  detamatch_max,
2168  "#eta_{elecl} - #eta_{tr}",
2169  "Events",
2170  "ELE_LOGY E1 P");
2172  "dEtaEleCl_propOut_endcaps",
2173  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
2175  detamatch_min,
2176  detamatch_max,
2177  "#eta_{elecl} - #eta_{tr}",
2178  "Events",
2179  "ELE_LOGY E1 P");
2181  "dEtaEleClVsEta_propOut",
2182  "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
2183  eta2D_nbin,
2184  eta_min,
2185  eta_max,
2187  detamatch_min,
2188  detamatch_max);
2190  "dEtaEleClVsPhi_propOut",
2191  "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
2192  phi2D_nbin,
2193  phi_min,
2194  phi_max,
2196  detamatch_min,
2197  detamatch_max);
2199  "dEtaScVsPt_propOut",
2200  "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
2201  pt2D_nbin,
2202  0.,
2203  pt_max,
2205  detamatch_min,
2206  detamatch_max);
2208  "dPhiEleCl_propOut",
2209  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
2211  dphimatch_min,
2212  dphimatch_max,
2213  "#phi_{elecl} - #phi_{tr} (rad)",
2214  "Events",
2215  "ELE_LOGY E1 P");
2217  "dPhiEleCl_propOut_barrel",
2218  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
2220  dphimatch_min,
2221  dphimatch_max,
2222  "#phi_{elecl} - #phi_{tr} (rad)",
2223  "Events",
2224  "ELE_LOGY E1 P");
2226  "dPhiEleCl_propOut_endcaps",
2227  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
2229  dphimatch_min,
2230  dphimatch_max,
2231  "#phi_{elecl} - #phi_{tr} (rad)",
2232  "Events",
2233  "ELE_LOGY E1 P");
2235  "dPhiEleClVsEta_propOut",
2236  "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
2237  eta2D_nbin,
2238  eta_min,
2239  eta_max,
2241  dphimatch_min,
2242  dphimatch_max);
2244  "dPhiEleClVsPhi_propOut",
2245  "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
2246  phi2D_nbin,
2247  phi_min,
2248  phi_max,
2250  dphimatch_min,
2251  dphimatch_max);
2253  "dPhiSEleClsPt_propOut",
2254  "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
2255  pt2D_nbin,
2256  0.,
2257  pt_max,
2259  dphimatch_min,
2260  dphimatch_max);
2262  iBooker, "HoE", "ele hadronic energy / em energy", hoe_nbin, hoe_min, hoe_max, "H/E", "Events", "ELE_LOGY E1 P");
2264  "HoE_barrel",
2265  "ele hadronic energy / em energy, barrel",
2266  hoe_nbin,
2267  hoe_min,
2268  hoe_max,
2269  "H/E",
2270  "Events",
2271  "ELE_LOGY E1 P");
2273  "HoE_endcaps",
2274  "ele hadronic energy / em energy, endcaps",
2275  hoe_nbin,
2276  hoe_min,
2277  hoe_max,
2278  "H/E",
2279  "Events",
2280  "ELE_LOGY E1 P");
2281  h1_ele_HoE_mAOD = bookH1withSumw2(iBooker,
2282  "HoE_mAOD",
2283  "ele hadronic energy / em energy",
2284  hoe_nbin,
2285  hoe_min,
2286  hoe_max,
2287  "H/E",
2288  "Events",
2289  "ELE_LOGY E1 P");
2291  "HoE_mAOD_barrel",
2292  "ele hadronic energy / em energy, barrel",
2293  hoe_nbin,
2294  hoe_min,
2295  hoe_max,
2296  "H/E",
2297  "Events",
2298  "ELE_LOGY E1 P");
2300  "HoE_mAOD_endcaps",
2301  "ele hadronic energy / em energy, endcaps",
2302  hoe_nbin,
2303  hoe_min,
2304  hoe_max,
2305  "H/E",
2306  "Events",
2307  "ELE_LOGY E1 P");
2308  h1_ele_HoE_bc = bookH1withSumw2(iBooker,
2309  "HoE_bc",
2310  "ele hadronic energy / em energy behind cluster",
2311  hoe_nbin,
2312  hoe_min,
2313  hoe_max,
2314  "H/E",
2315  "Events",
2316  "ELE_LOGY E1 P");
2318  "HoE_bc_barrel",
2319  "ele hadronic energy / em energy, behind cluster barrel",
2320  hoe_nbin,
2321  hoe_min,
2322  hoe_max,
2323  "H/E",
2324  "Events",
2325  "ELE_LOGY E1 P");
2327  "HoE_bc_endcaps",
2328  "ele hadronic energy / em energy, behind cluster, endcaps",
2329  hoe_nbin,
2330  hoe_min,
2331  hoe_max,
2332  "H/E",
2333  "Events",
2334  "ELE_LOGY E1 P");
2336  "hcalDepth1OverEcalBc",
2337  "hcalDepth1OverEcalBc",
2338  hoe_nbin,
2339  hoe_min,
2340  hoe_max,
2341  "H/E",
2342  "Events",
2343  "ELE_LOGY E1 P");
2345  "hcalDepth1OverEcalBc_barrel",
2346  "hcalDepth1OverEcalBc_barrel",
2347  hoe_nbin,
2348  hoe_min,
2349  hoe_max,
2350  "H/E",
2351  "Events",
2352  "ELE_LOGY E1 P");
2354  "hcalDepth1OverEcalBc_endcaps",
2355  "hcalDepth1OverEcalBc_endcaps",
2356  hoe_nbin,
2357  hoe_min,
2358  hoe_max,
2359  "H/E",
2360  "Events",
2361  "ELE_LOGY E1 P");
2363  "hcalDepth2OverEcalBc",
2364  "hcalDepth2OverEcalBc",
2365  hoe_nbin,
2366  hoe_min,
2367  hoe_max,
2368  "H/E",
2369  "Events",
2370  "ELE_LOGY E1 P");
2372  "hcalDepth2OverEcalBc_barrel",
2373  "hcalDepth2OverEcalBc_barrel",
2374  hoe_nbin,
2375  hoe_min,
2376  hoe_max,
2377  "H/E",
2378  "Events",
2379  "ELE_LOGY E1 P");
2381  "hcalDepth2OverEcalBc_endcaps",
2382  "hcalDepth2OverEcalBc_endcaps",
2383  hoe_nbin,
2384  hoe_min,
2385  hoe_max,
2386  "H/E",
2387  "Events",
2388  "ELE_LOGY E1 P");
2389 
2391  "HoE_fiducial",
2392  "ele hadronic energy / em energy, fiducial region",
2393  hoe_nbin,
2394  hoe_min,
2395  hoe_max,
2396  "H/E",
2397  "Events",
2398  "ELE_LOGY E1 P");
2399  h2_ele_HoEVsEta = bookH2(iBooker,
2400  "HoEVsEta",
2401  "ele hadronic energy / em energy vs eta",
2402  eta_nbin,
2403  eta_min,
2404  eta_max,
2405  hoe_nbin,
2406  hoe_min,
2407  hoe_max);
2408  h2_ele_HoEVsPhi = bookH2(iBooker,
2409  "HoEVsPhi",
2410  "ele hadronic energy / em energy vs phi",
2411  phi2D_nbin,
2412  phi_min,
2413  phi_max,
2414  hoe_nbin,
2415  hoe_min,
2416  hoe_max);
2417  h2_ele_HoEVsE =
2418  bookH2(iBooker, "HoEVsE", "ele hadronic energy / em energy vs E", p_nbin, 0., 300., hoe_nbin, hoe_min, hoe_max);
2419 
2420  // seeds
2422  bookH1withSumw2(iBooker, "seedSubdet2", "ele seed subdet 2nd layer", 11, -0.5, 10.5, "2nd hit subdet Id");
2423  h1_ele_seed_mask = bookH1withSumw2(iBooker, "seedMask", "ele seed hits mask", 13, -0.5, 12.5);
2425  bookH1withSumw2(iBooker, "seedMask_Bpix", "ele seed hits mask when subdet2 is bpix", 13, -0.5, 12.5);
2427  bookH1withSumw2(iBooker, "seedMask_Fpix", "ele seed hits mask when subdet2 is fpix", 13, -0.5, 12.5);
2429  bookH1withSumw2(iBooker, "seedMask_Tec", "ele seed hits mask when subdet2 is tec", 13, -0.5, 12.5);
2431  iBooker, "seedDphi2", "ele seed dphi 2nd layer", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2433  iBooker, "seedDphi2_VsEta", "ele seed dphi 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.003, +0.003);
2435  bookH2(iBooker, "seedDphi2_VsPt", "ele seed dphi 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2437  iBooker, "seedDphi2Pos", "ele seed dphi 2nd layer positron", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2439  "seedDphi2Pos_VsEta",
2440  "ele seed dphi 2nd layer positron vs eta",
2441  eta2D_nbin,
2442  eta_min,
2443  eta_max,
2444  50,
2445  -0.003,
2446  +0.003);
2448  iBooker, "seedDphi2Pos_VsPt", "ele seed dphi 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2450  iBooker, "seedDrz2", "ele seed dr (dz) 2nd layer", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2452  iBooker, "seedDrz2_VsEta", "ele seed dr/dz 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.03, +0.03);
2454  bookH2(iBooker, "seedDrz2_VsPt", "ele seed dr/dz 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2456  iBooker, "seedDrz2Pos", "ele seed dr (dz) 2nd layer positron", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2457  h2_ele_seed_drz2posVsEta = bookH2(iBooker,
2458  "seedDrz2Pos_VsEta",
2459  "ele seed dr/dz 2nd layer positron vs eta",
2460  eta2D_nbin,
2461  eta_min,
2462  eta_max,
2463  50,
2464  -0.03,
2465  +0.03);
2467  iBooker, "seedDrz2Pos_VsPt", "ele seed dr/dz 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2468 
2469  // classes
2470  h1_ele_classes = bookH1withSumw2(iBooker, "classes", "ele classes", 20, 0.0, 20., "class Id");
2471  h1_ele_eta = bookH1withSumw2(iBooker, "eta", "ele electron eta", eta_nbin / 2, 0.0, eta_max);
2472  h1_ele_eta_golden = bookH1withSumw2(iBooker, "eta_golden", "ele electron eta golden", eta_nbin / 2, 0.0, eta_max);
2473  h1_ele_eta_bbrem = bookH1withSumw2(iBooker, "eta_bbrem", "ele electron eta bbrem", eta_nbin / 2, 0.0, eta_max);
2474  h1_ele_eta_shower = bookH1withSumw2(iBooker, "eta_shower", "ele electron eta showering", eta_nbin / 2, 0.0, eta_max);
2476  "PinVsPoutGolden_mode",
2477  "ele track inner p vs outer p vs eta, golden, mode of GSF components",
2478  p2D_nbin,
2479  0.,
2480  p_max,
2481  50,
2482  0.,
2483  p_max);
2485  "PinVsPoutShowering_mode",
2486  "ele track inner p vs outer p vs eta, showering, mode of GSF components",
2487  p2D_nbin,
2488  0.,
2489  p_max,
2490  50,
2491  0.,
2492  p_max);
2494  "PinVsPoutGolden_mean",
2495  "ele track inner p vs outer p vs eta, golden, mean of GSF components",
2496  p2D_nbin,
2497  0.,
2498  p_max,
2499  50,
2500  0.,
2501  p_max);
2503  "PinVsPoutShowering_mean",
2504  "ele track inner p vs outer p vs eta, showering, mean of GSF components",
2505  p2D_nbin,
2506  0.,
2507  p_max,
2508  50,
2509  0.,
2510  p_max);
2512  "PtinVsPtoutGolden_mode",
2513  "ele track inner pt vs outer pt vs eta, golden, mode of GSF components",
2514  pt2D_nbin,
2515  0.,
2516  pt_max,
2517  50,
2518  0.,
2519  pt_max);
2521  "PtinVsPtoutShowering_mode",
2522  "ele track inner pt vs outer pt vs eta, showering, mode of GSF components",
2523  pt2D_nbin,
2524  0.,
2525  pt_max,
2526  50,
2527  0.,
2528  pt_max);
2530  "PtinVsPtoutGolden_mean",
2531  "ele track inner pt vs outer pt vs eta, golden, mean of GSF components",
2532  pt2D_nbin,
2533  0.,
2534  pt_max,
2535  50,
2536  0.,
2537  pt_max);
2539  "PtinVsPtoutShowering_mean",
2540  "ele track inner pt vs outer pt vs eta, showering, mean of GSF components",
2541  pt2D_nbin,
2542  0.,
2543  pt_max,
2544  50,
2545  0.,
2546  pt_max);
2547  setBookPrefix("h_scl");
2549  "EoEtrue_golden_barrel",
2550  "ele supercluster energy / gen energy, golden, barrel",
2551  poptrue_nbin,
2552  poptrue_min,
2553  poptrue_max);
2555  "EoEtrue_golden_endcaps",
2556  "ele supercluster energy / gen energy, golden, endcaps",
2557  poptrue_nbin,
2558  poptrue_min,
2559  poptrue_max);
2561  "EoEtrue_showering_barrel",
2562  "ele supercluster energy / gen energy, showering, barrel",
2563  poptrue_nbin,
2564  poptrue_min,
2565  poptrue_max);
2567  "EoEtrue_showering_endcaps",
2568  "ele supercluster energy / gen energy, showering, endcaps",
2569  poptrue_nbin,
2570  poptrue_min,
2571  poptrue_max);
2572 
2573  // isolation
2574  setBookPrefix("h_ele");
2576  "tkSumPt_dr03",
2577  "tk isolation sum, dR=0.3",
2578  100,
2579  0.0,
2580  20.,
2581  "TkIsoSum, cone 0.3 (GeV/c)",
2582  "Events",
2583  "ELE_LOGY E1 P");
2585  "tkSumPt_dr03_barrel",
2586  "tk isolation sum, dR=0.3, barrel",
2587  100,
2588  0.0,
2589  20.,
2590  "TkIsoSum, cone 0.3 (GeV/c)",
2591  "Events",
2592  "ELE_LOGY E1 P");
2594  "tkSumPt_dr03_endcaps",
2595  "tk isolation sum, dR=0.3, endcaps",
2596  100,
2597  0.0,
2598  20.,
2599  "TkIsoSum, cone 0.3 (GeV/c)",
2600  "Events",
2601  "ELE_LOGY E1 P");
2603  "ecalRecHitSumEt_dr03",
2604  "ecal isolation sum, dR=0.3",
2605  100,
2606  0.0,
2607  20.,
2608  "EcalIsoSum, cone 0.3 (GeV)",
2609  "Events",
2610  "ELE_LOGY E1 P");
2612  "ecalRecHitSumEt_dr03_barrel",
2613  "ecal isolation sum, dR=0.3, barrel",
2614  100,
2615  0.0,
2616  20.,
2617  "EcalIsoSum, cone 0.3 (GeV)",
2618  "Events",
2619  "ELE_LOGY E1 P");
2621  "ecalRecHitSumEt_dr03_endcaps",
2622  "ecal isolation sum, dR=0.3, endcaps",
2623  100,
2624  0.0,
2625  20.,
2626  "EcalIsoSum, cone 0.3 (GeV)",
2627  "Events",
2628  "ELE_LOGY E1 P");
2630  "hcalTowerSumEt_dr03_depth1",
2631  "hcal depth1 isolation sum, dR=0.3",
2632  100,
2633  0.0,
2634  20.,
2635  "Hcal1IsoSum, cone 0.3 (GeV)",
2636  "Events",
2637  "ELE_LOGY E1 P");
2639  "hcalTowerSumEt_dr03_depth1_barrel",
2640  "hcal depth1 isolation sum, dR=0.3, barrel",
2641  100,
2642  0.0,
2643  20.,
2644  "Hcal1IsoSum, cone 0.3 (GeV)",
2645  "Events",
2646  "ELE_LOGY E1 P");
2648  "hcalTowerSumEt_dr03_depth1_endcaps",
2649  "hcal depth1 isolation sum, dR=0.3, endcaps",
2650  100,
2651  0.0,
2652  20.,
2653  "Hcal1IsoSum, cone 0.3 (GeV)",
2654  "Events",
2655  "ELE_LOGY E1 P");
2657  "hcalTowerSumEt_dr03_depth2",
2658  "hcal depth2 isolation sum, dR=0.3",
2659  100,
2660  0.0,
2661  20.,
2662  "Hcal2IsoSum, cone 0.3 (GeV)",
2663  "Events",
2664  "ELE_LOGY E1 P");
2666  "hcalTowerSumEt_dr03_depth2_barrel",
2667  "hcal depth2 isolation sum, dR=0.3",
2668  100,
2669  0.0,
2670  20.,
2671  "Hcal2IsoSum, cone 0.3 (GeV)",
2672  "Events",
2673  "ELE_LOGY E1 P");
2675  "hcalTowerSumEt_dr03_depth2_endcaps",
2676  "hcal depth2 isolation sum, dR=0.3",
2677  100,
2678  0.0,
2679  20.,
2680  "Hcal2IsoSum, cone 0.3 (GeV)",
2681  "Events",
2682  "ELE_LOGY E1 P");
2684  "tkSumPt_dr04",
2685  "tk isolation sum, dR=0.4",
2686  100,
2687  0.0,
2688  20.,
2689  "TkIsoSum, cone 0.4 (GeV/c)",
2690  "Events",
2691  "ELE_LOGY E1 P");
2693  "tkSumPt_dr04_barrel",
2694  "tk isolation sum, dR=0.4, barrel",
2695  100,
2696  0.0,
2697  20.,
2698  "TkIsoSum, cone 0.4 (GeV/c)",
2699  "Events",
2700  "ELE_LOGY E1 P");
2702  "tkSumPt_dr04_endcaps",
2703  "tk isolation sum, dR=0.4, endcaps",
2704  100,
2705  0.0,
2706  20.,
2707  "TkIsoSum, cone 0.4 (GeV/c)",
2708  "Events",
2709  "ELE_LOGY E1 P");
2711  "ecalRecHitSumEt_dr04",
2712  "ecal isolation sum, dR=0.4",
2713  100,
2714  0.0,
2715  20.,
2716  "EcalIsoSum, cone 0.4 (GeV)",
2717  "Events",
2718  "ELE_LOGY E1 P");
2720  "ecalRecHitSumEt_dr04_barrel",
2721  "ecal isolation sum, dR=0.4, barrel",
2722  100,
2723  0.0,
2724  20.,
2725  "EcalIsoSum, cone 0.4 (GeV)",
2726  "Events",
2727  "ELE_LOGY E1 P");
2729  "ecalRecHitSumEt_dr04_endcaps",
2730  "ecal isolation sum, dR=0.4, endcaps",
2731  100,
2732  0.0,
2733  20.,
2734  "EcalIsoSum, cone 0.4 (GeV)",
2735  "Events",
2736  "ELE_LOGY E1 P");
2738  "hcalTowerSumEt_dr04_depth1",
2739  "hcal depth1 isolation sum, dR=0.4",
2740  100,
2741  0.0,
2742  20.,
2743  "Hcal1IsoSum, cone 0.4 (GeV)",
2744  "Events",
2745  "ELE_LOGY E1 P");
2747  "hcalTowerSumEt_dr04_depth1_barrel",
2748  "hcal depth1 isolation sum, dR=0.4, barrel",
2749  100,
2750  0.0,
2751  20.,
2752  "Hcal1IsoSum, cone 0.4 (GeV)",
2753  "Events",
2754  "ELE_LOGY E1 P");
2756  "hcalTowerSumEt_dr04_depth1_endcaps",
2757  "hcal depth1 isolation sum, dR=0.4, endcaps",
2758  100,
2759  0.0,
2760  20.,
2761  "Hcal1IsoSum, cone 0.4 (GeV)",
2762  "Events",
2763  "ELE_LOGY E1 P");
2765  "hcalTowerSumEt_dr04_depth2",
2766  "hcal depth2 isolation sum, dR=0.4",
2767  100,
2768  0.0,
2769  20.,
2770  "Hcal2IsoSum, cone 0.4 (GeV)",
2771  "Events",
2772  "ELE_LOGY E1 P");
2774  "hcalTowerSumEt_dr04_depth2_barrel",
2775  "hcal depth2 isolation sum, dR=0.4",
2776  100,
2777  0.0,
2778  20.,
2779  "Hcal2IsoSum, cone 0.4 (GeV)",
2780  "Events",
2781  "ELE_LOGY E1 P");
2783  "hcalTowerSumEt_dr04_depth2_endcaps",
2784  "hcal depth2 isolation sum, dR=0.4",
2785  100,
2786  0.0,
2787  20.,
2788  "Hcal2IsoSum, cone 0.4 (GeV)",
2789  "Events",
2790  "ELE_LOGY E1 P");
2791 
2792  // newHCAL
2793  // isolation new hcal
2795  "hcalTowerSumEtBc_dr03_depth1",
2796  "hcal depth1 isolation sum behind cluster, dR=0.3",
2797  100,
2798  0.0,
2799  20.,
2800  "Hcal1IsoSum, cone 0.3 (GeV)",
2801  "Events",
2802  "ELE_LOGY E1 P");
2804  bookH1withSumw2(iBooker,
2805  "hcalTowerSumEtBc_dr03_depth1_barrel",
2806  "hcal depth1 isolation sum behind cluster, dR=0.3, barrel",
2807  100,
2808  0.0,
2809  20.,
2810  "Hcal1IsoSum, cone 0.3 (GeV)",
2811  "Events",
2812  "ELE_LOGY E1 P");
2814  bookH1withSumw2(iBooker,
2815  "hcalTowerSumEtBc_dr03_depth1_endcaps",
2816  "hcal depth1 isolation sum behind cluster, dR=0.3, endcaps",
2817  100,
2818  0.0,
2819  20.,
2820  "Hcal1IsoSum, cone 0.3 (GeV)",
2821  "Events",
2822  "ELE_LOGY E1 P");
2823 
2825  "hcalTowerSumEtBc_dr04_depth1",
2826  "hcal depth1 isolation sum behind cluster, dR=0.4",
2827  100,
2828  0.0,
2829  20.,
2830  "Hcal1IsoSum, cone 0.4 (GeV)",
2831  "Events",
2832  "ELE_LOGY E1 P");
2834  bookH1withSumw2(iBooker,
2835  "hcalTowerSumEtBc_dr04_depth1_barrel",
2836  "hcal depth1 isolation sum behind cluster, dR=0.4, barrel",
2837  100,
2838  0.0,
2839  20.,
2840  "Hcal1IsoSum, cone 0.4 (GeV)",
2841  "Events",
2842  "ELE_LOGY E1 P");
2844  bookH1withSumw2(iBooker,
2845  "hcalTowerSumEtBc_dr04_depth1_endcaps",
2846  "hcal depth1 isolation sum behind cluster, dR=0.4, endcaps",
2847  100,
2848  0.0,
2849  20.,
2850  "Hcal1IsoSum, cone 0.4 (GeV)",
2851  "Events",
2852  "ELE_LOGY E1 P");
2853 
2855  "hcalTowerSumEtBc_dr03_depth2",
2856  "hcal depth2 isolation sum behind cluster, dR=0.3",
2857  100,
2858  0.0,
2859  20.,
2860  "Hcal1IsoSum, cone 0.3 (GeV)",
2861  "Events",
2862  "ELE_LOGY E1 P");
2864  bookH1withSumw2(iBooker,
2865  "hcalTowerSumEtBc_dr03_depth2_barrel",
2866  "hcal depth2 isolation sum behind cluster, dR=0.3, barrel",
2867  100,
2868  0.0,
2869  20.,
2870  "Hcal1IsoSum, cone 0.3 (GeV)",
2871  "Events",
2872  "ELE_LOGY E1 P");
2874  bookH1withSumw2(iBooker,
2875  "hcalTowerSumEtBc_dr03_depth2_endcaps",
2876  "hcal depth2 isolation sum behind cluster, dR=0.3, endcaps",
2877  100,
2878  0.0,
2879  20.,
2880  "Hcal1IsoSum, cone 0.3 (GeV)",
2881  "Events",
2882  "ELE_LOGY E1 P");
2883 
2885  "hcalTowerSumEtBc_dr04_depth2",
2886  "hcal depth2 isolation sum behind cluster, dR=0.4",
2887  100,
2888  0.0,
2889  20.,
2890  "Hcal1IsoSum, cone 0.4 (GeV)",
2891  "Events",
2892  "ELE_LOGY E1 P");
2894  bookH1withSumw2(iBooker,
2895  "hcalTowerSumEtBc_dr04_depth2_barrel",
2896  "hcal depth2 isolation sum behind cluster, dR=0.4, barrel",
2897  100,
2898  0.0,
2899  20.,
2900  "Hcal1IsoSum, cone 0.4 (GeV)",
2901  "Events",
2902  "ELE_LOGY E1 P");
2904  bookH1withSumw2(iBooker,
2905  "hcalTowerSumEtBc_dr04_depth2_endcaps",
2906  "hcal depth2 isolation sum behind cluster, dR=0.4, endcaps",
2907  100,
2908  0.0,
2909  20.,
2910  "Hcal1IsoSum, cone 0.4 (GeV)",
2911  "Events",
2912  "ELE_LOGY E1 P");
2913 
2914  // fbrem
2916  iBooker, "fbrem", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2918  "fbrem_barrel",
2919  "ele brem fraction for barrel, mode of GSF components",
2920  100,
2921  0.,
2922  1.,
2923  "P_{in} - P_{out} / P_{in}");
2925  "fbrem_endcaps",
2926  "ele brem franction for endcaps, mode of GSF components",
2927  100,
2928  0.,
2929  1.,
2930  "P_{in} - P_{out} / P_{in}");
2932  iBooker, "fbrem_mAOD", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2934  "fbrem_mAOD_barrel",
2935  "ele brem fraction for barrel, mode of GSF components",
2936  100,
2937  0.,
2938  1.,
2939  "P_{in} - P_{out} / P_{in}");
2941  "fbrem_mAOD_endcaps",
2942  "ele brem franction for endcaps, mode of GSF components",
2943  100,
2944  0.,
2945  1.,
2946  "P_{in} - P_{out} / P_{in}");
2948  bookH1withSumw2(iBooker, "superclusterfbrem", "supercluster brem fraction", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2950  iBooker, "superclusterfbrem_barrel", "supercluster brem fraction for barrel", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2952  "superclusterfbrem_endcaps",
2953  "supercluster brem franction for endcaps",
2954  100,
2955  0.,
2956  1.,
2957  "1 - E_{ele} / E_{SC}");
2958  p1_ele_fbremVsEta_mode = bookP1(iBooker,
2959  "fbremvsEtamode",
2960  "mean ele brem fraction vs eta, mode of GSF components",
2961  eta2D_nbin,
2962  eta_min,
2963  eta_max,
2964  0.,
2965  1.,
2966  "#eta",
2967  "<P_{in} - P_{out} / P_{in}>");
2968  p1_ele_fbremVsEta_mean = bookP1(iBooker,
2969  "fbremvsEtamean",
2970  "mean ele brem fraction vs eta, mean of GSF components",
2971  eta2D_nbin,
2972  eta_min,
2973  eta_max,
2974  0.,
2975  1.,
2976  "#eta",
2977  "<P_{in} - P_{out} / P_{in}>");
2978  h1_ele_chargeInfo = bookH1withSumw2(iBooker, "chargeInfo", "chargeInfo", 5, -2., 3.);
2979 
2980  // e/g et pflow electrons
2981  h1_ele_mva = bookH1withSumw2(iBooker, "mva", "ele identification mva", 100, -1., 1.);
2982  h1_ele_mva_barrel = bookH1withSumw2(iBooker, "mva_barrel", "ele identification mva barrel", 100, -1., 1.);
2983  h1_ele_mva_endcaps = bookH1withSumw2(iBooker, "mva_endcaps", "ele identification mva endcaps", 100, -1., 1.);
2984  h1_ele_mva_isolated = bookH1withSumw2(iBooker, "mva_isolated", "ele identification mva isolated", 100, -1., 1.);
2986  bookH1withSumw2(iBooker, "mva_isolated_barrel", "ele identification mva isolated barrel", 100, -1., 1.);
2988  bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps", 100, -1., 1.);
2989  h1_ele_provenance = bookH1withSumw2(iBooker, "provenance", "ele provenance", 5, -2., 3.);
2990  h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel", "ele provenance barrel", 5, -2., 3.);
2991  h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps", "ele provenance endcaps", 5, -2., 3.);
2992 
2993  // pflow isolation variables
2995  iBooker, "chargedHadronIso", "chargedHadronIso", 100, 0.0, 20., "chargedHadronIso", "Events", "ELE_LOGY E1 P");
2997  "chargedHadronIso_barrel",
2998  "chargedHadronIso for barrel",
2999  100,
3000  0.0,
3001  20.,
3002  "chargedHadronIso_barrel",
3003  "Events",
3004  "ELE_LOGY E1 P");
3006  "chargedHadronIso_endcaps",
3007  "chargedHadronIso for endcaps",
3008  100,
3009  0.0,
3010  20.,
3011  "chargedHadronIso_endcaps",
3012  "Events",
3013  "ELE_LOGY E1 P");
3015  iBooker, "neutralHadronIso", "neutralHadronIso", 21, 0.0, 20., "neutralHadronIso", "Events", "ELE_LOGY E1 P");
3017  "neutralHadronIso_barrel",
3018  "neutralHadronIso for barrel",
3019  21,
3020  0.0,
3021  20.,
3022  "neutralHadronIso_barrel",
3023  "Events",
3024  "ELE_LOGY E1 P");
3026  "neutralHadronIso_endcaps",
3027  "neutralHadronIso for endcaps",
3028  21,
3029  0.0,
3030  20.,
3031  "neutralHadronIso_endcaps",
3032  "Events",
3033  "ELE_LOGY E1 P");
3035  bookH1withSumw2(iBooker, "photonIso", "photonIso", 100, 0.0, 20., "photonIso", "Events", "ELE_LOGY E1 P");
3037  iBooker, "photonIso_barrel", "photonIso for barrel", 100, 0.0, 20., "photonIso_barrel", "Events", "ELE_LOGY E1 P");
3039  "photonIso_endcaps",
3040  "photonIso for endcaps",
3041  100,
3042  0.0,
3043  20.,
3044  "photonIso_endcaps",
3045  "Events",
3046  "ELE_LOGY E1 P");
3047  // -- pflow over pT
3049  "chargedHadronRelativeIso",
3050  "chargedHadronRelativeIso",
3051  100,
3052  0.0,
3053  2.,
3054  "chargedHadronRelativeIso",
3055  "Events",
3056  "ELE_LOGY E1 P");
3058  "chargedHadronRelativeIso_barrel",
3059  "chargedHadronRelativeIso for barrel",
3060  100,
3061  0.0,
3062  2.,
3063  "chargedHadronRelativeIso_barrel",
3064  "Events",
3065  "ELE_LOGY E1 P");
3067  "chargedHadronRelativeIso_endcaps",
3068  "chargedHadronRelativeIso for endcaps",
3069  100,
3070  0.0,
3071  2.,
3072  "chargedHadronRelativeIso_endcaps",
3073  "Events",
3074  "ELE_LOGY E1 P");
3076  "neutralHadronRelativeIso",
3077  "neutralHadronRelativeIso",
3078  100,
3079  0.0,
3080  2.,
3081  "neutralHadronRelativeIso",
3082  "Events",
3083  "ELE_LOGY E1 P");
3085  "neutralHadronRelativeIso_barrel",
3086  "neutralHadronRelativeIso for barrel",
3087  100,
3088  0.0,
3089  2.,
3090  "neutralHadronRelativeIso_barrel",
3091  "Events",
3092  "ELE_LOGY E1 P");
3094  "neutralHadronRelativeIso_endcaps",
3095  "neutralHadronRelativeIso for endcaps",
3096  100,
3097  0.0,
3098  2.,
3099  "neutralHadronRelativeIso_endcaps",
3100  "Events",
3101  "ELE_LOGY E1 P");
3103  iBooker, "photonRelativeIso", "photonRelativeIso", 100, 0.0, 2., "photonRelativeIso", "Events", "ELE_LOGY E1 P");
3105  "photonRelativeIso_barrel",
3106  "photonRelativeIso for barrel",
3107  100,
3108  0.0,
3109  2.,
3110  "photonRelativeIso_barrel",
3111  "Events",
3112  "ELE_LOGY E1 P");
3114  "photonRelativeIso_endcaps",
3115  "photonRelativeIso for endcaps",
3116  100,
3117  0.0,
3118  2.,
3119  "photonRelativeIso_endcaps",
3120  "Events",
3121  "ELE_LOGY E1 P");
3123  "chargedHadronRelativeIso_mAOD",
3124  "chargedHadronRelativeIso",
3125  100,
3126  0.0,
3127  2.,
3128  "chargedHadronRelativeIso",
3129  "Events",
3130  "ELE_LOGY E1 P");
3132  "chargedHadronRelativeIso_mAOD_barrel",
3133  "chargedHadronRelativeIso for barrel",
3134  100,
3135  0.0,
3136  2.,
3137  "chargedHadronRelativeIso_barrel",
3138  "Events",
3139  "ELE_LOGY E1 P");
3141  "chargedHadronRelativeIso_mAOD_endcaps",
3142  "chargedHadronRelativeIso for endcaps",
3143  100,
3144  0.0,
3145  2.,
3146  "chargedHadronRelativeIso_endcaps",
3147  "Events",
3148  "ELE_LOGY E1 P");
3150  "neutralHadronRelativeIso_mAOD",
3151  "neutralHadronRelativeIso",
3152  100,
3153  0.0,
3154  2.,
3155  "neutralHadronRelativeIso",
3156  "Events",
3157  "ELE_LOGY E1 P");
3159  "neutralHadronRelativeIso_mAOD_barrel",
3160  "neutralHadronRelativeIso for barrel",
3161  100,
3162  0.0,
3163  2.,
3164  "neutralHadronRelativeIso_barrel",
3165  "Events",
3166  "ELE_LOGY E1 P");
3168  "neutralHadronRelativeIso_mAOD_endcaps",
3169  "neutralHadronRelativeIso for endcaps",
3170  100,
3171  0.0,
3172  2.,
3173  "neutralHadronRelativeIso_endcaps",
3174  "Events",
3175  "ELE_LOGY E1 P");
3177  "photonRelativeIso_mAOD",
3178  "photonRelativeIso",
3179  100,
3180  0.0,
3181  2.,
3182  "photonRelativeIso",
3183  "Events",
3184  "ELE_LOGY E1 P");
3186  "photonRelativeIso_mAOD_barrel",
3187  "photonRelativeIso for barrel",
3188  100,
3189  0.0,
3190  2.,
3191  "photonRelativeIso_barrel",
3192  "Events",
3193  "ELE_LOGY E1 P");
3195  "photonRelativeIso_mAOD_endcaps",
3196  "photonRelativeIso for endcaps",
3197  100,
3198  0.0,
3199  2.,
3200  "photonRelativeIso_endcaps",
3201  "Events",
3202  "ELE_LOGY E1 P");
3203 
3204  // conversion rejection information
3205  h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags", "conversion rejection flag", 5, -1.5, 3.5);
3207  bookH1withSumw2(iBooker, "convFlags_all", "conversion rejection flag, all electrons", 5, -1.5, 3.5);
3208  h1_ele_convDist = bookH1withSumw2(iBooker, "convDist", "distance to the conversion partner", 100, -15., 15.);
3210  bookH1withSumw2(iBooker, "convDist_all", "distance to the conversion partner, all electrons", 100, -15., 15.);
3212  iBooker, "convDcot", "difference of cot(angle) with the conversion partner", 100, -CLHEP::pi / 2., CLHEP::pi / 2.);
3214  "convDcot_all",
3215  "difference of cot(angle) with the conversion partner, all electrons",
3216  100,
3217  -CLHEP::pi / 2.,
3218  CLHEP::pi / 2.);
3219  h1_ele_convRadius = bookH1withSumw2(iBooker, "convRadius", "signed conversion radius", 100, 0., 130.);
3221  bookH1withSumw2(iBooker, "convRadius_all", "signed conversion radius, all electrons", 100, 0., 130.);
3222 }
3223 
3225 
3227  // get collections
3228  auto gsfElectrons = iEvent.getHandle(electronCollection_);
3229  auto gsfElectronsEndcaps = iEvent.getHandle(electronCollectionEndcaps_);
3230  auto gsfElectronCores = iEvent.getHandle(electronCoreCollection_);
3231  auto gsfElectronTracks = iEvent.getHandle(electronTrackCollection_);
3232  auto gsfElectronSeeds = iEvent.getHandle(electronSeedCollection_);
3233  auto genParticles = iEvent.getHandle(mcTruthCollection_);
3234  auto theBeamSpot = iEvent.getHandle(beamSpotTag_);
3235 
3236  auto isoFromDepsTk03Handle = iEvent.getHandle(isoFromDepsTk03Tag_);
3237  auto isoFromDepsTk04Handle = iEvent.getHandle(isoFromDepsTk04Tag_);
3238  auto isoFromDepsEcalFull03Handle = iEvent.getHandle(isoFromDepsEcalFull03Tag_);
3239  auto isoFromDepsEcalFull04Handle = iEvent.getHandle(isoFromDepsEcalFull04Tag_);
3240  auto isoFromDepsEcalReduced03Handle = iEvent.getHandle(isoFromDepsEcalReduced03Tag_);
3241  auto isoFromDepsEcalReduced04Handle = iEvent.getHandle(isoFromDepsEcalReduced04Tag_);
3242  auto isoFromDepsHcal03Handle = iEvent.getHandle(isoFromDepsHcal03Tag_);
3243  auto isoFromDepsHcal04Handle = iEvent.getHandle(isoFromDepsHcal04Tag_);
3244  auto vertexCollectionHandle = iEvent.getHandle(offlineVerticesCollection_);
3245  if (!vertexCollectionHandle.isValid()) {
3246  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle KO";
3247  } else {
3248  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle OK";
3249  }
3250 
3251  edm::LogInfo("ElectronMcSignalValidator::analyze")
3252  << "Treating event " << iEvent.id() << " with " << gsfElectrons.product()->size() << " electrons";
3253  edm::LogInfo("ElectronMcSignalValidator::analyze")
3254  << "Treating event " << iEvent.id() << " with " << gsfElectronsEndcaps.product()->size() << " electrons";
3255 
3256  h1_recEleNum->Fill((*gsfElectrons).size());
3257  h1_recCoreNum->Fill((*gsfElectronCores).size());
3258  h1_recTrackNum->Fill((*gsfElectronTracks).size());
3259  h1_recSeedNum->Fill((*gsfElectronSeeds).size());
3260  h1_recOfflineVertices->Fill((*vertexCollectionHandle).size());
3261 
3262  reco::GsfElectronCollection::const_iterator gsfIter;
3263  std::vector<reco::GsfElectron>::const_iterator gsfIter3;
3264  std::vector<reco::GsfElectron>::const_iterator gsfIter4;
3265 
3266  //===============================================
3267  // get a vector with EB & EE
3268  //===============================================
3269  std::vector<reco::GsfElectron> localCollection;
3270  int iBarrels = 0;
3271  int iEndcaps = 0;
3272 
3273  // looking for EB
3274  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
3275  if (gsfIter->isEB()) {
3276  localCollection.push_back(*gsfIter);
3277  iBarrels += 1;
3278  }
3279  }
3280 
3281  // looking for EE
3282  for (gsfIter = gsfElectronsEndcaps->begin(); gsfIter != gsfElectronsEndcaps->end(); gsfIter++) {
3283  if (gsfIter->isEE()) {
3284  localCollection.push_back(*gsfIter);
3285  iEndcaps += 1;
3286  }
3287  }
3288 
3289  //===============================================
3290  // all rec electrons
3291  //===============================================
3292 
3293  // mee only
3294  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3295  float enrj1 = gsfIter3->ecalEnergy();
3296 
3297  for (gsfIter4 = gsfIter3 + 1; gsfIter4 != localCollection.end(); gsfIter4++) {
3298  math::XYZTLorentzVector p12 = (*gsfIter3).p4() + (*gsfIter4).p4();
3299  float mee2 = p12.Dot(p12);
3300  float enrj2 = gsfIter4->ecalEnergy();
3301  h1_ele_mee_all->Fill(sqrt(mee2));
3302  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2), enrj2 - enrj1);
3303  if (gsfIter3->ecalDrivenSeed() && gsfIter4->ecalDrivenSeed()) {
3304  h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2), enrj2 - enrj1);
3305  }
3306  if (gsfIter3->charge() * gsfIter4->charge() < 0.) {
3307  h1_ele_mee_os->Fill(sqrt(mee2));
3308  if (gsfIter3->isEB() && gsfIter4->isEB()) {
3309  h1_ele_mee_os_ebeb->Fill(sqrt(mee2));
3310  }
3311  if ((gsfIter3->isEB() && gsfIter4->isEE()) || (gsfIter3->isEE() && gsfIter4->isEB()))
3312  h1_ele_mee_os_ebee->Fill(sqrt(mee2));
3313  if (gsfIter3->isEE() && gsfIter4->isEE()) {
3314  h1_ele_mee_os_eeee->Fill(sqrt(mee2));
3315  }
3316  if ((gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3317  (gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::BIGBREM) ||
3318  (gsfIter3->classification() == GsfElectron::BIGBREM && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3319  (gsfIter3->classification() == GsfElectron::BIGBREM &&
3320  gsfIter4->classification() == GsfElectron::BIGBREM)) {
3321  h1_ele_mee_os_gg->Fill(sqrt(mee2));
3322  } else if ((gsfIter3->classification() == GsfElectron::SHOWERING &&
3323  gsfIter4->classification() == GsfElectron::SHOWERING) ||
3324  (gsfIter3->classification() == GsfElectron::SHOWERING && gsfIter4->isGap()) ||
3325  (gsfIter3->isGap() && gsfIter4->classification() == GsfElectron::SHOWERING) ||
3326  (gsfIter3->isGap() && gsfIter4->isGap())) {
3327  h1_ele_mee_os_bb->Fill(sqrt(mee2));
3328  } else {
3329  h1_ele_mee_os_gb->Fill(sqrt(mee2));
3330  }
3331  }
3332  }
3333  }
3334 
3335  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3336  // preselect electrons
3337  if (gsfIter3->pt() > maxPt_ || std::abs(gsfIter3->eta()) > maxAbsEta_)
3338  continue;
3339 
3340  h1_ele_EoverP_all->Fill(gsfIter3->eSuperClusterOverP());
3341  h1_ele_EseedOP_all->Fill(gsfIter3->eSeedClusterOverP());
3342  h1_ele_EoPout_all->Fill(gsfIter3->eSeedClusterOverPout());
3343  h1_ele_EeleOPout_all->Fill(gsfIter3->eEleClusterOverPout());
3344  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter3->deltaEtaSuperClusterTrackAtVtx());
3345  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter3->deltaPhiSuperClusterTrackAtVtx());
3346  h1_ele_dEtaCl_propOut_all->Fill(gsfIter3->deltaEtaSeedClusterTrackAtCalo());
3347  h1_ele_dPhiCl_propOut_all->Fill(gsfIter3->deltaPhiSeedClusterTrackAtCalo());
3348  h1_ele_HoE_all->Fill(gsfIter3->hcalOverEcal());
3349  h1_ele_HoE_bc_all->Fill(gsfIter3->hcalOverEcalBc());
3350  h1_ele_TIP_all->Fill(EleRelPoint(gsfIter3->vertex(), theBeamSpot->position()).perp());
3351  h1_ele_vertexEta_all->Fill(gsfIter3->eta());
3352  h1_ele_vertexPt_all->Fill(gsfIter3->pt());
3353  h1_ele_Et_all->Fill(gsfIter3->ecalEnergy() / cosh(gsfIter3->superCluster()->eta()));
3354 
3355  // conversion rejection
3356  int flags = gsfIter3->convFlags();
3357  if (flags == -9999) {
3358  flags = -1;
3359  }
3360  h1_ele_convFlags_all->Fill(flags);
3361  if (flags >= 0.) {
3362  h1_ele_convDist_all->Fill(gsfIter3->convDist());
3363  h1_ele_convDcot_all->Fill(gsfIter3->convDcot());
3364  h1_ele_convRadius_all->Fill(gsfIter3->convRadius());
3365  }
3366  }
3367 
3368  //===============================================
3369  // charge mis-ID
3370  //===============================================
3371 
3372  int mcNum = 0, gamNum = 0, eleNum = 0;
3373  bool matchingID, matchingMotherID;
3374 
3375  reco::GenParticleCollection::const_iterator mcIter;
3376  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3377  // select requested matching gen particle
3378  matchingID = false;
3379  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3380  if (mcIter->pdgId() == matchingIDs_[i]) {
3381  matchingID = true;
3382  }
3383  }
3384  if (matchingID) {
3385  // select requested mother matching gen particle
3386  // always include single particle with no mother
3387  const Candidate *mother = mcIter->mother();
3388  matchingMotherID = false;
3389  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3390  if (mother == nullptr) {
3391  matchingMotherID = true;
3392  } else if (mother->pdgId() == matchingMotherIDs_[i]) {
3393  if (mother->numberOfDaughters() <= 2) {
3394  matchingMotherID = true;
3395  }
3396  } // end of mother if test
3397  }
3398  if (matchingMotherID) {
3399  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEta_) {
3400  continue;
3401  }
3402 
3403  // looking for the best matching gsf electron
3404  bool okGsfFound = false;
3405  double gsfOkRatio = 999999.;
3406 
3407  // find best matched electron
3408  reco::GsfElectron bestGsfElectron;
3409  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3410  double dphi = gsfIter3->phi() - mcIter->phi();
3411  if (std::abs(dphi) > CLHEP::pi) {
3412  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3413  }
3414  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3415  if (deltaR2 < deltaR2_) {
3416  double mc_charge = mcIter->pdgId() == 11 ? -1. : 1.;
3417  h1_ele_ChargeMnChargeTrue->Fill(std::abs(gsfIter3->charge() - mc_charge));
3418  // require here a charge mismatch
3419  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() > 0.)) ||
3420  ((mcIter->pdgId() == -11) && (gsfIter3->charge() < 0.))) {
3421  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3422  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3423  gsfOkRatio = tmpGsfRatio;
3424  bestGsfElectron = *gsfIter3;
3425  okGsfFound = true;
3426  }
3427  }
3428  }
3429  } // loop over rec ele to look for the best one
3430 
3431  // analysis when the mc track is found
3432  if (okGsfFound) {
3433  // generated distributions for matched electrons
3434  h1_mc_Pt_matched_qmisid->Fill(mcIter->pt());
3435  h1_mc_Phi_matched_qmisid->Fill(mcIter->phi());
3436  h1_mc_AbsEta_matched_qmisid->Fill(std::abs(mcIter->eta()));
3437  h1_mc_Eta_matched_qmisid->Fill(mcIter->eta());
3438  h1_mc_Z_matched_qmisid->Fill(mcIter->vz());
3439  }
3440  }
3441  }
3442  }
3443 
3444  //===============================================
3445  // association mc-reco
3446  //===============================================
3447 
3448  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3449  // number of mc particles
3450  mcNum++;
3451 
3452  // counts photons
3453  if (mcIter->pdgId() == 22) {
3454  gamNum++;
3455  }
3456 
3457  // select requested matching gen particle
3458  matchingID = false;
3459  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3460  if (mcIter->pdgId() == matchingIDs_[i]) {
3461  matchingID = true;
3462  }
3463  }
3464  if (!matchingID)
3465  continue;
3466 
3467  // select requested mother matching gen particle
3468  // always include single particle with no mother
3469  const Candidate *mother = mcIter->mother();
3470  matchingMotherID = false;
3471  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3472  if ((mother == nullptr) || ((mother != nullptr) && mother->pdgId() == matchingMotherIDs_[i])) {
3473  matchingMotherID = true;
3474  }
3475  }
3476  if (!matchingMotherID)
3477  continue;
3478 
3479  // electron preselection
3480  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEta_) {
3481  continue;
3482  }
3483 
3484  eleNum++;
3485  h1_mc_Eta->Fill(mcIter->eta());
3486  h1_mc_AbsEta->Fill(std::abs(mcIter->eta()));
3487  h1_mc_P->Fill(mcIter->p());
3488  h1_mc_Pt->Fill(mcIter->pt());
3489  h1_mc_Phi->Fill(mcIter->phi());
3490  h1_mc_Z->Fill(mcIter->vz());
3491  h2_mc_PtEta->Fill(mcIter->eta(), mcIter->pt());
3492 
3493  // find best matched electron
3494  bool okGsfFound = false;
3495  bool passMiniAODSelection = true;
3496  double gsfOkRatio = 999999.;
3497  bool isEBflag = false;
3498  bool isEEflag = false;
3499 
3500  reco::GsfElectron bestGsfElectron;
3501  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3502  // temporary cut for pt < 5.
3503  double dphi = gsfIter3->phi() - mcIter->phi();
3504  if (std::abs(dphi) > CLHEP::pi) {
3505  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3506  }
3507  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3508  if (deltaR2 < deltaR2_) {
3509  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() < 0.)) ||
3510  ((mcIter->pdgId() == -11) && (gsfIter3->charge() > 0.))) {
3511  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3512  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3513  gsfOkRatio = tmpGsfRatio;
3514  bestGsfElectron = *gsfIter3;
3515  okGsfFound = true;
3516  }
3517  }
3518  }
3519  } // loop over rec ele to look for the best one
3520 
3521  if (!okGsfFound)
3522  continue;
3523 
3524  //------------------------------------
3525  // analysis when the mc track is found
3526  //------------------------------------
3527  passMiniAODSelection = bestGsfElectron.pt() >= 5.;
3528  isEBflag = bestGsfElectron.isEB();
3529  isEEflag = bestGsfElectron.isEE();
3530 
3531  // electron related distributions
3532  h1_ele_charge->Fill(bestGsfElectron.charge());
3533  h2_ele_chargeVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.charge());
3534  h2_ele_chargeVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.charge());
3535  h2_ele_chargeVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.charge());
3536  h1_ele_vertexP->Fill(bestGsfElectron.p());
3537  h1_ele_vertexPt->Fill(bestGsfElectron.pt());
3538  if (bestGsfElectron.scSigmaIEtaIEta() == 0.)
3539  h1_ele_vertexPt_nocut->Fill(bestGsfElectron.pt());
3540  h1_ele_Et->Fill(bestGsfElectron.ecalEnergy() / cosh(bestGsfElectron.superCluster()->eta()));
3541  h2_ele_vertexPtVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.pt());
3542  h2_ele_vertexPtVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.pt());
3543  h1_ele_vertexEta->Fill(bestGsfElectron.eta());
3544 
3545  h2_scl_EoEtrueVsrecOfflineVertices->Fill((*vertexCollectionHandle).size(),
3546  bestGsfElectron.ecalEnergy() / mcIter->p());
3547  if (isEBflag)
3548  h2_scl_EoEtrueVsrecOfflineVertices_barrel->Fill((*vertexCollectionHandle).size(),
3549  bestGsfElectron.ecalEnergy() / mcIter->p());
3550  else if (isEEflag)
3551  h2_scl_EoEtrueVsrecOfflineVertices_endcaps->Fill((*vertexCollectionHandle).size(),
3552  bestGsfElectron.ecalEnergy() / mcIter->p());
3553 
3554  // generated distributions for matched electrons
3555  h1_mc_Pt_matched->Fill(mcIter->pt());
3556  h1_mc_Phi_matched->Fill(mcIter->phi());
3557  h1_mc_AbsEta_matched->Fill(std::abs(mcIter->eta()));
3558  h1_mc_Eta_matched->Fill(mcIter->eta());
3559  h2_mc_PtEta_matched->Fill(mcIter->eta(), mcIter->pt());
3560  h2_ele_vertexEtaVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta());
3561  h1_ele_vertexPhi->Fill(bestGsfElectron.phi());
3562  h1_ele_vertexX->Fill(bestGsfElectron.vertex().x());
3563  h1_ele_vertexY->Fill(bestGsfElectron.vertex().y());
3564  h1_ele_vertexZ->Fill(bestGsfElectron.vertex().z());
3565  h1_mc_Z_matched->Fill(mcIter->vz());
3566  double d = (bestGsfElectron.vertex().x() - mcIter->vx()) * (bestGsfElectron.vertex().x() - mcIter->vx()) +
3567  (bestGsfElectron.vertex().y() - mcIter->vy()) * (bestGsfElectron.vertex().y() - mcIter->vy());
3568  d = sqrt(d);
3569  h1_ele_vertexTIP->Fill(d);
3570  h2_ele_vertexTIPVsEta->Fill(bestGsfElectron.eta(), d);
3571  h2_ele_vertexTIPVsPhi->Fill(bestGsfElectron.phi(), d);
3572  h2_ele_vertexTIPVsPt->Fill(bestGsfElectron.pt(), d);
3573  h1_ele_EtaMnEtaTrue->Fill(bestGsfElectron.eta() - mcIter->eta());
3574  h2_ele_EtaMnEtaTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eta() - mcIter->eta());
3575  h2_ele_EtaMnEtaTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta() - mcIter->eta());
3576  h2_ele_EtaMnEtaTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.eta() - mcIter->eta());
3577  h1_ele_PhiMnPhiTrue->Fill(bestGsfElectron.phi() - mcIter->phi());
3578  h1_ele_PhiMnPhiTrue2->Fill(bestGsfElectron.phi() - mcIter->phi());
3579  h2_ele_PhiMnPhiTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.phi() - mcIter->phi());
3580  h2_ele_PhiMnPhiTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.phi() - mcIter->phi());
3581  h2_ele_PhiMnPhiTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.phi() - mcIter->phi());
3582  h1_ele_PoPtrue->Fill(bestGsfElectron.p() / mcIter->p());
3583  h1_ele_PtoPttrue->Fill(bestGsfElectron.pt() / mcIter->pt());
3584  h2_ele_PoPtrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.p() / mcIter->p());
3585  h2_ele_PoPtrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.p() / mcIter->p());
3586  h2_ele_PoPtrueVsPt->Fill(bestGsfElectron.py(), bestGsfElectron.p() / mcIter->p());
3587  h2_ele_sigmaIetaIetaVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.scSigmaIEtaIEta());
3589  h1_ele_combinedP4Error->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3590  if (isEBflag) {
3591  h1_ele_EtaMnEtaTrue_barrel->Fill(bestGsfElectron.eta() - mcIter->eta());
3592  h1_ele_PhiMnPhiTrue_barrel->Fill(bestGsfElectron.phi() - mcIter->phi());
3593  h1_ele_PoPtrue_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3594  h1_ele_PtoPttrue_barrel->Fill(bestGsfElectron.pt() / mcIter->pt());
3596  h1_ele_combinedP4Error_barrel->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3597  } else if (isEEflag) {
3598  h1_ele_EtaMnEtaTrue_endcaps->Fill(bestGsfElectron.eta() - mcIter->eta());
3599  h1_ele_PhiMnPhiTrue_endcaps->Fill(bestGsfElectron.phi() - mcIter->phi());
3600  h1_ele_PoPtrue_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3601  h1_ele_PtoPttrue_endcaps->Fill(bestGsfElectron.pt() / mcIter->pt());
3603  h1_ele_combinedP4Error_endcaps->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3604  }
3605 
3606  if (isEBflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3607  h1_ele_PoPtrue_golden_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3608  if (isEEflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3609  h1_ele_PoPtrue_golden_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3610  if (isEBflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3611  h1_ele_PoPtrue_showering_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3612  if (isEEflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3613  h1_ele_PoPtrue_showering_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3614 
3615  // supercluster related distributions
3616  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
3617 
3618  h1_scl_En->Fill(bestGsfElectron.ecalEnergy());
3619  if (isEBflag) {
3620  h1_scl_EoEtrue_barrel->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3621  h1_scl_EoEtrue_barrel_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3622  } else if (isEEflag) {
3623  h1_scl_EoEtrue_endcaps->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3624  h1_scl_EoEtrue_endcaps_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3625  }
3626  if (isEBflag && bestGsfElectron.isEBEtaGap())
3627  h1_scl_EoEtrue_barrel_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3628  if (isEBflag && bestGsfElectron.isEBPhiGap())
3629  h1_scl_EoEtrue_barrel_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3630  if (bestGsfElectron.isEBEEGap())
3631  h1_scl_EoEtrue_ebeegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3632  if (isEEflag && bestGsfElectron.isEEDeeGap())
3633  h1_scl_EoEtrue_endcaps_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3634  if (isEEflag && bestGsfElectron.isEERingGap())
3635  h1_scl_EoEtrue_endcaps_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3636  if (isEBflag && bestGsfElectron.isEBEtaGap())
3637  h1_scl_EoEtrue_barrel_new_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3638  if (isEBflag && bestGsfElectron.isEBPhiGap())
3639  h1_scl_EoEtrue_barrel_new_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3640  if (bestGsfElectron.isEBEEGap())
3641  h1_scl_EoEtrue_ebeegap_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3642  if (isEEflag && bestGsfElectron.isEEDeeGap())
3643  h1_scl_EoEtrue_endcaps_new_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3644  if (isEEflag && bestGsfElectron.isEERingGap())
3645  h1_scl_EoEtrue_endcaps_new_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3646 
3647  double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
3648  double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
3649  h1_scl_Et->Fill(sclRef->energy() * (Rt / R));
3650  h2_scl_EtVsEta->Fill(sclRef->eta(), sclRef->energy() * (Rt / R));
3651  h2_scl_EtVsPhi->Fill(sclRef->phi(), sclRef->energy() * (Rt / R));
3652  h1_scl_Eta->Fill(sclRef->eta());
3653  h2_scl_EtaVsPhi->Fill(sclRef->phi(), sclRef->eta());
3654  h1_scl_Phi->Fill(sclRef->phi());
3655  h1_scl_SigEtaEta->Fill(bestGsfElectron.scSigmaEtaEta());
3656  h1_scl_SigIEtaIEta->Fill(bestGsfElectron.scSigmaIEtaIEta());
3658  h1_scl_E1x5->Fill(bestGsfElectron.scE1x5());
3659  h1_scl_E2x5max->Fill(bestGsfElectron.scE2x5Max());
3660  h1_scl_E5x5->Fill(bestGsfElectron.scE5x5());
3661  if (isEBflag) {
3662  h1_scl_SigEtaEta_barrel->Fill(bestGsfElectron.scSigmaEtaEta());
3663  h1_scl_SigIEtaIEta_barrel->Fill(bestGsfElectron.scSigmaIEtaIEta());
3665  h1_scl_E1x5_barrel->Fill(bestGsfElectron.scE1x5());
3666  h1_scl_E2x5max_barrel->Fill(bestGsfElectron.scE2x5Max());
3667  h1_scl_E5x5_barrel->Fill(bestGsfElectron.scE5x5());
3668  } else if (isEEflag) {
3669  h1_scl_SigEtaEta_endcaps->Fill(bestGsfElectron.scSigmaEtaEta());
3670  h1_scl_SigIEtaIEta_endcaps->Fill(bestGsfElectron.scSigmaIEtaIEta());
3672  h1_scl_E1x5_endcaps->Fill(bestGsfElectron.scE1x5());
3673  h1_scl_E2x5max_endcaps->Fill(bestGsfElectron.scE2x5Max());
3674  h1_scl_E5x5_endcaps->Fill(bestGsfElectron.scE5x5());
3675  }
3676 
3677  if (passMiniAODSelection) { // Pt > 5.
3678  h1_scl_SigIEtaIEta_mAOD->Fill(bestGsfElectron.scSigmaIEtaIEta());
3679  if (isEBflag)
3681  else if (isEEflag)
3683  }
3684 
3685  float pfEnergy = 0.;
3686  if (!bestGsfElectron.parentSuperCluster().isNull())
3687  pfEnergy = bestGsfElectron.parentSuperCluster()->energy();
3688  h2_scl_EoEtruePfVsEg->Fill(bestGsfElectron.ecalEnergy() / mcIter->p(), pfEnergy / mcIter->p());
3689  if (isEEflag)
3690  h1_scl_ESFrac_endcaps->Fill(sclRef->preshowerEnergy() / sclRef->rawEnergy());
3691 
3692  float Etot = 0.;
3693  CaloCluster_iterator it = bestGsfElectron.superCluster()->clustersBegin();
3694  CaloCluster_iterator itend = bestGsfElectron.superCluster()->clustersEnd();
3695  for (; it != itend; ++it) {
3696  Etot += (*it)->energy();
3697  }
3698  h1_scl_bcl_EtotoEtrue->Fill(Etot / mcIter->p());
3699  if (isEBflag)
3700  h1_scl_bcl_EtotoEtrue_barrel->Fill(Etot / mcIter->p());
3701  else if (isEEflag)
3702  h1_scl_bcl_EtotoEtrue_endcaps->Fill(Etot / mcIter->p());
3703 
3704  // track related distributions
3706  h2_ele_ambiguousTracksVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize());
3707  h2_ele_ambiguousTracksVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize());
3708  h2_ele_ambiguousTracksVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize());
3709  if (!readAOD_) // track extra does not exist in AOD
3710  {
3711  h1_ele_foundHits->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3712  h2_ele_foundHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3713  h2_ele_foundHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3714  h2_ele_foundHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3715  h1_ele_lostHits->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3716  h2_ele_lostHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3717  h2_ele_lostHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3718  h2_ele_lostHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3719  h1_ele_chi2->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3720  h2_ele_chi2VsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2());
3721  h2_ele_chi2VsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2());
3722  h2_ele_chi2VsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2());
3723  if (isEBflag) {
3724  h1_ele_foundHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3725  h1_ele_lostHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3726  h1_ele_chi2_barrel->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3727  } else if (isEEflag) {
3728  h1_ele_foundHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3729  h1_ele_lostHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3730  h1_ele_chi2_endcaps->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3731  }
3732 
3733  if (passMiniAODSelection) { // Pt > 5.
3734  h2_ele_foundHitsVsEta_mAOD->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3735  }
3736  }
3737  // from gsf track interface, hence using mean
3738  if (!readAOD_) // track extra does not exist in AOD
3739  {
3740  h1_ele_PinMnPout->Fill(bestGsfElectron.gsfTrack()->innerMomentum().R() -
3741  bestGsfElectron.gsfTrack()->outerMomentum().R());
3742  h1_ele_outerP->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R());
3743  h1_ele_outerPt->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho());
3744  }
3745  // from electron interface, hence using mode
3746  h1_ele_PinMnPout_mode->Fill(bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3747  h2_ele_PinMnPoutVsEta_mode->Fill(bestGsfElectron.eta(),
3748  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3749  h2_ele_PinMnPoutVsPhi_mode->Fill(bestGsfElectron.phi(),
3750  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3751  h2_ele_PinMnPoutVsPt_mode->Fill(bestGsfElectron.pt(),
3752  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3753  h2_ele_PinMnPoutVsE_mode->Fill(bestGsfElectron.caloEnergy(),
3754  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3755  if (!readAOD_) // track extra does not exist in AOD
3756  {
3758  bestGsfElectron.gsfTrack()->normalizedChi2(),
3759  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3760  }
3761  h1_ele_outerP_mode->Fill(bestGsfElectron.trackMomentumOut().R());
3762  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R());
3763  h1_ele_outerPt_mode->Fill(bestGsfElectron.trackMomentumOut().Rho());
3764  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho());
3765  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho());
3766  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho());
3767 
3768  if (!readAOD_) // track extra does not exist in AOD
3769  {
3770  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
3771  ElectronSeedRef elseed = seed.castTo<ElectronSeedRef>();
3772  h1_ele_seed_subdet2->Fill(elseed->subDet(1));
3773  h1_ele_seed_mask->Fill(elseed->hitsMask());
3774  if (elseed->subDet(1) == 1) {
3775  h1_ele_seed_mask_bpix->Fill(elseed->hitsMask());
3776  } else if (elseed->subDet(1) == 2) {
3777  h1_ele_seed_mask_fpix->Fill(elseed->hitsMask());
3778  } else if (elseed->subDet(1) == 6) {
3779  h1_ele_seed_mask_tec->Fill(elseed->hitsMask());
3780  }
3781 
3782  if (elseed->dPhiNeg(1) != std::numeric_limits<float>::infinity()) {
3783  h1_ele_seed_dphi2->Fill(elseed->dPhiNeg(1));
3784  h2_ele_seed_dphi2VsEta->Fill(bestGsfElectron.eta(), elseed->dPhiNeg(1));
3785  h2_ele_seed_dphi2VsPt->Fill(bestGsfElectron.pt(), elseed->dPhiNeg(1));
3786  } else {
3787  }
3788  if (elseed->dPhiPos(1) != std::numeric_limits<float>::infinity()) {
3789  h1_ele_seed_dphi2pos->Fill(elseed->dPhiPos(1));
3790  h2_ele_seed_dphi2posVsEta->Fill(bestGsfElectron.eta(), elseed->dPhiPos(1));
3791  h2_ele_seed_dphi2posVsPt->Fill(bestGsfElectron.pt(), elseed->dPhiPos(1));
3792  }
3793  if (elseed->dRZNeg(1) != std::numeric_limits<float>::infinity()) {
3794  h1_ele_seed_drz2->Fill(elseed->dRZNeg(1));
3795  h2_ele_seed_drz2VsEta->Fill(bestGsfElectron.eta(), elseed->dRZNeg(1));
3796  h2_ele_seed_drz2VsPt->Fill(bestGsfElectron.pt(), elseed->dRZNeg(1));
3797  }
3798  if (elseed->dRZPos(1) != std::numeric_limits<float>::infinity()) {
3799  h1_ele_seed_drz2pos->Fill(elseed->dRZPos(1));
3800  h2_ele_seed_drz2posVsEta->Fill(bestGsfElectron.eta(), elseed->dRZPos(1));
3801  h2_ele_seed_drz2posVsPt->Fill(bestGsfElectron.pt(), elseed->dRZPos(1));
3802  }
3803  }
3804 
3805  // match distributions
3806  h1_ele_EoP->Fill(bestGsfElectron.eSuperClusterOverP());
3807  h2_ele_EoPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3808  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP());
3809  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP());
3810  h1_ele_EseedOP->Fill(bestGsfElectron.eSeedClusterOverP());
3811  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP());
3812  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP());
3813  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP());
3814  h1_ele_EoPout->Fill(bestGsfElectron.eSeedClusterOverPout());
3815  h2_ele_EoPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout());
3816  h2_ele_EoPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout());
3817  h2_ele_EoPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout());
3818  h1_ele_EeleOPout->Fill(bestGsfElectron.eEleClusterOverPout());
3819  h2_ele_EeleOPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout());
3820  h2_ele_EeleOPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout());
3821  h2_ele_EeleOPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout());
3823  h2_ele_dEtaScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3824  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3825  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3827  h2_ele_dPhiScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3828  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3829  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3831  h2_ele_dEtaClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3832  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3833  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3835  h2_ele_dPhiClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3836  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3837  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3839  h2_ele_dEtaEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3840  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3841  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3843  h2_ele_dPhiEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3844  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3845  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3846  h1_ele_HoE->Fill(bestGsfElectron.hcalOverEcal());
3847  h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc());
3848  if (isEBflag) {
3849  h1_ele_EoP_barrel->Fill(bestGsfElectron.eSuperClusterOverP());
3850  h1_ele_EseedOP_barrel->Fill(bestGsfElectron.eSeedClusterOverP());
3851  h1_ele_EoPout_barrel->Fill(bestGsfElectron.eSeedClusterOverPout());
3852  h1_ele_EeleOPout_barrel->Fill(bestGsfElectron.eEleClusterOverPout());
3859  h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc());
3860  h1_ele_HoE_barrel->Fill(bestGsfElectron.hcalOverEcal());
3861  } else if (isEEflag) {
3862  h1_ele_EoP_endcaps->Fill(bestGsfElectron.eSuperClusterOverP());
3863  h1_ele_EseedOP_endcaps->Fill(bestGsfElectron.eSeedClusterOverP());
3864  h1_ele_EoPout_endcaps->Fill(bestGsfElectron.eSeedClusterOverPout());
3872  h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc());
3873  h1_ele_HoE_endcaps->Fill(bestGsfElectron.hcalOverEcal());
3874  }
3875 
3876  if (passMiniAODSelection) { // Pt > 5.
3879  h1_ele_HoE_mAOD->Fill(bestGsfElectron.hcalOverEcal());
3880  if (isEBflag) {
3883  h1_ele_HoE_mAOD_barrel->Fill(bestGsfElectron.hcalOverEcal());
3884  } else if (isEEflag) {
3887  h1_ele_HoE_mAOD_endcaps->Fill(bestGsfElectron.hcalOverEcal());
3888  }
3889  }
3890 
3891  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap() && !bestGsfElectron.isEBEEGap() &&
3892  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap())
3893  h1_ele_HoE_fiducial->Fill(bestGsfElectron.hcalOverEcal());
3894  h2_ele_HoEVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.hcalOverEcal());
3895  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.hcalOverEcal());
3896  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.hcalOverEcal());
3897 
3898  //classes
3899  int eleClass = bestGsfElectron.classification();
3900  if (isEEflag)
3901  eleClass += 10;
3902  h1_ele_classes->Fill(eleClass);
3903 
3904  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEBflag)
3905  h1_scl_EoEtrueGolden_barrel->Fill(sclRef->energy() / mcIter->p());
3906  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEEflag)
3907  h1_scl_EoEtrueGolden_endcaps->Fill(sclRef->energy() / mcIter->p());
3908  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEBflag)
3909  h1_scl_EoEtrueShowering_barrel->Fill(sclRef->energy() / mcIter->p());
3910  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEEflag)
3911  h1_scl_EoEtrueShowering_endcaps->Fill(sclRef->energy() / mcIter->p());
3912 
3913  //eleClass = eleClass%100; // get rid of barrel/endcap distinction
3914  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
3915  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3916  h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
3917  if (bestGsfElectron.classification() == GsfElectron::BIGBREM)
3918  h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
3919  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3920  h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
3921 
3922  // fbrem
3923 
3924  double fbrem_mode = bestGsfElectron.fbrem();
3925  h1_ele_fbrem->Fill(fbrem_mode);
3926  if (passMiniAODSelection) { // Pt > 5.
3927  h1_ele_fbrem_mAOD->Fill(fbrem_mode);
3928  }
3929  if (isEBflag) {
3930  double fbrem_mode_barrel = bestGsfElectron.fbrem();
3931  h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel);
3932  if (passMiniAODSelection) { // Pt > 5.
3933  h1_ele_fbrem_mAOD_barrel->Fill(fbrem_mode_barrel);
3934  }
3935  } else if (isEEflag) {
3936  double fbrem_mode_endcaps = bestGsfElectron.fbrem();
3937  h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps);
3938  if (passMiniAODSelection) { // Pt > 5.
3939  h1_ele_fbrem_mAOD_endcaps->Fill(fbrem_mode_endcaps);
3940  }
3941  }
3942 
3943  double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem();
3944  h1_ele_superclusterfbrem->Fill(superclusterfbrem_mode);
3945 
3946  if (isEBflag) {
3947  double superclusterfbrem_mode_barrel = bestGsfElectron.superClusterFbrem();
3948  h1_ele_superclusterfbrem_barrel->Fill(superclusterfbrem_mode_barrel);
3949  } else if (isEEflag) {
3950  double superclusterfbrem_mode_endcaps = bestGsfElectron.superClusterFbrem();
3951  h1_ele_superclusterfbrem_endcaps->Fill(superclusterfbrem_mode_endcaps);
3952  }
3953 
3954  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(), fbrem_mode);
3955 
3956  if (!readAOD_) // track extra does not exist in AOD
3957  {
3958  double fbrem_mean =
3959  1. - bestGsfElectron.gsfTrack()->outerMomentum().R() / bestGsfElectron.gsfTrack()->innerMomentum().R();
3960  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(), fbrem_mean);
3961  }
3962 
3963  //
3964 
3965  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3966  h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
3967  bestGsfElectron.trackMomentumAtVtx().R());
3968  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3969  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
3970  bestGsfElectron.trackMomentumAtVtx().R());
3971  if (!readAOD_) // track extra not available in AOD
3972  {
3973  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3974  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
3975  bestGsfElectron.gsfTrack()->innerMomentum().R());
3976  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3977  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
3978  bestGsfElectron.gsfTrack()->innerMomentum().R());
3979  }
3980  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3981  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
3982  bestGsfElectron.trackMomentumAtVtx().Rho());
3983  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3984  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
3985  bestGsfElectron.trackMomentumAtVtx().Rho());
3986  if (!readAOD_) // track extra not available in AOD
3987  {
3988  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3989  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
3990  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
3991  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3992  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
3993  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
3994  }
3995 
3996  // provenance and pflow data
3997  h1_ele_mva->Fill(bestGsfElectron.mva_e_pi());
3998  h1_ele_mva_isolated->Fill(bestGsfElectron.mva_Isolated());
3999  if (isEBflag) {
4000  h1_ele_mva_barrel->Fill(bestGsfElectron.mva_e_pi());
4001  h1_ele_mva_barrel_isolated->Fill(bestGsfElectron.mva_Isolated());
4002  } else if (isEEflag) {
4003  h1_ele_mva_endcaps->Fill(bestGsfElectron.mva_e_pi());
4004  h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated());
4005  }
4006  if (bestGsfElectron.ecalDrivenSeed())
4007  h1_ele_provenance->Fill(1.);
4008  if (bestGsfElectron.trackerDrivenSeed())
4009  h1_ele_provenance->Fill(-1.);
4010  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed())
4011  h1_ele_provenance->Fill(0.);
4012  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed())
4013  h1_ele_provenance->Fill(-2.);
4014  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed())
4015  h1_ele_provenance->Fill(2.);
4016 
4017  if (bestGsfElectron.ecalDrivenSeed() && isEBflag)
4019  if (bestGsfElectron.trackerDrivenSeed() && isEBflag)
4021  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEBflag)
4023  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEBflag)
4025  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEBflag)
4027  if (bestGsfElectron.ecalDrivenSeed() && isEEflag)
4029  if (bestGsfElectron.trackerDrivenSeed() && isEEflag)
4031  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEEflag)
4033  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEEflag)
4035  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEEflag)
4037 
4038  if (bestGsfElectron.isGsfCtfScPixChargeConsistent())
4039  h1_ele_chargeInfo->Fill(-1.0);
4040  if (bestGsfElectron.isGsfScPixChargeConsistent())
4041  h1_ele_chargeInfo->Fill(0.);
4042  if (bestGsfElectron.isGsfCtfChargeConsistent())
4043  h1_ele_chargeInfo->Fill(1.0);
4044 
4045  // Pflow isolation
4049  h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4050  if (isEBflag) {
4054  }
4055 
4056  else if (isEEflag) {
4060  }
4061 
4062  // -- pflow over pT
4064  bestGsfElectron.pt());
4066  bestGsfElectron.pt());
4067  if (isEBflag) {
4069  bestGsfElectron.pt());
4071  bestGsfElectron.pt());
4072  h1_ele_photonRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4073  } else if (isEEflag) {
4075  bestGsfElectron.pt());
4077  bestGsfElectron.pt());
4078  h1_ele_photonRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4079  }
4080  if (passMiniAODSelection) { // Pt > 5.
4082  bestGsfElectron.pt());
4084  bestGsfElectron.pt());
4085  h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4086  if (isEBflag) {
4088  bestGsfElectron.pt());
4090  bestGsfElectron.pt());
4092  bestGsfElectron.pt());
4093  } else if (isEEflag) {
4095  bestGsfElectron.pt());
4097  bestGsfElectron.pt());
4099  bestGsfElectron.pt());
4100  }
4101  }
4102 
4103  // isolation
4104  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
4110  h1_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt());
4116  h1_ele_hcalDepth1OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(1));
4117  h1_ele_hcalDepth2OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(2));
4118  if (isEBflag) {
4119  h1_ele_tkSumPt_dr03_barrel->Fill(bestGsfElectron.dr03TkSumPt());
4125  h1_ele_tkSumPt_dr04_barrel->Fill(bestGsfElectron.dr04TkSumPt());
4133  } else if (isEEflag) {
4134  h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt());
4140  h1_ele_tkSumPt_dr04_endcaps->Fill(bestGsfElectron.dr04TkSumPt());
4148  }
4149 
4150  // conversion rejection
4151  int flags = bestGsfElectron.convFlags();
4152  if (flags == -9999) {
4153  flags = -1;
4154  }
4155  h1_ele_convFlags->Fill(flags);
4156  if (flags >= 0.) {
4157  h1_ele_convDist->Fill(bestGsfElectron.convDist());
4158  h1_ele_convDcot->Fill(bestGsfElectron.convDcot());
4159  h1_ele_convRadius->Fill(bestGsfElectron.convRadius());
4160  }
4161 
4162  } // loop over mc particle
4163  h1_mcNum->Fill(mcNum);
4164  h1_eleNum->Fill(eleNum);
4165 }
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:729
MonitorElement * h1_ele_ecalEnergyError_endcaps
float dr03HcalTowerSumEtBc(int depth=0) const
Definition: GsfElectron.h:593
MonitorElement * h1_scl_EoEtrue_endcaps_ringgap
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_endcaps
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1_barrel
MonitorElement * h1_ele_ecalRecHitSumEt_dr04_barrel
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_barrel
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_endcaps
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalFull04Tag_
float scSigmaEtaEta() const
Definition: GsfElectron.h:495
bool isEBEtaGap() const
Definition: GsfElectron.h:333
virtual SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:160
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollection_
double pt() const final
transverse momentum
MonitorElement * h1_ele_photonRelativeIso_mAOD
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk03Tag_
bool isEBEEGap() const
Definition: GsfElectron.h:331
MonitorElement * h1_scl_bcl_EtotoEtrue_endcaps
MonitorElement * h1_ele_hcalDepth1OverEcalBc_barrel
MonitorElement * h1_ele_photonRelativeIso_mAOD_barrel
MonitorElement * h1_ele_neutralHadronRelativeIso_endcaps
MonitorElement * h1_ele_neutralHadronRelativeIso_barrel
MonitorElement * h1_ele_dPhiEleCl_propOut_endcaps
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:268
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2_endcaps
MonitorElement * h2_ele_dEtaEleClVsEta_propOut
edm::EDGetTokenT< reco::GenParticleCollection > mcTruthCollection_
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_endcaps
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollectionEndcaps_
MonitorElement * h1_ele_dEtaSc_propVtx_endcaps
float p4Error(P4Kind kind) const
Definition: GsfElectron.cc:230
MonitorElement * h1_ele_dEtaSc_propVtx_all_endcaps
float dr03HcalTowerSumEt(int depth=0) const
Definition: GsfElectron.h:576
MonitorElement * h1_ele_dPhiCl_propOut_all_endcaps
float dr04TkSumPt() const
Definition: GsfElectron.h:597
MonitorElement * h1_ele_chargedHadronRelativeIso
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps
bool isEERingGap() const
Definition: GsfElectron.h:337
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal04Tag_
const Point & vertex() const override
vertex position (overwritten by PF...)
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalReduced03Tag_
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1
MonitorElement * h2_ele_PtinVsPtoutShowering_mode
MonitorElement * h1_ele_PoPtrue_showering_barrel
float fbrem() const
Definition: GsfElectron.h:809
MonitorElement * h1_ele_hcalDepth2OverEcalBc_barrel
float scE2x5Max() const
Definition: GsfElectron.h:498
MonitorElement * h2_scl_EoEtrueVsrecOfflineVertices_endcaps
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1_endcaps
float convDist() const
Definition: GsfElectron.h:645
float convRadius() const
Definition: GsfElectron.h:647
bool isEEDeeGap() const
Definition: GsfElectron.h:336
MonitorElement * h1_ele_chargedHadronIso_endcaps
float superClusterFbrem() const
Definition: GsfElectron.h:803
MonitorElement * h2_ele_dPhiEleClVsPhi_propOut
bool isEE() const
Definition: GsfElectron.h:329
bool isEB() const
Definition: GsfElectron.h:328
MonitorElement * h1_ele_neutralHadronIso_endcaps
MonitorElement * h2_ele_PtinVsPtoutGolden_mean
MonitorElement * h2_ele_dEtaEleClVsPhi_propOut
MonitorElement * h1_ele_dPhiSc_propVtx_all_endcaps
const Double_t pi
float convDcot() const
Definition: GsfElectron.h:646
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:471
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1
edm::EDGetTokenT< reco::GsfElectronCoreCollection > electronCoreCollection_
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_endcaps
void Fill(long long x)
bool isGsfScPixChargeConsistent() const
Definition: GsfElectron.h:129
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel
tuple d
Definition: ztail.py:151
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
MonitorElement * bookH1(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
float hcalOverEcalBc(const ShowerShape &ss, int depth) const
Definition: GsfElectron.h:442
MonitorElement * h1_ele_PoPtrue_showering_endcaps
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:563
MonitorElement * h1_ele_hcalDepth2OverEcalBc_endcaps
virtual size_type numberOfDaughters() const =0
number of daughters
MonitorElement * h1_ele_chargedHadronRelativeIso_endcaps
MonitorElement * h2_ele_PtinVsPtoutGolden_mode
MonitorElement * h1_ele_neutralHadronIso_barrel
edm::EDGetTokenT< reco::VertexCollection > offlineVerticesCollection_
bool isGsfCtfChargeConsistent() const
Definition: GsfElectron.h:130
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
int iEvent
Definition: GenABIO.cc:224
MonitorElement * h1_ele_dEtaEleCl_propOut_endcaps
double p() const final
magnitude of momentum vector
float eSeedClusterOverP() const
Definition: GsfElectron.h:222
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_endcaps
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * h1_ele_dPhiSc_propVtx_endcaps
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:599
float deltaPhiSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:229
T sqrt(T t)
Definition: SSEVec.h:19
MonitorElement * bookP1(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:270
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:665
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
MonitorElement * h2_ele_dPhiEleClVsEta_propOut
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
const double infinity
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps
float dr03TkSumPt() const
Definition: GsfElectron.h:557
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * h1_scl_EoEtrueShowering_endcaps
MonitorElement * h1_ele_hcalDepth1OverEcalBc_endcaps
float eEleClusterOverPout() const
Definition: GsfElectron.h:224
MonitorElement * h1_ele_chargedHadronIso_barrel
MonitorElement * h1_ele_dEtaSc_propVtx_all_barrel
void setBookPrefix(const std::string &)
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:664
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_barrel
MonitorElement * h1_scl_SigIEtaIEta_mAOD_endcaps
float eSeedClusterOverPout() const
Definition: GsfElectron.h:223
MonitorElement * h1_ele_ecalEnergyError_barrel
double py() const final
y coordinate of momentum vector
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:496
edm::EDGetTokenT< reco::GsfTrackCollection > electronTrackCollection_
MonitorElement * h1_ele_neutralHadronRelativeIso
bool isNull() const
Checks for null.
Definition: Ref.h:235
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1
MonitorElement * h1_ele_combinedP4Error_barrel
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:230
MonitorElement * h1_ele_dPhiSc_propVtx_all_barrel
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1
MonitorElement * h1_scl_EoEtrueShowering_barrel
void setBookEfficiencyFlag(const bool &)
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_barrel
virtual int pdgId() const =0
PDG identifier.
Log< level::Info, false > LogInfo
MonitorElement * h1_ele_superclusterfbrem_endcaps
MonitorElement * h1_ele_dPhiEleCl_propOut_barrel
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk04Tag_
MonitorElement * h2_scl_EoEtrueVsrecOfflineVertices
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel
MonitorElement * h1_scl_EoEtrue_barrel_new_etagap
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2
float deltaEtaEleClusterTrackAtCalo() const
Definition: GsfElectron.h:227
MonitorElement * h1_ele_photonRelativeIso_endcaps
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_endcaps
Classification classification() const
Definition: GsfElectron.h:805
MonitorElement * bookH2withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
REF castTo() const
Definition: RefToBase.h:257
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_barrel
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * h1_ele_photonRelativeIso_mAOD_endcaps
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
Definition: GsfElectron.h:766
MonitorElement * h1_ele_dEtaCl_propOut_endcaps
ElectronMcSignalValidator(const edm::ParameterSet &conf)
MonitorElement * h2_ele_PinVsPoutShowering_mean
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel
float ecalEnergy() const
Definition: GsfElectron.h:896
float mva_Isolated() const
Definition: GsfElectron.h:743
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:559
float mva_e_pi() const
Definition: GsfElectron.h:744
MonitorElement * h1_ele_dPhiCl_propOut_all_barrel
MonitorElement * h1_ele_dEtaCl_propOut_all_barrel
float correctedEcalEnergyError() const
Definition: GsfElectron.h:883
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalFull03Tag_
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2_barrel
edm::EventID id() const
Definition: EventBase.h:59
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:226
T perp() const
Magnitude of transverse component.
MonitorElement * h1_ele_superclusterfbrem_barrel
MonitorElement * h1_ele_combinedP4Error_endcaps
MonitorElement * bookH2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
MonitorElement * bookH1withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
int convFlags() const
Definition: GsfElectron.h:643
float dr04HcalTowerSumEtBc(int depth=0) const
Definition: GsfElectron.h:601
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_barrel
bool isEBPhiGap() const
Definition: GsfElectron.h:334
MonitorElement * h1_scl_EoEtrue_endcaps_new_deegap
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_barrel
bool isGsfCtfScPixChargeConsistent() const
Definition: GsfElectron.h:128
float hcalOverEcal(const ShowerShape &ss, int depth) const
Definition: GsfElectron.h:425
bool trackerDrivenSeed() const
Definition: GsfElectron.h:159
MonitorElement * h2_ele_PinVsPoutShowering_mode
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2_endcaps
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_barrel
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h1_ele_ecalRecHitSumEt_dr04_endcaps
MonitorElement * h1_ele_dEtaCl_propOut_all_endcaps
float scE5x5() const
Definition: GsfElectron.h:499
MonitorElement * h1_ele_chargedHadronRelativeIso_barrel
MonitorElement * h1_ele_photonRelativeIso_barrel
float dr04HcalTowerSumEt(int depth=0) const
Definition: GsfElectron.h:600
MonitorElement * h1_scl_SigIEtaIEta_mAOD_barrel
double phi() const final
momentum azimuthal angle
void setBookStatOverflowFlag(const bool &)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
Definition: GsfElectron.h:663
float caloEnergy() const
Definition: GsfElectron.h:899
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth2
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps
MonitorElement * h1_scl_EoEtrue_barrel_new_phigap
MonitorElement * h2_ele_PtinVsPtoutShowering_mean
MonitorElement * h1_scl_EoEtrue_endcaps_new_ringgap
MonitorElement * h1_scl_EoEtrue_endcaps_deegap
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD
MonitorElement * h1_ele_dEtaEleCl_propOut_barrel
edm::EDGetTokenT< reco::ElectronSeedCollection > electronSeedCollection_
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_endcaps
MonitorElement * h2_scl_EoEtrueVsrecOfflineVertices_barrel
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalReduced04Tag_
MonitorElement * h1_ele_dPhiCl_propOut_endcaps
MonitorElement * h1_ele_PoPtrue_golden_endcaps
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
Definition: Run.h:45
int charge() const final
electric charge
float scE1x5() const
Definition: GsfElectron.h:497
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal03Tag_
bool ecalDrivenSeed() const
Definition: GsfElectron.h:158
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2_barrel
double eta() const final
momentum pseudorapidity