CMS 3D CMS Logo

ElectronMcSignalValidator.cc
Go to the documentation of this file.
1 
2 // user include files
4 
6 
8 
18 
21 
24 
26 
33 
39 
40 #include "CLHEP/Units/GlobalPhysicalConstants.h"
41 #include "TMath.h"
42 #include "TFile.h"
43 #include "TH1F.h"
44 #include "TH1I.h"
45 #include "TH2F.h"
46 #include "TProfile.h"
47 #include "TTree.h"
48 #include <vector>
49 #include <iostream>
50 #include <typeinfo>
51 
52 using namespace reco;
53 
55  mcTruthCollection_ = consumes<reco::GenParticleCollection>(conf.getParameter<edm::InputTag>("mcTruthCollection"));
56  electronCollection_ = consumes<reco::GsfElectronCollection>(conf.getParameter<edm::InputTag>("electronCollection"));
58  consumes<reco::GsfElectronCollection>(conf.getParameter<edm::InputTag>("electronCollectionEndcaps"));
60  consumes<reco::GsfElectronCoreCollection>(conf.getParameter<edm::InputTag>("electronCoreCollection"));
62  consumes<reco::GsfElectronCoreCollection>(conf.getParameter<edm::InputTag>("electronCoreCollectionEndcaps"));
64  consumes<reco::GsfTrackCollection>(conf.getParameter<edm::InputTag>("electronTrackCollection"));
66  consumes<reco::ElectronSeedCollection>(conf.getParameter<edm::InputTag>("electronSeedCollection"));
68  consumes<reco::VertexCollection>(conf.getParameter<edm::InputTag>("offlinePrimaryVertices"));
69  beamSpotTag_ = consumes<reco::BeamSpot>(conf.getParameter<edm::InputTag>("beamSpot"));
70 
71  readAOD_ = conf.getParameter<bool>("readAOD");
72 
73  isoFromDepsTk03Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsTk03"));
74  isoFromDepsTk04Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsTk04"));
76  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalFull03"));
78  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalFull04"));
80  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalReduced03"));
82  consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsEcalReduced04"));
83  isoFromDepsHcal03Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsHcal03"));
84  isoFromDepsHcal04Tag_ = consumes<edm::ValueMap<double> >(conf.getParameter<edm::InputTag>("isoFromDepsHcal04"));
85 
86  maxPt_ = conf.getParameter<double>("MaxPt");
87  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
88  maxAbsEtaExtended_ = conf.getParameter<double>("MaxAbsEtaExtended");
89  deltaR2_ = conf.getParameter<double>("DeltaR") * conf.getParameter<double>("DeltaR");
90  matchingIDs_ = conf.getParameter<std::vector<int> >("MatchingID");
91  matchingMotherIDs_ = conf.getParameter<std::vector<int> >("MatchingMotherID");
92  inputFile_ = conf.getParameter<std::string>("InputFile");
93  outputFile_ = conf.getParameter<std::string>("OutputFile");
94  inputInternalPath_ = conf.getParameter<std::string>("InputFolderName");
95  outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName");
96 
97  // histos bining and limits
98 
99  edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg");
100 
101  xyz_nbin = histosSet.getParameter<int>("Nbinxyz");
102 
103  p_nbin = histosSet.getParameter<int>("Nbinp");
104  p2D_nbin = histosSet.getParameter<int>("Nbinp2D");
105  p_max = histosSet.getParameter<double>("Pmax");
106 
107  pt_nbin = histosSet.getParameter<int>("Nbinpt");
108  pt2D_nbin = histosSet.getParameter<int>("Nbinpt2D");
109  pteff_nbin = histosSet.getParameter<int>("Nbinpteff");
110  pt_max = histosSet.getParameter<double>("Ptmax");
111 
112  fhits_nbin = histosSet.getParameter<int>("Nbinfhits");
113  fhits_max = histosSet.getParameter<double>("Fhitsmax");
114 
115  lhits_nbin = histosSet.getParameter<int>("Nbinlhits");
116  lhits_max = histosSet.getParameter<double>("Lhitsmax");
117 
118  eop_nbin = histosSet.getParameter<int>("Nbineop");
119  eop2D_nbin = histosSet.getParameter<int>("Nbineop2D");
120  eop_max = histosSet.getParameter<double>("Eopmax");
121  eopmaxsht = histosSet.getParameter<double>("Eopmaxsht");
122 
123  eta_nbin = histosSet.getParameter<int>("Nbineta");
124  eta2D_nbin = histosSet.getParameter<int>("Nbineta2D");
125  eta_min = histosSet.getParameter<double>("Etamin");
126  eta_max = histosSet.getParameter<double>("Etamax");
127 
128  eta_nbin_extended = histosSet.getParameter<int>("NbinetaExtended");
129  eta2D_nbin_extended = histosSet.getParameter<int>("Nbineta2DExtended");
130  eta_min_extended = histosSet.getParameter<double>("EtaminExtended");
131  eta_max_extended = histosSet.getParameter<double>("EtamaxExtended");
132 
133  deta_nbin = histosSet.getParameter<int>("Nbindeta");
134  deta_min = histosSet.getParameter<double>("Detamin");
135  deta_max = histosSet.getParameter<double>("Detamax");
136 
137  phi_nbin = histosSet.getParameter<int>("Nbinphi");
138  phi2D_nbin = histosSet.getParameter<int>("Nbinphi2D");
139  phi_min = histosSet.getParameter<double>("Phimin");
140  phi_max = histosSet.getParameter<double>("Phimax");
141 
142  detamatch_nbin = histosSet.getParameter<int>("Nbindetamatch");
143  detamatch2D_nbin = histosSet.getParameter<int>("Nbindetamatch2D");
144  detamatch_min = histosSet.getParameter<double>("Detamatchmin");
145  detamatch_max = histosSet.getParameter<double>("Detamatchmax");
146 
147  dphi_nbin = histosSet.getParameter<int>("Nbindphi");
148  dphi_min = histosSet.getParameter<double>("Dphimin");
149  dphi_max = histosSet.getParameter<double>("Dphimax");
150 
151  dphimatch_nbin = histosSet.getParameter<int>("Nbindphimatch");
152  dphimatch2D_nbin = histosSet.getParameter<int>("Nbindphimatch2D");
153  dphimatch_min = histosSet.getParameter<double>("Dphimatchmin");
154  dphimatch_max = histosSet.getParameter<double>("Dphimatchmax");
155 
156  poptrue_nbin = histosSet.getParameter<int>("Nbinpoptrue");
157  poptrue_min = histosSet.getParameter<double>("Poptruemin");
158  poptrue_max = histosSet.getParameter<double>("Poptruemax");
159 
160  mee_nbin = histosSet.getParameter<int>("Nbinmee");
161  mee_min = histosSet.getParameter<double>("Meemin");
162  mee_max = histosSet.getParameter<double>("Meemax");
163 
164  hoe_nbin = histosSet.getParameter<int>("Nbinhoe");
165  hoe_min = histosSet.getParameter<double>("Hoemin");
166  hoe_max = histosSet.getParameter<double>("Hoemax");
167 
168  error_nbin = histosSet.getParameter<int>("Nbinerror");
169  enerror_max = histosSet.getParameter<double>("Energyerrormax");
170 
171  set_EfficiencyFlag = histosSet.getParameter<bool>("EfficiencyFlag");
172  set_StatOverflowFlag = histosSet.getParameter<bool>("StatOverflowFlag");
173 
174  opv_nbin = histosSet.getParameter<int>("NbinOPV");
175  opv_min = histosSet.getParameter<double>("OPV_min");
176  opv_max = histosSet.getParameter<double>("OPV_max");
177 
178  ele_nbin = histosSet.getParameter<int>("NbinELE");
179  ele_min = histosSet.getParameter<double>("ELE_min");
180  ele_max = histosSet.getParameter<double>("ELE_max");
181 
182  core_nbin = histosSet.getParameter<int>("NbinCORE");
183  core_min = histosSet.getParameter<double>("CORE_min");
184  core_max = histosSet.getParameter<double>("CORE_max");
185 
186  track_nbin = histosSet.getParameter<int>("NbinTRACK");
187  track_min = histosSet.getParameter<double>("TRACK_min");
188  track_max = histosSet.getParameter<double>("TRACK_max");
189 
190  seed_nbin = histosSet.getParameter<int>("NbinSEED");
191  seed_min = histosSet.getParameter<double>("SEED_min");
192  seed_max = histosSet.getParameter<double>("SEED_max");
193 
194  // so to please coverity...
195  h1_mcNum = nullptr;
196  h1_eleNum = nullptr;
197  h1_gamNum = nullptr;
198 
199  h1_recEleNum = nullptr;
200  h1_recCoreNum = nullptr;
201  h1_recTrackNum = nullptr;
202  h1_recSeedNum = nullptr;
203  h1_recOfflineVertices = nullptr;
204 
205  h1_mc_Eta = nullptr;
206  h1_mc_Eta_Extended = nullptr;
207  h1_mc_AbsEta = nullptr;
208  h1_mc_AbsEta_Extended = nullptr;
209  h1_mc_P = nullptr;
210  h1_mc_Pt = nullptr;
211  h1_mc_Phi = nullptr;
212  h1_mc_Z = nullptr;
213  h2_mc_PtEta = nullptr;
214 
215  h1_mc_Eta_Extended_matched = nullptr;
216  h1_mc_AbsEta_matched = nullptr;
218  h1_mc_Pt_matched = nullptr;
219  h1_mc_Phi_matched = nullptr;
220  h1_mc_Z_matched = nullptr;
221  h2_mc_PtEta_matched = nullptr;
222 
223  h1_mc_Eta_matched_qmisid = nullptr;
224  h1_mc_AbsEta_matched_qmisid = nullptr;
225  h1_mc_Pt_matched_qmisid = nullptr;
226  h1_mc_Phi_matched_qmisid = nullptr;
227  h1_mc_Z_matched_qmisid = nullptr;
228 
229  h1_ele_EoverP_all = nullptr;
230  h1_ele_EoverP_all_barrel = nullptr;
231  h1_ele_EoverP_all_endcaps = nullptr;
232  h1_ele_EseedOP_all = nullptr;
233  h1_ele_EseedOP_all_barrel = nullptr;
234  h1_ele_EseedOP_all_endcaps = nullptr;
235  h1_ele_EoPout_all = nullptr;
236  h1_ele_EeleOPout_all = nullptr;
237  h1_ele_dEtaSc_propVtx_all = nullptr;
240  h1_ele_dPhiSc_propVtx_all = nullptr;
243  h1_ele_dEtaCl_propOut_all = nullptr;
246  h1_ele_dPhiCl_propOut_all = nullptr;
249  h1_ele_TIP_all = nullptr;
250  h1_ele_TIP_all_barrel = nullptr;
251  h1_ele_TIP_all_endcaps = nullptr;
252  h1_ele_HoE_all = nullptr;
253  h1_ele_HoE_all_barrel = nullptr;
254  h1_ele_HoE_all_endcaps = nullptr;
255  h1_ele_vertexEta_all = nullptr;
256  h1_ele_vertexPt_all = nullptr;
257  h1_ele_Et_all = nullptr;
258  h1_ele_mee_all = nullptr;
259  h1_ele_mee_os = nullptr;
260  h1_ele_mee_os_ebeb = nullptr;
261  h1_ele_mee_os_ebee = nullptr;
262  h1_ele_mee_os_eeee = nullptr;
263  h1_ele_mee_os_gg = nullptr;
264  h1_ele_mee_os_gb = nullptr;
265  h1_ele_mee_os_bb = nullptr;
266 
267  h2_ele_E2mnE1vsMee_all = nullptr;
268  h2_ele_E2mnE1vsMee_egeg_all = nullptr;
269 
270  h1_ele_charge = nullptr;
271  h2_ele_chargeVsEta = nullptr;
272  h2_ele_chargeVsPhi = nullptr;
273  h2_ele_chargeVsPt = nullptr;
274  h1_ele_vertexP = nullptr;
275  h1_ele_vertexPt = nullptr;
276  h1_ele_vertexPt_EB = nullptr;
277  h1_ele_vertexPt_EE = nullptr;
278  h1_ele_vertexPt_nocut = nullptr;
279  h1_ele_Et = nullptr;
280  h2_ele_vertexPtVsEta = nullptr;
281  h2_ele_vertexPtVsPhi = nullptr;
282  h1_ele_vertexPt_5100 = nullptr;
283  h1_ele_vertexEta = nullptr;
284  h2_ele_vertexEtaVsPhi = nullptr;
285  h1_ele_vertexAbsEta = nullptr;
286  h1_ele_vertexPhi = nullptr;
287  h1_ele_vertexX = nullptr;
288  h1_ele_vertexY = nullptr;
289  h1_ele_vertexZ = nullptr;
290  h1_ele_vertexTIP = nullptr;
291  h2_ele_vertexTIPVsEta = nullptr;
292  h2_ele_vertexTIPVsPhi = nullptr;
293  h2_ele_vertexTIPVsPt = nullptr;
294 
295  h1_scl_En = nullptr;
296  h1_scl_EoEtrue_barrel = nullptr;
297  h1_scl_EoEtrue_endcaps = nullptr;
300  h1_scl_EoEtrue_ebeegap = nullptr;
303  h1_scl_EoEtrue_barrel_new = nullptr;
304  h1_scl_EoEtrue_endcaps_new = nullptr;
308  h1_scl_EoEtrue_ebeegap_new = nullptr;
315  h1_scl_Et = nullptr;
316  h2_scl_EtVsEta = nullptr;
317  h2_scl_EtVsPhi = nullptr;
318  h2_scl_EtaVsPhi = nullptr;
319  h1_scl_Eta = nullptr;
320  h1_scl_Phi = nullptr;
321  h1_scl_ESFrac_endcaps = nullptr;
322 
323  h2_scl_EoEtruePfVsEg = nullptr;
324 
325  h1_scl_SigEtaEta = nullptr;
326  h1_scl_SigEtaEta_barrel = nullptr;
327  h1_scl_SigEtaEta_endcaps = nullptr;
328  h1_scl_SigIEtaIEta = nullptr;
329  h1_scl_SigIEtaIEta_barrel = nullptr;
330  h1_scl_SigIEtaIEta_endcaps = nullptr;
331  h1_scl_SigIEtaIEta_mAOD = nullptr;
338  h1_scl_E1x5 = nullptr;
339  h1_scl_E1x5_barrel = nullptr;
340  h1_scl_E1x5_endcaps = nullptr;
341  h1_scl_E2x5max = nullptr;
342  h1_scl_E2x5max_barrel = nullptr;
343  h1_scl_E2x5max_endcaps = nullptr;
344  h1_scl_E5x5 = nullptr;
345  h1_scl_E5x5_barrel = nullptr;
346  h1_scl_E5x5_endcaps = nullptr;
347  h1_scl_bcl_EtotoEtrue = nullptr;
351 
352  h1_ele_ambiguousTracks = nullptr;
353  h2_ele_ambiguousTracksVsEta = nullptr;
354  h2_ele_ambiguousTracksVsPhi = nullptr;
355  h2_ele_ambiguousTracksVsPt = nullptr;
356  h1_ele_foundHits = nullptr;
357  h1_ele_foundHits_barrel = nullptr;
358  h1_ele_foundHits_endcaps = nullptr;
360  h2_ele_foundHitsVsEta_mAOD = nullptr;
361  h2_ele_foundHitsVsPhi = nullptr;
362  h2_ele_foundHitsVsPt = nullptr;
363  h1_ele_lostHits = nullptr;
364  h1_ele_lostHits_barrel = nullptr;
365  h1_ele_lostHits_endcaps = nullptr;
366  h2_ele_lostHitsVsEta = nullptr;
367  h2_ele_lostHitsVsPhi = nullptr;
368  h2_ele_lostHitsVsPt = nullptr;
369  h1_ele_chi2 = nullptr;
370  h1_ele_chi2_barrel = nullptr;
371  h1_ele_chi2_endcaps = nullptr;
372  h2_ele_chi2VsEta = nullptr;
373  h2_ele_chi2VsPhi = nullptr;
374  h2_ele_chi2VsPt = nullptr;
375 
376  h1_ele_PoPtrue = nullptr;
377  h1_ele_PoPtrue_barrel = nullptr;
378  h1_ele_PoPtrue_endcaps = nullptr;
379 
381  h2_ele_PoPtrueVsPhi = nullptr;
382  h2_ele_PoPtrueVsPt = nullptr;
383  h2_ele_sigmaIetaIetaVsPt = nullptr;
384 
389  h1_ele_PtoPttrue = nullptr;
390  h1_ele_PtoPttrue_barrel = nullptr;
391  h1_ele_PtoPttrue_endcaps = nullptr;
392  h1_ele_ChargeMnChargeTrue = nullptr;
393  h1_ele_EtaMnEtaTrue = nullptr;
394  h1_ele_EtaMnEtaTrue_barrel = nullptr;
395  h1_ele_EtaMnEtaTrue_endcaps = nullptr;
396  h2_ele_EtaMnEtaTrueVsEta = nullptr;
397  h2_ele_EtaMnEtaTrueVsPhi = nullptr;
398  h2_ele_EtaMnEtaTrueVsPt = nullptr;
399  h1_ele_PhiMnPhiTrue = nullptr;
400  h1_ele_PhiMnPhiTrue_barrel = nullptr;
401  h1_ele_PhiMnPhiTrue_endcaps = nullptr;
402  h1_ele_PhiMnPhiTrue2 = nullptr;
403  h2_ele_PhiMnPhiTrueVsEta = nullptr;
404  h2_ele_PhiMnPhiTrueVsPhi = nullptr;
405  h2_ele_PhiMnPhiTrueVsPt = nullptr;
406  h1_ele_PinMnPout = nullptr;
407  h1_ele_PinMnPout_mode = nullptr;
408  h2_ele_PinMnPoutVsEta_mode = nullptr;
409  h2_ele_PinMnPoutVsPhi_mode = nullptr;
410  h2_ele_PinMnPoutVsPt_mode = nullptr;
411  h2_ele_PinMnPoutVsE_mode = nullptr;
412  h2_ele_PinMnPoutVsChi2_mode = nullptr;
413 
414  h1_ele_outerP = nullptr;
415  h1_ele_outerP_mode = nullptr;
416  h2_ele_outerPVsEta_mode = nullptr;
417  h1_ele_outerPt = nullptr;
418  h1_ele_outerPt_mode = nullptr;
419  h2_ele_outerPtVsEta_mode = nullptr;
420  h2_ele_outerPtVsPhi_mode = nullptr;
421  h2_ele_outerPtVsPt_mode = nullptr;
422  h1_ele_EoP = nullptr;
423  h1_ele_EoP_barrel = nullptr;
424  h1_ele_EoP_endcaps = nullptr;
425  h2_ele_EoPVsEta_Extended = nullptr;
426  h2_ele_EoPVsPhi = nullptr;
427  h2_ele_EoPVsE = nullptr;
428  h1_ele_EseedOP = nullptr;
429  h1_ele_EseedOP_barrel = nullptr;
430  h1_ele_EseedOP_endcaps = nullptr;
431  h2_ele_EseedOPVsEta = nullptr;
432  h2_ele_EseedOPVsPhi = nullptr;
433  h2_ele_EseedOPVsE = nullptr;
434  h1_ele_EoPout = nullptr;
435  h1_ele_EoPout_barrel = nullptr;
436  h1_ele_EoPout_endcaps = nullptr;
437  h2_ele_EoPoutVsEta = nullptr;
438  h2_ele_EoPoutVsPhi = nullptr;
439  h2_ele_EoPoutVsE = nullptr;
440  h1_ele_EeleOPout = nullptr;
441  h1_ele_EeleOPout_barrel = nullptr;
442  h1_ele_EeleOPout_endcaps = nullptr;
443  h2_ele_EeleOPoutVsEta = nullptr;
444  h2_ele_EeleOPoutVsPhi = nullptr;
445  h2_ele_EeleOPoutVsE = nullptr;
446 
447  h1_ele_dEtaSc_propVtx = nullptr;
451  h1_ele_dEtaSc_propVtx_mAOD = nullptr;
454  h2_ele_dEtaScVsEta_propVtx = nullptr;
455  h2_ele_dEtaScVsPhi_propVtx = nullptr;
456  h2_ele_dEtaScVsPt_propVtx = nullptr;
457  h1_ele_dPhiSc_propVtx = nullptr;
461  h2_ele_dPhiScVsEta_propVtx = nullptr;
462  h2_ele_dPhiScVsPhi_propVtx = nullptr;
463  h2_ele_dPhiScVsPt_propVtx = nullptr;
464  h1_ele_dEtaCl_propOut = nullptr;
467  h2_ele_dEtaClVsEta_propOut = nullptr;
468  h2_ele_dEtaClVsPhi_propOut = nullptr;
469  h2_ele_dEtaClVsPt_propOut = nullptr;
470  h1_ele_dPhiCl_propOut = nullptr;
473  h1_ele_dPhiCl_propOut_mAOD = nullptr;
476  h2_ele_dPhiClVsEta_propOut = nullptr;
477  h2_ele_dPhiClVsPhi_propOut = nullptr;
478  h2_ele_dPhiClVsPt_propOut = nullptr;
479  h1_ele_dEtaEleCl_propOut = nullptr;
485  h1_ele_dPhiEleCl_propOut = nullptr;
491 
492  h1_ele_seed_subdet2 = nullptr;
493  h1_ele_seed_mask = nullptr;
494  h1_ele_seed_mask_bpix = nullptr;
495  h1_ele_seed_mask_fpix = nullptr;
496  h1_ele_seed_mask_tec = nullptr;
497  h1_ele_seed_dphi2 = nullptr;
498  h2_ele_seed_dphi2VsEta = nullptr;
499  h2_ele_seed_dphi2VsPt = nullptr;
500  h1_ele_seed_dphi2pos = nullptr;
501  h2_ele_seed_dphi2posVsEta = nullptr;
502  h2_ele_seed_dphi2posVsPt = nullptr;
503  h1_ele_seed_drz2 = nullptr;
504  h2_ele_seed_drz2VsEta = nullptr;
505  h2_ele_seed_drz2VsPt = nullptr;
506  h1_ele_seed_drz2pos = nullptr;
507  h2_ele_seed_drz2posVsEta = nullptr;
508  h2_ele_seed_drz2posVsPt = nullptr;
509 
510  h1_ele_classes = nullptr;
511  h1_ele_eta = nullptr;
512  h1_ele_eta_golden = nullptr;
513  h1_ele_eta_bbrem = nullptr;
514  h1_ele_eta_shower = nullptr;
515 
516  h1_ele_HoE = nullptr;
517  h1_ele_HoE_Extended = nullptr;
518  h1_ele_HoE_barrel = nullptr;
519  h1_ele_HoE_endcaps = nullptr;
520  h1_ele_HoE_fiducial = nullptr;
521  h2_ele_HoEVsEta = nullptr;
522  h2_ele_HoEVsPhi = nullptr;
523  h2_ele_HoEVsE = nullptr;
524  h1_ele_HoE_mAOD = nullptr;
525  h1_ele_HoE_mAOD_barrel = nullptr;
526  h1_ele_HoE_mAOD_endcaps = nullptr;
527 
528  h1_ele_fbrem = nullptr;
529  h1_ele_fbrem_Extended = nullptr;
530  h1_ele_fbrem_barrel = nullptr;
531  h1_ele_fbrem_endcaps = nullptr;
532  p1_ele_fbremVsEta_mode = nullptr;
533  p1_ele_fbremVsEta_mean = nullptr;
534  h1_ele_fbrem_mAOD = nullptr;
535  h1_ele_fbrem_mAOD_barrel = nullptr;
536  h1_ele_fbrem_mAOD_endcaps = nullptr;
537  h1_ele_superclusterfbrem = nullptr;
538 
541  h2_ele_PinVsPoutGolden_mode = nullptr;
543  h2_ele_PinVsPoutGolden_mean = nullptr;
549  h1_scl_EoEtrueGolden_barrel = nullptr;
553 
554  h1_ele_mva = nullptr;
555  h1_ele_mva_isolated = nullptr;
556  h1_ele_provenance = nullptr;
557  h1_ele_provenance_Extended = nullptr;
558 
559  // isolation
560  h1_ele_tkSumPt_dr03 = nullptr;
561  h1_ele_tkSumPt_dr03_barrel = nullptr;
562  h1_ele_tkSumPt_dr03_endcaps = nullptr;
563  h1_ele_ecalRecHitSumEt_dr03 = nullptr;
570 
571  h1_ele_ecalPFClusterIso = nullptr;
572  h1_ele_hcalPFClusterIso = nullptr;
579 
580  // conversions
581  h1_ele_convFlags = nullptr;
582  h1_ele_convFlags_all = nullptr;
583  h1_ele_convDist = nullptr;
584  h1_ele_convDist_all = nullptr;
585  h1_ele_convDcot = nullptr;
586  h1_ele_convDcot_all = nullptr;
587  h1_ele_convRadius = nullptr;
588  h1_ele_convRadius_all = nullptr;
589 
590  // PF
599  h1_ele_photonRelativeIso = nullptr;
612 }
613 
616 
617  // prepareStore() ;
618  setBookIndex(-1);
619  setBookPrefix("h");
622 
623  // mc truth collections sizes
624  h1_mcNum = bookH1withSumw2(iBooker, "mcNum", "# mc particles", fhits_nbin, 0., fhits_max, "N_{gen}");
625  h1_eleNum = bookH1withSumw2(iBooker, "mcNum_ele", "# mc electrons", fhits_nbin, 0., fhits_max, "N_{gen ele}");
626  h1_gamNum = bookH1withSumw2(iBooker, "mcNum_gam", "# mc gammas", fhits_nbin, 0., fhits_max, "N_{gen #gamma}");
627 
628  // rec event collections sizes
629  h1_recEleNum = bookH1(iBooker, "recEleNum", "# rec electrons", ele_nbin, ele_min, ele_max, "N_{ele}");
630  h1_recCoreNum = bookH1(iBooker, "recCoreNum", "# rec electron cores", core_nbin, core_min, core_max, "N_{core}");
631  h1_recTrackNum = bookH1(iBooker, "recTrackNum", "# rec gsf tracks", track_nbin, track_min, track_max, "N_{track}");
632  h1_recSeedNum = bookH1(iBooker, "recSeedNum", "# rec electron seeds", seed_nbin, seed_min, seed_max, "N_{seed}");
634  iBooker, "recOfflineVertices", "# rec Offline Primary Vertices", opv_nbin, opv_min, opv_max, "N_{Vertices}");
635 
637  "scl_EoEtrueVsrecOfflineVertices",
638  "E/Etrue vs number of primary vertices",
639  opv_nbin, // 10,
640  opv_min, // 0.,
641  opv_max, // 50.,
642  50,
643  0.,
644  2.5,
645  "N_{primary vertices}",
646  "E/E_{true}");
648  "scl_EoEtrueVsrecOfflineVertices_Extended",
649  "E/Etrue vs number of primary vertices, 2.5<|eta|<3",
650  opv_nbin, // 10,
651  opv_min, // 0.,
652  opv_max, // 50.,
653  50,
654  0.,
655  2.5,
656  "N_{primary vertices}",
657  "E/E_{true}");
659  "scl_EoEtrueVsrecOfflineVertices_barrel",
660  "E/Etrue vs number of primary , barrel",
661  opv_nbin, // 10,
662  opv_min, // 0.,
663  opv_max, // 50.,
664  50,
665  0.,
666  2.5,
667  "N_{primary vertices}",
668  "E/E_{true}");
670  "scl_EoEtrueVsrecOfflineVertices_endcaps",
671  "E/Etrue vs number of primary , endcaps",
672  opv_nbin, // 10,
673  opv_min, // 0.,
674  opv_max, // 50.,
675  50,
676  0.,
677  2.5,
678  "N_{primary vertices}",
679  "E/E_{true}");
680 
681  // mc
682  setBookPrefix("h_mc");
683  h1_mc_Eta = bookH1withSumw2(iBooker, "Eta", "gen #eta", eta_nbin, eta_min, eta_max, "#eta");
685  iBooker, "Eta_Extended", "gen #eta", eta_nbin_extended, eta_min_extended, eta_max_extended, "#eta");
686  h1_mc_AbsEta = bookH1withSumw2(iBooker, "AbsEta", "gen |#eta|", eta_nbin / 2, 0., eta_max);
688  bookH1withSumw2(iBooker, "AbsEta_Extended", "gen |#eta|", eta_nbin_extended / 2, 0., eta_max_extended);
689  h1_mc_P = bookH1withSumw2(iBooker, "P", "gen p", p_nbin, 0., p_max, "p (GeV/c)");
690  h1_mc_Pt = bookH1withSumw2(iBooker, "Pt", "gen pt", pteff_nbin, 5., pt_max);
691  h1_mc_Phi = bookH1withSumw2(iBooker, "Phi", "gen phi", phi_nbin, phi_min, phi_max);
692  h1_mc_Z = bookH1withSumw2(iBooker, "Z", "gen z ", xyz_nbin, -25, 25);
693  h2_mc_PtEta =
694  bookH2withSumw2(iBooker, "PtEta", "gen pt vs #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
695 
696  // all electrons
697  setBookPrefix("h_ele");
699  "EoverP_all",
700  "ele E/P_{vertex}, all reco electrons",
701  eop_nbin,
702  0.,
703  eop_max,
704  "E/P_{vertex}",
705  "Events",
706  "ELE_LOGY E1 P");
708  "EoverP_all_barrel",
709  "ele E/P_{vertex}, all reco electrons, barrel",
710  eop_nbin,
711  0.,
712  eop_max,
713  "E/P_{vertex}",
714  "Events",
715  "ELE_LOGY E1 P");
717  "EoverP_all_endcaps",
718  "ele E/P_{vertex}, all reco electrons, endcaps",
719  eop_nbin,
720  0.,
721  eop_max,
722  "E/P_{vertex}",
723  "Events",
724  "ELE_LOGY E1 P");
726  "EseedOP_all",
727  "ele E_{seed}/P_{vertex}, all reco electrons",
728  eop_nbin,
729  0.,
730  eop_max,
731  "E_{seed}/P_{vertex}",
732  "Events",
733  "ELE_LOGY E1 P");
735  "EseedOP_all_barrel",
736  "ele E_{seed}/P_{vertex}, all reco electrons, barrel",
737  eop_nbin,
738  0.,
739  eop_max,
740  "E_{seed}/P_{vertex}",
741  "Events",
742  "ELE_LOGY E1 P");
744  "EseedOP_all_endcaps",
745  "ele E_{seed}/P_{vertex}, all reco electrons, endcaps",
746  eop_nbin,
747  0.,
748  eop_max,
749  "E_{seed}/P_{vertex}",
750  "Events",
751  "ELE_LOGY E1 P");
753  "EoPout_all",
754  "ele E_{seed}/P_{out}, all reco electrons",
755  eop_nbin,
756  0.,
757  eop_max,
758  "E_{seed}/P_{out}",
759  "Events",
760  "ELE_LOGY E1 P");
762  "EeleOPout_all",
763  "ele E_{ele}/P_{out}, all reco electrons",
764  eop_nbin,
765  0.,
766  eop_max,
767  "E_{ele}/P_{out}",
768  "Events",
769  "ELE_LOGY E1 P");
771  "dEtaSc_propVtx_all",
772  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
776  "#eta_{sc} - #eta_{tr}",
777  "Events",
778  "ELE_LOGY E1 P");
780  bookH1withSumw2(iBooker,
781  "dEtaSc_propVtx_all_barrel",
782  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons barrel",
786  "#eta_{sc} - #eta_{tr}",
787  "Events",
788  "ELE_LOGY E1 P");
790  bookH1withSumw2(iBooker,
791  "dEtaSc_propVtx_all_endcaps",
792  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons endcaps",
796  "#eta_{sc} - #eta_{tr}",
797  "Events",
798  "ELE_LOGY E1 P");
800  "dPhiSc_propVtx_all",
801  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
805  "#phi_{sc} - #phi_{tr} (rad)",
806  "Events",
807  "ELE_LOGY E1 P");
809  bookH1withSumw2(iBooker,
810  "dPhiSc_propVtx_all_barrel",
811  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons barrel",
815  "#phi_{sc} - #phi_{tr} (rad)",
816  "Events",
817  "ELE_LOGY E1 P");
819  bookH1withSumw2(iBooker,
820  "dPhiSc_propVtx_all_endcaps",
821  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons endcaps",
825  "#phi_{sc} - #phi_{tr} (rad)",
826  "Events",
827  "ELE_LOGY E1 P");
829  "dEtaCl_propOut_all",
830  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
834  "#eta_{sc} - #eta_{tr}",
835  "Events",
836  "ELE_LOGY E1 P");
838  bookH1withSumw2(iBooker,
839  "dEtaCl_propOut_all_barrel",
840  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons barrel",
844  "#eta_{sc} - #eta_{tr}",
845  "Events",
846  "ELE_LOGY E1 P");
848  bookH1withSumw2(iBooker,
849  "dEtaCl_propOut_all_endcaps",
850  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons endcaps",
854  "#eta_{sc} - #eta_{tr}",
855  "Events",
856  "ELE_LOGY E1 P");
858  "dPhiCl_propOut_all",
859  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
863  "#phi_{sc} - #phi_{tr} (rad)",
864  "Events",
865  "ELE_LOGY E1 P");
867  bookH1withSumw2(iBooker,
868  "dPhiCl_propOut_all_barrel",
869  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons barrel",
873  "#phi_{sc} - #phi_{tr} (rad)",
874  "Events",
875  "ELE_LOGY E1 P");
877  bookH1withSumw2(iBooker,
878  "dPhiCl_propOut_all_endcaps",
879  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons endcaps",
883  "#phi_{sc} - #phi_{tr} (rad)",
884  "Events",
885  "ELE_LOGY E1 P");
887  "HoE_all",
888  "ele hadronic energy / em energy, all reco electrons",
889  hoe_nbin,
890  hoe_min,
891  hoe_max,
892  "H/E",
893  "Events",
894  "ELE_LOGY E1 P");
896  "HoE_all_barrel",
897  "ele hadronic energy / em energy, all reco electrons barrel",
898  hoe_nbin,
899  hoe_min,
900  hoe_max,
901  "H/E",
902  "Events",
903  "ELE_LOGY E1 P");
905  "HoE_all_endcaps",
906  "ele hadronic energy / em energy, all reco electrons endcaps",
907  hoe_nbin,
908  hoe_min,
909  hoe_max,
910  "H/E",
911  "Events",
912  "ELE_LOGY E1 P");
914  "HoE_bc_all",
915  "ele hadronic energy / em energy, all reco electrons, behind cluster",
916  hoe_nbin,
917  hoe_min,
918  hoe_max,
919  "H/E",
920  "Events",
921  "ELE_LOGY E1 P");
923  bookH1withSumw2(iBooker, "vertexPt_all", "ele p_{T}, all reco electrons", pteff_nbin, 5., pt_max, "", "Events");
924  h1_ele_Et_all = bookH1withSumw2(iBooker,
925  "Et_all",
926  "ele ecal E_{T}, all reco electrons",
927  pteff_nbin,
928  5.,
929  pt_max,
930  "E_{T} (GeV)",
931  "Events",
932  "ELE_LOGY E1 P");
934  iBooker, "vertexEta_all", "ele eta, all reco electrons", eta_nbin, eta_min, eta_max, "", "Events");
936  "TIP_all",
937  "ele vertex transverse radius, all reco electrons",
938  100,
939  0.,
940  0.2,
941  "r_{T} (cm)",
942  "Events",
943  "ELE_LOGY E1 P");
945  "TIP_all_barrel",
946  "ele vertex transverse radius, all reco electrons barrel",
947  100,
948  0.,
949  0.2,
950  "r_{T} (cm)",
951  "Events",
952  "ELE_LOGY E1 P");
954  "TIP_all_endcaps",
955  "ele vertex transverse radius, all reco electrons endcaps",
956  100,
957  0.,
958  0.2,
959  "r_{T} (cm)",
960  "Events",
961  "ELE_LOGY E1 P");
963  "mee_all",
964  "ele pairs invariant mass, all reco electrons",
965  mee_nbin,
966  mee_min,
967  mee_max,
968  "m_{ee} (GeV/c^{2})",
969  "Events",
970  "ELE_LOGY E1 P");
971  h1_ele_mee_os = bookH1withSumw2(iBooker,
972  "mee_os",
973  "ele pairs invariant mass, opp. sign",
974  mee_nbin,
975  mee_min,
976  mee_max,
977  "m_{e^{+}e^{-}} (GeV/c^{2})",
978  "Events",
979  "ELE_LOGY E1 P");
981  "mee_os_ebeb",
982  "ele pairs invariant mass, opp. sign, EB-EB",
983  mee_nbin,
984  mee_min,
985  mee_max,
986  "m_{e^{+}e^{-}} (GeV/c^{2})",
987  "Events",
988  "ELE_LOGY E1 P");
990  "mee_os_ebee",
991  "ele pairs invariant mass, opp. sign, EB-EE",
992  mee_nbin,
993  mee_min,
994  mee_max,
995  "m_{e^{+}e^{-}} (GeV/c^{2})",
996  "Events",
997  "ELE_LOGY E1 P");
999  "mee_os_eeee",
1000  "ele pairs invariant mass, opp. sign, EE-EE",
1001  mee_nbin,
1002  mee_min,
1003  mee_max,
1004  "m_{e^{+}e^{-}} (GeV/c^{2})",
1005  "Events",
1006  "ELE_LOGY E1 P");
1008  "mee_os_gg",
1009  "ele pairs invariant mass, opp. sign, good-good",
1010  mee_nbin,
1011  mee_min,
1012  mee_max,
1013  "m_{e^{+}e^{-}} (GeV/c^{2})",
1014  "Events",
1015  "ELE_LOGY E1 P");
1017  "mee_os_gb",
1018  "ele pairs invariant mass, opp. sign, good-bad",
1019  mee_nbin,
1020  mee_min,
1021  mee_max,
1022  "m_{e^{+}e^{-}} (GeV/c^{2})",
1023  "Events",
1024  "ELE_LOGY E1 P");
1026  "mee_os_bb",
1027  "ele pairs invariant mass, opp. sign, bad-bad",
1028  mee_nbin,
1029  mee_min,
1030  mee_max,
1031  "m_{e^{+}e^{-}} (GeV/c^{2})",
1032  "Events",
1033  "ELE_LOGY E1 P");
1034 
1035  // duplicates
1036  h2_ele_E2mnE1vsMee_all = bookH2(iBooker,
1037  "E2mnE1vsMee_all",
1038  "E2 - E1 vs ele pairs invariant mass, all electrons",
1039  mee_nbin,
1040  mee_min,
1041  mee_max,
1042  100,
1043  -50.,
1044  50.,
1045  "m_{e^{+}e^{-}} (GeV/c^{2})",
1046  "E2 - E1 (GeV)");
1048  "E2mnE1vsMee_egeg_all",
1049  "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
1050  mee_nbin,
1051  mee_min,
1052  mee_max,
1053  100,
1054  -50.,
1055  50.,
1056  "m_{e^{+}e^{-}} (GeV/c^{2})",
1057  "E2 - E1 (GeV)");
1058 
1059  // charge ID
1061  bookH1withSumw2(iBooker, "ChargeMnChargeTrue", "ele charge - gen charge ", 5, -1., 4., "q_{rec} - q_{gen}");
1062  setBookPrefix("h_mc");
1064  bookH1withSumw2(iBooker, "Eta_matched_qmisid", "charge misid vs gen eta", eta_nbin, eta_min, eta_max);
1066  bookH1withSumw2(iBooker, "AbsEta_matched_qmisid", "charge misid vs gen |eta|", eta_nbin / 2, 0., eta_max);
1068  bookH1withSumw2(iBooker, "Pt_matched_qmisid", "charge misid vs gen transverse momentum", pteff_nbin, 5., pt_max);
1070  bookH1withSumw2(iBooker, "Phi_matched_qmisid", "charge misid vs gen phi", phi_nbin, phi_min, phi_max);
1071  h1_mc_Z_matched_qmisid = bookH1withSumw2(iBooker, "Z_matched_qmisid", "charge misid vs gen z", xyz_nbin, -25, 25);
1072 
1073  // matched electrons
1074  setBookPrefix("h_mc");
1076  "Eta_Extended_matched",
1077  "Eta of matched electrons",
1082  bookH1withSumw2(iBooker, "AbsEta_matched", "Efficiency vs gen |eta|", eta_nbin / 2, 0., eta_max);
1084  iBooker, "AbsEta_Extended_matched", "Efficiency vs gen |eta|", eta_nbin_extended / 2, 0., eta_max_extended);
1085  h1_mc_Pt_matched = bookH1(iBooker, "Pt_matched", "Efficiency vs gen transverse momentum", pteff_nbin, 5., pt_max);
1086  h1_mc_Phi_matched = bookH1withSumw2(iBooker, "Phi_matched", "Efficiency vs gen phi", phi_nbin, phi_min, phi_max);
1087  h1_mc_Z_matched = bookH1withSumw2(iBooker, "Z_matched", "Efficiency vs gen vertex z", xyz_nbin, -25, 25);
1089  iBooker, "PtEta_matched", "Efficiency vs pt #eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 5., pt_max);
1090  setBookPrefix("h_ele");
1091  h1_ele_charge = bookH1withSumw2(iBooker, "charge", "ele charge", 5, -2.5, 2.5, "charge");
1092  h2_ele_chargeVsEta = bookH2(iBooker, "chargeVsEta", "ele charge vs eta", eta2D_nbin, eta_min, eta_max, 5, -2., 2.);
1093  h2_ele_chargeVsPhi = bookH2(iBooker, "chargeVsPhi", "ele charge vs phi", phi2D_nbin, phi_min, phi_max, 5, -2., 2.);
1094  h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt", "ele charge vs pt", pt_nbin, 0., 100., 5, -2., 2.);
1095  h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP", "ele momentum", p_nbin, 0., p_max, "p_{vertex} (GeV/c)");
1096  h1_ele_vertexPt =
1097  bookH1withSumw2(iBooker, "vertexPt", "ele transverse momentum", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1099  iBooker, "vertexPt_EB", "ele transverse momentum barrel", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1101  iBooker, "vertexPt_EE", "ele transverse momentum endcaps", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1103  iBooker, "vertexPt_nocut", "pT of prunned electrons", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
1104  h1_ele_Et = bookH1withSumw2(iBooker, "Et", "ele ecal E_{T}", pt_nbin, 0., pt_max, "E_{T} (GeV)");
1106  iBooker, "vertexPtVsEta", "ele transverse momentum vs eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 0., pt_max);
1108  iBooker, "vertexPtVsPhi", "ele transverse momentum vs phi", phi2D_nbin, phi_min, phi_max, pt2D_nbin, 0., pt_max);
1109  h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta", "ele momentum eta", eta_nbin, eta_min, eta_max, "#eta");
1111  iBooker, "vertexEtaVsPhi", "ele momentum eta vs phi", eta2D_nbin, eta_min, eta_max, phi2D_nbin, phi_min, phi_max);
1113  bookH1withSumw2(iBooker, "vertexPhi", "ele momentum #phi", phi_nbin, phi_min, phi_max, "#phi (rad)");
1114  h1_ele_vertexX = bookH1withSumw2(iBooker, "vertexX", "ele vertex x", xyz_nbin, -0.6, 0.6, "x (cm)");
1115  h1_ele_vertexY = bookH1withSumw2(iBooker, "vertexY", "ele vertex y", xyz_nbin, -0.6, 0.6, "y (cm)");
1116  h1_ele_vertexZ = bookH1withSumw2(iBooker, "vertexZ", "ele vertex z", xyz_nbin, -25, 25, "z (cm)");
1118  bookH1withSumw2(iBooker, "vertexTIP", "ele transverse impact parameter (wrt gen vtx)", 90, 0., 0.15, "TIP (cm)");
1119  h2_ele_vertexTIPVsEta = bookH2(iBooker,
1120  "vertexTIPVsEta",
1121  "ele transverse impact parameter (wrt gen vtx) vs eta",
1122  eta2D_nbin,
1123  eta_min,
1124  eta_max,
1125  45,
1126  0.,
1127  0.15,
1128  "#eta",
1129  "TIP (cm)");
1130  h2_ele_vertexTIPVsPhi = bookH2(iBooker,
1131  "vertexTIPVsPhi",
1132  "ele transverse impact parameter (wrt gen vtx) vs phi",
1133  phi2D_nbin,
1134  phi_min,
1135  phi_max,
1136  45,
1137  0.,
1138  0.15,
1139  "#phi (rad)",
1140  "TIP (cm)");
1141  h2_ele_vertexTIPVsPt = bookH2(iBooker,
1142  "vertexTIPVsPt",
1143  "ele transverse impact parameter (wrt gen vtx) vs transverse momentum",
1144  pt2D_nbin,
1145  0.,
1146  pt_max,
1147  45,
1148  0.,
1149  0.15,
1150  "p_{T} (GeV/c)",
1151  "TIP (cm)");
1153  iBooker, "PoPtrue", "ele momentum / gen momentum", poptrue_nbin, poptrue_min, poptrue_max, "P/P_{gen}");
1155  "PoPtrue_barrel",
1156  "ele momentum / gen momentum, barrel",
1157  poptrue_nbin,
1158  poptrue_min,
1159  poptrue_max,
1160  "P/P_{gen}");
1162  "PoPtrue_endcaps",
1163  "ele momentum / gen momentum, endcaps",
1164  poptrue_nbin,
1165  poptrue_min,
1166  poptrue_max,
1167  "P/P_{gen}");
1169  "PoPtrueVsEta_Extended",
1170  "ele momentum / gen momentum vs eta",
1174  50,
1175  poptrue_min,
1176  poptrue_max);
1177  h2_ele_PoPtrueVsPhi = bookH2(iBooker,
1178  "PoPtrueVsPhi",
1179  "ele momentum / gen momentum vs phi",
1180  phi2D_nbin,
1181  phi_min,
1182  phi_max,
1183  50,
1184  poptrue_min,
1185  poptrue_max);
1187  iBooker, "PoPtrueVsPt", "ele momentum / gen momentum vs eta", pt2D_nbin, 0., pt_max, 50, poptrue_min, poptrue_max);
1189  bookH2(iBooker, "sigmaIetaIetaVsPt", "SigmaIetaIeta vs pt", 100, 0., pt_max, 100, 0., 0.05);
1191  "PoPtrue_golden_barrel",
1192  "ele momentum / gen momentum, golden, barrel",
1193  poptrue_nbin,
1194  poptrue_min,
1195  poptrue_max,
1196  "P/P_{gen}");
1198  "PoPtrue_golden_endcaps",
1199  "ele momentum / gen momentum, golden, endcaps",
1200  poptrue_nbin,
1201  poptrue_min,
1202  poptrue_max,
1203  "P/P_{gen}");
1205  "PoPtrue_showering_barrel",
1206  "ele momentum / gen momentum, showering, barrel",
1207  poptrue_nbin,
1208  poptrue_min,
1209  poptrue_max,
1210  "P/P_{gen}");
1212  "PoPtrue_showering_endcaps",
1213  "ele momentum / gen momentum, showering, endcaps",
1214  poptrue_nbin,
1215  poptrue_min,
1216  poptrue_max,
1217  "P/P_{gen}");
1219  "PtoPttrue",
1220  "ele transverse momentum / gen transverse momentum",
1221  poptrue_nbin,
1222  poptrue_min,
1223  poptrue_max,
1224  "P_{T}/P_{T}^{gen}");
1226  "PtoPttrue_barrel",
1227  "ele transverse momentum / gen transverse momentum, barrel",
1228  poptrue_nbin,
1229  poptrue_min,
1230  poptrue_max,
1231  "P_{T}/P_{T}^{gen}");
1233  "PtoPttrue_endcaps",
1234  "ele transverse momentum / gen transverse momentum, endcaps",
1235  poptrue_nbin,
1236  poptrue_min,
1237  poptrue_max,
1238  "P_{T}/P_{T}^{gen}");
1240  iBooker, "EtaMnEtaTrue", "ele momentum eta - gen eta", deta_nbin, deta_min, deta_max, "#eta_{rec} - #eta_{gen}");
1242  "EtaMnEtaTrue_barrel",
1243  "ele momentum eta - gen eta barrel",
1244  deta_nbin,
1245  deta_min,
1246  deta_max,
1247  "#eta_{rec} - #eta_{gen}");
1249  "EtaMnEtaTrue_endcaps",
1250  "ele momentum eta - gen eta endcaps",
1251  deta_nbin,
1252  deta_min,
1253  deta_max,
1254  "#eta_{rec} - #eta_{gen}");
1255  h2_ele_EtaMnEtaTrueVsEta = bookH2(iBooker,
1256  "EtaMnEtaTrueVsEta",
1257  "ele momentum eta - gen eta vs eta",
1258  eta2D_nbin,
1259  eta_min,
1260  eta_max,
1261  deta_nbin / 2,
1262  deta_min,
1263  deta_max);
1264  h2_ele_EtaMnEtaTrueVsPhi = bookH2(iBooker,
1265  "EtaMnEtaTrueVsPhi",
1266  "ele momentum eta - gen eta vs phi",
1267  phi2D_nbin,
1268  phi_min,
1269  phi_max,
1270  deta_nbin / 2,
1271  deta_min,
1272  deta_max);
1273  h2_ele_EtaMnEtaTrueVsPt = bookH2(iBooker,
1274  "EtaMnEtaTrueVsPt",
1275  "ele momentum eta - gen eta vs pt",
1276  pt_nbin,
1277  0.,
1278  pt_max,
1279  deta_nbin / 2,
1280  deta_min,
1281  deta_max);
1283  "PhiMnPhiTrue",
1284  "ele momentum phi - gen phi",
1285  dphi_nbin,
1286  dphi_min,
1287  dphi_max,
1288  "#phi_{rec} - #phi_{gen} (rad)");
1290  "PhiMnPhiTrue_barrel",
1291  "ele momentum phi - gen phi barrel",
1292  dphi_nbin,
1293  dphi_min,
1294  dphi_max,
1295  "#phi_{rec} - #phi_{gen} (rad)");
1297  "PhiMnPhiTrue_endcaps",
1298  "ele momentum phi - gen phi endcaps",
1299  dphi_nbin,
1300  dphi_min,
1301  dphi_max,
1302  "#phi_{rec} - #phi_{gen} (rad)");
1304  bookH1(iBooker, "PhiMnPhiTrue2", "ele momentum phi - gen phi", dphimatch2D_nbin, dphimatch_min, dphimatch_max);
1305  h2_ele_PhiMnPhiTrueVsEta = bookH2(iBooker,
1306  "PhiMnPhiTrueVsEta",
1307  "ele momentum phi - gen phi vs eta",
1308  eta2D_nbin,
1309  eta_min,
1310  eta_max,
1311  dphi_nbin / 2,
1312  dphi_min,
1313  dphi_max);
1314  h2_ele_PhiMnPhiTrueVsPhi = bookH2(iBooker,
1315  "PhiMnPhiTrueVsPhi",
1316  "ele momentum phi - gen phi vs phi",
1317  phi2D_nbin,
1318  phi_min,
1319  phi_max,
1320  dphi_nbin / 2,
1321  dphi_min,
1322  dphi_max);
1323  h2_ele_PhiMnPhiTrueVsPt = bookH2(iBooker,
1324  "PhiMnPhiTrueVsPt",
1325  "ele momentum phi - gen phi vs pt",
1326  pt2D_nbin,
1327  0.,
1328  pt_max,
1329  dphi_nbin / 2,
1330  dphi_min,
1331  dphi_max);
1333  iBooker, "ecalEnergyError", "Regression estimate of the ECAL energy error", error_nbin, 0, enerror_max);
1335  iBooker, "ecalEnergyError_barrel", "Regression estimate of the ECAL energy error - barrel", 30, 0, 30);
1337  "ecalEnergyError_endcaps",
1338  "Regression estimate of the ECAL energy error - endcaps",
1339  error_nbin,
1340  0,
1341  enerror_max);
1343  iBooker, "combinedP4Error", "Estimated error on the combined momentum", error_nbin, 0, enerror_max);
1345  iBooker, "combinedP4Error_barrel", "Estimated error on the combined momentum - barrel", 30, 0, 30);
1347  "combinedP4Error_endcaps",
1348  "Estimated error on the combined momentum - endcaps",
1349  error_nbin,
1350  0,
1351  enerror_max);
1352 
1353  // matched electron, superclusters
1354  setBookPrefix("h_scl");
1355  h1_scl_En = bookH1withSumw2(iBooker, "energy", "ele ecal energy", p_nbin, 0., p_max);
1357  bookH1withSumw2(iBooker, "EoEtrue_barrel", "ele ecal energy / gen energy, barrel", 50, 0.2, 1.2, "E/E_{gen}");
1359  iBooker, "EoEtrue_barrel_etagap", "ele ecal energy / gen energy, barrel, etagap", 50, 0.2, 1.2, "E/E_{gen}");
1361  iBooker, "EoEtrue_barrel_phigap", "ele ecal energy / gen energy, barrel, phigap", 50, 0.2, 1.2, "E/E_{gen}");
1363  bookH1withSumw2(iBooker, "EoEtrue_ebeegap", "ele ecal energy / gen energy, ebeegap", 50, 0.2, 1.2, "E/E_{gen}");
1365  bookH1withSumw2(iBooker, "EoEtrue_endcaps", "ele ecal energy / gen energy, endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1367  iBooker, "EoEtrue_endcaps_deegap", "ele ecal energy / gen energy, endcaps, deegap", 50, 0.2, 1.2, "E/E_{gen}");
1369  iBooker, "EoEtrue_endcaps_ringgap", "ele ecal energy / gen energy, endcaps, ringgap", 50, 0.2, 1.2, "E/E_{gen}");
1371  "EoEtrue_barrel_new",
1372  "ele ecal energy / gen energy, barrel",
1373  poptrue_nbin,
1374  poptrue_min,
1375  poptrue_max,
1376  "E/E_{gen}");
1378  "EoEtrue_barrel_new_etagap",
1379  "ele ecal energy / gen energy, barrel, etagap",
1380  poptrue_nbin,
1381  poptrue_min,
1382  poptrue_max,
1383  "E/E_{gen}");
1385  "EoEtrue_barrel_new_phigap",
1386  "ele ecal energy / gen energy, barrel, phigap",
1387  poptrue_nbin,
1388  poptrue_min,
1389  poptrue_max,
1390  "E/E_{gen}");
1392  "EoEtrue_ebeegap_new",
1393  "ele ecal energy / gen energy, ebeegap",
1394  poptrue_nbin,
1395  poptrue_min,
1396  poptrue_max,
1397  "E/E_{gen}");
1399  "EoEtrue_endcaps_new",
1400  "ele ecal energy / gen energy, endcaps",
1401  poptrue_nbin,
1402  poptrue_min,
1403  poptrue_max,
1404  "E/E_{gen}");
1406  "EoEtrue_endcaps_new_Extended",
1407  "ele ecal energy / gen energy, endcaps, extended",
1408  poptrue_nbin,
1409  poptrue_min,
1410  poptrue_max,
1411  "E/E_{gen}");
1413  "EoEtrue_endcaps_new_deegap",
1414  "ele ecal energy / gen energy, endcaps, deegap",
1415  poptrue_nbin,
1416  poptrue_min,
1417  poptrue_max,
1418  "E/E_{gen}");
1420  "EoEtrue_endcaps_new_ringgap",
1421  "ele ecal energy / gen energy, endcaps, ringgap",
1422  poptrue_nbin,
1423  poptrue_min,
1424  poptrue_max,
1425  "E/E_{gen}");
1426  h1_scl_Et = bookH1withSumw2(iBooker, "et", "ele supercluster transverse energy", pt_nbin, 0., pt_max);
1427  h2_scl_EtVsEta = bookH2(iBooker,
1428  "etVsEta",
1429  "ele supercluster transverse energy vs eta",
1430  eta2D_nbin,
1431  eta_min,
1432  eta_max,
1433  pt_nbin,
1434  0.,
1435  pt_max);
1436  h2_scl_EtVsPhi = bookH2(iBooker,
1437  "etVsPhi",
1438  "ele supercluster transverse energy vs phi",
1439  phi2D_nbin,
1440  phi_min,
1441  phi_max,
1442  pt_nbin,
1443  0.,
1444  pt_max);
1446  iBooker, "etaVsPhi", "ele supercluster eta vs phi", phi2D_nbin, phi_min, phi_max, eta2D_nbin, eta_min, eta_max);
1447  h1_scl_Eta = bookH1withSumw2(iBooker, "eta", "ele supercluster eta", eta_nbin, eta_min, eta_max);
1448  h1_scl_Phi = bookH1withSumw2(iBooker, "phi", "ele supercluster phi", phi_nbin, phi_min, phi_max);
1450  "sigetaeta",
1451  "ele supercluster sigma eta eta",
1452  100,
1453  0.,
1454  0.05,
1455  "#sigma_{#eta #eta}",
1456  "Events",
1457  "ELE_LOGY E1 P");
1459  "sigetaeta_barrel",
1460  "ele supercluster sigma eta eta barrel",
1461  100,
1462  0.,
1463  0.05,
1464  "#sigma_{#eta #eta}",
1465  "Events",
1466  "ELE_LOGY E1 P");
1468  "sigetaeta_endcaps",
1469  "ele supercluster sigma eta eta endcaps",
1470  100,
1471  0.,
1472  0.05,
1473  "#sigma_{#eta #eta}",
1474  "Events",
1475  "ELE_LOGY E1 P");
1477  "sigietaieta",
1478  "ele supercluster sigma ieta ieta",
1479  100,
1480  0.,
1481  0.05,
1482  "#sigma_{i#eta i#eta}",
1483  "Events",
1484  "ELE_LOGY E1 P");
1486  "sigietaieta_barrel",
1487  "ele supercluster sigma ieta ieta, barrel",
1488  100,
1489  0.,
1490  0.05,
1491  "#sigma_{i#eta i#eta}",
1492  "Events",
1493  "ELE_LOGY E1 P");
1495  "sigietaieta_endcaps",
1496  "ele supercluster sigma ieta ieta, endcaps",
1497  100,
1498  0.,
1499  0.05,
1500  "#sigma_{i#eta i#eta}",
1501  "Events",
1502  "ELE_LOGY E1 P");
1504  "SigIEtaIEta_mAOD",
1505  "ele supercluster sigma ieta ieta",
1506  100,
1507  0.,
1508  0.05,
1509  "#sigma_{i#eta i#eta}",
1510  "Events",
1511  "ELE_LOGY E1 P");
1513  "SigIEtaIEta_mAOD_barrel",
1514  "ele supercluster sigma ieta ieta, barrel",
1515  100,
1516  0.,
1517  0.05,
1518  "#sigma_{i#eta i#eta}",
1519  "Events",
1520  "ELE_LOGY E1 P");
1522  "SigIEtaIEta_mAOD_endcaps",
1523  "ele supercluster sigma ieta ieta, endcaps",
1524  100,
1525  0.,
1526  0.05,
1527  "#sigma_{i#eta i#eta}",
1528  "Events",
1529  "ELE_LOGY E1 P");
1531  "full5x5_sigietaieta",
1532  "ele supercluster full5x5 sigma ieta ieta",
1533  100,
1534  0.,
1535  0.05,
1536  "#sigma_{i#eta i#eta}",
1537  "Events",
1538  "ELE_LOGY E1 P");
1540  "full5x5_sigietaieta_Extended",
1541  "ele supercluster full5x5 sigma ieta ieta, 2.5<|eta|<3",
1542  100,
1543  0.,
1544  0.05,
1545  "#sigma_{i#eta i#eta}",
1546  "Events",
1547  "ELE_LOGY E1 P");
1549  "full5x5_sigietaieta_barrel",
1550  "ele supercluster full5x5 sigma ieta ieta, barrel",
1551  100,
1552  0.,
1553  0.05,
1554  "#sigma_{i#eta i#eta}",
1555  "Events",
1556  "ELE_LOGY E1 P");
1558  "full5x5_sigietaieta_endcaps",
1559  "ele supercluster full5x5 sigma ieta ieta, endcaps",
1560  100,
1561  0.,
1562  0.05,
1563  "#sigma_{i#eta i#eta}",
1564  "Events",
1565  "ELE_LOGY E1 P");
1567  iBooker, "E1x5", "ele supercluster energy in 1x5", p_nbin, 0., p_max, "E1x5 (GeV)", "Events", "ELE_LOGY E1 P");
1569  "E1x5_barrel",
1570  "ele supercluster energy in 1x5 barrel",
1571  p_nbin,
1572  0.,
1573  p_max,
1574  "E1x5 (GeV)",
1575  "Events",
1576  "ELE_LOGY E1 P");
1578  "E1x5_endcaps",
1579  "ele supercluster energy in 1x5 endcaps",
1580  p_nbin,
1581  0.,
1582  p_max,
1583  "E1x5 (GeV)",
1584  "Events",
1585  "ELE_LOGY E1 P");
1586  h1_scl_E2x5max = bookH1withSumw2(iBooker,
1587  "E2x5max",
1588  "ele supercluster energy in 2x5 max",
1589  p_nbin,
1590  0.,
1591  p_max,
1592  "E2x5 (GeV)",
1593  "Events",
1594  "ELE_LOGY E1 P");
1596  "E2x5max_barrel",
1597  "ele supercluster energy in 2x5 _max barrel",
1598  p_nbin,
1599  0.,
1600  p_max,
1601  "E2x5 (GeV)",
1602  "Events",
1603  "ELE_LOGY E1 P");
1605  "E2x5max_endcaps",
1606  "ele supercluster energy in 2x5 _max endcaps",
1607  p_nbin,
1608  0.,
1609  p_max,
1610  "E2x5 (GeV)",
1611  "Events",
1612  "ELE_LOGY E1 P");
1614  iBooker, "E5x5", "ele supercluster energy in 5x5", p_nbin, 0., p_max, "E5x5 (GeV)", "Events", "ELE_LOGY E1 P");
1616  "E5x5_barrel",
1617  "ele supercluster energy in 5x5 barrel",
1618  p_nbin,
1619  0.,
1620  p_max,
1621  "E5x5 (GeV)",
1622  "Events",
1623  "ELE_LOGY E1 P");
1625  "E5x5_endcaps",
1626  "ele supercluster energy in 5x5 endcaps",
1627  p_nbin,
1628  0.,
1629  p_max,
1630  "E5x5 (GeV)",
1631  "Events",
1632  "ELE_LOGY E1 P");
1633  h2_scl_EoEtruePfVsEg = bookH2(iBooker,
1634  "EoEtruePfVsEg",
1635  "mean mustache SC/true energy vs final SC/true energy",
1636  75,
1637  -0.1,
1638  1.4,
1639  75,
1640  -0.1,
1641  1.4,
1642  "E_{final SC}/E_{gen}",
1643  "E_{mustache}/E_{gen}");
1645  bookH1withSumw2(iBooker, "bcl_EtotoEtrue", "Total basicclusters energy", 50, 0.2, 1.2, "E/E_{gen}");
1647  iBooker, "bcl_EtotoEtrue_Extended", "Total basicclusters energy, 2.5<|eta|<3", 50, 0.2, 1.2, "E/E_{gen}");
1649  iBooker, "bcl_EtotoEtrue_barrel", "Total basicclusters energy , barrel", 50, 0.2, 1.2, "E/E_{gen}");
1651  iBooker, "bcl_EtotoEtrue_endcaps", "Total basicclusters energy , endcaps", 50, 0.2, 1.2, "E/E_{gen}");
1653  "ESFrac_endcaps",
1654  "Preshower over SC raw energy , endcaps",
1655  100,
1656  0.,
1657  0.8,
1658  "E_{PS} / E^{raw}_{SC}",
1659  "Events",
1660  "ELE_LOGY E1 P");
1661 
1662  // matched electron, gsf tracks
1663  setBookPrefix("h_ele");
1665  "ambiguousTracks",
1666  "ele # ambiguous tracks",
1667  5,
1668  0.,
1669  5.,
1670  "N_{ambiguous tracks}",
1671  "Events",
1672  "ELE_LOGY E1 P");
1674  bookH2(iBooker, "ambiguousTracksVsEta", "ele # ambiguous tracks vs eta", eta2D_nbin, eta_min, eta_max, 5, 0., 5.);
1676  bookH2(iBooker, "ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", phi2D_nbin, phi_min, phi_max, 5, 0., 5.);
1678  bookH2(iBooker, "ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", pt2D_nbin, 0., pt_max, 5, 0., 5.);
1680  bookH1withSumw2(iBooker, "foundHits", "ele track # found hits", fhits_nbin, 0., fhits_max, "N_{hits}");
1682  iBooker, "foundHits_barrel", "ele track # found hits, barrel", fhits_nbin, 0., fhits_max, "N_{hits}");
1684  iBooker, "foundHits_endcaps", "ele track # found hits, endcaps", fhits_nbin, 0., fhits_max, "N_{hits}");
1686  "foundHitsVsEta_Extended",
1687  "ele track # found hits vs eta",
1691  fhits_nbin,
1692  0.,
1693  fhits_max);
1695  "foundHitsVsEta_mAOD",
1696  "ele track # found hits vs eta",
1697  eta2D_nbin,
1698  eta_min,
1699  eta_max,
1700  fhits_nbin,
1701  0.,
1702  fhits_max);
1703  h2_ele_foundHitsVsPhi = bookH2(iBooker,
1704  "foundHitsVsPhi",
1705  "ele track # found hits vs phi",
1706  phi2D_nbin,
1707  phi_min,
1708  phi_max,
1709  fhits_nbin,
1710  0.,
1711  fhits_max);
1713  iBooker, "foundHitsVsPt", "ele track # found hits vs pt", pt2D_nbin, 0., pt_max, fhits_nbin, 0., fhits_max);
1714  h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits", "ele track # lost hits", 5, 0., 5., "N_{lost hits}");
1716  bookH1withSumw2(iBooker, "lostHits_barrel", "ele track # lost hits, barrel", 5, 0., 5., "N_{lost hits}");
1718  bookH1withSumw2(iBooker, "lostHits_endcaps", "ele track # lost hits, endcaps", 5, 0., 5., "N_{lost hits}");
1720  iBooker, "lostHitsVsEta", "ele track # lost hits vs eta", eta2D_nbin, eta_min, eta_max, lhits_nbin, 0., lhits_max);
1722  iBooker, "lostHitsVsPhi", "ele track # lost hits vs eta", phi2D_nbin, phi_min, phi_max, lhits_nbin, 0., lhits_max);
1724  bookH2(iBooker, "lostHitsVsPt", "ele track # lost hits vs eta", pt2D_nbin, 0., pt_max, lhits_nbin, 0., lhits_max);
1725  h1_ele_chi2 =
1726  bookH1withSumw2(iBooker, "chi2", "ele track #chi^{2}", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1728  iBooker, "chi2_barrel", "ele track #chi^{2}, barrel", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1730  iBooker, "chi2_endcaps", "ele track #chi^{2}, endcaps", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1732  bookH2(iBooker, "chi2VsEta", "ele track #chi^{2} vs eta", eta2D_nbin, eta_min, eta_max, 50, 0., 15.);
1734  bookH2(iBooker, "chi2VsPhi", "ele track #chi^{2} vs phi", phi2D_nbin, phi_min, phi_max, 50, 0., 15.);
1735  h2_ele_chi2VsPt = bookH2(iBooker, "chi2VsPt", "ele track #chi^{2} vs pt", pt2D_nbin, 0., pt_max, 50, 0., 15.);
1737  "PinMnPout",
1738  "ele track inner p - outer p, mean of GSF components",
1739  p_nbin,
1740  0.,
1741  200.,
1742  "P_{vertex} - P_{out} (GeV/c)");
1744  "PinMnPout_mode",
1745  "ele track inner p - outer p, mode of GSF components",
1746  p_nbin,
1747  0.,
1748  100.,
1749  "P_{vertex} - P_{out}, mode of GSF components (GeV/c)");
1751  "PinMnPoutVsEta_mode",
1752  "ele track inner p - outer p vs eta, mode of GSF components",
1753  eta2D_nbin,
1754  eta_min,
1755  eta_max,
1756  p2D_nbin,
1757  0.,
1758  100.);
1760  "PinMnPoutVsPhi_mode",
1761  "ele track inner p - outer p vs phi, mode of GSF components",
1762  phi2D_nbin,
1763  phi_min,
1764  phi_max,
1765  p2D_nbin,
1766  0.,
1767  100.);
1769  "PinMnPoutVsPt_mode",
1770  "ele track inner p - outer p vs pt, mode of GSF components",
1771  pt2D_nbin,
1772  0.,
1773  pt_max,
1774  p2D_nbin,
1775  0.,
1776  100.);
1777  h2_ele_PinMnPoutVsE_mode = bookH2(iBooker,
1778  "PinMnPoutVsE_mode",
1779  "ele track inner p - outer p vs E, mode of GSF components",
1780  p2D_nbin,
1781  0.,
1782  200.,
1783  p2D_nbin,
1784  0.,
1785  100.);
1787  "PinMnPoutVsChi2_mode",
1788  "ele track inner p - outer p vs track chi2, mode of GSF components",
1789  50,
1790  0.,
1791  20.,
1792  p2D_nbin,
1793  0.,
1794  100.);
1796  iBooker, "outerP", "ele track outer p, mean of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1798  iBooker, "outerP_mode", "ele track outer p, mode of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1800  bookH2(iBooker, "outerPVsEta_mode", "ele track outer p vs eta mode", eta2D_nbin, eta_min, eta_max, 50, 0., p_max);
1802  iBooker, "outerPt", "ele track outer p_{T}, mean of GSF components", pt_nbin, 0., pt_max, "P_{T out} (GeV/c)");
1804  "outerPt_mode",
1805  "ele track outer p_{T}, mode of GSF components",
1806  pt_nbin,
1807  0.,
1808  pt_max,
1809  "P_{T out} (GeV/c)");
1810  h2_ele_outerPtVsEta_mode = bookH2(iBooker,
1811  "outerPtVsEta_mode",
1812  "ele track outer p_{T} vs eta, mode of GSF components",
1813  eta2D_nbin,
1814  eta_min,
1815  eta_max,
1816  pt2D_nbin,
1817  0.,
1818  pt_max);
1819  h2_ele_outerPtVsPhi_mode = bookH2(iBooker,
1820  "outerPtVsPhi_mode",
1821  "ele track outer p_{T} vs phi, mode of GSF components",
1822  phi2D_nbin,
1823  phi_min,
1824  phi_max,
1825  pt2D_nbin,
1826  0.,
1827  pt_max);
1828  h2_ele_outerPtVsPt_mode = bookH2(iBooker,
1829  "outerPtVsPt_mode",
1830  "ele track outer p_{T} vs pt, mode of GSF components",
1831  pt2D_nbin,
1832  0.,
1833  100.,
1834  pt2D_nbin,
1835  0.,
1836  pt_max);
1837 
1838  // matched electrons, matching
1840  iBooker, "EoP", "ele E/P_{vertex}", eop_nbin, 0., eop_max, "E/P_{vertex}", "Events", "ELE_LOGY E1 P");
1842  "EoP_barrel",
1843  "ele E/P_{vertex} barrel",
1844  eop_nbin,
1845  0.,
1846  eop_max,
1847  "E/P_{vertex}",
1848  "Events",
1849  "ELE_LOGY E1 P");
1851  "EoP_endcaps",
1852  "ele E/P_{vertex} endcaps",
1853  eop_nbin,
1854  0.,
1855  eop_max,
1856  "E/P_{vertex}",
1857  "Events",
1858  "ELE_LOGY E1 P");
1859  h2_ele_EoPVsEta_Extended = bookH2(iBooker,
1860  "EoPVsEta_Extended",
1861  "ele E/P_{vertex} vs eta",
1865  eop2D_nbin,
1866  0.,
1867  eopmaxsht);
1868  h2_ele_EoPVsPhi =
1869  bookH2(iBooker, "EoPVsPhi", "ele E/P_{vertex} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1870  h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE", "ele E/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1871  h1_ele_EseedOP = bookH1withSumw2(iBooker,
1872  "EseedOP",
1873  "ele E_{seed}/P_{vertex}",
1874  eop_nbin,
1875  0.,
1876  eop_max,
1877  "E_{seed}/P_{vertex}",
1878  "Events",
1879  "ELE_LOGY E1 P");
1881  "EseedOP_barrel",
1882  "ele E_{seed}/P_{vertex} barrel",
1883  eop_nbin,
1884  0.,
1885  eop_max,
1886  "E_{seed}/P_{vertex}",
1887  "Events",
1888  "ELE_LOGY E1 P");
1890  "EseedOP_endcaps",
1891  "ele E_{seed}/P_{vertex} endcaps",
1892  eop_nbin,
1893  0.,
1894  eop_max,
1895  "E_{seed}/P_{vertex}",
1896  "Events",
1897  "ELE_LOGY E1 P");
1898  h2_ele_EseedOPVsEta = bookH2(iBooker,
1899  "EseedOPVsEta",
1900  "ele E_{seed}/P_{vertex} vs eta",
1901  eta2D_nbin,
1902  eta_min,
1903  eta_max,
1904  eop2D_nbin,
1905  0.,
1906  eopmaxsht);
1907  h2_ele_EseedOPVsPhi = bookH2(iBooker,
1908  "EseedOPVsPhi",
1909  "ele E_{seed}/P_{vertex} vs phi",
1910  phi2D_nbin,
1911  phi_min,
1912  phi_max,
1913  eop2D_nbin,
1914  0.,
1915  eopmaxsht);
1916  h2_ele_EseedOPVsE = bookH2(iBooker, "EseedOPVsE", "ele E_{seed}/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1918  iBooker, "EoPout", "ele E_{seed}/P_{out}", eop_nbin, 0., eop_max, "E_{seed}/P_{out}", "Events", "ELE_LOGY E1 P");
1920  "EoPout_barrel",
1921  "ele E_{seed}/P_{out} barrel",
1922  eop_nbin,
1923  0.,
1924  eop_max,
1925  "E_{seed}/P_{out}",
1926  "Events",
1927  "ELE_LOGY E1 P");
1929  "EoPout_endcaps",
1930  "ele E_{seed}/P_{out} endcaps",
1931  eop_nbin,
1932  0.,
1933  eop_max,
1934  "E_{seed}/P_{out}",
1935  "Events",
1936  "ELE_LOGY E1 P");
1938  iBooker, "EoPoutVsEta", "ele E_{seed}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1940  iBooker, "EoPoutVsPhi", "ele E_{seed}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1942  bookH2(iBooker, "EoPoutVsE", "ele E_{seed}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1944  iBooker, "EeleOPout", "ele E_{ele}/P_{out}", eop_nbin, 0., eop_max, "E_{ele}/P_{out}", "Events", "ELE_LOGY E1 P");
1946  "EeleOPout_barrel",
1947  "ele E_{ele}/P_{out} barrel",
1948  eop_nbin,
1949  0.,
1950  eop_max,
1951  "E_{ele}/P_{out}",
1952  "Events",
1953  "ELE_LOGY E1 P");
1955  "EeleOPout_endcaps",
1956  "ele E_{ele}/P_{out} endcaps",
1957  eop_nbin,
1958  0.,
1959  eop_max,
1960  "E_{ele}/P_{out}",
1961  "Events",
1962  "ELE_LOGY E1 P");
1964  iBooker, "EeleOPoutVsEta", "ele E_{ele}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1966  iBooker, "EeleOPoutVsPhi", "ele E_{ele}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1968  bookH2(iBooker, "EeleOPoutVsE", "ele E_{ele}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1970  "dEtaSc_propVtx",
1971  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1973  detamatch_min,
1974  detamatch_max,
1975  "#eta_{sc} - #eta_{tr}",
1976  "Events",
1977  "ELE_LOGY E1 P");
1979  "dEtaSc_propVtx_Extended",
1980  "ele #eta_{sc} - #eta_{tr}, prop from vertex, 2.5<|eta|<3",
1982  detamatch_min,
1983  detamatch_max,
1984  "#eta_{sc} - #eta_{tr}",
1985  "Events",
1986  "ELE_LOGY E1 P");
1988  "dEtaSc_propVtx_barrel",
1989  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
1991  detamatch_min,
1992  detamatch_max,
1993  "#eta_{sc} - #eta_{tr}",
1994  "Events",
1995  "ELE_LOGY E1 P");
1997  "dEtaSc_propVtx_endcaps",
1998  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
2000  detamatch_min,
2001  detamatch_max,
2002  "#eta_{sc} - #eta_{tr}",
2003  "Events",
2004  "ELE_LOGY E1 P");
2006  "dEtaSc_propVtx_mAOD",
2007  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
2009  detamatch_min,
2010  detamatch_max,
2011  "#eta_{sc} - #eta_{tr}",
2012  "Events",
2013  "ELE_LOGY E1 P");
2015  "dEtaSc_propVtx_mAOD_barrel",
2016  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
2018  detamatch_min,
2019  detamatch_max,
2020  "#eta_{sc} - #eta_{tr}",
2021  "Events",
2022  "ELE_LOGY E1 P");
2024  "dEtaSc_propVtx_mAOD_endcaps",
2025  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
2027  detamatch_min,
2028  detamatch_max,
2029  "#eta_{sc} - #eta_{tr}",
2030  "Events",
2031  "ELE_LOGY E1 P");
2033  "dEtaScVsEta_propVtx",
2034  "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
2035  eta2D_nbin,
2036  eta_min,
2037  eta_max,
2039  detamatch_min,
2040  detamatch_max);
2042  "dEtaScVsPhi_propVtx",
2043  "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
2044  phi2D_nbin,
2045  phi_min,
2046  phi_max,
2048  detamatch_min,
2049  detamatch_max);
2051  "dEtaScVsPt_propVtx",
2052  "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
2053  pt2D_nbin,
2054  0.,
2055  pt_max,
2057  detamatch_min,
2058  detamatch_max);
2060  "dPhiSc_propVtx",
2061  "ele #phi_{sc} - #phi_{tr}, prop from vertex",
2063  dphimatch_min,
2064  dphimatch_max,
2065  "#phi_{sc} - #phi_{tr} (rad)",
2066  "Events",
2067  "ELE_LOGY E1 P");
2069  "dPhiSc_propVtx_Extended",
2070  "ele #phi_{sc} - #phi_{tr}, prop from vertex, 2.5<|eta|<3",
2072  dphimatch_min,
2073  dphimatch_max,
2074  "#phi_{sc} - #phi_{tr} (rad)",
2075  "Events",
2076  "ELE_LOGY E1 P");
2078  "dPhiSc_propVtx_barrel",
2079  "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
2081  dphimatch_min,
2082  dphimatch_max,
2083  "#phi_{sc} - #phi_{tr} (rad)",
2084  "Events",
2085  "ELE_LOGY E1 P");
2087  "dPhiSc_propVtx_endcaps",
2088  "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
2090  dphimatch_min,
2091  dphimatch_max,
2092  "#phi_{sc} - #phi_{tr} (rad)",
2093  "Events",
2094  "ELE_LOGY E1 P");
2096  "dPhiScVsEta_propVtx",
2097  "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
2098  eta2D_nbin,
2099  eta_min,
2100  eta_max,
2102  dphimatch_min,
2103  dphimatch_max);
2105  "dPhiScVsPhi_propVtx",
2106  "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
2107  phi2D_nbin,
2108  phi_min,
2109  phi_max,
2111  dphimatch_min,
2112  dphimatch_max);
2114  "dPhiScVsPt_propVtx",
2115  "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
2116  pt2D_nbin,
2117  0.,
2118  pt_max,
2120  dphimatch_min,
2121  dphimatch_max);
2123  "dEtaCl_propOut",
2124  "ele #eta_{cl} - #eta_{tr}, prop from outermost",
2126  detamatch_min,
2127  detamatch_max,
2128  "#eta_{seedcl} - #eta_{tr}",
2129  "Events",
2130  "ELE_LOGY E1 P");
2132  "dEtaCl_propOut_barrel",
2133  "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
2135  detamatch_min,
2136  detamatch_max,
2137  "#eta_{seedcl} - #eta_{tr}",
2138  "Events",
2139  "ELE_LOGY E1 P");
2141  "dEtaCl_propOut_endcaps",
2142  "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
2144  detamatch_min,
2145  detamatch_max,
2146  "#eta_{seedcl} - #eta_{tr}",
2147  "Events",
2148  "ELE_LOGY E1 P");
2150  "dEtaClVsEta_propOut",
2151  "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
2152  eta2D_nbin,
2153  eta_min,
2154  eta_max,
2156  detamatch_min,
2157  detamatch_max);
2159  "dEtaClVsPhi_propOut",
2160  "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
2161  phi2D_nbin,
2162  phi_min,
2163  phi_max,
2165  detamatch_min,
2166  detamatch_max);
2168  "dEtaScVsPt_propOut",
2169  "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
2170  pt2D_nbin,
2171  0.,
2172  pt_max,
2174  detamatch_min,
2175  detamatch_max);
2177  "dPhiCl_propOut",
2178  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2180  dphimatch_min,
2181  dphimatch_max,
2182  "#phi_{seedcl} - #phi_{tr} (rad)",
2183  "Events",
2184  "ELE_LOGY E1 P");
2186  "dPhiCl_propOut_barrel",
2187  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2189  dphimatch_min,
2190  dphimatch_max,
2191  "#phi_{seedcl} - #phi_{tr} (rad)",
2192  "Events",
2193  "ELE_LOGY E1 P");
2195  "dPhiCl_propOut_endcaps",
2196  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2198  dphimatch_min,
2199  dphimatch_max,
2200  "#phi_{seedcl} - #phi_{tr} (rad)",
2201  "Events",
2202  "ELE_LOGY E1 P");
2204  "dPhiCl_propOut_mAOD",
2205  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
2207  dphimatch_min,
2208  dphimatch_max,
2209  "#phi_{seedcl} - #phi_{tr} (rad)",
2210  "Events",
2211  "ELE_LOGY E1 P");
2213  "dPhiCl_propOut_mAOD_barrel",
2214  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
2216  dphimatch_min,
2217  dphimatch_max,
2218  "#phi_{seedcl} - #phi_{tr} (rad)",
2219  "Events",
2220  "ELE_LOGY E1 P");
2222  "dPhiCl_propOut_mAOD_endcaps",
2223  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
2225  dphimatch_min,
2226  dphimatch_max,
2227  "#phi_{seedcl} - #phi_{tr} (rad)",
2228  "Events",
2229  "ELE_LOGY E1 P");
2231  "dPhiClVsEta_propOut",
2232  "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
2233  eta2D_nbin,
2234  eta_min,
2235  eta_max,
2237  dphimatch_min,
2238  dphimatch_max);
2240  "dPhiClVsPhi_propOut",
2241  "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
2242  phi2D_nbin,
2243  phi_min,
2244  phi_max,
2246  dphimatch_min,
2247  dphimatch_max);
2249  "dPhiSClsPt_propOut",
2250  "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
2251  pt2D_nbin,
2252  0.,
2253  pt_max,
2255  dphimatch_min,
2256  dphimatch_max);
2258  "dEtaEleCl_propOut",
2259  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
2261  detamatch_min,
2262  detamatch_max,
2263  "#eta_{elecl} - #eta_{tr}",
2264  "Events",
2265  "ELE_LOGY E1 P");
2267  "dEtaEleCl_propOut_barrel",
2268  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
2270  detamatch_min,
2271  detamatch_max,
2272  "#eta_{elecl} - #eta_{tr}",
2273  "Events",
2274  "ELE_LOGY E1 P");
2276  "dEtaEleCl_propOut_endcaps",
2277  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
2279  detamatch_min,
2280  detamatch_max,
2281  "#eta_{elecl} - #eta_{tr}",
2282  "Events",
2283  "ELE_LOGY E1 P");
2285  "dEtaEleClVsEta_propOut",
2286  "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
2287  eta2D_nbin,
2288  eta_min,
2289  eta_max,
2291  detamatch_min,
2292  detamatch_max);
2294  "dEtaEleClVsPhi_propOut",
2295  "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
2296  phi2D_nbin,
2297  phi_min,
2298  phi_max,
2300  detamatch_min,
2301  detamatch_max);
2303  "dEtaScVsPt_propOut",
2304  "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
2305  pt2D_nbin,
2306  0.,
2307  pt_max,
2309  detamatch_min,
2310  detamatch_max);
2312  "dPhiEleCl_propOut",
2313  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
2315  dphimatch_min,
2316  dphimatch_max,
2317  "#phi_{elecl} - #phi_{tr} (rad)",
2318  "Events",
2319  "ELE_LOGY E1 P");
2321  "dPhiEleCl_propOut_barrel",
2322  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
2324  dphimatch_min,
2325  dphimatch_max,
2326  "#phi_{elecl} - #phi_{tr} (rad)",
2327  "Events",
2328  "ELE_LOGY E1 P");
2330  "dPhiEleCl_propOut_endcaps",
2331  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
2333  dphimatch_min,
2334  dphimatch_max,
2335  "#phi_{elecl} - #phi_{tr} (rad)",
2336  "Events",
2337  "ELE_LOGY E1 P");
2339  "dPhiEleClVsEta_propOut",
2340  "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
2341  eta2D_nbin,
2342  eta_min,
2343  eta_max,
2345  dphimatch_min,
2346  dphimatch_max);
2348  "dPhiEleClVsPhi_propOut",
2349  "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
2350  phi2D_nbin,
2351  phi_min,
2352  phi_max,
2354  dphimatch_min,
2355  dphimatch_max);
2357  "dPhiSEleClsPt_propOut",
2358  "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
2359  pt2D_nbin,
2360  0.,
2361  pt_max,
2363  dphimatch_min,
2364  dphimatch_max);
2366  iBooker, "HoE", "ele hadronic energy / em energy", hoe_nbin, hoe_min, hoe_max, "H/E", "Events", "ELE_LOGY E1 P");
2368  "HoE_Extended",
2369  "ele hadronic energy / em energy, 2.5<|eta|<3",
2370  hoe_nbin,
2371  hoe_min,
2372  hoe_max,
2373  "H/E",
2374  "Events",
2375  "ELE_LOGY E1 P");
2377  "HoE_barrel",
2378  "ele hadronic energy / em energy, barrel",
2379  hoe_nbin,
2380  hoe_min,
2381  hoe_max,
2382  "H/E",
2383  "Events",
2384  "ELE_LOGY E1 P");
2386  "HoE_endcaps",
2387  "ele hadronic energy / em energy, endcaps",
2388  hoe_nbin,
2389  hoe_min,
2390  hoe_max,
2391  "H/E",
2392  "Events",
2393  "ELE_LOGY E1 P");
2394  h1_ele_HoE_mAOD = bookH1withSumw2(iBooker,
2395  "HoE_mAOD",
2396  "ele hadronic energy / em energy",
2397  hoe_nbin,
2398  hoe_min,
2399  hoe_max,
2400  "H/E",
2401  "Events",
2402  "ELE_LOGY E1 P");
2404  "HoE_mAOD_barrel",
2405  "ele hadronic energy / em energy, barrel",
2406  hoe_nbin,
2407  hoe_min,
2408  hoe_max,
2409  "H/E",
2410  "Events",
2411  "ELE_LOGY E1 P");
2413  "HoE_mAOD_endcaps",
2414  "ele hadronic energy / em energy, endcaps",
2415  hoe_nbin,
2416  hoe_min,
2417  hoe_max,
2418  "H/E",
2419  "Events",
2420  "ELE_LOGY E1 P");
2421  h1_ele_HoE_bc = bookH1withSumw2(iBooker,
2422  "HoE_bc",
2423  "ele hadronic energy / em energy behind cluster",
2424  hoe_nbin,
2425  hoe_min,
2426  hoe_max,
2427  "H/E",
2428  "Events",
2429  "ELE_LOGY E1 P");
2431  "HoE_bc_barrel",
2432  "ele hadronic energy / em energy, behind cluster barrel",
2433  hoe_nbin,
2434  hoe_min,
2435  hoe_max,
2436  "H/E",
2437  "Events",
2438  "ELE_LOGY E1 P");
2440  "HoE_bc_endcaps",
2441  "ele hadronic energy / em energy, behind cluster, endcaps",
2442  hoe_nbin,
2443  hoe_min,
2444  hoe_max,
2445  "H/E",
2446  "Events",
2447  "ELE_LOGY E1 P");
2449  "hcalDepth1OverEcalBc",
2450  "hcalDepth1OverEcalBc",
2451  hoe_nbin,
2452  hoe_min,
2453  hoe_max,
2454  "H/E",
2455  "Events",
2456  "ELE_LOGY E1 P");
2458  "hcalDepth1OverEcalBc_barrel",
2459  "hcalDepth1OverEcalBc_barrel",
2460  hoe_nbin,
2461  hoe_min,
2462  hoe_max,
2463  "H/E",
2464  "Events",
2465  "ELE_LOGY E1 P");
2467  "hcalDepth1OverEcalBc_endcaps",
2468  "hcalDepth1OverEcalBc_endcaps",
2469  hoe_nbin,
2470  hoe_min,
2471  hoe_max,
2472  "H/E",
2473  "Events",
2474  "ELE_LOGY E1 P");
2476  "hcalDepth2OverEcalBc",
2477  "hcalDepth2OverEcalBc",
2478  hoe_nbin,
2479  hoe_min,
2480  hoe_max,
2481  "H/E",
2482  "Events",
2483  "ELE_LOGY E1 P");
2485  "hcalDepth2OverEcalBc_barrel",
2486  "hcalDepth2OverEcalBc_barrel",
2487  hoe_nbin,
2488  hoe_min,
2489  hoe_max,
2490  "H/E",
2491  "Events",
2492  "ELE_LOGY E1 P");
2494  "hcalDepth2OverEcalBc_endcaps",
2495  "hcalDepth2OverEcalBc_endcaps",
2496  hoe_nbin,
2497  hoe_min,
2498  hoe_max,
2499  "H/E",
2500  "Events",
2501  "ELE_LOGY E1 P");
2502 
2504  "HoE_fiducial",
2505  "ele hadronic energy / em energy, fiducial region",
2506  hoe_nbin,
2507  hoe_min,
2508  hoe_max,
2509  "H/E",
2510  "Events",
2511  "ELE_LOGY E1 P");
2512  h2_ele_HoEVsEta = bookH2(iBooker,
2513  "HoEVsEta",
2514  "ele hadronic energy / em energy vs eta",
2515  eta_nbin,
2516  eta_min,
2517  eta_max,
2518  hoe_nbin,
2519  hoe_min,
2520  hoe_max);
2521  h2_ele_HoEVsPhi = bookH2(iBooker,
2522  "HoEVsPhi",
2523  "ele hadronic energy / em energy vs phi",
2524  phi2D_nbin,
2525  phi_min,
2526  phi_max,
2527  hoe_nbin,
2528  hoe_min,
2529  hoe_max);
2530  h2_ele_HoEVsE =
2531  bookH2(iBooker, "HoEVsE", "ele hadronic energy / em energy vs E", p_nbin, 0., 300., hoe_nbin, hoe_min, hoe_max);
2532 
2533  // seeds
2535  bookH1withSumw2(iBooker, "seedSubdet2", "ele seed subdet 2nd layer", 11, -0.5, 10.5, "2nd hit subdet Id");
2536  h1_ele_seed_mask = bookH1withSumw2(iBooker, "seedMask", "ele seed hits mask", 13, -0.5, 12.5);
2538  bookH1withSumw2(iBooker, "seedMask_Bpix", "ele seed hits mask when subdet2 is bpix", 13, -0.5, 12.5);
2540  bookH1withSumw2(iBooker, "seedMask_Fpix", "ele seed hits mask when subdet2 is fpix", 13, -0.5, 12.5);
2542  bookH1withSumw2(iBooker, "seedMask_Tec", "ele seed hits mask when subdet2 is tec", 13, -0.5, 12.5);
2544  iBooker, "seedDphi2", "ele seed dphi 2nd layer", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2546  iBooker, "seedDphi2_VsEta", "ele seed dphi 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.003, +0.003);
2548  bookH2(iBooker, "seedDphi2_VsPt", "ele seed dphi 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2550  iBooker, "seedDphi2Pos", "ele seed dphi 2nd layer positron", 50, -0.010, +0.010, "#phi_{hit}-#phi_{pred} (rad)");
2552  "seedDphi2Pos_VsEta",
2553  "ele seed dphi 2nd layer positron vs eta",
2554  eta2D_nbin,
2555  eta_min,
2556  eta_max,
2557  50,
2558  -0.003,
2559  +0.003);
2561  iBooker, "seedDphi2Pos_VsPt", "ele seed dphi 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
2563  iBooker, "seedDrz2", "ele seed dr (dz) 2nd layer", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2565  iBooker, "seedDrz2_VsEta", "ele seed dr/dz 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.03, +0.03);
2567  bookH2(iBooker, "seedDrz2_VsPt", "ele seed dr/dz 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2569  iBooker, "seedDrz2Pos", "ele seed dr (dz) 2nd layer positron", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
2570  h2_ele_seed_drz2posVsEta = bookH2(iBooker,
2571  "seedDrz2Pos_VsEta",
2572  "ele seed dr/dz 2nd layer positron vs eta",
2573  eta2D_nbin,
2574  eta_min,
2575  eta_max,
2576  50,
2577  -0.03,
2578  +0.03);
2580  iBooker, "seedDrz2Pos_VsPt", "ele seed dr/dz 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
2581 
2582  // classes
2583  h1_ele_classes = bookH1withSumw2(iBooker, "classes", "ele classes", 20, 0.0, 20., "class Id");
2584  h1_ele_eta = bookH1withSumw2(iBooker, "eta", "ele electron eta", eta_nbin / 2, 0.0, eta_max);
2585  h1_ele_eta_golden = bookH1withSumw2(iBooker, "eta_golden", "ele electron eta golden", eta_nbin / 2, 0.0, eta_max);
2586  h1_ele_eta_bbrem = bookH1withSumw2(iBooker, "eta_bbrem", "ele electron eta bbrem", eta_nbin / 2, 0.0, eta_max);
2587  h1_ele_eta_shower = bookH1withSumw2(iBooker, "eta_shower", "ele electron eta showering", eta_nbin / 2, 0.0, eta_max);
2589  "PinVsPoutGolden_mode",
2590  "ele track inner p vs outer p vs eta, golden, mode of GSF components",
2591  p2D_nbin,
2592  0.,
2593  p_max,
2594  50,
2595  0.,
2596  p_max);
2598  "PinVsPoutShowering_mode",
2599  "ele track inner p vs outer p vs eta, showering, mode of GSF components",
2600  p2D_nbin,
2601  0.,
2602  p_max,
2603  50,
2604  0.,
2605  p_max);
2607  "PinVsPoutGolden_mean",
2608  "ele track inner p vs outer p vs eta, golden, mean of GSF components",
2609  p2D_nbin,
2610  0.,
2611  p_max,
2612  50,
2613  0.,
2614  p_max);
2616  "PinVsPoutShowering_mean",
2617  "ele track inner p vs outer p vs eta, showering, mean of GSF components",
2618  p2D_nbin,
2619  0.,
2620  p_max,
2621  50,
2622  0.,
2623  p_max);
2625  "PtinVsPtoutGolden_mode",
2626  "ele track inner pt vs outer pt vs eta, golden, mode of GSF components",
2627  pt2D_nbin,
2628  0.,
2629  pt_max,
2630  50,
2631  0.,
2632  pt_max);
2634  "PtinVsPtoutShowering_mode",
2635  "ele track inner pt vs outer pt vs eta, showering, mode of GSF components",
2636  pt2D_nbin,
2637  0.,
2638  pt_max,
2639  50,
2640  0.,
2641  pt_max);
2643  "PtinVsPtoutGolden_mean",
2644  "ele track inner pt vs outer pt vs eta, golden, mean of GSF components",
2645  pt2D_nbin,
2646  0.,
2647  pt_max,
2648  50,
2649  0.,
2650  pt_max);
2652  "PtinVsPtoutShowering_mean",
2653  "ele track inner pt vs outer pt vs eta, showering, mean of GSF components",
2654  pt2D_nbin,
2655  0.,
2656  pt_max,
2657  50,
2658  0.,
2659  pt_max);
2660  setBookPrefix("h_scl");
2662  "EoEtrue_golden_barrel",
2663  "ele supercluster energy / gen energy, golden, barrel",
2664  poptrue_nbin,
2665  poptrue_min,
2666  poptrue_max);
2668  "EoEtrue_golden_endcaps",
2669  "ele supercluster energy / gen energy, golden, endcaps",
2670  poptrue_nbin,
2671  poptrue_min,
2672  poptrue_max);
2674  "EoEtrue_showering_barrel",
2675  "ele supercluster energy / gen energy, showering, barrel",
2676  poptrue_nbin,
2677  poptrue_min,
2678  poptrue_max);
2680  "EoEtrue_showering_endcaps",
2681  "ele supercluster energy / gen energy, showering, endcaps",
2682  poptrue_nbin,
2683  poptrue_min,
2684  poptrue_max);
2685 
2686  // isolation
2687  setBookPrefix("h_ele");
2689  "tkSumPt_dr03",
2690  "tk isolation sum, dR=0.3",
2691  100,
2692  0.0,
2693  20.,
2694  "TkIsoSum, cone 0.3 (GeV/c)",
2695  "Events",
2696  "ELE_LOGY E1 P");
2698  "tkSumPt_dr03_barrel",
2699  "tk isolation sum, dR=0.3, barrel",
2700  100,
2701  0.0,
2702  20.,
2703  "TkIsoSum, cone 0.3 (GeV/c)",
2704  "Events",
2705  "ELE_LOGY E1 P");
2707  "tkSumPt_dr03_endcaps",
2708  "tk isolation sum, dR=0.3, endcaps",
2709  100,
2710  0.0,
2711  20.,
2712  "TkIsoSum, cone 0.3 (GeV/c)",
2713  "Events",
2714  "ELE_LOGY E1 P");
2716  "ecalRecHitSumEt_dr03",
2717  "ecal isolation sum, dR=0.3",
2718  100,
2719  0.0,
2720  20.,
2721  "EcalIsoSum, cone 0.3 (GeV)",
2722  "Events",
2723  "ELE_LOGY E1 P");
2725  "ecalRecHitSumEt_dr03_barrel",
2726  "ecal isolation sum, dR=0.3, barrel",
2727  100,
2728  0.0,
2729  20.,
2730  "EcalIsoSum, cone 0.3 (GeV)",
2731  "Events",
2732  "ELE_LOGY E1 P");
2734  "ecalRecHitSumEt_dr03_endcaps",
2735  "ecal isolation sum, dR=0.3, endcaps",
2736  100,
2737  0.0,
2738  20.,
2739  "EcalIsoSum, cone 0.3 (GeV)",
2740  "Events",
2741  "ELE_LOGY E1 P");
2743  "hcalTowerSumEt_dr03_depth1",
2744  "hcal depth1 isolation sum, dR=0.3",
2745  100,
2746  0.0,
2747  20.,
2748  "Hcal1IsoSum, cone 0.3 (GeV)",
2749  "Events",
2750  "ELE_LOGY E1 P");
2752  "hcalTowerSumEt_dr03_depth1_barrel",
2753  "hcal depth1 isolation sum, dR=0.3, barrel",
2754  100,
2755  0.0,
2756  20.,
2757  "Hcal1IsoSum, cone 0.3 (GeV)",
2758  "Events",
2759  "ELE_LOGY E1 P");
2761  "hcalTowerSumEt_dr03_depth1_endcaps",
2762  "hcal depth1 isolation sum, dR=0.3, endcaps",
2763  100,
2764  0.0,
2765  20.,
2766  "Hcal1IsoSum, cone 0.3 (GeV)",
2767  "Events",
2768  "ELE_LOGY E1 P");
2770  "hcalTowerSumEt_dr03_depth2",
2771  "hcal depth2 isolation sum, dR=0.3",
2772  100,
2773  0.0,
2774  20.,
2775  "Hcal2IsoSum, cone 0.3 (GeV)",
2776  "Events",
2777  "ELE_LOGY E1 P");
2779  "hcalTowerSumEt_dr03_depth2_barrel",
2780  "hcal depth2 isolation sum, dR=0.3",
2781  100,
2782  0.0,
2783  20.,
2784  "Hcal2IsoSum, cone 0.3 (GeV)",
2785  "Events",
2786  "ELE_LOGY E1 P");
2788  "hcalTowerSumEt_dr03_depth2_endcaps",
2789  "hcal depth2 isolation sum, dR=0.3",
2790  100,
2791  0.0,
2792  20.,
2793  "Hcal2IsoSum, cone 0.3 (GeV)",
2794  "Events",
2795  "ELE_LOGY E1 P");
2796 
2797  // newHCAL
2798  // isolation new hcal
2800  "hcalTowerSumEtBc_dr03_depth1",
2801  "hcal depth1 isolation sum behind cluster, dR=0.3",
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_barrel",
2811  "hcal depth1 isolation sum behind cluster, dR=0.3, barrel",
2812  100,
2813  0.0,
2814  20.,
2815  "Hcal1IsoSum, cone 0.3 (GeV)",
2816  "Events",
2817  "ELE_LOGY E1 P");
2819  bookH1withSumw2(iBooker,
2820  "hcalTowerSumEtBc_dr03_depth1_endcaps",
2821  "hcal depth1 isolation sum behind cluster, dR=0.3, endcaps",
2822  100,
2823  0.0,
2824  20.,
2825  "Hcal1IsoSum, cone 0.3 (GeV)",
2826  "Events",
2827  "ELE_LOGY E1 P");
2828 
2830  "hcalTowerSumEtBc_dr03_depth2",
2831  "hcal depth2 isolation sum behind cluster, dR=0.3",
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_barrel",
2841  "hcal depth2 isolation sum behind cluster, dR=0.3, barrel",
2842  100,
2843  0.0,
2844  20.,
2845  "Hcal1IsoSum, cone 0.3 (GeV)",
2846  "Events",
2847  "ELE_LOGY E1 P");
2849  bookH1withSumw2(iBooker,
2850  "hcalTowerSumEtBc_dr03_depth2_endcaps",
2851  "hcal depth2 isolation sum behind cluster, dR=0.3, endcaps",
2852  100,
2853  0.0,
2854  20.,
2855  "Hcal1IsoSum, cone 0.3 (GeV)",
2856  "Events",
2857  "ELE_LOGY E1 P");
2858 
2860  "ecalPFClusterIso",
2861  "ecal PF Cluster Iso",
2862  100,
2863  0.0,
2864  100.,
2865  "hcal PF Cluser Iso",
2866  "Events",
2867  "ELE_LOGY E1 P");
2869  "ecalPFClusterIso_barrel",
2870  "ecal PF Cluster Iso barrel",
2871  100,
2872  0.0,
2873  100.,
2874  "hcal PF Cluser Iso",
2875  "Events",
2876  "ELE_LOGY E1 P");
2878  "ecalPFClusterIso_endcaps",
2879  "ecal PF Cluster Iso endcaps",
2880  100,
2881  0.0,
2882  100.,
2883  "hcal PF Cluser Iso",
2884  "Events",
2885  "ELE_LOGY E1 P");
2887  "hcalPFClusterIso",
2888  "hcal PF Cluster Iso",
2889  100,
2890  0.0,
2891  100.,
2892  "hcal PF Cluser Iso",
2893  "Events",
2894  "ELE_LOGY E1 P");
2896  "hcalPFClusterIso_barrel",
2897  "hcal PF Cluster Iso barrel",
2898  100,
2899  0.0,
2900  100.,
2901  "hcal PF Cluser Iso",
2902  "Events",
2903  "ELE_LOGY E1 P");
2905  "hcalPFClusterIso_endcaps",
2906  "hcal PF Cluster Iso endcaps",
2907  100,
2908  0.0,
2909  100.,
2910  "hcal PF Cluser Iso",
2911  "Events",
2912  "ELE_LOGY E1 P");
2914  "ecalPFClusterIso_Extended",
2915  "ecal PF Cluster Iso Extended",
2916  100,
2917  0.0,
2918  100.,
2919  "hcal PF Cluser Iso Extended, 2.5<|eta|<3",
2920  "Events",
2921  "ELE_LOGY E1 P");
2923  "hcalPFClusterIso_Extended",
2924  "hcal PF Cluster Iso Extended",
2925  100,
2926  0.0,
2927  100.,
2928  "hcal PF Cluser Iso Extended, 2.5<|eta|<3",
2929  "Events",
2930  "ELE_LOGY E1 P");
2931 
2932  // fbrem
2934  iBooker, "fbrem", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2936  "fbrem_Extended",
2937  "ele brem fraction, mode of GSF components, 2.5<|eta|<3",
2938  100,
2939  0.,
2940  1.,
2941  "P_{in} - P_{out} / P_{in}");
2943  "fbrem_barrel",
2944  "ele brem fraction for barrel, mode of GSF components",
2945  100,
2946  0.,
2947  1.,
2948  "P_{in} - P_{out} / P_{in}");
2950  "fbrem_endcaps",
2951  "ele brem franction for endcaps, mode of GSF components",
2952  100,
2953  0.,
2954  1.,
2955  "P_{in} - P_{out} / P_{in}");
2957  iBooker, "fbrem_mAOD", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2959  "fbrem_mAOD_barrel",
2960  "ele brem fraction for barrel, mode of GSF components",
2961  100,
2962  0.,
2963  1.,
2964  "P_{in} - P_{out} / P_{in}");
2966  "fbrem_mAOD_endcaps",
2967  "ele brem franction for endcaps, mode of GSF components",
2968  100,
2969  0.,
2970  1.,
2971  "P_{in} - P_{out} / P_{in}");
2973  bookH1withSumw2(iBooker, "superclusterfbrem", "supercluster brem fraction", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2975  iBooker, "superclusterfbrem_barrel", "supercluster brem fraction for barrel", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2977  "superclusterfbrem_endcaps",
2978  "supercluster brem franction for endcaps",
2979  100,
2980  0.,
2981  1.,
2982  "1 - E_{ele} / E_{SC}");
2983  p1_ele_fbremVsEta_mode = bookP1(iBooker,
2984  "fbremvsEtamode",
2985  "mean ele brem fraction vs eta, mode 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  p1_ele_fbremVsEta_mean = bookP1(iBooker,
2994  "fbremvsEtamean",
2995  "mean ele brem fraction vs eta, mean of GSF components",
2996  eta2D_nbin,
2997  eta_min,
2998  eta_max,
2999  0.,
3000  1.,
3001  "#eta",
3002  "<P_{in} - P_{out} / P_{in}>");
3003  h1_ele_chargeInfo = bookH1withSumw2(iBooker, "chargeInfo", "chargeInfo", 5, -2., 3.);
3004 
3005  // e/g et pflow electrons
3006  h1_ele_mva = bookH1withSumw2(iBooker, "mva", "ele identification mva", 100, -1., 1.);
3007  h1_ele_mva_barrel = bookH1withSumw2(iBooker, "mva_barrel", "ele identification mva barrel", 100, -1., 1.);
3008  h1_ele_mva_endcaps = bookH1withSumw2(iBooker, "mva_endcaps", "ele identification mva endcaps", 100, -1., 1.);
3009  h1_ele_mva_isolated = bookH1withSumw2(iBooker, "mva_isolated", "ele identification mva isolated", 100, -1., 1.);
3011  bookH1withSumw2(iBooker, "mva_isolated_barrel", "ele identification mva isolated barrel", 100, -1., 1.);
3013  bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps", 100, -1., 1.);
3014  h1_ele_provenance = bookH1withSumw2(iBooker, "provenance", "ele provenance", 5, -2., 3.);
3015  h1_ele_provenance_Extended = bookH1withSumw2(iBooker, "provenance_Extended", "ele provenance Extended", 5, -2., 3.);
3016  h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel", "ele provenance barrel", 5, -2., 3.);
3017  h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps", "ele provenance endcaps", 5, -2., 3.);
3018 
3019  // pflow isolation variables
3021  iBooker, "chargedHadronIso", "chargedHadronIso", 100, 0.0, 20., "chargedHadronIso", "Events", "ELE_LOGY E1 P");
3023  "chargedHadronIso_barrel",
3024  "chargedHadronIso for barrel",
3025  100,
3026  0.0,
3027  20.,
3028  "chargedHadronIso_barrel",
3029  "Events",
3030  "ELE_LOGY E1 P");
3032  "chargedHadronIso_endcaps",
3033  "chargedHadronIso for endcaps",
3034  100,
3035  0.0,
3036  20.,
3037  "chargedHadronIso_endcaps",
3038  "Events",
3039  "ELE_LOGY E1 P");
3041  iBooker, "neutralHadronIso", "neutralHadronIso", 21, 0.0, 20., "neutralHadronIso", "Events", "ELE_LOGY E1 P");
3043  "neutralHadronIso_barrel",
3044  "neutralHadronIso for barrel",
3045  21,
3046  0.0,
3047  20.,
3048  "neutralHadronIso_barrel",
3049  "Events",
3050  "ELE_LOGY E1 P");
3052  "neutralHadronIso_endcaps",
3053  "neutralHadronIso for endcaps",
3054  21,
3055  0.0,
3056  20.,
3057  "neutralHadronIso_endcaps",
3058  "Events",
3059  "ELE_LOGY E1 P");
3061  bookH1withSumw2(iBooker, "photonIso", "photonIso", 100, 0.0, 20., "photonIso", "Events", "ELE_LOGY E1 P");
3063  iBooker, "photonIso_barrel", "photonIso for barrel", 100, 0.0, 20., "photonIso_barrel", "Events", "ELE_LOGY E1 P");
3065  "photonIso_endcaps",
3066  "photonIso for endcaps",
3067  100,
3068  0.0,
3069  20.,
3070  "photonIso_endcaps",
3071  "Events",
3072  "ELE_LOGY E1 P");
3073  // -- pflow over pT
3075  "chargedHadronRelativeIso",
3076  "chargedHadronRelativeIso",
3077  100,
3078  0.0,
3079  2.,
3080  "chargedHadronRelativeIso",
3081  "Events",
3082  "ELE_LOGY E1 P");
3084  "chargedHadronRelativeIso_Extended",
3085  "chargedHadronRelativeIso_Extended",
3086  100,
3087  0.0,
3088  2.,
3089  "chargedHadronRelativeIso Extended, 2.5<|eta|<3",
3090  "Events",
3091  "ELE_LOGY E1 P");
3093  "chargedHadronRelativeIso_barrel",
3094  "chargedHadronRelativeIso for barrel",
3095  100,
3096  0.0,
3097  2.,
3098  "chargedHadronRelativeIso_barrel",
3099  "Events",
3100  "ELE_LOGY E1 P");
3102  "chargedHadronRelativeIso_endcaps",
3103  "chargedHadronRelativeIso for endcaps",
3104  100,
3105  0.0,
3106  2.,
3107  "chargedHadronRelativeIso_endcaps",
3108  "Events",
3109  "ELE_LOGY E1 P");
3111  "neutralHadronRelativeIso",
3112  "neutralHadronRelativeIso",
3113  100,
3114  0.0,
3115  2.,
3116  "neutralHadronRelativeIso",
3117  "Events",
3118  "ELE_LOGY E1 P");
3120  "neutralHadronRelativeIso_Extended",
3121  "neutralHadronRelativeIso_Extended",
3122  100,
3123  0.0,
3124  2.,
3125  "neutralHadronRelativeIso Extended, 2.5<|eta|<3",
3126  "Events",
3127  "ELE_LOGY E1 P");
3129  "neutralHadronRelativeIso_barrel",
3130  "neutralHadronRelativeIso for barrel",
3131  100,
3132  0.0,
3133  2.,
3134  "neutralHadronRelativeIso_barrel",
3135  "Events",
3136  "ELE_LOGY E1 P");
3138  "neutralHadronRelativeIso_endcaps",
3139  "neutralHadronRelativeIso for endcaps",
3140  100,
3141  0.0,
3142  2.,
3143  "neutralHadronRelativeIso_endcaps",
3144  "Events",
3145  "ELE_LOGY E1 P");
3147  iBooker, "photonRelativeIso", "photonRelativeIso", 100, 0.0, 2., "photonRelativeIso", "Events", "ELE_LOGY E1 P");
3149  "photonRelativeIso_Extended",
3150  "photonRelativeIso_Extended",
3151  100,
3152  0.0,
3153  2.,
3154  "photonRelativeIso Extended, 2.5<|eta|<3",
3155  "Events",
3156  "ELE_LOGY E1 P");
3158  "photonRelativeIso_barrel",
3159  "photonRelativeIso for barrel",
3160  100,
3161  0.0,
3162  2.,
3163  "photonRelativeIso_barrel",
3164  "Events",
3165  "ELE_LOGY E1 P");
3167  "photonRelativeIso_endcaps",
3168  "photonRelativeIso for endcaps",
3169  100,
3170  0.0,
3171  2.,
3172  "photonRelativeIso_endcaps",
3173  "Events",
3174  "ELE_LOGY E1 P");
3176  "chargedHadronRelativeIso_mAOD",
3177  "chargedHadronRelativeIso",
3178  100,
3179  0.0,
3180  2.,
3181  "chargedHadronRelativeIso",
3182  "Events",
3183  "ELE_LOGY E1 P");
3185  "chargedHadronRelativeIso_mAOD_barrel",
3186  "chargedHadronRelativeIso for barrel",
3187  100,
3188  0.0,
3189  2.,
3190  "chargedHadronRelativeIso_barrel",
3191  "Events",
3192  "ELE_LOGY E1 P");
3194  "chargedHadronRelativeIso_mAOD_endcaps",
3195  "chargedHadronRelativeIso for endcaps",
3196  100,
3197  0.0,
3198  2.,
3199  "chargedHadronRelativeIso_endcaps",
3200  "Events",
3201  "ELE_LOGY E1 P");
3203  "neutralHadronRelativeIso_mAOD",
3204  "neutralHadronRelativeIso",
3205  100,
3206  0.0,
3207  2.,
3208  "neutralHadronRelativeIso",
3209  "Events",
3210  "ELE_LOGY E1 P");
3212  "neutralHadronRelativeIso_mAOD_barrel",
3213  "neutralHadronRelativeIso for barrel",
3214  100,
3215  0.0,
3216  2.,
3217  "neutralHadronRelativeIso_barrel",
3218  "Events",
3219  "ELE_LOGY E1 P");
3221  "neutralHadronRelativeIso_mAOD_endcaps",
3222  "neutralHadronRelativeIso for endcaps",
3223  100,
3224  0.0,
3225  2.,
3226  "neutralHadronRelativeIso_endcaps",
3227  "Events",
3228  "ELE_LOGY E1 P");
3230  "photonRelativeIso_mAOD",
3231  "photonRelativeIso",
3232  100,
3233  0.0,
3234  2.,
3235  "photonRelativeIso",
3236  "Events",
3237  "ELE_LOGY E1 P");
3239  "photonRelativeIso_mAOD_barrel",
3240  "photonRelativeIso for barrel",
3241  100,
3242  0.0,
3243  2.,
3244  "photonRelativeIso_barrel",
3245  "Events",
3246  "ELE_LOGY E1 P");
3248  "photonRelativeIso_mAOD_endcaps",
3249  "photonRelativeIso for endcaps",
3250  100,
3251  0.0,
3252  2.,
3253  "photonRelativeIso_endcaps",
3254  "Events",
3255  "ELE_LOGY E1 P");
3256 
3257  // conversion rejection information
3258  h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags", "conversion rejection flag", 5, -1.5, 3.5);
3260  bookH1withSumw2(iBooker, "convFlags_all", "conversion rejection flag, all electrons", 5, -1.5, 3.5);
3261  h1_ele_convDist = bookH1withSumw2(iBooker, "convDist", "distance to the conversion partner", 100, -15., 15.);
3263  bookH1withSumw2(iBooker, "convDist_all", "distance to the conversion partner, all electrons", 100, -15., 15.);
3265  iBooker, "convDcot", "difference of cot(angle) with the conversion partner", 100, -CLHEP::pi / 2., CLHEP::pi / 2.);
3267  "convDcot_all",
3268  "difference of cot(angle) with the conversion partner, all electrons",
3269  100,
3270  -CLHEP::pi / 2.,
3271  CLHEP::pi / 2.);
3272  h1_ele_convRadius = bookH1withSumw2(iBooker, "convRadius", "signed conversion radius", 100, 0., 130.);
3274  bookH1withSumw2(iBooker, "convRadius_all", "signed conversion radius, all electrons", 100, 0., 130.);
3275 }
3276 
3278 
3280  // get collections
3281  auto gsfElectrons = iEvent.getHandle(electronCollection_);
3282  auto gsfElectronsEndcaps = iEvent.getHandle(electronCollectionEndcaps_);
3283  auto gsfElectronCores = iEvent.getHandle(electronCoreCollection_);
3284  auto gsfElectronCoresEndcaps = iEvent.getHandle(electronCoreCollectionEndcaps_);
3285  auto gsfElectronTracks = iEvent.getHandle(electronTrackCollection_);
3286  auto gsfElectronSeeds = iEvent.getHandle(electronSeedCollection_);
3287  auto genParticles = iEvent.getHandle(mcTruthCollection_);
3288  auto theBeamSpot = iEvent.getHandle(beamSpotTag_);
3289 
3290  auto isoFromDepsTk03Handle = iEvent.getHandle(isoFromDepsTk03Tag_);
3291  auto isoFromDepsTk04Handle = iEvent.getHandle(isoFromDepsTk04Tag_);
3292  auto isoFromDepsEcalFull03Handle = iEvent.getHandle(isoFromDepsEcalFull03Tag_);
3293  auto isoFromDepsEcalFull04Handle = iEvent.getHandle(isoFromDepsEcalFull04Tag_);
3294  auto isoFromDepsEcalReduced03Handle = iEvent.getHandle(isoFromDepsEcalReduced03Tag_);
3295  auto isoFromDepsEcalReduced04Handle = iEvent.getHandle(isoFromDepsEcalReduced04Tag_);
3296  auto isoFromDepsHcal03Handle = iEvent.getHandle(isoFromDepsHcal03Tag_);
3297  auto isoFromDepsHcal04Handle = iEvent.getHandle(isoFromDepsHcal04Tag_);
3298  auto vertexCollectionHandle = iEvent.getHandle(offlineVerticesCollection_);
3299  if (!vertexCollectionHandle.isValid()) {
3300  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle KO";
3301  } else {
3302  edm::LogInfo("ElectronMcSignalValidator::analyze") << "vertexCollectionHandle OK";
3303  }
3304 
3305  reco::GsfElectronCollection::const_iterator gsfIter; //
3306  reco::GsfElectronCoreCollection::const_iterator gsfCoreIter; //
3307  std::vector<reco::GsfElectron>::const_iterator gsfIter3;
3308  std::vector<reco::GsfElectron>::const_iterator gsfIter4;
3309 
3310  //===============================================
3311  // get a vector with EB & EE
3312  //===============================================
3313  std::vector<reco::GsfElectron> localCollection;
3314  std::vector<reco::GsfElectron> localCollection_EB;
3315  std::vector<reco::GsfElectron> localCollection_EE;
3316 
3317  // looking for EB
3318  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
3319  if (gsfIter->isEB()) {
3320  localCollection.push_back(*gsfIter);
3321  localCollection_EB.push_back(*gsfIter);
3322  }
3323  }
3324 
3325  // looking for EE
3326  for (gsfIter = gsfElectronsEndcaps->begin(); gsfIter != gsfElectronsEndcaps->end(); gsfIter++) {
3327  if (gsfIter->isEE()) {
3328  localCollection.push_back(*gsfIter);
3329  localCollection_EE.push_back(*gsfIter);
3330  }
3331  }
3332 
3333  //===============================================
3334  // get a vector with EB & EE for Core
3335  //===============================================
3336  std::vector<reco::GsfElectronCore> localCoreCollection;
3337 
3338  // looking for EB
3339 
3340  for (gsfCoreIter = gsfElectronCores->begin(); gsfCoreIter != gsfElectronCores->end(); gsfCoreIter++) {
3341  if (gsfCoreIter->superCluster()->seed()->seed().subdetId() == EcalBarrel) {
3342  localCoreCollection.push_back(*gsfCoreIter);
3343  }
3344  }
3345 
3346  // looking for EE
3347  for (gsfCoreIter = gsfElectronCoresEndcaps->begin(); gsfCoreIter != gsfElectronCoresEndcaps->end(); gsfCoreIter++) {
3348  if ((gsfCoreIter->superCluster()->seed()->seed().subdetId() == EcalEndcap) ||
3349  (EcalTools::isHGCalDet(gsfCoreIter->superCluster()->seed()->seed().det()))) {
3350  localCoreCollection.push_back(*gsfCoreIter);
3351  }
3352  }
3353 
3354  //===============================================
3355  // Analyze
3356  //===============================================
3357  edm::LogInfo("ElectronMcSignalValidator::analyze")
3358  << "Treating event " << iEvent.id() << " with " << gsfElectrons.product()->size() << " electrons";
3359  edm::LogInfo("ElectronMcSignalValidator::analyze")
3360  << "Treating event " << iEvent.id() << " with " << gsfElectronsEndcaps.product()->size() << " electrons";
3361 
3362  h1_recEleNum->Fill((localCollection).size());
3363  h1_recCoreNum->Fill(localCoreCollection.size());
3364  h1_recTrackNum->Fill((*gsfElectronTracks).size());
3365  h1_recSeedNum->Fill((*gsfElectronSeeds).size());
3366  h1_recOfflineVertices->Fill((*vertexCollectionHandle).size());
3367 
3368  //===============================================
3369  // all rec electrons
3370  //===============================================
3371 
3372  // mee only
3373  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3374  float enrj1 = gsfIter3->ecalEnergy();
3375 
3376  for (gsfIter4 = gsfIter3 + 1; gsfIter4 != localCollection.end(); gsfIter4++) {
3377  math::XYZTLorentzVector p12 = (*gsfIter3).p4() + (*gsfIter4).p4();
3378  float mee2 = p12.Dot(p12);
3379  float enrj2 = gsfIter4->ecalEnergy();
3380  h1_ele_mee_all->Fill(sqrt(mee2));
3381  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2), enrj2 - enrj1);
3382  if (gsfIter3->ecalDrivenSeed() && gsfIter4->ecalDrivenSeed()) {
3383  h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2), enrj2 - enrj1);
3384  }
3385  if (gsfIter3->charge() * gsfIter4->charge() < 0.) {
3386  h1_ele_mee_os->Fill(sqrt(mee2));
3387  if (gsfIter3->isEB() && gsfIter4->isEB()) {
3388  h1_ele_mee_os_ebeb->Fill(sqrt(mee2));
3389  }
3390  if ((gsfIter3->isEB() && gsfIter4->isEE()) || (gsfIter3->isEE() && gsfIter4->isEB()))
3391  h1_ele_mee_os_ebee->Fill(sqrt(mee2));
3392  if (gsfIter3->isEE() && gsfIter4->isEE()) {
3393  h1_ele_mee_os_eeee->Fill(sqrt(mee2));
3394  }
3395  if ((gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3396  (gsfIter3->classification() == GsfElectron::GOLDEN && gsfIter4->classification() == GsfElectron::BIGBREM) ||
3397  (gsfIter3->classification() == GsfElectron::BIGBREM && gsfIter4->classification() == GsfElectron::GOLDEN) ||
3398  (gsfIter3->classification() == GsfElectron::BIGBREM &&
3399  gsfIter4->classification() == GsfElectron::BIGBREM)) {
3400  h1_ele_mee_os_gg->Fill(sqrt(mee2));
3401  } else if ((gsfIter3->classification() == GsfElectron::SHOWERING &&
3402  gsfIter4->classification() == GsfElectron::SHOWERING) ||
3403  (gsfIter3->classification() == GsfElectron::SHOWERING && gsfIter4->isGap()) ||
3404  (gsfIter3->isGap() && gsfIter4->classification() == GsfElectron::SHOWERING) ||
3405  (gsfIter3->isGap() && gsfIter4->isGap())) {
3406  h1_ele_mee_os_bb->Fill(sqrt(mee2));
3407  } else {
3408  h1_ele_mee_os_gb->Fill(sqrt(mee2));
3409  }
3410  }
3411  }
3412  }
3413 
3414  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3415  // preselect electrons
3416  if (gsfIter3->pt() > maxPt_ || std::abs(gsfIter3->eta()) > maxAbsEta_)
3417  continue;
3418 
3419  h1_ele_EoverP_all->Fill(gsfIter3->eSuperClusterOverP());
3420  h1_ele_EseedOP_all->Fill(gsfIter3->eSeedClusterOverP());
3421  h1_ele_EoPout_all->Fill(gsfIter3->eSeedClusterOverPout());
3422  h1_ele_EeleOPout_all->Fill(gsfIter3->eEleClusterOverPout());
3423  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter3->deltaEtaSuperClusterTrackAtVtx());
3424  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter3->deltaPhiSuperClusterTrackAtVtx());
3425  h1_ele_dEtaCl_propOut_all->Fill(gsfIter3->deltaEtaSeedClusterTrackAtCalo());
3426  h1_ele_dPhiCl_propOut_all->Fill(gsfIter3->deltaPhiSeedClusterTrackAtCalo());
3427  h1_ele_HoE_all->Fill(gsfIter3->hcalOverEcal());
3428  h1_ele_HoE_bc_all->Fill(gsfIter3->hcalOverEcalBc());
3429  h1_ele_TIP_all->Fill(EleRelPoint(gsfIter3->vertex(), theBeamSpot->position()).perp());
3430  h1_ele_vertexEta_all->Fill(gsfIter3->eta());
3431  h1_ele_vertexPt_all->Fill(gsfIter3->pt());
3432  h1_ele_Et_all->Fill(gsfIter3->ecalEnergy() / cosh(gsfIter3->superCluster()->eta()));
3433 
3434  // conversion rejection
3435  int flags = gsfIter3->convFlags();
3436  if (flags == -9999) {
3437  flags = -1;
3438  }
3440  if (flags >= 0.) {
3441  h1_ele_convDist_all->Fill(gsfIter3->convDist());
3442  h1_ele_convDcot_all->Fill(gsfIter3->convDcot());
3443  h1_ele_convRadius_all->Fill(gsfIter3->convRadius());
3444  }
3445  }
3446 
3447  //===============================================
3448  // charge mis-ID
3449  //===============================================
3450 
3451  int mcNum = 0, eleNum = 0;
3452  bool matchingID, matchingMotherID;
3453 
3454  reco::GenParticleCollection::const_iterator mcIter;
3455  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3456  // select requested matching gen particle
3457  matchingID = false;
3458  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3459  if (mcIter->pdgId() == matchingIDs_[i]) {
3460  matchingID = true;
3461  }
3462  }
3463  if (matchingID) {
3464  // select requested mother matching gen particle
3465  // always include single particle with no mother
3466  const Candidate *mother = mcIter->mother();
3467  matchingMotherID = false;
3468  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3469  if (mother == nullptr) {
3470  matchingMotherID = true;
3471  } else if (mother->pdgId() == matchingMotherIDs_[i]) {
3472  if (mother->numberOfDaughters() <= 2) {
3473  matchingMotherID = true;
3474  }
3475  } // end of mother if test
3476  }
3477  if (matchingMotherID) {
3478  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEta_) {
3479  continue;
3480  }
3481 
3482  // looking for the best matching gsf electron
3483  bool okGsfFound = false;
3484  double gsfOkRatio = 999999.;
3485 
3486  // find best matched electron
3487  reco::GsfElectron bestGsfElectron;
3488  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3489  double dphi = gsfIter3->phi() - mcIter->phi();
3490  if (std::abs(dphi) > CLHEP::pi) {
3491  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3492  }
3493  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3494  if (deltaR2 < deltaR2_) {
3495  double mc_charge = mcIter->pdgId() == 11 ? -1. : 1.;
3496  h1_ele_ChargeMnChargeTrue->Fill(std::abs(gsfIter3->charge() - mc_charge));
3497  // require here a charge mismatch
3498  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() > 0.)) ||
3499  ((mcIter->pdgId() == -11) && (gsfIter3->charge() < 0.))) {
3500  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3501  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3502  gsfOkRatio = tmpGsfRatio;
3503  bestGsfElectron = *gsfIter3;
3504  okGsfFound = true;
3505  }
3506  }
3507  }
3508  } // loop over rec ele to look for the best one
3509 
3510  // analysis when the mc track is found
3511  if (okGsfFound) { // && (std::abs(mcIter->eta())<maxAbsEta_)
3512  // generated distributions for matched electrons
3513  h1_mc_Pt_matched_qmisid->Fill(mcIter->pt());
3514  h1_mc_Phi_matched_qmisid->Fill(mcIter->phi());
3515  h1_mc_AbsEta_matched_qmisid->Fill(std::abs(mcIter->eta()));
3516  h1_mc_Eta_matched_qmisid->Fill(mcIter->eta());
3517  h1_mc_Z_matched_qmisid->Fill(mcIter->vz());
3518  }
3519  }
3520  }
3521  }
3522 
3523  //===============================================
3524  // association mc-reco
3525  //===============================================
3526 
3527  for (mcIter = genParticles->begin(); mcIter != genParticles->end(); mcIter++) {
3528  // number of mc particles
3529  mcNum++;
3530 
3531  // select requested matching gen particle
3532  matchingID = false;
3533  for (unsigned int i = 0; i < matchingIDs_.size(); i++) {
3534  if (mcIter->pdgId() == matchingIDs_[i]) {
3535  matchingID = true;
3536  }
3537  }
3538  if (!matchingID)
3539  continue;
3540 
3541  // select requested mother matching gen particle
3542  // always include single particle with no mother
3543  const Candidate *mother = mcIter->mother();
3544  matchingMotherID = false;
3545  for (unsigned int i = 0; i < matchingMotherIDs_.size(); i++) {
3546  if ((mother == nullptr) || ((mother != nullptr) && mother->pdgId() == matchingMotherIDs_[i])) {
3547  matchingMotherID = true;
3548  }
3549  }
3550  if (!matchingMotherID)
3551  continue;
3552 
3553  // electron preselection
3554  if (mcIter->pt() > maxPt_ || std::abs(mcIter->eta()) > maxAbsEtaExtended_) {
3555  continue;
3556  }
3557 
3558  eleNum++;
3559  if (std::abs(mcIter->eta()) < maxAbsEta_) {
3560  h1_mc_Eta->Fill(mcIter->eta());
3561  h1_mc_AbsEta->Fill(std::abs(mcIter->eta()));
3562  h1_mc_P->Fill(mcIter->p());
3563  h1_mc_Pt->Fill(mcIter->pt());
3564  h1_mc_Phi->Fill(mcIter->phi());
3565  h1_mc_Z->Fill(mcIter->vz());
3566  h2_mc_PtEta->Fill(mcIter->eta(), mcIter->pt());
3567  }
3568  if (std::abs(mcIter->eta()) < maxAbsEtaExtended_) {
3569  h1_mc_Eta_Extended->Fill(mcIter->eta());
3570  h1_mc_AbsEta_Extended->Fill(std::abs(mcIter->eta()));
3571  }
3572 
3573  // find best matched electron
3574  bool okGsfFound = false;
3575  bool passMiniAODSelection = true;
3576  double gsfOkRatio = 999999.;
3577  bool isEBflag = false;
3578  bool isEEflag = false;
3579  bool isEEextendedflag = false;
3580 
3581  reco::GsfElectron bestGsfElectron;
3582  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
3583  // temporary cut for pt < 5.
3584  double dphi = gsfIter3->phi() - mcIter->phi();
3585  if (std::abs(dphi) > CLHEP::pi) {
3586  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
3587  }
3588  double deltaR2 = (gsfIter3->eta() - mcIter->eta()) * (gsfIter3->eta() - mcIter->eta()) + dphi * dphi;
3589  if (deltaR2 < deltaR2_) {
3590  if (((mcIter->pdgId() == 11) && (gsfIter3->charge() < 0.)) ||
3591  ((mcIter->pdgId() == -11) && (gsfIter3->charge() > 0.))) {
3592  double tmpGsfRatio = gsfIter3->p() / mcIter->p();
3593  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
3594  gsfOkRatio = tmpGsfRatio;
3595  bestGsfElectron = *gsfIter3;
3596  okGsfFound = true;
3597  }
3598  }
3599  }
3600  } // loop over rec ele to look for the best one
3601 
3602  if (!okGsfFound)
3603  continue;
3604 
3605  //------------------------------------
3606  // analysis when the mc track is found
3607  //------------------------------------
3608  passMiniAODSelection = bestGsfElectron.pt() >= 5.;
3609  isEBflag = bestGsfElectron.isEB();
3610  isEEflag = bestGsfElectron.isEE() && (std::abs(mcIter->eta()) < maxAbsEta_);
3611  isEEextendedflag = bestGsfElectron.isEE();
3612 
3613  float Etot = 0.;
3614  CaloCluster_iterator it = bestGsfElectron.superCluster()->clustersBegin();
3615  CaloCluster_iterator itend = bestGsfElectron.superCluster()->clustersEnd();
3616  for (; it != itend; ++it) {
3617  Etot += (*it)->energy();
3618  }
3619 
3620  if (isEEextendedflag) { // Extended flag
3621  if (!isEEflag) {
3622  h1_mc_Eta_Extended_matched->Fill(mcIter->eta());
3623  h1_mc_AbsEta_matched->Fill(std::abs(mcIter->eta()));
3624  h1_mc_AbsEta_Extended_matched->Fill(std::abs(mcIter->eta()));
3625  h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3626  h1_scl_bcl_EtotoEtrue_Extended->Fill(Etot / mcIter->p()); //
3627  h1_scl_EoEtrue_endcaps_new_Extended->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3631  h1_ele_HoE_Extended->Fill(bestGsfElectron.hcalOverEcal());
3633  bestGsfElectron.pt());
3635  bestGsfElectron.pt());
3637  bestGsfElectron.pt());
3638  h2_scl_EoEtrueVsrecOfflineVertices_Extended->Fill((*vertexCollectionHandle).size(),
3639  bestGsfElectron.ecalEnergy() / mcIter->p());
3640  h2_ele_PoPtrueVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.p() / mcIter->p());
3643 
3644  double fbrem_mode = bestGsfElectron.fbrem();
3645  h1_ele_fbrem_Extended->Fill(fbrem_mode);
3646  if (!readAOD_) {
3647  if (bestGsfElectron.ecalDrivenSeed())
3649  if (bestGsfElectron.trackerDrivenSeed()) {
3651  }
3652  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) {
3654  }
3655  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) {
3657  }
3658  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) {
3660  }
3661  }
3662  }
3663 
3664  if (!readAOD_) {
3665  h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3666 
3667  edm::RefToBase<TrajectorySeed> seed_Ext = bestGsfElectron.gsfTrack()->extra()->seedRef();
3668  ElectronSeedRef elseed_Ext = seed_Ext.castTo<ElectronSeedRef>();
3669  if (elseed_Ext->dPhiNeg(1) != std::numeric_limits<float>::infinity()) {
3670  h2_ele_seed_dphi2VsEta->Fill(bestGsfElectron.eta(), elseed_Ext->dPhiNeg(1));
3671  }
3672  if (elseed_Ext->dRZNeg(1) != std::numeric_limits<float>::infinity()) {
3673  h2_ele_seed_drz2VsEta->Fill(bestGsfElectron.eta(), elseed_Ext->dRZNeg(1));
3674  }
3675  }
3676  } // end of Extended flag
3677 
3678  if (!isEBflag && !isEEflag)
3679  continue;
3680 
3681  // electron related distributions
3682  if (isEBflag) {
3683  h1_ele_vertexPt_EB->Fill(bestGsfElectron.pt());
3684  } else if (isEEflag) {
3685  h1_ele_vertexPt_EE->Fill(bestGsfElectron.pt());
3686  }
3687  h1_ele_charge->Fill(bestGsfElectron.charge());
3688  h2_ele_chargeVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.charge());
3689  h2_ele_chargeVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.charge());
3690  h2_ele_chargeVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.charge());
3691  h1_ele_vertexP->Fill(bestGsfElectron.p());
3692  h1_ele_vertexPt->Fill(bestGsfElectron.pt());
3693  if (bestGsfElectron.scSigmaIEtaIEta() == 0.)
3694  h1_ele_vertexPt_nocut->Fill(bestGsfElectron.pt());
3695  h1_ele_Et->Fill(bestGsfElectron.ecalEnergy() / cosh(bestGsfElectron.superCluster()->eta()));
3696  h2_ele_vertexPtVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.pt());
3697  h2_ele_vertexPtVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.pt());
3698  h1_ele_vertexEta->Fill(bestGsfElectron.eta());
3699 
3700  h2_scl_EoEtrueVsrecOfflineVertices->Fill((*vertexCollectionHandle).size(),
3701  bestGsfElectron.ecalEnergy() / mcIter->p());
3702  if (isEBflag)
3703  h2_scl_EoEtrueVsrecOfflineVertices_barrel->Fill((*vertexCollectionHandle).size(),
3704  bestGsfElectron.ecalEnergy() / mcIter->p());
3705  else if (isEEflag)
3706  h2_scl_EoEtrueVsrecOfflineVertices_endcaps->Fill((*vertexCollectionHandle).size(),
3707  bestGsfElectron.ecalEnergy() / mcIter->p());
3708 
3709  // generated distributions for matched electrons
3710  h1_mc_Pt_matched->Fill(mcIter->pt());
3711  h1_mc_Phi_matched->Fill(mcIter->phi());
3712  h1_mc_AbsEta_matched->Fill(std::abs(mcIter->eta()));
3713  h1_mc_AbsEta_Extended_matched->Fill(std::abs(mcIter->eta()));
3714  h1_mc_Eta_Extended_matched->Fill(mcIter->eta());
3715  h2_mc_PtEta_matched->Fill(mcIter->eta(), mcIter->pt());
3716  h2_ele_vertexEtaVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta());
3717  h1_ele_vertexPhi->Fill(bestGsfElectron.phi());
3718  h1_ele_vertexX->Fill(bestGsfElectron.vertex().x());
3719  h1_ele_vertexY->Fill(bestGsfElectron.vertex().y());
3720  h1_ele_vertexZ->Fill(bestGsfElectron.vertex().z());
3721  h1_mc_Z_matched->Fill(mcIter->vz());
3722  double d = (bestGsfElectron.vertex().x() - mcIter->vx()) * (bestGsfElectron.vertex().x() - mcIter->vx()) +
3723  (bestGsfElectron.vertex().y() - mcIter->vy()) * (bestGsfElectron.vertex().y() - mcIter->vy());
3724  d = sqrt(d);
3726  h2_ele_vertexTIPVsEta->Fill(bestGsfElectron.eta(), d);
3727  h2_ele_vertexTIPVsPhi->Fill(bestGsfElectron.phi(), d);
3728  h2_ele_vertexTIPVsPt->Fill(bestGsfElectron.pt(), d);
3729  h1_ele_EtaMnEtaTrue->Fill(bestGsfElectron.eta() - mcIter->eta());
3730  h2_ele_EtaMnEtaTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eta() - mcIter->eta());
3731  h2_ele_EtaMnEtaTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta() - mcIter->eta());
3732  h2_ele_EtaMnEtaTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.eta() - mcIter->eta());
3733  h1_ele_PhiMnPhiTrue->Fill(bestGsfElectron.phi() - mcIter->phi());
3734  h1_ele_PhiMnPhiTrue2->Fill(bestGsfElectron.phi() - mcIter->phi());
3735  h2_ele_PhiMnPhiTrueVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.phi() - mcIter->phi());
3736  h2_ele_PhiMnPhiTrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.phi() - mcIter->phi());
3737  h2_ele_PhiMnPhiTrueVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.phi() - mcIter->phi());
3738  h1_ele_PoPtrue->Fill(bestGsfElectron.p() / mcIter->p());
3739  h1_ele_PtoPttrue->Fill(bestGsfElectron.pt() / mcIter->pt());
3740  h2_ele_PoPtrueVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.p() / mcIter->p());
3741  h2_ele_PoPtrueVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.p() / mcIter->p());
3742  h2_ele_PoPtrueVsPt->Fill(bestGsfElectron.py(), bestGsfElectron.p() / mcIter->p());
3743  h2_ele_sigmaIetaIetaVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.scSigmaIEtaIEta());
3745  h1_ele_combinedP4Error->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3746  if (isEBflag) {
3747  h1_ele_EtaMnEtaTrue_barrel->Fill(bestGsfElectron.eta() - mcIter->eta());
3748  h1_ele_PhiMnPhiTrue_barrel->Fill(bestGsfElectron.phi() - mcIter->phi());
3749  h1_ele_PoPtrue_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3750  h1_ele_PtoPttrue_barrel->Fill(bestGsfElectron.pt() / mcIter->pt());
3752  h1_ele_combinedP4Error_barrel->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3753  } else if (isEEflag) {
3754  h1_ele_EtaMnEtaTrue_endcaps->Fill(bestGsfElectron.eta() - mcIter->eta());
3755  h1_ele_PhiMnPhiTrue_endcaps->Fill(bestGsfElectron.phi() - mcIter->phi());
3756  h1_ele_PoPtrue_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3757  h1_ele_PtoPttrue_endcaps->Fill(bestGsfElectron.pt() / mcIter->pt());
3759  h1_ele_combinedP4Error_endcaps->Fill(bestGsfElectron.p4Error(bestGsfElectron.P4_COMBINATION));
3760  }
3761 
3762  if (isEBflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3763  h1_ele_PoPtrue_golden_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3764  if (isEEflag && bestGsfElectron.classification() == GsfElectron::GOLDEN)
3765  h1_ele_PoPtrue_golden_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3766  if (isEBflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3767  h1_ele_PoPtrue_showering_barrel->Fill(bestGsfElectron.p() / mcIter->p());
3768  if (isEEflag && bestGsfElectron.classification() == GsfElectron::SHOWERING)
3769  h1_ele_PoPtrue_showering_endcaps->Fill(bestGsfElectron.p() / mcIter->p());
3770 
3771  // supercluster related distributions
3772  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
3773 
3774  h1_scl_En->Fill(bestGsfElectron.ecalEnergy());
3775  if (isEBflag) {
3776  h1_scl_EoEtrue_barrel->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3777  h1_scl_EoEtrue_barrel_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3778  } else if (isEEflag) {
3779  h1_scl_EoEtrue_endcaps->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3780  h1_scl_EoEtrue_endcaps_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3781  }
3782  if (isEBflag && bestGsfElectron.isEBEtaGap())
3783  h1_scl_EoEtrue_barrel_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3784  if (isEBflag && bestGsfElectron.isEBPhiGap())
3785  h1_scl_EoEtrue_barrel_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3786  if (bestGsfElectron.isEBEEGap())
3787  h1_scl_EoEtrue_ebeegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3788  if (isEEflag && bestGsfElectron.isEEDeeGap())
3789  h1_scl_EoEtrue_endcaps_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3790  if (isEEflag && bestGsfElectron.isEERingGap())
3791  h1_scl_EoEtrue_endcaps_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3792  if (isEBflag && bestGsfElectron.isEBEtaGap())
3793  h1_scl_EoEtrue_barrel_new_etagap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3794  if (isEBflag && bestGsfElectron.isEBPhiGap())
3795  h1_scl_EoEtrue_barrel_new_phigap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3796  if (bestGsfElectron.isEBEEGap())
3797  h1_scl_EoEtrue_ebeegap_new->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3798  if (isEEflag && bestGsfElectron.isEEDeeGap())
3799  h1_scl_EoEtrue_endcaps_new_deegap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3800  if (isEEflag && bestGsfElectron.isEERingGap())
3801  h1_scl_EoEtrue_endcaps_new_ringgap->Fill(bestGsfElectron.ecalEnergy() / mcIter->p());
3802 
3803  double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
3804  double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
3805  h1_scl_Et->Fill(sclRef->energy() * (Rt / R));
3806  h2_scl_EtVsEta->Fill(sclRef->eta(), sclRef->energy() * (Rt / R));
3807  h2_scl_EtVsPhi->Fill(sclRef->phi(), sclRef->energy() * (Rt / R));
3808  h1_scl_Eta->Fill(sclRef->eta());
3809  h2_scl_EtaVsPhi->Fill(sclRef->phi(), sclRef->eta());
3810  h1_scl_Phi->Fill(sclRef->phi());
3811  h1_scl_SigEtaEta->Fill(bestGsfElectron.scSigmaEtaEta());
3812  h1_scl_SigIEtaIEta->Fill(bestGsfElectron.scSigmaIEtaIEta());
3814  h1_scl_E1x5->Fill(bestGsfElectron.scE1x5());
3815  h1_scl_E2x5max->Fill(bestGsfElectron.scE2x5Max());
3816  h1_scl_E5x5->Fill(bestGsfElectron.scE5x5());
3817  if (isEBflag) {
3818  h1_scl_SigEtaEta_barrel->Fill(bestGsfElectron.scSigmaEtaEta());
3819  h1_scl_SigIEtaIEta_barrel->Fill(bestGsfElectron.scSigmaIEtaIEta());
3821  h1_scl_E1x5_barrel->Fill(bestGsfElectron.scE1x5());
3822  h1_scl_E2x5max_barrel->Fill(bestGsfElectron.scE2x5Max());
3823  h1_scl_E5x5_barrel->Fill(bestGsfElectron.scE5x5());
3824  } else if (isEEflag) {
3825  h1_scl_SigEtaEta_endcaps->Fill(bestGsfElectron.scSigmaEtaEta());
3826  h1_scl_SigIEtaIEta_endcaps->Fill(bestGsfElectron.scSigmaIEtaIEta());
3828  h1_scl_E1x5_endcaps->Fill(bestGsfElectron.scE1x5());
3829  h1_scl_E2x5max_endcaps->Fill(bestGsfElectron.scE2x5Max());
3830  h1_scl_E5x5_endcaps->Fill(bestGsfElectron.scE5x5());
3831  }
3832 
3833  if (passMiniAODSelection) { // Pt > 5.
3834  h1_scl_SigIEtaIEta_mAOD->Fill(bestGsfElectron.scSigmaIEtaIEta());
3835  if (isEBflag)
3837  else if (isEEflag)
3839  }
3840 
3841  float pfEnergy = 0.;
3842  if (!bestGsfElectron.parentSuperCluster().isNull())
3843  pfEnergy = bestGsfElectron.parentSuperCluster()->energy();
3844  h2_scl_EoEtruePfVsEg->Fill(bestGsfElectron.ecalEnergy() / mcIter->p(), pfEnergy / mcIter->p());
3845  if (isEEflag)
3846  h1_scl_ESFrac_endcaps->Fill(sclRef->preshowerEnergy() / sclRef->rawEnergy());
3847 
3848  h1_scl_bcl_EtotoEtrue->Fill(Etot / mcIter->p());
3849  if (isEBflag)
3850  h1_scl_bcl_EtotoEtrue_barrel->Fill(Etot / mcIter->p());
3851  else if (isEEflag)
3852  h1_scl_bcl_EtotoEtrue_endcaps->Fill(Etot / mcIter->p());
3853 
3854  // track related distributions
3856  h2_ele_ambiguousTracksVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize());
3857  h2_ele_ambiguousTracksVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize());
3858  h2_ele_ambiguousTracksVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize());
3859  if (!readAOD_) // track extra does not exist in AOD
3860  {
3861  h1_ele_foundHits->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3862  h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3863  h2_ele_foundHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3864  h2_ele_foundHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3865  h1_ele_lostHits->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3866  h2_ele_lostHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3867  h2_ele_lostHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3868  h2_ele_lostHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits());
3869  h1_ele_chi2->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3870  h2_ele_chi2VsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2());
3871  h2_ele_chi2VsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2());
3872  h2_ele_chi2VsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2());
3873  if (isEBflag) {
3874  h1_ele_foundHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3875  h1_ele_lostHits_barrel->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3876  h1_ele_chi2_barrel->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3877  } else if (isEEflag) {
3878  h1_ele_foundHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
3879  h1_ele_lostHits_endcaps->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
3880  h1_ele_chi2_endcaps->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
3881  }
3882 
3883  if (passMiniAODSelection) { // Pt > 5.
3884  h2_ele_foundHitsVsEta_mAOD->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
3885  }
3886  }
3887  // from gsf track interface, hence using mean
3888  if (!readAOD_) // track extra does not exist in AOD
3889  {
3890  h1_ele_PinMnPout->Fill(bestGsfElectron.gsfTrack()->innerMomentum().R() -
3891  bestGsfElectron.gsfTrack()->outerMomentum().R());
3892  h1_ele_outerP->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R());
3893  h1_ele_outerPt->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho());
3894  }
3895  // from electron interface, hence using mode
3896  h1_ele_PinMnPout_mode->Fill(bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3897  h2_ele_PinMnPoutVsEta_mode->Fill(bestGsfElectron.eta(),
3898  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3899  h2_ele_PinMnPoutVsPhi_mode->Fill(bestGsfElectron.phi(),
3900  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3901  h2_ele_PinMnPoutVsPt_mode->Fill(bestGsfElectron.pt(),
3902  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3903  h2_ele_PinMnPoutVsE_mode->Fill(bestGsfElectron.caloEnergy(),
3904  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3905  if (!readAOD_) // track extra does not exist in AOD
3906  {
3908  bestGsfElectron.gsfTrack()->normalizedChi2(),
3909  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
3910  }
3911  h1_ele_outerP_mode->Fill(bestGsfElectron.trackMomentumOut().R());
3912  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R());
3913  h1_ele_outerPt_mode->Fill(bestGsfElectron.trackMomentumOut().Rho());
3914  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho());
3915  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho());
3916  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho());
3917 
3918  if (!readAOD_) // track extra does not exist in AOD
3919  {
3920  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
3921  ElectronSeedRef elseed = seed.castTo<ElectronSeedRef>();
3922  h1_ele_seed_subdet2->Fill(elseed->subDet(1));
3923  h1_ele_seed_mask->Fill(elseed->hitsMask());
3924  if (elseed->subDet(1) == 1) {
3925  h1_ele_seed_mask_bpix->Fill(elseed->hitsMask());
3926  } else if (elseed->subDet(1) == 2) {
3927  h1_ele_seed_mask_fpix->Fill(elseed->hitsMask());
3928  } else if (elseed->subDet(1) == 6) {
3929  h1_ele_seed_mask_tec->Fill(elseed->hitsMask());
3930  }
3931 
3932  if (elseed->dPhiNeg(1) != std::numeric_limits<float>::infinity()) {
3933  h1_ele_seed_dphi2->Fill(elseed->dPhiNeg(1));
3934  h2_ele_seed_dphi2VsEta->Fill(bestGsfElectron.eta(), elseed->dPhiNeg(1));
3935  h2_ele_seed_dphi2VsPt->Fill(bestGsfElectron.pt(), elseed->dPhiNeg(1));
3936  }
3937  if (elseed->dPhiPos(1) != std::numeric_limits<float>::infinity()) {
3938  h1_ele_seed_dphi2pos->Fill(elseed->dPhiPos(1));
3939  h2_ele_seed_dphi2posVsEta->Fill(bestGsfElectron.eta(), elseed->dPhiPos(1));
3940  h2_ele_seed_dphi2posVsPt->Fill(bestGsfElectron.pt(), elseed->dPhiPos(1));
3941  }
3942  if (elseed->dRZNeg(1) != std::numeric_limits<float>::infinity()) {
3943  h1_ele_seed_drz2->Fill(elseed->dRZNeg(1));
3944  h2_ele_seed_drz2VsEta->Fill(bestGsfElectron.eta(), elseed->dRZNeg(1));
3945  h2_ele_seed_drz2VsPt->Fill(bestGsfElectron.pt(), elseed->dRZNeg(1));
3946  }
3947  if (elseed->dRZPos(1) != std::numeric_limits<float>::infinity()) {
3948  h1_ele_seed_drz2pos->Fill(elseed->dRZPos(1));
3949  h2_ele_seed_drz2posVsEta->Fill(bestGsfElectron.eta(), elseed->dRZPos(1));
3950  h2_ele_seed_drz2posVsPt->Fill(bestGsfElectron.pt(), elseed->dRZPos(1));
3951  }
3952  }
3953 
3954  // match distributions
3955  h1_ele_EoP->Fill(bestGsfElectron.eSuperClusterOverP());
3956  h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
3957  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP());
3958  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP());
3959  h1_ele_EseedOP->Fill(bestGsfElectron.eSeedClusterOverP());
3960  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP());
3961  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP());
3962  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP());
3963  h1_ele_EoPout->Fill(bestGsfElectron.eSeedClusterOverPout());
3964  h2_ele_EoPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout());
3965  h2_ele_EoPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout());
3966  h2_ele_EoPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout());
3967  h1_ele_EeleOPout->Fill(bestGsfElectron.eEleClusterOverPout());
3968  h2_ele_EeleOPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout());
3969  h2_ele_EeleOPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout());
3970  h2_ele_EeleOPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout());
3972  h2_ele_dEtaScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3973  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3974  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
3976  h2_ele_dPhiScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3977  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3978  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
3980  h2_ele_dEtaClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3981  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3982  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
3984  h2_ele_dPhiClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3985  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3986  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
3988  h2_ele_dEtaEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3989  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3990  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
3992  h2_ele_dPhiEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3993  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3994  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
3995  h1_ele_HoE->Fill(bestGsfElectron.hcalOverEcal());
3996  h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc());
3997  if (isEBflag) {
3998  h1_ele_EoP_barrel->Fill(bestGsfElectron.eSuperClusterOverP());
3999  h1_ele_EseedOP_barrel->Fill(bestGsfElectron.eSeedClusterOverP());
4000  h1_ele_EoPout_barrel->Fill(bestGsfElectron.eSeedClusterOverPout());
4001  h1_ele_EeleOPout_barrel->Fill(bestGsfElectron.eEleClusterOverPout());
4008  h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc());
4009  h1_ele_HoE_barrel->Fill(bestGsfElectron.hcalOverEcal());
4010  } else if (isEEflag) {
4011  h1_ele_EoP_endcaps->Fill(bestGsfElectron.eSuperClusterOverP());
4012  h1_ele_EseedOP_endcaps->Fill(bestGsfElectron.eSeedClusterOverP());
4013  h1_ele_EoPout_endcaps->Fill(bestGsfElectron.eSeedClusterOverPout());
4021  h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc());
4022  h1_ele_HoE_endcaps->Fill(bestGsfElectron.hcalOverEcal());
4023  }
4024 
4025  if (passMiniAODSelection) { // Pt > 5.
4028  h1_ele_HoE_mAOD->Fill(bestGsfElectron.hcalOverEcal());
4029  if (isEBflag) {
4032  h1_ele_HoE_mAOD_barrel->Fill(bestGsfElectron.hcalOverEcal());
4033  } else if (isEEflag) {
4036  h1_ele_HoE_mAOD_endcaps->Fill(bestGsfElectron.hcalOverEcal());
4037  }
4038  }
4039 
4040  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap() && !bestGsfElectron.isEBEEGap() &&
4041  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap())
4042  h1_ele_HoE_fiducial->Fill(bestGsfElectron.hcalOverEcal());
4043  h2_ele_HoEVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.hcalOverEcal());
4044  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.hcalOverEcal());
4045  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.hcalOverEcal());
4046 
4047  //classes
4048  int eleClass = bestGsfElectron.classification();
4049  if (isEEflag)
4050  eleClass += 10;
4051  h1_ele_classes->Fill(eleClass);
4052 
4053  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEBflag)
4054  h1_scl_EoEtrueGolden_barrel->Fill(sclRef->energy() / mcIter->p());
4055  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && isEEflag)
4056  h1_scl_EoEtrueGolden_endcaps->Fill(sclRef->energy() / mcIter->p());
4057  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEBflag)
4058  h1_scl_EoEtrueShowering_barrel->Fill(sclRef->energy() / mcIter->p());
4059  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && isEEflag)
4060  h1_scl_EoEtrueShowering_endcaps->Fill(sclRef->energy() / mcIter->p());
4061 
4062  //eleClass = eleClass%100; // get rid of barrel/endcap distinction
4063  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
4064  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4065  h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
4066  if (bestGsfElectron.classification() == GsfElectron::BIGBREM)
4067  h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
4068  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4069  h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
4070 
4071  // fbrem
4072 
4073  double fbrem_mode = bestGsfElectron.fbrem();
4074  h1_ele_fbrem->Fill(fbrem_mode);
4075  if (passMiniAODSelection) { // Pt > 5.
4076  h1_ele_fbrem_mAOD->Fill(fbrem_mode);
4077  }
4078  if (isEBflag) {
4079  double fbrem_mode_barrel = bestGsfElectron.fbrem();
4080  h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel);
4081  if (passMiniAODSelection) { // Pt > 5.
4082  h1_ele_fbrem_mAOD_barrel->Fill(fbrem_mode_barrel);
4083  }
4084  } else if (isEEflag) {
4085  double fbrem_mode_endcaps = bestGsfElectron.fbrem();
4086  h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps);
4087  if (passMiniAODSelection) { // Pt > 5.
4088  h1_ele_fbrem_mAOD_endcaps->Fill(fbrem_mode_endcaps);
4089  }
4090  }
4091 
4092  double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem();
4093  h1_ele_superclusterfbrem->Fill(superclusterfbrem_mode);
4094 
4095  if (isEBflag) {
4096  double superclusterfbrem_mode_barrel = bestGsfElectron.superClusterFbrem();
4097  h1_ele_superclusterfbrem_barrel->Fill(superclusterfbrem_mode_barrel);
4098  } else if (isEEflag) {
4099  double superclusterfbrem_mode_endcaps = bestGsfElectron.superClusterFbrem();
4100  h1_ele_superclusterfbrem_endcaps->Fill(superclusterfbrem_mode_endcaps);
4101  }
4102 
4103  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(), fbrem_mode);
4104 
4105  if (!readAOD_) // track extra does not exist in AOD
4106  {
4107  double fbrem_mean =
4108  1. - bestGsfElectron.gsfTrack()->outerMomentum().R() / bestGsfElectron.gsfTrack()->innerMomentum().R();
4109  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(), fbrem_mean);
4110  }
4111 
4112  //
4113 
4114  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4115  h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
4116  bestGsfElectron.trackMomentumAtVtx().R());
4117  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4118  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
4119  bestGsfElectron.trackMomentumAtVtx().R());
4120  if (!readAOD_) // track extra not available in AOD
4121  {
4122  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4123  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
4124  bestGsfElectron.gsfTrack()->innerMomentum().R());
4125  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4126  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
4127  bestGsfElectron.gsfTrack()->innerMomentum().R());
4128  }
4129  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4130  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
4131  bestGsfElectron.trackMomentumAtVtx().Rho());
4132  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4133  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
4134  bestGsfElectron.trackMomentumAtVtx().Rho());
4135  if (!readAOD_) // track extra not available in AOD
4136  {
4137  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
4138  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
4139  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
4140  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
4141  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
4142  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
4143  }
4144 
4145  // provenance and pflow data
4146  h1_ele_mva->Fill(bestGsfElectron.mva_e_pi());
4147  h1_ele_mva_isolated->Fill(bestGsfElectron.mva_Isolated());
4148  if (isEBflag) {
4149  h1_ele_mva_barrel->Fill(bestGsfElectron.mva_e_pi());
4150  h1_ele_mva_barrel_isolated->Fill(bestGsfElectron.mva_Isolated());
4151  } else if (isEEflag) {
4152  h1_ele_mva_endcaps->Fill(bestGsfElectron.mva_e_pi());
4153  h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated());
4154  }
4155  if (bestGsfElectron.ecalDrivenSeed()) {
4156  h1_ele_provenance->Fill(1.);
4157  }
4158  if (bestGsfElectron.trackerDrivenSeed()) {
4159  h1_ele_provenance->Fill(-1.);
4160  }
4161  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) {
4162  h1_ele_provenance->Fill(0.);
4163  }
4164  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) {
4165  h1_ele_provenance->Fill(-2.);
4166  }
4167  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) {
4168  h1_ele_provenance->Fill(2.);
4169  }
4170 
4171  if (bestGsfElectron.ecalDrivenSeed() && isEBflag)
4173  if (bestGsfElectron.trackerDrivenSeed() && isEBflag)
4175  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEBflag)
4177  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEBflag)
4179  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEBflag)
4181  if (bestGsfElectron.ecalDrivenSeed() && isEEflag)
4183  if (bestGsfElectron.trackerDrivenSeed() && isEEflag)
4185  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEEflag)
4187  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEEflag)
4189  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEEflag)
4191 
4192  if (bestGsfElectron.isGsfCtfScPixChargeConsistent())
4193  h1_ele_chargeInfo->Fill(-1.0);
4194  if (bestGsfElectron.isGsfScPixChargeConsistent())
4195  h1_ele_chargeInfo->Fill(0.);
4196  if (bestGsfElectron.isGsfCtfChargeConsistent())
4197  h1_ele_chargeInfo->Fill(1.0);
4198 
4199  // Pflow isolation
4203  h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4204  if (isEBflag) {
4208  }
4209 
4210  else if (isEEflag) {
4214  }
4215 
4216  // -- pflow over pT
4218  bestGsfElectron.pt());
4220  bestGsfElectron.pt());
4221  if (isEBflag) {
4223  bestGsfElectron.pt());
4225  bestGsfElectron.pt());
4226  h1_ele_photonRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4227  } else if (isEEflag) {
4229  bestGsfElectron.pt());
4231  bestGsfElectron.pt());
4232  h1_ele_photonRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4233  }
4234  if (passMiniAODSelection) { // Pt > 5.
4236  bestGsfElectron.pt());
4238  bestGsfElectron.pt());
4239  h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
4240  if (isEBflag) {
4242  bestGsfElectron.pt());
4244  bestGsfElectron.pt());
4246  bestGsfElectron.pt());
4247  } else if (isEEflag) {
4249  bestGsfElectron.pt());
4251  bestGsfElectron.pt());
4253  bestGsfElectron.pt());
4254  }
4255  }
4256 
4257  // isolation
4258  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
4259  h1_ele_ecalPFClusterIso->Fill(bestGsfElectron.ecalPFClusterIso());
4260  h1_ele_hcalPFClusterIso->Fill(bestGsfElectron.hcalPFClusterIso());
4266  h1_ele_hcalDepth1OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(1));
4267  h1_ele_hcalDepth2OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(2));
4268  if (isEBflag) {
4269  h1_ele_tkSumPt_dr03_barrel->Fill(bestGsfElectron.dr03TkSumPt());
4279  } else if (isEEflag) {
4280  h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt());
4290  }
4291 
4292  // conversion rejection
4293  int flags = bestGsfElectron.convFlags();
4294  if (flags == -9999) {
4295  flags = -1;
4296  }
4298  if (flags >= 0.) {
4299  h1_ele_convDist->Fill(bestGsfElectron.convDist());
4300  h1_ele_convDcot->Fill(bestGsfElectron.convDcot());
4301  h1_ele_convRadius->Fill(bestGsfElectron.convRadius());
4302  }
4303 
4304  } // loop over mc particle
4305  h1_mcNum->Fill(mcNum);
4306  h1_eleNum->Fill(eleNum);
4307 }
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:230
MonitorElement * h1_ele_ecalEnergyError_endcaps
size
Write out results.
MonitorElement * h1_scl_EoEtrue_endcaps_ringgap
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_endcaps
MonitorElement * h1_ele_hcalPFClusterIso_barrel
static bool isHGCalDet(DetId::Detector thedet)
identify HGCal cells
Definition: EcalTools.h:49
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
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
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
edm::EDGetTokenT< reco::GsfElectronCoreCollection > electronCoreCollectionEndcaps_
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
REF castTo() const
Definition: RefToBase.h:243
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:23
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