CMS 3D CMS Logo

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