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_Eta_Extended = nullptr;
203  h1_mc_AbsEta = nullptr;
204  h1_mc_AbsEta_Extended = nullptr;
205  h1_mc_P = nullptr;
206  h1_mc_Pt = nullptr;
207  h1_mc_Phi = nullptr;
208  h1_mc_Z = nullptr;
209  h2_mc_PtEta = nullptr;
210 
211  h1_mc_Eta_Extended_matched = nullptr;
212  h1_mc_AbsEta_matched = nullptr;
214  h1_mc_Pt_matched = nullptr;
215  h1_mc_Phi_matched = nullptr;
216  h1_mc_Z_matched = nullptr;
217  h2_mc_PtEta_matched = nullptr;
218 
219  h1_mc_Eta_matched_qmisid = nullptr;
220  h1_mc_AbsEta_matched_qmisid = nullptr;
221  h1_mc_Pt_matched_qmisid = nullptr;
222  h1_mc_Phi_matched_qmisid = nullptr;
223  h1_mc_Z_matched_qmisid = nullptr;
224 
225  h1_ele_EoverP_all = nullptr;
226  h1_ele_EoverP_all_barrel = nullptr;
227  h1_ele_EoverP_all_endcaps = nullptr;
228  h1_ele_EseedOP_all = nullptr;
229  h1_ele_EseedOP_all_barrel = nullptr;
230  h1_ele_EseedOP_all_endcaps = nullptr;
231  h1_ele_EoPout_all = nullptr;
232  h1_ele_EeleOPout_all = nullptr;
233  h1_ele_dEtaSc_propVtx_all = nullptr;
236  h1_ele_dPhiSc_propVtx_all = nullptr;
239  h1_ele_dEtaCl_propOut_all = nullptr;
242  h1_ele_dPhiCl_propOut_all = nullptr;
245  h1_ele_TIP_all = nullptr;
246  h1_ele_TIP_all_barrel = nullptr;
247  h1_ele_TIP_all_endcaps = nullptr;
248  h1_ele_HoE_all = nullptr;
249  h1_ele_HoE_all_barrel = nullptr;
250  h1_ele_HoE_all_endcaps = nullptr;
251  h1_ele_vertexEta_all = nullptr;
252  h1_ele_vertexPt_all = nullptr;
253  h1_ele_Et_all = nullptr;
254  h1_ele_mee_all = nullptr;
255  h1_ele_mee_os = nullptr;
256  h1_ele_mee_os_ebeb = nullptr;
257  h1_ele_mee_os_ebee = nullptr;
258  h1_ele_mee_os_eeee = nullptr;
259  h1_ele_mee_os_gg = nullptr;
260  h1_ele_mee_os_gb = nullptr;
261  h1_ele_mee_os_bb = nullptr;
262 
263  h2_ele_E2mnE1vsMee_all = nullptr;
264  h2_ele_E2mnE1vsMee_egeg_all = nullptr;
265 
266  h1_ele_charge = nullptr;
267  h2_ele_chargeVsEta = nullptr;
268  h2_ele_chargeVsPhi = nullptr;
269  h2_ele_chargeVsPt = nullptr;
270  h1_ele_vertexP = nullptr;
271  h1_ele_vertexPt = nullptr;
272  h1_ele_vertexPt_nocut = nullptr;
273  h1_ele_Et = nullptr;
274  h2_ele_vertexPtVsEta = nullptr;
275  h2_ele_vertexPtVsPhi = nullptr;
276  h1_ele_vertexPt_5100 = nullptr;
277  h1_ele_vertexEta = nullptr;
278  h2_ele_vertexEtaVsPhi = nullptr;
279  h1_ele_vertexAbsEta = nullptr;
280  h1_ele_vertexPhi = nullptr;
281  h1_ele_vertexX = nullptr;
282  h1_ele_vertexY = nullptr;
283  h1_ele_vertexZ = nullptr;
284  h1_ele_vertexTIP = nullptr;
285  h2_ele_vertexTIPVsEta = nullptr;
286  h2_ele_vertexTIPVsPhi = nullptr;
287  h2_ele_vertexTIPVsPt = nullptr;
288 
289  h1_scl_En = nullptr;
290  h1_scl_EoEtrue_barrel = nullptr;
291  h1_scl_EoEtrue_endcaps = nullptr;
294  h1_scl_EoEtrue_ebeegap = nullptr;
297  h1_scl_EoEtrue_barrel_new = nullptr;
298  h1_scl_EoEtrue_endcaps_new = nullptr;
302  h1_scl_EoEtrue_ebeegap_new = nullptr;
309  h1_scl_Et = nullptr;
310  h2_scl_EtVsEta = nullptr;
311  h2_scl_EtVsPhi = nullptr;
312  h2_scl_EtaVsPhi = nullptr;
313  h1_scl_Eta = nullptr;
314  h1_scl_Phi = nullptr;
315  h1_scl_ESFrac_endcaps = nullptr;
316 
317  h2_scl_EoEtruePfVsEg = nullptr;
318 
319  h1_scl_SigEtaEta = nullptr;
320  h1_scl_SigEtaEta_barrel = nullptr;
321  h1_scl_SigEtaEta_endcaps = nullptr;
322  h1_scl_SigIEtaIEta = nullptr;
323  h1_scl_SigIEtaIEta_barrel = nullptr;
324  h1_scl_SigIEtaIEta_endcaps = nullptr;
325  h1_scl_SigIEtaIEta_mAOD = nullptr;
332  h1_scl_E1x5 = nullptr;
333  h1_scl_E1x5_barrel = nullptr;
334  h1_scl_E1x5_endcaps = nullptr;
335  h1_scl_E2x5max = nullptr;
336  h1_scl_E2x5max_barrel = nullptr;
337  h1_scl_E2x5max_endcaps = nullptr;
338  h1_scl_E5x5 = nullptr;
339  h1_scl_E5x5_barrel = nullptr;
340  h1_scl_E5x5_endcaps = nullptr;
341  h1_scl_bcl_EtotoEtrue = nullptr;
345 
346  h1_ele_ambiguousTracks = nullptr;
347  h2_ele_ambiguousTracksVsEta = nullptr;
348  h2_ele_ambiguousTracksVsPhi = nullptr;
349  h2_ele_ambiguousTracksVsPt = nullptr;
350  h1_ele_foundHits = nullptr;
351  h1_ele_foundHits_barrel = nullptr;
352  h1_ele_foundHits_endcaps = nullptr;
354  h2_ele_foundHitsVsEta_mAOD = nullptr;
355  h2_ele_foundHitsVsPhi = nullptr;
356  h2_ele_foundHitsVsPt = nullptr;
357  h1_ele_lostHits = nullptr;
358  h1_ele_lostHits_barrel = nullptr;
359  h1_ele_lostHits_endcaps = nullptr;
360  h2_ele_lostHitsVsEta = nullptr;
361  h2_ele_lostHitsVsPhi = nullptr;
362  h2_ele_lostHitsVsPt = nullptr;
363  h1_ele_chi2 = nullptr;
364  h1_ele_chi2_barrel = nullptr;
365  h1_ele_chi2_endcaps = nullptr;
366  h2_ele_chi2VsEta = nullptr;
367  h2_ele_chi2VsPhi = nullptr;
368  h2_ele_chi2VsPt = nullptr;
369 
370  h1_ele_PoPtrue = nullptr;
371  h1_ele_PoPtrue_barrel = nullptr;
372  h1_ele_PoPtrue_endcaps = nullptr;
373 
375  h2_ele_PoPtrueVsPhi = nullptr;
376  h2_ele_PoPtrueVsPt = nullptr;
377  h2_ele_sigmaIetaIetaVsPt = nullptr;
378 
383  h1_ele_PtoPttrue = nullptr;
384  h1_ele_PtoPttrue_barrel = nullptr;
385  h1_ele_PtoPttrue_endcaps = nullptr;
386  h1_ele_ChargeMnChargeTrue = nullptr;
387  h1_ele_EtaMnEtaTrue = nullptr;
388  h1_ele_EtaMnEtaTrue_barrel = nullptr;
389  h1_ele_EtaMnEtaTrue_endcaps = nullptr;
390  h2_ele_EtaMnEtaTrueVsEta = nullptr;
391  h2_ele_EtaMnEtaTrueVsPhi = nullptr;
392  h2_ele_EtaMnEtaTrueVsPt = nullptr;
393  h1_ele_PhiMnPhiTrue = nullptr;
394  h1_ele_PhiMnPhiTrue_barrel = nullptr;
395  h1_ele_PhiMnPhiTrue_endcaps = nullptr;
396  h1_ele_PhiMnPhiTrue2 = nullptr;
397  h2_ele_PhiMnPhiTrueVsEta = nullptr;
398  h2_ele_PhiMnPhiTrueVsPhi = nullptr;
399  h2_ele_PhiMnPhiTrueVsPt = nullptr;
400  h1_ele_PinMnPout = nullptr;
401  h1_ele_PinMnPout_mode = nullptr;
402  h2_ele_PinMnPoutVsEta_mode = nullptr;
403  h2_ele_PinMnPoutVsPhi_mode = nullptr;
404  h2_ele_PinMnPoutVsPt_mode = nullptr;
405  h2_ele_PinMnPoutVsE_mode = nullptr;
406  h2_ele_PinMnPoutVsChi2_mode = nullptr;
407 
408  h1_ele_outerP = nullptr;
409  h1_ele_outerP_mode = nullptr;
410  h2_ele_outerPVsEta_mode = nullptr;
411  h1_ele_outerPt = nullptr;
412  h1_ele_outerPt_mode = nullptr;
413  h2_ele_outerPtVsEta_mode = nullptr;
414  h2_ele_outerPtVsPhi_mode = nullptr;
415  h2_ele_outerPtVsPt_mode = nullptr;
416  h1_ele_EoP = nullptr;
417  h1_ele_EoP_barrel = nullptr;
418  h1_ele_EoP_endcaps = nullptr;
419  h2_ele_EoPVsEta_Extended = nullptr;
420  h2_ele_EoPVsPhi = nullptr;
421  h2_ele_EoPVsE = nullptr;
422  h1_ele_EseedOP = nullptr;
423  h1_ele_EseedOP_barrel = nullptr;
424  h1_ele_EseedOP_endcaps = nullptr;
425  h2_ele_EseedOPVsEta = nullptr;
426  h2_ele_EseedOPVsPhi = nullptr;
427  h2_ele_EseedOPVsE = nullptr;
428  h1_ele_EoPout = nullptr;
429  h1_ele_EoPout_barrel = nullptr;
430  h1_ele_EoPout_endcaps = nullptr;
431  h2_ele_EoPoutVsEta = nullptr;
432  h2_ele_EoPoutVsPhi = nullptr;
433  h2_ele_EoPoutVsE = nullptr;
434  h1_ele_EeleOPout = nullptr;
435  h1_ele_EeleOPout_barrel = nullptr;
436  h1_ele_EeleOPout_endcaps = nullptr;
437  h2_ele_EeleOPoutVsEta = nullptr;
438  h2_ele_EeleOPoutVsPhi = nullptr;
439  h2_ele_EeleOPoutVsE = nullptr;
440 
441  h1_ele_dEtaSc_propVtx = nullptr;
445  h1_ele_dEtaSc_propVtx_mAOD = nullptr;
448  h2_ele_dEtaScVsEta_propVtx = nullptr;
449  h2_ele_dEtaScVsPhi_propVtx = nullptr;
450  h2_ele_dEtaScVsPt_propVtx = nullptr;
451  h1_ele_dPhiSc_propVtx = nullptr;
455  h2_ele_dPhiScVsEta_propVtx = nullptr;
456  h2_ele_dPhiScVsPhi_propVtx = nullptr;
457  h2_ele_dPhiScVsPt_propVtx = nullptr;
458  h1_ele_dEtaCl_propOut = nullptr;
461  h2_ele_dEtaClVsEta_propOut = nullptr;
462  h2_ele_dEtaClVsPhi_propOut = nullptr;
463  h2_ele_dEtaClVsPt_propOut = nullptr;
464  h1_ele_dPhiCl_propOut = nullptr;
467  h1_ele_dPhiCl_propOut_mAOD = nullptr;
470  h2_ele_dPhiClVsEta_propOut = nullptr;
471  h2_ele_dPhiClVsPhi_propOut = nullptr;
472  h2_ele_dPhiClVsPt_propOut = nullptr;
473  h1_ele_dEtaEleCl_propOut = nullptr;
479  h1_ele_dPhiEleCl_propOut = nullptr;
485 
486  h1_ele_seed_subdet2 = nullptr;
487  h1_ele_seed_mask = nullptr;
488  h1_ele_seed_mask_bpix = nullptr;
489  h1_ele_seed_mask_fpix = nullptr;
490  h1_ele_seed_mask_tec = nullptr;
491  h1_ele_seed_dphi2 = nullptr;
492  h2_ele_seed_dphi2VsEta = nullptr;
493  h2_ele_seed_dphi2VsPt = nullptr;
494  h1_ele_seed_dphi2pos = nullptr;
495  h2_ele_seed_dphi2posVsEta = nullptr;
496  h2_ele_seed_dphi2posVsPt = nullptr;
497  h1_ele_seed_drz2 = nullptr;
498  h2_ele_seed_drz2VsEta = nullptr;
499  h2_ele_seed_drz2VsPt = nullptr;
500  h1_ele_seed_drz2pos = nullptr;
501  h2_ele_seed_drz2posVsEta = nullptr;
502  h2_ele_seed_drz2posVsPt = nullptr;
503 
504  h1_ele_classes = nullptr;
505  h1_ele_eta = nullptr;
506  h1_ele_eta_golden = nullptr;
507  h1_ele_eta_bbrem = nullptr;
508  h1_ele_eta_shower = nullptr;
509 
510  h1_ele_HoE = nullptr;
511  h1_ele_HoE_Extended = nullptr;
512  h1_ele_HoE_barrel = nullptr;
513  h1_ele_HoE_endcaps = nullptr;
514  h1_ele_HoE_fiducial = nullptr;
515  h2_ele_HoEVsEta = nullptr;
516  h2_ele_HoEVsPhi = nullptr;
517  h2_ele_HoEVsE = nullptr;
518  h1_ele_HoE_mAOD = nullptr;
519  h1_ele_HoE_mAOD_barrel = nullptr;
520  h1_ele_HoE_mAOD_endcaps = nullptr;
521 
522  h1_ele_fbrem = nullptr;
523  h1_ele_fbrem_Extended = nullptr;
524  h1_ele_fbrem_barrel = nullptr;
525  h1_ele_fbrem_endcaps = nullptr;
526  p1_ele_fbremVsEta_mode = nullptr;
527  p1_ele_fbremVsEta_mean = nullptr;
528  h1_ele_fbrem_mAOD = nullptr;
529  h1_ele_fbrem_mAOD_barrel = nullptr;
530  h1_ele_fbrem_mAOD_endcaps = nullptr;
531  h1_ele_superclusterfbrem = nullptr;
532 
535  h2_ele_PinVsPoutGolden_mode = nullptr;
537  h2_ele_PinVsPoutGolden_mean = nullptr;
543  h1_scl_EoEtrueGolden_barrel = nullptr;
547 
548  h1_ele_mva = nullptr;
549  h1_ele_mva_isolated = nullptr;
550  h1_ele_provenance = nullptr;
551  h1_ele_provenance_Extended = nullptr;
552 
553  // isolation
554  h1_ele_tkSumPt_dr03 = nullptr;
555  h1_ele_tkSumPt_dr03_barrel = nullptr;
556  h1_ele_tkSumPt_dr03_endcaps = nullptr;
557  h1_ele_ecalRecHitSumEt_dr03 = nullptr;
564 
565  h1_ele_ecalPFClusterIso = nullptr;
566  h1_ele_hcalPFClusterIso = nullptr;
573 
574  // conversions
575  h1_ele_convFlags = nullptr;
576  h1_ele_convFlags_all = nullptr;
577  h1_ele_convDist = nullptr;
578  h1_ele_convDist_all = nullptr;
579  h1_ele_convDcot = nullptr;
580  h1_ele_convDcot_all = nullptr;
581  h1_ele_convRadius = nullptr;
582  h1_ele_convRadius_all = nullptr;
583 
584  // PF
593  h1_ele_photonRelativeIso = nullptr;
606 }
607 
610 
611  // prepareStore() ;
612  setBookIndex(-1);
613  setBookPrefix("h");
616 
617  // mc truth collections sizes
618  h1_mcNum = bookH1withSumw2(iBooker, "mcNum", "# mc particles", fhits_nbin, 0., fhits_max, "N_{gen}");
619  h1_eleNum = bookH1withSumw2(iBooker, "mcNum_ele", "# mc electrons", fhits_nbin, 0., fhits_max, "N_{gen ele}");
620  h1_gamNum = bookH1withSumw2(iBooker, "mcNum_gam", "# mc gammas", fhits_nbin, 0., fhits_max, "N_{gen #gamma}");
621 
622  // rec event collections sizes
623  h1_recEleNum = bookH1(iBooker, "recEleNum", "# rec electrons", ele_nbin, ele_min, ele_max, "N_{ele}");
624  h1_recCoreNum = bookH1(iBooker, "recCoreNum", "# rec electron cores", core_nbin, core_min, core_max, "N_{core}");
625  h1_recTrackNum = bookH1(iBooker, "recTrackNum", "# rec gsf tracks", track_nbin, track_min, track_max, "N_{track}");
626  h1_recSeedNum = bookH1(iBooker, "recSeedNum", "# rec electron seeds", seed_nbin, seed_min, seed_max, "N_{seed}");
628  iBooker, "recOfflineVertices", "# rec Offline Primary Vertices", opv_nbin, opv_min, opv_max, "N_{Vertices}");
629 
631  "scl_EoEtrueVsrecOfflineVertices",
632  "E/Etrue vs number of primary vertices",
633  opv_nbin, // 10,
634  opv_min, // 0.,
635  opv_max, // 50.,
636  50,
637  0.,
638  2.5,
639  "N_{primary vertices}",
640  "E/E_{true}");
642  "scl_EoEtrueVsrecOfflineVertices_Extended",
643  "E/Etrue vs number of primary vertices, 2.5<|eta|<3",
644  opv_nbin, // 10,
645  opv_min, // 0.,
646  opv_max, // 50.,
647  50,
648  0.,
649  2.5,
650  "N_{primary vertices}",
651  "E/E_{true}");
653  "scl_EoEtrueVsrecOfflineVertices_barrel",
654  "E/Etrue vs number of primary , barrel",
655  opv_nbin, // 10,
656  opv_min, // 0.,
657  opv_max, // 50.,
658  50,
659  0.,
660  2.5,
661  "N_{primary vertices}",
662  "E/E_{true}");
664  "scl_EoEtrueVsrecOfflineVertices_endcaps",
665  "E/Etrue vs number of primary , endcaps",
666  opv_nbin, // 10,
667  opv_min, // 0.,
668  opv_max, // 50.,
669  50,
670  0.,
671  2.5,
672  "N_{primary vertices}",
673  "E/E_{true}");
674 
675  // mc
676  setBookPrefix("h_mc");
677  h1_mc_Eta = bookH1withSumw2(iBooker, "Eta", "gen #eta", eta_nbin, eta_min, eta_max, "#eta");
679  iBooker, "Eta_Extended", "gen #eta", eta_nbin_extended, eta_min_extended, eta_max_extended, "#eta");
680  h1_mc_AbsEta = bookH1withSumw2(iBooker, "AbsEta", "gen |#eta|", eta_nbin / 2, 0., eta_max);
682  bookH1withSumw2(iBooker, "AbsEta_Extended", "gen |#eta|", eta_nbin_extended / 2, 0., eta_max_extended);
683  h1_mc_P = bookH1withSumw2(iBooker, "P", "gen p", p_nbin, 0., p_max, "p (GeV/c)");
684  h1_mc_Pt = bookH1withSumw2(iBooker, "Pt", "gen pt", pteff_nbin, 5., pt_max);
685  h1_mc_Phi = bookH1withSumw2(iBooker, "Phi", "gen phi", phi_nbin, phi_min, phi_max);
686  h1_mc_Z = bookH1withSumw2(iBooker, "Z", "gen z ", xyz_nbin, -25, 25);
687  h2_mc_PtEta =
688  bookH2withSumw2(iBooker, "PtEta", "gen pt vs #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
689 
690  // all electrons
691  setBookPrefix("h_ele");
693  "EoverP_all",
694  "ele E/P_{vertex}, all reco electrons",
695  eop_nbin,
696  0.,
697  eop_max,
698  "E/P_{vertex}",
699  "Events",
700  "ELE_LOGY E1 P");
702  "EoverP_all_barrel",
703  "ele E/P_{vertex}, all reco electrons, barrel",
704  eop_nbin,
705  0.,
706  eop_max,
707  "E/P_{vertex}",
708  "Events",
709  "ELE_LOGY E1 P");
711  "EoverP_all_endcaps",
712  "ele E/P_{vertex}, all reco electrons, endcaps",
713  eop_nbin,
714  0.,
715  eop_max,
716  "E/P_{vertex}",
717  "Events",
718  "ELE_LOGY E1 P");
720  "EseedOP_all",
721  "ele E_{seed}/P_{vertex}, all reco electrons",
722  eop_nbin,
723  0.,
724  eop_max,
725  "E_{seed}/P_{vertex}",
726  "Events",
727  "ELE_LOGY E1 P");
729  "EseedOP_all_barrel",
730  "ele E_{seed}/P_{vertex}, all reco electrons, barrel",
731  eop_nbin,
732  0.,
733  eop_max,
734  "E_{seed}/P_{vertex}",
735  "Events",
736  "ELE_LOGY E1 P");
738  "EseedOP_all_endcaps",
739  "ele E_{seed}/P_{vertex}, all reco electrons, endcaps",
740  eop_nbin,
741  0.,
742  eop_max,
743  "E_{seed}/P_{vertex}",
744  "Events",
745  "ELE_LOGY E1 P");
747  "EoPout_all",
748  "ele E_{seed}/P_{out}, all reco electrons",
749  eop_nbin,
750  0.,
751  eop_max,
752  "E_{seed}/P_{out}",
753  "Events",
754  "ELE_LOGY E1 P");
756  "EeleOPout_all",
757  "ele E_{ele}/P_{out}, all reco electrons",
758  eop_nbin,
759  0.,
760  eop_max,
761  "E_{ele}/P_{out}",
762  "Events",
763  "ELE_LOGY E1 P");
765  "dEtaSc_propVtx_all",
766  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
770  "#eta_{sc} - #eta_{tr}",
771  "Events",
772  "ELE_LOGY E1 P");
774  bookH1withSumw2(iBooker,
775  "dEtaSc_propVtx_all_barrel",
776  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons barrel",
780  "#eta_{sc} - #eta_{tr}",
781  "Events",
782  "ELE_LOGY E1 P");
784  bookH1withSumw2(iBooker,
785  "dEtaSc_propVtx_all_endcaps",
786  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons endcaps",
790  "#eta_{sc} - #eta_{tr}",
791  "Events",
792  "ELE_LOGY E1 P");
794  "dPhiSc_propVtx_all",
795  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
799  "#phi_{sc} - #phi_{tr} (rad)",
800  "Events",
801  "ELE_LOGY E1 P");
803  bookH1withSumw2(iBooker,
804  "dPhiSc_propVtx_all_barrel",
805  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons barrel",
809  "#phi_{sc} - #phi_{tr} (rad)",
810  "Events",
811  "ELE_LOGY E1 P");
813  bookH1withSumw2(iBooker,
814  "dPhiSc_propVtx_all_endcaps",
815  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons endcaps",
819  "#phi_{sc} - #phi_{tr} (rad)",
820  "Events",
821  "ELE_LOGY E1 P");
823  "dEtaCl_propOut_all",
824  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
828  "#eta_{sc} - #eta_{tr}",
829  "Events",
830  "ELE_LOGY E1 P");
832  bookH1withSumw2(iBooker,
833  "dEtaCl_propOut_all_barrel",
834  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons barrel",
838  "#eta_{sc} - #eta_{tr}",
839  "Events",
840  "ELE_LOGY E1 P");
842  bookH1withSumw2(iBooker,
843  "dEtaCl_propOut_all_endcaps",
844  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons endcaps",
848  "#eta_{sc} - #eta_{tr}",
849  "Events",
850  "ELE_LOGY E1 P");
852  "dPhiCl_propOut_all",
853  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
857  "#phi_{sc} - #phi_{tr} (rad)",
858  "Events",
859  "ELE_LOGY E1 P");
861  bookH1withSumw2(iBooker,
862  "dPhiCl_propOut_all_barrel",
863  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons barrel",
867  "#phi_{sc} - #phi_{tr} (rad)",
868  "Events",
869  "ELE_LOGY E1 P");
871  bookH1withSumw2(iBooker,
872  "dPhiCl_propOut_all_endcaps",
873  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons endcaps",
877  "#phi_{sc} - #phi_{tr} (rad)",
878  "Events",
879  "ELE_LOGY E1 P");
881  "HoE_all",
882  "ele hadronic energy / em energy, all reco electrons",
883  hoe_nbin,
884  hoe_min,
885  hoe_max,
886  "H/E",
887  "Events",
888  "ELE_LOGY E1 P");
890  "HoE_all_barrel",
891  "ele hadronic energy / em energy, all reco electrons barrel",
892  hoe_nbin,
893  hoe_min,
894  hoe_max,
895  "H/E",
896  "Events",
897  "ELE_LOGY E1 P");
899  "HoE_all_endcaps",
900  "ele hadronic energy / em energy, all reco electrons endcaps",
901  hoe_nbin,
902  hoe_min,
903  hoe_max,
904  "H/E",
905  "Events",
906  "ELE_LOGY E1 P");
908  "HoE_bc_all",
909  "ele hadronic energy / em energy, all reco electrons, behind cluster",
910  hoe_nbin,
911  hoe_min,
912  hoe_max,
913  "H/E",
914  "Events",
915  "ELE_LOGY E1 P");
917  bookH1withSumw2(iBooker, "vertexPt_all", "ele p_{T}, all reco electrons", pteff_nbin, 5., pt_max, "", "Events");
918  h1_ele_Et_all = bookH1withSumw2(iBooker,
919  "Et_all",
920  "ele ecal E_{T}, all reco electrons",
921  pteff_nbin,
922  5.,
923  pt_max,
924  "E_{T} (GeV)",
925  "Events",
926  "ELE_LOGY E1 P");
928  iBooker, "vertexEta_all", "ele eta, all reco electrons", eta_nbin, eta_min, eta_max, "", "Events");
930  "TIP_all",
931  "ele vertex transverse radius, all reco electrons",
932  100,
933  0.,
934  0.2,
935  "r_{T} (cm)",
936  "Events",
937  "ELE_LOGY E1 P");
939  "TIP_all_barrel",
940  "ele vertex transverse radius, all reco electrons barrel",
941  100,
942  0.,
943  0.2,
944  "r_{T} (cm)",
945  "Events",
946  "ELE_LOGY E1 P");
948  "TIP_all_endcaps",
949  "ele vertex transverse radius, all reco electrons endcaps",
950  100,
951  0.,
952  0.2,
953  "r_{T} (cm)",
954  "Events",
955  "ELE_LOGY E1 P");
957  "mee_all",
958  "ele pairs invariant mass, all reco electrons",
959  mee_nbin,
960  mee_min,
961  mee_max,
962  "m_{ee} (GeV/c^{2})",
963  "Events",
964  "ELE_LOGY E1 P");
965  h1_ele_mee_os = bookH1withSumw2(iBooker,
966  "mee_os",
967  "ele pairs invariant mass, opp. sign",
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_ebeb",
976  "ele pairs invariant mass, opp. sign, EB-EB",
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_ebee",
985  "ele pairs invariant mass, opp. sign, EB-EE",
986  mee_nbin,
987  mee_min,
988  mee_max,
989  "m_{e^{+}e^{-}} (GeV/c^{2})",
990  "Events",
991  "ELE_LOGY E1 P");
993  "mee_os_eeee",
994  "ele pairs invariant mass, opp. sign, EE-EE",
995  mee_nbin,
996  mee_min,
997  mee_max,
998  "m_{e^{+}e^{-}} (GeV/c^{2})",
999  "Events",
1000  "ELE_LOGY E1 P");
1002  "mee_os_gg",
1003  "ele pairs invariant mass, opp. sign, good-good",
1004  mee_nbin,
1005  mee_min,
1006  mee_max,
1007  "m_{e^{+}e^{-}} (GeV/c^{2})",
1008  "Events",
1009  "ELE_LOGY E1 P");
1011  "mee_os_gb",
1012  "ele pairs invariant mass, opp. sign, good-bad",
1013  mee_nbin,
1014  mee_min,
1015  mee_max,
1016  "m_{e^{+}e^{-}} (GeV/c^{2})",
1017  "Events",
1018  "ELE_LOGY E1 P");
1020  "mee_os_bb",
1021  "ele pairs invariant mass, opp. sign, bad-bad",
1022  mee_nbin,
1023  mee_min,
1024  mee_max,
1025  "m_{e^{+}e^{-}} (GeV/c^{2})",
1026  "Events",
1027  "ELE_LOGY E1 P");
1028 
1029  // duplicates
1030  h2_ele_E2mnE1vsMee_all = bookH2(iBooker,
1031  "E2mnE1vsMee_all",
1032  "E2 - E1 vs ele pairs invariant mass, all electrons",
1033  mee_nbin,
1034  mee_min,
1035  mee_max,
1036  100,
1037  -50.,
1038  50.,
1039  "m_{e^{+}e^{-}} (GeV/c^{2})",
1040  "E2 - E1 (GeV)");
1042  "E2mnE1vsMee_egeg_all",
1043  "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
1044  mee_nbin,
1045  mee_min,
1046  mee_max,
1047  100,
1048  -50.,
1049  50.,
1050  "m_{e^{+}e^{-}} (GeV/c^{2})",
1051  "E2 - E1 (GeV)");
1052 
1053  // charge ID
1055  bookH1withSumw2(iBooker, "ChargeMnChargeTrue", "ele charge - gen charge ", 5, -1., 4., "q_{rec} - q_{gen}");
1056  setBookPrefix("h_mc");
1058  bookH1withSumw2(iBooker, "Eta_matched_qmisid", "charge misid vs gen eta", eta_nbin, eta_min, eta_max);
1060  bookH1withSumw2(iBooker, "AbsEta_matched_qmisid", "charge misid vs gen |eta|", eta_nbin / 2, 0., eta_max);
1062  bookH1withSumw2(iBooker, "Pt_matched_qmisid", "charge misid vs gen transverse momentum", pteff_nbin, 5., pt_max);
1064  bookH1withSumw2(iBooker, "Phi_matched_qmisid", "charge misid vs gen phi", phi_nbin, phi_min, phi_max);
1065  h1_mc_Z_matched_qmisid = bookH1withSumw2(iBooker, "Z_matched_qmisid", "charge misid vs gen z", xyz_nbin, -25, 25);
1066 
1067  // matched electrons
1068  setBookPrefix("h_mc");
1070  "Eta_Extended_matched",
1071  "Eta of matched electrons",
1076  bookH1withSumw2(iBooker, "AbsEta_matched", "Efficiency vs gen |eta|", eta_nbin / 2, 0., eta_max);
1078  iBooker, "AbsEta_Extended_matched", "Efficiency vs gen |eta|", eta_nbin_extended / 2, 0., eta_max_extended);
1079  h1_mc_Pt_matched = bookH1(iBooker, "Pt_matched", "Efficiency vs gen transverse momentum", pteff_nbin, 5., pt_max);
1080  h1_mc_Phi_matched = bookH1withSumw2(iBooker, "Phi_matched", "Efficiency vs gen phi", phi_nbin, phi_min, phi_max);
1081  h1_mc_Z_matched = bookH1withSumw2(iBooker, "Z_matched", "Efficiency vs gen vertex z", xyz_nbin, -25, 25);
1083  iBooker, "PtEta_matched", "Efficiency vs pt #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
1084  setBookPrefix("h_ele");
1085  h1_ele_charge = bookH1withSumw2(iBooker, "charge", "ele charge", 5, -2.5, 2.5, "charge");
1086  h2_ele_chargeVsEta = bookH2(iBooker, "chargeVsEta", "ele charge vs eta", eta2D_nbin, eta_min, eta_max, 5, -2., 2.);
1087  h2_ele_chargeVsPhi = bookH2(iBooker, "chargeVsPhi", "ele charge vs phi", phi2D_nbin, phi_min, phi_max, 5, -2., 2.);
1088  h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt", "ele charge vs pt", pt_nbin, 0., 100., 5, -2., 2.);
1089  h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP", "ele momentum", p_nbin, 0., p_max, "p_{vertex} (GeV/c)");
1090  h1_ele_vertexPt =
1091  bookH1withSumw2(iBooker, "vertexPt", "ele transverse momentum", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1093  iBooker, "vertexPt_nocut", "pT of prunned electrons", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1094  h1_ele_Et = bookH1withSumw2(iBooker, "Et", "ele ecal E_{T}", pt_nbin, 0., pt_max, "E_{T} (GeV)");
1096  iBooker, "vertexPtVsEta", "ele transverse momentum vs eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 0., pt_max);
1098  iBooker, "vertexPtVsPhi", "ele transverse momentum vs phi", phi2D_nbin, phi_min, phi_max, pt2D_nbin, 0., pt_max);
1099  h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta", "ele momentum eta", eta_nbin, eta_min, eta_max, "#eta");
1101  iBooker, "vertexEtaVsPhi", "ele momentum eta vs phi", eta2D_nbin, eta_min, eta_max, phi2D_nbin, phi_min, phi_max);
1103  bookH1withSumw2(iBooker, "vertexPhi", "ele momentum #phi", phi_nbin, phi_min, phi_max, "#phi (rad)");
1104  h1_ele_vertexX = bookH1withSumw2(iBooker, "vertexX", "ele vertex x", xyz_nbin, -0.6, 0.6, "x (cm)");
1105  h1_ele_vertexY = bookH1withSumw2(iBooker, "vertexY", "ele vertex y", xyz_nbin, -0.6, 0.6, "y (cm)");
1106  h1_ele_vertexZ = bookH1withSumw2(iBooker, "vertexZ", "ele vertex z", xyz_nbin, -25, 25, "z (cm)");
1108  bookH1withSumw2(iBooker, "vertexTIP", "ele transverse impact parameter (wrt gen vtx)", 90, 0., 0.15, "TIP (cm)");
1109  h2_ele_vertexTIPVsEta = bookH2(iBooker,
1110  "vertexTIPVsEta",
1111  "ele transverse impact parameter (wrt gen vtx) vs eta",
1112  eta2D_nbin,
1113  eta_min,
1114  eta_max,
1115  45,
1116  0.,
1117  0.15,
1118  "#eta",
1119  "TIP (cm)");
1120  h2_ele_vertexTIPVsPhi = bookH2(iBooker,
1121  "vertexTIPVsPhi",
1122  "ele transverse impact parameter (wrt gen vtx) vs phi",
1123  phi2D_nbin,
1124  phi_min,
1125  phi_max,
1126  45,
1127  0.,
1128  0.15,
1129  "#phi (rad)",
1130  "TIP (cm)");
1131  h2_ele_vertexTIPVsPt = bookH2(iBooker,
1132  "vertexTIPVsPt",
1133  "ele transverse impact parameter (wrt gen vtx) vs transverse momentum",
1134  pt2D_nbin,
1135  0.,
1136  pt_max,
1137  45,
1138  0.,
1139  0.15,
1140  "p_{T} (GeV/c)",
1141  "TIP (cm)");
1143  iBooker, "PoPtrue", "ele momentum / gen momentum", poptrue_nbin, poptrue_min, poptrue_max, "P/P_{gen}");
1145  "PoPtrue_barrel",
1146  "ele momentum / gen momentum, barrel",
1147  poptrue_nbin,
1148  poptrue_min,
1149  poptrue_max,
1150  "P/P_{gen}");
1152  "PoPtrue_endcaps",
1153  "ele momentum / gen momentum, endcaps",
1154  poptrue_nbin,
1155  poptrue_min,
1156  poptrue_max,
1157  "P/P_{gen}");
1159  "PoPtrueVsEta_Extended",
1160  "ele momentum / gen momentum vs eta",
1164  50,
1165  poptrue_min,
1166  poptrue_max);
1167  h2_ele_PoPtrueVsPhi = bookH2(iBooker,
1168  "PoPtrueVsPhi",
1169  "ele momentum / gen momentum vs phi",
1170  phi2D_nbin,
1171  phi_min,
1172  phi_max,
1173  50,
1174  poptrue_min,
1175  poptrue_max);
1177  iBooker, "PoPtrueVsPt", "ele momentum / gen momentum vs eta", pt2D_nbin, 0., pt_max, 50, poptrue_min, poptrue_max);
1179  bookH2(iBooker, "sigmaIetaIetaVsPt", "SigmaIetaIeta vs pt", 100, 0., pt_max, 100, 0., 0.05);
1181  "PoPtrue_golden_barrel",
1182  "ele momentum / gen momentum, golden, barrel",
1183  poptrue_nbin,
1184  poptrue_min,
1185  poptrue_max,
1186  "P/P_{gen}");
1188  "PoPtrue_golden_endcaps",
1189  "ele momentum / gen momentum, golden, endcaps",
1190  poptrue_nbin,
1191  poptrue_min,
1192  poptrue_max,
1193  "P/P_{gen}");
1195  "PoPtrue_showering_barrel",
1196  "ele momentum / gen momentum, showering, barrel",
1197  poptrue_nbin,
1198  poptrue_min,
1199  poptrue_max,
1200  "P/P_{gen}");
1202  "PoPtrue_showering_endcaps",
1203  "ele momentum / gen momentum, showering, endcaps",
1204  poptrue_nbin,
1205  poptrue_min,
1206  poptrue_max,
1207  "P/P_{gen}");
1209  "PtoPttrue",
1210  "ele transverse momentum / gen transverse momentum",
1211  poptrue_nbin,
1212  poptrue_min,
1213  poptrue_max,
1214  "P_{T}/P_{T}^{gen}");
1216  "PtoPttrue_barrel",
1217  "ele transverse momentum / gen transverse momentum, barrel",
1218  poptrue_nbin,
1219  poptrue_min,
1220  poptrue_max,
1221  "P_{T}/P_{T}^{gen}");
1223  "PtoPttrue_endcaps",
1224  "ele transverse momentum / gen transverse momentum, endcaps",
1225  poptrue_nbin,
1226  poptrue_min,
1227  poptrue_max,
1228  "P_{T}/P_{T}^{gen}");
1230  iBooker, "EtaMnEtaTrue", "ele momentum eta - gen eta", deta_nbin, deta_min, deta_max, "#eta_{rec} - #eta_{gen}");
1232  "EtaMnEtaTrue_barrel",
1233  "ele momentum eta - gen eta barrel",
1234  deta_nbin,
1235  deta_min,
1236  deta_max,
1237  "#eta_{rec} - #eta_{gen}");
1239  "EtaMnEtaTrue_endcaps",
1240  "ele momentum eta - gen eta endcaps",
1241  deta_nbin,
1242  deta_min,
1243  deta_max,
1244  "#eta_{rec} - #eta_{gen}");
1245  h2_ele_EtaMnEtaTrueVsEta = bookH2(iBooker,
1246  "EtaMnEtaTrueVsEta",
1247  "ele momentum eta - gen eta vs eta",
1248  eta2D_nbin,
1249  eta_min,
1250  eta_max,
1251  deta_nbin / 2,
1252  deta_min,
1253  deta_max);
1254  h2_ele_EtaMnEtaTrueVsPhi = bookH2(iBooker,
1255  "EtaMnEtaTrueVsPhi",
1256  "ele momentum eta - gen eta vs phi",
1257  phi2D_nbin,
1258  phi_min,
1259  phi_max,
1260  deta_nbin / 2,
1261  deta_min,
1262  deta_max);
1263  h2_ele_EtaMnEtaTrueVsPt = bookH2(iBooker,
1264  "EtaMnEtaTrueVsPt",
1265  "ele momentum eta - gen eta vs pt",
1266  pt_nbin,
1267  0.,
1268  pt_max,
1269  deta_nbin / 2,
1270  deta_min,
1271  deta_max);
1273  "PhiMnPhiTrue",
1274  "ele momentum phi - gen phi",
1275  dphi_nbin,
1276  dphi_min,
1277  dphi_max,
1278  "#phi_{rec} - #phi_{gen} (rad)");
1280  "PhiMnPhiTrue_barrel",
1281  "ele momentum phi - gen phi barrel",
1282  dphi_nbin,
1283  dphi_min,
1284  dphi_max,
1285  "#phi_{rec} - #phi_{gen} (rad)");
1287  "PhiMnPhiTrue_endcaps",
1288  "ele momentum phi - gen phi endcaps",
1289  dphi_nbin,
1290  dphi_min,
1291  dphi_max,
1292  "#phi_{rec} - #phi_{gen} (rad)");
1294  bookH1(iBooker, "PhiMnPhiTrue2", "ele momentum phi - gen phi", dphimatch2D_nbin, dphimatch_min, dphimatch_max);
1295  h2_ele_PhiMnPhiTrueVsEta = bookH2(iBooker,
1296  "PhiMnPhiTrueVsEta",
1297  "ele momentum phi - gen phi vs eta",
1298  eta2D_nbin,
1299  eta_min,
1300  eta_max,
1301  dphi_nbin / 2,
1302  dphi_min,
1303  dphi_max);
1304  h2_ele_PhiMnPhiTrueVsPhi = bookH2(iBooker,
1305  "PhiMnPhiTrueVsPhi",
1306  "ele momentum phi - gen phi vs phi",
1307  phi2D_nbin,
1308  phi_min,
1309  phi_max,
1310  dphi_nbin / 2,
1311  dphi_min,
1312  dphi_max);
1313  h2_ele_PhiMnPhiTrueVsPt = bookH2(iBooker,
1314  "PhiMnPhiTrueVsPt",
1315  "ele momentum phi - gen phi vs pt",
1316  pt2D_nbin,
1317  0.,
1318  pt_max,
1319  dphi_nbin / 2,
1320  dphi_min,
1321  dphi_max);
1323  iBooker, "ecalEnergyError", "Regression estimate of the ECAL energy error", error_nbin, 0, enerror_max);
1325  iBooker, "ecalEnergyError_barrel", "Regression estimate of the ECAL energy error - barrel", 30, 0, 30);
1327  "ecalEnergyError_endcaps",
1328  "Regression estimate of the ECAL energy error - endcaps",
1329  error_nbin,
1330  0,
1331  enerror_max);
1333  iBooker, "combinedP4Error", "Estimated error on the combined momentum", error_nbin, 0, enerror_max);
1335  iBooker, "combinedP4Error_barrel", "Estimated error on the combined momentum - barrel", 30, 0, 30);
1337  "combinedP4Error_endcaps",
1338  "Estimated error on the combined momentum - endcaps",
1339  error_nbin,
1340  0,
1341  enerror_max);
1342 
1343  // matched electron, superclusters
1344  setBookPrefix("h_scl");
1345  h1_scl_En = bookH1withSumw2(iBooker, "energy", "ele ecal energy", p_nbin, 0., p_max);
1347  bookH1withSumw2(iBooker, "EoEtrue_barrel", "ele ecal energy / gen energy, barrel", 50, 0.2, 1.2, "E/E_{gen}");
1349  iBooker, "EoEtrue_barrel_etagap", "ele ecal energy / gen energy, barrel, etagap", 50, 0.2, 1.2, "E/E_{gen}");
1351  iBooker, "EoEtrue_barrel_phigap", "ele ecal energy / gen energy, barrel, phigap", 50, 0.2, 1.2, "E/E_{gen}");
1353  bookH1withSumw2(iBooker, "EoEtrue_ebeegap", "ele ecal energy / gen energy, ebeegap", 50, 0.2, 1.2, "E/E_{gen}");
1355  bookH1withSumw2(iBooker, "EoEtrue_endcaps", "ele ecal energy / gen energy, endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1357  iBooker, "EoEtrue_endcaps_deegap", "ele ecal energy / gen energy, endcaps, deegap", 50, 0.2, 1.2, "E/E_{gen}");
1359  iBooker, "EoEtrue_endcaps_ringgap", "ele ecal energy / gen energy, endcaps, ringgap", 50, 0.2, 1.2, "E/E_{gen}");
1361  "EoEtrue_barrel_new",
1362  "ele ecal energy / gen energy, barrel",
1363  poptrue_nbin,
1364  poptrue_min,
1365  poptrue_max,
1366  "E/E_{gen}");
1368  "EoEtrue_barrel_new_etagap",
1369  "ele ecal energy / gen energy, barrel, etagap",
1370  poptrue_nbin,
1371  poptrue_min,
1372  poptrue_max,
1373  "E/E_{gen}");
1375  "EoEtrue_barrel_new_phigap",
1376  "ele ecal energy / gen energy, barrel, phigap",
1377  poptrue_nbin,
1378  poptrue_min,
1379  poptrue_max,
1380  "E/E_{gen}");
1382  "EoEtrue_ebeegap_new",
1383  "ele ecal energy / gen energy, ebeegap",
1384  poptrue_nbin,
1385  poptrue_min,
1386  poptrue_max,
1387  "E/E_{gen}");
1389  "EoEtrue_endcaps_new",
1390  "ele ecal energy / gen energy, endcaps",
1391  poptrue_nbin,
1392  poptrue_min,
1393  poptrue_max,
1394  "E/E_{gen}");
1396  "EoEtrue_endcaps_new_Extended",
1397  "ele ecal energy / gen energy, endcaps, extended",
1398  poptrue_nbin,
1399  poptrue_min,
1400  poptrue_max,
1401  "E/E_{gen}");
1403  "EoEtrue_endcaps_new_deegap",
1404  "ele ecal energy / gen energy, endcaps, deegap",
1405  poptrue_nbin,
1406  poptrue_min,
1407  poptrue_max,
1408  "E/E_{gen}");
1410  "EoEtrue_endcaps_new_ringgap",
1411  "ele ecal energy / gen energy, endcaps, ringgap",
1412  poptrue_nbin,
1413  poptrue_min,
1414  poptrue_max,
1415  "E/E_{gen}");
1416  h1_scl_Et = bookH1withSumw2(iBooker, "et", "ele supercluster transverse energy", pt_nbin, 0., pt_max);
1417  h2_scl_EtVsEta = bookH2(iBooker,
1418  "etVsEta",
1419  "ele supercluster transverse energy vs eta",
1420  eta2D_nbin,
1421  eta_min,
1422  eta_max,
1423  pt_nbin,
1424  0.,
1425  pt_max);
1426  h2_scl_EtVsPhi = bookH2(iBooker,
1427  "etVsPhi",
1428  "ele supercluster transverse energy vs phi",
1429  phi2D_nbin,
1430  phi_min,
1431  phi_max,
1432  pt_nbin,
1433  0.,
1434  pt_max);
1436  iBooker, "etaVsPhi", "ele supercluster eta vs phi", phi2D_nbin, phi_min, phi_max, eta2D_nbin, eta_min, eta_max);
1437  h1_scl_Eta = bookH1withSumw2(iBooker, "eta", "ele supercluster eta", eta_nbin, eta_min, eta_max);
1438  h1_scl_Phi = bookH1withSumw2(iBooker, "phi", "ele supercluster phi", phi_nbin, phi_min, phi_max);
1440  "sigetaeta",
1441  "ele supercluster sigma eta eta",
1442  100,
1443  0.,
1444  0.05,
1445  "#sigma_{#eta #eta}",
1446  "Events",
1447  "ELE_LOGY E1 P");
1449  "sigetaeta_barrel",
1450  "ele supercluster sigma eta eta barrel",
1451  100,
1452  0.,
1453  0.05,
1454  "#sigma_{#eta #eta}",
1455  "Events",
1456  "ELE_LOGY E1 P");
1458  "sigetaeta_endcaps",
1459  "ele supercluster sigma eta eta endcaps",
1460  100,
1461  0.,
1462  0.05,
1463  "#sigma_{#eta #eta}",
1464  "Events",
1465  "ELE_LOGY E1 P");
1467  "sigietaieta",
1468  "ele supercluster sigma ieta ieta",
1469  100,
1470  0.,
1471  0.05,
1472  "#sigma_{i#eta i#eta}",
1473  "Events",
1474  "ELE_LOGY E1 P");
1476  "sigietaieta_barrel",
1477  "ele supercluster sigma ieta ieta, barrel",
1478  100,
1479  0.,
1480  0.05,
1481  "#sigma_{i#eta i#eta}",
1482  "Events",
1483  "ELE_LOGY E1 P");
1485  "sigietaieta_endcaps",
1486  "ele supercluster sigma ieta ieta, endcaps",
1487  100,
1488  0.,
1489  0.05,
1490  "#sigma_{i#eta i#eta}",
1491  "Events",
1492  "ELE_LOGY E1 P");
1494  "SigIEtaIEta_mAOD",
1495  "ele supercluster sigma ieta ieta",
1496  100,
1497  0.,
1498  0.05,
1499  "#sigma_{i#eta i#eta}",
1500  "Events",
1501  "ELE_LOGY E1 P");
1503  "SigIEtaIEta_mAOD_barrel",
1504  "ele supercluster sigma ieta ieta, barrel",
1505  100,
1506  0.,
1507  0.05,
1508  "#sigma_{i#eta i#eta}",
1509  "Events",
1510  "ELE_LOGY E1 P");
1512  "SigIEtaIEta_mAOD_endcaps",
1513  "ele supercluster sigma ieta ieta, endcaps",
1514  100,
1515  0.,
1516  0.05,
1517  "#sigma_{i#eta i#eta}",
1518  "Events",
1519  "ELE_LOGY E1 P");
1521  "full5x5_sigietaieta",
1522  "ele supercluster full5x5 sigma ieta ieta",
1523  100,
1524  0.,
1525  0.05,
1526  "#sigma_{i#eta i#eta}",
1527  "Events",
1528  "ELE_LOGY E1 P");
1530  "full5x5_sigietaieta_Extended",
1531  "ele supercluster full5x5 sigma ieta ieta, 2.5<|eta|<3",
1532  100,
1533  0.,
1534  0.05,
1535  "#sigma_{i#eta i#eta}",
1536  "Events",
1537  "ELE_LOGY E1 P");
1539  "full5x5_sigietaieta_barrel",
1540  "ele supercluster full5x5 sigma ieta ieta, barrel",
1541  100,
1542  0.,
1543  0.05,
1544  "#sigma_{i#eta i#eta}",
1545  "Events",
1546  "ELE_LOGY E1 P");
1548  "full5x5_sigietaieta_endcaps",
1549  "ele supercluster full5x5 sigma ieta ieta, endcaps",
1550  100,
1551  0.,
1552  0.05,
1553  "#sigma_{i#eta i#eta}",
1554  "Events",
1555  "ELE_LOGY E1 P");
1557  iBooker, "E1x5", "ele supercluster energy in 1x5", p_nbin, 0., p_max, "E1x5 (GeV)", "Events", "ELE_LOGY E1 P");
1559  "E1x5_barrel",
1560  "ele supercluster energy in 1x5 barrel",
1561  p_nbin,
1562  0.,
1563  p_max,
1564  "E1x5 (GeV)",
1565  "Events",
1566  "ELE_LOGY E1 P");
1568  "E1x5_endcaps",
1569  "ele supercluster energy in 1x5 endcaps",
1570  p_nbin,
1571  0.,
1572  p_max,
1573  "E1x5 (GeV)",
1574  "Events",
1575  "ELE_LOGY E1 P");
1576  h1_scl_E2x5max = bookH1withSumw2(iBooker,
1577  "E2x5max",
1578  "ele supercluster energy in 2x5 max",
1579  p_nbin,
1580  0.,
1581  p_max,
1582  "E2x5 (GeV)",
1583  "Events",
1584  "ELE_LOGY E1 P");
1586  "E2x5max_barrel",
1587  "ele supercluster energy in 2x5 _max barrel",
1588  p_nbin,
1589  0.,
1590  p_max,
1591  "E2x5 (GeV)",
1592  "Events",
1593  "ELE_LOGY E1 P");
1595  "E2x5max_endcaps",
1596  "ele supercluster energy in 2x5 _max endcaps",
1597  p_nbin,
1598  0.,
1599  p_max,
1600  "E2x5 (GeV)",
1601  "Events",
1602  "ELE_LOGY E1 P");
1604  iBooker, "E5x5", "ele supercluster energy in 5x5", p_nbin, 0., p_max, "E5x5 (GeV)", "Events", "ELE_LOGY E1 P");
1606  "E5x5_barrel",
1607  "ele supercluster energy in 5x5 barrel",
1608  p_nbin,
1609  0.,
1610  p_max,
1611  "E5x5 (GeV)",
1612  "Events",
1613  "ELE_LOGY E1 P");
1615  "E5x5_endcaps",
1616  "ele supercluster energy in 5x5 endcaps",
1617  p_nbin,
1618  0.,
1619  p_max,
1620  "E5x5 (GeV)",
1621  "Events",
1622  "ELE_LOGY E1 P");
1623  h2_scl_EoEtruePfVsEg = bookH2(iBooker,
1624  "EoEtruePfVsEg",
1625  "mean mustache SC/true energy vs final SC/true energy",
1626  75,
1627  -0.1,
1628  1.4,
1629  75,
1630  -0.1,
1631  1.4,
1632  "E_{final SC}/E_{gen}",
1633  "E_{mustache}/E_{gen}");
1635  bookH1withSumw2(iBooker, "bcl_EtotoEtrue", "Total basicclusters energy", 50, 0.2, 1.2, "E/E_{gen}");
1637  iBooker, "bcl_EtotoEtrue_Extended", "Total basicclusters energy, 2.5<|eta|<3", 50, 0.2, 1.2, "E/E_{gen}");
1639  iBooker, "bcl_EtotoEtrue_barrel", "Total basicclusters energy , barrel", 50, 0.2, 1.2, "E/E_{gen}");
1641  iBooker, "bcl_EtotoEtrue_endcaps", "Total basicclusters energy , endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1643  "ESFrac_endcaps",
1644  "Preshower over SC raw energy , endcaps",
1645  100,
1646  0.,
1647  0.8,
1648  "E_{PS} / E^{raw}_{SC}",
1649  "Events",
1650  "ELE_LOGY E1 P");
1651 
1652  // matched electron, gsf tracks
1653  setBookPrefix("h_ele");
1655  "ambiguousTracks",
1656  "ele # ambiguous tracks",
1657  5,
1658  0.,
1659  5.,
1660  "N_{ambiguous tracks}",
1661  "Events",
1662  "ELE_LOGY E1 P");
1664  bookH2(iBooker, "ambiguousTracksVsEta", "ele # ambiguous tracks vs eta", eta2D_nbin, eta_min, eta_max, 5, 0., 5.);
1666  bookH2(iBooker, "ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", phi2D_nbin, phi_min, phi_max, 5, 0., 5.);
1668  bookH2(iBooker, "ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", pt2D_nbin, 0., pt_max, 5, 0., 5.);
1670  bookH1withSumw2(iBooker, "foundHits", "ele track # found hits", fhits_nbin, 0., fhits_max, "N_{hits}");
1672  iBooker, "foundHits_barrel", "ele track # found hits, barrel", fhits_nbin, 0., fhits_max, "N_{hits}");
1674  iBooker, "foundHits_endcaps", "ele track # found hits, endcaps", fhits_nbin, 0., fhits_max, "N_{hits}");
1676  "foundHitsVsEta_Extended",
1677  "ele track # found hits vs eta",
1681  fhits_nbin,
1682  0.,
1683  fhits_max);
1685  "foundHitsVsEta_mAOD",
1686  "ele track # found hits vs eta",
1687  eta2D_nbin,
1688  eta_min,
1689  eta_max,
1690  fhits_nbin,
1691  0.,
1692  fhits_max);
1693  h2_ele_foundHitsVsPhi = bookH2(iBooker,
1694  "foundHitsVsPhi",
1695  "ele track # found hits vs phi",
1696  phi2D_nbin,
1697  phi_min,
1698  phi_max,
1699  fhits_nbin,
1700  0.,
1701  fhits_max);
1703  iBooker, "foundHitsVsPt", "ele track # found hits vs pt", pt2D_nbin, 0., pt_max, fhits_nbin, 0., fhits_max);
1704  h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits", "ele track # lost hits", 5, 0., 5., "N_{lost hits}");
1706  bookH1withSumw2(iBooker, "lostHits_barrel", "ele track # lost hits, barrel", 5, 0., 5., "N_{lost hits}");
1708  bookH1withSumw2(iBooker, "lostHits_endcaps", "ele track # lost hits, endcaps", 5, 0., 5., "N_{lost hits}");
1710  iBooker, "lostHitsVsEta", "ele track # lost hits vs eta", eta2D_nbin, eta_min, eta_max, lhits_nbin, 0., lhits_max);
1712  iBooker, "lostHitsVsPhi", "ele track # lost hits vs eta", phi2D_nbin, phi_min, phi_max, lhits_nbin, 0., lhits_max);
1714  bookH2(iBooker, "lostHitsVsPt", "ele track # lost hits vs eta", pt2D_nbin, 0., pt_max, lhits_nbin, 0., lhits_max);
1715  h1_ele_chi2 =
1716  bookH1withSumw2(iBooker, "chi2", "ele track #chi^{2}", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1718  iBooker, "chi2_barrel", "ele track #chi^{2}, barrel", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1720  iBooker, "chi2_endcaps", "ele track #chi^{2}, endcaps", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1722  bookH2(iBooker, "chi2VsEta", "ele track #chi^{2} vs eta", eta2D_nbin, eta_min, eta_max, 50, 0., 15.);
1724  bookH2(iBooker, "chi2VsPhi", "ele track #chi^{2} vs phi", phi2D_nbin, phi_min, phi_max, 50, 0., 15.);
1725  h2_ele_chi2VsPt = bookH2(iBooker, "chi2VsPt", "ele track #chi^{2} vs pt", pt2D_nbin, 0., pt_max, 50, 0., 15.);
1727  "PinMnPout",
1728  "ele track inner p - outer p, mean of GSF components",
1729  p_nbin,
1730  0.,
1731  200.,
1732  "P_{vertex} - P_{out} (GeV/c)");
1734  "PinMnPout_mode",
1735  "ele track inner p - outer p, mode of GSF components",
1736  p_nbin,
1737  0.,
1738  100.,
1739  "P_{vertex} - P_{out}, mode of GSF components (GeV/c)");
1741  "PinMnPoutVsEta_mode",
1742  "ele track inner p - outer p vs eta, mode of GSF components",
1743  eta2D_nbin,
1744  eta_min,
1745  eta_max,
1746  p2D_nbin,
1747  0.,
1748  100.);
1750  "PinMnPoutVsPhi_mode",
1751  "ele track inner p - outer p vs phi, mode of GSF components",
1752  phi2D_nbin,
1753  phi_min,
1754  phi_max,
1755  p2D_nbin,
1756  0.,
1757  100.);
1759  "PinMnPoutVsPt_mode",
1760  "ele track inner p - outer p vs pt, mode of GSF components",
1761  pt2D_nbin,
1762  0.,
1763  pt_max,
1764  p2D_nbin,
1765  0.,
1766  100.);
1767  h2_ele_PinMnPoutVsE_mode = bookH2(iBooker,
1768  "PinMnPoutVsE_mode",
1769  "ele track inner p - outer p vs E, mode of GSF components",
1770  p2D_nbin,
1771  0.,
1772  200.,
1773  p2D_nbin,
1774  0.,
1775  100.);
1777  "PinMnPoutVsChi2_mode",
1778  "ele track inner p - outer p vs track chi2, mode of GSF components",
1779  50,
1780  0.,
1781  20.,
1782  p2D_nbin,
1783  0.,
1784  100.);
1786  iBooker, "outerP", "ele track outer p, mean of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1788  iBooker, "outerP_mode", "ele track outer p, mode of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1790  bookH2(iBooker, "outerPVsEta_mode", "ele track outer p vs eta mode", eta2D_nbin, eta_min, eta_max, 50, 0., p_max);
1792  iBooker, "outerPt", "ele track outer p_{T}, mean of GSF components", pt_nbin, 0., pt_max, "P_{T out} (GeV/c)");
1794  "outerPt_mode",
1795  "ele track outer p_{T}, mode of GSF components",
1796  pt_nbin,
1797  0.,
1798  pt_max,
1799  "P_{T out} (GeV/c)");
1800  h2_ele_outerPtVsEta_mode = bookH2(iBooker,
1801  "outerPtVsEta_mode",
1802  "ele track outer p_{T} vs eta, mode of GSF components",
1803  eta2D_nbin,
1804  eta_min,
1805  eta_max,
1806  pt2D_nbin,
1807  0.,
1808  pt_max);
1809  h2_ele_outerPtVsPhi_mode = bookH2(iBooker,
1810  "outerPtVsPhi_mode",
1811  "ele track outer p_{T} vs phi, mode of GSF components",
1812  phi2D_nbin,
1813  phi_min,
1814  phi_max,
1815  pt2D_nbin,
1816  0.,
1817  pt_max);
1818  h2_ele_outerPtVsPt_mode = bookH2(iBooker,
1819  "outerPtVsPt_mode",
1820  "ele track outer p_{T} vs pt, mode of GSF components",
1821  pt2D_nbin,
1822  0.,
1823  100.,
1824  pt2D_nbin,
1825  0.,
1826  pt_max);
1827 
1828  // matched electrons, matching
1830  iBooker, "EoP", "ele E/P_{vertex}", eop_nbin, 0., eop_max, "E/P_{vertex}", "Events", "ELE_LOGY E1 P");
1832  "EoP_barrel",
1833  "ele E/P_{vertex} barrel",
1834  eop_nbin,
1835  0.,
1836  eop_max,
1837  "E/P_{vertex}",
1838  "Events",
1839  "ELE_LOGY E1 P");
1841  "EoP_endcaps",
1842  "ele E/P_{vertex} endcaps",
1843  eop_nbin,
1844  0.,
1845  eop_max,
1846  "E/P_{vertex}",
1847  "Events",
1848  "ELE_LOGY E1 P");
1849  h2_ele_EoPVsEta_Extended = bookH2(iBooker,
1850  "EoPVsEta_Extended",
1851  "ele E/P_{vertex} vs eta",
1855  eop2D_nbin,
1856  0.,
1857  eopmaxsht);
1858  h2_ele_EoPVsPhi =
1859  bookH2(iBooker, "EoPVsPhi", "ele E/P_{vertex} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1860  h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE", "ele E/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1861  h1_ele_EseedOP = bookH1withSumw2(iBooker,
1862  "EseedOP",
1863  "ele E_{seed}/P_{vertex}",
1864  eop_nbin,
1865  0.,
1866  eop_max,
1867  "E_{seed}/P_{vertex}",
1868  "Events",
1869  "ELE_LOGY E1 P");
1871  "EseedOP_barrel",
1872  "ele E_{seed}/P_{vertex} barrel",
1873  eop_nbin,
1874  0.,
1875  eop_max,
1876  "E_{seed}/P_{vertex}",
1877  "Events",
1878  "ELE_LOGY E1 P");
1880  "EseedOP_endcaps",
1881  "ele E_{seed}/P_{vertex} endcaps",
1882  eop_nbin,
1883  0.,
1884  eop_max,
1885  "E_{seed}/P_{vertex}",
1886  "Events",
1887  "ELE_LOGY E1 P");
1888  h2_ele_EseedOPVsEta = bookH2(iBooker,
1889  "EseedOPVsEta",
1890  "ele E_{seed}/P_{vertex} vs eta",
1891  eta2D_nbin,
1892  eta_min,
1893  eta_max,
1894  eop2D_nbin,
1895  0.,
1896  eopmaxsht);
1897  h2_ele_EseedOPVsPhi = bookH2(iBooker,
1898  "EseedOPVsPhi",
1899  "ele E_{seed}/P_{vertex} vs phi",
1900  phi2D_nbin,
1901  phi_min,
1902  phi_max,
1903  eop2D_nbin,
1904  0.,
1905  eopmaxsht);
1906  h2_ele_EseedOPVsE = bookH2(iBooker, "EseedOPVsE", "ele E_{seed}/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1908  iBooker, "EoPout", "ele E_{seed}/P_{out}", eop_nbin, 0., eop_max, "E_{seed}/P_{out}", "Events", "ELE_LOGY E1 P");
1910  "EoPout_barrel",
1911  "ele E_{seed}/P_{out} barrel",
1912  eop_nbin,
1913  0.,
1914  eop_max,
1915  "E_{seed}/P_{out}",
1916  "Events",
1917  "ELE_LOGY E1 P");
1919  "EoPout_endcaps",
1920  "ele E_{seed}/P_{out} endcaps",
1921  eop_nbin,
1922  0.,
1923  eop_max,
1924  "E_{seed}/P_{out}",
1925  "Events",
1926  "ELE_LOGY E1 P");
1928  iBooker, "EoPoutVsEta", "ele E_{seed}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1930  iBooker, "EoPoutVsPhi", "ele E_{seed}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1932  bookH2(iBooker, "EoPoutVsE", "ele E_{seed}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1934  iBooker, "EeleOPout", "ele E_{ele}/P_{out}", eop_nbin, 0., eop_max, "E_{ele}/P_{out}", "Events", "ELE_LOGY E1 P");
1936  "EeleOPout_barrel",
1937  "ele E_{ele}/P_{out} barrel",
1938  eop_nbin,
1939  0.,
1940  eop_max,
1941  "E_{ele}/P_{out}",
1942  "Events",
1943  "ELE_LOGY E1 P");
1945  "EeleOPout_endcaps",
1946  "ele E_{ele}/P_{out} endcaps",
1947  eop_nbin,
1948  0.,
1949  eop_max,
1950  "E_{ele}/P_{out}",
1951  "Events",
1952  "ELE_LOGY E1 P");
1954  iBooker, "EeleOPoutVsEta", "ele E_{ele}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1956  iBooker, "EeleOPoutVsPhi", "ele E_{ele}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1958  bookH2(iBooker, "EeleOPoutVsE", "ele E_{ele}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1960  "dEtaSc_propVtx",
1961  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1963  detamatch_min,
1964  detamatch_max,
1965  "#eta_{sc} - #eta_{tr}",
1966  "Events",
1967  "ELE_LOGY E1 P");
1969  "dEtaSc_propVtx_Extended",
1970  "ele #eta_{sc} - #eta_{tr}, prop from vertex, 2.5<|eta|<3",
1972  detamatch_min,
1973  detamatch_max,
1974  "#eta_{sc} - #eta_{tr}",
1975  "Events",
1976  "ELE_LOGY E1 P");
1978  "dEtaSc_propVtx_barrel",
1979  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
1981  detamatch_min,
1982  detamatch_max,
1983  "#eta_{sc} - #eta_{tr}",
1984  "Events",
1985  "ELE_LOGY E1 P");
1987  "dEtaSc_propVtx_endcaps",
1988  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
1990  detamatch_min,
1991  detamatch_max,
1992  "#eta_{sc} - #eta_{tr}",
1993  "Events",
1994  "ELE_LOGY E1 P");
1996  "dEtaSc_propVtx_mAOD",
1997  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1999  detamatch_min,
2000  detamatch_max,
2001  "#eta_{sc} - #eta_{tr}",
2002  "Events",
2003  "ELE_LOGY E1 P");
2005  "dEtaSc_propVtx_mAOD_barrel",
2006  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
2008  detamatch_min,
2009  detamatch_max,
2010  "#eta_{sc} - #eta_{tr}",
2011  "Events",
2012  "ELE_LOGY E1 P");
2014  "dEtaSc_propVtx_mAOD_endcaps",
2015  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
2017  detamatch_min,
2018  detamatch_max,
2019  "#eta_{sc} - #eta_{tr}",
2020  "Events",
2021  "ELE_LOGY E1 P");
2023  "dEtaScVsEta_propVtx",
2024  "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
2025  eta2D_nbin,
2026  eta_min,
2027  eta_max,
2029  detamatch_min,
2030  detamatch_max);
2032  "dEtaScVsPhi_propVtx",
2033  "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
2034  phi2D_nbin,
2035  phi_min,
2036  phi_max,
2038  detamatch_min,
2039  detamatch_max);
2041  "dEtaScVsPt_propVtx",
2042  "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
2043  pt2D_nbin,
2044  0.,
2045  pt_max,
2047  detamatch_min,
2048  detamatch_max);
2050  "dPhiSc_propVtx",
2051  "ele #phi_{sc} - #phi_{tr}, prop from vertex",
2053  dphimatch_min,
2054  dphimatch_max,
2055  "#phi_{sc} - #phi_{tr} (rad)",
2056  "Events",
2057  "ELE_LOGY E1 P");
2059  "dPhiSc_propVtx_Extended",
2060  "ele #phi_{sc} - #phi_{tr}, prop from vertex, 2.5<|eta|<3",
2062  dphimatch_min,
2063  dphimatch_max,
2064  "#phi_{sc} - #phi_{tr} (rad)",
2065  "Events",
2066  "ELE_LOGY E1 P");
2068  "dPhiSc_propVtx_barrel",
2069  "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
2071  dphimatch_min,
2072  dphimatch_max,
2073  "#phi_{sc} - #phi_{tr} (rad)",
2074  "Events",
2075  "ELE_LOGY E1 P");
2077  "dPhiSc_propVtx_endcaps",
2078  "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
2080  dphimatch_min,
2081  dphimatch_max,
2082  "#phi_{sc} - #phi_{tr} (rad)",
2083  "Events",
2084  "ELE_LOGY E1 P");
2086  "dPhiScVsEta_propVtx",
2087  "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
2088  eta2D_nbin,
2089  eta_min,
2090  eta_max,
2092  dphimatch_min,
2093  dphimatch_max);
2095  "dPhiScVsPhi_propVtx",
2096  "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
2097  phi2D_nbin,
2098  phi_min,
2099  phi_max,
2101  dphimatch_min,
2102  dphimatch_max);
2104  "dPhiScVsPt_propVtx",
2105  "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
2106  pt2D_nbin,
2107  0.,
2108  pt_max,
2110  dphimatch_min,
2111  dphimatch_max);
2113  "dEtaCl_propOut",
2114  "ele #eta_{cl} - #eta_{tr}, prop from outermost",
2116  detamatch_min,
2117  detamatch_max,
2118  "#eta_{seedcl} - #eta_{tr}",
2119  "Events",
2120  "ELE_LOGY E1 P");
2122  "dEtaCl_propOut_barrel",
2123  "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
2125  detamatch_min,
2126  detamatch_max,
2127  "#eta_{seedcl} - #eta_{tr}",
2128  "Events",
2129  "ELE_LOGY E1 P");
2131  "dEtaCl_propOut_endcaps",
2132  "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
2134  detamatch_min,
2135  detamatch_max,
2136  "#eta_{seedcl} - #eta_{tr}",
2137  "Events",
2138  "ELE_LOGY E1 P");
2140  "dEtaClVsEta_propOut",
2141  "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
2142  eta2D_nbin,
2143  eta_min,
2144  eta_max,
2146  detamatch_min,
2147  detamatch_max);
2149  "dEtaClVsPhi_propOut",
2150  "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
2151  phi2D_nbin,
2152  phi_min,
2153  phi_max,
2155  detamatch_min,
2156  detamatch_max);
2158  "dEtaScVsPt_propOut",
2159  "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
2160  pt2D_nbin,
2161  0.,
2162  pt_max,
2164  detamatch_min,
2165  detamatch_max);
2167  "dPhiCl_propOut",
2168  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2170  dphimatch_min,
2171  dphimatch_max,
2172  "#phi_{seedcl} - #phi_{tr} (rad)",
2173  "Events",
2174  "ELE_LOGY E1 P");
2176  "dPhiCl_propOut_barrel",
2177  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2179  dphimatch_min,
2180  dphimatch_max,
2181  "#phi_{seedcl} - #phi_{tr} (rad)",
2182  "Events",
2183  "ELE_LOGY E1 P");
2185  "dPhiCl_propOut_endcaps",
2186  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2188  dphimatch_min,
2189  dphimatch_max,
2190  "#phi_{seedcl} - #phi_{tr} (rad)",
2191  "Events",
2192  "ELE_LOGY E1 P");
2194  "dPhiCl_propOut_mAOD",
2195  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2197  dphimatch_min,
2198  dphimatch_max,
2199  "#phi_{seedcl} - #phi_{tr} (rad)",
2200  "Events",
2201  "ELE_LOGY E1 P");
2203  "dPhiCl_propOut_mAOD_barrel",
2204  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2206  dphimatch_min,
2207  dphimatch_max,
2208  "#phi_{seedcl} - #phi_{tr} (rad)",
2209  "Events",
2210  "ELE_LOGY E1 P");
2212  "dPhiCl_propOut_mAOD_endcaps",
2213  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2215  dphimatch_min,
2216  dphimatch_max,
2217  "#phi_{seedcl} - #phi_{tr} (rad)",
2218  "Events",
2219  "ELE_LOGY E1 P");
2221  "dPhiClVsEta_propOut",
2222  "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
2223  eta2D_nbin,
2224  eta_min,
2225  eta_max,
2227  dphimatch_min,
2228  dphimatch_max);
2230  "dPhiClVsPhi_propOut",
2231  "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
2232  phi2D_nbin,
2233  phi_min,
2234  phi_max,
2236  dphimatch_min,
2237  dphimatch_max);
2239  "dPhiSClsPt_propOut",
2240  "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
2241  pt2D_nbin,
2242  0.,
2243  pt_max,
2245  dphimatch_min,
2246  dphimatch_max);
2248  "dEtaEleCl_propOut",
2249  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
2251  detamatch_min,
2252  detamatch_max,
2253  "#eta_{elecl} - #eta_{tr}",
2254  "Events",
2255  "ELE_LOGY E1 P");
2257  "dEtaEleCl_propOut_barrel",
2258  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
2260  detamatch_min,
2261  detamatch_max,
2262  "#eta_{elecl} - #eta_{tr}",
2263  "Events",
2264  "ELE_LOGY E1 P");
2266  "dEtaEleCl_propOut_endcaps",
2267  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
2269  detamatch_min,
2270  detamatch_max,
2271  "#eta_{elecl} - #eta_{tr}",
2272  "Events",
2273  "ELE_LOGY E1 P");
2275  "dEtaEleClVsEta_propOut",
2276  "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
2277  eta2D_nbin,
2278  eta_min,
2279  eta_max,
2281  detamatch_min,
2282  detamatch_max);
2284  "dEtaEleClVsPhi_propOut",
2285  "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
2286  phi2D_nbin,
2287  phi_min,
2288  phi_max,
2290  detamatch_min,
2291  detamatch_max);
2293  "dEtaScVsPt_propOut",
2294  "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
2295  pt2D_nbin,
2296  0.,
2297  pt_max,
2299  detamatch_min,
2300  detamatch_max);
2302  "dPhiEleCl_propOut",
2303  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
2305  dphimatch_min,
2306  dphimatch_max,
2307  "#phi_{elecl} - #phi_{tr} (rad)",
2308  "Events",
2309  "ELE_LOGY E1 P");
2311  "dPhiEleCl_propOut_barrel",
2312  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
2314  dphimatch_min,
2315  dphimatch_max,
2316  "#phi_{elecl} - #phi_{tr} (rad)",
2317  "Events",
2318  "ELE_LOGY E1 P");
2320  "dPhiEleCl_propOut_endcaps",
2321  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
2323  dphimatch_min,
2324  dphimatch_max,
2325  "#phi_{elecl} - #phi_{tr} (rad)",
2326  "Events",
2327  "ELE_LOGY E1 P");
2329  "dPhiEleClVsEta_propOut",
2330  "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
2331  eta2D_nbin,
2332  eta_min,
2333  eta_max,
2335  dphimatch_min,
2336  dphimatch_max);
2338  "dPhiEleClVsPhi_propOut",
2339  "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
2340  phi2D_nbin,
2341  phi_min,
2342  phi_max,
2344  dphimatch_min,
2345  dphimatch_max);
2347  "dPhiSEleClsPt_propOut",
2348  "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
2349  pt2D_nbin,
2350  0.,
2351  pt_max,
2353  dphimatch_min,
2354  dphimatch_max);
2356  iBooker, "HoE", "ele hadronic energy / em energy", hoe_nbin, hoe_min, hoe_max, "H/E", "Events", "ELE_LOGY E1 P");
2358  "HoE_Extended",
2359  "ele hadronic energy / em energy, 2.5<|eta|<3",
2360  hoe_nbin,
2361  hoe_min,
2362  hoe_max,
2363  "H/E",
2364  "Events",
2365  "ELE_LOGY E1 P");
2367  "HoE_barrel",
2368  "ele hadronic energy / em energy, barrel",
2369  hoe_nbin,
2370  hoe_min,
2371  hoe_max,
2372  "H/E",
2373  "Events",
2374  "ELE_LOGY E1 P");
2376  "HoE_endcaps",
2377  "ele hadronic energy / em energy, endcaps",
2378  hoe_nbin,
2379  hoe_min,
2380  hoe_max,
2381  "H/E",
2382  "Events",
2383  "ELE_LOGY E1 P");
2384  h1_ele_HoE_mAOD = bookH1withSumw2(iBooker,
2385  "HoE_mAOD",
2386  "ele hadronic energy / em energy",
2387  hoe_nbin,
2388  hoe_min,
2389  hoe_max,
2390  "H/E",
2391  "Events",
2392  "ELE_LOGY E1 P");
2394  "HoE_mAOD_barrel",
2395  "ele hadronic energy / em energy, barrel",
2396  hoe_nbin,
2397  hoe_min,
2398  hoe_max,
2399  "H/E",
2400  "Events",
2401  "ELE_LOGY E1 P");
2403  "HoE_mAOD_endcaps",
2404  "ele hadronic energy / em energy, endcaps",
2405  hoe_nbin,
2406  hoe_min,
2407  hoe_max,
2408  "H/E",
2409  "Events",
2410  "ELE_LOGY E1 P");
2411  h1_ele_HoE_bc = bookH1withSumw2(iBooker,
2412  "HoE_bc",
2413  "ele hadronic energy / em energy behind cluster",
2414  hoe_nbin,
2415  hoe_min,
2416  hoe_max,
2417  "H/E",
2418  "Events",
2419  "ELE_LOGY E1 P");
2421  "HoE_bc_barrel",
2422  "ele hadronic energy / em energy, behind cluster barrel",
2423  hoe_nbin,
2424  hoe_min,
2425  hoe_max,
2426  "H/E",
2427  "Events",
2428  "ELE_LOGY E1 P");
2430  "HoE_bc_endcaps",
2431  "ele hadronic energy / em energy, behind cluster, endcaps",
2432  hoe_nbin,
2433  hoe_min,
2434  hoe_max,
2435  "H/E",
2436  "Events",
2437  "ELE_LOGY E1 P");
2439  "hcalDepth1OverEcalBc",
2440  "hcalDepth1OverEcalBc",
2441  hoe_nbin,
2442  hoe_min,
2443  hoe_max,
2444  "H/E",
2445  "Events",
2446  "ELE_LOGY E1 P");
2448  "hcalDepth1OverEcalBc_barrel",
2449  "hcalDepth1OverEcalBc_barrel",
2450  hoe_nbin,
2451  hoe_min,
2452  hoe_max,
2453  "H/E",
2454  "Events",
2455  "ELE_LOGY E1 P");
2457  "hcalDepth1OverEcalBc_endcaps",
2458  "hcalDepth1OverEcalBc_endcaps",
2459  hoe_nbin,
2460  hoe_min,
2461  hoe_max,
2462  "H/E",
2463  "Events",
2464  "ELE_LOGY E1 P");
2466  "hcalDepth2OverEcalBc",
2467  "hcalDepth2OverEcalBc",
2468  hoe_nbin,
2469  hoe_min,
2470  hoe_max,
2471  "H/E",
2472  "Events",
2473  "ELE_LOGY E1 P");
2475  "hcalDepth2OverEcalBc_barrel",
2476  "hcalDepth2OverEcalBc_barrel",
2477  hoe_nbin,
2478  hoe_min,
2479  hoe_max,
2480  "H/E",
2481  "Events",
2482  "ELE_LOGY E1 P");
2484  "hcalDepth2OverEcalBc_endcaps",
2485  "hcalDepth2OverEcalBc_endcaps",
2486  hoe_nbin,
2487  hoe_min,
2488  hoe_max,
2489  "H/E",
2490  "Events",
2491  "ELE_LOGY E1 P");
2492 
2494  "HoE_fiducial",
2495  "ele hadronic energy / em energy, fiducial region",
2496  hoe_nbin,
2497  hoe_min,
2498  hoe_max,
2499  "H/E",
2500  "Events",
2501  "ELE_LOGY E1 P");
2502  h2_ele_HoEVsEta = bookH2(iBooker,
2503  "HoEVsEta",
2504  "ele hadronic energy / em energy vs eta",
2505  eta_nbin,
2506  eta_min,
2507  eta_max,
2508  hoe_nbin,
2509  hoe_min,
2510  hoe_max);
2511  h2_ele_HoEVsPhi = bookH2(iBooker,
2512  "HoEVsPhi",
2513  "ele hadronic energy / em energy vs phi",
2514  phi2D_nbin,
2515  phi_min,
2516  phi_max,
2517  hoe_nbin,
2518  hoe_min,
2519  hoe_max);
2520  h2_ele_HoEVsE =
2521  bookH2(iBooker, "HoEVsE", "ele hadronic energy / em energy vs E", p_nbin, 0., 300., hoe_nbin, hoe_min, hoe_max);
2522 
2523  // seeds
2525  bookH1withSumw2(iBooker, "seedSubdet2", "ele seed subdet 2nd layer", 11, -0.5, 10.5, "2nd hit subdet Id");
2526  h1_ele_seed_mask = bookH1withSumw2(iBooker, "seedMask", "ele seed hits mask", 13, -0.5, 12.5);
2528  bookH1withSumw2(iBooker, "seedMask_Bpix", "ele seed hits mask when subdet2 is bpix", 13, -0.5, 12.5);
2530  bookH1withSumw2(iBooker, "seedMask_Fpix", "ele seed hits mask when subdet2 is fpix", 13, -0.5, 12.5);
2532  bookH1withSumw2(iBooker, "seedMask_Tec", "ele seed hits mask when subdet2 is tec", 13, -0.5, 12.5);
2534  iBooker, "seedDphi2", "ele seed dphi 2nd layer", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2536  iBooker, "seedDphi2_VsEta", "ele seed dphi 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.003, +0.003);
2538  bookH2(iBooker, "seedDphi2_VsPt", "ele seed dphi 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2540  iBooker, "seedDphi2Pos", "ele seed dphi 2nd layer positron", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2542  "seedDphi2Pos_VsEta",
2543  "ele seed dphi 2nd layer positron vs eta",
2544  eta2D_nbin,
2545  eta_min,
2546  eta_max,
2547  50,
2548  -0.003,
2549  +0.003);
2551  iBooker, "seedDphi2Pos_VsPt", "ele seed dphi 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2553  iBooker, "seedDrz2", "ele seed dr (dz) 2nd layer", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2555  iBooker, "seedDrz2_VsEta", "ele seed dr/dz 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.03, +0.03);
2557  bookH2(iBooker, "seedDrz2_VsPt", "ele seed dr/dz 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2559  iBooker, "seedDrz2Pos", "ele seed dr (dz) 2nd layer positron", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2560  h2_ele_seed_drz2posVsEta = bookH2(iBooker,
2561  "seedDrz2Pos_VsEta",
2562  "ele seed dr/dz 2nd layer positron vs eta",
2563  eta2D_nbin,
2564  eta_min,
2565  eta_max,
2566  50,
2567  -0.03,
2568  +0.03);
2570  iBooker, "seedDrz2Pos_VsPt", "ele seed dr/dz 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2571 
2572  // classes
2573  h1_ele_classes = bookH1withSumw2(iBooker, "classes", "ele classes", 20, 0.0, 20., "class Id");
2574  h1_ele_eta = bookH1withSumw2(iBooker, "eta", "ele electron eta", eta_nbin / 2, 0.0, eta_max);
2575  h1_ele_eta_golden = bookH1withSumw2(iBooker, "eta_golden", "ele electron eta golden", eta_nbin / 2, 0.0, eta_max);
2576  h1_ele_eta_bbrem = bookH1withSumw2(iBooker, "eta_bbrem", "ele electron eta bbrem", eta_nbin / 2, 0.0, eta_max);
2577  h1_ele_eta_shower = bookH1withSumw2(iBooker, "eta_shower", "ele electron eta showering", eta_nbin / 2, 0.0, eta_max);
2579  "PinVsPoutGolden_mode",
2580  "ele track inner p vs outer p vs eta, golden, mode of GSF components",
2581  p2D_nbin,
2582  0.,
2583  p_max,
2584  50,
2585  0.,
2586  p_max);
2588  "PinVsPoutShowering_mode",
2589  "ele track inner p vs outer p vs eta, showering, mode of GSF components",
2590  p2D_nbin,
2591  0.,
2592  p_max,
2593  50,
2594  0.,
2595  p_max);
2597  "PinVsPoutGolden_mean",
2598  "ele track inner p vs outer p vs eta, golden, mean of GSF components",
2599  p2D_nbin,
2600  0.,
2601  p_max,
2602  50,
2603  0.,
2604  p_max);
2606  "PinVsPoutShowering_mean",
2607  "ele track inner p vs outer p vs eta, showering, mean of GSF components",
2608  p2D_nbin,
2609  0.,
2610  p_max,
2611  50,
2612  0.,
2613  p_max);
2615  "PtinVsPtoutGolden_mode",
2616  "ele track inner pt vs outer pt vs eta, golden, mode of GSF components",
2617  pt2D_nbin,
2618  0.,
2619  pt_max,
2620  50,
2621  0.,
2622  pt_max);
2624  "PtinVsPtoutShowering_mode",
2625  "ele track inner pt vs outer pt vs eta, showering, mode of GSF components",
2626  pt2D_nbin,
2627  0.,
2628  pt_max,
2629  50,
2630  0.,
2631  pt_max);
2633  "PtinVsPtoutGolden_mean",
2634  "ele track inner pt vs outer pt vs eta, golden, mean of GSF components",
2635  pt2D_nbin,
2636  0.,
2637  pt_max,
2638  50,
2639  0.,
2640  pt_max);
2642  "PtinVsPtoutShowering_mean",
2643  "ele track inner pt vs outer pt vs eta, showering, mean of GSF components",
2644  pt2D_nbin,
2645  0.,
2646  pt_max,
2647  50,
2648  0.,
2649  pt_max);
2650  setBookPrefix("h_scl");
2652  "EoEtrue_golden_barrel",
2653  "ele supercluster energy / gen energy, golden, barrel",
2654  poptrue_nbin,
2655  poptrue_min,
2656  poptrue_max);
2658  "EoEtrue_golden_endcaps",
2659  "ele supercluster energy / gen energy, golden, endcaps",
2660  poptrue_nbin,
2661  poptrue_min,
2662  poptrue_max);
2664  "EoEtrue_showering_barrel",
2665  "ele supercluster energy / gen energy, showering, barrel",
2666  poptrue_nbin,
2667  poptrue_min,
2668  poptrue_max);
2670  "EoEtrue_showering_endcaps",
2671  "ele supercluster energy / gen energy, showering, endcaps",
2672  poptrue_nbin,
2673  poptrue_min,
2674  poptrue_max);
2675 
2676  // isolation
2677  setBookPrefix("h_ele");
2679  "tkSumPt_dr03",
2680  "tk isolation sum, dR=0.3",
2681  100,
2682  0.0,
2683  20.,
2684  "TkIsoSum, cone 0.3 (GeV/c)",
2685  "Events",
2686  "ELE_LOGY E1 P");
2688  "tkSumPt_dr03_barrel",
2689  "tk isolation sum, dR=0.3, barrel",
2690  100,
2691  0.0,
2692  20.,
2693  "TkIsoSum, cone 0.3 (GeV/c)",
2694  "Events",
2695  "ELE_LOGY E1 P");
2697  "tkSumPt_dr03_endcaps",
2698  "tk isolation sum, dR=0.3, endcaps",
2699  100,
2700  0.0,
2701  20.,
2702  "TkIsoSum, cone 0.3 (GeV/c)",
2703  "Events",
2704  "ELE_LOGY E1 P");
2706  "ecalRecHitSumEt_dr03",
2707  "ecal isolation sum, dR=0.3",
2708  100,
2709  0.0,
2710  20.,
2711  "EcalIsoSum, cone 0.3 (GeV)",
2712  "Events",
2713  "ELE_LOGY E1 P");
2715  "ecalRecHitSumEt_dr03_barrel",
2716  "ecal isolation sum, dR=0.3, barrel",
2717  100,
2718  0.0,
2719  20.,
2720  "EcalIsoSum, cone 0.3 (GeV)",
2721  "Events",
2722  "ELE_LOGY E1 P");
2724  "ecalRecHitSumEt_dr03_endcaps",
2725  "ecal isolation sum, dR=0.3, endcaps",
2726  100,
2727  0.0,
2728  20.,
2729  "EcalIsoSum, cone 0.3 (GeV)",
2730  "Events",
2731  "ELE_LOGY E1 P");
2733  "hcalTowerSumEt_dr03_depth1",
2734  "hcal depth1 isolation sum, dR=0.3",
2735  100,
2736  0.0,
2737  20.,
2738  "Hcal1IsoSum, cone 0.3 (GeV)",
2739  "Events",
2740  "ELE_LOGY E1 P");
2742  "hcalTowerSumEt_dr03_depth1_barrel",
2743  "hcal depth1 isolation sum, dR=0.3, barrel",
2744  100,
2745  0.0,
2746  20.,
2747  "Hcal1IsoSum, cone 0.3 (GeV)",
2748  "Events",
2749  "ELE_LOGY E1 P");
2751  "hcalTowerSumEt_dr03_depth1_endcaps",
2752  "hcal depth1 isolation sum, dR=0.3, endcaps",
2753  100,
2754  0.0,
2755  20.,
2756  "Hcal1IsoSum, cone 0.3 (GeV)",
2757  "Events",
2758  "ELE_LOGY E1 P");
2760  "hcalTowerSumEt_dr03_depth2",
2761  "hcal depth2 isolation sum, dR=0.3",
2762  100,
2763  0.0,
2764  20.,
2765  "Hcal2IsoSum, cone 0.3 (GeV)",
2766  "Events",
2767  "ELE_LOGY E1 P");
2769  "hcalTowerSumEt_dr03_depth2_barrel",
2770  "hcal depth2 isolation sum, dR=0.3",
2771  100,
2772  0.0,
2773  20.,
2774  "Hcal2IsoSum, cone 0.3 (GeV)",
2775  "Events",
2776  "ELE_LOGY E1 P");
2778  "hcalTowerSumEt_dr03_depth2_endcaps",
2779  "hcal depth2 isolation sum, dR=0.3",
2780  100,
2781  0.0,
2782  20.,
2783  "Hcal2IsoSum, cone 0.3 (GeV)",
2784  "Events",
2785  "ELE_LOGY E1 P");
2786 
2787  // newHCAL
2788  // isolation new hcal
2790  "hcalTowerSumEtBc_dr03_depth1",
2791  "hcal depth1 isolation sum behind cluster, dR=0.3",
2792  100,
2793  0.0,
2794  20.,
2795  "Hcal1IsoSum, cone 0.3 (GeV)",
2796  "Events",
2797  "ELE_LOGY E1 P");
2799  bookH1withSumw2(iBooker,
2800  "hcalTowerSumEtBc_dr03_depth1_barrel",
2801  "hcal depth1 isolation sum behind cluster, dR=0.3, barrel",
2802  100,
2803  0.0,
2804  20.,
2805  "Hcal1IsoSum, cone 0.3 (GeV)",
2806  "Events",
2807  "ELE_LOGY E1 P");
2809  bookH1withSumw2(iBooker,
2810  "hcalTowerSumEtBc_dr03_depth1_endcaps",
2811  "hcal depth1 isolation sum behind cluster, dR=0.3, endcaps",
2812  100,
2813  0.0,
2814  20.,
2815  "Hcal1IsoSum, cone 0.3 (GeV)",
2816  "Events",
2817  "ELE_LOGY E1 P");
2818 
2820  "hcalTowerSumEtBc_dr03_depth2",
2821  "hcal depth2 isolation sum behind cluster, dR=0.3",
2822  100,
2823  0.0,
2824  20.,
2825  "Hcal1IsoSum, cone 0.3 (GeV)",
2826  "Events",
2827  "ELE_LOGY E1 P");
2829  bookH1withSumw2(iBooker,
2830  "hcalTowerSumEtBc_dr03_depth2_barrel",
2831  "hcal depth2 isolation sum behind cluster, dR=0.3, barrel",
2832  100,
2833  0.0,
2834  20.,
2835  "Hcal1IsoSum, cone 0.3 (GeV)",
2836  "Events",
2837  "ELE_LOGY E1 P");
2839  bookH1withSumw2(iBooker,
2840  "hcalTowerSumEtBc_dr03_depth2_endcaps",
2841  "hcal depth2 isolation sum behind cluster, dR=0.3, endcaps",
2842  100,
2843  0.0,
2844  20.,
2845  "Hcal1IsoSum, cone 0.3 (GeV)",
2846  "Events",
2847  "ELE_LOGY E1 P");
2848 
2850  "ecalPFClusterIso",
2851  "ecal PF Cluster Iso",
2852  100,
2853  0.0,
2854  100.,
2855  "hcal PF Cluser Iso",
2856  "Events",
2857  "ELE_LOGY E1 P");
2859  "ecalPFClusterIso_barrel",
2860  "ecal PF Cluster Iso barrel",
2861  100,
2862  0.0,
2863  100.,
2864  "hcal PF Cluser Iso",
2865  "Events",
2866  "ELE_LOGY E1 P");
2868  "ecalPFClusterIso_endcaps",
2869  "ecal PF Cluster Iso endcaps",
2870  100,
2871  0.0,
2872  100.,
2873  "hcal PF Cluser Iso",
2874  "Events",
2875  "ELE_LOGY E1 P");
2877  "hcalPFClusterIso",
2878  "hcal PF Cluster Iso",
2879  100,
2880  0.0,
2881  100.,
2882  "hcal PF Cluser Iso",
2883  "Events",
2884  "ELE_LOGY E1 P");
2886  "hcalPFClusterIso_barrel",
2887  "hcal PF Cluster Iso barrel",
2888  100,
2889  0.0,
2890  100.,
2891  "hcal PF Cluser Iso",
2892  "Events",
2893  "ELE_LOGY E1 P");
2895  "hcalPFClusterIso_endcaps",
2896  "hcal PF Cluster Iso endcaps",
2897  100,
2898  0.0,
2899  100.,
2900  "hcal PF Cluser Iso",
2901  "Events",
2902  "ELE_LOGY E1 P");
2904  "ecalPFClusterIso_Extended",
2905  "ecal PF Cluster Iso Extended",
2906  100,
2907  0.0,
2908  100.,
2909  "hcal PF Cluser Iso Extended, 2.5<|eta|<3",
2910  "Events",
2911  "ELE_LOGY E1 P");
2913  "hcalPFClusterIso_Extended",
2914  "hcal PF Cluster Iso Extended",
2915  100,
2916  0.0,
2917  100.,
2918  "hcal PF Cluser Iso Extended, 2.5<|eta|<3",
2919  "Events",
2920  "ELE_LOGY E1 P");
2921 
2922  // fbrem
2924  iBooker, "fbrem", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2926  "fbrem_Extended",
2927  "ele brem fraction, mode of GSF components, 2.5<|eta|<3",
2928  100,
2929  0.,
2930  1.,
2931  "P_{in} - P_{out} / P_{in}");
2933  "fbrem_barrel",
2934  "ele brem fraction for barrel, mode of GSF components",
2935  100,
2936  0.,
2937  1.,
2938  "P_{in} - P_{out} / P_{in}");
2940  "fbrem_endcaps",
2941  "ele brem franction for endcaps, mode of GSF components",
2942  100,
2943  0.,
2944  1.,
2945  "P_{in} - P_{out} / P_{in}");
2947  iBooker, "fbrem_mAOD", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2949  "fbrem_mAOD_barrel",
2950  "ele brem fraction for barrel, mode of GSF components",
2951  100,
2952  0.,
2953  1.,
2954  "P_{in} - P_{out} / P_{in}");
2956  "fbrem_mAOD_endcaps",
2957  "ele brem franction for endcaps, mode of GSF components",
2958  100,
2959  0.,
2960  1.,
2961  "P_{in} - P_{out} / P_{in}");
2963  bookH1withSumw2(iBooker, "superclusterfbrem", "supercluster brem fraction", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2965  iBooker, "superclusterfbrem_barrel", "supercluster brem fraction for barrel", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2967  "superclusterfbrem_endcaps",
2968  "supercluster brem franction for endcaps",
2969  100,
2970  0.,
2971  1.,
2972  "1 - E_{ele} / E_{SC}");
2973  p1_ele_fbremVsEta_mode = bookP1(iBooker,
2974  "fbremvsEtamode",
2975  "mean ele brem fraction vs eta, mode of GSF components",
2976  eta2D_nbin,
2977  eta_min,
2978  eta_max,
2979  0.,
2980  1.,
2981  "#eta",
2982  "<P_{in} - P_{out} / P_{in}>");
2983  p1_ele_fbremVsEta_mean = bookP1(iBooker,
2984  "fbremvsEtamean",
2985  "mean ele brem fraction vs eta, mean of GSF components",
2986  eta2D_nbin,
2987  eta_min,
2988  eta_max,
2989  0.,
2990  1.,
2991  "#eta",
2992  "<P_{in} - P_{out} / P_{in}>");
2993  h1_ele_chargeInfo = bookH1withSumw2(iBooker, "chargeInfo", "chargeInfo", 5, -2., 3.);
2994 
2995  // e/g et pflow electrons
2996  h1_ele_mva = bookH1withSumw2(iBooker, "mva", "ele identification mva", 100, -1., 1.);
2997  h1_ele_mva_barrel = bookH1withSumw2(iBooker, "mva_barrel", "ele identification mva barrel", 100, -1., 1.);
2998  h1_ele_mva_endcaps = bookH1withSumw2(iBooker, "mva_endcaps", "ele identification mva endcaps", 100, -1., 1.);
2999  h1_ele_mva_isolated = bookH1withSumw2(iBooker, "mva_isolated", "ele identification mva isolated", 100, -1., 1.);
3001  bookH1withSumw2(iBooker, "mva_isolated_barrel", "ele identification mva isolated barrel", 100, -1., 1.);
3003  bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps", 100, -1., 1.);
3004  h1_ele_provenance = bookH1withSumw2(iBooker, "provenance", "ele provenance", 5, -2., 3.);
3005  h1_ele_provenance_Extended = bookH1withSumw2(iBooker, "provenance_Extended", "ele provenance Extended", 5, -2., 3.);
3006  h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel", "ele provenance barrel", 5, -2., 3.);
3007  h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps", "ele provenance endcaps", 5, -2., 3.);
3008 
3009  // pflow isolation variables
3011  iBooker, "chargedHadronIso", "chargedHadronIso", 100, 0.0, 20., "chargedHadronIso", "Events", "ELE_LOGY E1 P");
3013  "chargedHadronIso_barrel",
3014  "chargedHadronIso for barrel",
3015  100,
3016  0.0,
3017  20.,
3018  "chargedHadronIso_barrel",
3019  "Events",
3020  "ELE_LOGY E1 P");
3022  "chargedHadronIso_endcaps",
3023  "chargedHadronIso for endcaps",
3024  100,
3025  0.0,
3026  20.,
3027  "chargedHadronIso_endcaps",
3028  "Events",
3029  "ELE_LOGY E1 P");
3031  iBooker, "neutralHadronIso", "neutralHadronIso", 21, 0.0, 20., "neutralHadronIso", "Events", "ELE_LOGY E1 P");
3033  "neutralHadronIso_barrel",
3034  "neutralHadronIso for barrel",
3035  21,
3036  0.0,
3037  20.,
3038  "neutralHadronIso_barrel",
3039  "Events",
3040  "ELE_LOGY E1 P");
3042  "neutralHadronIso_endcaps",
3043  "neutralHadronIso for endcaps",
3044  21,
3045  0.0,
3046  20.,
3047  "neutralHadronIso_endcaps",
3048  "Events",
3049  "ELE_LOGY E1 P");
3051  bookH1withSumw2(iBooker, "photonIso", "photonIso", 100, 0.0, 20., "photonIso", "Events", "ELE_LOGY E1 P");
3053  iBooker, "photonIso_barrel", "photonIso for barrel", 100, 0.0, 20., "photonIso_barrel", "Events", "ELE_LOGY E1 P");
3055  "photonIso_endcaps",
3056  "photonIso for endcaps",
3057  100,
3058  0.0,
3059  20.,
3060  "photonIso_endcaps",
3061  "Events",
3062  "ELE_LOGY E1 P");
3063  // -- pflow over pT
3065  "chargedHadronRelativeIso",
3066  "chargedHadronRelativeIso",
3067  100,
3068  0.0,
3069  2.,
3070  "chargedHadronRelativeIso",
3071  "Events",
3072  "ELE_LOGY E1 P");
3074  "chargedHadronRelativeIso_Extended",
3075  "chargedHadronRelativeIso_Extended",
3076  100,
3077  0.0,
3078  2.,
3079  "chargedHadronRelativeIso Extended, 2.5<|eta|<3",
3080  "Events",
3081  "ELE_LOGY E1 P");
3083  "chargedHadronRelativeIso_barrel",
3084  "chargedHadronRelativeIso for barrel",
3085  100,
3086  0.0,
3087  2.,
3088  "chargedHadronRelativeIso_barrel",
3089  "Events",
3090  "ELE_LOGY E1 P");
3092  "chargedHadronRelativeIso_endcaps",
3093  "chargedHadronRelativeIso for endcaps",
3094  100,
3095  0.0,
3096  2.,
3097  "chargedHadronRelativeIso_endcaps",
3098  "Events",
3099  "ELE_LOGY E1 P");
3101  "neutralHadronRelativeIso",
3102  "neutralHadronRelativeIso",
3103  100,
3104  0.0,
3105  2.,
3106  "neutralHadronRelativeIso",
3107  "Events",
3108  "ELE_LOGY E1 P");
3110  "neutralHadronRelativeIso_Extended",
3111  "neutralHadronRelativeIso_Extended",
3112  100,
3113  0.0,
3114  2.,
3115  "neutralHadronRelativeIso Extended, 2.5<|eta|<3",
3116  "Events",
3117  "ELE_LOGY E1 P");
3119  "neutralHadronRelativeIso_barrel",
3120  "neutralHadronRelativeIso for barrel",
3121  100,
3122  0.0,
3123  2.,
3124  "neutralHadronRelativeIso_barrel",
3125  "Events",
3126  "ELE_LOGY E1 P");
3128  "neutralHadronRelativeIso_endcaps",
3129  "neutralHadronRelativeIso for endcaps",
3130  100,
3131  0.0,
3132  2.,
3133  "neutralHadronRelativeIso_endcaps",
3134  "Events",
3135  "ELE_LOGY E1 P");
3137  iBooker, "photonRelativeIso", "photonRelativeIso", 100, 0.0, 2., "photonRelativeIso", "Events", "ELE_LOGY E1 P");
3139  "photonRelativeIso_Extended",
3140  "photonRelativeIso_Extended",
3141  100,
3142  0.0,
3143  2.,
3144  "photonRelativeIso Extended, 2.5<|eta|<3",
3145  "Events",
3146  "ELE_LOGY E1 P");
3148  "photonRelativeIso_barrel",
3149  "photonRelativeIso for barrel",
3150  100,
3151  0.0,
3152  2.,
3153  "photonRelativeIso_barrel",
3154  "Events",
3155  "ELE_LOGY E1 P");
3157  "photonRelativeIso_endcaps",
3158  "photonRelativeIso for endcaps",
3159  100,
3160  0.0,
3161  2.,
3162  "photonRelativeIso_endcaps",
3163  "Events",
3164  "ELE_LOGY E1 P");
3166  "chargedHadronRelativeIso_mAOD",
3167  "chargedHadronRelativeIso",
3168  100,
3169  0.0,
3170  2.,
3171  "chargedHadronRelativeIso",
3172  "Events",
3173  "ELE_LOGY E1 P");
3175  "chargedHadronRelativeIso_mAOD_barrel",
3176  "chargedHadronRelativeIso for barrel",
3177  100,
3178  0.0,
3179  2.,
3180  "chargedHadronRelativeIso_barrel",
3181  "Events",
3182  "ELE_LOGY E1 P");
3184  "chargedHadronRelativeIso_mAOD_endcaps",
3185  "chargedHadronRelativeIso for endcaps",
3186  100,
3187  0.0,
3188  2.,
3189  "chargedHadronRelativeIso_endcaps",
3190  "Events",
3191  "ELE_LOGY E1 P");
3193  "neutralHadronRelativeIso_mAOD",
3194  "neutralHadronRelativeIso",
3195  100,
3196  0.0,
3197  2.,
3198  "neutralHadronRelativeIso",
3199  "Events",
3200  "ELE_LOGY E1 P");
3202  "neutralHadronRelativeIso_mAOD_barrel",
3203  "neutralHadronRelativeIso for barrel",
3204  100,
3205  0.0,
3206  2.,
3207  "neutralHadronRelativeIso_barrel",
3208  "Events",
3209  "ELE_LOGY E1 P");
3211  "neutralHadronRelativeIso_mAOD_endcaps",
3212  "neutralHadronRelativeIso for endcaps",
3213  100,
3214  0.0,
3215  2.,
3216  "neutralHadronRelativeIso_endcaps",
3217  "Events",
3218  "ELE_LOGY E1 P");
3220  "photonRelativeIso_mAOD",
3221  "photonRelativeIso",
3222  100,
3223  0.0,
3224  2.,
3225  "photonRelativeIso",
3226  "Events",
3227  "ELE_LOGY E1 P");
3229  "photonRelativeIso_mAOD_barrel",
3230  "photonRelativeIso for barrel",
3231  100,
3232  0.0,
3233  2.,
3234  "photonRelativeIso_barrel",
3235  "Events",
3236  "ELE_LOGY E1 P");
3238  "photonRelativeIso_mAOD_endcaps",
3239  "photonRelativeIso for endcaps",
3240  100,
3241  0.0,
3242  2.,
3243  "photonRelativeIso_endcaps",
3244  "Events",
3245  "ELE_LOGY E1 P");
3246 
3247  // conversion rejection information
3248  h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags", "conversion rejection flag", 5, -1.5, 3.5);
3250  bookH1withSumw2(iBooker, "convFlags_all", "conversion rejection flag, all electrons", 5, -1.5, 3.5);
3251  h1_ele_convDist = bookH1withSumw2(iBooker, "convDist", "distance to the conversion partner", 100, -15., 15.);
3253  bookH1withSumw2(iBooker, "convDist_all", "distance to the conversion partner, all electrons", 100, -15., 15.);
3255  iBooker, "convDcot", "difference of cot(angle) with the conversion partner", 100, -CLHEP::pi / 2., CLHEP::pi / 2.);
3257  "convDcot_all",
3258  "difference of cot(angle) with the conversion partner, all electrons",
3259  100,
3260  -CLHEP::pi / 2.,
3261  CLHEP::pi / 2.);
3262  h1_ele_convRadius = bookH1withSumw2(iBooker, "convRadius", "signed conversion radius", 100, 0., 130.);
3264  bookH1withSumw2(iBooker, "convRadius_all", "signed conversion radius, all electrons", 100, 0., 130.);
3265 }
3266 
3268 
3270  // get collections
3271  auto gsfElectrons = iEvent.getHandle(electronCollection_);
3272  auto gsfElectronsEndcaps = iEvent.getHandle(electronCollectionEndcaps_);
3273  auto gsfElectronCores = iEvent.getHandle(electronCoreCollection_);
3274  auto gsfElectronTracks = iEvent.getHandle(electronTrackCollection_);
3275  auto gsfElectronSeeds = iEvent.getHandle(electronSeedCollection_);
3276  auto genParticles = iEvent.getHandle(mcTruthCollection_);
3277  auto theBeamSpot = iEvent.getHandle(beamSpotTag_);
3278 
3279  auto isoFromDepsTk03Handle = iEvent.getHandle(isoFromDepsTk03Tag_);
3280  auto isoFromDepsTk04Handle = iEvent.getHandle(isoFromDepsTk04Tag_);
3281  auto isoFromDepsEcalFull03Handle = iEvent.getHandle(isoFromDepsEcalFull03Tag_);
3282  auto isoFromDepsEcalFull04Handle = iEvent.getHandle(isoFromDepsEcalFull04Tag_);
3283  auto isoFromDepsEcalReduced03Handle = iEvent.getHandle(isoFromDepsEcalReduced03Tag_);
3284  auto isoFromDepsEcalReduced04Handle = iEvent.getHandle(isoFromDepsEcalReduced04Tag_);
3285  auto isoFromDepsHcal03Handle = iEvent.getHandle(isoFromDepsHcal03Tag_);
3286  auto isoFromDepsHcal04Handle = iEvent.getHandle(isoFromDepsHcal04Tag_);
3287  auto vertexCollectionHandle = iEvent.getHandle(offlineVerticesCollection_);
3288  if (!vertexCollectionHandle.isValid()) {
3289  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle KO";
3290  } else {
3291  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle OK";
3292  }
3293 
3294  edm::LogInfo("ElectronMcSignalValidator::analyze")
3295  << "Treating event " << iEvent.id() << " with " << gsfElectrons.product()->size() << " electrons";
3296  edm::LogInfo("ElectronMcSignalValidator::analyze")
3297  << "Treating event " << iEvent.id() << " with " << gsfElectronsEndcaps.product()->size() << " electrons";
3298 
3299  h1_recEleNum->Fill((*gsfElectrons).size());
3300  h1_recCoreNum->Fill((*gsfElectronCores).size());
3301  h1_recTrackNum->Fill((*gsfElectronTracks).size());
3302  h1_recSeedNum->Fill((*gsfElectronSeeds).size());
3303  h1_recOfflineVertices->Fill((*vertexCollectionHandle).size());
3304 
3305  reco::GsfElectronCollection::const_iterator gsfIter;
3306  std::vector<reco::GsfElectron>::const_iterator gsfIter3;
3307  std::vector<reco::GsfElectron>::const_iterator gsfIter4;
3308 
3309  //===============================================
3310  // get a vector with EB & EE
3311  //===============================================
3312  std::vector<reco::GsfElectron> localCollection;
3313 
3314  // looking for EB
3315  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
3316  if (gsfIter->isEB()) {
3317  localCollection.push_back(*gsfIter);
3318  }
3319  }
3320 
3321  // looking for EE
3322  for (gsfIter = gsfElectronsEndcaps->begin(); gsfIter != gsfElectronsEndcaps->end(); gsfIter++) {
3323  if (gsfIter->isEE()) {
3324  localCollection.push_back(*gsfIter);
3325  }
3326  }
3327 
3328  //===============================================
3329  // all rec electrons
3330  //===============================================
3331 
3332  // mee only
3333  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3334  float enrj1 = gsfIter3->ecalEnergy();
3335 
3336  for (gsfIter4 = gsfIter3 + 1; gsfIter4 != localCollection.end(); gsfIter4++) {
3337  math::XYZTLorentzVector p12 = (*gsfIter3).p4() + (*gsfIter4).p4();
3338  float mee2 = p12.Dot(p12);
3339  float enrj2 = gsfIter4->ecalEnergy();
3340  h1_ele_mee_all->Fill(sqrt(mee2));
3341  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2), enrj2 - enrj1);
3342  if (gsfIter3->ecalDrivenSeed() && gsfIter4->ecalDrivenSeed()) {
3343  h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2), enrj2 - enrj1);
3344  }
3345  if (gsfIter3->charge() * gsfIter4->charge() < 0.) {
3346  h1_ele_mee_os->Fill(sqrt(mee2));
3347  if (gsfIter3->isEB() && gsfIter4->isEB()) {
3348  h1_ele_mee_os_ebeb->Fill(sqrt(mee2));
3349  }
3350  if ((gsfIter3->isEB() && gsfIter4->isEE()) || (gsfIter3->isEE() && gsfIter4->isEB()))
3351  h1_ele_mee_os_ebee->Fill(sqrt(mee2));
3352  if (gsfIter3->isEE() && gsfIter4->isEE()) {
3353  h1_ele_mee_os_eeee->Fill(sqrt(mee2));
3354  }
3355  if ((gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3356  (gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::BIGBREM) ||
3357  (gsfIter3->classification() == GsfElectron::BIGBREM && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3358  (gsfIter3->classification() == GsfElectron::BIGBREM &&
3359  gsfIter4->classification() == GsfElectron::BIGBREM)) {
3360  h1_ele_mee_os_gg->Fill(sqrt(mee2));
3361  } else if ((gsfIter3->classification() == GsfElectron::SHOWERING &&
3362  gsfIter4->classification() == GsfElectron::SHOWERING) ||
3363  (gsfIter3->classification() == GsfElectron::SHOWERING && gsfIter4->isGap()) ||
3364  (gsfIter3->isGap() && gsfIter4->classification() == GsfElectron::SHOWERING) ||
3365  (gsfIter3->isGap() && gsfIter4->isGap())) {
3366  h1_ele_mee_os_bb->Fill(sqrt(mee2));
3367  } else {
3368  h1_ele_mee_os_gb->Fill(sqrt(mee2));
3369  }
3370  }
3371  }
3372  }
3373 
3374  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3375  // preselect electrons
3376  if (gsfIter3->pt() > maxPt_ || std::abs(gsfIter3->eta()) > maxAbsEta_)
3377  continue;
3378 
3379  h1_ele_EoverP_all->Fill(gsfIter3->eSuperClusterOverP());
3380  h1_ele_EseedOP_all->Fill(gsfIter3->eSeedClusterOverP());
3381  h1_ele_EoPout_all->Fill(gsfIter3->eSeedClusterOverPout());
3382  h1_ele_EeleOPout_all->Fill(gsfIter3->eEleClusterOverPout());
3383  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter3->deltaEtaSuperClusterTrackAtVtx());
3384  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter3->deltaPhiSuperClusterTrackAtVtx());
3385  h1_ele_dEtaCl_propOut_all->Fill(gsfIter3->deltaEtaSeedClusterTrackAtCalo());
3386  h1_ele_dPhiCl_propOut_all->Fill(gsfIter3->deltaPhiSeedClusterTrackAtCalo());
3387  h1_ele_HoE_all->Fill(gsfIter3->hcalOverEcal());
3388  h1_ele_HoE_bc_all->Fill(gsfIter3->hcalOverEcalBc());
3389  h1_ele_TIP_all->Fill(EleRelPoint(gsfIter3->vertex(), theBeamSpot->position()).perp());
3390  h1_ele_vertexEta_all->Fill(gsfIter3->eta());
3391  h1_ele_vertexPt_all->Fill(gsfIter3->pt());
3392  h1_ele_Et_all->Fill(gsfIter3->ecalEnergy() / cosh(gsfIter3->superCluster()->eta()));
3393 
3394  // conversion rejection
3395  int flags = gsfIter3->convFlags();
3396  if (flags == -9999) {
3397  flags = -1;
3398  }
3400  if (flags >= 0.) {
3401  h1_ele_convDist_all->Fill(gsfIter3->convDist());
3402  h1_ele_convDcot_all->Fill(gsfIter3->convDcot());
3403  h1_ele_convRadius_all->Fill(gsfIter3->convRadius());
3404  }
3405  }
3406 
3407  //===============================================
3408  // charge mis-ID
3409  //===============================================
3410 
3411  int mcNum = 0, gamNum = 0, eleNum = 0;
3412  bool matchingID, matchingMotherID;
3413 
3414  reco::GenParticleCollection::const_iterator mcIter;
3415  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3416  // select requested matching gen particle
3417  matchingID = false;
3418  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3419  if (mcIter->pdgId() == matchingIDs_[i]) {
3420  matchingID = true;
3421  }
3422  }
3423  if (matchingID) {
3424  // select requested mother matching gen particle
3425  // always include single particle with no mother
3426  const Candidate *mother = mcIter->mother();
3427  matchingMotherID = false;
3428  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3429  if (mother == nullptr) {
3430  matchingMotherID = true;
3431  } else if (mother->pdgId() == matchingMotherIDs_[i]) {
3432  if (mother->numberOfDaughters() <= 2) {
3433  matchingMotherID = true;
3434  }
3435  } // end of mother if test
3436  }
3437  if (matchingMotherID) {
3438  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEta_) {
3439  continue;
3440  }
3441 
3442  // looking for the best matching gsf electron
3443  bool okGsfFound = false;
3444  double gsfOkRatio = 999999.;
3445 
3446  // find best matched electron
3447  reco::GsfElectron bestGsfElectron;
3448  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3449  double dphi = gsfIter3->phi() - mcIter->phi();
3450  if (std::abs(dphi) > CLHEP::pi) {
3451  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3452  }
3453  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3454  if (deltaR2 < deltaR2_) {
3455  double mc_charge = mcIter->pdgId() == 11 ? -1. : 1.;
3456  h1_ele_ChargeMnChargeTrue->Fill(std::abs(gsfIter3->charge() - mc_charge));
3457  // require here a charge mismatch
3458  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() > 0.)) ||
3459  ((mcIter->pdgId() == -11) && (gsfIter3->charge() < 0.))) {
3460  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3461  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3462  gsfOkRatio = tmpGsfRatio;
3463  bestGsfElectron = *gsfIter3;
3464  okGsfFound = true;
3465  }
3466  }
3467  }
3468  } // loop over rec ele to look for the best one
3469 
3470  // analysis when the mc track is found
3471  if (okGsfFound) { // && (std::abs(mcIter->eta())<maxAbsEta_)
3472  // generated distributions for matched electrons
3473  h1_mc_Pt_matched_qmisid->Fill(mcIter->pt());
3474  h1_mc_Phi_matched_qmisid->Fill(mcIter->phi());
3475  h1_mc_AbsEta_matched_qmisid->Fill(std::abs(mcIter->eta()));
3476  h1_mc_Eta_matched_qmisid->Fill(mcIter->eta());
3477  h1_mc_Z_matched_qmisid->Fill(mcIter->vz());
3478  }
3479  }
3480  }
3481  }
3482 
3483  //===============================================
3484  // association mc-reco
3485  //===============================================
3486 
3487  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3488  // number of mc particles
3489  mcNum++;
3490 
3491  // counts photons
3492  if (mcIter->pdgId() == 22) {
3493  gamNum++;
3494  }
3495 
3496  // select requested matching gen particle
3497  matchingID = false;
3498  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3499  if (mcIter->pdgId() == matchingIDs_[i]) {
3500  matchingID = true;
3501  }
3502  }
3503  if (!matchingID)
3504  continue;
3505 
3506  // select requested mother matching gen particle
3507  // always include single particle with no mother
3508  const Candidate *mother = mcIter->mother();
3509  matchingMotherID = false;
3510  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3511  if ((mother == nullptr) || ((mother != nullptr) && mother->pdgId() == matchingMotherIDs_[i])) {
3512  matchingMotherID = true;
3513  }
3514  }
3515  if (!matchingMotherID)
3516  continue;
3517 
3518  // electron preselection
3519  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEtaExtended_) {
3520  continue;
3521  }
3522 
3523  eleNum++;
3524  if (std::abs(mcIter->eta()) < maxAbsEta_) {
3525  h1_mc_Eta->Fill(mcIter->eta());
3526  h1_mc_AbsEta->Fill(std::abs(mcIter->eta()));
3527  h1_mc_P->Fill(mcIter->p());
3528  h1_mc_Pt->Fill(mcIter->pt());
3529  h1_mc_Phi->Fill(mcIter->phi());
3530  h1_mc_Z->Fill(mcIter->vz());
3531  h2_mc_PtEta->Fill(mcIter->eta(), mcIter->pt());
3532  }
3533  if (std::abs(mcIter->eta()) < maxAbsEtaExtended_) {
3534  h1_mc_Eta_Extended->Fill(mcIter->eta());
3535  h1_mc_AbsEta_Extended->Fill(std::abs(mcIter->eta()));
3536  }
3537 
3538  // find best matched electron
3539  bool okGsfFound = false;
3540  bool passMiniAODSelection = true;
3541  double gsfOkRatio = 999999.;
3542  bool isEBflag = false;
3543  bool isEEflag = false;
3544  bool isEEextendedflag = false;
3545 
3546  reco::GsfElectron bestGsfElectron;
3547  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3548  // temporary cut for pt < 5.
3549  double dphi = gsfIter3->phi() - mcIter->phi();
3550  if (std::abs(dphi) > CLHEP::pi) {
3551  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3552  }
3553  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3554  if (deltaR2 < deltaR2_) {
3555  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() < 0.)) ||
3556  ((mcIter->pdgId() == -11) && (gsfIter3->charge() > 0.))) {
3557  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3558  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3559  gsfOkRatio = tmpGsfRatio;
3560  bestGsfElectron = *gsfIter3;
3561  okGsfFound = true;
3562  }
3563  }
3564  }
3565  } // loop over rec ele to look for the best one
3566 
3567  if (!okGsfFound)
3568  continue;
3569 
3570  //------------------------------------
3571  // analysis when the mc track is found
3572  //------------------------------------
3573  passMiniAODSelection = bestGsfElectron.pt() >= 5.;
3574  isEBflag = bestGsfElectron.isEB();
3575  isEEflag = bestGsfElectron.isEE() && (std::abs(mcIter->eta()) < maxAbsEta_);
3576  isEEextendedflag = bestGsfElectron.isEE();
3577 
3578  float Etot = 0.;
3579  CaloCluster_iterator it = bestGsfElectron.superCluster()->clustersBegin();
3580  CaloCluster_iterator itend = bestGsfElectron.superCluster()->clustersEnd();
3581  for (; it != itend; ++it) {
3582  Etot += (*it)->energy();
3583  }
3584 
3585  if (isEEextendedflag) { // Extended flag
3586  if (!isEEflag) {
3587  h1_mc_Eta_Extended_matched->Fill(mcIter->eta());
3588  h1_mc_AbsEta_matched->Fill(std::abs(mcIter->eta()));
3589  h1_mc_AbsEta_Extended_matched->Fill(std::abs(mcIter->eta()));
3590  h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3591  h1_scl_bcl_EtotoEtrue_Extended->Fill(Etot / mcIter->p()); //
3592  h1_scl_EoEtrue_endcaps_new_Extended->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3596  h1_ele_HoE_Extended->Fill(bestGsfElectron.hcalOverEcal());
3598  bestGsfElectron.pt());
3600  bestGsfElectron.pt());
3602  bestGsfElectron.pt());
3603  h2_scl_EoEtrueVsrecOfflineVertices_Extended->Fill((*vertexCollectionHandle).size(),
3604  bestGsfElectron.ecalEnergy() / mcIter->p());
3605  h2_ele_PoPtrueVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.p() / mcIter->p());
3608 
3609  double fbrem_mode = bestGsfElectron.fbrem();
3610  h1_ele_fbrem_Extended->Fill(fbrem_mode);
3611  if (!readAOD_) {
3612  if (bestGsfElectron.ecalDrivenSeed())
3614  if (bestGsfElectron.trackerDrivenSeed()) {
3616  }
3617  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) {
3619  }
3620  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) {
3622  }
3623  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) {
3625  }
3626  }
3627  }
3628 
3629  if (!readAOD_) {
3630  h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3631 
3632  edm::RefToBase<TrajectorySeed> seed_Ext = bestGsfElectron.gsfTrack()->extra()->seedRef();
3633  ElectronSeedRef elseed_Ext = seed_Ext.castTo<ElectronSeedRef>();
3634  if (elseed_Ext->dPhiNeg(1) != std::numeric_limits<float>::infinity()) {
3635  h2_ele_seed_dphi2VsEta->Fill(bestGsfElectron.eta(), elseed_Ext->dPhiNeg(1));
3636  }
3637  if (elseed_Ext->dRZNeg(1) != std::numeric_limits<float>::infinity()) {
3638  h2_ele_seed_drz2VsEta->Fill(bestGsfElectron.eta(), elseed_Ext->dRZNeg(1));
3639  }
3640  }
3641  } // end of Extended flag
3642 
3643  if (!isEBflag && !isEEflag)
3644  continue;
3645 
3646  // electron related distributions
3647  h1_ele_charge->Fill(bestGsfElectron.charge());
3648  h2_ele_chargeVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.charge());
3649  h2_ele_chargeVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.charge());
3650  h2_ele_chargeVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.charge());
3651  h1_ele_vertexP->Fill(bestGsfElectron.p());
3652  h1_ele_vertexPt->Fill(bestGsfElectron.pt());
3653  if (bestGsfElectron.scSigmaIEtaIEta() == 0.)
3654  h1_ele_vertexPt_nocut->Fill(bestGsfElectron.pt());
3655  h1_ele_Et->Fill(bestGsfElectron.ecalEnergy() / cosh(bestGsfElectron.superCluster()->eta()));
3656  h2_ele_vertexPtVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.pt());
3657  h2_ele_vertexPtVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.pt());
3658  h1_ele_vertexEta->Fill(bestGsfElectron.eta());
3659 
3660  h2_scl_EoEtrueVsrecOfflineVertices->Fill((*vertexCollectionHandle).size(),
3661  bestGsfElectron.ecalEnergy() / mcIter->p());
3662  h2_scl_EoEtrueVsrecOfflineVertices_Extended->Fill((*vertexCollectionHandle).size(),
3663  bestGsfElectron.ecalEnergy() / mcIter->p());
3664  if (isEBflag)
3665  h2_scl_EoEtrueVsrecOfflineVertices_barrel->Fill((*vertexCollectionHandle).size(),
3666  bestGsfElectron.ecalEnergy() / mcIter->p());
3667  else if (isEEflag)
3668  h2_scl_EoEtrueVsrecOfflineVertices_endcaps->Fill((*vertexCollectionHandle).size(),
3669  bestGsfElectron.ecalEnergy() / mcIter->p());
3670 
3671  // generated distributions for matched electrons
3672  h1_mc_Pt_matched->Fill(mcIter->pt());
3673  h1_mc_Phi_matched->Fill(mcIter->phi());
3674  h1_mc_AbsEta_matched->Fill(std::abs(mcIter->eta()));
3675  h1_mc_AbsEta_Extended_matched->Fill(std::abs(mcIter->eta()));
3676  h1_mc_Eta_Extended_matched->Fill(mcIter->eta());
3677  h2_mc_PtEta_matched->Fill(mcIter->eta(), mcIter->pt());
3678  h2_ele_vertexEtaVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta());
3679  h1_ele_vertexPhi->Fill(bestGsfElectron.phi());
3680  h1_ele_vertexX->Fill(bestGsfElectron.vertex().x());
3681  h1_ele_vertexY->Fill(bestGsfElectron.vertex().y());
3682  h1_ele_vertexZ->Fill(bestGsfElectron.vertex().z());
3683  h1_mc_Z_matched->Fill(mcIter->vz());
3684  double d = (bestGsfElectron.vertex().x() - mcIter->vx()) * (bestGsfElectron.vertex().x() - mcIter->vx()) +
3685  (bestGsfElectron.vertex().y() - mcIter->vy()) * (bestGsfElectron.vertex().y() - mcIter->vy());
3686  d = sqrt(d);
3688  h2_ele_vertexTIPVsEta->Fill(bestGsfElectron.eta(), d);
3689  h2_ele_vertexTIPVsPhi->Fill(bestGsfElectron.phi(), d);
3690  h2_ele_vertexTIPVsPt->Fill(bestGsfElectron.pt(), d);
3691  h1_ele_EtaMnEtaTrue->Fill(bestGsfElectron.eta() - mcIter->eta());
3692  h2_ele_EtaMnEtaTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eta() - mcIter->eta());
3693  h2_ele_EtaMnEtaTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta() - mcIter->eta());
3694  h2_ele_EtaMnEtaTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.eta() - mcIter->eta());
3695  h1_ele_PhiMnPhiTrue->Fill(bestGsfElectron.phi() - mcIter->phi());
3696  h1_ele_PhiMnPhiTrue2->Fill(bestGsfElectron.phi() - mcIter->phi());
3697  h2_ele_PhiMnPhiTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.phi() - mcIter->phi());
3698  h2_ele_PhiMnPhiTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.phi() - mcIter->phi());
3699  h2_ele_PhiMnPhiTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.phi() - mcIter->phi());
3700  h1_ele_PoPtrue->Fill(bestGsfElectron.p() / mcIter->p());
3701  h1_ele_PtoPttrue->Fill(bestGsfElectron.pt() / mcIter->pt());
3702  h2_ele_PoPtrueVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.p() / mcIter->p());
3703  h2_ele_PoPtrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.p() / mcIter->p());
3704  h2_ele_PoPtrueVsPt->Fill(bestGsfElectron.py(), bestGsfElectron.p() / mcIter->p());
3705  h2_ele_sigmaIetaIetaVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.scSigmaIEtaIEta());
3707  h1_ele_combinedP4Error->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3708  if (isEBflag) {
3709  h1_ele_EtaMnEtaTrue_barrel->Fill(bestGsfElectron.eta() - mcIter->eta());
3710  h1_ele_PhiMnPhiTrue_barrel->Fill(bestGsfElectron.phi() - mcIter->phi());
3711  h1_ele_PoPtrue_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3712  h1_ele_PtoPttrue_barrel->Fill(bestGsfElectron.pt() / mcIter->pt());
3714  h1_ele_combinedP4Error_barrel->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3715  } else if (isEEflag) {
3716  h1_ele_EtaMnEtaTrue_endcaps->Fill(bestGsfElectron.eta() - mcIter->eta());
3717  h1_ele_PhiMnPhiTrue_endcaps->Fill(bestGsfElectron.phi() - mcIter->phi());
3718  h1_ele_PoPtrue_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3719  h1_ele_PtoPttrue_endcaps->Fill(bestGsfElectron.pt() / mcIter->pt());
3721  h1_ele_combinedP4Error_endcaps->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3722  }
3723 
3724  if (isEBflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3725  h1_ele_PoPtrue_golden_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3726  if (isEEflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3727  h1_ele_PoPtrue_golden_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3728  if (isEBflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3729  h1_ele_PoPtrue_showering_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3730  if (isEEflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3731  h1_ele_PoPtrue_showering_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3732 
3733  // supercluster related distributions
3734  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
3735 
3736  h1_scl_En->Fill(bestGsfElectron.ecalEnergy());
3737  if (isEBflag) {
3738  h1_scl_EoEtrue_barrel->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3739  h1_scl_EoEtrue_barrel_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3740  } else if (isEEflag) {
3741  h1_scl_EoEtrue_endcaps->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3742  h1_scl_EoEtrue_endcaps_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3743  }
3744  if (isEBflag && bestGsfElectron.isEBEtaGap())
3745  h1_scl_EoEtrue_barrel_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3746  if (isEBflag && bestGsfElectron.isEBPhiGap())
3747  h1_scl_EoEtrue_barrel_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3748  if (bestGsfElectron.isEBEEGap())
3749  h1_scl_EoEtrue_ebeegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3750  if (isEEflag && bestGsfElectron.isEEDeeGap())
3751  h1_scl_EoEtrue_endcaps_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3752  if (isEEflag && bestGsfElectron.isEERingGap())
3753  h1_scl_EoEtrue_endcaps_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3754  if (isEBflag && bestGsfElectron.isEBEtaGap())
3755  h1_scl_EoEtrue_barrel_new_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3756  if (isEBflag && bestGsfElectron.isEBPhiGap())
3757  h1_scl_EoEtrue_barrel_new_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3758  if (bestGsfElectron.isEBEEGap())
3759  h1_scl_EoEtrue_ebeegap_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3760  if (isEEflag && bestGsfElectron.isEEDeeGap())
3761  h1_scl_EoEtrue_endcaps_new_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3762  if (isEEflag && bestGsfElectron.isEERingGap())
3763  h1_scl_EoEtrue_endcaps_new_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3764 
3765  double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
3766  double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
3767  h1_scl_Et->Fill(sclRef->energy() * (Rt / R));
3768  h2_scl_EtVsEta->Fill(sclRef->eta(), sclRef->energy() * (Rt / R));
3769  h2_scl_EtVsPhi->Fill(sclRef->phi(), sclRef->energy() * (Rt / R));
3770  h1_scl_Eta->Fill(sclRef->eta());
3771  h2_scl_EtaVsPhi->Fill(sclRef->phi(), sclRef->eta());
3772  h1_scl_Phi->Fill(sclRef->phi());
3773  h1_scl_SigEtaEta->Fill(bestGsfElectron.scSigmaEtaEta());
3774  h1_scl_SigIEtaIEta->Fill(bestGsfElectron.scSigmaIEtaIEta());
3776  h1_scl_E1x5->Fill(bestGsfElectron.scE1x5());
3777  h1_scl_E2x5max->Fill(bestGsfElectron.scE2x5Max());
3778  h1_scl_E5x5->Fill(bestGsfElectron.scE5x5());
3779  if (isEBflag) {
3780  h1_scl_SigEtaEta_barrel->Fill(bestGsfElectron.scSigmaEtaEta());
3781  h1_scl_SigIEtaIEta_barrel->Fill(bestGsfElectron.scSigmaIEtaIEta());
3783  h1_scl_E1x5_barrel->Fill(bestGsfElectron.scE1x5());
3784  h1_scl_E2x5max_barrel->Fill(bestGsfElectron.scE2x5Max());
3785  h1_scl_E5x5_barrel->Fill(bestGsfElectron.scE5x5());
3786  } else if (isEEflag) {
3787  h1_scl_SigEtaEta_endcaps->Fill(bestGsfElectron.scSigmaEtaEta());
3788  h1_scl_SigIEtaIEta_endcaps->Fill(bestGsfElectron.scSigmaIEtaIEta());
3790  h1_scl_E1x5_endcaps->Fill(bestGsfElectron.scE1x5());
3791  h1_scl_E2x5max_endcaps->Fill(bestGsfElectron.scE2x5Max());
3792  h1_scl_E5x5_endcaps->Fill(bestGsfElectron.scE5x5());
3793  }
3794 
3795  if (passMiniAODSelection) { // Pt > 5.
3796  h1_scl_SigIEtaIEta_mAOD->Fill(bestGsfElectron.scSigmaIEtaIEta());
3797  if (isEBflag)
3799  else if (isEEflag)
3801  }
3802 
3803  float pfEnergy = 0.;
3804  if (!bestGsfElectron.parentSuperCluster().isNull())
3805  pfEnergy = bestGsfElectron.parentSuperCluster()->energy();
3806  h2_scl_EoEtruePfVsEg->Fill(bestGsfElectron.ecalEnergy() / mcIter->p(), pfEnergy / mcIter->p());
3807  if (isEEflag)
3808  h1_scl_ESFrac_endcaps->Fill(sclRef->preshowerEnergy() / sclRef->rawEnergy());
3809 
3810  h1_scl_bcl_EtotoEtrue->Fill(Etot / mcIter->p());
3811  if (isEBflag)
3812  h1_scl_bcl_EtotoEtrue_barrel->Fill(Etot / mcIter->p());
3813  else if (isEEflag)
3814  h1_scl_bcl_EtotoEtrue_endcaps->Fill(Etot / mcIter->p());
3815 
3816  // track related distributions
3818  h2_ele_ambiguousTracksVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize());
3819  h2_ele_ambiguousTracksVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize());
3820  h2_ele_ambiguousTracksVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize());
3821  if (!readAOD_) // track extra does not exist in AOD
3822  {
3823  h1_ele_foundHits->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3824  h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3825  h2_ele_foundHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3826  h2_ele_foundHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3827  h1_ele_lostHits->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3828  h2_ele_lostHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3829  h2_ele_lostHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3830  h2_ele_lostHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3831  h1_ele_chi2->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3832  h2_ele_chi2VsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2());
3833  h2_ele_chi2VsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2());
3834  h2_ele_chi2VsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2());
3835  if (isEBflag) {
3836  h1_ele_foundHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3837  h1_ele_lostHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3838  h1_ele_chi2_barrel->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3839  } else if (isEEflag) {
3840  h1_ele_foundHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3841  h1_ele_lostHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3842  h1_ele_chi2_endcaps->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3843  }
3844 
3845  if (passMiniAODSelection) { // Pt > 5.
3846  h2_ele_foundHitsVsEta_mAOD->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3847  }
3848  }
3849  // from gsf track interface, hence using mean
3850  if (!readAOD_) // track extra does not exist in AOD
3851  {
3852  h1_ele_PinMnPout->Fill(bestGsfElectron.gsfTrack()->innerMomentum().R() -
3853  bestGsfElectron.gsfTrack()->outerMomentum().R());
3854  h1_ele_outerP->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R());
3855  h1_ele_outerPt->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho());
3856  }
3857  // from electron interface, hence using mode
3858  h1_ele_PinMnPout_mode->Fill(bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3859  h2_ele_PinMnPoutVsEta_mode->Fill(bestGsfElectron.eta(),
3860  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3861  h2_ele_PinMnPoutVsPhi_mode->Fill(bestGsfElectron.phi(),
3862  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3863  h2_ele_PinMnPoutVsPt_mode->Fill(bestGsfElectron.pt(),
3864  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3865  h2_ele_PinMnPoutVsE_mode->Fill(bestGsfElectron.caloEnergy(),
3866  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3867  if (!readAOD_) // track extra does not exist in AOD
3868  {
3870  bestGsfElectron.gsfTrack()->normalizedChi2(),
3871  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3872  }
3873  h1_ele_outerP_mode->Fill(bestGsfElectron.trackMomentumOut().R());
3874  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R());
3875  h1_ele_outerPt_mode->Fill(bestGsfElectron.trackMomentumOut().Rho());
3876  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho());
3877  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho());
3878  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho());
3879 
3880  if (!readAOD_) // track extra does not exist in AOD
3881  {
3882  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
3883  ElectronSeedRef elseed = seed.castTo<ElectronSeedRef>();
3884  h1_ele_seed_subdet2->Fill(elseed->subDet(1));
3885  h1_ele_seed_mask->Fill(elseed->hitsMask());
3886  if (elseed->subDet(1) == 1) {
3887  h1_ele_seed_mask_bpix->Fill(elseed->hitsMask());
3888  } else if (elseed->subDet(1) == 2) {
3889  h1_ele_seed_mask_fpix->Fill(elseed->hitsMask());
3890  } else if (elseed->subDet(1) == 6) {
3891  h1_ele_seed_mask_tec->Fill(elseed->hitsMask());
3892  }
3893 
3894  if (elseed->dPhiNeg(1) != std::numeric_limits<float>::infinity()) {
3895  h1_ele_seed_dphi2->Fill(elseed->dPhiNeg(1));
3896  h2_ele_seed_dphi2VsEta->Fill(bestGsfElectron.eta(), elseed->dPhiNeg(1));
3897  h2_ele_seed_dphi2VsPt->Fill(bestGsfElectron.pt(), elseed->dPhiNeg(1));
3898  }
3899  if (elseed->dPhiPos(1) != std::numeric_limits<float>::infinity()) {
3900  h1_ele_seed_dphi2pos->Fill(elseed->dPhiPos(1));
3901  h2_ele_seed_dphi2posVsEta->Fill(bestGsfElectron.eta(), elseed->dPhiPos(1));
3902  h2_ele_seed_dphi2posVsPt->Fill(bestGsfElectron.pt(), elseed->dPhiPos(1));
3903  }
3904  if (elseed->dRZNeg(1) != std::numeric_limits<float>::infinity()) {
3905  h1_ele_seed_drz2->Fill(elseed->dRZNeg(1));
3906  h2_ele_seed_drz2VsEta->Fill(bestGsfElectron.eta(), elseed->dRZNeg(1));
3907  h2_ele_seed_drz2VsPt->Fill(bestGsfElectron.pt(), elseed->dRZNeg(1));
3908  }
3909  if (elseed->dRZPos(1) != std::numeric_limits<float>::infinity()) {
3910  h1_ele_seed_drz2pos->Fill(elseed->dRZPos(1));
3911  h2_ele_seed_drz2posVsEta->Fill(bestGsfElectron.eta(), elseed->dRZPos(1));
3912  h2_ele_seed_drz2posVsPt->Fill(bestGsfElectron.pt(), elseed->dRZPos(1));
3913  }
3914  }
3915 
3916  // match distributions
3917  h1_ele_EoP->Fill(bestGsfElectron.eSuperClusterOverP());
3918  h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3919  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP());
3920  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP());
3921  h1_ele_EseedOP->Fill(bestGsfElectron.eSeedClusterOverP());
3922  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP());
3923  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP());
3924  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP());
3925  h1_ele_EoPout->Fill(bestGsfElectron.eSeedClusterOverPout());
3926  h2_ele_EoPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout());
3927  h2_ele_EoPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout());
3928  h2_ele_EoPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout());
3929  h1_ele_EeleOPout->Fill(bestGsfElectron.eEleClusterOverPout());
3930  h2_ele_EeleOPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout());
3931  h2_ele_EeleOPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout());
3932  h2_ele_EeleOPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout());
3934  h2_ele_dEtaScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3935  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3936  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3938  h2_ele_dPhiScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3939  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3940  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3942  h2_ele_dEtaClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3943  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3944  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3946  h2_ele_dPhiClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3947  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3948  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3950  h2_ele_dEtaEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3951  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3952  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3954  h2_ele_dPhiEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3955  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3956  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3957  h1_ele_HoE->Fill(bestGsfElectron.hcalOverEcal());
3958  h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc());
3959  if (isEBflag) {
3960  h1_ele_EoP_barrel->Fill(bestGsfElectron.eSuperClusterOverP());
3961  h1_ele_EseedOP_barrel->Fill(bestGsfElectron.eSeedClusterOverP());
3962  h1_ele_EoPout_barrel->Fill(bestGsfElectron.eSeedClusterOverPout());
3963  h1_ele_EeleOPout_barrel->Fill(bestGsfElectron.eEleClusterOverPout());
3970  h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc());
3971  h1_ele_HoE_barrel->Fill(bestGsfElectron.hcalOverEcal());
3972  } else if (isEEflag) {
3973  h1_ele_EoP_endcaps->Fill(bestGsfElectron.eSuperClusterOverP());
3974  h1_ele_EseedOP_endcaps->Fill(bestGsfElectron.eSeedClusterOverP());
3975  h1_ele_EoPout_endcaps->Fill(bestGsfElectron.eSeedClusterOverPout());
3983  h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc());
3984  h1_ele_HoE_endcaps->Fill(bestGsfElectron.hcalOverEcal());
3985  }
3986 
3987  if (passMiniAODSelection) { // Pt > 5.
3990  h1_ele_HoE_mAOD->Fill(bestGsfElectron.hcalOverEcal());
3991  if (isEBflag) {
3994  h1_ele_HoE_mAOD_barrel->Fill(bestGsfElectron.hcalOverEcal());
3995  } else if (isEEflag) {
3998  h1_ele_HoE_mAOD_endcaps->Fill(bestGsfElectron.hcalOverEcal());
3999  }
4000  }
4001 
4002  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap() && !bestGsfElectron.isEBEEGap() &&
4003  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap())
4004  h1_ele_HoE_fiducial->Fill(bestGsfElectron.hcalOverEcal());
4005  h2_ele_HoEVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.hcalOverEcal());
4006  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.hcalOverEcal());
4007  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.hcalOverEcal());
4008 
4009  //classes
4010  int eleClass = bestGsfElectron.classification();
4011  if (isEEflag)
4012  eleClass += 10;
4013  h1_ele_classes->Fill(eleClass);
4014 
4015  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEBflag)
4016  h1_scl_EoEtrueGolden_barrel->Fill(sclRef->energy() / mcIter->p());
4017  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEEflag)
4018  h1_scl_EoEtrueGolden_endcaps->Fill(sclRef->energy() / mcIter->p());
4019  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEBflag)
4020  h1_scl_EoEtrueShowering_barrel->Fill(sclRef->energy() / mcIter->p());
4021  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEEflag)
4022  h1_scl_EoEtrueShowering_endcaps->Fill(sclRef->energy() / mcIter->p());
4023 
4024  //eleClass = eleClass%100; // get rid of barrel/endcap distinction
4025  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
4026  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4027  h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
4028  if (bestGsfElectron.classification() == GsfElectron::BIGBREM)
4029  h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
4030  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4031  h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
4032 
4033  // fbrem
4034 
4035  double fbrem_mode = bestGsfElectron.fbrem();
4036  h1_ele_fbrem->Fill(fbrem_mode);
4037  if (passMiniAODSelection) { // Pt > 5.
4038  h1_ele_fbrem_mAOD->Fill(fbrem_mode);
4039  }
4040  if (isEBflag) {
4041  double fbrem_mode_barrel = bestGsfElectron.fbrem();
4042  h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel);
4043  if (passMiniAODSelection) { // Pt > 5.
4044  h1_ele_fbrem_mAOD_barrel->Fill(fbrem_mode_barrel);
4045  }
4046  } else if (isEEflag) {
4047  double fbrem_mode_endcaps = bestGsfElectron.fbrem();
4048  h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps);
4049  if (passMiniAODSelection) { // Pt > 5.
4050  h1_ele_fbrem_mAOD_endcaps->Fill(fbrem_mode_endcaps);
4051  }
4052  }
4053 
4054  double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem();
4055  h1_ele_superclusterfbrem->Fill(superclusterfbrem_mode);
4056 
4057  if (isEBflag) {
4058  double superclusterfbrem_mode_barrel = bestGsfElectron.superClusterFbrem();
4059  h1_ele_superclusterfbrem_barrel->Fill(superclusterfbrem_mode_barrel);
4060  } else if (isEEflag) {
4061  double superclusterfbrem_mode_endcaps = bestGsfElectron.superClusterFbrem();
4062  h1_ele_superclusterfbrem_endcaps->Fill(superclusterfbrem_mode_endcaps);
4063  }
4064 
4065  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(), fbrem_mode);
4066 
4067  if (!readAOD_) // track extra does not exist in AOD
4068  {
4069  double fbrem_mean =
4070  1. - bestGsfElectron.gsfTrack()->outerMomentum().R() / bestGsfElectron.gsfTrack()->innerMomentum().R();
4071  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(), fbrem_mean);
4072  }
4073 
4074  //
4075 
4076  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4077  h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
4078  bestGsfElectron.trackMomentumAtVtx().R());
4079  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4080  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
4081  bestGsfElectron.trackMomentumAtVtx().R());
4082  if (!readAOD_) // track extra not available in AOD
4083  {
4084  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4085  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
4086  bestGsfElectron.gsfTrack()->innerMomentum().R());
4087  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4088  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
4089  bestGsfElectron.gsfTrack()->innerMomentum().R());
4090  }
4091  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4092  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
4093  bestGsfElectron.trackMomentumAtVtx().Rho());
4094  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4095  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
4096  bestGsfElectron.trackMomentumAtVtx().Rho());
4097  if (!readAOD_) // track extra not available in AOD
4098  {
4099  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4100  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
4101  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
4102  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4103  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
4104  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
4105  }
4106 
4107  // provenance and pflow data
4108  h1_ele_mva->Fill(bestGsfElectron.mva_e_pi());
4109  h1_ele_mva_isolated->Fill(bestGsfElectron.mva_Isolated());
4110  if (isEBflag) {
4111  h1_ele_mva_barrel->Fill(bestGsfElectron.mva_e_pi());
4112  h1_ele_mva_barrel_isolated->Fill(bestGsfElectron.mva_Isolated());
4113  } else if (isEEflag) {
4114  h1_ele_mva_endcaps->Fill(bestGsfElectron.mva_e_pi());
4115  h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated());
4116  }
4117  if (bestGsfElectron.ecalDrivenSeed()) {
4118  h1_ele_provenance->Fill(1.);
4119  }
4120  if (bestGsfElectron.trackerDrivenSeed()) {
4121  h1_ele_provenance->Fill(-1.);
4122  }
4123  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) {
4124  h1_ele_provenance->Fill(0.);
4125  }
4126  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) {
4127  h1_ele_provenance->Fill(-2.);
4128  }
4129  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) {
4130  h1_ele_provenance->Fill(2.);
4131  }
4132 
4133  if (bestGsfElectron.ecalDrivenSeed() && isEBflag)
4135  if (bestGsfElectron.trackerDrivenSeed() && isEBflag)
4137  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEBflag)
4139  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEBflag)
4141  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEBflag)
4143  if (bestGsfElectron.ecalDrivenSeed() && isEEflag)
4145  if (bestGsfElectron.trackerDrivenSeed() && isEEflag)
4147  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEEflag)
4149  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEEflag)
4151  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEEflag)
4153 
4154  if (bestGsfElectron.isGsfCtfScPixChargeConsistent())
4155  h1_ele_chargeInfo->Fill(-1.0);
4156  if (bestGsfElectron.isGsfScPixChargeConsistent())
4157  h1_ele_chargeInfo->Fill(0.);
4158  if (bestGsfElectron.isGsfCtfChargeConsistent())
4159  h1_ele_chargeInfo->Fill(1.0);
4160 
4161  // Pflow isolation
4165  h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4166  if (isEBflag) {
4170  }
4171 
4172  else if (isEEflag) {
4176  }
4177 
4178  // -- pflow over pT
4180  bestGsfElectron.pt());
4182  bestGsfElectron.pt());
4183  if (isEBflag) {
4185  bestGsfElectron.pt());
4187  bestGsfElectron.pt());
4188  h1_ele_photonRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4189  } else if (isEEflag) {
4191  bestGsfElectron.pt());
4193  bestGsfElectron.pt());
4194  h1_ele_photonRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4195  }
4196  if (passMiniAODSelection) { // Pt > 5.
4198  bestGsfElectron.pt());
4200  bestGsfElectron.pt());
4201  h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4202  if (isEBflag) {
4204  bestGsfElectron.pt());
4206  bestGsfElectron.pt());
4208  bestGsfElectron.pt());
4209  } else if (isEEflag) {
4211  bestGsfElectron.pt());
4213  bestGsfElectron.pt());
4215  bestGsfElectron.pt());
4216  }
4217  }
4218 
4219  // isolation
4220  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
4221  h1_ele_ecalPFClusterIso->Fill(bestGsfElectron.ecalPFClusterIso());
4222  h1_ele_hcalPFClusterIso->Fill(bestGsfElectron.hcalPFClusterIso());
4228  h1_ele_hcalDepth1OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(1));
4229  h1_ele_hcalDepth2OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(2));
4230  if (isEBflag) {
4231  h1_ele_tkSumPt_dr03_barrel->Fill(bestGsfElectron.dr03TkSumPt());
4241  } else if (isEEflag) {
4242  h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt());
4252  }
4253 
4254  // conversion rejection
4255  int flags = bestGsfElectron.convFlags();
4256  if (flags == -9999) {
4257  flags = -1;
4258  }
4260  if (flags >= 0.) {
4261  h1_ele_convDist->Fill(bestGsfElectron.convDist());
4262  h1_ele_convDcot->Fill(bestGsfElectron.convDcot());
4263  h1_ele_convRadius->Fill(bestGsfElectron.convRadius());
4264  }
4265 
4266  } // loop over mc particle
4267  h1_mcNum->Fill(mcNum);
4268  h1_eleNum->Fill(eleNum);
4269 }
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_hcalPFClusterIso_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_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
REF castTo() const
Definition: RefToBase.h:259
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
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_hcalPFClusterIso_Extended
MonitorElement * h1_ele_hcalPFClusterIso_endcaps
MonitorElement * h1_ele_chargedHadronRelativeIso_Extended
MonitorElement * h1_scl_EoEtrue_endcaps_new_Extended
MonitorElement * h1_ele_ecalPFClusterIso_Extended
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_chargedHadronIso_endcaps
float convDcot() const
Definition: GsfElectron.h:646
MonitorElement * h2_ele_dPhiEleClVsPhi_propOut
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
MonitorElement * h2_scl_EoEtrueVsrecOfflineVertices_Extended
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_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_dPhiSc_propVtx_Extended
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 * h1_ele_ecalPFClusterIso_barrel
MonitorElement * h2_ele_PtinVsPtoutGolden_mode
MonitorElement * h1_ele_neutralHadronIso_barrel
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:729
float ecalPFClusterIso() const
Definition: GsfElectron.h:731
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")
MonitorElement * h1_ele_photonRelativeIso_Extended
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_
MonitorElement * h1_ele_dEtaSc_propVtx_Extended
const double infinity
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_neutralHadronRelativeIso_Extended
MonitorElement * h1_ele_ecalEnergyError_barrel
MonitorElement * h1_ele_ecalPFClusterIso_endcaps
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_combinedP4Error_barrel
MonitorElement * h1_ele_dPhiSc_propVtx_all_barrel
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
MonitorElement * h2_ele_foundHitsVsEta_Extended
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_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
float fbrem() const
Definition: GsfElectron.h:809
float hcalPFClusterIso() const
Definition: GsfElectron.h:732
MonitorElement * h1_scl_bcl_EtotoEtrue_Extended
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_mc_AbsEta_Extended_matched
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_barrel
MonitorElement * h1_scl_EoEtrue_endcaps_new_deegap
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_barrel
float convRadius() const
Definition: GsfElectron.h:647
MonitorElement * h2_ele_PinVsPoutShowering_mode
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:559
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_barrel
bool isGsfCtfChargeConsistent() const
Definition: GsfElectron.h:130
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
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_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
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_Extended
edm::EDGetTokenT< reco::ElectronSeedCollection > electronSeedCollection_
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_endcaps
MonitorElement * h2_scl_EoEtrueVsrecOfflineVertices_barrel
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalReduced04Tag_
MonitorElement * h1_ele_dPhiCl_propOut_endcaps
MonitorElement * h1_ele_PoPtrue_golden_endcaps
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
Definition: Run.h:45
int charge() const final
electric charge
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal03Tag_
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2_barrel
double eta() const final
momentum pseudorapidity