CMS 3D CMS Logo

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  maxAbsEtaExtended_ = conf.getParameter<double>("MaxAbsEtaExtended");
85  deltaR2_ = conf.getParameter<double>("DeltaR") * conf.getParameter<double>("DeltaR");
86  matchingIDs_ = conf.getParameter<std::vector<int> >("MatchingID");
87  matchingMotherIDs_ = conf.getParameter<std::vector<int> >("MatchingMotherID");
88  inputFile_ = conf.getParameter<std::string>("InputFile");
89  outputFile_ = conf.getParameter<std::string>("OutputFile");
90  inputInternalPath_ = conf.getParameter<std::string>("InputFolderName");
91  outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName");
92 
93  // histos bining and limits
94 
95  edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg");
96 
97  xyz_nbin = histosSet.getParameter<int>("Nbinxyz");
98 
99  p_nbin = histosSet.getParameter<int>("Nbinp");
100  p2D_nbin = histosSet.getParameter<int>("Nbinp2D");
101  p_max = histosSet.getParameter<double>("Pmax");
102 
103  pt_nbin = histosSet.getParameter<int>("Nbinpt");
104  pt2D_nbin = histosSet.getParameter<int>("Nbinpt2D");
105  pteff_nbin = histosSet.getParameter<int>("Nbinpteff");
106  pt_max = histosSet.getParameter<double>("Ptmax");
107 
108  fhits_nbin = histosSet.getParameter<int>("Nbinfhits");
109  fhits_max = histosSet.getParameter<double>("Fhitsmax");
110 
111  lhits_nbin = histosSet.getParameter<int>("Nbinlhits");
112  lhits_max = histosSet.getParameter<double>("Lhitsmax");
113 
114  eop_nbin = histosSet.getParameter<int>("Nbineop");
115  eop2D_nbin = histosSet.getParameter<int>("Nbineop2D");
116  eop_max = histosSet.getParameter<double>("Eopmax");
117  eopmaxsht = histosSet.getParameter<double>("Eopmaxsht");
118 
119  eta_nbin = histosSet.getParameter<int>("Nbineta");
120  eta2D_nbin = histosSet.getParameter<int>("Nbineta2D");
121  eta_min = histosSet.getParameter<double>("Etamin");
122  eta_max = histosSet.getParameter<double>("Etamax");
123 
124  eta_nbin_extended = histosSet.getParameter<int>("NbinetaExtended");
125  eta2D_nbin_extended = histosSet.getParameter<int>("Nbineta2DExtended");
126  eta_min_extended = histosSet.getParameter<double>("EtaminExtended");
127  eta_max_extended = histosSet.getParameter<double>("EtamaxExtended");
128 
129  deta_nbin = histosSet.getParameter<int>("Nbindeta");
130  deta_min = histosSet.getParameter<double>("Detamin");
131  deta_max = histosSet.getParameter<double>("Detamax");
132 
133  phi_nbin = histosSet.getParameter<int>("Nbinphi");
134  phi2D_nbin = histosSet.getParameter<int>("Nbinphi2D");
135  phi_min = histosSet.getParameter<double>("Phimin");
136  phi_max = histosSet.getParameter<double>("Phimax");
137 
138  detamatch_nbin = histosSet.getParameter<int>("Nbindetamatch");
139  detamatch2D_nbin = histosSet.getParameter<int>("Nbindetamatch2D");
140  detamatch_min = histosSet.getParameter<double>("Detamatchmin");
141  detamatch_max = histosSet.getParameter<double>("Detamatchmax");
142 
143  dphi_nbin = histosSet.getParameter<int>("Nbindphi");
144  dphi_min = histosSet.getParameter<double>("Dphimin");
145  dphi_max = histosSet.getParameter<double>("Dphimax");
146 
147  dphimatch_nbin = histosSet.getParameter<int>("Nbindphimatch");
148  dphimatch2D_nbin = histosSet.getParameter<int>("Nbindphimatch2D");
149  dphimatch_min = histosSet.getParameter<double>("Dphimatchmin");
150  dphimatch_max = histosSet.getParameter<double>("Dphimatchmax");
151 
152  poptrue_nbin = histosSet.getParameter<int>("Nbinpoptrue");
153  poptrue_min = histosSet.getParameter<double>("Poptruemin");
154  poptrue_max = histosSet.getParameter<double>("Poptruemax");
155 
156  mee_nbin = histosSet.getParameter<int>("Nbinmee");
157  mee_min = histosSet.getParameter<double>("Meemin");
158  mee_max = histosSet.getParameter<double>("Meemax");
159 
160  hoe_nbin = histosSet.getParameter<int>("Nbinhoe");
161  hoe_min = histosSet.getParameter<double>("Hoemin");
162  hoe_max = histosSet.getParameter<double>("Hoemax");
163 
164  error_nbin = histosSet.getParameter<int>("Nbinerror");
165  enerror_max = histosSet.getParameter<double>("Energyerrormax");
166 
167  set_EfficiencyFlag = histosSet.getParameter<bool>("EfficiencyFlag");
168  set_StatOverflowFlag = histosSet.getParameter<bool>("StatOverflowFlag");
169 
170  opv_nbin = histosSet.getParameter<int>("NbinOPV");
171  opv_min = histosSet.getParameter<double>("OPV_min");
172  opv_max = histosSet.getParameter<double>("OPV_max");
173 
174  ele_nbin = histosSet.getParameter<int>("NbinELE");
175  ele_min = histosSet.getParameter<double>("ELE_min");
176  ele_max = histosSet.getParameter<double>("ELE_max");
177 
178  core_nbin = histosSet.getParameter<int>("NbinCORE");
179  core_min = histosSet.getParameter<double>("CORE_min");
180  core_max = histosSet.getParameter<double>("CORE_max");
181 
182  track_nbin = histosSet.getParameter<int>("NbinTRACK");
183  track_min = histosSet.getParameter<double>("TRACK_min");
184  track_max = histosSet.getParameter<double>("TRACK_max");
185 
186  seed_nbin = histosSet.getParameter<int>("NbinSEED");
187  seed_min = histosSet.getParameter<double>("SEED_min");
188  seed_max = histosSet.getParameter<double>("SEED_max");
189 
190  // so to please coverity...
191  h1_mcNum = nullptr;
192  h1_eleNum = nullptr;
193  h1_gamNum = nullptr;
194 
195  h1_recEleNum = nullptr;
196  h1_recCoreNum = nullptr;
197  h1_recTrackNum = nullptr;
198  h1_recSeedNum = nullptr;
199  h1_recOfflineVertices = nullptr;
200 
201  h1_mc_Eta = nullptr;
202  h1_mc_AbsEta = nullptr;
203  h1_mc_P = nullptr;
204  h1_mc_Pt = nullptr;
205  h1_mc_Phi = nullptr;
206  h1_mc_Z = nullptr;
207  h2_mc_PtEta = nullptr;
208 
209  h1_mc_Eta_matched = nullptr;
210  h1_mc_Eta_Extended_matched = nullptr;
211  h1_mc_AbsEta_matched = nullptr;
212  h1_mc_Pt_matched = nullptr;
213  h1_mc_Phi_matched = nullptr;
214  h1_mc_Z_matched = nullptr;
215  h2_mc_PtEta_matched = nullptr;
216 
217  h1_mc_Eta_matched_qmisid = nullptr;
218  h1_mc_AbsEta_matched_qmisid = nullptr;
219  h1_mc_Pt_matched_qmisid = nullptr;
220  h1_mc_Phi_matched_qmisid = nullptr;
221  h1_mc_Z_matched_qmisid = nullptr;
222 
223  h1_ele_EoverP_all = nullptr;
224  h1_ele_EoverP_all_barrel = nullptr;
225  h1_ele_EoverP_all_endcaps = nullptr;
226  h1_ele_EseedOP_all = nullptr;
227  h1_ele_EseedOP_all_barrel = nullptr;
228  h1_ele_EseedOP_all_endcaps = nullptr;
229  h1_ele_EoPout_all = nullptr;
230  h1_ele_EeleOPout_all = nullptr;
231  h1_ele_dEtaSc_propVtx_all = nullptr;
234  h1_ele_dPhiSc_propVtx_all = nullptr;
237  h1_ele_dEtaCl_propOut_all = nullptr;
240  h1_ele_dPhiCl_propOut_all = nullptr;
243  h1_ele_TIP_all = nullptr;
244  h1_ele_TIP_all_barrel = nullptr;
245  h1_ele_TIP_all_endcaps = nullptr;
246  h1_ele_HoE_all = nullptr;
247  h1_ele_HoE_all_barrel = nullptr;
248  h1_ele_HoE_all_endcaps = nullptr;
249  h1_ele_vertexEta_all = nullptr;
250  h1_ele_vertexPt_all = nullptr;
251  h1_ele_Et_all = nullptr;
252  h1_ele_mee_all = nullptr;
253  h1_ele_mee_os = nullptr;
254  h1_ele_mee_os_ebeb = nullptr;
255  h1_ele_mee_os_ebee = nullptr;
256  h1_ele_mee_os_eeee = nullptr;
257  h1_ele_mee_os_gg = nullptr;
258  h1_ele_mee_os_gb = nullptr;
259  h1_ele_mee_os_bb = nullptr;
260 
261  h2_ele_E2mnE1vsMee_all = nullptr;
262  h2_ele_E2mnE1vsMee_egeg_all = nullptr;
263 
264  h1_ele_charge = nullptr;
265  h2_ele_chargeVsEta = nullptr;
266  h2_ele_chargeVsPhi = nullptr;
267  h2_ele_chargeVsPt = nullptr;
268  h1_ele_vertexP = nullptr;
269  h1_ele_vertexPt = nullptr;
270  h1_ele_vertexPt_nocut = nullptr;
271  h1_ele_Et = nullptr;
272  h2_ele_vertexPtVsEta = nullptr;
273  h2_ele_vertexPtVsPhi = nullptr;
274  h1_ele_vertexPt_5100 = nullptr;
275  h1_ele_vertexEta = nullptr;
276  h2_ele_vertexEtaVsPhi = nullptr;
277  h1_ele_vertexAbsEta = nullptr;
278  h1_ele_vertexPhi = nullptr;
279  h1_ele_vertexX = nullptr;
280  h1_ele_vertexY = nullptr;
281  h1_ele_vertexZ = nullptr;
282  h1_ele_vertexTIP = nullptr;
283  h2_ele_vertexTIPVsEta = nullptr;
284  h2_ele_vertexTIPVsPhi = nullptr;
285  h2_ele_vertexTIPVsPt = nullptr;
286 
287  h1_scl_En = nullptr;
288  h1_scl_EoEtrue_barrel = nullptr;
289  h1_scl_EoEtrue_endcaps = nullptr;
292  h1_scl_EoEtrue_ebeegap = nullptr;
295  h1_scl_EoEtrue_barrel_new = nullptr;
296  h1_scl_EoEtrue_endcaps_new = nullptr;
299  h1_scl_EoEtrue_ebeegap_new = nullptr;
305  h1_scl_Et = nullptr;
306  h2_scl_EtVsEta = nullptr;
307  h2_scl_EtVsPhi = nullptr;
308  h2_scl_EtaVsPhi = nullptr;
309  h1_scl_Eta = nullptr;
310  h1_scl_Phi = nullptr;
311  h1_scl_ESFrac_endcaps = nullptr;
312 
313  h2_scl_EoEtruePfVsEg = nullptr;
314 
315  h1_scl_SigEtaEta = nullptr;
316  h1_scl_SigEtaEta_barrel = nullptr;
317  h1_scl_SigEtaEta_endcaps = nullptr;
318  h1_scl_SigIEtaIEta = nullptr;
319  h1_scl_SigIEtaIEta_barrel = nullptr;
320  h1_scl_SigIEtaIEta_endcaps = nullptr;
321  h1_scl_SigIEtaIEta_mAOD = nullptr;
327  h1_scl_E1x5 = nullptr;
328  h1_scl_E1x5_barrel = nullptr;
329  h1_scl_E1x5_endcaps = nullptr;
330  h1_scl_E2x5max = nullptr;
331  h1_scl_E2x5max_barrel = nullptr;
332  h1_scl_E2x5max_endcaps = nullptr;
333  h1_scl_E5x5 = nullptr;
334  h1_scl_E5x5_barrel = nullptr;
335  h1_scl_E5x5_endcaps = nullptr;
336  h1_scl_bcl_EtotoEtrue = nullptr;
339 
340  h1_ele_ambiguousTracks = nullptr;
341  h2_ele_ambiguousTracksVsEta = nullptr;
342  h2_ele_ambiguousTracksVsPhi = nullptr;
343  h2_ele_ambiguousTracksVsPt = nullptr;
344  h1_ele_foundHits = nullptr;
345  h1_ele_foundHits_barrel = nullptr;
346  h1_ele_foundHits_endcaps = nullptr;
347  h2_ele_foundHitsVsEta = nullptr;
348  h2_ele_foundHitsVsEta_mAOD = nullptr;
349  h2_ele_foundHitsVsPhi = nullptr;
350  h2_ele_foundHitsVsPt = nullptr;
351  h1_ele_lostHits = nullptr;
352  h1_ele_lostHits_barrel = nullptr;
353  h1_ele_lostHits_endcaps = nullptr;
354  h2_ele_lostHitsVsEta = nullptr;
355  h2_ele_lostHitsVsPhi = nullptr;
356  h2_ele_lostHitsVsPt = nullptr;
357  h1_ele_chi2 = nullptr;
358  h1_ele_chi2_barrel = nullptr;
359  h1_ele_chi2_endcaps = nullptr;
360  h2_ele_chi2VsEta = nullptr;
361  h2_ele_chi2VsPhi = nullptr;
362  h2_ele_chi2VsPt = nullptr;
363 
364  h1_ele_PoPtrue = nullptr;
365  h1_ele_PoPtrue_barrel = nullptr;
366  h1_ele_PoPtrue_endcaps = nullptr;
367 
368  h2_ele_PoPtrueVsEta = nullptr;
369  h2_ele_PoPtrueVsPhi = nullptr;
370  h2_ele_PoPtrueVsPt = nullptr;
371  h2_ele_sigmaIetaIetaVsPt = nullptr;
372 
377  h1_ele_PtoPttrue = nullptr;
378  h1_ele_PtoPttrue_barrel = nullptr;
379  h1_ele_PtoPttrue_endcaps = nullptr;
380  h1_ele_ChargeMnChargeTrue = nullptr;
381  h1_ele_EtaMnEtaTrue = nullptr;
382  h1_ele_EtaMnEtaTrue_barrel = nullptr;
383  h1_ele_EtaMnEtaTrue_endcaps = nullptr;
384  h2_ele_EtaMnEtaTrueVsEta = nullptr;
385  h2_ele_EtaMnEtaTrueVsPhi = nullptr;
386  h2_ele_EtaMnEtaTrueVsPt = nullptr;
387  h1_ele_PhiMnPhiTrue = nullptr;
388  h1_ele_PhiMnPhiTrue_barrel = nullptr;
389  h1_ele_PhiMnPhiTrue_endcaps = nullptr;
390  h1_ele_PhiMnPhiTrue2 = nullptr;
391  h2_ele_PhiMnPhiTrueVsEta = nullptr;
392  h2_ele_PhiMnPhiTrueVsPhi = nullptr;
393  h2_ele_PhiMnPhiTrueVsPt = nullptr;
394  h1_ele_PinMnPout = nullptr;
395  h1_ele_PinMnPout_mode = nullptr;
396  h2_ele_PinMnPoutVsEta_mode = nullptr;
397  h2_ele_PinMnPoutVsPhi_mode = nullptr;
398  h2_ele_PinMnPoutVsPt_mode = nullptr;
399  h2_ele_PinMnPoutVsE_mode = nullptr;
400  h2_ele_PinMnPoutVsChi2_mode = nullptr;
401 
402  h1_ele_outerP = nullptr;
403  h1_ele_outerP_mode = nullptr;
404  h2_ele_outerPVsEta_mode = nullptr;
405  h1_ele_outerPt = nullptr;
406  h1_ele_outerPt_mode = nullptr;
407  h2_ele_outerPtVsEta_mode = nullptr;
408  h2_ele_outerPtVsPhi_mode = nullptr;
409  h2_ele_outerPtVsPt_mode = nullptr;
410  h1_ele_EoP = nullptr;
411  h1_ele_EoP_barrel = nullptr;
412  h1_ele_EoP_endcaps = nullptr;
413  h2_ele_EoPVsEta = nullptr;
414  h2_ele_EoPVsEtaExtended = nullptr;
415  h2_ele_EoPVsPhi = nullptr;
416  h2_ele_EoPVsE = nullptr;
417  h1_ele_EseedOP = nullptr;
418  h1_ele_EseedOP_barrel = nullptr;
419  h1_ele_EseedOP_endcaps = nullptr;
420  h2_ele_EseedOPVsEta = nullptr;
421  h2_ele_EseedOPVsPhi = nullptr;
422  h2_ele_EseedOPVsE = nullptr;
423  h1_ele_EoPout = nullptr;
424  h1_ele_EoPout_barrel = nullptr;
425  h1_ele_EoPout_endcaps = nullptr;
426  h2_ele_EoPoutVsEta = nullptr;
427  h2_ele_EoPoutVsPhi = nullptr;
428  h2_ele_EoPoutVsE = nullptr;
429  h1_ele_EeleOPout = nullptr;
430  h1_ele_EeleOPout_barrel = nullptr;
431  h1_ele_EeleOPout_endcaps = nullptr;
432  h2_ele_EeleOPoutVsEta = nullptr;
433  h2_ele_EeleOPoutVsPhi = nullptr;
434  h2_ele_EeleOPoutVsE = nullptr;
435 
436  h1_ele_dEtaSc_propVtx = nullptr;
439  h1_ele_dEtaSc_propVtx_mAOD = nullptr;
442  h2_ele_dEtaScVsEta_propVtx = nullptr;
443  h2_ele_dEtaScVsPhi_propVtx = nullptr;
444  h2_ele_dEtaScVsPt_propVtx = nullptr;
445  h1_ele_dPhiSc_propVtx = nullptr;
448  h2_ele_dPhiScVsEta_propVtx = nullptr;
449  h2_ele_dPhiScVsPhi_propVtx = nullptr;
450  h2_ele_dPhiScVsPt_propVtx = nullptr;
451  h1_ele_dEtaCl_propOut = nullptr;
454  h2_ele_dEtaClVsEta_propOut = nullptr;
455  h2_ele_dEtaClVsPhi_propOut = nullptr;
456  h2_ele_dEtaClVsPt_propOut = nullptr;
457  h1_ele_dPhiCl_propOut = nullptr;
460  h1_ele_dPhiCl_propOut_mAOD = nullptr;
463  h2_ele_dPhiClVsEta_propOut = nullptr;
464  h2_ele_dPhiClVsPhi_propOut = nullptr;
465  h2_ele_dPhiClVsPt_propOut = nullptr;
466  h1_ele_dEtaEleCl_propOut = nullptr;
472  h1_ele_dPhiEleCl_propOut = nullptr;
478 
479  h1_ele_seed_subdet2 = nullptr;
480  h1_ele_seed_mask = nullptr;
481  h1_ele_seed_mask_bpix = nullptr;
482  h1_ele_seed_mask_fpix = nullptr;
483  h1_ele_seed_mask_tec = nullptr;
484  h1_ele_seed_dphi2 = nullptr;
485  h2_ele_seed_dphi2VsEta = nullptr;
486  h2_ele_seed_dphi2VsPt = nullptr;
487  h1_ele_seed_dphi2pos = nullptr;
488  h2_ele_seed_dphi2posVsEta = nullptr;
489  h2_ele_seed_dphi2posVsPt = nullptr;
490  h1_ele_seed_drz2 = nullptr;
491  h2_ele_seed_drz2VsEta = nullptr;
492  h2_ele_seed_drz2VsPt = nullptr;
493  h1_ele_seed_drz2pos = nullptr;
494  h2_ele_seed_drz2posVsEta = nullptr;
495  h2_ele_seed_drz2posVsPt = nullptr;
496 
497  h1_ele_classes = nullptr;
498  h1_ele_eta = nullptr;
499  h1_ele_eta_golden = nullptr;
500  h1_ele_eta_bbrem = nullptr;
501  h1_ele_eta_shower = nullptr;
502 
503  h1_ele_HoE = nullptr;
504  h1_ele_HoE_barrel = nullptr;
505  h1_ele_HoE_endcaps = nullptr;
506  h1_ele_HoE_fiducial = nullptr;
507  h2_ele_HoEVsEta = nullptr;
508  h2_ele_HoEVsPhi = nullptr;
509  h2_ele_HoEVsE = nullptr;
510  h1_ele_HoE_mAOD = nullptr;
511  h1_ele_HoE_mAOD_barrel = nullptr;
512  h1_ele_HoE_mAOD_endcaps = nullptr;
513 
514  h1_ele_fbrem = nullptr;
515  h1_ele_fbrem_barrel = nullptr;
516  h1_ele_fbrem_endcaps = nullptr;
517  p1_ele_fbremVsEta_mode = nullptr;
518  p1_ele_fbremVsEta_mean = nullptr;
519  h1_ele_fbrem_mAOD = nullptr;
520  h1_ele_fbrem_mAOD_barrel = nullptr;
521  h1_ele_fbrem_mAOD_endcaps = nullptr;
522  h1_ele_superclusterfbrem = nullptr;
523 
526  h2_ele_PinVsPoutGolden_mode = nullptr;
528  h2_ele_PinVsPoutGolden_mean = nullptr;
534  h1_scl_EoEtrueGolden_barrel = nullptr;
538 
539  h1_ele_mva = nullptr;
540  h1_ele_mva_isolated = nullptr;
541  h1_ele_provenance = nullptr;
542 
543  // isolation
544  h1_ele_tkSumPt_dr03 = nullptr;
545  h1_ele_tkSumPt_dr03_barrel = nullptr;
546  h1_ele_tkSumPt_dr03_endcaps = nullptr;
547  h1_ele_ecalRecHitSumEt_dr03 = nullptr;
554  h1_ele_tkSumPt_dr04 = nullptr;
555  h1_ele_tkSumPt_dr04_barrel = nullptr;
556  h1_ele_tkSumPt_dr04_endcaps = nullptr;
557  h1_ele_ecalRecHitSumEt_dr04 = nullptr;
564 
565  // conversions
566  h1_ele_convFlags = nullptr;
567  h1_ele_convFlags_all = nullptr;
568  h1_ele_convDist = nullptr;
569  h1_ele_convDist_all = nullptr;
570  h1_ele_convDcot = nullptr;
571  h1_ele_convDcot_all = nullptr;
572  h1_ele_convRadius = nullptr;
573  h1_ele_convRadius_all = nullptr;
574 
575  // PF
585 }
586 
589 
590  // prepareStore() ;
591  setBookIndex(-1);
592  setBookPrefix("h");
595 
596  // mc truth collections sizes
597  h1_mcNum = bookH1withSumw2(iBooker, "mcNum", "# mc particles", fhits_nbin, 0., fhits_max, "N_{gen}");
598  h1_eleNum = bookH1withSumw2(iBooker, "mcNum_ele", "# mc electrons", fhits_nbin, 0., fhits_max, "N_{gen ele}");
599  h1_gamNum = bookH1withSumw2(iBooker, "mcNum_gam", "# mc gammas", fhits_nbin, 0., fhits_max, "N_{gen #gamma}");
600 
601  // rec event collections sizes
602  h1_recEleNum = bookH1(iBooker, "recEleNum", "# rec electrons", ele_nbin, ele_min, ele_max, "N_{ele}");
603  h1_recCoreNum = bookH1(iBooker, "recCoreNum", "# rec electron cores", core_nbin, core_min, core_max, "N_{core}");
604  h1_recTrackNum = bookH1(iBooker, "recTrackNum", "# rec gsf tracks", track_nbin, track_min, track_max, "N_{track}");
605  h1_recSeedNum = bookH1(iBooker, "recSeedNum", "# rec electron seeds", seed_nbin, seed_min, seed_max, "N_{seed}");
607  iBooker, "recOfflineVertices", "# rec Offline Primary Vertices", opv_nbin, opv_min, opv_max, "N_{Vertices}");
608 
610  "scl_EoEtrueVsrecOfflineVertices",
611  "E/Etrue vs number of primary vertices",
612  opv_nbin, // 10,
613  opv_min, // 0.,
614  opv_max, // 50.,
615  50,
616  0.,
617  2.5,
618  "N_{primary vertices}",
619  "E/E_{true}");
621  "scl_EoEtrueVsrecOfflineVertices_barrel",
622  "E/Etrue vs number of primary , barrel",
623  opv_nbin, // 10,
624  opv_min, // 0.,
625  opv_max, // 50.,
626  50,
627  0.,
628  2.5,
629  "N_{primary vertices}",
630  "E/E_{true}");
632  "scl_EoEtrueVsrecOfflineVertices_endcaps",
633  "E/Etrue vs number of primary , endcaps",
634  opv_nbin, // 10,
635  opv_min, // 0.,
636  opv_max, // 50.,
637  50,
638  0.,
639  2.5,
640  "N_{primary vertices}",
641  "E/E_{true}");
642 
643  // mc
644  setBookPrefix("h_mc");
645  h1_mc_Eta = bookH1withSumw2(iBooker, "Eta", "gen #eta", eta_nbin, eta_min, eta_max, "#eta");
646  h1_mc_AbsEta = bookH1withSumw2(iBooker, "AbsEta", "gen |#eta|", eta_nbin / 2, 0., eta_max);
647  h1_mc_P = bookH1withSumw2(iBooker, "P", "gen p", p_nbin, 0., p_max, "p (GeV/c)");
648  h1_mc_Pt = bookH1withSumw2(iBooker, "Pt", "gen pt", pteff_nbin, 5., pt_max);
649  h1_mc_Phi = bookH1withSumw2(iBooker, "Phi", "gen phi", phi_nbin, phi_min, phi_max);
650  h1_mc_Z = bookH1withSumw2(iBooker, "Z", "gen z ", xyz_nbin, -25, 25);
651  h2_mc_PtEta =
652  bookH2withSumw2(iBooker, "PtEta", "gen pt vs #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
653 
654  // all electrons
655  setBookPrefix("h_ele");
657  "EoverP_all",
658  "ele E/P_{vertex}, all reco electrons",
659  eop_nbin,
660  0.,
661  eop_max,
662  "E/P_{vertex}",
663  "Events",
664  "ELE_LOGY E1 P");
666  "EoverP_all_barrel",
667  "ele E/P_{vertex}, all reco electrons, barrel",
668  eop_nbin,
669  0.,
670  eop_max,
671  "E/P_{vertex}",
672  "Events",
673  "ELE_LOGY E1 P");
675  "EoverP_all_endcaps",
676  "ele E/P_{vertex}, all reco electrons, endcaps",
677  eop_nbin,
678  0.,
679  eop_max,
680  "E/P_{vertex}",
681  "Events",
682  "ELE_LOGY E1 P");
684  "EseedOP_all",
685  "ele E_{seed}/P_{vertex}, all reco electrons",
686  eop_nbin,
687  0.,
688  eop_max,
689  "E_{seed}/P_{vertex}",
690  "Events",
691  "ELE_LOGY E1 P");
693  "EseedOP_all_barrel",
694  "ele E_{seed}/P_{vertex}, all reco electrons, barrel",
695  eop_nbin,
696  0.,
697  eop_max,
698  "E_{seed}/P_{vertex}",
699  "Events",
700  "ELE_LOGY E1 P");
702  "EseedOP_all_endcaps",
703  "ele E_{seed}/P_{vertex}, all reco electrons, endcaps",
704  eop_nbin,
705  0.,
706  eop_max,
707  "E_{seed}/P_{vertex}",
708  "Events",
709  "ELE_LOGY E1 P");
711  "EoPout_all",
712  "ele E_{seed}/P_{out}, all reco electrons",
713  eop_nbin,
714  0.,
715  eop_max,
716  "E_{seed}/P_{out}",
717  "Events",
718  "ELE_LOGY E1 P");
720  "EeleOPout_all",
721  "ele E_{ele}/P_{out}, all reco electrons",
722  eop_nbin,
723  0.,
724  eop_max,
725  "E_{ele}/P_{out}",
726  "Events",
727  "ELE_LOGY E1 P");
729  "dEtaSc_propVtx_all",
730  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
734  "#eta_{sc} - #eta_{tr}",
735  "Events",
736  "ELE_LOGY E1 P");
738  bookH1withSumw2(iBooker,
739  "dEtaSc_propVtx_all_barrel",
740  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons barrel",
744  "#eta_{sc} - #eta_{tr}",
745  "Events",
746  "ELE_LOGY E1 P");
748  bookH1withSumw2(iBooker,
749  "dEtaSc_propVtx_all_endcaps",
750  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons endcaps",
754  "#eta_{sc} - #eta_{tr}",
755  "Events",
756  "ELE_LOGY E1 P");
758  "dPhiSc_propVtx_all",
759  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
763  "#phi_{sc} - #phi_{tr} (rad)",
764  "Events",
765  "ELE_LOGY E1 P");
767  bookH1withSumw2(iBooker,
768  "dPhiSc_propVtx_all_barrel",
769  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons barrel",
773  "#phi_{sc} - #phi_{tr} (rad)",
774  "Events",
775  "ELE_LOGY E1 P");
777  bookH1withSumw2(iBooker,
778  "dPhiSc_propVtx_all_endcaps",
779  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons endcaps",
783  "#phi_{sc} - #phi_{tr} (rad)",
784  "Events",
785  "ELE_LOGY E1 P");
787  "dEtaCl_propOut_all",
788  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
792  "#eta_{sc} - #eta_{tr}",
793  "Events",
794  "ELE_LOGY E1 P");
796  bookH1withSumw2(iBooker,
797  "dEtaCl_propOut_all_barrel",
798  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons barrel",
802  "#eta_{sc} - #eta_{tr}",
803  "Events",
804  "ELE_LOGY E1 P");
806  bookH1withSumw2(iBooker,
807  "dEtaCl_propOut_all_endcaps",
808  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons endcaps",
812  "#eta_{sc} - #eta_{tr}",
813  "Events",
814  "ELE_LOGY E1 P");
816  "dPhiCl_propOut_all",
817  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
821  "#phi_{sc} - #phi_{tr} (rad)",
822  "Events",
823  "ELE_LOGY E1 P");
825  bookH1withSumw2(iBooker,
826  "dPhiCl_propOut_all_barrel",
827  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons barrel",
831  "#phi_{sc} - #phi_{tr} (rad)",
832  "Events",
833  "ELE_LOGY E1 P");
835  bookH1withSumw2(iBooker,
836  "dPhiCl_propOut_all_endcaps",
837  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons endcaps",
841  "#phi_{sc} - #phi_{tr} (rad)",
842  "Events",
843  "ELE_LOGY E1 P");
845  "HoE_all",
846  "ele hadronic energy / em energy, all reco electrons",
847  hoe_nbin,
848  hoe_min,
849  hoe_max,
850  "H/E",
851  "Events",
852  "ELE_LOGY E1 P");
854  "HoE_all_barrel",
855  "ele hadronic energy / em energy, all reco electrons barrel",
856  hoe_nbin,
857  hoe_min,
858  hoe_max,
859  "H/E",
860  "Events",
861  "ELE_LOGY E1 P");
863  "HoE_all_endcaps",
864  "ele hadronic energy / em energy, all reco electrons endcaps",
865  hoe_nbin,
866  hoe_min,
867  hoe_max,
868  "H/E",
869  "Events",
870  "ELE_LOGY E1 P");
872  "HoE_bc_all",
873  "ele hadronic energy / em energy, all reco electrons, behind cluster",
874  hoe_nbin,
875  hoe_min,
876  hoe_max,
877  "H/E",
878  "Events",
879  "ELE_LOGY E1 P");
881  bookH1withSumw2(iBooker, "vertexPt_all", "ele p_{T}, all reco electrons", pteff_nbin, 5., pt_max, "", "Events");
882  h1_ele_Et_all = bookH1withSumw2(iBooker,
883  "Et_all",
884  "ele ecal E_{T}, all reco electrons",
885  pteff_nbin,
886  5.,
887  pt_max,
888  "E_{T} (GeV)",
889  "Events",
890  "ELE_LOGY E1 P");
892  iBooker, "vertexEta_all", "ele eta, all reco electrons", eta_nbin, eta_min, eta_max, "", "Events");
894  "TIP_all",
895  "ele vertex transverse radius, all reco electrons",
896  100,
897  0.,
898  0.2,
899  "r_{T} (cm)",
900  "Events",
901  "ELE_LOGY E1 P");
903  "TIP_all_barrel",
904  "ele vertex transverse radius, all reco electrons barrel",
905  100,
906  0.,
907  0.2,
908  "r_{T} (cm)",
909  "Events",
910  "ELE_LOGY E1 P");
912  "TIP_all_endcaps",
913  "ele vertex transverse radius, all reco electrons endcaps",
914  100,
915  0.,
916  0.2,
917  "r_{T} (cm)",
918  "Events",
919  "ELE_LOGY E1 P");
921  "mee_all",
922  "ele pairs invariant mass, all reco electrons",
923  mee_nbin,
924  mee_min,
925  mee_max,
926  "m_{ee} (GeV/c^{2})",
927  "Events",
928  "ELE_LOGY E1 P");
929  h1_ele_mee_os = bookH1withSumw2(iBooker,
930  "mee_os",
931  "ele pairs invariant mass, opp. sign",
932  mee_nbin,
933  mee_min,
934  mee_max,
935  "m_{e^{+}e^{-}} (GeV/c^{2})",
936  "Events",
937  "ELE_LOGY E1 P");
939  "mee_os_ebeb",
940  "ele pairs invariant mass, opp. sign, EB-EB",
941  mee_nbin,
942  mee_min,
943  mee_max,
944  "m_{e^{+}e^{-}} (GeV/c^{2})",
945  "Events",
946  "ELE_LOGY E1 P");
948  "mee_os_ebee",
949  "ele pairs invariant mass, opp. sign, EB-EE",
950  mee_nbin,
951  mee_min,
952  mee_max,
953  "m_{e^{+}e^{-}} (GeV/c^{2})",
954  "Events",
955  "ELE_LOGY E1 P");
957  "mee_os_eeee",
958  "ele pairs invariant mass, opp. sign, EE-EE",
959  mee_nbin,
960  mee_min,
961  mee_max,
962  "m_{e^{+}e^{-}} (GeV/c^{2})",
963  "Events",
964  "ELE_LOGY E1 P");
966  "mee_os_gg",
967  "ele pairs invariant mass, opp. sign, good-good",
968  mee_nbin,
969  mee_min,
970  mee_max,
971  "m_{e^{+}e^{-}} (GeV/c^{2})",
972  "Events",
973  "ELE_LOGY E1 P");
975  "mee_os_gb",
976  "ele pairs invariant mass, opp. sign, good-bad",
977  mee_nbin,
978  mee_min,
979  mee_max,
980  "m_{e^{+}e^{-}} (GeV/c^{2})",
981  "Events",
982  "ELE_LOGY E1 P");
984  "mee_os_bb",
985  "ele pairs invariant mass, opp. sign, bad-bad",
986  mee_nbin,
987  mee_min,
988  mee_max,
989  "m_{e^{+}e^{-}} (GeV/c^{2})",
990  "Events",
991  "ELE_LOGY E1 P");
992 
993  // duplicates
994  h2_ele_E2mnE1vsMee_all = bookH2(iBooker,
995  "E2mnE1vsMee_all",
996  "E2 - E1 vs ele pairs invariant mass, all electrons",
997  mee_nbin,
998  mee_min,
999  mee_max,
1000  100,
1001  -50.,
1002  50.,
1003  "m_{e^{+}e^{-}} (GeV/c^{2})",
1004  "E2 - E1 (GeV)");
1006  "E2mnE1vsMee_egeg_all",
1007  "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
1008  mee_nbin,
1009  mee_min,
1010  mee_max,
1011  100,
1012  -50.,
1013  50.,
1014  "m_{e^{+}e^{-}} (GeV/c^{2})",
1015  "E2 - E1 (GeV)");
1016 
1017  // charge ID
1019  bookH1withSumw2(iBooker, "ChargeMnChargeTrue", "ele charge - gen charge ", 5, -1., 4., "q_{rec} - q_{gen}");
1020  setBookPrefix("h_mc");
1022  bookH1withSumw2(iBooker, "Eta_matched_qmisid", "charge misid vs gen eta", eta_nbin, eta_min, eta_max);
1024  bookH1withSumw2(iBooker, "AbsEta_matched_qmisid", "charge misid vs gen |eta|", eta_nbin / 2, 0., eta_max);
1026  bookH1withSumw2(iBooker, "Pt_matched_qmisid", "charge misid vs gen transverse momentum", pteff_nbin, 5., pt_max);
1028  bookH1withSumw2(iBooker, "Phi_matched_qmisid", "charge misid vs gen phi", phi_nbin, phi_min, phi_max);
1029  h1_mc_Z_matched_qmisid = bookH1withSumw2(iBooker, "Z_matched_qmisid", "charge misid vs gen z", xyz_nbin, -25, 25);
1030 
1031  // matched electrons
1032  setBookPrefix("h_mc");
1033  h1_mc_Eta_matched = bookH1withSumw2(iBooker, "Eta_matched", "Efficiency vs gen eta", eta_nbin, eta_min, eta_max);
1035  iBooker, "Eta_Extended_matched", "Efficiency vs gen eta", eta_nbin_extended, eta_min_extended, eta_max_extended);
1037  bookH1withSumw2(iBooker, "AbsEta_matched", "Efficiency vs gen |eta|", eta_nbin / 2, 0., eta_max);
1038  h1_mc_Pt_matched = bookH1(iBooker, "Pt_matched", "Efficiency vs gen transverse momentum", pteff_nbin, 5., pt_max);
1039  h1_mc_Phi_matched = bookH1withSumw2(iBooker, "Phi_matched", "Efficiency vs gen phi", phi_nbin, phi_min, phi_max);
1040  h1_mc_Z_matched = bookH1withSumw2(iBooker, "Z_matched", "Efficiency vs gen vertex z", xyz_nbin, -25, 25);
1042  iBooker, "PtEta_matched", "Efficiency vs pt #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
1043  setBookPrefix("h_ele");
1044  h1_ele_charge = bookH1withSumw2(iBooker, "charge", "ele charge", 5, -2.5, 2.5, "charge");
1045  h2_ele_chargeVsEta = bookH2(iBooker, "chargeVsEta", "ele charge vs eta", eta2D_nbin, eta_min, eta_max, 5, -2., 2.);
1046  h2_ele_chargeVsPhi = bookH2(iBooker, "chargeVsPhi", "ele charge vs phi", phi2D_nbin, phi_min, phi_max, 5, -2., 2.);
1047  h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt", "ele charge vs pt", pt_nbin, 0., 100., 5, -2., 2.);
1048  h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP", "ele momentum", p_nbin, 0., p_max, "p_{vertex} (GeV/c)");
1049  h1_ele_vertexPt =
1050  bookH1withSumw2(iBooker, "vertexPt", "ele transverse momentum", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1052  iBooker, "vertexPt_nocut", "pT of prunned electrons", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1053  h1_ele_Et = bookH1withSumw2(iBooker, "Et", "ele ecal E_{T}", pt_nbin, 0., pt_max, "E_{T} (GeV)");
1055  iBooker, "vertexPtVsEta", "ele transverse momentum vs eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 0., pt_max);
1057  iBooker, "vertexPtVsPhi", "ele transverse momentum vs phi", phi2D_nbin, phi_min, phi_max, pt2D_nbin, 0., pt_max);
1058  h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta", "ele momentum eta", eta_nbin, eta_min, eta_max, "#eta");
1060  iBooker, "vertexEtaVsPhi", "ele momentum eta vs phi", eta2D_nbin, eta_min, eta_max, phi2D_nbin, phi_min, phi_max);
1062  bookH1withSumw2(iBooker, "vertexPhi", "ele momentum #phi", phi_nbin, phi_min, phi_max, "#phi (rad)");
1063  h1_ele_vertexX = bookH1withSumw2(iBooker, "vertexX", "ele vertex x", xyz_nbin, -0.6, 0.6, "x (cm)");
1064  h1_ele_vertexY = bookH1withSumw2(iBooker, "vertexY", "ele vertex y", xyz_nbin, -0.6, 0.6, "y (cm)");
1065  h1_ele_vertexZ = bookH1withSumw2(iBooker, "vertexZ", "ele vertex z", xyz_nbin, -25, 25, "z (cm)");
1067  bookH1withSumw2(iBooker, "vertexTIP", "ele transverse impact parameter (wrt gen vtx)", 90, 0., 0.15, "TIP (cm)");
1068  h2_ele_vertexTIPVsEta = bookH2(iBooker,
1069  "vertexTIPVsEta",
1070  "ele transverse impact parameter (wrt gen vtx) vs eta",
1071  eta2D_nbin,
1072  eta_min,
1073  eta_max,
1074  45,
1075  0.,
1076  0.15,
1077  "#eta",
1078  "TIP (cm)");
1079  h2_ele_vertexTIPVsPhi = bookH2(iBooker,
1080  "vertexTIPVsPhi",
1081  "ele transverse impact parameter (wrt gen vtx) vs phi",
1082  phi2D_nbin,
1083  phi_min,
1084  phi_max,
1085  45,
1086  0.,
1087  0.15,
1088  "#phi (rad)",
1089  "TIP (cm)");
1090  h2_ele_vertexTIPVsPt = bookH2(iBooker,
1091  "vertexTIPVsPt",
1092  "ele transverse impact parameter (wrt gen vtx) vs transverse momentum",
1093  pt2D_nbin,
1094  0.,
1095  pt_max,
1096  45,
1097  0.,
1098  0.15,
1099  "p_{T} (GeV/c)",
1100  "TIP (cm)");
1102  iBooker, "PoPtrue", "ele momentum / gen momentum", poptrue_nbin, poptrue_min, poptrue_max, "P/P_{gen}");
1104  "PoPtrue_barrel",
1105  "ele momentum / gen momentum, barrel",
1106  poptrue_nbin,
1107  poptrue_min,
1108  poptrue_max,
1109  "P/P_{gen}");
1111  "PoPtrue_endcaps",
1112  "ele momentum / gen momentum, endcaps",
1113  poptrue_nbin,
1114  poptrue_min,
1115  poptrue_max,
1116  "P/P_{gen}");
1118  "PoPtrueVsEta",
1119  "ele momentum / gen momentum vs eta",
1120  eta2D_nbin,
1121  eta_min,
1122  eta_max,
1123  50,
1124  poptrue_min,
1125  poptrue_max);
1126  h2_ele_PoPtrueVsPhi = bookH2(iBooker,
1127  "PoPtrueVsPhi",
1128  "ele momentum / gen momentum vs phi",
1129  phi2D_nbin,
1130  phi_min,
1131  phi_max,
1132  50,
1133  poptrue_min,
1134  poptrue_max);
1136  iBooker, "PoPtrueVsPt", "ele momentum / gen momentum vs eta", pt2D_nbin, 0., pt_max, 50, poptrue_min, poptrue_max);
1138  bookH2(iBooker, "sigmaIetaIetaVsPt", "SigmaIetaIeta vs pt", 100, 0., pt_max, 100, 0., 0.05);
1140  "PoPtrue_golden_barrel",
1141  "ele momentum / gen momentum, golden, barrel",
1142  poptrue_nbin,
1143  poptrue_min,
1144  poptrue_max,
1145  "P/P_{gen}");
1147  "PoPtrue_golden_endcaps",
1148  "ele momentum / gen momentum, golden, endcaps",
1149  poptrue_nbin,
1150  poptrue_min,
1151  poptrue_max,
1152  "P/P_{gen}");
1154  "PoPtrue_showering_barrel",
1155  "ele momentum / gen momentum, showering, barrel",
1156  poptrue_nbin,
1157  poptrue_min,
1158  poptrue_max,
1159  "P/P_{gen}");
1161  "PoPtrue_showering_endcaps",
1162  "ele momentum / gen momentum, showering, endcaps",
1163  poptrue_nbin,
1164  poptrue_min,
1165  poptrue_max,
1166  "P/P_{gen}");
1168  "PtoPttrue",
1169  "ele transverse momentum / gen transverse momentum",
1170  poptrue_nbin,
1171  poptrue_min,
1172  poptrue_max,
1173  "P_{T}/P_{T}^{gen}");
1175  "PtoPttrue_barrel",
1176  "ele transverse momentum / gen transverse momentum, barrel",
1177  poptrue_nbin,
1178  poptrue_min,
1179  poptrue_max,
1180  "P_{T}/P_{T}^{gen}");
1182  "PtoPttrue_endcaps",
1183  "ele transverse momentum / gen transverse momentum, endcaps",
1184  poptrue_nbin,
1185  poptrue_min,
1186  poptrue_max,
1187  "P_{T}/P_{T}^{gen}");
1189  iBooker, "EtaMnEtaTrue", "ele momentum eta - gen eta", deta_nbin, deta_min, deta_max, "#eta_{rec} - #eta_{gen}");
1191  "EtaMnEtaTrue_barrel",
1192  "ele momentum eta - gen eta barrel",
1193  deta_nbin,
1194  deta_min,
1195  deta_max,
1196  "#eta_{rec} - #eta_{gen}");
1198  "EtaMnEtaTrue_endcaps",
1199  "ele momentum eta - gen eta endcaps",
1200  deta_nbin,
1201  deta_min,
1202  deta_max,
1203  "#eta_{rec} - #eta_{gen}");
1204  h2_ele_EtaMnEtaTrueVsEta = bookH2(iBooker,
1205  "EtaMnEtaTrueVsEta",
1206  "ele momentum eta - gen eta vs eta",
1207  eta2D_nbin,
1208  eta_min,
1209  eta_max,
1210  deta_nbin / 2,
1211  deta_min,
1212  deta_max);
1213  h2_ele_EtaMnEtaTrueVsPhi = bookH2(iBooker,
1214  "EtaMnEtaTrueVsPhi",
1215  "ele momentum eta - gen eta vs phi",
1216  phi2D_nbin,
1217  phi_min,
1218  phi_max,
1219  deta_nbin / 2,
1220  deta_min,
1221  deta_max);
1222  h2_ele_EtaMnEtaTrueVsPt = bookH2(iBooker,
1223  "EtaMnEtaTrueVsPt",
1224  "ele momentum eta - gen eta vs pt",
1225  pt_nbin,
1226  0.,
1227  pt_max,
1228  deta_nbin / 2,
1229  deta_min,
1230  deta_max);
1232  "PhiMnPhiTrue",
1233  "ele momentum phi - gen phi",
1234  dphi_nbin,
1235  dphi_min,
1236  dphi_max,
1237  "#phi_{rec} - #phi_{gen} (rad)");
1239  "PhiMnPhiTrue_barrel",
1240  "ele momentum phi - gen phi barrel",
1241  dphi_nbin,
1242  dphi_min,
1243  dphi_max,
1244  "#phi_{rec} - #phi_{gen} (rad)");
1246  "PhiMnPhiTrue_endcaps",
1247  "ele momentum phi - gen phi endcaps",
1248  dphi_nbin,
1249  dphi_min,
1250  dphi_max,
1251  "#phi_{rec} - #phi_{gen} (rad)");
1253  bookH1(iBooker, "PhiMnPhiTrue2", "ele momentum phi - gen phi", dphimatch2D_nbin, dphimatch_min, dphimatch_max);
1254  h2_ele_PhiMnPhiTrueVsEta = bookH2(iBooker,
1255  "PhiMnPhiTrueVsEta",
1256  "ele momentum phi - gen phi vs eta",
1257  eta2D_nbin,
1258  eta_min,
1259  eta_max,
1260  dphi_nbin / 2,
1261  dphi_min,
1262  dphi_max);
1263  h2_ele_PhiMnPhiTrueVsPhi = bookH2(iBooker,
1264  "PhiMnPhiTrueVsPhi",
1265  "ele momentum phi - gen phi vs phi",
1266  phi2D_nbin,
1267  phi_min,
1268  phi_max,
1269  dphi_nbin / 2,
1270  dphi_min,
1271  dphi_max);
1272  h2_ele_PhiMnPhiTrueVsPt = bookH2(iBooker,
1273  "PhiMnPhiTrueVsPt",
1274  "ele momentum phi - gen phi vs pt",
1275  pt2D_nbin,
1276  0.,
1277  pt_max,
1278  dphi_nbin / 2,
1279  dphi_min,
1280  dphi_max);
1282  iBooker, "ecalEnergyError", "Regression estimate of the ECAL energy error", error_nbin, 0, enerror_max);
1284  iBooker, "ecalEnergyError_barrel", "Regression estimate of the ECAL energy error - barrel", 30, 0, 30);
1286  "ecalEnergyError_endcaps",
1287  "Regression estimate of the ECAL energy error - endcaps",
1288  error_nbin,
1289  0,
1290  enerror_max);
1292  iBooker, "combinedP4Error", "Estimated error on the combined momentum", error_nbin, 0, enerror_max);
1294  iBooker, "combinedP4Error_barrel", "Estimated error on the combined momentum - barrel", 30, 0, 30);
1296  "combinedP4Error_endcaps",
1297  "Estimated error on the combined momentum - endcaps",
1298  error_nbin,
1299  0,
1300  enerror_max);
1301 
1302  // matched electron, superclusters
1303  setBookPrefix("h_scl");
1304  h1_scl_En = bookH1withSumw2(iBooker, "energy", "ele ecal energy", p_nbin, 0., p_max);
1306  bookH1withSumw2(iBooker, "EoEtrue_barrel", "ele ecal energy / gen energy, barrel", 50, 0.2, 1.2, "E/E_{gen}");
1308  iBooker, "EoEtrue_barrel_etagap", "ele ecal energy / gen energy, barrel, etagap", 50, 0.2, 1.2, "E/E_{gen}");
1310  iBooker, "EoEtrue_barrel_phigap", "ele ecal energy / gen energy, barrel, phigap", 50, 0.2, 1.2, "E/E_{gen}");
1312  bookH1withSumw2(iBooker, "EoEtrue_ebeegap", "ele ecal energy / gen energy, ebeegap", 50, 0.2, 1.2, "E/E_{gen}");
1314  bookH1withSumw2(iBooker, "EoEtrue_endcaps", "ele ecal energy / gen energy, endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1316  iBooker, "EoEtrue_endcaps_deegap", "ele ecal energy / gen energy, endcaps, deegap", 50, 0.2, 1.2, "E/E_{gen}");
1318  iBooker, "EoEtrue_endcaps_ringgap", "ele ecal energy / gen energy, endcaps, ringgap", 50, 0.2, 1.2, "E/E_{gen}");
1320  "EoEtrue_barrel_new",
1321  "ele ecal energy / gen energy, barrel",
1322  poptrue_nbin,
1323  poptrue_min,
1324  poptrue_max,
1325  "E/E_{gen}");
1327  "EoEtrue_barrel_new_etagap",
1328  "ele ecal energy / gen energy, barrel, etagap",
1329  poptrue_nbin,
1330  poptrue_min,
1331  poptrue_max,
1332  "E/E_{gen}");
1334  "EoEtrue_barrel_new_phigap",
1335  "ele ecal energy / gen energy, barrel, phigap",
1336  poptrue_nbin,
1337  poptrue_min,
1338  poptrue_max,
1339  "E/E_{gen}");
1341  "EoEtrue_ebeegap_new",
1342  "ele ecal energy / gen energy, ebeegap",
1343  poptrue_nbin,
1344  poptrue_min,
1345  poptrue_max,
1346  "E/E_{gen}");
1348  "EoEtrue_endcaps_new",
1349  "ele ecal energy / gen energy, endcaps",
1350  poptrue_nbin,
1351  poptrue_min,
1352  poptrue_max,
1353  "E/E_{gen}");
1355  "EoEtrue_endcaps_new_deegap",
1356  "ele ecal energy / gen energy, endcaps, deegap",
1357  poptrue_nbin,
1358  poptrue_min,
1359  poptrue_max,
1360  "E/E_{gen}");
1362  "EoEtrue_endcaps_new_ringgap",
1363  "ele ecal energy / gen energy, endcaps, ringgap",
1364  poptrue_nbin,
1365  poptrue_min,
1366  poptrue_max,
1367  "E/E_{gen}");
1368  h1_scl_Et = bookH1withSumw2(iBooker, "et", "ele supercluster transverse energy", pt_nbin, 0., pt_max);
1369  h2_scl_EtVsEta = bookH2(iBooker,
1370  "etVsEta",
1371  "ele supercluster transverse energy vs eta",
1372  eta2D_nbin,
1373  eta_min,
1374  eta_max,
1375  pt_nbin,
1376  0.,
1377  pt_max);
1378  h2_scl_EtVsPhi = bookH2(iBooker,
1379  "etVsPhi",
1380  "ele supercluster transverse energy vs phi",
1381  phi2D_nbin,
1382  phi_min,
1383  phi_max,
1384  pt_nbin,
1385  0.,
1386  pt_max);
1388  iBooker, "etaVsPhi", "ele supercluster eta vs phi", phi2D_nbin, phi_min, phi_max, eta2D_nbin, eta_min, eta_max);
1389  h1_scl_Eta = bookH1withSumw2(iBooker, "eta", "ele supercluster eta", eta_nbin, eta_min, eta_max);
1390  h1_scl_Phi = bookH1withSumw2(iBooker, "phi", "ele supercluster phi", phi_nbin, phi_min, phi_max);
1392  "sigetaeta",
1393  "ele supercluster sigma eta eta",
1394  100,
1395  0.,
1396  0.05,
1397  "#sigma_{#eta #eta}",
1398  "Events",
1399  "ELE_LOGY E1 P");
1401  "sigetaeta_barrel",
1402  "ele supercluster sigma eta eta barrel",
1403  100,
1404  0.,
1405  0.05,
1406  "#sigma_{#eta #eta}",
1407  "Events",
1408  "ELE_LOGY E1 P");
1410  "sigetaeta_endcaps",
1411  "ele supercluster sigma eta eta endcaps",
1412  100,
1413  0.,
1414  0.05,
1415  "#sigma_{#eta #eta}",
1416  "Events",
1417  "ELE_LOGY E1 P");
1419  "sigietaieta",
1420  "ele supercluster sigma ieta ieta",
1421  100,
1422  0.,
1423  0.05,
1424  "#sigma_{i#eta i#eta}",
1425  "Events",
1426  "ELE_LOGY E1 P");
1428  "sigietaieta_barrel",
1429  "ele supercluster sigma ieta ieta, barrel",
1430  100,
1431  0.,
1432  0.05,
1433  "#sigma_{i#eta i#eta}",
1434  "Events",
1435  "ELE_LOGY E1 P");
1437  "sigietaieta_endcaps",
1438  "ele supercluster sigma ieta ieta, endcaps",
1439  100,
1440  0.,
1441  0.05,
1442  "#sigma_{i#eta i#eta}",
1443  "Events",
1444  "ELE_LOGY E1 P");
1446  "SigIEtaIEta_mAOD",
1447  "ele supercluster sigma ieta ieta",
1448  100,
1449  0.,
1450  0.05,
1451  "#sigma_{i#eta i#eta}",
1452  "Events",
1453  "ELE_LOGY E1 P");
1455  "SigIEtaIEta_mAOD_barrel",
1456  "ele supercluster sigma ieta ieta, barrel",
1457  100,
1458  0.,
1459  0.05,
1460  "#sigma_{i#eta i#eta}",
1461  "Events",
1462  "ELE_LOGY E1 P");
1464  "SigIEtaIEta_mAOD_endcaps",
1465  "ele supercluster sigma ieta ieta, endcaps",
1466  100,
1467  0.,
1468  0.05,
1469  "#sigma_{i#eta i#eta}",
1470  "Events",
1471  "ELE_LOGY E1 P");
1473  "full5x5_sigietaieta",
1474  "ele supercluster full5x5 sigma ieta ieta",
1475  100,
1476  0.,
1477  0.05,
1478  "#sigma_{i#eta i#eta}",
1479  "Events",
1480  "ELE_LOGY E1 P");
1482  "full5x5_sigietaieta_barrel",
1483  "ele supercluster full5x5 sigma ieta ieta, barrel",
1484  100,
1485  0.,
1486  0.05,
1487  "#sigma_{i#eta i#eta}",
1488  "Events",
1489  "ELE_LOGY E1 P");
1491  "full5x5_sigietaieta_endcaps",
1492  "ele supercluster full5x5 sigma ieta ieta, endcaps",
1493  100,
1494  0.,
1495  0.05,
1496  "#sigma_{i#eta i#eta}",
1497  "Events",
1498  "ELE_LOGY E1 P");
1500  iBooker, "E1x5", "ele supercluster energy in 1x5", p_nbin, 0., p_max, "E1x5 (GeV)", "Events", "ELE_LOGY E1 P");
1502  "E1x5_barrel",
1503  "ele supercluster energy in 1x5 barrel",
1504  p_nbin,
1505  0.,
1506  p_max,
1507  "E1x5 (GeV)",
1508  "Events",
1509  "ELE_LOGY E1 P");
1511  "E1x5_endcaps",
1512  "ele supercluster energy in 1x5 endcaps",
1513  p_nbin,
1514  0.,
1515  p_max,
1516  "E1x5 (GeV)",
1517  "Events",
1518  "ELE_LOGY E1 P");
1519  h1_scl_E2x5max = bookH1withSumw2(iBooker,
1520  "E2x5max",
1521  "ele supercluster energy in 2x5 max",
1522  p_nbin,
1523  0.,
1524  p_max,
1525  "E2x5 (GeV)",
1526  "Events",
1527  "ELE_LOGY E1 P");
1529  "E2x5max_barrel",
1530  "ele supercluster energy in 2x5 _max barrel",
1531  p_nbin,
1532  0.,
1533  p_max,
1534  "E2x5 (GeV)",
1535  "Events",
1536  "ELE_LOGY E1 P");
1538  "E2x5max_endcaps",
1539  "ele supercluster energy in 2x5 _max endcaps",
1540  p_nbin,
1541  0.,
1542  p_max,
1543  "E2x5 (GeV)",
1544  "Events",
1545  "ELE_LOGY E1 P");
1547  iBooker, "E5x5", "ele supercluster energy in 5x5", p_nbin, 0., p_max, "E5x5 (GeV)", "Events", "ELE_LOGY E1 P");
1549  "E5x5_barrel",
1550  "ele supercluster energy in 5x5 barrel",
1551  p_nbin,
1552  0.,
1553  p_max,
1554  "E5x5 (GeV)",
1555  "Events",
1556  "ELE_LOGY E1 P");
1558  "E5x5_endcaps",
1559  "ele supercluster energy in 5x5 endcaps",
1560  p_nbin,
1561  0.,
1562  p_max,
1563  "E5x5 (GeV)",
1564  "Events",
1565  "ELE_LOGY E1 P");
1566  h2_scl_EoEtruePfVsEg = bookH2(iBooker,
1567  "EoEtruePfVsEg",
1568  "mean mustache SC/true energy vs final SC/true energy",
1569  75,
1570  -0.1,
1571  1.4,
1572  75,
1573  -0.1,
1574  1.4,
1575  "E_{final SC}/E_{gen}",
1576  "E_{mustache}/E_{gen}");
1578  bookH1withSumw2(iBooker, "bcl_EtotoEtrue", "Total basicclusters energy", 50, 0.2, 1.2, "E/E_{gen}");
1580  iBooker, "bcl_EtotoEtrue_barrel", "Total basicclusters energy , barrel", 50, 0.2, 1.2, "E/E_{gen}");
1582  iBooker, "bcl_EtotoEtrue_endcaps", "Total basicclusters energy , endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1584  "ESFrac_endcaps",
1585  "Preshower over SC raw energy , endcaps",
1586  100,
1587  0.,
1588  0.8,
1589  "E_{PS} / E^{raw}_{SC}",
1590  "Events",
1591  "ELE_LOGY E1 P");
1592 
1593  // matched electron, gsf tracks
1594  setBookPrefix("h_ele");
1596  "ambiguousTracks",
1597  "ele # ambiguous tracks",
1598  5,
1599  0.,
1600  5.,
1601  "N_{ambiguous tracks}",
1602  "Events",
1603  "ELE_LOGY E1 P");
1605  bookH2(iBooker, "ambiguousTracksVsEta", "ele # ambiguous tracks vs eta", eta2D_nbin, eta_min, eta_max, 5, 0., 5.);
1607  bookH2(iBooker, "ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", phi2D_nbin, phi_min, phi_max, 5, 0., 5.);
1609  bookH2(iBooker, "ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", pt2D_nbin, 0., pt_max, 5, 0., 5.);
1611  bookH1withSumw2(iBooker, "foundHits", "ele track # found hits", fhits_nbin, 0., fhits_max, "N_{hits}");
1613  iBooker, "foundHits_barrel", "ele track # found hits, barrel", fhits_nbin, 0., fhits_max, "N_{hits}");
1615  iBooker, "foundHits_endcaps", "ele track # found hits, endcaps", fhits_nbin, 0., fhits_max, "N_{hits}");
1616  h2_ele_foundHitsVsEta = bookH2(iBooker,
1617  "foundHitsVsEta",
1618  "ele track # found hits vs eta",
1619  eta2D_nbin,
1620  eta_min,
1621  eta_max,
1622  fhits_nbin,
1623  0.,
1624  fhits_max);
1626  "foundHitsVsEta_mAOD",
1627  "ele track # found hits vs eta",
1628  eta2D_nbin,
1629  eta_min,
1630  eta_max,
1631  fhits_nbin,
1632  0.,
1633  fhits_max);
1634  h2_ele_foundHitsVsPhi = bookH2(iBooker,
1635  "foundHitsVsPhi",
1636  "ele track # found hits vs phi",
1637  phi2D_nbin,
1638  phi_min,
1639  phi_max,
1640  fhits_nbin,
1641  0.,
1642  fhits_max);
1644  iBooker, "foundHitsVsPt", "ele track # found hits vs pt", pt2D_nbin, 0., pt_max, fhits_nbin, 0., fhits_max);
1645  h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits", "ele track # lost hits", 5, 0., 5., "N_{lost hits}");
1647  bookH1withSumw2(iBooker, "lostHits_barrel", "ele track # lost hits, barrel", 5, 0., 5., "N_{lost hits}");
1649  bookH1withSumw2(iBooker, "lostHits_endcaps", "ele track # lost hits, endcaps", 5, 0., 5., "N_{lost hits}");
1651  iBooker, "lostHitsVsEta", "ele track # lost hits vs eta", eta2D_nbin, eta_min, eta_max, lhits_nbin, 0., lhits_max);
1653  iBooker, "lostHitsVsPhi", "ele track # lost hits vs eta", phi2D_nbin, phi_min, phi_max, lhits_nbin, 0., lhits_max);
1655  bookH2(iBooker, "lostHitsVsPt", "ele track # lost hits vs eta", pt2D_nbin, 0., pt_max, lhits_nbin, 0., lhits_max);
1656  h1_ele_chi2 =
1657  bookH1withSumw2(iBooker, "chi2", "ele track #chi^{2}", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1659  iBooker, "chi2_barrel", "ele track #chi^{2}, barrel", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1661  iBooker, "chi2_endcaps", "ele track #chi^{2}, endcaps", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1663  bookH2(iBooker, "chi2VsEta", "ele track #chi^{2} vs eta", eta2D_nbin, eta_min, eta_max, 50, 0., 15.);
1665  bookH2(iBooker, "chi2VsPhi", "ele track #chi^{2} vs phi", phi2D_nbin, phi_min, phi_max, 50, 0., 15.);
1666  h2_ele_chi2VsPt = bookH2(iBooker, "chi2VsPt", "ele track #chi^{2} vs pt", pt2D_nbin, 0., pt_max, 50, 0., 15.);
1668  "PinMnPout",
1669  "ele track inner p - outer p, mean of GSF components",
1670  p_nbin,
1671  0.,
1672  200.,
1673  "P_{vertex} - P_{out} (GeV/c)");
1675  "PinMnPout_mode",
1676  "ele track inner p - outer p, mode of GSF components",
1677  p_nbin,
1678  0.,
1679  100.,
1680  "P_{vertex} - P_{out}, mode of GSF components (GeV/c)");
1682  "PinMnPoutVsEta_mode",
1683  "ele track inner p - outer p vs eta, mode of GSF components",
1684  eta2D_nbin,
1685  eta_min,
1686  eta_max,
1687  p2D_nbin,
1688  0.,
1689  100.);
1691  "PinMnPoutVsPhi_mode",
1692  "ele track inner p - outer p vs phi, mode of GSF components",
1693  phi2D_nbin,
1694  phi_min,
1695  phi_max,
1696  p2D_nbin,
1697  0.,
1698  100.);
1700  "PinMnPoutVsPt_mode",
1701  "ele track inner p - outer p vs pt, mode of GSF components",
1702  pt2D_nbin,
1703  0.,
1704  pt_max,
1705  p2D_nbin,
1706  0.,
1707  100.);
1708  h2_ele_PinMnPoutVsE_mode = bookH2(iBooker,
1709  "PinMnPoutVsE_mode",
1710  "ele track inner p - outer p vs E, mode of GSF components",
1711  p2D_nbin,
1712  0.,
1713  200.,
1714  p2D_nbin,
1715  0.,
1716  100.);
1718  "PinMnPoutVsChi2_mode",
1719  "ele track inner p - outer p vs track chi2, mode of GSF components",
1720  50,
1721  0.,
1722  20.,
1723  p2D_nbin,
1724  0.,
1725  100.);
1727  iBooker, "outerP", "ele track outer p, mean of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1729  iBooker, "outerP_mode", "ele track outer p, mode of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1731  bookH2(iBooker, "outerPVsEta_mode", "ele track outer p vs eta mode", eta2D_nbin, eta_min, eta_max, 50, 0., p_max);
1733  iBooker, "outerPt", "ele track outer p_{T}, mean of GSF components", pt_nbin, 0., pt_max, "P_{T out} (GeV/c)");
1735  "outerPt_mode",
1736  "ele track outer p_{T}, mode of GSF components",
1737  pt_nbin,
1738  0.,
1739  pt_max,
1740  "P_{T out} (GeV/c)");
1741  h2_ele_outerPtVsEta_mode = bookH2(iBooker,
1742  "outerPtVsEta_mode",
1743  "ele track outer p_{T} vs eta, mode of GSF components",
1744  eta2D_nbin,
1745  eta_min,
1746  eta_max,
1747  pt2D_nbin,
1748  0.,
1749  pt_max);
1750  h2_ele_outerPtVsPhi_mode = bookH2(iBooker,
1751  "outerPtVsPhi_mode",
1752  "ele track outer p_{T} vs phi, mode of GSF components",
1753  phi2D_nbin,
1754  phi_min,
1755  phi_max,
1756  pt2D_nbin,
1757  0.,
1758  pt_max);
1759  h2_ele_outerPtVsPt_mode = bookH2(iBooker,
1760  "outerPtVsPt_mode",
1761  "ele track outer p_{T} vs pt, mode of GSF components",
1762  pt2D_nbin,
1763  0.,
1764  100.,
1765  pt2D_nbin,
1766  0.,
1767  pt_max);
1768 
1769  // matched electrons, matching
1771  iBooker, "EoP", "ele E/P_{vertex}", eop_nbin, 0., eop_max, "E/P_{vertex}", "Events", "ELE_LOGY E1 P");
1773  "EoP_barrel",
1774  "ele E/P_{vertex} barrel",
1775  eop_nbin,
1776  0.,
1777  eop_max,
1778  "E/P_{vertex}",
1779  "Events",
1780  "ELE_LOGY E1 P");
1782  "EoP_endcaps",
1783  "ele E/P_{vertex} endcaps",
1784  eop_nbin,
1785  0.,
1786  eop_max,
1787  "E/P_{vertex}",
1788  "Events",
1789  "ELE_LOGY E1 P");
1790  h2_ele_EoPVsEta =
1791  bookH2(iBooker, "EoPVsEta", "ele E/P_{vertex} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1792  h2_ele_EoPVsEtaExtended = bookH2(iBooker,
1793  "EoPVsEtaExtended",
1794  "ele E/P_{vertex} vs eta",
1798  eop2D_nbin,
1799  0.,
1800  eopmaxsht);
1801  h2_ele_EoPVsPhi =
1802  bookH2(iBooker, "EoPVsPhi", "ele E/P_{vertex} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1803  h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE", "ele E/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1804  h1_ele_EseedOP = bookH1withSumw2(iBooker,
1805  "EseedOP",
1806  "ele E_{seed}/P_{vertex}",
1807  eop_nbin,
1808  0.,
1809  eop_max,
1810  "E_{seed}/P_{vertex}",
1811  "Events",
1812  "ELE_LOGY E1 P");
1814  "EseedOP_barrel",
1815  "ele E_{seed}/P_{vertex} barrel",
1816  eop_nbin,
1817  0.,
1818  eop_max,
1819  "E_{seed}/P_{vertex}",
1820  "Events",
1821  "ELE_LOGY E1 P");
1823  "EseedOP_endcaps",
1824  "ele E_{seed}/P_{vertex} endcaps",
1825  eop_nbin,
1826  0.,
1827  eop_max,
1828  "E_{seed}/P_{vertex}",
1829  "Events",
1830  "ELE_LOGY E1 P");
1831  h2_ele_EseedOPVsEta = bookH2(iBooker,
1832  "EseedOPVsEta",
1833  "ele E_{seed}/P_{vertex} vs eta",
1834  eta2D_nbin,
1835  eta_min,
1836  eta_max,
1837  eop2D_nbin,
1838  0.,
1839  eopmaxsht);
1840  h2_ele_EseedOPVsPhi = bookH2(iBooker,
1841  "EseedOPVsPhi",
1842  "ele E_{seed}/P_{vertex} vs phi",
1843  phi2D_nbin,
1844  phi_min,
1845  phi_max,
1846  eop2D_nbin,
1847  0.,
1848  eopmaxsht);
1849  h2_ele_EseedOPVsE = bookH2(iBooker, "EseedOPVsE", "ele E_{seed}/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1851  iBooker, "EoPout", "ele E_{seed}/P_{out}", eop_nbin, 0., eop_max, "E_{seed}/P_{out}", "Events", "ELE_LOGY E1 P");
1853  "EoPout_barrel",
1854  "ele E_{seed}/P_{out} barrel",
1855  eop_nbin,
1856  0.,
1857  eop_max,
1858  "E_{seed}/P_{out}",
1859  "Events",
1860  "ELE_LOGY E1 P");
1862  "EoPout_endcaps",
1863  "ele E_{seed}/P_{out} endcaps",
1864  eop_nbin,
1865  0.,
1866  eop_max,
1867  "E_{seed}/P_{out}",
1868  "Events",
1869  "ELE_LOGY E1 P");
1871  iBooker, "EoPoutVsEta", "ele E_{seed}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1873  iBooker, "EoPoutVsPhi", "ele E_{seed}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1875  bookH2(iBooker, "EoPoutVsE", "ele E_{seed}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1877  iBooker, "EeleOPout", "ele E_{ele}/P_{out}", eop_nbin, 0., eop_max, "E_{ele}/P_{out}", "Events", "ELE_LOGY E1 P");
1879  "EeleOPout_barrel",
1880  "ele E_{ele}/P_{out} barrel",
1881  eop_nbin,
1882  0.,
1883  eop_max,
1884  "E_{ele}/P_{out}",
1885  "Events",
1886  "ELE_LOGY E1 P");
1888  "EeleOPout_endcaps",
1889  "ele E_{ele}/P_{out} endcaps",
1890  eop_nbin,
1891  0.,
1892  eop_max,
1893  "E_{ele}/P_{out}",
1894  "Events",
1895  "ELE_LOGY E1 P");
1897  iBooker, "EeleOPoutVsEta", "ele E_{ele}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1899  iBooker, "EeleOPoutVsPhi", "ele E_{ele}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1901  bookH2(iBooker, "EeleOPoutVsE", "ele E_{ele}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1903  "dEtaSc_propVtx",
1904  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1906  detamatch_min,
1907  detamatch_max,
1908  "#eta_{sc} - #eta_{tr}",
1909  "Events",
1910  "ELE_LOGY E1 P");
1912  "dEtaSc_propVtx_barrel",
1913  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
1915  detamatch_min,
1916  detamatch_max,
1917  "#eta_{sc} - #eta_{tr}",
1918  "Events",
1919  "ELE_LOGY E1 P");
1921  "dEtaSc_propVtx_endcaps",
1922  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
1924  detamatch_min,
1925  detamatch_max,
1926  "#eta_{sc} - #eta_{tr}",
1927  "Events",
1928  "ELE_LOGY E1 P");
1930  "dEtaSc_propVtx_mAOD",
1931  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1933  detamatch_min,
1934  detamatch_max,
1935  "#eta_{sc} - #eta_{tr}",
1936  "Events",
1937  "ELE_LOGY E1 P");
1939  "dEtaSc_propVtx_mAOD_barrel",
1940  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
1942  detamatch_min,
1943  detamatch_max,
1944  "#eta_{sc} - #eta_{tr}",
1945  "Events",
1946  "ELE_LOGY E1 P");
1948  "dEtaSc_propVtx_mAOD_endcaps",
1949  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
1951  detamatch_min,
1952  detamatch_max,
1953  "#eta_{sc} - #eta_{tr}",
1954  "Events",
1955  "ELE_LOGY E1 P");
1957  "dEtaScVsEta_propVtx",
1958  "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
1959  eta2D_nbin,
1960  eta_min,
1961  eta_max,
1963  detamatch_min,
1964  detamatch_max);
1966  "dEtaScVsPhi_propVtx",
1967  "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
1968  phi2D_nbin,
1969  phi_min,
1970  phi_max,
1972  detamatch_min,
1973  detamatch_max);
1975  "dEtaScVsPt_propVtx",
1976  "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
1977  pt2D_nbin,
1978  0.,
1979  pt_max,
1981  detamatch_min,
1982  detamatch_max);
1984  "dPhiSc_propVtx",
1985  "ele #phi_{sc} - #phi_{tr}, prop from vertex",
1987  dphimatch_min,
1988  dphimatch_max,
1989  "#phi_{sc} - #phi_{tr} (rad)",
1990  "Events",
1991  "ELE_LOGY E1 P");
1993  "dPhiSc_propVtx_barrel",
1994  "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
1996  dphimatch_min,
1997  dphimatch_max,
1998  "#phi_{sc} - #phi_{tr} (rad)",
1999  "Events",
2000  "ELE_LOGY E1 P");
2002  "dPhiSc_propVtx_endcaps",
2003  "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
2005  dphimatch_min,
2006  dphimatch_max,
2007  "#phi_{sc} - #phi_{tr} (rad)",
2008  "Events",
2009  "ELE_LOGY E1 P");
2011  "dPhiScVsEta_propVtx",
2012  "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
2013  eta2D_nbin,
2014  eta_min,
2015  eta_max,
2017  dphimatch_min,
2018  dphimatch_max);
2020  "dPhiScVsPhi_propVtx",
2021  "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
2022  phi2D_nbin,
2023  phi_min,
2024  phi_max,
2026  dphimatch_min,
2027  dphimatch_max);
2029  "dPhiScVsPt_propVtx",
2030  "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
2031  pt2D_nbin,
2032  0.,
2033  pt_max,
2035  dphimatch_min,
2036  dphimatch_max);
2038  "dEtaCl_propOut",
2039  "ele #eta_{cl} - #eta_{tr}, prop from outermost",
2041  detamatch_min,
2042  detamatch_max,
2043  "#eta_{seedcl} - #eta_{tr}",
2044  "Events",
2045  "ELE_LOGY E1 P");
2047  "dEtaCl_propOut_barrel",
2048  "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
2050  detamatch_min,
2051  detamatch_max,
2052  "#eta_{seedcl} - #eta_{tr}",
2053  "Events",
2054  "ELE_LOGY E1 P");
2056  "dEtaCl_propOut_endcaps",
2057  "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
2059  detamatch_min,
2060  detamatch_max,
2061  "#eta_{seedcl} - #eta_{tr}",
2062  "Events",
2063  "ELE_LOGY E1 P");
2065  "dEtaClVsEta_propOut",
2066  "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
2067  eta2D_nbin,
2068  eta_min,
2069  eta_max,
2071  detamatch_min,
2072  detamatch_max);
2074  "dEtaClVsPhi_propOut",
2075  "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
2076  phi2D_nbin,
2077  phi_min,
2078  phi_max,
2080  detamatch_min,
2081  detamatch_max);
2083  "dEtaScVsPt_propOut",
2084  "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
2085  pt2D_nbin,
2086  0.,
2087  pt_max,
2089  detamatch_min,
2090  detamatch_max);
2092  "dPhiCl_propOut",
2093  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2095  dphimatch_min,
2096  dphimatch_max,
2097  "#phi_{seedcl} - #phi_{tr} (rad)",
2098  "Events",
2099  "ELE_LOGY E1 P");
2101  "dPhiCl_propOut_barrel",
2102  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2104  dphimatch_min,
2105  dphimatch_max,
2106  "#phi_{seedcl} - #phi_{tr} (rad)",
2107  "Events",
2108  "ELE_LOGY E1 P");
2110  "dPhiCl_propOut_endcaps",
2111  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2113  dphimatch_min,
2114  dphimatch_max,
2115  "#phi_{seedcl} - #phi_{tr} (rad)",
2116  "Events",
2117  "ELE_LOGY E1 P");
2119  "dPhiCl_propOut_mAOD",
2120  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2122  dphimatch_min,
2123  dphimatch_max,
2124  "#phi_{seedcl} - #phi_{tr} (rad)",
2125  "Events",
2126  "ELE_LOGY E1 P");
2128  "dPhiCl_propOut_mAOD_barrel",
2129  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2131  dphimatch_min,
2132  dphimatch_max,
2133  "#phi_{seedcl} - #phi_{tr} (rad)",
2134  "Events",
2135  "ELE_LOGY E1 P");
2137  "dPhiCl_propOut_mAOD_endcaps",
2138  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2140  dphimatch_min,
2141  dphimatch_max,
2142  "#phi_{seedcl} - #phi_{tr} (rad)",
2143  "Events",
2144  "ELE_LOGY E1 P");
2146  "dPhiClVsEta_propOut",
2147  "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
2148  eta2D_nbin,
2149  eta_min,
2150  eta_max,
2152  dphimatch_min,
2153  dphimatch_max);
2155  "dPhiClVsPhi_propOut",
2156  "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
2157  phi2D_nbin,
2158  phi_min,
2159  phi_max,
2161  dphimatch_min,
2162  dphimatch_max);
2164  "dPhiSClsPt_propOut",
2165  "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
2166  pt2D_nbin,
2167  0.,
2168  pt_max,
2170  dphimatch_min,
2171  dphimatch_max);
2173  "dEtaEleCl_propOut",
2174  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
2176  detamatch_min,
2177  detamatch_max,
2178  "#eta_{elecl} - #eta_{tr}",
2179  "Events",
2180  "ELE_LOGY E1 P");
2182  "dEtaEleCl_propOut_barrel",
2183  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
2185  detamatch_min,
2186  detamatch_max,
2187  "#eta_{elecl} - #eta_{tr}",
2188  "Events",
2189  "ELE_LOGY E1 P");
2191  "dEtaEleCl_propOut_endcaps",
2192  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
2194  detamatch_min,
2195  detamatch_max,
2196  "#eta_{elecl} - #eta_{tr}",
2197  "Events",
2198  "ELE_LOGY E1 P");
2200  "dEtaEleClVsEta_propOut",
2201  "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
2202  eta2D_nbin,
2203  eta_min,
2204  eta_max,
2206  detamatch_min,
2207  detamatch_max);
2209  "dEtaEleClVsPhi_propOut",
2210  "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
2211  phi2D_nbin,
2212  phi_min,
2213  phi_max,
2215  detamatch_min,
2216  detamatch_max);
2218  "dEtaScVsPt_propOut",
2219  "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
2220  pt2D_nbin,
2221  0.,
2222  pt_max,
2224  detamatch_min,
2225  detamatch_max);
2227  "dPhiEleCl_propOut",
2228  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
2230  dphimatch_min,
2231  dphimatch_max,
2232  "#phi_{elecl} - #phi_{tr} (rad)",
2233  "Events",
2234  "ELE_LOGY E1 P");
2236  "dPhiEleCl_propOut_barrel",
2237  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
2239  dphimatch_min,
2240  dphimatch_max,
2241  "#phi_{elecl} - #phi_{tr} (rad)",
2242  "Events",
2243  "ELE_LOGY E1 P");
2245  "dPhiEleCl_propOut_endcaps",
2246  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
2248  dphimatch_min,
2249  dphimatch_max,
2250  "#phi_{elecl} - #phi_{tr} (rad)",
2251  "Events",
2252  "ELE_LOGY E1 P");
2254  "dPhiEleClVsEta_propOut",
2255  "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
2256  eta2D_nbin,
2257  eta_min,
2258  eta_max,
2260  dphimatch_min,
2261  dphimatch_max);
2263  "dPhiEleClVsPhi_propOut",
2264  "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
2265  phi2D_nbin,
2266  phi_min,
2267  phi_max,
2269  dphimatch_min,
2270  dphimatch_max);
2272  "dPhiSEleClsPt_propOut",
2273  "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
2274  pt2D_nbin,
2275  0.,
2276  pt_max,
2278  dphimatch_min,
2279  dphimatch_max);
2281  iBooker, "HoE", "ele hadronic energy / em energy", hoe_nbin, hoe_min, hoe_max, "H/E", "Events", "ELE_LOGY E1 P");
2283  "HoE_barrel",
2284  "ele hadronic energy / em energy, barrel",
2285  hoe_nbin,
2286  hoe_min,
2287  hoe_max,
2288  "H/E",
2289  "Events",
2290  "ELE_LOGY E1 P");
2292  "HoE_endcaps",
2293  "ele hadronic energy / em energy, endcaps",
2294  hoe_nbin,
2295  hoe_min,
2296  hoe_max,
2297  "H/E",
2298  "Events",
2299  "ELE_LOGY E1 P");
2300  h1_ele_HoE_mAOD = bookH1withSumw2(iBooker,
2301  "HoE_mAOD",
2302  "ele hadronic energy / em energy",
2303  hoe_nbin,
2304  hoe_min,
2305  hoe_max,
2306  "H/E",
2307  "Events",
2308  "ELE_LOGY E1 P");
2310  "HoE_mAOD_barrel",
2311  "ele hadronic energy / em energy, barrel",
2312  hoe_nbin,
2313  hoe_min,
2314  hoe_max,
2315  "H/E",
2316  "Events",
2317  "ELE_LOGY E1 P");
2319  "HoE_mAOD_endcaps",
2320  "ele hadronic energy / em energy, endcaps",
2321  hoe_nbin,
2322  hoe_min,
2323  hoe_max,
2324  "H/E",
2325  "Events",
2326  "ELE_LOGY E1 P");
2327  h1_ele_HoE_bc = bookH1withSumw2(iBooker,
2328  "HoE_bc",
2329  "ele hadronic energy / em energy behind cluster",
2330  hoe_nbin,
2331  hoe_min,
2332  hoe_max,
2333  "H/E",
2334  "Events",
2335  "ELE_LOGY E1 P");
2337  "HoE_bc_barrel",
2338  "ele hadronic energy / em energy, behind cluster barrel",
2339  hoe_nbin,
2340  hoe_min,
2341  hoe_max,
2342  "H/E",
2343  "Events",
2344  "ELE_LOGY E1 P");
2346  "HoE_bc_endcaps",
2347  "ele hadronic energy / em energy, behind cluster, endcaps",
2348  hoe_nbin,
2349  hoe_min,
2350  hoe_max,
2351  "H/E",
2352  "Events",
2353  "ELE_LOGY E1 P");
2355  "hcalDepth1OverEcalBc",
2356  "hcalDepth1OverEcalBc",
2357  hoe_nbin,
2358  hoe_min,
2359  hoe_max,
2360  "H/E",
2361  "Events",
2362  "ELE_LOGY E1 P");
2364  "hcalDepth1OverEcalBc_barrel",
2365  "hcalDepth1OverEcalBc_barrel",
2366  hoe_nbin,
2367  hoe_min,
2368  hoe_max,
2369  "H/E",
2370  "Events",
2371  "ELE_LOGY E1 P");
2373  "hcalDepth1OverEcalBc_endcaps",
2374  "hcalDepth1OverEcalBc_endcaps",
2375  hoe_nbin,
2376  hoe_min,
2377  hoe_max,
2378  "H/E",
2379  "Events",
2380  "ELE_LOGY E1 P");
2382  "hcalDepth2OverEcalBc",
2383  "hcalDepth2OverEcalBc",
2384  hoe_nbin,
2385  hoe_min,
2386  hoe_max,
2387  "H/E",
2388  "Events",
2389  "ELE_LOGY E1 P");
2391  "hcalDepth2OverEcalBc_barrel",
2392  "hcalDepth2OverEcalBc_barrel",
2393  hoe_nbin,
2394  hoe_min,
2395  hoe_max,
2396  "H/E",
2397  "Events",
2398  "ELE_LOGY E1 P");
2400  "hcalDepth2OverEcalBc_endcaps",
2401  "hcalDepth2OverEcalBc_endcaps",
2402  hoe_nbin,
2403  hoe_min,
2404  hoe_max,
2405  "H/E",
2406  "Events",
2407  "ELE_LOGY E1 P");
2408 
2410  "HoE_fiducial",
2411  "ele hadronic energy / em energy, fiducial region",
2412  hoe_nbin,
2413  hoe_min,
2414  hoe_max,
2415  "H/E",
2416  "Events",
2417  "ELE_LOGY E1 P");
2418  h2_ele_HoEVsEta = bookH2(iBooker,
2419  "HoEVsEta",
2420  "ele hadronic energy / em energy vs eta",
2421  eta_nbin,
2422  eta_min,
2423  eta_max,
2424  hoe_nbin,
2425  hoe_min,
2426  hoe_max);
2427  h2_ele_HoEVsPhi = bookH2(iBooker,
2428  "HoEVsPhi",
2429  "ele hadronic energy / em energy vs phi",
2430  phi2D_nbin,
2431  phi_min,
2432  phi_max,
2433  hoe_nbin,
2434  hoe_min,
2435  hoe_max);
2436  h2_ele_HoEVsE =
2437  bookH2(iBooker, "HoEVsE", "ele hadronic energy / em energy vs E", p_nbin, 0., 300., hoe_nbin, hoe_min, hoe_max);
2438 
2439  // seeds
2441  bookH1withSumw2(iBooker, "seedSubdet2", "ele seed subdet 2nd layer", 11, -0.5, 10.5, "2nd hit subdet Id");
2442  h1_ele_seed_mask = bookH1withSumw2(iBooker, "seedMask", "ele seed hits mask", 13, -0.5, 12.5);
2444  bookH1withSumw2(iBooker, "seedMask_Bpix", "ele seed hits mask when subdet2 is bpix", 13, -0.5, 12.5);
2446  bookH1withSumw2(iBooker, "seedMask_Fpix", "ele seed hits mask when subdet2 is fpix", 13, -0.5, 12.5);
2448  bookH1withSumw2(iBooker, "seedMask_Tec", "ele seed hits mask when subdet2 is tec", 13, -0.5, 12.5);
2450  iBooker, "seedDphi2", "ele seed dphi 2nd layer", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2452  iBooker, "seedDphi2_VsEta", "ele seed dphi 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.003, +0.003);
2454  bookH2(iBooker, "seedDphi2_VsPt", "ele seed dphi 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2456  iBooker, "seedDphi2Pos", "ele seed dphi 2nd layer positron", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2458  "seedDphi2Pos_VsEta",
2459  "ele seed dphi 2nd layer positron vs eta",
2460  eta2D_nbin,
2461  eta_min,
2462  eta_max,
2463  50,
2464  -0.003,
2465  +0.003);
2467  iBooker, "seedDphi2Pos_VsPt", "ele seed dphi 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2469  iBooker, "seedDrz2", "ele seed dr (dz) 2nd layer", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2471  iBooker, "seedDrz2_VsEta", "ele seed dr/dz 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.03, +0.03);
2473  bookH2(iBooker, "seedDrz2_VsPt", "ele seed dr/dz 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2475  iBooker, "seedDrz2Pos", "ele seed dr (dz) 2nd layer positron", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2476  h2_ele_seed_drz2posVsEta = bookH2(iBooker,
2477  "seedDrz2Pos_VsEta",
2478  "ele seed dr/dz 2nd layer positron vs eta",
2479  eta2D_nbin,
2480  eta_min,
2481  eta_max,
2482  50,
2483  -0.03,
2484  +0.03);
2486  iBooker, "seedDrz2Pos_VsPt", "ele seed dr/dz 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2487 
2488  // classes
2489  h1_ele_classes = bookH1withSumw2(iBooker, "classes", "ele classes", 20, 0.0, 20., "class Id");
2490  h1_ele_eta = bookH1withSumw2(iBooker, "eta", "ele electron eta", eta_nbin / 2, 0.0, eta_max);
2491  h1_ele_eta_golden = bookH1withSumw2(iBooker, "eta_golden", "ele electron eta golden", eta_nbin / 2, 0.0, eta_max);
2492  h1_ele_eta_bbrem = bookH1withSumw2(iBooker, "eta_bbrem", "ele electron eta bbrem", eta_nbin / 2, 0.0, eta_max);
2493  h1_ele_eta_shower = bookH1withSumw2(iBooker, "eta_shower", "ele electron eta showering", eta_nbin / 2, 0.0, eta_max);
2495  "PinVsPoutGolden_mode",
2496  "ele track inner p vs outer p vs eta, golden, mode of GSF components",
2497  p2D_nbin,
2498  0.,
2499  p_max,
2500  50,
2501  0.,
2502  p_max);
2504  "PinVsPoutShowering_mode",
2505  "ele track inner p vs outer p vs eta, showering, mode of GSF components",
2506  p2D_nbin,
2507  0.,
2508  p_max,
2509  50,
2510  0.,
2511  p_max);
2513  "PinVsPoutGolden_mean",
2514  "ele track inner p vs outer p vs eta, golden, mean of GSF components",
2515  p2D_nbin,
2516  0.,
2517  p_max,
2518  50,
2519  0.,
2520  p_max);
2522  "PinVsPoutShowering_mean",
2523  "ele track inner p vs outer p vs eta, showering, mean of GSF components",
2524  p2D_nbin,
2525  0.,
2526  p_max,
2527  50,
2528  0.,
2529  p_max);
2531  "PtinVsPtoutGolden_mode",
2532  "ele track inner pt vs outer pt vs eta, golden, mode of GSF components",
2533  pt2D_nbin,
2534  0.,
2535  pt_max,
2536  50,
2537  0.,
2538  pt_max);
2540  "PtinVsPtoutShowering_mode",
2541  "ele track inner pt vs outer pt vs eta, showering, mode of GSF components",
2542  pt2D_nbin,
2543  0.,
2544  pt_max,
2545  50,
2546  0.,
2547  pt_max);
2549  "PtinVsPtoutGolden_mean",
2550  "ele track inner pt vs outer pt vs eta, golden, mean of GSF components",
2551  pt2D_nbin,
2552  0.,
2553  pt_max,
2554  50,
2555  0.,
2556  pt_max);
2558  "PtinVsPtoutShowering_mean",
2559  "ele track inner pt vs outer pt vs eta, showering, mean of GSF components",
2560  pt2D_nbin,
2561  0.,
2562  pt_max,
2563  50,
2564  0.,
2565  pt_max);
2566  setBookPrefix("h_scl");
2568  "EoEtrue_golden_barrel",
2569  "ele supercluster energy / gen energy, golden, barrel",
2570  poptrue_nbin,
2571  poptrue_min,
2572  poptrue_max);
2574  "EoEtrue_golden_endcaps",
2575  "ele supercluster energy / gen energy, golden, endcaps",
2576  poptrue_nbin,
2577  poptrue_min,
2578  poptrue_max);
2580  "EoEtrue_showering_barrel",
2581  "ele supercluster energy / gen energy, showering, barrel",
2582  poptrue_nbin,
2583  poptrue_min,
2584  poptrue_max);
2586  "EoEtrue_showering_endcaps",
2587  "ele supercluster energy / gen energy, showering, endcaps",
2588  poptrue_nbin,
2589  poptrue_min,
2590  poptrue_max);
2591 
2592  // isolation
2593  setBookPrefix("h_ele");
2595  "tkSumPt_dr03",
2596  "tk isolation sum, dR=0.3",
2597  100,
2598  0.0,
2599  20.,
2600  "TkIsoSum, cone 0.3 (GeV/c)",
2601  "Events",
2602  "ELE_LOGY E1 P");
2604  "tkSumPt_dr03_barrel",
2605  "tk isolation sum, dR=0.3, barrel",
2606  100,
2607  0.0,
2608  20.,
2609  "TkIsoSum, cone 0.3 (GeV/c)",
2610  "Events",
2611  "ELE_LOGY E1 P");
2613  "tkSumPt_dr03_endcaps",
2614  "tk isolation sum, dR=0.3, endcaps",
2615  100,
2616  0.0,
2617  20.,
2618  "TkIsoSum, cone 0.3 (GeV/c)",
2619  "Events",
2620  "ELE_LOGY E1 P");
2622  "ecalRecHitSumEt_dr03",
2623  "ecal isolation sum, dR=0.3",
2624  100,
2625  0.0,
2626  20.,
2627  "EcalIsoSum, cone 0.3 (GeV)",
2628  "Events",
2629  "ELE_LOGY E1 P");
2631  "ecalRecHitSumEt_dr03_barrel",
2632  "ecal isolation sum, dR=0.3, barrel",
2633  100,
2634  0.0,
2635  20.,
2636  "EcalIsoSum, cone 0.3 (GeV)",
2637  "Events",
2638  "ELE_LOGY E1 P");
2640  "ecalRecHitSumEt_dr03_endcaps",
2641  "ecal isolation sum, dR=0.3, endcaps",
2642  100,
2643  0.0,
2644  20.,
2645  "EcalIsoSum, cone 0.3 (GeV)",
2646  "Events",
2647  "ELE_LOGY E1 P");
2649  "hcalTowerSumEt_dr03_depth1",
2650  "hcal depth1 isolation sum, dR=0.3",
2651  100,
2652  0.0,
2653  20.,
2654  "Hcal1IsoSum, cone 0.3 (GeV)",
2655  "Events",
2656  "ELE_LOGY E1 P");
2658  "hcalTowerSumEt_dr03_depth1_barrel",
2659  "hcal depth1 isolation sum, dR=0.3, barrel",
2660  100,
2661  0.0,
2662  20.,
2663  "Hcal1IsoSum, cone 0.3 (GeV)",
2664  "Events",
2665  "ELE_LOGY E1 P");
2667  "hcalTowerSumEt_dr03_depth1_endcaps",
2668  "hcal depth1 isolation sum, dR=0.3, endcaps",
2669  100,
2670  0.0,
2671  20.,
2672  "Hcal1IsoSum, cone 0.3 (GeV)",
2673  "Events",
2674  "ELE_LOGY E1 P");
2676  "hcalTowerSumEt_dr03_depth2",
2677  "hcal depth2 isolation sum, dR=0.3",
2678  100,
2679  0.0,
2680  20.,
2681  "Hcal2IsoSum, cone 0.3 (GeV)",
2682  "Events",
2683  "ELE_LOGY E1 P");
2685  "hcalTowerSumEt_dr03_depth2_barrel",
2686  "hcal depth2 isolation sum, dR=0.3",
2687  100,
2688  0.0,
2689  20.,
2690  "Hcal2IsoSum, cone 0.3 (GeV)",
2691  "Events",
2692  "ELE_LOGY E1 P");
2694  "hcalTowerSumEt_dr03_depth2_endcaps",
2695  "hcal depth2 isolation sum, dR=0.3",
2696  100,
2697  0.0,
2698  20.,
2699  "Hcal2IsoSum, cone 0.3 (GeV)",
2700  "Events",
2701  "ELE_LOGY E1 P");
2703  "tkSumPt_dr04",
2704  "tk isolation sum, dR=0.4",
2705  100,
2706  0.0,
2707  20.,
2708  "TkIsoSum, cone 0.4 (GeV/c)",
2709  "Events",
2710  "ELE_LOGY E1 P");
2712  "tkSumPt_dr04_barrel",
2713  "tk isolation sum, dR=0.4, barrel",
2714  100,
2715  0.0,
2716  20.,
2717  "TkIsoSum, cone 0.4 (GeV/c)",
2718  "Events",
2719  "ELE_LOGY E1 P");
2721  "tkSumPt_dr04_endcaps",
2722  "tk isolation sum, dR=0.4, endcaps",
2723  100,
2724  0.0,
2725  20.,
2726  "TkIsoSum, cone 0.4 (GeV/c)",
2727  "Events",
2728  "ELE_LOGY E1 P");
2730  "ecalRecHitSumEt_dr04",
2731  "ecal isolation sum, dR=0.4",
2732  100,
2733  0.0,
2734  20.,
2735  "EcalIsoSum, cone 0.4 (GeV)",
2736  "Events",
2737  "ELE_LOGY E1 P");
2739  "ecalRecHitSumEt_dr04_barrel",
2740  "ecal isolation sum, dR=0.4, barrel",
2741  100,
2742  0.0,
2743  20.,
2744  "EcalIsoSum, cone 0.4 (GeV)",
2745  "Events",
2746  "ELE_LOGY E1 P");
2748  "ecalRecHitSumEt_dr04_endcaps",
2749  "ecal isolation sum, dR=0.4, endcaps",
2750  100,
2751  0.0,
2752  20.,
2753  "EcalIsoSum, cone 0.4 (GeV)",
2754  "Events",
2755  "ELE_LOGY E1 P");
2757  "hcalTowerSumEt_dr04_depth1",
2758  "hcal depth1 isolation sum, dR=0.4",
2759  100,
2760  0.0,
2761  20.,
2762  "Hcal1IsoSum, cone 0.4 (GeV)",
2763  "Events",
2764  "ELE_LOGY E1 P");
2766  "hcalTowerSumEt_dr04_depth1_barrel",
2767  "hcal depth1 isolation sum, dR=0.4, barrel",
2768  100,
2769  0.0,
2770  20.,
2771  "Hcal1IsoSum, cone 0.4 (GeV)",
2772  "Events",
2773  "ELE_LOGY E1 P");
2775  "hcalTowerSumEt_dr04_depth1_endcaps",
2776  "hcal depth1 isolation sum, dR=0.4, endcaps",
2777  100,
2778  0.0,
2779  20.,
2780  "Hcal1IsoSum, cone 0.4 (GeV)",
2781  "Events",
2782  "ELE_LOGY E1 P");
2784  "hcalTowerSumEt_dr04_depth2",
2785  "hcal depth2 isolation sum, dR=0.4",
2786  100,
2787  0.0,
2788  20.,
2789  "Hcal2IsoSum, cone 0.4 (GeV)",
2790  "Events",
2791  "ELE_LOGY E1 P");
2793  "hcalTowerSumEt_dr04_depth2_barrel",
2794  "hcal depth2 isolation sum, dR=0.4",
2795  100,
2796  0.0,
2797  20.,
2798  "Hcal2IsoSum, cone 0.4 (GeV)",
2799  "Events",
2800  "ELE_LOGY E1 P");
2802  "hcalTowerSumEt_dr04_depth2_endcaps",
2803  "hcal depth2 isolation sum, dR=0.4",
2804  100,
2805  0.0,
2806  20.,
2807  "Hcal2IsoSum, cone 0.4 (GeV)",
2808  "Events",
2809  "ELE_LOGY E1 P");
2810 
2811  // newHCAL
2812  // isolation new hcal
2814  "hcalTowerSumEtBc_dr03_depth1",
2815  "hcal depth1 isolation sum behind cluster, dR=0.3",
2816  100,
2817  0.0,
2818  20.,
2819  "Hcal1IsoSum, cone 0.3 (GeV)",
2820  "Events",
2821  "ELE_LOGY E1 P");
2823  bookH1withSumw2(iBooker,
2824  "hcalTowerSumEtBc_dr03_depth1_barrel",
2825  "hcal depth1 isolation sum behind cluster, dR=0.3, barrel",
2826  100,
2827  0.0,
2828  20.,
2829  "Hcal1IsoSum, cone 0.3 (GeV)",
2830  "Events",
2831  "ELE_LOGY E1 P");
2833  bookH1withSumw2(iBooker,
2834  "hcalTowerSumEtBc_dr03_depth1_endcaps",
2835  "hcal depth1 isolation sum behind cluster, dR=0.3, endcaps",
2836  100,
2837  0.0,
2838  20.,
2839  "Hcal1IsoSum, cone 0.3 (GeV)",
2840  "Events",
2841  "ELE_LOGY E1 P");
2842 
2844  "hcalTowerSumEtBc_dr04_depth1",
2845  "hcal depth1 isolation sum behind cluster, dR=0.4",
2846  100,
2847  0.0,
2848  20.,
2849  "Hcal1IsoSum, cone 0.4 (GeV)",
2850  "Events",
2851  "ELE_LOGY E1 P");
2853  bookH1withSumw2(iBooker,
2854  "hcalTowerSumEtBc_dr04_depth1_barrel",
2855  "hcal depth1 isolation sum behind cluster, dR=0.4, barrel",
2856  100,
2857  0.0,
2858  20.,
2859  "Hcal1IsoSum, cone 0.4 (GeV)",
2860  "Events",
2861  "ELE_LOGY E1 P");
2863  bookH1withSumw2(iBooker,
2864  "hcalTowerSumEtBc_dr04_depth1_endcaps",
2865  "hcal depth1 isolation sum behind cluster, dR=0.4, endcaps",
2866  100,
2867  0.0,
2868  20.,
2869  "Hcal1IsoSum, cone 0.4 (GeV)",
2870  "Events",
2871  "ELE_LOGY E1 P");
2872 
2874  "hcalTowerSumEtBc_dr03_depth2",
2875  "hcal depth2 isolation sum behind cluster, dR=0.3",
2876  100,
2877  0.0,
2878  20.,
2879  "Hcal1IsoSum, cone 0.3 (GeV)",
2880  "Events",
2881  "ELE_LOGY E1 P");
2883  bookH1withSumw2(iBooker,
2884  "hcalTowerSumEtBc_dr03_depth2_barrel",
2885  "hcal depth2 isolation sum behind cluster, dR=0.3, barrel",
2886  100,
2887  0.0,
2888  20.,
2889  "Hcal1IsoSum, cone 0.3 (GeV)",
2890  "Events",
2891  "ELE_LOGY E1 P");
2893  bookH1withSumw2(iBooker,
2894  "hcalTowerSumEtBc_dr03_depth2_endcaps",
2895  "hcal depth2 isolation sum behind cluster, dR=0.3, endcaps",
2896  100,
2897  0.0,
2898  20.,
2899  "Hcal1IsoSum, cone 0.3 (GeV)",
2900  "Events",
2901  "ELE_LOGY E1 P");
2902 
2904  "hcalTowerSumEtBc_dr04_depth2",
2905  "hcal depth2 isolation sum behind cluster, dR=0.4",
2906  100,
2907  0.0,
2908  20.,
2909  "Hcal1IsoSum, cone 0.4 (GeV)",
2910  "Events",
2911  "ELE_LOGY E1 P");
2913  bookH1withSumw2(iBooker,
2914  "hcalTowerSumEtBc_dr04_depth2_barrel",
2915  "hcal depth2 isolation sum behind cluster, dR=0.4, barrel",
2916  100,
2917  0.0,
2918  20.,
2919  "Hcal1IsoSum, cone 0.4 (GeV)",
2920  "Events",
2921  "ELE_LOGY E1 P");
2923  bookH1withSumw2(iBooker,
2924  "hcalTowerSumEtBc_dr04_depth2_endcaps",
2925  "hcal depth2 isolation sum behind cluster, dR=0.4, endcaps",
2926  100,
2927  0.0,
2928  20.,
2929  "Hcal1IsoSum, cone 0.4 (GeV)",
2930  "Events",
2931  "ELE_LOGY E1 P");
2932 
2933  // fbrem
2935  iBooker, "fbrem", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2937  "fbrem_barrel",
2938  "ele brem fraction for barrel, mode of GSF components",
2939  100,
2940  0.,
2941  1.,
2942  "P_{in} - P_{out} / P_{in}");
2944  "fbrem_endcaps",
2945  "ele brem franction for endcaps, mode of GSF components",
2946  100,
2947  0.,
2948  1.,
2949  "P_{in} - P_{out} / P_{in}");
2951  iBooker, "fbrem_mAOD", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2953  "fbrem_mAOD_barrel",
2954  "ele brem fraction for barrel, mode of GSF components",
2955  100,
2956  0.,
2957  1.,
2958  "P_{in} - P_{out} / P_{in}");
2960  "fbrem_mAOD_endcaps",
2961  "ele brem franction for endcaps, mode of GSF components",
2962  100,
2963  0.,
2964  1.,
2965  "P_{in} - P_{out} / P_{in}");
2967  bookH1withSumw2(iBooker, "superclusterfbrem", "supercluster brem fraction", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2969  iBooker, "superclusterfbrem_barrel", "supercluster brem fraction for barrel", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2971  "superclusterfbrem_endcaps",
2972  "supercluster brem franction for endcaps",
2973  100,
2974  0.,
2975  1.,
2976  "1 - E_{ele} / E_{SC}");
2977  p1_ele_fbremVsEta_mode = bookP1(iBooker,
2978  "fbremvsEtamode",
2979  "mean ele brem fraction vs eta, mode of GSF components",
2980  eta2D_nbin,
2981  eta_min,
2982  eta_max,
2983  0.,
2984  1.,
2985  "#eta",
2986  "<P_{in} - P_{out} / P_{in}>");
2987  p1_ele_fbremVsEta_mean = bookP1(iBooker,
2988  "fbremvsEtamean",
2989  "mean ele brem fraction vs eta, mean of GSF components",
2990  eta2D_nbin,
2991  eta_min,
2992  eta_max,
2993  0.,
2994  1.,
2995  "#eta",
2996  "<P_{in} - P_{out} / P_{in}>");
2997  h1_ele_chargeInfo = bookH1withSumw2(iBooker, "chargeInfo", "chargeInfo", 5, -2., 3.);
2998 
2999  // e/g et pflow electrons
3000  h1_ele_mva = bookH1withSumw2(iBooker, "mva", "ele identification mva", 100, -1., 1.);
3001  h1_ele_mva_barrel = bookH1withSumw2(iBooker, "mva_barrel", "ele identification mva barrel", 100, -1., 1.);
3002  h1_ele_mva_endcaps = bookH1withSumw2(iBooker, "mva_endcaps", "ele identification mva endcaps", 100, -1., 1.);
3003  h1_ele_mva_isolated = bookH1withSumw2(iBooker, "mva_isolated", "ele identification mva isolated", 100, -1., 1.);
3005  bookH1withSumw2(iBooker, "mva_isolated_barrel", "ele identification mva isolated barrel", 100, -1., 1.);
3007  bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps", 100, -1., 1.);
3008  h1_ele_provenance = bookH1withSumw2(iBooker, "provenance", "ele provenance", 5, -2., 3.);
3009  h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel", "ele provenance barrel", 5, -2., 3.);
3010  h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps", "ele provenance endcaps", 5, -2., 3.);
3011 
3012  // pflow isolation variables
3014  iBooker, "chargedHadronIso", "chargedHadronIso", 100, 0.0, 20., "chargedHadronIso", "Events", "ELE_LOGY E1 P");
3016  "chargedHadronIso_barrel",
3017  "chargedHadronIso for barrel",
3018  100,
3019  0.0,
3020  20.,
3021  "chargedHadronIso_barrel",
3022  "Events",
3023  "ELE_LOGY E1 P");
3025  "chargedHadronIso_endcaps",
3026  "chargedHadronIso for endcaps",
3027  100,
3028  0.0,
3029  20.,
3030  "chargedHadronIso_endcaps",
3031  "Events",
3032  "ELE_LOGY E1 P");
3034  iBooker, "neutralHadronIso", "neutralHadronIso", 21, 0.0, 20., "neutralHadronIso", "Events", "ELE_LOGY E1 P");
3036  "neutralHadronIso_barrel",
3037  "neutralHadronIso for barrel",
3038  21,
3039  0.0,
3040  20.,
3041  "neutralHadronIso_barrel",
3042  "Events",
3043  "ELE_LOGY E1 P");
3045  "neutralHadronIso_endcaps",
3046  "neutralHadronIso for endcaps",
3047  21,
3048  0.0,
3049  20.,
3050  "neutralHadronIso_endcaps",
3051  "Events",
3052  "ELE_LOGY E1 P");
3054  bookH1withSumw2(iBooker, "photonIso", "photonIso", 100, 0.0, 20., "photonIso", "Events", "ELE_LOGY E1 P");
3056  iBooker, "photonIso_barrel", "photonIso for barrel", 100, 0.0, 20., "photonIso_barrel", "Events", "ELE_LOGY E1 P");
3058  "photonIso_endcaps",
3059  "photonIso for endcaps",
3060  100,
3061  0.0,
3062  20.,
3063  "photonIso_endcaps",
3064  "Events",
3065  "ELE_LOGY E1 P");
3066  // -- pflow over pT
3068  "chargedHadronRelativeIso",
3069  "chargedHadronRelativeIso",
3070  100,
3071  0.0,
3072  2.,
3073  "chargedHadronRelativeIso",
3074  "Events",
3075  "ELE_LOGY E1 P");
3077  "chargedHadronRelativeIso_barrel",
3078  "chargedHadronRelativeIso for barrel",
3079  100,
3080  0.0,
3081  2.,
3082  "chargedHadronRelativeIso_barrel",
3083  "Events",
3084  "ELE_LOGY E1 P");
3086  "chargedHadronRelativeIso_endcaps",
3087  "chargedHadronRelativeIso for endcaps",
3088  100,
3089  0.0,
3090  2.,
3091  "chargedHadronRelativeIso_endcaps",
3092  "Events",
3093  "ELE_LOGY E1 P");
3095  "neutralHadronRelativeIso",
3096  "neutralHadronRelativeIso",
3097  100,
3098  0.0,
3099  2.,
3100  "neutralHadronRelativeIso",
3101  "Events",
3102  "ELE_LOGY E1 P");
3104  "neutralHadronRelativeIso_barrel",
3105  "neutralHadronRelativeIso for barrel",
3106  100,
3107  0.0,
3108  2.,
3109  "neutralHadronRelativeIso_barrel",
3110  "Events",
3111  "ELE_LOGY E1 P");
3113  "neutralHadronRelativeIso_endcaps",
3114  "neutralHadronRelativeIso for endcaps",
3115  100,
3116  0.0,
3117  2.,
3118  "neutralHadronRelativeIso_endcaps",
3119  "Events",
3120  "ELE_LOGY E1 P");
3122  iBooker, "photonRelativeIso", "photonRelativeIso", 100, 0.0, 2., "photonRelativeIso", "Events", "ELE_LOGY E1 P");
3124  "photonRelativeIso_barrel",
3125  "photonRelativeIso for barrel",
3126  100,
3127  0.0,
3128  2.,
3129  "photonRelativeIso_barrel",
3130  "Events",
3131  "ELE_LOGY E1 P");
3133  "photonRelativeIso_endcaps",
3134  "photonRelativeIso for endcaps",
3135  100,
3136  0.0,
3137  2.,
3138  "photonRelativeIso_endcaps",
3139  "Events",
3140  "ELE_LOGY E1 P");
3142  "chargedHadronRelativeIso_mAOD",
3143  "chargedHadronRelativeIso",
3144  100,
3145  0.0,
3146  2.,
3147  "chargedHadronRelativeIso",
3148  "Events",
3149  "ELE_LOGY E1 P");
3151  "chargedHadronRelativeIso_mAOD_barrel",
3152  "chargedHadronRelativeIso for barrel",
3153  100,
3154  0.0,
3155  2.,
3156  "chargedHadronRelativeIso_barrel",
3157  "Events",
3158  "ELE_LOGY E1 P");
3160  "chargedHadronRelativeIso_mAOD_endcaps",
3161  "chargedHadronRelativeIso for endcaps",
3162  100,
3163  0.0,
3164  2.,
3165  "chargedHadronRelativeIso_endcaps",
3166  "Events",
3167  "ELE_LOGY E1 P");
3169  "neutralHadronRelativeIso_mAOD",
3170  "neutralHadronRelativeIso",
3171  100,
3172  0.0,
3173  2.,
3174  "neutralHadronRelativeIso",
3175  "Events",
3176  "ELE_LOGY E1 P");
3178  "neutralHadronRelativeIso_mAOD_barrel",
3179  "neutralHadronRelativeIso for barrel",
3180  100,
3181  0.0,
3182  2.,
3183  "neutralHadronRelativeIso_barrel",
3184  "Events",
3185  "ELE_LOGY E1 P");
3187  "neutralHadronRelativeIso_mAOD_endcaps",
3188  "neutralHadronRelativeIso for endcaps",
3189  100,
3190  0.0,
3191  2.,
3192  "neutralHadronRelativeIso_endcaps",
3193  "Events",
3194  "ELE_LOGY E1 P");
3196  "photonRelativeIso_mAOD",
3197  "photonRelativeIso",
3198  100,
3199  0.0,
3200  2.,
3201  "photonRelativeIso",
3202  "Events",
3203  "ELE_LOGY E1 P");
3205  "photonRelativeIso_mAOD_barrel",
3206  "photonRelativeIso for barrel",
3207  100,
3208  0.0,
3209  2.,
3210  "photonRelativeIso_barrel",
3211  "Events",
3212  "ELE_LOGY E1 P");
3214  "photonRelativeIso_mAOD_endcaps",
3215  "photonRelativeIso for endcaps",
3216  100,
3217  0.0,
3218  2.,
3219  "photonRelativeIso_endcaps",
3220  "Events",
3221  "ELE_LOGY E1 P");
3222 
3223  // conversion rejection information
3224  h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags", "conversion rejection flag", 5, -1.5, 3.5);
3226  bookH1withSumw2(iBooker, "convFlags_all", "conversion rejection flag, all electrons", 5, -1.5, 3.5);
3227  h1_ele_convDist = bookH1withSumw2(iBooker, "convDist", "distance to the conversion partner", 100, -15., 15.);
3229  bookH1withSumw2(iBooker, "convDist_all", "distance to the conversion partner, all electrons", 100, -15., 15.);
3231  iBooker, "convDcot", "difference of cot(angle) with the conversion partner", 100, -CLHEP::pi / 2., CLHEP::pi / 2.);
3233  "convDcot_all",
3234  "difference of cot(angle) with the conversion partner, all electrons",
3235  100,
3236  -CLHEP::pi / 2.,
3237  CLHEP::pi / 2.);
3238  h1_ele_convRadius = bookH1withSumw2(iBooker, "convRadius", "signed conversion radius", 100, 0., 130.);
3240  bookH1withSumw2(iBooker, "convRadius_all", "signed conversion radius, all electrons", 100, 0., 130.);
3241 }
3242 
3244 
3246  // get collections
3247  auto gsfElectrons = iEvent.getHandle(electronCollection_);
3248  auto gsfElectronsEndcaps = iEvent.getHandle(electronCollectionEndcaps_);
3249  auto gsfElectronCores = iEvent.getHandle(electronCoreCollection_);
3250  auto gsfElectronTracks = iEvent.getHandle(electronTrackCollection_);
3251  auto gsfElectronSeeds = iEvent.getHandle(electronSeedCollection_);
3252  auto genParticles = iEvent.getHandle(mcTruthCollection_);
3253  auto theBeamSpot = iEvent.getHandle(beamSpotTag_);
3254 
3255  auto isoFromDepsTk03Handle = iEvent.getHandle(isoFromDepsTk03Tag_);
3256  auto isoFromDepsTk04Handle = iEvent.getHandle(isoFromDepsTk04Tag_);
3257  auto isoFromDepsEcalFull03Handle = iEvent.getHandle(isoFromDepsEcalFull03Tag_);
3258  auto isoFromDepsEcalFull04Handle = iEvent.getHandle(isoFromDepsEcalFull04Tag_);
3259  auto isoFromDepsEcalReduced03Handle = iEvent.getHandle(isoFromDepsEcalReduced03Tag_);
3260  auto isoFromDepsEcalReduced04Handle = iEvent.getHandle(isoFromDepsEcalReduced04Tag_);
3261  auto isoFromDepsHcal03Handle = iEvent.getHandle(isoFromDepsHcal03Tag_);
3262  auto isoFromDepsHcal04Handle = iEvent.getHandle(isoFromDepsHcal04Tag_);
3263  auto vertexCollectionHandle = iEvent.getHandle(offlineVerticesCollection_);
3264  if (!vertexCollectionHandle.isValid()) {
3265  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle KO";
3266  } else {
3267  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle OK";
3268  }
3269 
3270  edm::LogInfo("ElectronMcSignalValidator::analyze")
3271  << "Treating event " << iEvent.id() << " with " << gsfElectrons.product()->size() << " electrons";
3272  edm::LogInfo("ElectronMcSignalValidator::analyze")
3273  << "Treating event " << iEvent.id() << " with " << gsfElectronsEndcaps.product()->size() << " electrons";
3274 
3275  h1_recEleNum->Fill((*gsfElectrons).size());
3276  h1_recCoreNum->Fill((*gsfElectronCores).size());
3277  h1_recTrackNum->Fill((*gsfElectronTracks).size());
3278  h1_recSeedNum->Fill((*gsfElectronSeeds).size());
3279  h1_recOfflineVertices->Fill((*vertexCollectionHandle).size());
3280 
3281  reco::GsfElectronCollection::const_iterator gsfIter;
3282  std::vector<reco::GsfElectron>::const_iterator gsfIter3;
3283  std::vector<reco::GsfElectron>::const_iterator gsfIter4;
3284 
3285  //===============================================
3286  // get a vector with EB & EE
3287  //===============================================
3288  std::vector<reco::GsfElectron> localCollection;
3289  int iBarrels = 0;
3290  int iEndcaps = 0;
3291 
3292  // looking for EB
3293  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
3294  if (gsfIter->isEB()) {
3295  localCollection.push_back(*gsfIter);
3296  iBarrels += 1;
3297  }
3298  }
3299 
3300  // looking for EE
3301  for (gsfIter = gsfElectronsEndcaps->begin(); gsfIter != gsfElectronsEndcaps->end(); gsfIter++) {
3302  if (gsfIter->isEE()) {
3303  localCollection.push_back(*gsfIter);
3304  iEndcaps += 1;
3305  }
3306  }
3307 
3308  //===============================================
3309  // all rec electrons
3310  //===============================================
3311 
3312  // mee only
3313  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3314  float enrj1 = gsfIter3->ecalEnergy();
3315 
3316  for (gsfIter4 = gsfIter3 + 1; gsfIter4 != localCollection.end(); gsfIter4++) {
3317  math::XYZTLorentzVector p12 = (*gsfIter3).p4() + (*gsfIter4).p4();
3318  float mee2 = p12.Dot(p12);
3319  float enrj2 = gsfIter4->ecalEnergy();
3320  h1_ele_mee_all->Fill(sqrt(mee2));
3321  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2), enrj2 - enrj1);
3322  if (gsfIter3->ecalDrivenSeed() && gsfIter4->ecalDrivenSeed()) {
3323  h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2), enrj2 - enrj1);
3324  }
3325  if (gsfIter3->charge() * gsfIter4->charge() < 0.) {
3326  h1_ele_mee_os->Fill(sqrt(mee2));
3327  if (gsfIter3->isEB() && gsfIter4->isEB()) {
3328  h1_ele_mee_os_ebeb->Fill(sqrt(mee2));
3329  }
3330  if ((gsfIter3->isEB() && gsfIter4->isEE()) || (gsfIter3->isEE() && gsfIter4->isEB()))
3331  h1_ele_mee_os_ebee->Fill(sqrt(mee2));
3332  if (gsfIter3->isEE() && gsfIter4->isEE()) {
3333  h1_ele_mee_os_eeee->Fill(sqrt(mee2));
3334  }
3335  if ((gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3336  (gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::BIGBREM) ||
3337  (gsfIter3->classification() == GsfElectron::BIGBREM && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3338  (gsfIter3->classification() == GsfElectron::BIGBREM &&
3339  gsfIter4->classification() == GsfElectron::BIGBREM)) {
3340  h1_ele_mee_os_gg->Fill(sqrt(mee2));
3341  } else if ((gsfIter3->classification() == GsfElectron::SHOWERING &&
3342  gsfIter4->classification() == GsfElectron::SHOWERING) ||
3343  (gsfIter3->classification() == GsfElectron::SHOWERING && gsfIter4->isGap()) ||
3344  (gsfIter3->isGap() && gsfIter4->classification() == GsfElectron::SHOWERING) ||
3345  (gsfIter3->isGap() && gsfIter4->isGap())) {
3346  h1_ele_mee_os_bb->Fill(sqrt(mee2));
3347  } else {
3348  h1_ele_mee_os_gb->Fill(sqrt(mee2));
3349  }
3350  }
3351  }
3352  }
3353 
3354  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3355  // preselect electrons
3356  if (gsfIter3->pt() > maxPt_ || std::abs(gsfIter3->eta()) > maxAbsEta_)
3357  continue;
3358 
3359  h1_ele_EoverP_all->Fill(gsfIter3->eSuperClusterOverP());
3360  h1_ele_EseedOP_all->Fill(gsfIter3->eSeedClusterOverP());
3361  h1_ele_EoPout_all->Fill(gsfIter3->eSeedClusterOverPout());
3362  h1_ele_EeleOPout_all->Fill(gsfIter3->eEleClusterOverPout());
3363  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter3->deltaEtaSuperClusterTrackAtVtx());
3364  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter3->deltaPhiSuperClusterTrackAtVtx());
3365  h1_ele_dEtaCl_propOut_all->Fill(gsfIter3->deltaEtaSeedClusterTrackAtCalo());
3366  h1_ele_dPhiCl_propOut_all->Fill(gsfIter3->deltaPhiSeedClusterTrackAtCalo());
3367  h1_ele_HoE_all->Fill(gsfIter3->hcalOverEcal());
3368  h1_ele_HoE_bc_all->Fill(gsfIter3->hcalOverEcalBc());
3369  h1_ele_TIP_all->Fill(EleRelPoint(gsfIter3->vertex(), theBeamSpot->position()).perp());
3370  h1_ele_vertexEta_all->Fill(gsfIter3->eta());
3371  h1_ele_vertexPt_all->Fill(gsfIter3->pt());
3372  h1_ele_Et_all->Fill(gsfIter3->ecalEnergy() / cosh(gsfIter3->superCluster()->eta()));
3373 
3374  // conversion rejection
3375  int flags = gsfIter3->convFlags();
3376  if (flags == -9999) {
3377  flags = -1;
3378  }
3380  if (flags >= 0.) {
3381  h1_ele_convDist_all->Fill(gsfIter3->convDist());
3382  h1_ele_convDcot_all->Fill(gsfIter3->convDcot());
3383  h1_ele_convRadius_all->Fill(gsfIter3->convRadius());
3384  }
3385  }
3386 
3387  //===============================================
3388  // charge mis-ID
3389  //===============================================
3390 
3391  int mcNum = 0, gamNum = 0, eleNum = 0;
3392  bool matchingID, matchingMotherID;
3393 
3394  reco::GenParticleCollection::const_iterator mcIter;
3395  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3396  // select requested matching gen particle
3397  matchingID = false;
3398  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3399  if (mcIter->pdgId() == matchingIDs_[i]) {
3400  matchingID = true;
3401  }
3402  }
3403  if (matchingID) {
3404  // select requested mother matching gen particle
3405  // always include single particle with no mother
3406  const Candidate *mother = mcIter->mother();
3407  matchingMotherID = false;
3408  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3409  if (mother == nullptr) {
3410  matchingMotherID = true;
3411  } else if (mother->pdgId() == matchingMotherIDs_[i]) {
3412  if (mother->numberOfDaughters() <= 2) {
3413  matchingMotherID = true;
3414  }
3415  } // end of mother if test
3416  }
3417  if (matchingMotherID) {
3418  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEta_) {
3419  continue;
3420  }
3421 
3422  // looking for the best matching gsf electron
3423  bool okGsfFound = false;
3424  double gsfOkRatio = 999999.;
3425 
3426  // find best matched electron
3427  reco::GsfElectron bestGsfElectron;
3428  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3429  double dphi = gsfIter3->phi() - mcIter->phi();
3430  if (std::abs(dphi) > CLHEP::pi) {
3431  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3432  }
3433  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3434  if (deltaR2 < deltaR2_) {
3435  double mc_charge = mcIter->pdgId() == 11 ? -1. : 1.;
3436  h1_ele_ChargeMnChargeTrue->Fill(std::abs(gsfIter3->charge() - mc_charge));
3437  // require here a charge mismatch
3438  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() > 0.)) ||
3439  ((mcIter->pdgId() == -11) && (gsfIter3->charge() < 0.))) {
3440  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3441  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3442  gsfOkRatio = tmpGsfRatio;
3443  bestGsfElectron = *gsfIter3;
3444  okGsfFound = true;
3445  }
3446  }
3447  }
3448  } // loop over rec ele to look for the best one
3449 
3450  // analysis when the mc track is found
3451  if (okGsfFound) { // && (std::abs(mcIter->eta())<maxAbsEta_)
3452  // generated distributions for matched electrons
3453  h1_mc_Pt_matched_qmisid->Fill(mcIter->pt());
3454  h1_mc_Phi_matched_qmisid->Fill(mcIter->phi());
3455  h1_mc_AbsEta_matched_qmisid->Fill(std::abs(mcIter->eta()));
3456  h1_mc_Eta_matched_qmisid->Fill(mcIter->eta());
3457  h1_mc_Z_matched_qmisid->Fill(mcIter->vz());
3458  }
3459  }
3460  }
3461  }
3462 
3463  //===============================================
3464  // association mc-reco
3465  //===============================================
3466 
3467  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3468  // number of mc particles
3469  mcNum++;
3470 
3471  // counts photons
3472  if (mcIter->pdgId() == 22) {
3473  gamNum++;
3474  }
3475 
3476  // select requested matching gen particle
3477  matchingID = false;
3478  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3479  if (mcIter->pdgId() == matchingIDs_[i]) {
3480  matchingID = true;
3481  }
3482  }
3483  if (!matchingID)
3484  continue;
3485 
3486  // select requested mother matching gen particle
3487  // always include single particle with no mother
3488  const Candidate *mother = mcIter->mother();
3489  matchingMotherID = false;
3490  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3491  if ((mother == nullptr) || ((mother != nullptr) && mother->pdgId() == matchingMotherIDs_[i])) {
3492  matchingMotherID = true;
3493  }
3494  }
3495  if (!matchingMotherID)
3496  continue;
3497 
3498  // electron preselection
3499  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEtaExtended_) {
3500  continue;
3501  }
3502 
3503  eleNum++;
3504  if (std::abs(mcIter->eta()) < maxAbsEta_) {
3505  h1_mc_Eta->Fill(mcIter->eta());
3506  h1_mc_AbsEta->Fill(std::abs(mcIter->eta()));
3507  h1_mc_P->Fill(mcIter->p());
3508  h1_mc_Pt->Fill(mcIter->pt());
3509  h1_mc_Phi->Fill(mcIter->phi());
3510  h1_mc_Z->Fill(mcIter->vz());
3511  h2_mc_PtEta->Fill(mcIter->eta(), mcIter->pt());
3512  }
3513 
3514  // find best matched electron
3515  bool okGsfFound = false;
3516  bool passMiniAODSelection = true;
3517  double gsfOkRatio = 999999.;
3518  bool isEBflag = false;
3519  bool isEEflag = false;
3520  bool isEEextendedflag = false;
3521 
3522  reco::GsfElectron bestGsfElectron;
3523  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3524  // temporary cut for pt < 5.
3525  double dphi = gsfIter3->phi() - mcIter->phi();
3526  if (std::abs(dphi) > CLHEP::pi) {
3527  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3528  }
3529  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3530  if (deltaR2 < deltaR2_) {
3531  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() < 0.)) ||
3532  ((mcIter->pdgId() == -11) && (gsfIter3->charge() > 0.))) {
3533  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3534  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3535  gsfOkRatio = tmpGsfRatio;
3536  bestGsfElectron = *gsfIter3;
3537  okGsfFound = true;
3538  }
3539  }
3540  }
3541  } // loop over rec ele to look for the best one
3542 
3543  if (!okGsfFound)
3544  continue;
3545 
3546  //------------------------------------
3547  // analysis when the mc track is found
3548  //------------------------------------
3549  passMiniAODSelection = bestGsfElectron.pt() >= 5.;
3550  isEBflag = bestGsfElectron.isEB();
3551  isEEflag = bestGsfElectron.isEE() && (std::abs(mcIter->eta()) < maxAbsEta_);
3552  isEEextendedflag = bestGsfElectron.isEE();
3553  if (isEEextendedflag) {
3554  h1_mc_Eta_Extended_matched->Fill(mcIter->eta());
3555  h2_ele_EoPVsEtaExtended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3556  }
3557 
3558  if (!isEBflag && !isEEflag)
3559  continue;
3560 
3561  // electron related distributions
3562  h1_ele_charge->Fill(bestGsfElectron.charge());
3563  h2_ele_chargeVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.charge());
3564  h2_ele_chargeVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.charge());
3565  h2_ele_chargeVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.charge());
3566  h1_ele_vertexP->Fill(bestGsfElectron.p());
3567  h1_ele_vertexPt->Fill(bestGsfElectron.pt());
3568  if (bestGsfElectron.scSigmaIEtaIEta() == 0.)
3569  h1_ele_vertexPt_nocut->Fill(bestGsfElectron.pt());
3570  h1_ele_Et->Fill(bestGsfElectron.ecalEnergy() / cosh(bestGsfElectron.superCluster()->eta()));
3571  h2_ele_vertexPtVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.pt());
3572  h2_ele_vertexPtVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.pt());
3573  h1_ele_vertexEta->Fill(bestGsfElectron.eta());
3574 
3575  h2_scl_EoEtrueVsrecOfflineVertices->Fill((*vertexCollectionHandle).size(),
3576  bestGsfElectron.ecalEnergy() / mcIter->p());
3577  if (isEBflag)
3578  h2_scl_EoEtrueVsrecOfflineVertices_barrel->Fill((*vertexCollectionHandle).size(),
3579  bestGsfElectron.ecalEnergy() / mcIter->p());
3580  else if (isEEflag)
3581  h2_scl_EoEtrueVsrecOfflineVertices_endcaps->Fill((*vertexCollectionHandle).size(),
3582  bestGsfElectron.ecalEnergy() / mcIter->p());
3583 
3584  // generated distributions for matched electrons
3585  h1_mc_Pt_matched->Fill(mcIter->pt());
3586  h1_mc_Phi_matched->Fill(mcIter->phi());
3587  h1_mc_AbsEta_matched->Fill(std::abs(mcIter->eta()));
3588  h1_mc_Eta_matched->Fill(mcIter->eta());
3589  h1_mc_Eta_Extended_matched->Fill(mcIter->eta());
3590  h2_mc_PtEta_matched->Fill(mcIter->eta(), mcIter->pt());
3591  h2_ele_vertexEtaVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta());
3592  h1_ele_vertexPhi->Fill(bestGsfElectron.phi());
3593  h1_ele_vertexX->Fill(bestGsfElectron.vertex().x());
3594  h1_ele_vertexY->Fill(bestGsfElectron.vertex().y());
3595  h1_ele_vertexZ->Fill(bestGsfElectron.vertex().z());
3596  h1_mc_Z_matched->Fill(mcIter->vz());
3597  double d = (bestGsfElectron.vertex().x() - mcIter->vx()) * (bestGsfElectron.vertex().x() - mcIter->vx()) +
3598  (bestGsfElectron.vertex().y() - mcIter->vy()) * (bestGsfElectron.vertex().y() - mcIter->vy());
3599  d = sqrt(d);
3601  h2_ele_vertexTIPVsEta->Fill(bestGsfElectron.eta(), d);
3602  h2_ele_vertexTIPVsPhi->Fill(bestGsfElectron.phi(), d);
3603  h2_ele_vertexTIPVsPt->Fill(bestGsfElectron.pt(), d);
3604  h1_ele_EtaMnEtaTrue->Fill(bestGsfElectron.eta() - mcIter->eta());
3605  h2_ele_EtaMnEtaTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eta() - mcIter->eta());
3606  h2_ele_EtaMnEtaTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta() - mcIter->eta());
3607  h2_ele_EtaMnEtaTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.eta() - mcIter->eta());
3608  h1_ele_PhiMnPhiTrue->Fill(bestGsfElectron.phi() - mcIter->phi());
3609  h1_ele_PhiMnPhiTrue2->Fill(bestGsfElectron.phi() - mcIter->phi());
3610  h2_ele_PhiMnPhiTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.phi() - mcIter->phi());
3611  h2_ele_PhiMnPhiTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.phi() - mcIter->phi());
3612  h2_ele_PhiMnPhiTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.phi() - mcIter->phi());
3613  h1_ele_PoPtrue->Fill(bestGsfElectron.p() / mcIter->p());
3614  h1_ele_PtoPttrue->Fill(bestGsfElectron.pt() / mcIter->pt());
3615  h2_ele_PoPtrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.p() / mcIter->p());
3616  h2_ele_PoPtrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.p() / mcIter->p());
3617  h2_ele_PoPtrueVsPt->Fill(bestGsfElectron.py(), bestGsfElectron.p() / mcIter->p());
3618  h2_ele_sigmaIetaIetaVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.scSigmaIEtaIEta());
3620  h1_ele_combinedP4Error->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3621  if (isEBflag) {
3622  h1_ele_EtaMnEtaTrue_barrel->Fill(bestGsfElectron.eta() - mcIter->eta());
3623  h1_ele_PhiMnPhiTrue_barrel->Fill(bestGsfElectron.phi() - mcIter->phi());
3624  h1_ele_PoPtrue_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3625  h1_ele_PtoPttrue_barrel->Fill(bestGsfElectron.pt() / mcIter->pt());
3627  h1_ele_combinedP4Error_barrel->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3628  } else if (isEEflag) {
3629  h1_ele_EtaMnEtaTrue_endcaps->Fill(bestGsfElectron.eta() - mcIter->eta());
3630  h1_ele_PhiMnPhiTrue_endcaps->Fill(bestGsfElectron.phi() - mcIter->phi());
3631  h1_ele_PoPtrue_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3632  h1_ele_PtoPttrue_endcaps->Fill(bestGsfElectron.pt() / mcIter->pt());
3634  h1_ele_combinedP4Error_endcaps->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3635  }
3636 
3637  if (isEBflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3638  h1_ele_PoPtrue_golden_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3639  if (isEEflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3640  h1_ele_PoPtrue_golden_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3641  if (isEBflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3642  h1_ele_PoPtrue_showering_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3643  if (isEEflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3644  h1_ele_PoPtrue_showering_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3645 
3646  // supercluster related distributions
3647  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
3648 
3649  h1_scl_En->Fill(bestGsfElectron.ecalEnergy());
3650  if (isEBflag) {
3651  h1_scl_EoEtrue_barrel->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3652  h1_scl_EoEtrue_barrel_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3653  } else if (isEEflag) {
3654  h1_scl_EoEtrue_endcaps->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3655  h1_scl_EoEtrue_endcaps_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3656  }
3657  if (isEBflag && bestGsfElectron.isEBEtaGap())
3658  h1_scl_EoEtrue_barrel_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3659  if (isEBflag && bestGsfElectron.isEBPhiGap())
3660  h1_scl_EoEtrue_barrel_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3661  if (bestGsfElectron.isEBEEGap())
3662  h1_scl_EoEtrue_ebeegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3663  if (isEEflag && bestGsfElectron.isEEDeeGap())
3664  h1_scl_EoEtrue_endcaps_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3665  if (isEEflag && bestGsfElectron.isEERingGap())
3666  h1_scl_EoEtrue_endcaps_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3667  if (isEBflag && bestGsfElectron.isEBEtaGap())
3668  h1_scl_EoEtrue_barrel_new_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3669  if (isEBflag && bestGsfElectron.isEBPhiGap())
3670  h1_scl_EoEtrue_barrel_new_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3671  if (bestGsfElectron.isEBEEGap())
3672  h1_scl_EoEtrue_ebeegap_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3673  if (isEEflag && bestGsfElectron.isEEDeeGap())
3674  h1_scl_EoEtrue_endcaps_new_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3675  if (isEEflag && bestGsfElectron.isEERingGap())
3676  h1_scl_EoEtrue_endcaps_new_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3677 
3678  double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
3679  double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
3680  h1_scl_Et->Fill(sclRef->energy() * (Rt / R));
3681  h2_scl_EtVsEta->Fill(sclRef->eta(), sclRef->energy() * (Rt / R));
3682  h2_scl_EtVsPhi->Fill(sclRef->phi(), sclRef->energy() * (Rt / R));
3683  h1_scl_Eta->Fill(sclRef->eta());
3684  h2_scl_EtaVsPhi->Fill(sclRef->phi(), sclRef->eta());
3685  h1_scl_Phi->Fill(sclRef->phi());
3686  h1_scl_SigEtaEta->Fill(bestGsfElectron.scSigmaEtaEta());
3687  h1_scl_SigIEtaIEta->Fill(bestGsfElectron.scSigmaIEtaIEta());
3689  h1_scl_E1x5->Fill(bestGsfElectron.scE1x5());
3690  h1_scl_E2x5max->Fill(bestGsfElectron.scE2x5Max());
3691  h1_scl_E5x5->Fill(bestGsfElectron.scE5x5());
3692  if (isEBflag) {
3693  h1_scl_SigEtaEta_barrel->Fill(bestGsfElectron.scSigmaEtaEta());
3694  h1_scl_SigIEtaIEta_barrel->Fill(bestGsfElectron.scSigmaIEtaIEta());
3696  h1_scl_E1x5_barrel->Fill(bestGsfElectron.scE1x5());
3697  h1_scl_E2x5max_barrel->Fill(bestGsfElectron.scE2x5Max());
3698  h1_scl_E5x5_barrel->Fill(bestGsfElectron.scE5x5());
3699  } else if (isEEflag) {
3700  h1_scl_SigEtaEta_endcaps->Fill(bestGsfElectron.scSigmaEtaEta());
3701  h1_scl_SigIEtaIEta_endcaps->Fill(bestGsfElectron.scSigmaIEtaIEta());
3703  h1_scl_E1x5_endcaps->Fill(bestGsfElectron.scE1x5());
3704  h1_scl_E2x5max_endcaps->Fill(bestGsfElectron.scE2x5Max());
3705  h1_scl_E5x5_endcaps->Fill(bestGsfElectron.scE5x5());
3706  }
3707 
3708  if (passMiniAODSelection) { // Pt > 5.
3709  h1_scl_SigIEtaIEta_mAOD->Fill(bestGsfElectron.scSigmaIEtaIEta());
3710  if (isEBflag)
3712  else if (isEEflag)
3714  }
3715 
3716  float pfEnergy = 0.;
3717  if (!bestGsfElectron.parentSuperCluster().isNull())
3718  pfEnergy = bestGsfElectron.parentSuperCluster()->energy();
3719  h2_scl_EoEtruePfVsEg->Fill(bestGsfElectron.ecalEnergy() / mcIter->p(), pfEnergy / mcIter->p());
3720  if (isEEflag)
3721  h1_scl_ESFrac_endcaps->Fill(sclRef->preshowerEnergy() / sclRef->rawEnergy());
3722 
3723  float Etot = 0.;
3724  CaloCluster_iterator it = bestGsfElectron.superCluster()->clustersBegin();
3725  CaloCluster_iterator itend = bestGsfElectron.superCluster()->clustersEnd();
3726  for (; it != itend; ++it) {
3727  Etot += (*it)->energy();
3728  }
3729  h1_scl_bcl_EtotoEtrue->Fill(Etot / mcIter->p());
3730  if (isEBflag)
3731  h1_scl_bcl_EtotoEtrue_barrel->Fill(Etot / mcIter->p());
3732  else if (isEEflag)
3733  h1_scl_bcl_EtotoEtrue_endcaps->Fill(Etot / mcIter->p());
3734 
3735  // track related distributions
3737  h2_ele_ambiguousTracksVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize());
3738  h2_ele_ambiguousTracksVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize());
3739  h2_ele_ambiguousTracksVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize());
3740  if (!readAOD_) // track extra does not exist in AOD
3741  {
3742  h1_ele_foundHits->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3743  h2_ele_foundHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3744  h2_ele_foundHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3745  h2_ele_foundHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3746  h1_ele_lostHits->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3747  h2_ele_lostHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3748  h2_ele_lostHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3749  h2_ele_lostHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3750  h1_ele_chi2->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3751  h2_ele_chi2VsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2());
3752  h2_ele_chi2VsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2());
3753  h2_ele_chi2VsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2());
3754  if (isEBflag) {
3755  h1_ele_foundHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3756  h1_ele_lostHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3757  h1_ele_chi2_barrel->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3758  } else if (isEEflag) {
3759  h1_ele_foundHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3760  h1_ele_lostHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3761  h1_ele_chi2_endcaps->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3762  }
3763 
3764  if (passMiniAODSelection) { // Pt > 5.
3765  h2_ele_foundHitsVsEta_mAOD->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3766  }
3767  }
3768  // from gsf track interface, hence using mean
3769  if (!readAOD_) // track extra does not exist in AOD
3770  {
3771  h1_ele_PinMnPout->Fill(bestGsfElectron.gsfTrack()->innerMomentum().R() -
3772  bestGsfElectron.gsfTrack()->outerMomentum().R());
3773  h1_ele_outerP->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R());
3774  h1_ele_outerPt->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho());
3775  }
3776  // from electron interface, hence using mode
3777  h1_ele_PinMnPout_mode->Fill(bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3778  h2_ele_PinMnPoutVsEta_mode->Fill(bestGsfElectron.eta(),
3779  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3780  h2_ele_PinMnPoutVsPhi_mode->Fill(bestGsfElectron.phi(),
3781  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3782  h2_ele_PinMnPoutVsPt_mode->Fill(bestGsfElectron.pt(),
3783  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3784  h2_ele_PinMnPoutVsE_mode->Fill(bestGsfElectron.caloEnergy(),
3785  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3786  if (!readAOD_) // track extra does not exist in AOD
3787  {
3789  bestGsfElectron.gsfTrack()->normalizedChi2(),
3790  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3791  }
3792  h1_ele_outerP_mode->Fill(bestGsfElectron.trackMomentumOut().R());
3793  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R());
3794  h1_ele_outerPt_mode->Fill(bestGsfElectron.trackMomentumOut().Rho());
3795  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho());
3796  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho());
3797  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho());
3798 
3799  if (!readAOD_) // track extra does not exist in AOD
3800  {
3801  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
3802  ElectronSeedRef elseed = seed.castTo<ElectronSeedRef>();
3803  h1_ele_seed_subdet2->Fill(elseed->subDet(1));
3804  h1_ele_seed_mask->Fill(elseed->hitsMask());
3805  if (elseed->subDet(1) == 1) {
3806  h1_ele_seed_mask_bpix->Fill(elseed->hitsMask());
3807  } else if (elseed->subDet(1) == 2) {
3808  h1_ele_seed_mask_fpix->Fill(elseed->hitsMask());
3809  } else if (elseed->subDet(1) == 6) {
3810  h1_ele_seed_mask_tec->Fill(elseed->hitsMask());
3811  }
3812 
3813  if (elseed->dPhiNeg(1) != std::numeric_limits<float>::infinity()) {
3814  h1_ele_seed_dphi2->Fill(elseed->dPhiNeg(1));
3815  h2_ele_seed_dphi2VsEta->Fill(bestGsfElectron.eta(), elseed->dPhiNeg(1));
3816  h2_ele_seed_dphi2VsPt->Fill(bestGsfElectron.pt(), elseed->dPhiNeg(1));
3817  } else {
3818  }
3819  if (elseed->dPhiPos(1) != std::numeric_limits<float>::infinity()) {
3820  h1_ele_seed_dphi2pos->Fill(elseed->dPhiPos(1));
3821  h2_ele_seed_dphi2posVsEta->Fill(bestGsfElectron.eta(), elseed->dPhiPos(1));
3822  h2_ele_seed_dphi2posVsPt->Fill(bestGsfElectron.pt(), elseed->dPhiPos(1));
3823  }
3824  if (elseed->dRZNeg(1) != std::numeric_limits<float>::infinity()) {
3825  h1_ele_seed_drz2->Fill(elseed->dRZNeg(1));
3826  h2_ele_seed_drz2VsEta->Fill(bestGsfElectron.eta(), elseed->dRZNeg(1));
3827  h2_ele_seed_drz2VsPt->Fill(bestGsfElectron.pt(), elseed->dRZNeg(1));
3828  }
3829  if (elseed->dRZPos(1) != std::numeric_limits<float>::infinity()) {
3830  h1_ele_seed_drz2pos->Fill(elseed->dRZPos(1));
3831  h2_ele_seed_drz2posVsEta->Fill(bestGsfElectron.eta(), elseed->dRZPos(1));
3832  h2_ele_seed_drz2posVsPt->Fill(bestGsfElectron.pt(), elseed->dRZPos(1));
3833  }
3834  }
3835 
3836  // match distributions
3837  h1_ele_EoP->Fill(bestGsfElectron.eSuperClusterOverP());
3838  h2_ele_EoPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3839  h2_ele_EoPVsEtaExtended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3840  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP());
3841  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP());
3842  h1_ele_EseedOP->Fill(bestGsfElectron.eSeedClusterOverP());
3843  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP());
3844  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP());
3845  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP());
3846  h1_ele_EoPout->Fill(bestGsfElectron.eSeedClusterOverPout());
3847  h2_ele_EoPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout());
3848  h2_ele_EoPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout());
3849  h2_ele_EoPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout());
3850  h1_ele_EeleOPout->Fill(bestGsfElectron.eEleClusterOverPout());
3851  h2_ele_EeleOPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout());
3852  h2_ele_EeleOPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout());
3853  h2_ele_EeleOPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout());
3855  h2_ele_dEtaScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3856  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3857  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3859  h2_ele_dPhiScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3860  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3861  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3863  h2_ele_dEtaClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3864  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3865  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3867  h2_ele_dPhiClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3868  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3869  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3871  h2_ele_dEtaEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3872  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3873  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3875  h2_ele_dPhiEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3876  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3877  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3878  h1_ele_HoE->Fill(bestGsfElectron.hcalOverEcal());
3879  h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc());
3880  if (isEBflag) {
3881  h1_ele_EoP_barrel->Fill(bestGsfElectron.eSuperClusterOverP());
3882  h1_ele_EseedOP_barrel->Fill(bestGsfElectron.eSeedClusterOverP());
3883  h1_ele_EoPout_barrel->Fill(bestGsfElectron.eSeedClusterOverPout());
3884  h1_ele_EeleOPout_barrel->Fill(bestGsfElectron.eEleClusterOverPout());
3891  h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc());
3892  h1_ele_HoE_barrel->Fill(bestGsfElectron.hcalOverEcal());
3893  } else if (isEEflag) {
3894  h1_ele_EoP_endcaps->Fill(bestGsfElectron.eSuperClusterOverP());
3895  h1_ele_EseedOP_endcaps->Fill(bestGsfElectron.eSeedClusterOverP());
3896  h1_ele_EoPout_endcaps->Fill(bestGsfElectron.eSeedClusterOverPout());
3904  h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc());
3905  h1_ele_HoE_endcaps->Fill(bestGsfElectron.hcalOverEcal());
3906  }
3907 
3908  if (passMiniAODSelection) { // Pt > 5.
3911  h1_ele_HoE_mAOD->Fill(bestGsfElectron.hcalOverEcal());
3912  if (isEBflag) {
3915  h1_ele_HoE_mAOD_barrel->Fill(bestGsfElectron.hcalOverEcal());
3916  } else if (isEEflag) {
3919  h1_ele_HoE_mAOD_endcaps->Fill(bestGsfElectron.hcalOverEcal());
3920  }
3921  }
3922 
3923  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap() && !bestGsfElectron.isEBEEGap() &&
3924  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap())
3925  h1_ele_HoE_fiducial->Fill(bestGsfElectron.hcalOverEcal());
3926  h2_ele_HoEVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.hcalOverEcal());
3927  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.hcalOverEcal());
3928  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.hcalOverEcal());
3929 
3930  //classes
3931  int eleClass = bestGsfElectron.classification();
3932  if (isEEflag)
3933  eleClass += 10;
3934  h1_ele_classes->Fill(eleClass);
3935 
3936  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEBflag)
3937  h1_scl_EoEtrueGolden_barrel->Fill(sclRef->energy() / mcIter->p());
3938  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEEflag)
3939  h1_scl_EoEtrueGolden_endcaps->Fill(sclRef->energy() / mcIter->p());
3940  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEBflag)
3941  h1_scl_EoEtrueShowering_barrel->Fill(sclRef->energy() / mcIter->p());
3942  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEEflag)
3943  h1_scl_EoEtrueShowering_endcaps->Fill(sclRef->energy() / mcIter->p());
3944 
3945  //eleClass = eleClass%100; // get rid of barrel/endcap distinction
3946  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
3947  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3948  h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
3949  if (bestGsfElectron.classification() == GsfElectron::BIGBREM)
3950  h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
3951  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3952  h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
3953 
3954  // fbrem
3955 
3956  double fbrem_mode = bestGsfElectron.fbrem();
3957  h1_ele_fbrem->Fill(fbrem_mode);
3958  if (passMiniAODSelection) { // Pt > 5.
3959  h1_ele_fbrem_mAOD->Fill(fbrem_mode);
3960  }
3961  if (isEBflag) {
3962  double fbrem_mode_barrel = bestGsfElectron.fbrem();
3963  h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel);
3964  if (passMiniAODSelection) { // Pt > 5.
3965  h1_ele_fbrem_mAOD_barrel->Fill(fbrem_mode_barrel);
3966  }
3967  } else if (isEEflag) {
3968  double fbrem_mode_endcaps = bestGsfElectron.fbrem();
3969  h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps);
3970  if (passMiniAODSelection) { // Pt > 5.
3971  h1_ele_fbrem_mAOD_endcaps->Fill(fbrem_mode_endcaps);
3972  }
3973  }
3974 
3975  double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem();
3976  h1_ele_superclusterfbrem->Fill(superclusterfbrem_mode);
3977 
3978  if (isEBflag) {
3979  double superclusterfbrem_mode_barrel = bestGsfElectron.superClusterFbrem();
3980  h1_ele_superclusterfbrem_barrel->Fill(superclusterfbrem_mode_barrel);
3981  } else if (isEEflag) {
3982  double superclusterfbrem_mode_endcaps = bestGsfElectron.superClusterFbrem();
3983  h1_ele_superclusterfbrem_endcaps->Fill(superclusterfbrem_mode_endcaps);
3984  }
3985 
3986  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(), fbrem_mode);
3987 
3988  if (!readAOD_) // track extra does not exist in AOD
3989  {
3990  double fbrem_mean =
3991  1. - bestGsfElectron.gsfTrack()->outerMomentum().R() / bestGsfElectron.gsfTrack()->innerMomentum().R();
3992  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(), fbrem_mean);
3993  }
3994 
3995  //
3996 
3997  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3998  h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
3999  bestGsfElectron.trackMomentumAtVtx().R());
4000  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4001  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
4002  bestGsfElectron.trackMomentumAtVtx().R());
4003  if (!readAOD_) // track extra not available in AOD
4004  {
4005  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4006  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
4007  bestGsfElectron.gsfTrack()->innerMomentum().R());
4008  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4009  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
4010  bestGsfElectron.gsfTrack()->innerMomentum().R());
4011  }
4012  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4013  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
4014  bestGsfElectron.trackMomentumAtVtx().Rho());
4015  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4016  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
4017  bestGsfElectron.trackMomentumAtVtx().Rho());
4018  if (!readAOD_) // track extra not available in AOD
4019  {
4020  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4021  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
4022  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
4023  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4024  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
4025  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
4026  }
4027 
4028  // provenance and pflow data
4029  h1_ele_mva->Fill(bestGsfElectron.mva_e_pi());
4030  h1_ele_mva_isolated->Fill(bestGsfElectron.mva_Isolated());
4031  if (isEBflag) {
4032  h1_ele_mva_barrel->Fill(bestGsfElectron.mva_e_pi());
4033  h1_ele_mva_barrel_isolated->Fill(bestGsfElectron.mva_Isolated());
4034  } else if (isEEflag) {
4035  h1_ele_mva_endcaps->Fill(bestGsfElectron.mva_e_pi());
4036  h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated());
4037  }
4038  if (bestGsfElectron.ecalDrivenSeed())
4039  h1_ele_provenance->Fill(1.);
4040  if (bestGsfElectron.trackerDrivenSeed())
4041  h1_ele_provenance->Fill(-1.);
4042  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed())
4043  h1_ele_provenance->Fill(0.);
4044  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed())
4045  h1_ele_provenance->Fill(-2.);
4046  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed())
4047  h1_ele_provenance->Fill(2.);
4048 
4049  if (bestGsfElectron.ecalDrivenSeed() && isEBflag)
4051  if (bestGsfElectron.trackerDrivenSeed() && isEBflag)
4053  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEBflag)
4055  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEBflag)
4057  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEBflag)
4059  if (bestGsfElectron.ecalDrivenSeed() && isEEflag)
4061  if (bestGsfElectron.trackerDrivenSeed() && isEEflag)
4063  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEEflag)
4065  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEEflag)
4067  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEEflag)
4069 
4070  if (bestGsfElectron.isGsfCtfScPixChargeConsistent())
4071  h1_ele_chargeInfo->Fill(-1.0);
4072  if (bestGsfElectron.isGsfScPixChargeConsistent())
4073  h1_ele_chargeInfo->Fill(0.);
4074  if (bestGsfElectron.isGsfCtfChargeConsistent())
4075  h1_ele_chargeInfo->Fill(1.0);
4076 
4077  // Pflow isolation
4081  h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4082  if (isEBflag) {
4086  }
4087 
4088  else if (isEEflag) {
4092  }
4093 
4094  // -- pflow over pT
4096  bestGsfElectron.pt());
4098  bestGsfElectron.pt());
4099  if (isEBflag) {
4101  bestGsfElectron.pt());
4103  bestGsfElectron.pt());
4104  h1_ele_photonRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4105  } else if (isEEflag) {
4107  bestGsfElectron.pt());
4109  bestGsfElectron.pt());
4110  h1_ele_photonRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4111  }
4112  if (passMiniAODSelection) { // Pt > 5.
4114  bestGsfElectron.pt());
4116  bestGsfElectron.pt());
4117  h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4118  if (isEBflag) {
4120  bestGsfElectron.pt());
4122  bestGsfElectron.pt());
4124  bestGsfElectron.pt());
4125  } else if (isEEflag) {
4127  bestGsfElectron.pt());
4129  bestGsfElectron.pt());
4131  bestGsfElectron.pt());
4132  }
4133  }
4134 
4135  // isolation
4136  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
4142  h1_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt());
4148  h1_ele_hcalDepth1OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(1));
4149  h1_ele_hcalDepth2OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(2));
4150  if (isEBflag) {
4151  h1_ele_tkSumPt_dr03_barrel->Fill(bestGsfElectron.dr03TkSumPt());
4157  h1_ele_tkSumPt_dr04_barrel->Fill(bestGsfElectron.dr04TkSumPt());
4165  } else if (isEEflag) {
4166  h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt());
4172  h1_ele_tkSumPt_dr04_endcaps->Fill(bestGsfElectron.dr04TkSumPt());
4180  }
4181 
4182  // conversion rejection
4183  int flags = bestGsfElectron.convFlags();
4184  if (flags == -9999) {
4185  flags = -1;
4186  }
4188  if (flags >= 0.) {
4189  h1_ele_convDist->Fill(bestGsfElectron.convDist());
4190  h1_ele_convDcot->Fill(bestGsfElectron.convDcot());
4191  h1_ele_convRadius->Fill(bestGsfElectron.convRadius());
4192  }
4193 
4194  } // loop over mc particle
4195  h1_mcNum->Fill(mcNum);
4196  h1_eleNum->Fill(eleNum);
4197 }
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:230
MonitorElement * h1_ele_ecalEnergyError_endcaps
MonitorElement * h1_scl_EoEtrue_endcaps_ringgap
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_endcaps
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1_barrel
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:496
bool isGsfScPixChargeConsistent() const
Definition: GsfElectron.h:129
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_
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollection_
double pt() const final
transverse momentum
MonitorElement * h1_ele_photonRelativeIso_mAOD
bool ecalDrivenSeed() const
Definition: GsfElectron.h:158
float deltaPhiSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:229
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2
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
float eSeedClusterOverP() const
Definition: GsfElectron.h:222
float scE1x5() const
Definition: GsfElectron.h:497
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk03Tag_
bool trackerDrivenSeed() const
Definition: GsfElectron.h:159
MonitorElement * h1_scl_bcl_EtotoEtrue_endcaps
bool isEBPhiGap() const
Definition: GsfElectron.h:334
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
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2_endcaps
bool isEERingGap() const
Definition: GsfElectron.h:337
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
MonitorElement * h1_ele_dEtaSc_propVtx_all_endcaps
MonitorElement * h1_ele_dPhiCl_propOut_all_endcaps
MonitorElement * h1_ele_chargedHadronRelativeIso
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal04Tag_
float hcalOverEcalBc(const ShowerShape &ss, int depth) const
Definition: GsfElectron.h:442
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
MonitorElement * h1_ele_hcalDepth2OverEcalBc_barrel
MonitorElement * h2_scl_EoEtrueVsrecOfflineVertices_endcaps
float deltaEtaEleClusterTrackAtCalo() const
Definition: GsfElectron.h:227
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1_endcaps
MonitorElement * h1_ele_chargedHadronIso_endcaps
float convDcot() const
Definition: GsfElectron.h:646
MonitorElement * h2_ele_dPhiEleClVsPhi_propOut
float dr04TkSumPt() const
Definition: GsfElectron.h:597
bool isEBEtaGap() const
Definition: GsfElectron.h:333
MonitorElement * h1_ele_neutralHadronIso_endcaps
MonitorElement * h2_ele_PtinVsPtoutGolden_mean
MonitorElement * h2_ele_dEtaEleClVsPhi_propOut
MonitorElement * h1_ele_dPhiSc_propVtx_all_endcaps
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
Classification classification() const
Definition: GsfElectron.h:805
const Double_t pi
float eEleClusterOverPout() const
Definition: GsfElectron.h:224
bool isEB() const
Definition: GsfElectron.h:328
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1
edm::EDGetTokenT< reco::GsfElectronCoreCollection > electronCoreCollection_
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_endcaps
float dr03TkSumPt() const
Definition: GsfElectron.h:557
float eSeedClusterOverPout() const
Definition: GsfElectron.h:223
void Fill(long long x)
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel
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")
MonitorElement * h1_ele_PoPtrue_showering_endcaps
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
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
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:729
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:270
edm::EDGetTokenT< reco::VertexCollection > offlineVerticesCollection_
int iEvent
Definition: GenABIO.cc:224
MonitorElement * h1_ele_dEtaEleCl_propOut_endcaps
float dr03HcalTowerSumEtBc(int depth=0) const
Definition: GsfElectron.h:593
float caloEnergy() const
Definition: GsfElectron.h:899
double p() const final
magnitude of momentum vector
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 mva_e_pi() const
Definition: GsfElectron.h:744
float scSigmaEtaEta() const
Definition: GsfElectron.h:495
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")
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:665
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
Definition: GsfElectron.h:766
int convFlags() const
Definition: GsfElectron.h:643
bool isEBEEGap() const
Definition: GsfElectron.h:331
MonitorElement * h2_ele_dPhiEleClVsEta_propOut
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
const double infinity
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps
float convDist() const
Definition: GsfElectron.h:645
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * h1_scl_EoEtrueShowering_endcaps
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:268
MonitorElement * h1_ele_hcalDepth1OverEcalBc_endcaps
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
bool isEEDeeGap() const
Definition: GsfElectron.h:336
MonitorElement * h1_scl_SigIEtaIEta_mAOD_endcaps
MonitorElement * h1_ele_ecalEnergyError_barrel
double py() const final
y coordinate of momentum vector
bool isNull() const
Checks for null.
Definition: Ref.h:235
float hcalOverEcal(const ShowerShape &ss, int depth) const
Definition: GsfElectron.h:425
T perp() const
Magnitude of transverse component.
edm::EDGetTokenT< reco::GsfTrackCollection > electronTrackCollection_
MonitorElement * h1_ele_neutralHadronRelativeIso
d
Definition: ztail.py:151
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1
MonitorElement * h1_ele_combinedP4Error_barrel
MonitorElement * h1_ele_dPhiSc_propVtx_all_barrel
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1
MonitorElement * h1_scl_EoEtrueShowering_barrel
void setBookEfficiencyFlag(const bool &)
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_barrel
float superClusterFbrem() const
Definition: GsfElectron.h:803
virtual int pdgId() const =0
PDG identifier.
Log< level::Info, false > LogInfo
bool isGsfCtfScPixChargeConsistent() const
Definition: GsfElectron.h:128
MonitorElement * h1_ele_superclusterfbrem_endcaps
MonitorElement * h1_ele_dPhiEleCl_propOut_barrel
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk04Tag_
MonitorElement * h2_scl_EoEtrueVsrecOfflineVertices
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel
MonitorElement * h1_scl_EoEtrue_barrel_new_etagap
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2
float scE2x5Max() const
Definition: GsfElectron.h:498
float p4Error(P4Kind kind) const
Definition: GsfElectron.cc:230
MonitorElement * h1_ele_photonRelativeIso_endcaps
float ecalEnergy() const
Definition: GsfElectron.h:896
bool isEE() const
Definition: GsfElectron.h:329
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_endcaps
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")
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_barrel
MonitorElement * h1_ele_photonRelativeIso_mAOD_endcaps
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
MonitorElement * h1_ele_dPhiCl_propOut_all_barrel
MonitorElement * h1_ele_dEtaCl_propOut_all_barrel
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalFull03Tag_
virtual SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:160
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2_barrel
float fbrem() const
Definition: GsfElectron.h:809
float correctedEcalEnergyError() const
Definition: GsfElectron.h:883
fixed size matrix
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")
float mva_Isolated() const
Definition: GsfElectron.h:743
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_barrel
MonitorElement * h1_scl_EoEtrue_endcaps_new_deegap
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_barrel
float dr04HcalTowerSumEtBc(int depth=0) const
Definition: GsfElectron.h:601
float convRadius() const
Definition: GsfElectron.h:647
MonitorElement * h2_ele_PinVsPoutShowering_mode
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2_endcaps
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:559
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_barrel
bool isGsfCtfChargeConsistent() const
Definition: GsfElectron.h:130
float dr04HcalTowerSumEt(int depth=0) const
Definition: GsfElectron.h:600
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h1_ele_ecalRecHitSumEt_dr04_endcaps
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:226
MonitorElement * h1_ele_dEtaCl_propOut_all_endcaps
float scE5x5() const
Definition: GsfElectron.h:499
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:471
MonitorElement * h1_ele_chargedHadronRelativeIso_barrel
float dr03HcalTowerSumEt(int depth=0) const
Definition: GsfElectron.h:576
MonitorElement * h1_ele_photonRelativeIso_barrel
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
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
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:599
Definition: Run.h:45
int charge() const final
electric charge
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal03Tag_
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2_barrel
double eta() const final
momentum pseudorapidity