CMS 3D CMS Logo

ElectronMcFakeValidator.cc
Go to the documentation of this file.
1 
2 // user include files
4 
6 
8 
19 
22 
25 
27 
32 
33 #include "CLHEP/Units/GlobalPhysicalConstants.h"
34 #include "TMath.h"
35 #include "TFile.h"
36 #include "TH1F.h"
37 #include "TH1I.h"
38 #include "TH2F.h"
39 #include "TProfile.h"
40 #include "TTree.h"
41 #include <vector>
42 #include <iostream>
43 
44 using namespace reco;
45 
47  electronCollection_ = consumes<reco::GsfElectronCollection>(conf.getParameter<edm::InputTag>("electronCollection"));
49  consumes<reco::GsfElectronCollection>(conf.getParameter<edm::InputTag>("electronCollectionEndcaps"));
51  consumes<reco::GsfElectronCoreCollection>(conf.getParameter<edm::InputTag>("electronCoreCollection"));
53  consumes<reco::GsfElectronCoreCollection>(conf.getParameter<edm::InputTag>("electronCoreCollectionEndcaps"));
55  consumes<reco::GsfTrackCollection>(conf.getParameter<edm::InputTag>("electronTrackCollection"));
57  consumes<reco::ElectronSeedCollection>(conf.getParameter<edm::InputTag>("electronSeedCollection"));
59  consumes<reco::GenJetCollection>(conf.getParameter<edm::InputTag>("matchingObjectCollection"));
61  consumes<reco::VertexCollection>(conf.getParameter<edm::InputTag>("offlinePrimaryVertices"));
62 
63  beamSpotTag_ = consumes<reco::BeamSpot>(conf.getParameter<edm::InputTag>("beamSpot"));
64  readAOD_ = conf.getParameter<bool>("readAOD");
65 
66  isoFromDepsTk03Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsTk03"));
67  isoFromDepsTk04Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsTk04"));
69  consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsEcalFull03"));
71  consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsEcalFull04"));
73  consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsEcalReduced03"));
75  consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsEcalReduced04"));
76  isoFromDepsHcal03Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsHcal03"));
77  isoFromDepsHcal04Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>("isoFromDepsHcal04"));
78 
79  maxPt_ = conf.getParameter<double>("MaxPt");
80  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
81  maxAbsEtaExtended_ = conf.getParameter<double>("MaxAbsEtaExtended");
82  deltaR2_ = conf.getParameter<double>("DeltaR") * conf.getParameter<double>("DeltaR");
83  inputFile_ = conf.getParameter<std::string>("InputFile");
84  outputFile_ = conf.getParameter<std::string>("OutputFile");
85  inputInternalPath_ = conf.getParameter<std::string>("InputFolderName");
86  outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName");
87 
88  // histos bining and limits
89 
90  edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg");
91 
92  xyz_nbin = histosSet.getParameter<int>("Nbinxyz");
93 
94  p_nbin = histosSet.getParameter<int>("Nbinp");
95  p2D_nbin = histosSet.getParameter<int>("Nbinp2D");
96  p_max = histosSet.getParameter<double>("Pmax");
97 
98  pt_nbin = histosSet.getParameter<int>("Nbinpt");
99  pt2D_nbin = histosSet.getParameter<int>("Nbinpt2D");
100  pteff_nbin = histosSet.getParameter<int>("Nbinpteff");
101  pt_max = histosSet.getParameter<double>("Ptmax");
102 
103  fhits_nbin = histosSet.getParameter<int>("Nbinfhits");
104  fhits_max = histosSet.getParameter<double>("Fhitsmax");
105 
106  lhits_nbin = histosSet.getParameter<int>("Nbinlhits");
107  lhits_max = histosSet.getParameter<double>("Lhitsmax");
108 
109  eop_nbin = histosSet.getParameter<int>("Nbineop");
110  eop2D_nbin = histosSet.getParameter<int>("Nbineop2D");
111  eop_max = histosSet.getParameter<double>("Eopmax");
112  eopmaxsht = histosSet.getParameter<double>("Eopmaxsht");
113 
114  eta_nbin = histosSet.getParameter<int>("Nbineta");
115  eta2D_nbin = histosSet.getParameter<int>("Nbineta2D");
116  eta_min = histosSet.getParameter<double>("Etamin");
117  eta_max = histosSet.getParameter<double>("Etamax");
118 
119  eta_nbin_extended = histosSet.getParameter<int>("NbinetaExtended");
120  eta2D_nbin_extended = histosSet.getParameter<int>("Nbineta2DExtended");
121  eta_min_extended = histosSet.getParameter<double>("EtaminExtended");
122  eta_max_extended = histosSet.getParameter<double>("EtamaxExtended");
123 
124  deta_nbin = histosSet.getParameter<int>("Nbindeta");
125  deta_min = histosSet.getParameter<double>("Detamin");
126  deta_max = histosSet.getParameter<double>("Detamax");
127 
128  detamatch_nbin = histosSet.getParameter<int>("Nbindetamatch");
129  detamatch2D_nbin = histosSet.getParameter<int>("Nbindetamatch2D");
130  detamatch_min = histosSet.getParameter<double>("Detamatchmin");
131  detamatch_max = histosSet.getParameter<double>("Detamatchmax");
132 
133  phi_nbin = histosSet.getParameter<int>("Nbinphi");
134  phi2D_nbin = histosSet.getParameter<int>("Nbinphi2D");
135  phi_min = histosSet.getParameter<double>("Phimin");
136  phi_max = histosSet.getParameter<double>("Phimax");
137 
138  dphi_nbin = histosSet.getParameter<int>("Nbindphi");
139  dphi_min = histosSet.getParameter<double>("Dphimin");
140  dphi_max = histosSet.getParameter<double>("Dphimax");
141 
142  dphimatch_nbin = histosSet.getParameter<int>("Nbindphimatch");
143  dphimatch2D_nbin = histosSet.getParameter<int>("Nbindphimatch2D");
144  dphimatch_min = histosSet.getParameter<double>("Dphimatchmin");
145  dphimatch_max = histosSet.getParameter<double>("Dphimatchmax");
146 
147  mee_nbin = histosSet.getParameter<int>("Nbinmee");
148  mee_min = histosSet.getParameter<double>("Meemin");
149  mee_max = histosSet.getParameter<double>("Meemax");
150 
151  hoe_nbin = histosSet.getParameter<int>("Nbinhoe");
152  hoe_min = histosSet.getParameter<double>("Hoemin");
153  hoe_max = histosSet.getParameter<double>("Hoemax");
154 
155  popmatching_nbin = histosSet.getParameter<int>("Nbinpopmatching");
156  popmatching_min = histosSet.getParameter<double>("Popmatchingmin");
157  popmatching_max = histosSet.getParameter<double>("Popmatchingmax");
158 
159  set_EfficiencyFlag = histosSet.getParameter<bool>("EfficiencyFlag");
160  set_StatOverflowFlag = histosSet.getParameter<bool>("StatOverflowFlag");
161 
162  opv_nbin = histosSet.getParameter<int>("NbinOPV");
163  opv_min = histosSet.getParameter<double>("OPV_min");
164  opv_max = histosSet.getParameter<double>("OPV_max");
165 
166  ele_nbin = histosSet.getParameter<int>("NbinELE");
167  ele_min = histosSet.getParameter<double>("ELE_min");
168  ele_max = histosSet.getParameter<double>("ELE_max");
169 
170  core_nbin = histosSet.getParameter<int>("NbinCORE");
171  core_min = histosSet.getParameter<double>("CORE_min");
172  core_max = histosSet.getParameter<double>("CORE_max");
173 
174  track_nbin = histosSet.getParameter<int>("NbinTRACK");
175  track_min = histosSet.getParameter<double>("TRACK_min");
176  track_max = histosSet.getParameter<double>("TRACK_max");
177 
178  seed_nbin = histosSet.getParameter<int>("NbinSEED");
179  seed_min = histosSet.getParameter<double>("SEED_min");
180  seed_max = histosSet.getParameter<double>("SEED_max");
181 
182  // so to please coverity
183  h1_matchingObjectNum = nullptr;
184  h1_recEleNum_ = nullptr;
185  h1_recCoreNum_ = nullptr;
186  h1_recTrackNum_ = nullptr;
187  h1_recSeedNum_ = nullptr;
188  h1_recOfflineVertices_ = nullptr;
189 
190  h1_matchingObjectEta = nullptr;
192  h1_matchingObjectAbsEta = nullptr;
194  h1_matchingObjectP = nullptr;
195  h1_matchingObjectPt = nullptr;
196  h1_matchingObjectPhi = nullptr;
197  h1_matchingObjectZ = nullptr;
198 
199  h1_ele_EoverP_all = nullptr;
200  h1_ele_EseedOP_all = nullptr;
201  h1_ele_EoPout_all = nullptr;
202  h1_ele_EeleOPout_all = nullptr;
203  h1_ele_dEtaSc_propVtx_all = nullptr;
204  h1_ele_dPhiSc_propVtx_all = nullptr;
205  h1_ele_dEtaCl_propOut_all = nullptr;
206  h1_ele_dPhiCl_propOut_all = nullptr;
207  h1_ele_TIP_all = nullptr;
208  h1_ele_HoE_all = nullptr;
209  h1_ele_vertexEta_all = nullptr;
210  h1_ele_vertexPt_all = nullptr;
211  h1_ele_mee_all = nullptr;
212  h1_ele_mee_os = nullptr;
213 
214  h2_ele_E2mnE1vsMee_all = nullptr;
215  h2_ele_E2mnE1vsMee_egeg_all = nullptr;
216 
224 
225  h1_ele_charge = nullptr;
226  h2_ele_chargeVsEta = nullptr;
227  h2_ele_chargeVsPhi = nullptr;
228  h2_ele_chargeVsPt = nullptr;
229  h1_ele_vertexP = nullptr;
230  h1_ele_vertexPt = nullptr;
231  h2_ele_vertexPtVsEta = nullptr;
232  h2_ele_vertexPtVsPhi = nullptr;
233  h1_ele_vertexEta = nullptr;
234  h2_ele_vertexEtaVsPhi = nullptr;
235  h1_ele_vertexAbsEta = nullptr;
236  h1_ele_vertexPhi = nullptr;
237  h1_ele_vertexX = nullptr;
238  h1_ele_vertexY = nullptr;
239  h1_ele_vertexZ = nullptr;
240  h1_ele_vertexTIP = nullptr;
241  h2_ele_vertexTIPVsEta = nullptr;
242  h2_ele_vertexTIPVsPhi = nullptr;
243  h2_ele_vertexTIPVsPt = nullptr;
244 
245  h1_ele_PoPmatchingObject = nullptr;
251 
261 
262  h1_scl_En_ = nullptr;
265  h1_scl_Et_ = nullptr;
266  h2_scl_EtVsEta_ = nullptr;
267  h2_scl_EtVsPhi_ = nullptr;
268  h2_scl_EtaVsPhi_ = nullptr;
269  h1_scl_Eta_ = nullptr;
270  h1_scl_Phi_ = nullptr;
271 
272  h1_scl_SigIEtaIEta_ = nullptr;
273  h1_scl_SigIEtaIEta_barrel_ = nullptr;
274  h1_scl_SigIEtaIEta_endcaps_ = nullptr;
279  h1_scl_E1x5_ = nullptr;
280  h1_scl_E1x5_barrel_ = nullptr;
281  h1_scl_E1x5_endcaps_ = nullptr;
282  h1_scl_E2x5max_ = nullptr;
283  h1_scl_E2x5max_barrel_ = nullptr;
284  h1_scl_E2x5max_endcaps_ = nullptr;
285  h1_scl_E5x5_ = nullptr;
286  h1_scl_E5x5_barrel_ = nullptr;
287  h1_scl_E5x5_endcaps_ = nullptr;
288 
289  h1_ele_ambiguousTracks = nullptr;
290  h2_ele_ambiguousTracksVsEta = nullptr;
291  h2_ele_ambiguousTracksVsPhi = nullptr;
292  h2_ele_ambiguousTracksVsPt = nullptr;
293  h1_ele_foundHits = nullptr;
294  h1_ele_foundHits_barrel = nullptr;
295  h1_ele_foundHits_endcaps = nullptr;
297  h2_ele_foundHitsVsPhi = nullptr;
298  h2_ele_foundHitsVsPt = nullptr;
299  h1_ele_lostHits = nullptr;
300  h1_ele_lostHits_barrel = nullptr;
301  h1_ele_lostHits_endcaps = nullptr;
302  h2_ele_lostHitsVsEta = nullptr;
303  h2_ele_lostHitsVsPhi = nullptr;
304  h2_ele_lostHitsVsPt = nullptr;
305  h1_ele_chi2 = nullptr;
306  h1_ele_chi2_barrel = nullptr;
307  h1_ele_chi2_endcaps = nullptr;
308  h2_ele_chi2VsEta = nullptr;
309  h2_ele_chi2VsPhi = nullptr;
310  h2_ele_chi2VsPt = nullptr;
311 
312  h1_ele_PinMnPout = nullptr;
313  h1_ele_PinMnPout_mode = nullptr;
314  h2_ele_PinMnPoutVsEta_mode = nullptr;
315  h2_ele_PinMnPoutVsPhi_mode = nullptr;
316  h2_ele_PinMnPoutVsPt_mode = nullptr;
317  h2_ele_PinMnPoutVsE_mode = nullptr;
318  h2_ele_PinMnPoutVsChi2_mode = nullptr;
319 
320  h1_ele_outerP = nullptr;
321  h1_ele_outerP_mode = nullptr;
322  h2_ele_outerPVsEta_mode = nullptr;
323  h1_ele_outerPt = nullptr;
324  h1_ele_outerPt_mode = nullptr;
325  h2_ele_outerPtVsEta_mode = nullptr;
326  h2_ele_outerPtVsPhi_mode = nullptr;
327  h2_ele_outerPtVsPt_mode = nullptr;
328  h1_ele_EoP = nullptr;
329  h1_ele_EoP_barrel = nullptr;
330  h1_ele_EoP_endcaps = nullptr;
331  h2_ele_EoPVsEta_Extended = nullptr;
332  h2_ele_EoPVsPhi = nullptr;
333  h2_ele_EoPVsE = nullptr;
334  h1_ele_EseedOP = nullptr;
335  h1_ele_EseedOP_barrel = nullptr;
336  h1_ele_EseedOP_endcaps = nullptr;
337  h2_ele_EseedOPVsEta = nullptr;
338  h2_ele_EseedOPVsPhi = nullptr;
339  h2_ele_EseedOPVsE = nullptr;
340  h1_ele_EoPout = nullptr;
341  h1_ele_EoPout_barrel = nullptr;
342  h1_ele_EoPout_endcaps = nullptr;
343  h2_ele_EoPoutVsEta = nullptr;
344  h2_ele_EoPoutVsPhi = nullptr;
345  h2_ele_EoPoutVsE = nullptr;
346  h1_ele_EeleOPout = nullptr;
347  h1_ele_EeleOPout_barrel = nullptr;
348  h1_ele_EeleOPout_endcaps = nullptr;
349  h2_ele_EeleOPoutVsEta = nullptr;
350  h2_ele_EeleOPoutVsPhi = nullptr;
351  h2_ele_EeleOPoutVsE = nullptr;
352 
353  h1_ele_dEtaSc_propVtx = nullptr;
357  h2_ele_dEtaScVsEta_propVtx = nullptr;
358  h2_ele_dEtaScVsPhi_propVtx = nullptr;
359  h2_ele_dEtaScVsPt_propVtx = nullptr;
360  h1_ele_dPhiSc_propVtx = nullptr;
364  h2_ele_dPhiScVsEta_propVtx = nullptr;
365  h2_ele_dPhiScVsPhi_propVtx = nullptr;
366  h2_ele_dPhiScVsPt_propVtx = nullptr;
367  h1_ele_dEtaCl_propOut = nullptr;
370  h2_ele_dEtaClVsEta_propOut = nullptr;
371  h2_ele_dEtaClVsPhi_propOut = nullptr;
372  h2_ele_dEtaClVsPt_propOut = nullptr;
373  h1_ele_dPhiCl_propOut = nullptr;
376  h2_ele_dPhiClVsEta_propOut = nullptr;
377  h2_ele_dPhiClVsPhi_propOut = nullptr;
378  h2_ele_dPhiClVsPt_propOut = nullptr;
379  h1_ele_dEtaEleCl_propOut = nullptr;
385  h1_ele_dPhiEleCl_propOut = nullptr;
391 
392  h1_ele_seed_subdet2_ = nullptr;
393  h1_ele_seed_mask_ = nullptr;
394  h1_ele_seed_mask_bpix_ = nullptr;
395  h1_ele_seed_mask_fpix_ = nullptr;
396  h1_ele_seed_mask_tec_ = nullptr;
397  h1_ele_seed_dphi2_ = nullptr;
398  h2_ele_seed_dphi2VsEta_ = nullptr;
399  h2_ele_seed_dphi2VsPt_ = nullptr;
400  h1_ele_seed_dphi2pos_ = nullptr;
401  h2_ele_seed_dphi2posVsEta_ = nullptr;
402  h2_ele_seed_dphi2posVsPt_ = nullptr;
403  h1_ele_seed_drz2_ = nullptr;
404  h2_ele_seed_drz2VsEta_ = nullptr;
405  h2_ele_seed_drz2VsPt_ = nullptr;
406  h1_ele_seed_drz2pos_ = nullptr;
407  h2_ele_seed_drz2posVsEta_ = nullptr;
408  h2_ele_seed_drz2posVsPt_ = nullptr;
409 
410  h1_ele_classes = nullptr;
411  h1_ele_eta = nullptr;
412  h1_ele_eta_golden = nullptr;
413  h1_ele_eta_bbrem = nullptr;
414  h1_ele_eta_narrow = nullptr;
415  h1_ele_eta_shower = nullptr;
416 
417  h1_ele_HoE = nullptr;
418  h1_ele_HoE_Extended = nullptr;
419  h1_ele_HoE_barrel = nullptr;
420  h1_ele_HoE_endcaps = nullptr;
421  h1_ele_HoE_fiducial = nullptr;
422  h2_ele_HoEVsEta = nullptr;
423  h2_ele_HoEVsPhi = nullptr;
424  h2_ele_HoEVsE = nullptr;
425  h1_scl_ESFrac_endcaps = nullptr;
426 
427  h1_ele_fbrem = nullptr;
428  h1_ele_fbrem_Extended = nullptr;
429  p1_ele_fbremVsEta_mode = nullptr;
430  p1_ele_fbremVsEta_mean = nullptr;
431  h1_ele_superclusterfbrem = nullptr;
434  h2_ele_PinVsPoutGolden_mode = nullptr;
436  h2_ele_PinVsPoutGolden_mean = nullptr;
446 
447  h1_ele_mva = nullptr;
448  h1_ele_mva_isolated = nullptr;
449  h1_ele_provenance = nullptr;
450  h1_ele_provenance_Extended = nullptr;
451 
460  h1_ele_photonRelativeIso = nullptr;
464 
465  h1_ele_tkSumPt_dr03 = nullptr;
466  h1_ele_tkSumPt_dr03_barrel = nullptr;
467  h1_ele_tkSumPt_dr03_endcaps = nullptr;
468  h1_ele_ecalRecHitSumEt_dr03 = nullptr;
475 
476  h1_ele_ecalPFClusterIso = nullptr;
477  h1_ele_hcalPFClusterIso = nullptr;
484 
485  h1_ele_convFlags = nullptr;
486  h1_ele_convFlags_all = nullptr;
487  h1_ele_convDist = nullptr;
488  h1_ele_convDist_all = nullptr;
489  h1_ele_convDcot = nullptr;
490  h1_ele_convDcot_all = nullptr;
491  h1_ele_convRadius = nullptr;
492  h1_ele_convRadius_all = nullptr;
493 }
494 
497 
498  setBookIndex(-1);
499  setBookPrefix("h");
502 
503  // matching object type
504  std::string matchingObjectType;
505  matchingObjectType = "GenJet";
506 
507  std::string htitle = "# " + matchingObjectType + "s", xtitle = "N_{" + matchingObjectType + "}";
508  h1_matchingObjectNum = bookH1withSumw2(iBooker, "matchingObjectNum", htitle, fhits_nbin, 0., fhits_max, xtitle);
509 
510  // rec event collections sizes
511  h1_recEleNum_ = bookH1(iBooker, "recEleNum", "# rec electrons", ele_nbin, ele_min, ele_max, "N_{ele}");
512  h1_recCoreNum_ = bookH1(iBooker, "recCoreNum", "# rec electron cores", core_nbin, core_min, core_max, "N_{core}");
513  h1_recTrackNum_ = bookH1(iBooker, "recTrackNum", "# rec gsf tracks", track_nbin, track_min, track_max, "N_{track}");
514  h1_recSeedNum_ = bookH1(iBooker, "recSeedNum", "# rec electron seeds", seed_nbin, seed_min, seed_max, "N_{seed}");
516  iBooker, "recOfflineVertices", "# rec Offline Primary Vertices", opv_nbin, opv_min, opv_max, "N_{Vertices}");
517 
518  // mc
520  bookH1withSumw2(iBooker, "matchingObject_eta", matchingObjectType + " #eta", eta_nbin, eta_min, eta_max, "#eta");
522  "matchingObject_eta_Extended",
523  matchingObjectType + " #eta",
527  "#eta");
529  bookH1withSumw2(iBooker, "matchingObject_abseta", matchingObjectType + " |#eta|", eta_nbin / 2, 0., eta_max);
531  "matchingObject_abseta_Extended",
532  matchingObjectType + " |#eta|",
533  eta_nbin_extended / 2,
534  0.,
537  bookH1withSumw2(iBooker, "matchingObject_P", matchingObjectType + " p", p_nbin, 0., p_max, "p (GeV/c)");
539  bookH1withSumw2(iBooker, "matchingObject_Pt", matchingObjectType + " pt", pteff_nbin, 5., pt_max);
541  bookH1withSumw2(iBooker, "matchingObject_phi", matchingObjectType + " phi", phi_nbin, phi_min, phi_max);
542  h1_matchingObjectZ = bookH1withSumw2(iBooker, "matchingObject_z", matchingObjectType + " z", xyz_nbin, -25, 25);
543 
544  setBookPrefix("h_ele");
545 
546  // all electrons
548  "EoverP_all",
549  "ele E/P_{vertex}, all reco electrons",
550  eop_nbin,
551  0.,
552  eop_max,
553  "E/P_{vertex}",
554  "Events",
555  "ELE_LOGY E1 P");
557  "EseedOP_all",
558  "ele E_{seed}/P_{vertex}, all reco electrons",
559  eop_nbin,
560  0.,
561  eop_max,
562  "E_{seed}/P_{vertex}",
563  "Events",
564  "ELE_LOGY E1 P");
566  "EoPout_all",
567  "ele E_{seed}/P_{out}, all reco electrons",
568  eop_nbin,
569  0.,
570  eop_max,
571  "E_{seed}/P_{out}",
572  "Events",
573  "ELE_LOGY E1 P");
575  "EeleOPout_all",
576  "ele E_{ele}/P_{out}, all reco electrons",
577  eop_nbin,
578  0.,
579  eop_max,
580  "E_{ele}/P_{out}",
581  "Events",
582  "ELE_LOGY E1 P");
584  "dEtaSc_propVtx_all",
585  "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
589  "#eta_{sc} - #eta_{tr}",
590  "Events",
591  "ELE_LOGY E1 P");
593  "dPhiSc_propVtx_all",
594  "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
598  "#phi_{sc} - #phi_{tr} (rad)",
599  "Events",
600  "ELE_LOGY E1 P");
602  "dEtaCl_propOut_all",
603  "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
607  "#eta_{sc} - #eta_{tr}",
608  "Events",
609  "ELE_LOGY E1 P");
611  "dPhiCl_propOut_all",
612  "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
616  "#phi_{sc} - #phi_{tr} (rad)",
617  "Events",
618  "ELE_LOGY E1 P");
620  "TIP_all",
621  "ele vertex transverse radius, all reco electrons",
622  100,
623  0.,
624  0.2,
625  "r_{T} (cm)",
626  "Events",
627  "ELE_LOGY E1 P");
629  "HoE_all",
630  "ele hadronic energy / em energy, all reco electrons",
631  hoe_nbin,
632  hoe_min,
633  hoe_max,
634  "H/E",
635  "Events",
636  "ELE_LOGY E1 P");
638  "HoE_bc_all",
639  "ele hadronic energy / em energy, all reco electrons, behind cluster",
640  hoe_nbin,
641  hoe_min,
642  hoe_max,
643  "H/E",
644  "Events",
645  "ELE_LOGY E1 P");
647  iBooker, "vertexEta_all", "ele eta, all reco electrons", eta_nbin, eta_min, eta_max, "", "Events");
649  bookH1withSumw2(iBooker, "vertexPt_all", "ele p_{T}, all reco electrons", pteff_nbin, 5., pt_max, "", "Events");
651  "mee_all",
652  "ele pairs invariant mass, all reco electrons",
653  mee_nbin,
654  mee_min,
655  mee_max,
656  "m_{ee} (GeV/c^{2})");
657  h1_ele_mee_os = bookH1withSumw2(iBooker,
658  "mee_os",
659  "ele pairs invariant mass, opp. sign",
660  mee_nbin,
661  mee_min,
662  mee_max,
663  "m_{e^{+}e^{-}} (GeV/c^{2})");
664 
665  // duplicates
666  h2_ele_E2mnE1vsMee_all = bookH2(iBooker,
667  "E2mnE1vsMee_all",
668  "E2 - E1 vs ele pairs invariant mass, all electrons",
669  mee_nbin,
670  mee_min,
671  mee_max,
672  100,
673  -50.,
674  50.,
675  "m_{e^{+}e^{-}} (GeV/c^{2})",
676  "E2 - E1 (GeV)");
678  "E2mnE1vsMee_egeg_all",
679  "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
680  mee_nbin,
681  mee_min,
682  mee_max,
683  100,
684  -50.,
685  50.,
686  "m_{e^{+}e^{-}} (GeV/c^{2})",
687  "E2 - E1 (GeV)");
688 
689  // matched electrons
690 
691  htitle = "Efficiency vs matching " + matchingObjectType + " ";
693  bookH1withSumw2(iBooker, "matchingObjectEta_matched", htitle + "#eta", eta_nbin, eta_min, eta_max);
695  "matchingObjectEta_Extended_matched",
696  htitle + "#eta",
701  bookH1withSumw2(iBooker, "matchingObjectAbsEta_matched", htitle + "|#eta|", eta_nbin / 2, 0., eta_max);
703  iBooker, "matchingObjectAbsEta_Extended_matched", htitle + "|#eta|", eta_nbin_extended / 2, 0., eta_max_extended);
705  bookH1(iBooker, "matchingObjectPt_matched", htitle + "p_{T}", pteff_nbin, 5., pt_max);
707  bookH1withSumw2(iBooker, "matchingObjectPhi_matched", htitle + "phi", phi_nbin, phi_min, phi_max);
708  h1_ele_matchingObjectZ_matched = bookH1withSumw2(iBooker, "matchingObjectZ_matched", htitle + "z", xyz_nbin, -25, 25);
709 
710  h1_ele_charge = bookH1withSumw2(iBooker, "charge", "ele charge", 5, -2.5, 2.5, "charge");
711  h2_ele_chargeVsEta = bookH2(iBooker, "chargeVsEta", "ele charge vs eta", eta2D_nbin, eta_min, eta_max, 5, -2., 2.);
712  h2_ele_chargeVsPhi = bookH2(iBooker, "chargeVsPhi", "ele charge vs phi", phi2D_nbin, phi_min, phi_max, 5, -2., 2.);
713  h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt", "ele charge vs pt", pt_nbin, 0., 100., 5, -2., 2.);
714  h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP", "ele momentum", p_nbin, 0., p_max, "p_{vertex} (GeV/c)");
716  bookH1withSumw2(iBooker, "vertexPt", "ele transverse momentum", pt_nbin, 0., pt_max, "p_{T vertex} (GeV/c)");
718  iBooker, "vertexPtVsEta", "ele transverse momentum vs eta", eta2D_nbin, eta_min, eta_max, pt2D_nbin, 0., pt_max);
720  iBooker, "vertexPtVsPhi", "ele transverse momentum vs phi", phi2D_nbin, phi_min, phi_max, pt2D_nbin, 0., pt_max);
721  h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta", "ele momentum eta", eta_nbin, eta_min, eta_max, "#eta");
723  iBooker, "vertexEtaVsPhi", "ele momentum eta vs phi", eta2D_nbin, eta_min, eta_max, phi2D_nbin, phi_min, phi_max);
725  bookH1withSumw2(iBooker, "vertexPhi", "ele momentum #phi", phi_nbin, phi_min, phi_max, "#phi (rad)");
726  h1_ele_vertexX = bookH1withSumw2(iBooker, "vertexX", "ele vertex x", xyz_nbin, -0.6, 0.6, "x (cm)");
727  h1_ele_vertexY = bookH1withSumw2(iBooker, "vertexY", "ele vertex y", xyz_nbin, -0.6, 0.6, "y (cm)");
728  h1_ele_vertexZ = bookH1withSumw2(iBooker, "vertexZ", "ele vertex z", xyz_nbin, -25, 25, "z (cm)");
730  "vertexTIP",
731  "ele transverse impact parameter (wrt gen vtx)",
732  90,
733  0.,
734  0.15,
735  "TIP (cm)",
736  "Events",
737  "ELE_LOGY E1 P");
738  h2_ele_vertexTIPVsEta = bookH2(iBooker,
739  "vertexTIPVsEta",
740  "ele transverse impact parameter (wrt gen vtx) vs eta",
741  eta2D_nbin,
742  eta_min,
743  eta_max,
744  45,
745  0.,
746  0.15,
747  "#eta",
748  "TIP (cm)");
749  h2_ele_vertexTIPVsPhi = bookH2(iBooker,
750  "vertexTIPVsPhi",
751  "ele transverse impact parameter (wrt gen vtx) vs phi",
752  phi2D_nbin,
753  phi_min,
754  phi_max,
755  45,
756  0.,
757  0.15,
758  "#phi (rad)",
759  "TIP (cm)");
760  h2_ele_vertexTIPVsPt = bookH2(iBooker,
761  "vertexTIPVsPt",
762  "ele transverse impact parameter (wrt gen vtx) vs transverse momentum",
763  pt2D_nbin,
764  0.,
765  pt_max,
766  45,
767  0.,
768  0.15,
769  "p_{T} (GeV/c)",
770  "TIP (cm)");
771 
772  htitle = "Electron / Matching " + matchingObjectType + ", momemtum";
773  xtitle = "P / P_{" + matchingObjectType + "}";
775  bookH1withSumw2(iBooker, "PoPmatchingObject", htitle, popmatching_nbin, popmatching_min, popmatching_max, xtitle);
777  "PoPmatchingObjectVsEta",
778  htitle + ",vs eta",
779  eta2D_nbin,
780  eta_min,
781  eta_max,
782  50,
786  "PoPmatchingObjectVsPhi",
787  htitle + ",vs phi",
788  phi2D_nbin,
789  phi_min,
790  phi_max,
791  50,
795  iBooker, "PoPmatchingObjectVsPt", htitle + ",vs eta", pt2D_nbin, 0., pt_max, 50, popmatching_min, popmatching_max);
797  "PoPmatchingObject_barrel",
798  htitle + ", barrel",
802  xtitle);
804  "PoPmatchingObject_endcaps",
805  htitle + ", endcaps",
809  xtitle);
810  htitle = "Ele - " + matchingObjectType + ", ";
811  xtitle = "#eta - #eta_{" + matchingObjectType + "}";
813  bookH1withSumw2(iBooker, "EtamatchingObjectEtaTrue", htitle + "eta", deta_nbin, deta_min, deta_max, xtitle);
815  "EtaMnEtamatchingObjectVsEta",
816  htitle + "eta, vs eta",
817  eta2D_nbin,
818  eta_min,
819  eta_max,
820  deta_nbin / 2,
821  deta_min,
822  deta_max);
824  "EtaMnEtamatchingObjectVsPhi",
825  htitle + "eta, vs phi",
826  phi2D_nbin,
827  phi_min,
828  phi_max,
829  deta_nbin / 2,
830  deta_min,
831  deta_max);
833  "EtaMnEtamatchingObjectVsPt",
834  htitle + "eta,, vs pt",
835  pt_nbin,
836  0.,
837  pt_max,
838  deta_nbin / 2,
839  deta_min,
840  deta_max);
841  xtitle = "#phi - #phi_{" + matchingObjectType + "} (rad)";
843  bookH1withSumw2(iBooker, "PhiMnPhimatchingObject", htitle + "phi", dphi_nbin, dphi_min, dphi_max, xtitle);
845  bookH1(iBooker, "PhiMnPhimatchingObject2", htitle + "phi", dphimatch2D_nbin, dphimatch_min, dphimatch_max);
847  "PhiMnPhimatchingObjectVsEta",
848  htitle + "phi, vs eta",
849  eta2D_nbin,
850  eta_min,
851  eta_max,
852  dphi_nbin / 2,
853  dphi_min,
854  dphi_max);
856  "PhiMnPhimatchingObjectVsPhi",
857  htitle + "phi, vs phi",
858  phi2D_nbin,
859  phi_min,
860  phi_max,
861  dphi_nbin / 2,
862  dphi_min,
863  dphi_max);
865  "PhiMnPhimatchingObjectVsPt",
866  htitle + "phi, vs pt",
867  pt2D_nbin,
868  0.,
869  pt_max,
870  dphi_nbin / 2,
871  dphi_min,
872  dphi_max);
873 
874  // matched electron, superclusters
875 
876  setBookPrefix("h_scl");
877 
878  h1_scl_En_ = bookH1withSumw2(iBooker, "energy", "ele supercluster energy", p_nbin, 0., p_max);
879  htitle = "Ele supercluster / " + matchingObjectType + ", energy";
880  xtitle = "E/E_{" + matchingObjectType + "}";
882  bookH1withSumw2(iBooker, "EoEmatchingObject_barrel", htitle + ", barrel", 50, 0.2, 1.2, xtitle);
884  bookH1withSumw2(iBooker, "EoEmatchingObject_endcaps", htitle + ", endcaps", 50, 0.2, 1.2, xtitle);
885  h1_scl_Et_ = bookH1withSumw2(iBooker, "et", "ele supercluster transverse energy", pt_nbin, 0., pt_max);
886  h2_scl_EtVsEta_ = bookH2(iBooker,
887  "etVsEta",
888  "ele supercluster transverse energy vs eta",
889  eta2D_nbin,
890  eta_min,
891  eta_max,
892  pt_nbin,
893  0.,
894  pt_max);
895  h2_scl_EtVsPhi_ = bookH2(iBooker,
896  "etVsPhi",
897  "ele supercluster transverse energy vs phi",
898  phi2D_nbin,
899  phi_min,
900  phi_max,
901  pt_nbin,
902  0.,
903  pt_max);
905  iBooker, "etaVsPhi", "ele supercluster eta vs phi", phi2D_nbin, phi_min, phi_max, eta2D_nbin, eta_min, eta_max);
906  h1_scl_Eta_ = bookH1withSumw2(iBooker, "eta", "ele supercluster eta", eta_nbin, eta_min, eta_max);
907  h1_scl_Phi_ = bookH1withSumw2(iBooker, "phi", "ele supercluster phi", phi_nbin, phi_min, phi_max);
909  "sigietaieta",
910  "ele supercluster sigma ieta ieta",
911  100,
912  0.,
913  0.05,
914  "#sigma_{i#eta i#eta}",
915  "Events",
916  "ELE_LOGY E1 P");
918  "sigietaieta_barrel",
919  "ele supercluster sigma ieta ieta, barrel",
920  100,
921  0.,
922  0.05,
923  "#sigma_{i#eta i#eta}",
924  "Events",
925  "ELE_LOGY E1 P");
927  "sigietaieta_endcaps",
928  "ele supercluster sigma ieta ieta, endcaps",
929  100,
930  0.,
931  0.05,
932  "#sigma_{i#eta i#eta}",
933  "Events",
934  "ELE_LOGY E1 P");
936  "full5x5_sigietaieta",
937  "ele supercluster full5x5 sigma ieta ieta",
938  100,
939  0.,
940  0.05,
941  "#sigma_{i#eta i#eta}",
942  "Events",
943  "ELE_LOGY E1 P");
945  "full5x5_sigietaieta_Extended",
946  "ele supercluster full5x5 sigma ieta ieta, 2.5<|eta|<3",
947  100,
948  0.,
949  0.05,
950  "#sigma_{i#eta i#eta}",
951  "Events",
952  "ELE_LOGY E1 P");
954  "full5x5_sigietaieta_barrel",
955  "ele supercluster full5x5 sigma ieta ieta, barrel",
956  100,
957  0.,
958  0.05,
959  "#sigma_{i#eta i#eta}",
960  "Events",
961  "ELE_LOGY E1 P");
963  "full5x5_sigietaieta_endcaps",
964  "ele supercluster full5x5 sigma ieta ieta, endcaps",
965  100,
966  0.,
967  0.05,
968  "#sigma_{i#eta i#eta}",
969  "Events",
970  "ELE_LOGY E1 P");
972  iBooker, "E1x5", "ele supercluster energy in 1x5", p_nbin, 0., p_max, "E1x5 (GeV)", "Events", "ELE_LOGY E1 P");
974  "E1x5_barrel",
975  "ele supercluster energy in 1x5 barrel",
976  p_nbin,
977  0.,
978  p_max,
979  "E1x5 (GeV)",
980  "Events",
981  "ELE_LOGY E1 P");
983  "E1x5_endcaps",
984  "ele supercluster energy in 1x5 endcaps",
985  p_nbin,
986  0.,
987  p_max,
988  "E1x5 (GeV)",
989  "Events",
990  "ELE_LOGY E1 P");
992  "E2x5max",
993  "ele supercluster energy in 2x5 max",
994  p_nbin,
995  0.,
996  p_max,
997  "E2x5 (GeV)",
998  "Events",
999  "ELE_LOGY E1 P");
1001  "E2x5max_barrel",
1002  "ele supercluster energy in 2x5 _max barrel",
1003  p_nbin,
1004  0.,
1005  p_max,
1006  "E2x5 (GeV)",
1007  "Events",
1008  "ELE_LOGY E1 P");
1010  "E2x5max_endcaps",
1011  "ele supercluster energy in 2x5 _max endcaps",
1012  p_nbin,
1013  0.,
1014  p_max,
1015  "E2x5 (GeV)",
1016  "Events",
1017  "ELE_LOGY E1 P");
1019  iBooker, "E5x5", "ele supercluster energy in 5x5", p_nbin, 0., p_max, "E5x5 (GeV)", "Events", "ELE_LOGY E1 P");
1021  "E5x5_barrel",
1022  "ele supercluster energy in 5x5 barrel",
1023  p_nbin,
1024  0.,
1025  p_max,
1026  "E5x5 (GeV)",
1027  "Events",
1028  "ELE_LOGY E1 P");
1030  "E5x5_endcaps",
1031  "ele supercluster energy in 5x5 endcaps",
1032  p_nbin,
1033  0.,
1034  p_max,
1035  "E5x5 (GeV)",
1036  "Events",
1037  "ELE_LOGY E1 P");
1038 
1039  // matched electron, gsf tracks
1040 
1041  setBookPrefix("h_ele");
1042 
1044  "ambiguousTracks",
1045  "ele # ambiguous tracks",
1046  5,
1047  0.,
1048  5.,
1049  "N_{ambiguous tracks}",
1050  "Events",
1051  "ELE_LOGY E1 P");
1053  iBooker, "ambiguousTracksVsEta", "ele # ambiguous tracks vs eta", eta2D_nbin, eta_min, eta_max, 5, 0., 5.);
1055  iBooker, "ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", phi2D_nbin, phi_min, phi_max, 5, 0., 5.);
1057  bookH2(iBooker, "ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", pt2D_nbin, 0., pt_max, 5, 0., 5.);
1059  bookH1withSumw2(iBooker, "foundHits", "ele track # found hits", fhits_nbin, 0., fhits_max, "N_{hits}");
1061  "foundHitsVsEta_Extended",
1062  "ele track # found hits vs eta",
1066  fhits_nbin,
1067  0.,
1068  fhits_max);
1069  h2_ele_foundHitsVsPhi = bookH2(iBooker,
1070  "foundHitsVsPhi",
1071  "ele track # found hits vs phi",
1072  phi2D_nbin,
1073  phi_min,
1074  phi_max,
1075  fhits_nbin,
1076  0.,
1077  fhits_max);
1079  iBooker, "foundHitsVsPt", "ele track # found hits vs pt", pt2D_nbin, 0., pt_max, fhits_nbin, 0., fhits_max);
1080  h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits", "ele track # lost hits", 5, 0., 5., "N_{lost hits}");
1082  iBooker, "lostHitsVsEta", "ele track # lost hits vs eta", eta2D_nbin, eta_min, eta_max, lhits_nbin, 0., lhits_max);
1084  iBooker, "lostHitsVsPhi", "ele track # lost hits vs eta", phi2D_nbin, phi_min, phi_max, lhits_nbin, 0., lhits_max);
1086  bookH2(iBooker, "lostHitsVsPt", "ele track # lost hits vs eta", pt2D_nbin, 0., pt_max, lhits_nbin, 0., lhits_max);
1087  h1_ele_chi2 =
1088  bookH1withSumw2(iBooker, "chi2", "ele track #chi^{2}", 100, 0., 15., "#Chi^{2}", "Events", "ELE_LOGY E1 P");
1090  bookH2(iBooker, "chi2VsEta", "ele track #chi^{2} vs eta", eta2D_nbin, eta_min, eta_max, 50, 0., 15.);
1092  bookH2(iBooker, "chi2VsPhi", "ele track #chi^{2} vs phi", phi2D_nbin, phi_min, phi_max, 50, 0., 15.);
1093  h2_ele_chi2VsPt = bookH2(iBooker, "chi2VsPt", "ele track #chi^{2} vs pt", pt2D_nbin, 0., pt_max, 50, 0., 15.);
1095  "PinMnPout",
1096  "ele track inner p - outer p, mean of GSF components",
1097  p_nbin,
1098  0.,
1099  200.,
1100  "P_{vertex} - P_{out} (GeV/c)");
1102  "PinMnPout_mode",
1103  "ele track inner p - outer p, mode of GSF components",
1104  p_nbin,
1105  0.,
1106  100.,
1107  "P_{vertex} - P_{out}, mode of GSF components (GeV/c)");
1109  "PinMnPoutVsEta_mode",
1110  "ele track inner p - outer p vs eta, mode of GSF components",
1111  eta2D_nbin,
1112  eta_min,
1113  eta_max,
1114  p2D_nbin,
1115  0.,
1116  100.);
1118  "PinMnPoutVsPhi_mode",
1119  "ele track inner p - outer p vs phi, mode of GSF components",
1120  phi2D_nbin,
1121  phi_min,
1122  phi_max,
1123  p2D_nbin,
1124  0.,
1125  100.);
1127  "PinMnPoutVsPt_mode",
1128  "ele track inner p - outer p vs pt, mode of GSF components",
1129  pt2D_nbin,
1130  0.,
1131  pt_max,
1132  p2D_nbin,
1133  0.,
1134  100.);
1135  h2_ele_PinMnPoutVsE_mode = bookH2(iBooker,
1136  "PinMnPoutVsE_mode",
1137  "ele track inner p - outer p vs E, mode of GSF components",
1138  p2D_nbin,
1139  0.,
1140  200.,
1141  p2D_nbin,
1142  0.,
1143  100.);
1145  "PinMnPoutVsChi2_mode",
1146  "ele track inner p - outer p vs track chi2, mode of GSF components",
1147  50,
1148  0.,
1149  20.,
1150  p2D_nbin,
1151  0.,
1152  100.);
1154  iBooker, "outerP", "ele track outer p, mean of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1156  iBooker, "outerP_mode", "ele track outer p, mode of GSF components", p_nbin, 0., p_max, "P_{out} (GeV/c)");
1158  bookH2(iBooker, "outerPVsEta_mode", "ele track outer p vs eta mode", eta2D_nbin, eta_min, eta_max, 50, 0., p_max);
1160  iBooker, "outerPt", "ele track outer p_{T}, mean of GSF components", pt_nbin, 0., pt_max, "P_{T out} (GeV/c)");
1162  "outerPt_mode",
1163  "ele track outer p_{T}, mode of GSF components",
1164  pt_nbin,
1165  0.,
1166  pt_max,
1167  "P_{T out} (GeV/c)");
1168  h2_ele_outerPtVsEta_mode = bookH2(iBooker,
1169  "outerPtVsEta_mode",
1170  "ele track outer p_{T} vs eta, mode of GSF components",
1171  eta2D_nbin,
1172  eta_min,
1173  eta_max,
1174  pt2D_nbin,
1175  0.,
1176  pt_max);
1177  h2_ele_outerPtVsPhi_mode = bookH2(iBooker,
1178  "outerPtVsPhi_mode",
1179  "ele track outer p_{T} vs phi, mode of GSF components",
1180  phi2D_nbin,
1181  phi_min,
1182  phi_max,
1183  pt2D_nbin,
1184  0.,
1185  pt_max);
1186  h2_ele_outerPtVsPt_mode = bookH2(iBooker,
1187  "outerPtVsPt_mode",
1188  "ele track outer p_{T} vs pt, mode of GSF components",
1189  pt2D_nbin,
1190  0.,
1191  100.,
1192  pt2D_nbin,
1193  0.,
1194  pt_max);
1195 
1196  // matched electrons, matching
1198  iBooker, "EoP", "ele E/P_{vertex}", eop_nbin, 0., eop_max, "E/P_{vertex}", "Events", "ELE_LOGY E1 P");
1200  "EoP_barrel",
1201  "ele E/P_{vertex} barrel",
1202  eop_nbin,
1203  0.,
1204  eop_max,
1205  "E/P_{vertex}",
1206  "Events",
1207  "ELE_LOGY E1 P");
1209  "EoP_endcaps",
1210  "ele E/P_{vertex} endcaps",
1211  eop_nbin,
1212  0.,
1213  eop_max,
1214  "E/P_{vertex}",
1215  "Events",
1216  "ELE_LOGY E1 P");
1217  h2_ele_EoPVsEta_Extended = bookH2(iBooker,
1218  "EoPVsEta_Extended",
1219  "ele E/P_{vertex} vs eta",
1223  eop2D_nbin,
1224  0.,
1225  eopmaxsht);
1226  h2_ele_EoPVsPhi =
1227  bookH2(iBooker, "EoPVsPhi", "ele E/P_{vertex} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1228  h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE", "ele E/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1229  h1_ele_EseedOP = bookH1withSumw2(iBooker,
1230  "EseedOP",
1231  "ele E_{seed}/P_{vertex}",
1232  eop_nbin,
1233  0.,
1234  eop_max,
1235  "E_{seed}/P_{vertex}",
1236  "Events",
1237  "ELE_LOGY E1 P");
1239  "EseedOP_barrel",
1240  "ele E_{seed}/P_{vertex} barrel",
1241  eop_nbin,
1242  0.,
1243  eop_max,
1244  "E_{seed}/P_{vertex}",
1245  "Events",
1246  "ELE_LOGY E1 P");
1248  "EseedOP_endcaps",
1249  "ele E_{seed}/P_{vertex} endcaps",
1250  eop_nbin,
1251  0.,
1252  eop_max,
1253  "E_{seed}/P_{vertex}",
1254  "Events",
1255  "ELE_LOGY E1 P");
1256  h2_ele_EseedOPVsEta = bookH2(iBooker,
1257  "EseedOPVsEta",
1258  "ele E_{seed}/P_{vertex} vs eta",
1259  eta2D_nbin,
1260  eta_min,
1261  eta_max,
1262  eop2D_nbin,
1263  0.,
1264  eopmaxsht);
1265  h2_ele_EseedOPVsPhi = bookH2(iBooker,
1266  "EseedOPVsPhi",
1267  "ele E_{seed}/P_{vertex} vs phi",
1268  phi2D_nbin,
1269  phi_min,
1270  phi_max,
1271  eop2D_nbin,
1272  0.,
1273  eopmaxsht);
1274  h2_ele_EseedOPVsE = bookH2(iBooker, "EseedOPVsE", "ele E_{seed}/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.);
1276  iBooker, "EoPout", "ele E_{seed}/P_{out}", eop_nbin, 0., eop_max, "E_{seed}/P_{out}", "Events", "ELE_LOGY E1 P");
1278  "EoPout_barrel",
1279  "ele E_{seed}/P_{out} barrel",
1280  eop_nbin,
1281  0.,
1282  eop_max,
1283  "E_{seed}/P_{out}",
1284  "Events",
1285  "ELE_LOGY E1 P");
1287  "EoPout_endcaps",
1288  "ele E_{seed}/P_{out} endcaps",
1289  eop_nbin,
1290  0.,
1291  eop_max,
1292  "E_{seed}/P_{out}",
1293  "Events",
1294  "ELE_LOGY E1 P");
1296  iBooker, "EoPoutVsEta", "ele E_{seed}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1298  iBooker, "EoPoutVsPhi", "ele E_{seed}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1300  bookH2(iBooker, "EoPoutVsE", "ele E_{seed}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1302  iBooker, "EeleOPout", "ele E_{ele}/P_{out}", eop_nbin, 0., eop_max, "E_{ele}/P_{out}", "Events", "ELE_LOGY E1 P");
1304  "EeleOPout_barrel",
1305  "ele E_{ele}/P_{out} barrel",
1306  eop_nbin,
1307  0.,
1308  eop_max,
1309  "E_{ele}/P_{out}",
1310  "Events",
1311  "ELE_LOGY E1 P");
1313  "EeleOPout_endcaps",
1314  "ele E_{ele}/P_{out} endcaps",
1315  eop_nbin,
1316  0.,
1317  eop_max,
1318  "E_{ele}/P_{out}",
1319  "Events",
1320  "ELE_LOGY E1 P");
1322  iBooker, "EeleOPoutVsEta", "ele E_{ele}/P_{out} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht);
1324  iBooker, "EeleOPoutVsPhi", "ele E_{ele}/P_{out} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht);
1326  bookH2(iBooker, "EeleOPoutVsE", "ele E_{ele}/P_{out} vs E", p2D_nbin, 0., p_max, eop2D_nbin, 0., eopmaxsht);
1328  "dEtaSc_propVtx",
1329  "ele #eta_{sc} - #eta_{tr}, prop from vertex",
1331  detamatch_min,
1332  detamatch_max,
1333  "#eta_{sc} - #eta_{tr}",
1334  "Events",
1335  "ELE_LOGY E1 P");
1337  "dEtaSc_propVtx_Extended",
1338  "ele #eta_{sc} - #eta_{tr}, prop from vertex, 2.5<|eta|<3",
1340  detamatch_min,
1341  detamatch_max,
1342  "#eta_{sc} - #eta_{tr}",
1343  "Events",
1344  "ELE_LOGY E1 P");
1346  "dEtaSc_propVtx_barrel",
1347  "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
1349  detamatch_min,
1350  detamatch_max,
1351  "#eta_{sc} - #eta_{tr}",
1352  "Events",
1353  "ELE_LOGY E1 P");
1355  "dEtaSc_propVtx_endcaps",
1356  "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
1358  detamatch_min,
1359  detamatch_max,
1360  "#eta_{sc} - #eta_{tr}",
1361  "Events",
1362  "ELE_LOGY E1 P");
1364  "dEtaScVsEta_propVtx",
1365  "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
1366  eta2D_nbin,
1367  eta_min,
1368  eta_max,
1370  detamatch_min,
1371  detamatch_max);
1373  "dEtaScVsPhi_propVtx",
1374  "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
1375  phi2D_nbin,
1376  phi_min,
1377  phi_max,
1379  detamatch_min,
1380  detamatch_max);
1382  "dEtaScVsPt_propVtx",
1383  "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
1384  pt2D_nbin,
1385  0.,
1386  pt_max,
1388  detamatch_min,
1389  detamatch_max);
1391  "dPhiSc_propVtx",
1392  "ele #phi_{sc} - #phi_{tr}, prop from vertex",
1394  dphimatch_min,
1395  dphimatch_max,
1396  "#phi_{sc} - #phi_{tr} (rad)",
1397  "Events",
1398  "ELE_LOGY E1 P");
1400  "dPhiSc_propVtx_Extended",
1401  "ele #phi_{sc} - #phi_{tr}, prop from vertex, 2.5<|eta|<3",
1403  dphimatch_min,
1404  dphimatch_max,
1405  "#phi_{sc} - #phi_{tr} (rad)",
1406  "Events",
1407  "ELE_LOGY E1 P");
1409  "dPhiSc_propVtx_barrel",
1410  "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
1412  dphimatch_min,
1413  dphimatch_max,
1414  "#phi_{sc} - #phi_{tr} (rad)",
1415  "Events",
1416  "ELE_LOGY E1 P");
1418  "dPhiSc_propVtx_endcaps",
1419  "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
1421  dphimatch_min,
1422  dphimatch_max,
1423  "#phi_{sc} - #phi_{tr} (rad)",
1424  "Events",
1425  "ELE_LOGY E1 P");
1427  "dPhiScVsEta_propVtx",
1428  "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
1429  eta2D_nbin,
1430  eta_min,
1431  eta_max,
1433  dphimatch_min,
1434  dphimatch_max);
1436  "dPhiScVsPhi_propVtx",
1437  "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
1438  phi2D_nbin,
1439  phi_min,
1440  phi_max,
1442  dphimatch_min,
1443  dphimatch_max);
1445  "dPhiScVsPt_propVtx",
1446  "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
1447  pt2D_nbin,
1448  0.,
1449  pt_max,
1451  dphimatch_min,
1452  dphimatch_max);
1454  "dEtaCl_propOut",
1455  "ele #eta_{cl} - #eta_{tr}, prop from outermost",
1457  detamatch_min,
1458  detamatch_max,
1459  "#eta_{seedcl} - #eta_{tr}",
1460  "Events",
1461  "ELE_LOGY E1 P");
1463  "dEtaCl_propOut_barrel",
1464  "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
1466  detamatch_min,
1467  detamatch_max,
1468  "#eta_{seedcl} - #eta_{tr}",
1469  "Events",
1470  "ELE_LOGY E1 P");
1472  "dEtaCl_propOut_endcaps",
1473  "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
1475  detamatch_min,
1476  detamatch_max,
1477  "#eta_{seedcl} - #eta_{tr}",
1478  "Events",
1479  "ELE_LOGY E1 P");
1481  "dEtaClVsEta_propOut",
1482  "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
1483  eta2D_nbin,
1484  eta_min,
1485  eta_max,
1487  detamatch_min,
1488  detamatch_max);
1490  "dEtaClVsPhi_propOut",
1491  "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
1492  phi2D_nbin,
1493  phi_min,
1494  phi_max,
1496  detamatch_min,
1497  detamatch_max);
1499  "dEtaScVsPt_propOut",
1500  "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
1501  pt2D_nbin,
1502  0.,
1503  pt_max,
1505  detamatch_min,
1506  detamatch_max);
1508  "dPhiCl_propOut",
1509  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
1511  dphimatch_min,
1512  dphimatch_max,
1513  "#phi_{seedcl} - #phi_{tr} (rad)",
1514  "Events",
1515  "ELE_LOGY E1 P");
1517  "dPhiCl_propOut_barrel",
1518  "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
1520  dphimatch_min,
1521  dphimatch_max,
1522  "#phi_{seedcl} - #phi_{tr} (rad)",
1523  "Events",
1524  "ELE_LOGY E1 P");
1526  "dPhiCl_propOut_endcaps",
1527  "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
1529  dphimatch_min,
1530  dphimatch_max,
1531  "#phi_{seedcl} - #phi_{tr} (rad)",
1532  "Events",
1533  "ELE_LOGY E1 P");
1535  "dPhiClVsEta_propOut",
1536  "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
1537  eta2D_nbin,
1538  eta_min,
1539  eta_max,
1541  dphimatch_min,
1542  dphimatch_max);
1544  "dPhiClVsPhi_propOut",
1545  "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
1546  phi2D_nbin,
1547  phi_min,
1548  phi_max,
1550  dphimatch_min,
1551  dphimatch_max);
1553  "dPhiSClsPt_propOut",
1554  "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
1555  pt2D_nbin,
1556  0.,
1557  pt_max,
1559  dphimatch_min,
1560  dphimatch_max);
1562  "dEtaEleCl_propOut",
1563  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
1565  detamatch_min,
1566  detamatch_max,
1567  "#eta_{elecl} - #eta_{tr}",
1568  "Events",
1569  "ELE_LOGY E1 P");
1571  "dEtaEleCl_propOut_barrel",
1572  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
1574  detamatch_min,
1575  detamatch_max,
1576  "#eta_{elecl} - #eta_{tr}",
1577  "Events",
1578  "ELE_LOGY E1 P");
1580  "dEtaEleCl_propOut_endcaps",
1581  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
1583  detamatch_min,
1584  detamatch_max,
1585  "#eta_{elecl} - #eta_{tr}",
1586  "Events",
1587  "ELE_LOGY E1 P");
1589  "dEtaEleClVsEta_propOut",
1590  "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
1591  eta2D_nbin,
1592  eta_min,
1593  eta_max,
1595  detamatch_min,
1596  detamatch_max);
1598  "dEtaEleClVsPhi_propOut",
1599  "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
1600  phi2D_nbin,
1601  phi_min,
1602  phi_max,
1604  detamatch_min,
1605  detamatch_max);
1607  "dEtaScVsPt_propOut",
1608  "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
1609  pt2D_nbin,
1610  0.,
1611  pt_max,
1613  detamatch_min,
1614  detamatch_max);
1616  "dPhiEleCl_propOut",
1617  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
1619  dphimatch_min,
1620  dphimatch_max,
1621  "#phi_{elecl} - #phi_{tr} (rad)",
1622  "Events",
1623  "ELE_LOGY E1 P");
1625  "dPhiEleCl_propOut_barrel",
1626  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
1628  dphimatch_min,
1629  dphimatch_max,
1630  "#phi_{elecl} - #phi_{tr} (rad)",
1631  "Events",
1632  "ELE_LOGY E1 P");
1634  "dPhiEleCl_propOut_endcaps",
1635  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
1637  dphimatch_min,
1638  dphimatch_max,
1639  "#phi_{elecl} - #phi_{tr} (rad)",
1640  "Events",
1641  "ELE_LOGY E1 P");
1643  "dPhiEleClVsEta_propOut",
1644  "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
1645  eta2D_nbin,
1646  eta_min,
1647  eta_max,
1649  dphimatch_min,
1650  dphimatch_max);
1652  "dPhiEleClVsPhi_propOut",
1653  "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
1654  phi2D_nbin,
1655  phi_min,
1656  phi_max,
1658  dphimatch_min,
1659  dphimatch_max);
1661  "dPhiSEleClsPt_propOut",
1662  "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
1663  pt2D_nbin,
1664  0.,
1665  pt_max,
1667  dphimatch_min,
1668  dphimatch_max);
1670  iBooker, "HoE", "ele hadronic energy / em energy", hoe_nbin, hoe_min, hoe_max, "H/E", "Events", "ELE_LOGY E1 P");
1672  "HoE_Extended",
1673  "ele hadronic energy / em energy, 2.5<|eta|<3",
1674  hoe_nbin,
1675  hoe_min,
1676  hoe_max,
1677  "H/E",
1678  "Events",
1679  "ELE_LOGY E1 P");
1681  "HoE_barrel",
1682  "ele hadronic energy / em energy, barrel",
1683  hoe_nbin,
1684  hoe_min,
1685  hoe_max,
1686  "H/E",
1687  "Events",
1688  "ELE_LOGY E1 P");
1690  "HoE_endcaps",
1691  "ele hadronic energy / em energy, endcaps",
1692  hoe_nbin,
1693  hoe_min,
1694  hoe_max,
1695  "H/E",
1696  "Events",
1697  "ELE_LOGY E1 P");
1698  h1_ele_HoE_bc = bookH1withSumw2(iBooker,
1699  "HoE_bc",
1700  "ele hadronic energy / em energy behind cluster",
1701  hoe_nbin,
1702  hoe_min,
1703  hoe_max,
1704  "H/E",
1705  "Events",
1706  "ELE_LOGY E1 P");
1708  "HoE_bc_barrel",
1709  "ele hadronic energy / em energy, behind cluster barrel",
1710  hoe_nbin,
1711  hoe_min,
1712  hoe_max,
1713  "H/E",
1714  "Events",
1715  "ELE_LOGY E1 P");
1717  "HoE_bc_endcaps",
1718  "ele hadronic energy / em energy, behind cluster, endcaps",
1719  hoe_nbin,
1720  hoe_min,
1721  hoe_max,
1722  "H/E",
1723  "Events",
1724  "ELE_LOGY E1 P");
1726  "hcalDepth1OverEcalBc",
1727  "hcalDepth1OverEcalBc",
1728  hoe_nbin,
1729  hoe_min,
1730  hoe_max,
1731  "H/E",
1732  "Events",
1733  "ELE_LOGY E1 P");
1735  "hcalDepth1OverEcalBc_barrel",
1736  "hcalDepth1OverEcalBc_barrel",
1737  hoe_nbin,
1738  hoe_min,
1739  hoe_max,
1740  "H/E",
1741  "Events",
1742  "ELE_LOGY E1 P");
1744  "hcalDepth1OverEcalBc_endcaps",
1745  "hcalDepth1OverEcalBc_endcaps",
1746  hoe_nbin,
1747  hoe_min,
1748  hoe_max,
1749  "H/E",
1750  "Events",
1751  "ELE_LOGY E1 P");
1753  "hcalDepth2OverEcalBc",
1754  "hcalDepth2OverEcalBc",
1755  hoe_nbin,
1756  hoe_min,
1757  hoe_max,
1758  "H/E",
1759  "Events",
1760  "ELE_LOGY E1 P");
1762  "hcalDepth2OverEcalBc_barrel",
1763  "hcalDepth2OverEcalBc_barrel",
1764  hoe_nbin,
1765  hoe_min,
1766  hoe_max,
1767  "H/E",
1768  "Events",
1769  "ELE_LOGY E1 P");
1771  "hcalDepth2OverEcalBc_endcaps",
1772  "hcalDepth2OverEcalBc_endcaps",
1773  hoe_nbin,
1774  hoe_min,
1775  hoe_max,
1776  "H/E",
1777  "Events",
1778  "ELE_LOGY E1 P");
1780  "HoE_fiducial",
1781  "ele hadronic energy / em energy, fiducial region",
1782  hoe_nbin,
1783  hoe_min,
1784  hoe_max,
1785  "H/E",
1786  "Events",
1787  "ELE_LOGY E1 P");
1788  h2_ele_HoEVsEta = bookH2(iBooker,
1789  "HoEVsEta",
1790  "ele hadronic energy / em energy vs eta",
1791  eta_nbin,
1792  eta_min,
1793  eta_max,
1794  hoe_nbin,
1795  hoe_min,
1796  hoe_max);
1797  h2_ele_HoEVsPhi = bookH2(iBooker,
1798  "HoEVsPhi",
1799  "ele hadronic energy / em energy vs phi",
1800  phi2D_nbin,
1801  phi_min,
1802  phi_max,
1803  hoe_nbin,
1804  hoe_min,
1805  hoe_max);
1806  h2_ele_HoEVsE =
1807  bookH2(iBooker, "HoEVsE", "ele hadronic energy / em energy vs E", p_nbin, 0., 300., hoe_nbin, hoe_min, hoe_max);
1808  setBookPrefix("h_scl");
1810  "ESFrac_endcaps",
1811  "Preshower over SC raw energy , endcaps",
1812  100,
1813  0.,
1814  0.8,
1815  "E_{PS} / E^{raw}_{SC}",
1816  "Events",
1817  "ELE_LOGY E1 P");
1818 
1819  // seeds
1820  setBookPrefix("h_ele");
1822  bookH1withSumw2(iBooker, "seedSubdet2", "ele seed subdet 2nd layer", 11, -0.5, 10.5, "2nd hit subdet Id");
1823  h1_ele_seed_mask_ = bookH1withSumw2(iBooker, "seedMask", "ele seed hits mask", 13, -0.5, 12.5);
1825  bookH1withSumw2(iBooker, "seedMask_Bpix", "ele seed hits mask when subdet2 is bpix", 13, -0.5, 12.5);
1827  bookH1withSumw2(iBooker, "seedMask_Fpix", "ele seed hits mask when subdet2 is bpix", 13, -0.5, 12.5);
1829  bookH1withSumw2(iBooker, "seedMask_Tec", "ele seed hits mask when subdet2 is bpix", 13, -0.5, 12.5);
1831  iBooker, "seedDphi2", "ele seed dphi 2nd layer", 50, -0.003, +0.003, "#phi_{hit}-#phi_{pred} (rad)");
1833  iBooker, "seedDphi2_VsEta", "ele seed dphi 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.003, +0.003);
1835  bookH2(iBooker, "seedDphi2_VsPt", "ele seed dphi 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
1837  iBooker, "seedDphi2Pos", "ele seed dphi 2nd layer positron", 50, -0.003, +0.003, "#phi_{hit}-#phi_{pred} (rad)");
1839  "seedDphi2Pos_VsEta",
1840  "ele seed dphi 2nd layer positron vs eta",
1841  eta2D_nbin,
1842  eta_min,
1843  eta_max,
1844  50,
1845  -0.003,
1846  +0.003);
1848  iBooker, "seedDphi2Pos_VsPt", "ele seed dphi 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.003, +0.003);
1850  iBooker, "seedDrz2", "ele seed dr (dz) 2nd layer", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
1852  iBooker, "seedDrz2_VsEta", "ele seed dr/dz 2nd layer vs eta", eta2D_nbin, eta_min, eta_max, 50, -0.03, +0.03);
1854  bookH2(iBooker, "seedDrz2_VsPt", "ele seed dr/dz 2nd layer vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
1856  iBooker, "seedDrz2Pos", "ele seed dr (dz) 2nd layer positron", 50, -0.03, +0.03, "r(z)_{hit}-r(z)_{pred} (cm)");
1858  "seedDrz2Pos_VsEta",
1859  "ele seed dr/dz 2nd layer positron vs eta",
1860  eta2D_nbin,
1861  eta_min,
1862  eta_max,
1863  50,
1864  -0.03,
1865  +0.03);
1867  iBooker, "seedDrz2Pos_VsPt", "ele seed dr/dz 2nd layer positron vs pt", pt2D_nbin, 0., pt_max, 50, -0.03, +0.03);
1868 
1869  // classes
1870  h1_ele_classes = bookH1withSumw2(iBooker, "classes", "ele classes", 20, 0.0, 20., "class Id");
1871  h1_ele_eta = bookH1withSumw2(iBooker, "eta", "ele electron eta", eta_nbin / 2, 0.0, eta_max);
1872  h1_ele_eta_golden = bookH1withSumw2(iBooker, "eta_golden", "ele electron eta golden", eta_nbin / 2, 0.0, eta_max);
1873  h1_ele_eta_bbrem = bookH1withSumw2(iBooker, "eta_bbrem", "ele electron eta bbrem", eta_nbin / 2, 0.0, eta_max);
1874  h1_ele_eta_shower = bookH1withSumw2(iBooker, "eta_shower", "ele electron eta showering", eta_nbin / 2, 0.0, eta_max);
1876  "PinVsPoutGolden_mode",
1877  "ele track inner p vs outer p vs eta, golden, mode of GSF components",
1878  p2D_nbin,
1879  0.,
1880  p_max,
1881  50,
1882  0.,
1883  p_max);
1885  "PinVsPoutShowering_mode",
1886  "ele track inner p vs outer p vs eta, showering, mode of GSF components",
1887  p2D_nbin,
1888  0.,
1889  p_max,
1890  50,
1891  0.,
1892  p_max);
1894  "PinVsPoutGolden_mean",
1895  "ele track inner p vs outer p vs eta, golden, mean of GSF components",
1896  p2D_nbin,
1897  0.,
1898  p_max,
1899  50,
1900  0.,
1901  p_max);
1903  "PinVsPoutShowering_mean",
1904  "ele track inner p vs outer p vs eta, showering, mean of GSF components",
1905  p2D_nbin,
1906  0.,
1907  p_max,
1908  50,
1909  0.,
1910  p_max);
1912  "PtinVsPtoutGolden_mode",
1913  "ele track inner pt vs outer pt vs eta, golden, mode of GSF components",
1914  pt2D_nbin,
1915  0.,
1916  pt_max,
1917  50,
1918  0.,
1919  pt_max);
1921  "PtinVsPtoutShowering_mode",
1922  "ele track inner pt vs outer pt vs eta, showering, mode of GSF components",
1923  pt2D_nbin,
1924  0.,
1925  pt_max,
1926  50,
1927  0.,
1928  pt_max);
1930  "PtinVsPtoutGolden_mean",
1931  "ele track inner pt vs outer pt vs eta, golden, mean of GSF components",
1932  pt2D_nbin,
1933  0.,
1934  pt_max,
1935  50,
1936  0.,
1937  pt_max);
1939  "PtinVsPtoutShowering_mean",
1940  "ele track inner pt vs outer pt vs eta, showering, mean of GSF components",
1941  pt2D_nbin,
1942  0.,
1943  pt_max,
1944  50,
1945  0.,
1946  pt_max);
1947  setBookPrefix("h_scl");
1949  "EoEmatchingObject_golden_barrel",
1950  "ele supercluster energy / gen energy, golden, barrel",
1953  popmatching_max);
1955  "EoEmatchingObject_golden_endcaps",
1956  "ele supercluster energy / gen energy, golden, endcaps",
1959  popmatching_max);
1961  "EoEmatchingObject_showering_barrel",
1962  "ele supercluster energy / gen energy, showering, barrel",
1965  popmatching_max);
1967  bookH1withSumw2(iBooker,
1968  "EoEmatchingObject_showering_endcaps",
1969  "ele supercluster energy / gen energy, showering, endcaps",
1972  popmatching_max);
1973  setBookPrefix("h_ele");
1974 
1975  // isolation
1977  "tkSumPt_dr03",
1978  "tk isolation sum, dR=0.3",
1979  100,
1980  0.0,
1981  20.,
1982  "TkIsoSum, cone 0.3 (GeV/c)",
1983  "Events",
1984  "ELE_LOGY E1 P");
1986  "tkSumPt_dr03_barrel",
1987  "tk isolation sum, dR=0.3, barrel",
1988  100,
1989  0.0,
1990  20.,
1991  "TkIsoSum, cone 0.3 (GeV/c)",
1992  "Events",
1993  "ELE_LOGY E1 P");
1995  "tkSumPt_dr03_endcaps",
1996  "tk isolation sum, dR=0.3, endcaps",
1997  100,
1998  0.0,
1999  20.,
2000  "TkIsoSum, cone 0.3 (GeV/c)",
2001  "Events",
2002  "ELE_LOGY E1 P");
2004  "ecalRecHitSumEt_dr03",
2005  "ecal isolation sum, dR=0.3",
2006  100,
2007  0.0,
2008  20.,
2009  "EcalIsoSum, cone 0.3 (GeV)",
2010  "Events",
2011  "ELE_LOGY E1 P");
2013  "ecalRecHitSumEt_dr03_barrel",
2014  "ecal isolation sum, dR=0.3, barrel",
2015  100,
2016  0.0,
2017  20.,
2018  "EcalIsoSum, cone 0.3 (GeV)",
2019  "Events",
2020  "ELE_LOGY E1 P");
2022  "ecalRecHitSumEt_dr03_endcaps",
2023  "ecal isolation sum, dR=0.3, endcaps",
2024  100,
2025  0.0,
2026  20.,
2027  "EcalIsoSum, cone 0.3 (GeV)",
2028  "Events",
2029  "ELE_LOGY E1 P");
2031  "hcalTowerSumEt_dr03_depth1",
2032  "hcal depth1 isolation sum, dR=0.3",
2033  100,
2034  0.0,
2035  20.,
2036  "Hcal1IsoSum, cone 0.3 (GeV)",
2037  "Events",
2038  "ELE_LOGY E1 P");
2040  "hcalTowerSumEt_dr03_depth1_barrel",
2041  "hcal depth1 isolation sum, dR=0.3, barrel",
2042  100,
2043  0.0,
2044  20.,
2045  "Hcal1IsoSum, cone 0.3 (GeV)",
2046  "Events",
2047  "ELE_LOGY E1 P");
2049  "hcalTowerSumEt_dr03_depth1_endcaps",
2050  "hcal depth1 isolation sum, dR=0.3, endcaps",
2051  100,
2052  0.0,
2053  20.,
2054  "Hcal1IsoSum, cone 0.3 (GeV)",
2055  "Events",
2056  "ELE_LOGY E1 P");
2058  "hcalTowerSumEt_dr03_depth2",
2059  "hcal depth2 isolation sum, dR=0.3",
2060  100,
2061  0.0,
2062  20.,
2063  "Hcal2IsoSum, cone 0.3 (GeV)",
2064  "Events",
2065  "ELE_LOGY E1 P");
2066 
2067  // newHCAL
2068  // isolation new hcal
2070  "hcalTowerSumEtBc_dr03_depth1",
2071  "hcal depth1 isolation sum behind cluster, dR=0.3",
2072  100,
2073  0.0,
2074  20.,
2075  "Hcal1IsoSum, cone 0.3 (GeV)",
2076  "Events",
2077  "ELE_LOGY E1 P");
2079  bookH1withSumw2(iBooker,
2080  "hcalTowerSumEtBc_dr03_depth1_barrel",
2081  "hcal depth1 isolation sum behind cluster, dR=0.3, barrel",
2082  100,
2083  0.0,
2084  20.,
2085  "Hcal1IsoSum, cone 0.3 (GeV)",
2086  "Events",
2087  "ELE_LOGY E1 P");
2089  bookH1withSumw2(iBooker,
2090  "hcalTowerSumEtBc_dr03_depth1_endcaps",
2091  "hcal depth1 isolation sum behind cluster, dR=0.3, endcaps",
2092  100,
2093  0.0,
2094  20.,
2095  "Hcal1IsoSum, cone 0.3 (GeV)",
2096  "Events",
2097  "ELE_LOGY E1 P");
2098 
2100  "hcalTowerSumEtBc_dr03_depth2",
2101  "hcal depth2 isolation sum behind cluster, dR=0.3",
2102  100,
2103  0.0,
2104  20.,
2105  "Hcal1IsoSum, cone 0.3 (GeV)",
2106  "Events",
2107  "ELE_LOGY E1 P");
2109  bookH1withSumw2(iBooker,
2110  "hcalTowerSumEtBc_dr03_depth2_barrel",
2111  "hcal depth2 isolation sum behind cluster, dR=0.3, barrel",
2112  100,
2113  0.0,
2114  20.,
2115  "Hcal1IsoSum, cone 0.3 (GeV)",
2116  "Events",
2117  "ELE_LOGY E1 P");
2119  bookH1withSumw2(iBooker,
2120  "hcalTowerSumEtBc_dr03_depth2_endcaps",
2121  "hcal depth2 isolation sum behind cluster, dR=0.3, endcaps",
2122  100,
2123  0.0,
2124  20.,
2125  "Hcal1IsoSum, cone 0.3 (GeV)",
2126  "Events",
2127  "ELE_LOGY E1 P");
2128 
2130  "ecalPFClusterIso",
2131  "ecal PF Cluster Iso",
2132  100,
2133  0.0,
2134  100.,
2135  "hcal PF Cluser Iso",
2136  "Events",
2137  "ELE_LOGY E1 P");
2139  "ecalPFClusterIso_barrel",
2140  "ecal PF Cluster Iso barrel",
2141  100,
2142  0.0,
2143  100.,
2144  "hcal PF Cluser Iso",
2145  "Events",
2146  "ELE_LOGY E1 P");
2148  "ecalPFClusterIso_endcaps",
2149  "ecal PF Cluster Iso endcaps",
2150  100,
2151  0.0,
2152  100.,
2153  "hcal PF Cluser Iso",
2154  "Events",
2155  "ELE_LOGY E1 P");
2157  "hcalPFClusterIso",
2158  "hcal PF Cluster Iso",
2159  100,
2160  0.0,
2161  100.,
2162  "hcal PF Cluser Iso",
2163  "Events",
2164  "ELE_LOGY E1 P");
2166  "hcalPFClusterIso_barrel",
2167  "hcal PF Cluster Iso barrel",
2168  100,
2169  0.0,
2170  100.,
2171  "hcal PF Cluser Iso",
2172  "Events",
2173  "ELE_LOGY E1 P");
2175  "hcalPFClusterIso_endcaps",
2176  "hcal PF Cluster Iso endcaps",
2177  100,
2178  0.0,
2179  100.,
2180  "hcal PF Cluser Iso",
2181  "Events",
2182  "ELE_LOGY E1 P");
2184  "ecalPFClusterIso_Extended",
2185  "ecal PF Cluster Iso Extended",
2186  100,
2187  0.0,
2188  100.,
2189  "hcal PF Cluser Iso Extended, 2.5<|eta|<3",
2190  "Events",
2191  "ELE_LOGY E1 P");
2193  "hcalPFClusterIso_Extended",
2194  "hcal PF Cluster Iso Extended",
2195  100,
2196  0.0,
2197  100.,
2198  "hcal PF Cluser Iso Extended, 2.5<|eta|<3",
2199  "Events",
2200  "ELE_LOGY E1 P");
2201 
2202  // fbrem
2204  iBooker, "fbrem", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
2206  "fbrem_Extended",
2207  "ele brem fraction, mode of GSF components, 2.5<|eta|<3",
2208  100,
2209  0.,
2210  1.,
2211  "P_{in} - P_{out} / P_{in}");
2213  "fbrem_barrel",
2214  "ele brem fraction for barrel, mode of GSF components",
2215  100,
2216  0.,
2217  1.,
2218  "P_{in} - P_{out} / P_{in}");
2220  "fbrem_endcaps",
2221  "ele brem franction for endcaps, mode of GSF components",
2222  100,
2223  0.,
2224  1.,
2225  "P_{in} - P_{out} / P_{in}");
2226  p1_ele_fbremVsEta_mode = bookP1(iBooker,
2227  "fbremvsEtamode",
2228  "mean ele brem fraction vs eta, mode of GSF components",
2229  eta2D_nbin,
2230  eta_min,
2231  eta_max,
2232  0.,
2233  1.,
2234  "#eta",
2235  "<P_{in} - P_{out} / P_{in}>");
2236  p1_ele_fbremVsEta_mean = bookP1(iBooker,
2237  "fbremvsEtamean",
2238  "mean ele brem fraction vs eta, mean of GSF components",
2239  eta2D_nbin,
2240  eta_min,
2241  eta_max,
2242  0.,
2243  1.,
2244  "#eta",
2245  "<P_{in} - P_{out} / P_{in}>");
2247  bookH1withSumw2(iBooker, "superclusterfbrem", "supercluster brem fraction", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2249  iBooker, "superclusterfbrem_barrel", "supercluster brem fraction for barrel", 100, 0., 1., "1 - E_{ele} / E_{SC}");
2251  "superclusterfbrem_endcaps",
2252  "supercluster brem franction for endcaps",
2253  100,
2254  0.,
2255  1.,
2256  "1 - E_{ele} / E_{SC}");
2257  // e/g et pflow electrons
2258  h1_ele_mva = bookH1withSumw2(iBooker, "mva", "ele identification mva", 100, -1., 1.);
2259  h1_ele_mva_barrel = bookH1withSumw2(iBooker, "mva_barrel", "ele identification mva barrel", 100, -1., 1.);
2260  h1_ele_mva_endcaps = bookH1withSumw2(iBooker, "mva_endcaps", "ele identification mva endcaps", 100, -1., 1.);
2261  h1_ele_mva_isolated = bookH1withSumw2(iBooker, "mva_isolated", "ele identification mva isolated", 100, -1., 1.);
2263  bookH1withSumw2(iBooker, "mva_isolated_barrel", "ele identification mva isolated barrel", 100, -1., 1.);
2265  bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps", 100, -1., 1.);
2266  h1_ele_provenance = bookH1withSumw2(iBooker, "provenance", "ele provenance", 5, -2., 3.);
2267  h1_ele_provenance_Extended = bookH1withSumw2(iBooker, "provenance_Extended", "ele provenance_Extended", 5, -2., 3.);
2268  h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel", "ele provenance barrel", 5, -2., 3.);
2269  h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps", "ele provenance endcaps", 5, -2., 3.);
2270 
2271  // pflow isolation variables
2273  iBooker, "chargedHadronIso", "chargedHadronIso", 100, 0.0, 20., "chargedHadronIso", "Events", "ELE_LOGY E1 P");
2275  "chargedHadronIso_barrel",
2276  "chargedHadronIso for barrel",
2277  100,
2278  0.0,
2279  20.,
2280  "chargedHadronIso_barrel",
2281  "Events",
2282  "ELE_LOGY E1 P");
2284  "chargedHadronIso_endcaps",
2285  "chargedHadronIso for endcaps",
2286  100,
2287  0.0,
2288  20.,
2289  "chargedHadronIso_endcaps",
2290  "Events",
2291  "ELE_LOGY E1 P");
2293  iBooker, "neutralHadronIso", "neutralHadronIso", 21, 0.0, 20., "neutralHadronIso", "Events", "ELE_LOGY E1 P");
2295  "neutralHadronIso_barrel",
2296  "neutralHadronIso for barrel",
2297  21,
2298  0.0,
2299  20.,
2300  "neutralHadronIso_barrel",
2301  "Events",
2302  "ELE_LOGY E1 P");
2304  "neutralHadronIso_endcaps",
2305  "neutralHadronIso for endcaps",
2306  21,
2307  0.0,
2308  20.,
2309  "neutralHadronIso_endcaps",
2310  "Events",
2311  "ELE_LOGY E1 P");
2313  bookH1withSumw2(iBooker, "photonIso", "photonIso", 100, 0.0, 20., "photonIso", "Events", "ELE_LOGY E1 P");
2315  iBooker, "photonIso_barrel", "photonIso for barrel", 100, 0.0, 20., "photonIso_barrel", "Events", "ELE_LOGY E1 P");
2317  "photonIso_endcaps",
2318  "photonIso for endcaps",
2319  100,
2320  0.0,
2321  20.,
2322  "photonIso_endcaps",
2323  "Events",
2324  "ELE_LOGY E1 P");
2325  // -- pflow over pT
2327  "chargedHadronRelativeIso",
2328  "chargedHadronRelativeIso",
2329  100,
2330  0.0,
2331  2.,
2332  "chargedHadronRelativeIso",
2333  "Events",
2334  "ELE_LOGY E1 P");
2336  "chargedHadronRelativeIso_Extended",
2337  "chargedHadronRelativeIso_Extended",
2338  100,
2339  0.0,
2340  2.,
2341  "chargedHadronRelativeIso Extended, 2.5<|eta|<3",
2342  "Events",
2343  "ELE_LOGY E1 P");
2345  "chargedHadronRelativeIso_barrel",
2346  "chargedHadronRelativeIso for barrel",
2347  100,
2348  0.0,
2349  2.,
2350  "chargedHadronRelativeIso_barrel",
2351  "Events",
2352  "ELE_LOGY E1 P");
2354  "chargedHadronRelativeIso_endcaps",
2355  "chargedHadronRelativeIso for endcaps",
2356  100,
2357  0.0,
2358  2.,
2359  "chargedHadronRelativeIso_endcaps",
2360  "Events",
2361  "ELE_LOGY E1 P");
2363  "neutralHadronRelativeIso",
2364  "neutralHadronRelativeIso",
2365  100,
2366  0.0,
2367  2.,
2368  "neutralHadronRelativeIso",
2369  "Events",
2370  "ELE_LOGY E1 P");
2372  "neutralHadronRelativeIso_Extended",
2373  "neutralHadronRelativeIso_Extended",
2374  100,
2375  0.0,
2376  2.,
2377  "neutralHadronRelativeIso Extended, 2.5<|eta|<3",
2378  "Events",
2379  "ELE_LOGY E1 P");
2381  "neutralHadronRelativeIso_barrel",
2382  "neutralHadronRelativeIso for barrel",
2383  100,
2384  0.0,
2385  2.,
2386  "neutralHadronRelativeIso_barrel",
2387  "Events",
2388  "ELE_LOGY E1 P");
2390  "neutralHadronRelativeIso_endcaps",
2391  "neutralHadronRelativeIso for endcaps",
2392  100,
2393  0.0,
2394  2.,
2395  "neutralHadronRelativeIso_endcaps",
2396  "Events",
2397  "ELE_LOGY E1 P");
2399  iBooker, "photonRelativeIso", "photonRelativeIso", 100, 0.0, 2., "photonRelativeIso", "Events", "ELE_LOGY E1 P");
2401  "photonRelativeIso_Extended",
2402  "photonRelativeIso_Extended",
2403  100,
2404  0.0,
2405  2.,
2406  "photonRelativeIso Extended, 2.5<|eta|<3",
2407  "Events",
2408  "ELE_LOGY E1 P");
2410  "photonRelativeIso_barrel",
2411  "photonRelativeIso for barrel",
2412  100,
2413  0.0,
2414  2.,
2415  "photonRelativeIso_barrel",
2416  "Events",
2417  "ELE_LOGY E1 P");
2419  "photonRelativeIso_endcaps",
2420  "photonRelativeIso for endcaps",
2421  100,
2422  0.0,
2423  2.,
2424  "photonRelativeIso_endcaps",
2425  "Events",
2426  "ELE_LOGY E1 P");
2427 
2428  // conversion rejection information
2429  h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags", "conversion rejection flag", 5, -2.5, 2.5);
2431  bookH1withSumw2(iBooker, "convFlags_all", "conversion rejection flag, all electrons", 5, -2.5, 2.5);
2432  h1_ele_convDist = bookH1withSumw2(iBooker, "convDist", "distance to the conversion partner", 100, -15., 15.);
2434  bookH1withSumw2(iBooker, "convDist_all", "distance to the conversion partner, all electrons", 100, -15., 15.);
2436  iBooker, "convDcot", "difference of cot(angle) with the conversion partner", 100, -CLHEP::pi / 2., CLHEP::pi / 2.);
2438  "convDcot_all",
2439  "difference of cot(angle) with the conversion partner, all electrons",
2440  100,
2441  -CLHEP::pi / 2.,
2442  CLHEP::pi / 2.);
2443  h1_ele_convRadius = bookH1withSumw2(iBooker, "convRadius", "signed conversion radius", 100, 0., 130.);
2445  bookH1withSumw2(iBooker, "convRadius_all", "signed conversion radius, all electrons", 100, 0., 130.);
2446 }
2447 
2449 
2450 //=========================================================================
2451 // Main methods
2452 //=========================================================================
2453 
2455  // get reco electrons
2456  auto gsfElectrons = iEvent.getHandle(electronCollection_);
2457  auto gsfElectronsEndcaps = iEvent.getHandle(electronCollectionEndcaps_);
2458  auto gsfElectronCores = iEvent.getHandle(electronCoreCollection_);
2459  auto gsfElectronCoresEndcaps = iEvent.getHandle(electronCoreCollectionEndcaps_);
2460  auto gsfElectronTracks = iEvent.getHandle(electronTrackCollection_);
2461  auto gsfElectronSeeds = iEvent.getHandle(electronSeedCollection_);
2462 
2463  // get gen jets
2464  auto genJets = iEvent.getHandle(matchingObjectCollection_);
2465 
2466  // get the beamspot from the Event:
2467  auto recoBeamSpotHandle = iEvent.getHandle(beamSpotTag_);
2468  const BeamSpot &bs = *recoBeamSpotHandle;
2469 
2470  auto isoFromDepsTk03Handle = iEvent.getHandle(isoFromDepsTk03Tag_);
2471  auto isoFromDepsTk04Handle = iEvent.getHandle(isoFromDepsTk04Tag_);
2472  auto isoFromDepsEcalFull03Handle = iEvent.getHandle(isoFromDepsEcalFull03Tag_);
2473  auto isoFromDepsEcalFull04Handle = iEvent.getHandle(isoFromDepsEcalFull04Tag_);
2474  auto isoFromDepsEcalReduced03Handle = iEvent.getHandle(isoFromDepsEcalReduced03Tag_);
2475  auto isoFromDepsEcalReduced04Handle = iEvent.getHandle(isoFromDepsEcalReduced04Tag_);
2476  auto isoFromDepsHcal03Handle = iEvent.getHandle(isoFromDepsHcal03Tag_);
2477  auto isoFromDepsHcal04Handle = iEvent.getHandle(isoFromDepsHcal04Tag_);
2478 
2479  auto vertexCollectionHandle = iEvent.getHandle(offlineVerticesCollection_);
2480  if (!vertexCollectionHandle.isValid()) {
2481  edm::LogInfo("ElectronMcFakeValidator::analyze") << "vertexCollectionHandle KO";
2482  } else {
2483  edm::LogInfo("ElectronMcFakeValidator::analyze") << "vertexCollectionHandle OK";
2484  }
2485 
2486  reco::GsfElectronCollection::const_iterator gsfIter;
2487  reco::GsfElectronCoreCollection::const_iterator gsfCoreIter; //
2488  std::vector<reco::GsfElectron>::const_iterator gsfIter3;
2489  std::vector<reco::GsfElectron>::const_iterator gsfIter4;
2490 
2491  //===============================================
2492  // get a vector with EB & EE
2493  //===============================================
2494  std::vector<reco::GsfElectron> localCollection;
2495 
2496  // looking for EB
2497  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
2498  if (gsfIter->isEB()) {
2499  localCollection.push_back(*gsfIter);
2500  }
2501  }
2502 
2503  // looking for EE
2504  for (gsfIter = gsfElectronsEndcaps->begin(); gsfIter != gsfElectronsEndcaps->end(); gsfIter++) {
2505  if (gsfIter->isEE()) {
2506  localCollection.push_back(*gsfIter);
2507  }
2508  }
2509 
2510  //===============================================
2511  // get a vector with EB & EE for Core
2512  //===============================================
2513  std::vector<reco::GsfElectronCore> localCoreCollection;
2514 
2515  // looking for EB
2516 
2517  for (gsfCoreIter = gsfElectronCores->begin(); gsfCoreIter != gsfElectronCores->end(); gsfCoreIter++) {
2518  if (gsfCoreIter->superCluster()->seed()->seed().subdetId() == EcalBarrel) {
2519  localCoreCollection.push_back(*gsfCoreIter);
2520  }
2521  }
2522 
2523  // looking for EE
2524  for (gsfCoreIter = gsfElectronCoresEndcaps->begin(); gsfCoreIter != gsfElectronCoresEndcaps->end(); gsfCoreIter++) {
2525  if ((gsfCoreIter->superCluster()->seed()->seed().subdetId() == EcalEndcap) ||
2526  (EcalTools::isHGCalDet(gsfCoreIter->superCluster()->seed()->seed().det()))) {
2527  localCoreCollection.push_back(*gsfCoreIter);
2528  }
2529  }
2530 
2531  //===============================================
2532  // Analyze
2533  //===============================================
2534  edm::LogInfo("ElectronMcFakeValidator::analyze")
2535  << "Treating event " << iEvent.id() << " with " << gsfElectrons.product()->size() << " electrons";
2536  edm::LogInfo("ElectronMcSignalValidator::analyze")
2537  << "Treating event " << iEvent.id() << " with " << gsfElectronsEndcaps.product()->size() << " electrons";
2538 
2539  h1_recEleNum_->Fill((localCollection).size());
2540  h1_recCoreNum_->Fill(localCoreCollection.size());
2541  h1_recTrackNum_->Fill((*gsfElectronTracks).size());
2542  h1_recSeedNum_->Fill((*gsfElectronSeeds).size());
2543  h1_recOfflineVertices_->Fill((*vertexCollectionHandle).size());
2544 
2545  // all rec electrons
2546  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
2547  // preselect electrons
2548  if (gsfIter3->pt() > maxPt_ || std::abs(gsfIter3->eta()) > maxAbsEta_)
2549  continue;
2550 
2551  h1_ele_EoverP_all->Fill(gsfIter3->eSuperClusterOverP());
2552  h1_ele_EseedOP_all->Fill(gsfIter3->eSeedClusterOverP());
2553  h1_ele_EoPout_all->Fill(gsfIter3->eSeedClusterOverPout());
2554  h1_ele_EeleOPout_all->Fill(gsfIter3->eEleClusterOverPout());
2555  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter3->deltaEtaSuperClusterTrackAtVtx());
2556  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter3->deltaPhiSuperClusterTrackAtVtx());
2557  h1_ele_dEtaCl_propOut_all->Fill(gsfIter3->deltaEtaSeedClusterTrackAtCalo());
2558  h1_ele_dPhiCl_propOut_all->Fill(gsfIter3->deltaPhiSeedClusterTrackAtCalo());
2559  h1_ele_HoE_all->Fill(gsfIter3->hadronicOverEm());
2560  h1_ele_HoE_bc_all->Fill(gsfIter3->hcalOverEcalBc());
2561  double d = gsfIter3->vertex().x() * gsfIter3->vertex().x() + gsfIter3->vertex().y() * gsfIter3->vertex().y();
2563  h1_ele_vertexEta_all->Fill(gsfIter3->eta());
2564  h1_ele_vertexPt_all->Fill(gsfIter3->pt());
2565  float enrj1 = gsfIter3->ecalEnergy();
2566 
2567  // mee
2568  for (gsfIter4 = gsfIter3 + 1; gsfIter4 != localCollection.end(); gsfIter4++) {
2569  math::XYZTLorentzVector p12 = (*gsfIter3).p4() + (*gsfIter4).p4();
2570  float mee2 = p12.Dot(p12);
2571  h1_ele_mee_all->Fill(sqrt(mee2));
2572  float enrj2 = gsfIter4->ecalEnergy();
2573  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2), enrj2 - enrj1);
2574  if (gsfIter3->ecalDrivenSeed() && gsfIter4->ecalDrivenSeed()) {
2575  h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2), enrj2 - enrj1);
2576  }
2577  if (gsfIter3->charge() * gsfIter4->charge() < 0.) {
2578  h1_ele_mee_os->Fill(sqrt(mee2));
2579  }
2580  }
2581 
2582  // conversion rejection
2583  int flags = gsfIter3->convFlags();
2584  if (flags == -9999) {
2585  flags = -1;
2586  }
2588  if (flags >= 0.) {
2589  h1_ele_convDist_all->Fill(gsfIter3->convDist());
2590  h1_ele_convDcot_all->Fill(gsfIter3->convDcot());
2591  h1_ele_convRadius_all->Fill(gsfIter3->convRadius());
2592  }
2593  }
2594 
2595  // association matching object-reco electrons
2596  int matchingObjectNum = 0;
2597  reco::GenJetCollection::const_iterator moIter;
2598  for (moIter = genJets->begin(); moIter != genJets->end(); ++moIter) {
2599  // number of matching objects
2600  matchingObjectNum++;
2601 
2602  if (moIter->energy() / cosh(moIter->eta()) > maxPt_ || std::abs(moIter->eta()) > maxAbsEtaExtended_) {
2603  continue;
2604  }
2605 
2606  if (std::abs(moIter->eta()) < maxAbsEta_) {
2607  h1_matchingObjectEta->Fill(moIter->eta());
2608  h1_matchingObjectAbsEta->Fill(std::abs(moIter->eta()));
2610  h1_matchingObjectP->Fill(moIter->energy());
2611  h1_matchingObjectPt->Fill(moIter->energy() / cosh(moIter->eta()));
2612  h1_matchingObjectPhi->Fill(moIter->phi());
2613  h1_matchingObjectZ->Fill(moIter->vz());
2614  }
2615  if (std::abs(moIter->eta()) < maxAbsEtaExtended_) {
2616  h1_matchingObjectEta_Extended->Fill(moIter->eta());
2618  }
2619 
2620  // looking for the best matching gsf electron
2621  bool okGsfFound = false;
2622  double gsfOkRatio = 999999.;
2623  bool isEBflag = false;
2624  bool isEEflag = false;
2625  bool isEEextendedflag = false;
2626 
2627  // find best matched electron
2628  reco::GsfElectron bestGsfElectron;
2629 
2630  for (gsfIter3 = localCollection.begin(); gsfIter3 != localCollection.end(); gsfIter3++) {
2631  double dphi = gsfIter3->phi() - moIter->phi();
2632  if (std::abs(dphi) > CLHEP::pi) {
2633  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
2634  }
2635  double deltaR2 = (gsfIter3->eta() - moIter->eta()) * (gsfIter3->eta() - moIter->eta()) + dphi * dphi;
2636  if (deltaR2 < deltaR2_) {
2637  double tmpGsfRatio = gsfIter3->p() / moIter->energy();
2638  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
2639  gsfOkRatio = tmpGsfRatio;
2640  bestGsfElectron = *gsfIter3;
2641  okGsfFound = true;
2642  }
2643  }
2644  } // loop over rec ele to look for the best one
2645 
2646  // analysis when the matching object is matched by a rec electron
2647 
2648  if (okGsfFound) {
2649  //passMiniAODSelection = bestGsfElectron.pt() >= 5.;
2650  isEBflag = bestGsfElectron.isEB();
2651  isEEflag = bestGsfElectron.isEE() && (std::abs(moIter->eta()) < maxAbsEta_);
2652  isEEextendedflag = bestGsfElectron.isEE();
2653  /*isEBflag = bestGsfElectron.isEB();
2654  isEEflag = bestGsfElectron.isEE();*/
2655 
2656  if (isEEextendedflag) { // Extended flag
2657  if (!isEEflag) {
2661  h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
2665  h1_ele_HoE_Extended->Fill(bestGsfElectron.hadronicOverEm());
2667  bestGsfElectron.pt());
2669  bestGsfElectron.pt());
2671  bestGsfElectron.pt());
2674 
2675  double fbrem_mode = bestGsfElectron.fbrem();
2676  h1_ele_fbrem_Extended->Fill(fbrem_mode);
2677  if (!readAOD_) {
2678  if (bestGsfElectron.ecalDrivenSeed()) {
2680  }
2681  if (bestGsfElectron.trackerDrivenSeed()) {
2683  }
2684  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) {
2686  }
2687  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) {
2689  }
2690  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) {
2692  }
2693  }
2694  }
2695 
2696  if (!readAOD_) {
2697  h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
2698  }
2699  }
2700 
2701  if (!isEBflag && !isEEflag)
2702  continue;
2703 
2704  // electron related distributions
2705  h1_ele_charge->Fill(bestGsfElectron.charge());
2706  h2_ele_chargeVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.charge());
2707  h2_ele_chargeVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.charge());
2708  h2_ele_chargeVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.charge());
2709  h1_ele_vertexP->Fill(bestGsfElectron.p());
2710  h1_ele_vertexPt->Fill(bestGsfElectron.pt());
2711  h2_ele_vertexPtVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.pt());
2712  h2_ele_vertexPtVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.pt());
2713  h1_ele_vertexEta->Fill(bestGsfElectron.eta());
2714  // generated distributions for matched electrons
2715  h1_ele_matchingObjectPt_matched->Fill(moIter->energy() / cosh(moIter->eta()));
2716  h1_ele_matchingObjectPhi_matched->Fill(moIter->phi());
2719  h1_ele_matchingObjectEta_matched->Fill(moIter->eta());
2721  h2_ele_vertexEtaVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta());
2722  h1_ele_vertexPhi->Fill(bestGsfElectron.phi());
2723  h1_ele_vertexX->Fill(bestGsfElectron.vertex().x());
2724  h1_ele_vertexY->Fill(bestGsfElectron.vertex().y());
2725  h1_ele_vertexZ->Fill(bestGsfElectron.vertex().z());
2726  h1_ele_matchingObjectZ_matched->Fill(moIter->vz());
2727  double d =
2728  (bestGsfElectron.vertex().x() - bs.position().x()) * (bestGsfElectron.vertex().x() - bs.position().x()) +
2729  (bestGsfElectron.vertex().y() - bs.position().y()) * (bestGsfElectron.vertex().y() - bs.position().y());
2730  d = sqrt(d);
2732  h2_ele_vertexTIPVsEta->Fill(bestGsfElectron.eta(), d);
2733  h2_ele_vertexTIPVsPhi->Fill(bestGsfElectron.phi(), d);
2734  h2_ele_vertexTIPVsPt->Fill(bestGsfElectron.pt(), d);
2735  h1_ele_EtaMnEtamatchingObject->Fill(bestGsfElectron.eta() - moIter->eta());
2736  h2_ele_EtaMnEtamatchingObjectVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eta() - moIter->eta());
2737  h2_ele_EtaMnEtamatchingObjectVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta() - moIter->eta());
2738  h2_ele_EtaMnEtamatchingObjectVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.eta() - moIter->eta());
2739  h1_ele_PhiMnPhimatchingObject->Fill(bestGsfElectron.phi() - moIter->phi());
2740  h1_ele_PhiMnPhimatchingObject2->Fill(bestGsfElectron.phi() - moIter->phi());
2741  h2_ele_PhiMnPhimatchingObjectVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.phi() - moIter->phi());
2742  h2_ele_PhiMnPhimatchingObjectVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.phi() - moIter->phi());
2743  h2_ele_PhiMnPhimatchingObjectVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.phi() - moIter->phi());
2744  h1_ele_PoPmatchingObject->Fill(bestGsfElectron.p() / moIter->energy());
2745  h2_ele_PoPmatchingObjectVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.p() / moIter->energy());
2746  h2_ele_PoPmatchingObjectVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.p() / moIter->energy());
2747  h2_ele_PoPmatchingObjectVsPt->Fill(bestGsfElectron.py(), bestGsfElectron.p() / moIter->energy());
2748  if (isEBflag)
2749  h1_ele_PoPmatchingObject_barrel->Fill(bestGsfElectron.p() / moIter->energy());
2750  else if (isEEflag)
2751  h1_ele_PoPmatchingObject_endcaps->Fill(bestGsfElectron.p() / moIter->energy());
2752 
2753  // supercluster related distributions
2754  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
2755  if (!bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.trackerDrivenSeed())
2756  sclRef = bestGsfElectron.parentSuperCluster();
2757  if (sclRef.isNonnull()) {
2758  h1_scl_En_->Fill(sclRef->energy());
2759  double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
2760  double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
2761  h1_scl_Et_->Fill(sclRef->energy() * (Rt / R));
2762  h2_scl_EtVsEta_->Fill(sclRef->eta(), sclRef->energy() * (Rt / R));
2763  h2_scl_EtVsPhi_->Fill(sclRef->phi(), sclRef->energy() * (Rt / R));
2764  if (isEBflag)
2765  h1_scl_EoEmatchingObject_barrel->Fill(sclRef->energy() / moIter->energy());
2766  else if (isEEflag) {
2767  h1_scl_EoEmatchingObject_endcaps->Fill(sclRef->energy() / moIter->energy());
2768  h1_scl_ESFrac_endcaps->Fill(sclRef->preshowerEnergy() / sclRef->rawEnergy());
2769  }
2770  h1_scl_Eta_->Fill(sclRef->eta());
2771  h2_scl_EtaVsPhi_->Fill(sclRef->phi(), sclRef->eta());
2772  h1_scl_Phi_->Fill(sclRef->phi());
2773  }
2774  h1_scl_SigIEtaIEta_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2776  h1_scl_E1x5_->Fill(bestGsfElectron.scE1x5());
2777  h1_scl_E2x5max_->Fill(bestGsfElectron.scE2x5Max());
2778  h1_scl_E5x5_->Fill(bestGsfElectron.scE5x5());
2779  if (isEBflag) {
2780  h1_scl_SigIEtaIEta_barrel_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2782  h1_scl_E1x5_barrel_->Fill(bestGsfElectron.scE1x5());
2783  h1_scl_E2x5max_barrel_->Fill(bestGsfElectron.scE2x5Max());
2784  h1_scl_E5x5_barrel_->Fill(bestGsfElectron.scE5x5());
2785  } else if (isEEflag) {
2786  h1_scl_SigIEtaIEta_endcaps_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2788  h1_scl_E1x5_endcaps_->Fill(bestGsfElectron.scE1x5());
2789  h1_scl_E2x5max_endcaps_->Fill(bestGsfElectron.scE2x5Max());
2790  h1_scl_E5x5_endcaps_->Fill(bestGsfElectron.scE5x5());
2791  }
2792 
2793  // track related distributions
2795  h2_ele_ambiguousTracksVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize());
2796  h2_ele_ambiguousTracksVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize());
2797  h2_ele_ambiguousTracksVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize());
2798  if (!readAOD_) { // track extra does not exist in AOD
2799  h1_ele_foundHits->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits());
2800  h2_ele_foundHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits());
2801  h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits());
2802  h2_ele_foundHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits());
2803  h1_ele_lostHits->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits());
2804  h2_ele_lostHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits());
2805  h2_ele_lostHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits());
2806  h2_ele_lostHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits());
2807  h1_ele_chi2->Fill(bestGsfElectron.gsfTrack()->normalizedChi2());
2808  h2_ele_chi2VsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2());
2809  h2_ele_chi2VsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2());
2810  h2_ele_chi2VsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2());
2811  }
2812  // from gsf track interface, hence using mean
2813  if (!readAOD_) { // track extra does not exist in AOD
2814  h1_ele_PinMnPout->Fill(bestGsfElectron.gsfTrack()->innerMomentum().R() -
2815  bestGsfElectron.gsfTrack()->outerMomentum().R());
2816  h1_ele_outerP->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R());
2817  h1_ele_outerPt->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho());
2818  }
2819  // from electron interface, hence using mode
2820  h1_ele_PinMnPout_mode->Fill(bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
2822  bestGsfElectron.eta(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
2824  bestGsfElectron.phi(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
2826  bestGsfElectron.pt(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
2827  h2_ele_PinMnPoutVsE_mode->Fill(bestGsfElectron.caloEnergy(),
2828  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
2829  if (!readAOD_) // track extra does not exist in AOD
2831  bestGsfElectron.gsfTrack()->normalizedChi2(),
2832  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R());
2833  h1_ele_outerP_mode->Fill(bestGsfElectron.trackMomentumOut().R());
2834  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R());
2835  h1_ele_outerPt_mode->Fill(bestGsfElectron.trackMomentumOut().Rho());
2836  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho());
2837  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho());
2838  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho());
2839 
2840  if (!readAOD_) { // track extra does not exist in AOD
2841  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
2842  ElectronSeedRef elseed = seed.castTo<ElectronSeedRef>();
2843  h1_ele_seed_subdet2_->Fill(elseed->subDet(1));
2844  h1_ele_seed_mask_->Fill(elseed->hitsMask());
2845  if (elseed->subDet(1) == 1) {
2846  h1_ele_seed_mask_bpix_->Fill(elseed->hitsMask());
2847  } else if (elseed->subDet(1) == 2) {
2848  h1_ele_seed_mask_fpix_->Fill(elseed->hitsMask());
2849  } else if (elseed->subDet(1) == 6) {
2850  h1_ele_seed_mask_tec_->Fill(elseed->hitsMask());
2851  }
2852 
2853  if (elseed->dPhiNeg(1) != std::numeric_limits<float>::infinity()) {
2854  h1_ele_seed_dphi2_->Fill(elseed->dPhiNeg(1));
2855  h2_ele_seed_dphi2VsEta_->Fill(bestGsfElectron.eta(), elseed->dPhiNeg(1));
2856  h2_ele_seed_dphi2VsPt_->Fill(bestGsfElectron.pt(), elseed->dPhiNeg(1));
2857  }
2858  if (elseed->dPhiPos(1) != std::numeric_limits<float>::infinity()) {
2859  h1_ele_seed_dphi2pos_->Fill(elseed->dPhiPos(1));
2860  h2_ele_seed_dphi2posVsEta_->Fill(bestGsfElectron.eta(), elseed->dPhiPos(1));
2861  h2_ele_seed_dphi2posVsPt_->Fill(bestGsfElectron.pt(), elseed->dPhiPos(1));
2862  }
2863  if (elseed->dRZNeg(1) != std::numeric_limits<float>::infinity()) {
2864  h1_ele_seed_drz2_->Fill(elseed->dRZNeg(1));
2865  h2_ele_seed_drz2VsEta_->Fill(bestGsfElectron.eta(), elseed->dRZNeg(1));
2866  h2_ele_seed_drz2VsPt_->Fill(bestGsfElectron.pt(), elseed->dRZNeg(1));
2867  }
2868  if (elseed->dRZPos(1) != std::numeric_limits<float>::infinity()) {
2869  h1_ele_seed_drz2pos_->Fill(elseed->dRZPos(1));
2870  h2_ele_seed_drz2posVsEta_->Fill(bestGsfElectron.eta(), elseed->dRZPos(1));
2871  h2_ele_seed_drz2posVsPt_->Fill(bestGsfElectron.pt(), elseed->dRZPos(1));
2872  }
2873  }
2874  // match distributions
2875  h1_ele_EoP->Fill(bestGsfElectron.eSuperClusterOverP());
2876  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP());
2877  h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP());
2878  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP());
2879  h1_ele_EseedOP->Fill(bestGsfElectron.eSeedClusterOverP());
2880  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP());
2881  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP());
2882  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP());
2883  h1_ele_EoPout->Fill(bestGsfElectron.eSeedClusterOverPout());
2884  h2_ele_EoPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout());
2885  h2_ele_EoPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout());
2886  h2_ele_EoPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout());
2887  h1_ele_EeleOPout->Fill(bestGsfElectron.eEleClusterOverPout());
2888  h2_ele_EeleOPoutVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout());
2889  h2_ele_EeleOPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout());
2890  h2_ele_EeleOPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout());
2892  //h1_ele_dEtaSc_propVtx_Extended->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2893  h2_ele_dEtaScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2894  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2895  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2897  //h1_ele_dPhiSc_propVtx_Extended->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2898  h2_ele_dPhiScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2899  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2900  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2902  h2_ele_dEtaClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2903  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2904  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2906  h2_ele_dPhiClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2907  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2908  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2910  h2_ele_dEtaEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2911  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2912  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2914  h2_ele_dPhiEleClVsEta_propOut->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2915  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2916  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2917  h1_ele_HoE->Fill(bestGsfElectron.hadronicOverEm());
2918  h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc());
2919  if (isEBflag) {
2920  h1_ele_EoP_barrel->Fill(bestGsfElectron.eSuperClusterOverP());
2921  h1_ele_EseedOP_barrel->Fill(bestGsfElectron.eSeedClusterOverP());
2922  h1_ele_EoPout_barrel->Fill(bestGsfElectron.eSeedClusterOverPout());
2923  h1_ele_EeleOPout_barrel->Fill(bestGsfElectron.eEleClusterOverPout());
2930  h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc());
2931  h1_ele_HoE_barrel->Fill(bestGsfElectron.hadronicOverEm());
2932  } else if (isEEflag) {
2933  h1_ele_EoP_endcaps->Fill(bestGsfElectron.eSuperClusterOverP());
2934  h1_ele_EseedOP_endcaps->Fill(bestGsfElectron.eSeedClusterOverP());
2935  h1_ele_EoPout_endcaps->Fill(bestGsfElectron.eSeedClusterOverPout());
2943  h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc());
2944  h1_ele_HoE_endcaps->Fill(bestGsfElectron.hadronicOverEm());
2945  }
2946 
2947  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap() && !bestGsfElectron.isEBEEGap() &&
2948  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap())
2949  h1_ele_HoE_fiducial->Fill(bestGsfElectron.hadronicOverEm());
2950  h2_ele_HoEVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.hadronicOverEm());
2951  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.hadronicOverEm());
2952  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.hadronicOverEm());
2953 
2954  //classes
2955  int eleClass = bestGsfElectron.classification();
2956  if (isEEflag)
2957  eleClass += 10;
2958  h1_ele_classes->Fill(eleClass);
2959 
2960  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
2961  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
2962  h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
2963  if (bestGsfElectron.classification() == GsfElectron::BIGBREM)
2964  h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
2965  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
2966  h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
2967 
2968  // fbrem
2969 
2970  double fbrem_mode = bestGsfElectron.fbrem();
2971  h1_ele_fbrem->Fill(fbrem_mode);
2972  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(), fbrem_mode);
2973  double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem();
2974  h1_ele_superclusterfbrem->Fill(superclusterfbrem_mode);
2975  if (isEBflag) {
2976  double fbrem_mode_barrel = bestGsfElectron.fbrem();
2977  h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel);
2978  double superclusterfbrem_mode_barrel = bestGsfElectron.superClusterFbrem();
2979  h1_ele_superclusterfbrem_barrel->Fill(superclusterfbrem_mode_barrel);
2980  } else if (isEEflag) {
2981  double fbrem_mode_endcaps = bestGsfElectron.fbrem();
2982  h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps);
2983  double superclusterfbrem_mode_endcaps = bestGsfElectron.superClusterFbrem();
2984  h1_ele_superclusterfbrem_endcaps->Fill(superclusterfbrem_mode_endcaps);
2985  }
2986 
2987  if (!readAOD_) // track extra does not exist in AOD
2988  {
2989  double fbrem_mean =
2990  1. - bestGsfElectron.gsfTrack()->outerMomentum().R() / bestGsfElectron.gsfTrack()->innerMomentum().R();
2991  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(), fbrem_mean);
2992 
2993  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
2994  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
2995  bestGsfElectron.gsfTrack()->innerMomentum().R());
2996  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
2997  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(),
2998  bestGsfElectron.gsfTrack()->innerMomentum().R());
2999  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3000  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
3001  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
3002  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3003  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(),
3004  bestGsfElectron.gsfTrack()->innerMomentum().Rho());
3005  }
3006  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3007  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
3008  bestGsfElectron.trackMomentumAtVtx().Rho());
3009  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3010  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(),
3011  bestGsfElectron.trackMomentumAtVtx().Rho());
3012 
3013  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
3014  h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
3015  bestGsfElectron.trackMomentumAtVtx().R());
3016  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
3017  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(),
3018  bestGsfElectron.trackMomentumAtVtx().R());
3019 
3020  h1_ele_mva->Fill(bestGsfElectron.mva_e_pi());
3021  h1_ele_mva_isolated->Fill(bestGsfElectron.mva_Isolated());
3022  if (isEBflag) {
3023  h1_ele_mva_barrel->Fill(bestGsfElectron.mva_e_pi());
3024  h1_ele_mva_barrel_isolated->Fill(bestGsfElectron.mva_Isolated());
3025  } else if (isEEflag) {
3026  h1_ele_mva_endcaps->Fill(bestGsfElectron.mva_e_pi());
3027  h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated());
3028  }
3029 
3030  if (bestGsfElectron.ecalDrivenSeed()) {
3031  h1_ele_provenance->Fill(1.);
3032  }
3033  if (bestGsfElectron.trackerDrivenSeed()) {
3034  h1_ele_provenance->Fill(-1.);
3035  }
3036  if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) {
3037  h1_ele_provenance->Fill(0.);
3038  }
3039  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) {
3040  h1_ele_provenance->Fill(-2.);
3041  }
3042  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) {
3043  h1_ele_provenance->Fill(2.);
3044  }
3045  if (bestGsfElectron.ecalDrivenSeed() && isEBflag)
3047  if (bestGsfElectron.trackerDrivenSeed() && isEBflag)
3049  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEBflag)
3051  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEBflag)
3053  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEBflag)
3055  if (bestGsfElectron.ecalDrivenSeed() && isEEflag)
3057  if (bestGsfElectron.trackerDrivenSeed() && isEEflag)
3059  if ((bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) && isEEflag)
3061  if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed() && isEEflag)
3063  if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed() && isEEflag)
3065 
3066  // Pflow isolation
3070  if (isEBflag) {
3074  } else if (isEEflag) {
3078  }
3079 
3080  // -- pflow over pT
3082  bestGsfElectron.pt());
3084  bestGsfElectron.pt());
3085  h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
3086 
3087  if (isEBflag) {
3089  bestGsfElectron.pt());
3091  bestGsfElectron.pt());
3093  bestGsfElectron.pt());
3094  } else if (isEEflag) {
3096  bestGsfElectron.pt());
3098  bestGsfElectron.pt());
3100  bestGsfElectron.pt());
3101  }
3102 
3103  // isolation
3104  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
3105  h1_ele_ecalPFClusterIso->Fill(bestGsfElectron.ecalPFClusterIso());
3106  h1_ele_hcalPFClusterIso->Fill(bestGsfElectron.hcalPFClusterIso());
3112  h1_ele_hcalDepth1OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(1));
3113  h1_ele_hcalDepth2OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(2));
3114  if (isEBflag) {
3115  h1_ele_tkSumPt_dr03_barrel->Fill(bestGsfElectron.dr03TkSumPt());
3124  } else if (isEEflag) {
3125  h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt());
3134  }
3135 
3136  // conversion rejection
3137  int flags = bestGsfElectron.convFlags();
3138  if (flags == -9999) {
3139  flags = -1;
3140  }
3142  if (flags >= 0.) {
3143  h1_ele_convDist->Fill(bestGsfElectron.convDist());
3144  h1_ele_convDcot->Fill(bestGsfElectron.convDcot());
3145  h1_ele_convRadius->Fill(bestGsfElectron.convRadius());
3146  }
3147 
3148  } // gsf electron found
3149 
3150  } // loop overmatching object
3151 
3152  h1_matchingObjectNum->Fill(matchingObjectNum);
3153 }
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:230
MonitorElement * h2_ele_ambiguousTracksVsPhi
size
Write out results.
MonitorElement * h1_ele_matchingObjectPt_matched
MonitorElement * h1_ele_neutralHadronRelativeIso_Extended
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsEta
static bool isHGCalDet(DetId::Detector thedet)
identify HGCal cells
Definition: EcalTools.h:49
MonitorElement * h2_ele_seed_dphi2posVsPt_
MonitorElement * h1_ele_dEtaSc_propVtx
MonitorElement * h1_ele_provenance_endcaps
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
MonitorElement * h1_ele_chargedHadronRelativeIso_Extended
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:496
MonitorElement * h1_ele_dEtaEleCl_propOut_barrel
MonitorElement * h1_ele_dEtaCl_propOut_endcaps
MonitorElement * h1_ele_photonRelativeIso_Extended
MonitorElement * h1_ele_hcalDepth1OverEcalBc_endcaps
MonitorElement * h1_scl_E2x5max_barrel_
MonitorElement * h1_ele_seed_mask_bpix_
MonitorElement * h1_scl_EoEmatchingObjectGolden_barrel
ElectronMcFakeValidator(const edm::ParameterSet &conf)
MonitorElement * h1_ele_PhiMnPhimatchingObject2
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2
MonitorElement * h1_ele_matchingObjectAbsEta_matched
double pt() const final
transverse momentum
bool ecalDrivenSeed() const
Definition: GsfElectron.h:158
float deltaPhiSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:229
MonitorElement * h1_scl_EoEmatchingObjectGolden_endcaps
MonitorElement * h1_ele_ecalRecHitSumEt_dr03
MonitorElement * h1_ele_ecalPFClusterIso
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsPt
edm::EDGetTokenT< reco::ElectronSeedCollection > electronSeedCollection_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * h2_ele_PoPmatchingObjectVsPhi
float eSeedClusterOverP() const
Definition: GsfElectron.h:222
float scE1x5() const
Definition: GsfElectron.h:497
bool trackerDrivenSeed() const
Definition: GsfElectron.h:159
MonitorElement * h1_ele_photonIso_barrel
MonitorElement * h1_ele_ecalPFClusterIso_barrel
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_barrel
MonitorElement * h1_ele_tkSumPt_dr03_endcaps
MonitorElement * h1_ele_dPhiCl_propOut_all
bool isEBPhiGap() const
Definition: GsfElectron.h:334
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalReduced04Tag_
MonitorElement * h2_ele_ambiguousTracksVsPt
MonitorElement * h2_ele_PtinVsPtoutGolden_mode
MonitorElement * h1_ele_EseedOP_endcaps
MonitorElement * h1_ele_hcalDepth2OverEcalBc
bool isEERingGap() const
Definition: GsfElectron.h:337
MonitorElement * h1_ele_photonIso_endcaps
MonitorElement * p1_ele_fbremVsEta_mode
MonitorElement * h1_ele_chargedHadronIso_endcaps
MonitorElement * h1_scl_EoEmatchingObjectShowering_barrel
MonitorElement * h1_ele_ecalPFClusterIso_endcaps
MonitorElement * h1_ele_neutralHadronIso_endcaps
MonitorElement * h1_matchingObjectAbsEta
MonitorElement * p1_ele_fbremVsEta_mean
MonitorElement * h1_ele_mva_endcaps_isolated
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalFull03Tag_
MonitorElement * h2_ele_PinVsPoutShowering_mode
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_barrel
edm::EDGetTokenT< reco::GenJetCollection > matchingObjectCollection_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
MonitorElement * h1_ele_tkSumPt_dr03_barrel
MonitorElement * h1_ele_provenance_Extended
MonitorElement * h2_ele_vertexTIPVsPhi
edm::EDGetTokenT< reco::GsfTrackCollection > electronTrackCollection_
MonitorElement * h1_ele_foundHits_endcaps
float hcalOverEcalBc(const ShowerShape &ss, int depth) const
Definition: GsfElectron.h:442
const Point & vertex() const override
vertex position (overwritten by PF...)
MonitorElement * h1_ele_lostHits_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_all
MonitorElement * h1_ele_hcalDepth1OverEcalBc_barrel
MonitorElement * h1_ele_dPhiSc_propVtx_all
MonitorElement * h2_ele_dPhiScVsPhi_propVtx
MonitorElement * h2_ele_dPhiScVsEta_propVtx
MonitorElement * h2_ele_dPhiEleClVsPhi_propOut
float deltaEtaEleClusterTrackAtCalo() const
Definition: GsfElectron.h:227
MonitorElement * h1_ele_dEtaCl_propOut_all
MonitorElement * h2_ele_PinVsPoutShowering_mean
MonitorElement * h2_ele_E2mnE1vsMee_all
MonitorElement * h2_ele_seed_drz2VsPt_
MonitorElement * h1_ele_HoE_bc_endcaps
MonitorElement * h1_ele_superclusterfbrem_endcaps
MonitorElement * h1_ele_neutralHadronRelativeIso_endcaps
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_endcaps_
float convDcot() const
Definition: GsfElectron.h:646
MonitorElement * h2_ele_ambiguousTracksVsEta
MonitorElement * h2_ele_outerPtVsPt_mode
bool isEBEtaGap() const
Definition: GsfElectron.h:333
MonitorElement * h1_ele_ecalPFClusterIso_Extended
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
Classification classification() const
Definition: GsfElectron.h:805
MonitorElement * h2_ele_E2mnE1vsMee_egeg_all
MonitorElement * h2_ele_PtinVsPtoutShowering_mean
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsPt
const Double_t pi
float eEleClusterOverPout() const
Definition: GsfElectron.h:224
MonitorElement * h2_ele_dEtaEleClVsEta_propOut
bool isEB() const
Definition: GsfElectron.h:328
MonitorElement * h2_ele_PinMnPoutVsChi2_mode
MonitorElement * h1_ele_fbrem_Extended
float dr03TkSumPt() const
Definition: GsfElectron.h:557
float eSeedClusterOverPout() const
Definition: GsfElectron.h:223
void Fill(long long x)
MonitorElement * h1_ele_matchingObjectEta_matched
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
MonitorElement * h1_scl_E2x5max_endcaps_
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 * h2_ele_EeleOPoutVsEta
MonitorElement * h2_ele_PinMnPoutVsPt_mode
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
MonitorElement * h1_ele_dEtaCl_propOut
MonitorElement * h1_ele_hcalPFClusterIso_barrel
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:729
float ecalPFClusterIso() const
Definition: GsfElectron.h:731
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:270
int iEvent
Definition: GenABIO.cc:224
MonitorElement * h2_ele_dEtaScVsEta_propVtx
void analyze(const edm::Event &e, const edm::EventSetup &c) override
float dr03HcalTowerSumEtBc(int depth=0) const
Definition: GsfElectron.h:593
float caloEnergy() const
Definition: GsfElectron.h:899
MonitorElement * h2_ele_foundHitsVsPhi
double p() const final
magnitude of momentum vector
MonitorElement * h1_ele_chargedHadronRelativeIso_barrel
MonitorElement * h2_ele_dEtaScVsPt_propVtx
MonitorElement * h2_ele_PtinVsPtoutShowering_mode
MonitorElement * h2_ele_dEtaClVsPt_propOut
MonitorElement * h1_ele_PhiMnPhimatchingObject
float mva_e_pi() const
Definition: GsfElectron.h:744
MonitorElement * h1_ele_dPhiCl_propOut
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal04Tag_
MonitorElement * h1_recOfflineVertices_
MonitorElement * h1_scl_EoEmatchingObject_barrel
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2
MonitorElement * h2_ele_PoPmatchingObjectVsEta
MonitorElement * h2_ele_dPhiClVsPt_propOut
MonitorElement * h2_ele_EoPVsEta_Extended
MonitorElement * h1_ele_chargedHadronIso_barrel
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")
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk04Tag_
MonitorElement * h2_ele_dPhiEleClVsPt_propOut
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:665
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
Definition: GsfElectron.h:766
MonitorElement * h1_ele_hcalDepth1OverEcalBc
int convFlags() const
Definition: GsfElectron.h:643
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk03Tag_
bool isEBEEGap() const
Definition: GsfElectron.h:331
MonitorElement * h2_ele_dEtaEleClVsPhi_propOut
MonitorElement * h1_ele_dEtaEleCl_propOut_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_Extended
MonitorElement * h1_ele_PoPmatchingObject
const double infinity
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1
MonitorElement * h1_ele_convRadius_all
float convDist() const
Definition: GsfElectron.h:645
MonitorElement * h2_ele_PinMnPoutVsEta_mode
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * h1_ele_lostHits_barrel
MonitorElement * h1_ele_neutralHadronIso_barrel
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:268
MonitorElement * h1_ele_photonRelativeIso_endcaps
MonitorElement * h1_matchingObjectEta_Extended
void setBookPrefix(const std::string &)
edm::EDGetTokenT< reco::VertexCollection > offlineVerticesCollection_
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:664
bool isEEDeeGap() const
Definition: GsfElectron.h:336
MonitorElement * h2_ele_vertexEtaVsPhi
MonitorElement * h1_ele_seed_mask_tec_
MonitorElement * h2_ele_outerPtVsPhi_mode
MonitorElement * h1_ele_dPhiCl_propOut_endcaps
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_endcaps
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalReduced03Tag_
MonitorElement * h2_ele_seed_drz2posVsEta_
double py() const final
y coordinate of momentum vector
MonitorElement * h1_matchingObjectAbsEta_Extended
MonitorElement * h1_ele_superclusterfbrem_barrel
MonitorElement * h2_ele_vertexTIPVsEta
MonitorElement * h1_ele_chargedHadronRelativeIso
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1
MonitorElement * h2_ele_PinMnPoutVsE_mode
MonitorElement * h2_ele_PinMnPoutVsPhi_mode
MonitorElement * h2_ele_dEtaEleClVsPt_propOut
d
Definition: ztail.py:151
MonitorElement * h1_ele_foundHits_barrel
MonitorElement * h2_ele_PoPmatchingObjectVsPt
MonitorElement * h1_ele_seed_dphi2pos_
void setBookEfficiencyFlag(const bool &)
MonitorElement * h1_ele_neutralHadronRelativeIso_barrel
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollection_
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollectionEndcaps_
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
MonitorElement * h2_ele_dEtaClVsEta_propOut
MonitorElement * h1_ele_mva_barrel_isolated
float superClusterFbrem() const
Definition: GsfElectron.h:803
MonitorElement * h1_ele_superclusterfbrem
MonitorElement * h1_scl_EoEmatchingObject_endcaps
Log< level::Info, false > LogInfo
MonitorElement * h2_ele_PinVsPoutGolden_mode
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_
MonitorElement * h1_ele_photonRelativeIso
MonitorElement * h2_ele_seed_dphi2VsPt_
float scE2x5Max() const
Definition: GsfElectron.h:498
MonitorElement * h2_ele_dEtaClVsPhi_propOut
MonitorElement * h2_ele_seed_drz2VsEta_
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
bool isEE() const
Definition: GsfElectron.h:329
MonitorElement * h1_ele_PoPmatchingObject_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_barrel
MonitorElement * h2_ele_outerPtVsEta_mode
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel
MonitorElement * h1_ele_seed_mask_fpix_
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps
MonitorElement * h2_ele_PinVsPoutGolden_mean
MonitorElement * h1_ele_EeleOPout_barrel
MonitorElement * h2_ele_EeleOPoutVsPhi
MonitorElement * h1_ele_dPhiSc_propVtx
MonitorElement * h1_scl_SigIEtaIEta_barrel_
MonitorElement * h1_ele_photonRelativeIso_barrel
MonitorElement * h1_ele_neutralHadronIso
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal03Tag_
MonitorElement * h2_ele_dPhiClVsPhi_propOut
MonitorElement * h2_ele_seed_dphi2posVsEta_
MonitorElement * h1_ele_EoPout_endcaps
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_full5x5_sigmaIetaIeta_Extended_
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsEta
fixed size matrix
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsPhi
MonitorElement * h1_ele_matchingObjectPhi_matched
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")
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_endcaps
MonitorElement * h1_scl_SigIEtaIEta_endcaps_
MonitorElement * h1_ele_EtaMnEtamatchingObject
float mva_Isolated() const
Definition: GsfElectron.h:743
MonitorElement * h1_ele_dPhiEleCl_propOut_endcaps
MonitorElement * h2_ele_dEtaScVsPhi_propVtx
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsPhi
MonitorElement * h1_ele_hcalDepth2OverEcalBc_barrel
MonitorElement * h1_ele_dPhiEleCl_propOut
float convRadius() const
Definition: GsfElectron.h:647
MonitorElement * h2_ele_foundHitsVsEta_Extended
MonitorElement * h1_ele_EseedOP_barrel
MonitorElement * h1_scl_ESFrac_endcaps
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:559
MonitorElement * h1_ele_dEtaEleCl_propOut
MonitorElement * h2_ele_seed_drz2posVsPt_
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps
MonitorElement * h1_ele_hcalPFClusterIso_endcaps
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:226
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalFull04Tag_
MonitorElement * h1_ele_dPhiSc_propVtx_endcaps
MonitorElement * h1_scl_EoEmatchingObjectShowering_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_endcaps
MonitorElement * h2_ele_seed_dphi2VsEta_
MonitorElement * h2_ele_dPhiClVsEta_propOut
MonitorElement * h1_ele_hcalPFClusterIso
MonitorElement * h1_ele_dEtaCl_propOut_barrel
MonitorElement * h1_ele_hcalPFClusterIso_Extended
float scE5x5() const
Definition: GsfElectron.h:499
MonitorElement * h2_ele_dPhiScVsPt_propVtx
MonitorElement * h1_ele_dPhiSc_propVtx_barrel
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:471
float dr03HcalTowerSumEt(int depth=0) const
Definition: GsfElectron.h:576
MonitorElement * h1_ele_hcalDepth2OverEcalBc_endcaps
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_dPhiCl_propOut_barrel
MonitorElement * h1_ele_chargedHadronIso
MonitorElement * h1_ele_matchingObjectZ_matched
MonitorElement * h2_ele_PtinVsPtoutGolden_mean
MonitorElement * h1_ele_dPhiEleCl_propOut_barrel
edm::EDGetTokenT< reco::GsfElectronCoreCollection > electronCoreCollection_
MonitorElement * h1_ele_matchingObjectAbsEta_Extended_matched
MonitorElement * h1_ele_neutralHadronRelativeIso
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel
edm::EDGetTokenT< reco::GsfElectronCoreCollection > electronCoreCollectionEndcaps_
MonitorElement * h1_ele_provenance_barrel
float hadronicOverEm() const
Definition: GsfElectron.h:500
MonitorElement * h1_ele_PinMnPout_mode
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
MonitorElement * h1_ele_dPhiSc_propVtx_Extended
MonitorElement * h2_ele_outerPVsEta_mode
Definition: Run.h:45
MonitorElement * h1_ele_PoPmatchingObject_barrel
int charge() const final
electric charge
MonitorElement * h1_ele_matchingObjectEta_Extended_matched
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_barrel_
MonitorElement * h2_ele_dPhiEleClVsEta_propOut
MonitorElement * h1_ele_ambiguousTracks
double eta() const final
momentum pseudorapidity
MonitorElement * h1_ele_EeleOPout_endcaps
MonitorElement * h1_ele_chargedHadronRelativeIso_endcaps