CMS 3D CMS Logo

ElectronMcFakeValidator.cc
Go to the documentation of this file.
1 
2 // user include files
4 
6 
8 
19 
22 
25 
31 
32 #include "CLHEP/Units/GlobalPhysicalConstants.h"
33 #include "TMath.h"
34 #include "TFile.h"
35 #include "TH1F.h"
36 #include "TH1I.h"
37 #include "TH2F.h"
38 #include "TProfile.h"
39 #include "TTree.h"
40 #include <vector>
41 #include <iostream>
42 
43 using namespace reco;
44 
47  {
48  electronCollection_ = consumes<reco::GsfElectronCollection>(conf.getParameter<edm::InputTag>("electronCollection"));
49  electronCoreCollection_ = consumes<reco::GsfElectronCoreCollection>(conf.getParameter<edm::InputTag>("electronCoreCollection"));
50  electronTrackCollection_ = consumes<reco::GsfTrackCollection>(conf.getParameter<edm::InputTag>("electronTrackCollection"));
51  electronSeedCollection_ = consumes<reco::ElectronSeedCollection>(conf.getParameter<edm::InputTag>("electronSeedCollection"));
52  matchingObjectCollection_ = consumes<reco::GenJetCollection>(conf.getParameter<edm::InputTag>("matchingObjectCollection"));
53  /* new 03/02/2015 */
54  offlineVerticesCollection_ = consumes<reco::VertexCollection> (conf.getParameter<edm::InputTag>("offlinePrimaryVertices"));
55  /* fin new */
56 
57  beamSpotTag_ = consumes<reco::BeamSpot>(conf.getParameter<edm::InputTag>("beamSpot"));
58  readAOD_ = conf.getParameter<bool>("readAOD");
59 
60  isoFromDepsTk03Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsTk03" )) ;
61  isoFromDepsTk04Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsTk04" )) ;
62  isoFromDepsEcalFull03Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsEcalFull03" )) ;
63  isoFromDepsEcalFull04Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsEcalFull04" ));
64  isoFromDepsEcalReduced03Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsEcalReduced03" )) ;
65  isoFromDepsEcalReduced04Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsEcalReduced04" )) ;
66  isoFromDepsHcal03Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsHcal03" )) ;
67  isoFromDepsHcal04Tag_ = consumes<edm::ValueMap<double>>(conf.getParameter<edm::InputTag>( "isoFromDepsHcal04" )) ;
68 
69  maxPt_ = conf.getParameter<double>("MaxPt");
70  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
71  deltaR_ = conf.getParameter<double>("DeltaR");
72  inputFile_ = conf.getParameter<std::string>("InputFile") ;
73  outputFile_ = conf.getParameter<std::string>("OutputFile") ;
74  inputInternalPath_ = conf.getParameter<std::string>("InputFolderName") ;
75  outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName") ;
76 
77  // histos bining and limits
78 
79  edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg") ;
80 
81  xyz_nbin=histosSet.getParameter<int>("Nbinxyz");
82 
83  p_nbin=histosSet.getParameter<int>("Nbinp");
84  p2D_nbin=histosSet.getParameter<int>("Nbinp2D");
85  p_max=histosSet.getParameter<double>("Pmax");
86 
87  pt_nbin=histosSet.getParameter<int>("Nbinpt");
88  pt2D_nbin=histosSet.getParameter<int>("Nbinpt2D");
89  pteff_nbin=histosSet.getParameter<int>("Nbinpteff");
90  pt_max=histosSet.getParameter<double>("Ptmax");
91 
92  fhits_nbin=histosSet.getParameter<int>("Nbinfhits");
93  fhits_max=histosSet.getParameter<double>("Fhitsmax");
94 
95  lhits_nbin=histosSet.getParameter<int>("Nbinlhits");
96  lhits_max=histosSet.getParameter<double>("Lhitsmax");
97 
98  eop_nbin=histosSet.getParameter<int>("Nbineop");
99  eop2D_nbin=histosSet.getParameter<int>("Nbineop2D");
100  eop_max=histosSet.getParameter<double>("Eopmax");
101  eopmaxsht=histosSet.getParameter<double>("Eopmaxsht");
102 
103  eta_nbin=histosSet.getParameter<int>("Nbineta");
104  eta2D_nbin=histosSet.getParameter<int>("Nbineta2D");
105  eta_min=histosSet.getParameter<double>("Etamin");
106  eta_max=histosSet.getParameter<double>("Etamax");
107 
108  deta_nbin=histosSet.getParameter<int>("Nbindeta");
109  deta_min=histosSet.getParameter<double>("Detamin");
110  deta_max=histosSet.getParameter<double>("Detamax");
111 
112  detamatch_nbin=histosSet.getParameter<int>("Nbindetamatch");
113  detamatch2D_nbin=histosSet.getParameter<int>("Nbindetamatch2D");
114  detamatch_min=histosSet.getParameter<double>("Detamatchmin");
115  detamatch_max=histosSet.getParameter<double>("Detamatchmax");
116 
117  phi_nbin=histosSet.getParameter<int>("Nbinphi");
118  phi2D_nbin=histosSet.getParameter<int>("Nbinphi2D");
119  phi_min=histosSet.getParameter<double>("Phimin");
120  phi_max=histosSet.getParameter<double>("Phimax");
121 
122  dphi_nbin=histosSet.getParameter<int>("Nbindphi");
123  dphi_min=histosSet.getParameter<double>("Dphimin");
124  dphi_max=histosSet.getParameter<double>("Dphimax");
125 
126  dphimatch_nbin=histosSet.getParameter<int>("Nbindphimatch");
127  dphimatch2D_nbin=histosSet.getParameter<int>("Nbindphimatch2D");
128  dphimatch_min=histosSet.getParameter<double>("Dphimatchmin");
129  dphimatch_max=histosSet.getParameter<double>("Dphimatchmax");
130 
131  mee_nbin= histosSet.getParameter<int>("Nbinmee");
132  mee_min=histosSet.getParameter<double>("Meemin");
133  mee_max=histosSet.getParameter<double>("Meemax");
134 
135  hoe_nbin= histosSet.getParameter<int>("Nbinhoe");
136  hoe_min=histosSet.getParameter<double>("Hoemin");
137  hoe_max=histosSet.getParameter<double>("Hoemax");
138 
139  popmatching_nbin= histosSet.getParameter<int>("Nbinpopmatching");
140  popmatching_min=histosSet.getParameter<double>("Popmatchingmin");
141  popmatching_max=histosSet.getParameter<double>("Popmatchingmax");
142 
143  set_EfficiencyFlag=histosSet.getParameter<bool>("EfficiencyFlag");
144  set_StatOverflowFlag=histosSet.getParameter<bool>("StatOverflowFlag");
145 
146  // so to please coverity
152  h1_recOfflineVertices_ = nullptr ; // new 2015.04.02
153 
160 
175 
178 
184 
204 
211 
221 
222  h1_scl_En_ = nullptr ;
225  h1_scl_Et_ = nullptr ;
229  h1_scl_Eta_ = nullptr ;
230  h1_scl_Phi_ = nullptr ;
231 
235  h1_scl_full5x5_sigmaIetaIeta_ = nullptr ; // new 2014.01.12
236  h1_scl_full5x5_sigmaIetaIeta_barrel_ = nullptr ; // new 2014.01.12
237  h1_scl_full5x5_sigmaIetaIeta_endcaps_ = nullptr ; // new 2014.01.12
247 
264  h1_ele_chi2 = nullptr ;
270 
278 
287  h1_ele_EoP = nullptr ;
311 
348 
366 
368  h1_ele_eta = nullptr ;
373 
374  h1_ele_HoE = nullptr ;
381 // h1_scl_ESFrac = 0 ;
383 
402 
403  h1_ele_mva = nullptr ;
404  h1_ele_mva_isolated = nullptr;
406 
427 
436 
437  }
438 
440  {
442 
443  setBookIndex(-1) ;
444  setBookPrefix("h") ;
447 
448  // matching object type
449  std::string matchingObjectType ;
450  // Emilia
451  matchingObjectType = "GenJet" ;
452 
453  std::string htitle = "# "+matchingObjectType+"s", xtitle = "N_{"+matchingObjectType+"}" ;
454  h1_matchingObjectNum = bookH1withSumw2(iBooker, "matchingObjectNum",htitle,fhits_nbin,0.,fhits_max,xtitle) ;
455 
456  // rec event collections sizes
457  h1_recEleNum_= bookH1(iBooker, "recEleNum","# rec electrons",11, -0.5,10.5,"N_{ele}");
458  h1_recCoreNum_= bookH1(iBooker, "recCoreNum","# rec electron cores",21, -0.5,20.5,"N_{core}");
459  h1_recTrackNum_= bookH1(iBooker, "recTrackNum","# rec gsf tracks",41, -0.5,40.5,"N_{track}");
460  h1_recSeedNum_= bookH1(iBooker, "recSeedNum","# rec electron seeds",101, -0.5,100.5,"N_{seed}");
461  h1_recOfflineVertices_ = bookH1(iBooker, "recOfflineVertices","# rec Offline Primary Vertices",61, -0.5,60.5,"N_{Vertices}"); // new 2015.04.02
462 
463  // mc
464  h1_matchingObjectEta = bookH1withSumw2(iBooker, "matchingObject_eta",matchingObjectType+" #eta",eta_nbin,eta_min,eta_max,"#eta");
465  h1_matchingObjectAbsEta = bookH1withSumw2(iBooker, "matchingObject_abseta",matchingObjectType+" |#eta|",eta_nbin/2,0.,eta_max);
466  h1_matchingObjectP = bookH1withSumw2(iBooker, "matchingObject_P",matchingObjectType+" p",p_nbin,0.,p_max,"p (GeV/c)");
467  h1_matchingObjectPt = bookH1withSumw2(iBooker, "matchingObject_Pt",matchingObjectType+" pt",pteff_nbin,5.,pt_max);
468  h1_matchingObjectPhi = bookH1withSumw2(iBooker, "matchingObject_phi",matchingObjectType+" phi",phi_nbin,phi_min,phi_max);
469  h1_matchingObjectZ = bookH1withSumw2(iBooker, "matchingObject_z",matchingObjectType+" z",xyz_nbin, -25, 25 );
470 
471  setBookPrefix("h_ele") ;
472 
473  // all electrons
474  h1_ele_EoverP_all = bookH1withSumw2(iBooker, "EoverP_all","ele E/P_{vertex}, all reco electrons",eop_nbin,0.,eop_max,"E/P_{vertex}","Events","ELE_LOGY E1 P");
475  h1_ele_EseedOP_all = bookH1withSumw2(iBooker, "EseedOP_all","ele E_{seed}/P_{vertex}, all reco electrons",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}","Events","ELE_LOGY E1 P");
476  h1_ele_EoPout_all = bookH1withSumw2(iBooker, "EoPout_all","ele E_{seed}/P_{out}, all reco electrons",eop_nbin,0.,eop_max,"E_{seed}/P_{out}","Events","ELE_LOGY E1 P");
477  h1_ele_EeleOPout_all = bookH1withSumw2(iBooker, "EeleOPout_all","ele E_{ele}/P_{out}, all reco electrons",eop_nbin,0.,eop_max,"E_{ele}/P_{out}","Events","ELE_LOGY E1 P");
478  h1_ele_dEtaSc_propVtx_all = bookH1withSumw2(iBooker, "dEtaSc_propVtx_all","ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P");
479  h1_ele_dPhiSc_propVtx_all = bookH1withSumw2(iBooker, "dPhiSc_propVtx_all","ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
480  h1_ele_dEtaCl_propOut_all = bookH1withSumw2(iBooker, "dEtaCl_propOut_all","ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P");
481  h1_ele_dPhiCl_propOut_all = bookH1withSumw2(iBooker, "dPhiCl_propOut_all","ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
482  h1_ele_TIP_all = bookH1withSumw2(iBooker, "TIP_all","ele vertex transverse radius, all reco electrons", 100,0.,0.2,"r_{T} (cm)","Events","ELE_LOGY E1 P");
483  h1_ele_HoE_all = bookH1withSumw2(iBooker, "HoE_all","ele hadronic energy / em energy, all reco electrons",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
484  h1_ele_HoE_bc_all = bookH1withSumw2(iBooker, "HoE_bc_all","ele hadronic energy / em energy, all reco electrons, behind cluster",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
485  h1_ele_vertexEta_all = bookH1withSumw2(iBooker, "vertexEta_all","ele eta, all reco electrons",eta_nbin,eta_min,eta_max,"","Events","ELE_LOGY E1 P");
486  h1_ele_vertexPt_all = bookH1withSumw2(iBooker, "vertexPt_all","ele p_{T}, all reco electrons",pteff_nbin,5.,pt_max,"","Events","ELE_LOGY E1 P");
487  h1_ele_mee_all = bookH1withSumw2(iBooker, "mee_all","ele pairs invariant mass, all reco electrons",mee_nbin, mee_min, mee_max,"m_{ee} (GeV/c^{2})" );
488  h1_ele_mee_os = bookH1withSumw2(iBooker, "mee_os","ele pairs invariant mass, opp. sign",mee_nbin, mee_min, mee_max,"m_{e^{+}e^{-}} (GeV/c^{2})" );
489 
490  // duplicates
491  h2_ele_E2mnE1vsMee_all = bookH2(iBooker, "E2mnE1vsMee_all","E2 - E1 vs ele pairs invariant mass, all electrons",mee_nbin, mee_min, mee_max, 100, -50., 50.,"m_{e^{+}e^{-}} (GeV/c^{2})","E2 - E1 (GeV)");
492  h2_ele_E2mnE1vsMee_egeg_all = bookH2(iBooker, "E2mnE1vsMee_egeg_all","E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",mee_nbin, mee_min, mee_max, 100, -50., 50.,"m_{e^{+}e^{-}} (GeV/c^{2})","E2 - E1 (GeV)");
493 
494  // matched electrons
495 
496  htitle = "Efficiency vs matching "+matchingObjectType+" " ;
497  h1_ele_matchingObjectEta_matched = bookH1withSumw2(iBooker, "matchingObjectEta_matched",htitle+"#eta",eta_nbin,eta_min,eta_max);
498  h1_ele_matchingObjectAbsEta_matched = bookH1withSumw2(iBooker, "matchingObjectAbsEta_matched",htitle+"|#eta|",eta_nbin/2,0.,eta_max);
499  h1_ele_matchingObjectPt_matched = bookH1(iBooker, "matchingObjectPt_matched",htitle+"p_{T}",pteff_nbin,5.,pt_max);
500  h1_ele_matchingObjectPhi_matched = bookH1withSumw2(iBooker, "matchingObjectPhi_matched",htitle+"phi",phi_nbin,phi_min,phi_max);
501  h1_ele_matchingObjectZ_matched = bookH1withSumw2(iBooker, "matchingObjectZ_matched",htitle+"z",xyz_nbin,-25,25);
502 
503  h1_ele_charge = bookH1withSumw2(iBooker, "charge","ele charge",5,-2.5,2.5,"charge");
504  h2_ele_chargeVsEta = bookH2(iBooker, "chargeVsEta","ele charge vs eta",eta2D_nbin,eta_min,eta_max,5,-2.,2.);
505  h2_ele_chargeVsPhi = bookH2(iBooker, "chargeVsPhi","ele charge vs phi",phi2D_nbin,phi_min,phi_max,5,-2.,2.);
506  h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt","ele charge vs pt",pt_nbin,0.,100.,5,-2.,2.);
507  h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP","ele momentum",p_nbin,0.,p_max,"p_{vertex} (GeV/c)");
508  h1_ele_vertexPt = bookH1withSumw2(iBooker, "vertexPt","ele transverse momentum",pt_nbin,0.,pt_max,"p_{T vertex} (GeV/c)");
509  h2_ele_vertexPtVsEta = bookH2(iBooker, "vertexPtVsEta","ele transverse momentum vs eta",eta2D_nbin,eta_min,eta_max,pt2D_nbin,0.,pt_max);
510  h2_ele_vertexPtVsPhi = bookH2(iBooker, "vertexPtVsPhi","ele transverse momentum vs phi",phi2D_nbin,phi_min,phi_max,pt2D_nbin,0.,pt_max);
511  h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta","ele momentum eta",eta_nbin,eta_min,eta_max,"#eta");
512  h2_ele_vertexEtaVsPhi = bookH2(iBooker, "vertexEtaVsPhi","ele momentum eta vs phi",eta2D_nbin,eta_min,eta_max,phi2D_nbin,phi_min,phi_max );
513  h1_ele_vertexPhi = bookH1withSumw2(iBooker, "vertexPhi","ele momentum #phi",phi_nbin,phi_min,phi_max,"#phi (rad)");
514  h1_ele_vertexX = bookH1withSumw2(iBooker, "vertexX","ele vertex x",xyz_nbin,-0.6,0.6,"x (cm)" );
515  h1_ele_vertexY = bookH1withSumw2(iBooker, "vertexY","ele vertex y",xyz_nbin,-0.6,0.6,"y (cm)" );
516  h1_ele_vertexZ = bookH1withSumw2(iBooker, "vertexZ","ele vertex z",xyz_nbin,-25, 25,"z (cm)" );
517  h1_ele_vertexTIP = bookH1withSumw2(iBooker, "vertexTIP","ele transverse impact parameter (wrt gen vtx)",90,0.,0.15,"TIP (cm)","Events","ELE_LOGY E1 P");
518  h2_ele_vertexTIPVsEta = bookH2(iBooker, "vertexTIPVsEta","ele transverse impact parameter (wrt gen vtx) vs eta",eta2D_nbin,eta_min,eta_max,45,0.,0.15,"#eta","TIP (cm)");
519  h2_ele_vertexTIPVsPhi = bookH2(iBooker, "vertexTIPVsPhi","ele transverse impact parameter (wrt gen vtx) vs phi",phi2D_nbin,phi_min,phi_max,45,0.,0.15,"#phi (rad)","TIP (cm)");
520  h2_ele_vertexTIPVsPt = bookH2(iBooker, "vertexTIPVsPt","ele transverse impact parameter (wrt gen vtx) vs transverse momentum",pt2D_nbin,0.,pt_max,45,0.,0.15,"p_{T} (GeV/c)","TIP (cm)");
521 
522  htitle = "Electron / Matching "+matchingObjectType+", momemtum" ;
523  xtitle = "P / P_{"+matchingObjectType+"}" ;
524  h1_ele_PoPmatchingObject = bookH1withSumw2(iBooker, "PoPmatchingObject",htitle,popmatching_nbin,popmatching_min,popmatching_max,xtitle);
525  h2_ele_PoPmatchingObjectVsEta = bookH2(iBooker, "PoPmatchingObjectVsEta",htitle+",vs eta",eta2D_nbin,eta_min,eta_max,50,popmatching_min,popmatching_max);
526  h2_ele_PoPmatchingObjectVsPhi = bookH2(iBooker, "PoPmatchingObjectVsPhi",htitle+",vs phi",phi2D_nbin,phi_min,phi_max,50,popmatching_min,popmatching_max);
527  h2_ele_PoPmatchingObjectVsPt = bookH2(iBooker, "PoPmatchingObjectVsPt",htitle+",vs eta",pt2D_nbin,0.,pt_max,50,popmatching_min,popmatching_max);
528  h1_ele_PoPmatchingObject_barrel = bookH1withSumw2(iBooker, "PoPmatchingObject_barrel",htitle+", barrel",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
529  h1_ele_PoPmatchingObject_endcaps = bookH1withSumw2(iBooker, "PoPmatchingObject_endcaps",htitle+", endcaps",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
530  htitle = "Ele - "+matchingObjectType+", " ;
531  xtitle = "#eta - #eta_{"+matchingObjectType+"}" ;
532  h1_ele_EtaMnEtamatchingObject = bookH1withSumw2(iBooker, "EtamatchingObjectEtaTrue",htitle+"eta",deta_nbin,deta_min,deta_max,xtitle);
533  h2_ele_EtaMnEtamatchingObjectVsEta = bookH2(iBooker, "EtaMnEtamatchingObjectVsEta",htitle+"eta, vs eta",eta2D_nbin,eta_min,eta_max,deta_nbin/2,deta_min,deta_max);
534  h2_ele_EtaMnEtamatchingObjectVsPhi = bookH2(iBooker, "EtaMnEtamatchingObjectVsPhi",htitle+"eta, vs phi",phi2D_nbin,phi_min,phi_max,deta_nbin/2,deta_min,deta_max);
535  h2_ele_EtaMnEtamatchingObjectVsPt = bookH2(iBooker, "EtaMnEtamatchingObjectVsPt",htitle+"eta,, vs pt",pt_nbin,0.,pt_max,deta_nbin/2,deta_min,deta_max);
536  xtitle = "#phi - #phi_{"+matchingObjectType+"} (rad)" ;
537  h1_ele_PhiMnPhimatchingObject = bookH1withSumw2(iBooker, "PhiMnPhimatchingObject",htitle+"phi",dphi_nbin,dphi_min,dphi_max,xtitle);
538  h1_ele_PhiMnPhimatchingObject2 = bookH1(iBooker, "PhiMnPhimatchingObject2",htitle+"phi",dphimatch2D_nbin,dphimatch_min,dphimatch_max);
539  h2_ele_PhiMnPhimatchingObjectVsEta = bookH2(iBooker, "PhiMnPhimatchingObjectVsEta",htitle+"phi, vs eta",eta2D_nbin,eta_min,eta_max,dphi_nbin/2,dphi_min,dphi_max);
540  h2_ele_PhiMnPhimatchingObjectVsPhi = bookH2(iBooker, "PhiMnPhimatchingObjectVsPhi",htitle+"phi, vs phi",phi2D_nbin,phi_min,phi_max,dphi_nbin/2,dphi_min,dphi_max);
541  h2_ele_PhiMnPhimatchingObjectVsPt = bookH2(iBooker, "PhiMnPhimatchingObjectVsPt",htitle+"phi, vs pt",pt2D_nbin,0.,pt_max,dphi_nbin/2,dphi_min,dphi_max);
542 
543  // matched electron, superclusters
544 
545  setBookPrefix("h_scl") ;
546 
547  h1_scl_En_ = bookH1withSumw2(iBooker, "energy","ele supercluster energy",p_nbin,0.,p_max);
548  htitle = "Ele supercluster / "+matchingObjectType+", energy" ;
549  xtitle = "E/E_{"+matchingObjectType+"}" ;
550  h1_scl_EoEmatchingObject_barrel = bookH1withSumw2(iBooker, "EoEmatchingObject_barrel",htitle+", barrel",50,0.2,1.2,xtitle);
551  h1_scl_EoEmatchingObject_endcaps = bookH1withSumw2(iBooker, "EoEmatchingObject_endcaps",htitle+", endcaps",50,0.2,1.2,xtitle);
552  h1_scl_Et_ = bookH1withSumw2(iBooker, "et","ele supercluster transverse energy",pt_nbin,0.,pt_max);
553  h2_scl_EtVsEta_ = bookH2(iBooker, "etVsEta","ele supercluster transverse energy vs eta",eta2D_nbin,eta_min,eta_max,pt_nbin,0.,pt_max);
554  h2_scl_EtVsPhi_ = bookH2(iBooker, "etVsPhi","ele supercluster transverse energy vs phi",phi2D_nbin,phi_min,phi_max,pt_nbin,0.,pt_max);
555  h2_scl_EtaVsPhi_ = bookH2(iBooker, "etaVsPhi","ele supercluster eta vs phi",phi2D_nbin,phi_min,phi_max,eta2D_nbin,eta_min,eta_max);
556  h1_scl_Eta_ = bookH1withSumw2(iBooker, "eta","ele supercluster eta",eta_nbin,eta_min,eta_max);
557  h1_scl_Phi_ = bookH1withSumw2(iBooker, "phi","ele supercluster phi",phi_nbin,phi_min,phi_max);
558  h1_scl_SigIEtaIEta_ = bookH1withSumw2(iBooker, "sigietaieta","ele supercluster sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P");
559  h1_scl_SigIEtaIEta_barrel_ = bookH1withSumw2(iBooker, "sigietaieta_barrel","ele supercluster sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P");
560  h1_scl_SigIEtaIEta_endcaps_ = bookH1withSumw2(iBooker, "sigietaieta_endcaps","ele supercluster sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P");
561 // new 2014.01.12
562  h1_scl_full5x5_sigmaIetaIeta_ = bookH1withSumw2(iBooker, "full5x5_sigietaieta","ele supercluster full5x5 sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P");
563  h1_scl_full5x5_sigmaIetaIeta_barrel_ = bookH1withSumw2(iBooker, "full5x5_sigietaieta_barrel","ele supercluster full5x5 sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P");
564  h1_scl_full5x5_sigmaIetaIeta_endcaps_ = bookH1withSumw2(iBooker, "full5x5_sigietaieta_endcaps","ele supercluster full5x5 sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P");
565 // new 2014.01.12
566  h1_scl_E1x5_ = bookH1withSumw2(iBooker, "E1x5","ele supercluster energy in 1x5",p_nbin,0., p_max,"E1x5 (GeV)","Events","ELE_LOGY E1 P");
567  h1_scl_E1x5_barrel_ = bookH1withSumw2(iBooker, "E1x5_barrel","ele supercluster energy in 1x5 barrel",p_nbin,0., p_max,"E1x5 (GeV)","Events","ELE_LOGY E1 P");
568  h1_scl_E1x5_endcaps_ = bookH1withSumw2(iBooker, "E1x5_endcaps","ele supercluster energy in 1x5 endcaps",p_nbin,0., p_max,"E1x5 (GeV)","Events","ELE_LOGY E1 P");
569  h1_scl_E2x5max_ = bookH1withSumw2(iBooker, "E2x5max","ele supercluster energy in 2x5 max",p_nbin,0.,p_max,"E2x5 (GeV)","Events","ELE_LOGY E1 P");
570  h1_scl_E2x5max_barrel_ = bookH1withSumw2(iBooker, "E2x5max_barrel","ele supercluster energy in 2x5 _max barrel",p_nbin,0.,p_max,"E2x5 (GeV)","Events","ELE_LOGY E1 P");
571  h1_scl_E2x5max_endcaps_ = bookH1withSumw2(iBooker, "E2x5max_endcaps","ele supercluster energy in 2x5 _max endcaps",p_nbin,0.,p_max,"E2x5 (GeV)","Events","ELE_LOGY E1 P");
572  h1_scl_E5x5_ = bookH1withSumw2(iBooker, "E5x5","ele supercluster energy in 5x5",p_nbin,0.,p_max,"E5x5 (GeV)","Events","ELE_LOGY E1 P");
573  h1_scl_E5x5_barrel_ = bookH1withSumw2(iBooker, "E5x5_barrel","ele supercluster energy in 5x5 barrel",p_nbin,0.,p_max,"E5x5 (GeV)","Events","ELE_LOGY E1 P");
574  h1_scl_E5x5_endcaps_ = bookH1withSumw2(iBooker, "E5x5_endcaps","ele supercluster energy in 5x5 endcaps",p_nbin,0.,p_max,"E5x5 (GeV)","Events","ELE_LOGY E1 P");
575 
576  // matched electron, gsf tracks
577 
578  setBookPrefix("h_ele") ;
579 
580  h1_ele_ambiguousTracks = bookH1withSumw2(iBooker, "ambiguousTracks","ele # ambiguous tracks", 5,0.,5.,"N_{ambiguous tracks}","Events","ELE_LOGY E1 P");
581  h2_ele_ambiguousTracksVsEta = bookH2(iBooker, "ambiguousTracksVsEta","ele # ambiguous tracks vs eta",eta2D_nbin,eta_min,eta_max,5,0.,5.);
582  h2_ele_ambiguousTracksVsPhi = bookH2(iBooker, "ambiguousTracksVsPhi","ele # ambiguous tracks vs phi",phi2D_nbin,phi_min,phi_max,5,0.,5.);
583  h2_ele_ambiguousTracksVsPt = bookH2(iBooker, "ambiguousTracksVsPt","ele # ambiguous tracks vs pt",pt2D_nbin,0.,pt_max,5,0.,5.);
584  h1_ele_foundHits = bookH1withSumw2(iBooker, "foundHits","ele track # found hits",fhits_nbin,0.,fhits_max,"N_{hits}");
585  h2_ele_foundHitsVsEta = bookH2(iBooker, "foundHitsVsEta","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max);
586  h2_ele_foundHitsVsPhi = bookH2(iBooker, "foundHitsVsPhi","ele track # found hits vs phi",phi2D_nbin,phi_min,phi_max,fhits_nbin,0.,fhits_max);
587  h2_ele_foundHitsVsPt = bookH2(iBooker, "foundHitsVsPt","ele track # found hits vs pt",pt2D_nbin,0.,pt_max,fhits_nbin,0.,fhits_max);
588  h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits","ele track # lost hits", 5,0.,5.,"N_{lost hits}");
589  h2_ele_lostHitsVsEta = bookH2(iBooker, "lostHitsVsEta","ele track # lost hits vs eta",eta2D_nbin,eta_min,eta_max,lhits_nbin,0.,lhits_max);
590  h2_ele_lostHitsVsPhi = bookH2(iBooker, "lostHitsVsPhi","ele track # lost hits vs eta",phi2D_nbin,phi_min,phi_max,lhits_nbin,0.,lhits_max);
591  h2_ele_lostHitsVsPt = bookH2(iBooker, "lostHitsVsPt","ele track # lost hits vs eta",pt2D_nbin,0.,pt_max,lhits_nbin,0.,lhits_max);
592  h1_ele_chi2 = bookH1withSumw2(iBooker, "chi2","ele track #chi^{2}",100,0.,15.,"#Chi^{2}","Events","ELE_LOGY E1 P");
593  h2_ele_chi2VsEta = bookH2(iBooker, "chi2VsEta","ele track #chi^{2} vs eta",eta2D_nbin,eta_min,eta_max,50,0.,15.);
594  h2_ele_chi2VsPhi = bookH2(iBooker, "chi2VsPhi","ele track #chi^{2} vs phi",phi2D_nbin,phi_min,phi_max,50,0.,15.);
595  h2_ele_chi2VsPt = bookH2(iBooker, "chi2VsPt","ele track #chi^{2} vs pt",pt2D_nbin,0.,pt_max,50,0.,15.);
596  h1_ele_PinMnPout = bookH1withSumw2(iBooker, "PinMnPout","ele track inner p - outer p, mean of GSF components" ,p_nbin,0.,200.,"P_{vertex} - P_{out} (GeV/c)");
597  h1_ele_PinMnPout_mode = bookH1withSumw2(iBooker, "PinMnPout_mode","ele track inner p - outer p, mode of GSF components" ,p_nbin,0.,100.,"P_{vertex} - P_{out}, mode of GSF components (GeV/c)");
598  h2_ele_PinMnPoutVsEta_mode = bookH2(iBooker, "PinMnPoutVsEta_mode","ele track inner p - outer p vs eta, mode of GSF components" ,eta2D_nbin, eta_min,eta_max,p2D_nbin,0.,100.);
599  h2_ele_PinMnPoutVsPhi_mode = bookH2(iBooker, "PinMnPoutVsPhi_mode","ele track inner p - outer p vs phi, mode of GSF components" ,phi2D_nbin, phi_min,phi_max,p2D_nbin,0.,100.);
600  h2_ele_PinMnPoutVsPt_mode = bookH2(iBooker, "PinMnPoutVsPt_mode","ele track inner p - outer p vs pt, mode of GSF components" ,pt2D_nbin, 0.,pt_max,p2D_nbin,0.,100.);
601  h2_ele_PinMnPoutVsE_mode = bookH2(iBooker, "PinMnPoutVsE_mode","ele track inner p - outer p vs E, mode of GSF components" ,p2D_nbin, 0.,200.,p2D_nbin,0.,100.);
602  h2_ele_PinMnPoutVsChi2_mode = bookH2(iBooker, "PinMnPoutVsChi2_mode","ele track inner p - outer p vs track chi2, mode of GSF components" ,50, 0.,20.,p2D_nbin,0.,100.);
603  h1_ele_outerP = bookH1withSumw2(iBooker, "outerP","ele track outer p, mean of GSF components",p_nbin,0.,p_max,"P_{out} (GeV/c)");
604  h1_ele_outerP_mode = bookH1withSumw2(iBooker, "outerP_mode","ele track outer p, mode of GSF components",p_nbin,0.,p_max,"P_{out} (GeV/c)");
605  h2_ele_outerPVsEta_mode = bookH2(iBooker, "outerPVsEta_mode","ele track outer p vs eta mode",eta2D_nbin,eta_min,eta_max,50,0.,p_max);
606  h1_ele_outerPt = bookH1withSumw2(iBooker, "outerPt","ele track outer p_{T}, mean of GSF components",pt_nbin,0.,pt_max,"P_{T out} (GeV/c)");
607  h1_ele_outerPt_mode = bookH1withSumw2(iBooker, "outerPt_mode","ele track outer p_{T}, mode of GSF components",pt_nbin,0.,pt_max,"P_{T out} (GeV/c)");
608  h2_ele_outerPtVsEta_mode = bookH2(iBooker, "outerPtVsEta_mode","ele track outer p_{T} vs eta, mode of GSF components",eta2D_nbin,eta_min,eta_max,pt2D_nbin,0.,pt_max);
609  h2_ele_outerPtVsPhi_mode = bookH2(iBooker, "outerPtVsPhi_mode","ele track outer p_{T} vs phi, mode of GSF components",phi2D_nbin,phi_min,phi_max,pt2D_nbin,0.,pt_max);
610  h2_ele_outerPtVsPt_mode = bookH2(iBooker, "outerPtVsPt_mode","ele track outer p_{T} vs pt, mode of GSF components",pt2D_nbin,0.,100.,pt2D_nbin,0.,pt_max);
611 
612  // matched electrons, matching
613  h1_ele_EoP = bookH1withSumw2(iBooker, "EoP","ele E/P_{vertex}",eop_nbin,0.,eop_max,"E/P_{vertex}","Events","ELE_LOGY E1 P");
614  h1_ele_EoP_barrel = bookH1withSumw2(iBooker, "EoP_barrel","ele E/P_{vertex} barrel",eop_nbin,0.,eop_max,"E/P_{vertex}","Events","ELE_LOGY E1 P");
615  h1_ele_EoP_endcaps = bookH1withSumw2(iBooker, "EoP_endcaps","ele E/P_{vertex} endcaps",eop_nbin,0.,eop_max,"E/P_{vertex}","Events","ELE_LOGY E1 P");
616  h2_ele_EoPVsEta = bookH2(iBooker, "EoPVsEta","ele E/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
617  h2_ele_EoPVsPhi = bookH2(iBooker, "EoPVsPhi","ele E/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
618  h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE","ele E/P_{vertex} vs E", 50,0.,p_max ,50,0.,5.);
619  h1_ele_EseedOP = bookH1withSumw2(iBooker, "EseedOP","ele E_{seed}/P_{vertex}",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}","Events","ELE_LOGY E1 P");
620  h1_ele_EseedOP_barrel = bookH1withSumw2(iBooker, "EseedOP_barrel","ele E_{seed}/P_{vertex} barrel",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}","Events","ELE_LOGY E1 P");
621  h1_ele_EseedOP_endcaps = bookH1withSumw2(iBooker, "EseedOP_endcaps","ele E_{seed}/P_{vertex} endcaps",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}","Events","ELE_LOGY E1 P");
622  h2_ele_EseedOPVsEta = bookH2(iBooker, "EseedOPVsEta","ele E_{seed}/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
623  h2_ele_EseedOPVsPhi = bookH2(iBooker, "EseedOPVsPhi","ele E_{seed}/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
624  h2_ele_EseedOPVsE = bookH2(iBooker, "EseedOPVsE","ele E_{seed}/P_{vertex} vs E", 50,0.,p_max ,50,0.,5.);
625  h1_ele_EoPout = bookH1withSumw2(iBooker, "EoPout","ele E_{seed}/P_{out}",eop_nbin,0.,eop_max,"E_{seed}/P_{out}","Events","ELE_LOGY E1 P");
626  h1_ele_EoPout_barrel = bookH1withSumw2(iBooker, "EoPout_barrel","ele E_{seed}/P_{out} barrel",eop_nbin,0.,eop_max,"E_{seed}/P_{out}","Events","ELE_LOGY E1 P");
627  h1_ele_EoPout_endcaps = bookH1withSumw2(iBooker, "EoPout_endcaps","ele E_{seed}/P_{out} endcaps",eop_nbin,0.,eop_max,"E_{seed}/P_{out}","Events","ELE_LOGY E1 P");
628  h2_ele_EoPoutVsEta = bookH2(iBooker, "EoPoutVsEta","ele E_{seed}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
629  h2_ele_EoPoutVsPhi = bookH2(iBooker, "EoPoutVsPhi","ele E_{seed}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
630  h2_ele_EoPoutVsE = bookH2(iBooker, "EoPoutVsE","ele E_{seed}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
631  h1_ele_EeleOPout = bookH1withSumw2(iBooker, "EeleOPout","ele E_{ele}/P_{out}",eop_nbin,0.,eop_max,"E_{ele}/P_{out}","Events","ELE_LOGY E1 P");
632  h1_ele_EeleOPout_barrel = bookH1withSumw2(iBooker, "EeleOPout_barrel","ele E_{ele}/P_{out} barrel",eop_nbin,0.,eop_max,"E_{ele}/P_{out}","Events","ELE_LOGY E1 P");
633  h1_ele_EeleOPout_endcaps = bookH1withSumw2(iBooker, "EeleOPout_endcaps","ele E_{ele}/P_{out} endcaps",eop_nbin,0.,eop_max,"E_{ele}/P_{out}","Events","ELE_LOGY E1 P");
634  h2_ele_EeleOPoutVsEta = bookH2(iBooker, "EeleOPoutVsEta","ele E_{ele}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
635  h2_ele_EeleOPoutVsPhi = bookH2(iBooker, "EeleOPoutVsPhi","ele E_{ele}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
636  h2_ele_EeleOPoutVsE = bookH2(iBooker, "EeleOPoutVsE","ele E_{ele}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
637  h1_ele_dEtaSc_propVtx = bookH1withSumw2(iBooker, "dEtaSc_propVtx","ele #eta_{sc} - #eta_{tr}, prop from vertex",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P");
638  h1_ele_dEtaSc_propVtx_barrel = bookH1withSumw2(iBooker, "dEtaSc_propVtx_barrel","ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P");
639  h1_ele_dEtaSc_propVtx_endcaps = bookH1withSumw2(iBooker, "dEtaSc_propVtx_endcaps","ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P");
640  h2_ele_dEtaScVsEta_propVtx = bookH2(iBooker, "dEtaScVsEta_propVtx","ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",eta2D_nbin,eta_min,eta_max,detamatch2D_nbin,detamatch_min,detamatch_max);
641  h2_ele_dEtaScVsPhi_propVtx = bookH2(iBooker, "dEtaScVsPhi_propVtx","ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",phi2D_nbin,phi_min,phi_max,detamatch2D_nbin,detamatch_min,detamatch_max);
642  h2_ele_dEtaScVsPt_propVtx = bookH2(iBooker, "dEtaScVsPt_propVtx","ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",pt2D_nbin,0.,pt_max,detamatch2D_nbin,detamatch_min,detamatch_max);
643  h1_ele_dPhiSc_propVtx = bookH1withSumw2(iBooker, "dPhiSc_propVtx","ele #phi_{sc} - #phi_{tr}, prop from vertex",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
644  h1_ele_dPhiSc_propVtx_barrel = bookH1withSumw2(iBooker, "dPhiSc_propVtx_barrel","ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
645  h1_ele_dPhiSc_propVtx_endcaps = bookH1withSumw2(iBooker, "dPhiSc_propVtx_endcaps","ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
646  h2_ele_dPhiScVsEta_propVtx = bookH2(iBooker, "dPhiScVsEta_propVtx","ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",eta2D_nbin,eta_min,eta_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
647  h2_ele_dPhiScVsPhi_propVtx = bookH2(iBooker, "dPhiScVsPhi_propVtx","ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",phi2D_nbin,phi_min,phi_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
648  h2_ele_dPhiScVsPt_propVtx = bookH2(iBooker, "dPhiScVsPt_propVtx","ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",pt2D_nbin,0.,pt_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
649  h1_ele_dEtaCl_propOut = bookH1withSumw2(iBooker, "dEtaCl_propOut","ele #eta_{cl} - #eta_{tr}, prop from outermost",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{seedcl} - #eta_{tr}","Events","ELE_LOGY E1 P");
650  h1_ele_dEtaCl_propOut_barrel = bookH1withSumw2(iBooker, "dEtaCl_propOut_barrel","ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{seedcl} - #eta_{tr}","Events","ELE_LOGY E1 P");
651  h1_ele_dEtaCl_propOut_endcaps = bookH1withSumw2(iBooker, "dEtaCl_propOut_endcaps","ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{seedcl} - #eta_{tr}","Events","ELE_LOGY E1 P");
652  h2_ele_dEtaClVsEta_propOut = bookH2(iBooker, "dEtaClVsEta_propOut","ele #eta_{cl} - #eta_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,detamatch2D_nbin,detamatch_min,detamatch_max);
653  h2_ele_dEtaClVsPhi_propOut = bookH2(iBooker, "dEtaClVsPhi_propOut","ele #eta_{cl} - #eta_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,detamatch2D_nbin,detamatch_min,detamatch_max);
654  h2_ele_dEtaClVsPt_propOut = bookH2(iBooker, "dEtaScVsPt_propOut","ele #eta_{cl} - #eta_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,detamatch2D_nbin,detamatch_min,detamatch_max);
655  h1_ele_dPhiCl_propOut = bookH1withSumw2(iBooker, "dPhiCl_propOut","ele #phi_{cl} - #phi_{tr}, prop from outermost",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
656  h1_ele_dPhiCl_propOut_barrel = bookH1withSumw2(iBooker, "dPhiCl_propOut_barrel","ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
657  h1_ele_dPhiCl_propOut_endcaps = bookH1withSumw2(iBooker, "dPhiCl_propOut_endcaps","ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
658  h2_ele_dPhiClVsEta_propOut = bookH2(iBooker, "dPhiClVsEta_propOut","ele #phi_{cl} - #phi_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
659  h2_ele_dPhiClVsPhi_propOut = bookH2(iBooker, "dPhiClVsPhi_propOut","ele #phi_{cl} - #phi_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
660  h2_ele_dPhiClVsPt_propOut = bookH2(iBooker, "dPhiSClsPt_propOut","ele #phi_{cl} - #phi_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
661  h1_ele_dEtaEleCl_propOut = bookH1withSumw2(iBooker, "dEtaEleCl_propOut","ele #eta_{EleCl} - #eta_{tr}, prop from outermost",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{elecl} - #eta_{tr}","Events","ELE_LOGY E1 P");
662  h1_ele_dEtaEleCl_propOut_barrel = bookH1withSumw2(iBooker, "dEtaEleCl_propOut_barrel","ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{elecl} - #eta_{tr}","Events","ELE_LOGY E1 P");
663  h1_ele_dEtaEleCl_propOut_endcaps = bookH1withSumw2(iBooker, "dEtaEleCl_propOut_endcaps","ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{elecl} - #eta_{tr}","Events","ELE_LOGY E1 P");
664  h2_ele_dEtaEleClVsEta_propOut = bookH2(iBooker, "dEtaEleClVsEta_propOut","ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,detamatch2D_nbin,detamatch_min,detamatch_max);
665  h2_ele_dEtaEleClVsPhi_propOut = bookH2(iBooker, "dEtaEleClVsPhi_propOut","ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,detamatch2D_nbin,detamatch_min,detamatch_max);
666  h2_ele_dEtaEleClVsPt_propOut = bookH2(iBooker, "dEtaScVsPt_propOut","ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,detamatch2D_nbin,detamatch_min,detamatch_max);
667  h1_ele_dPhiEleCl_propOut = bookH1withSumw2(iBooker, "dPhiEleCl_propOut","ele #phi_{EleCl} - #phi_{tr}, prop from outermost",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{elecl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
668  h1_ele_dPhiEleCl_propOut_barrel = bookH1withSumw2(iBooker, "dPhiEleCl_propOut_barrel","ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{elecl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
669  h1_ele_dPhiEleCl_propOut_endcaps = bookH1withSumw2(iBooker, "dPhiEleCl_propOut_endcaps","ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{elecl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P");
670  h2_ele_dPhiEleClVsEta_propOut = bookH2(iBooker, "dPhiEleClVsEta_propOut","ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
671  h2_ele_dPhiEleClVsPhi_propOut = bookH2(iBooker, "dPhiEleClVsPhi_propOut","ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
672  h2_ele_dPhiEleClVsPt_propOut = bookH2(iBooker, "dPhiSEleClsPt_propOut","ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
673  h1_ele_HoE = bookH1withSumw2(iBooker, "HoE","ele hadronic energy / em energy",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
674  h1_ele_HoE_barrel = bookH1withSumw2(iBooker, "HoE_barrel","ele hadronic energy / em energy, barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
675  h1_ele_HoE_endcaps = bookH1withSumw2(iBooker, "HoE_endcaps","ele hadronic energy / em energy, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
676  h1_ele_HoE_bc = bookH1withSumw2(iBooker, "HoE_bc","ele hadronic energy / em energy behind cluster",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
677  h1_ele_HoE_bc_barrel = bookH1withSumw2(iBooker, "HoE_bc_barrel","ele hadronic energy / em energy, behind cluster barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
678  h1_ele_HoE_bc_endcaps = bookH1withSumw2(iBooker, "HoE_bc_endcaps","ele hadronic energy / em energy, behind cluster, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
679  h1_ele_hcalDepth1OverEcalBc = bookH1withSumw2(iBooker, "hcalDepth1OverEcalBc","hcalDepth1OverEcalBc",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
680  h1_ele_hcalDepth1OverEcalBc_barrel = bookH1withSumw2(iBooker, "hcalDepth1OverEcalBc_barrel","hcalDepth1OverEcalBc_barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
681  h1_ele_hcalDepth1OverEcalBc_endcaps = bookH1withSumw2(iBooker, "hcalDepth1OverEcalBc_endcaps","hcalDepth1OverEcalBc_endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
682  h1_ele_hcalDepth2OverEcalBc = bookH1withSumw2(iBooker, "hcalDepth2OverEcalBc","hcalDepth2OverEcalBc",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
683  h1_ele_hcalDepth2OverEcalBc_barrel = bookH1withSumw2(iBooker, "hcalDepth2OverEcalBc_barrel","hcalDepth2OverEcalBc_barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
684  h1_ele_hcalDepth2OverEcalBc_endcaps = bookH1withSumw2(iBooker, "hcalDepth2OverEcalBc_endcaps","hcalDepth2OverEcalBc_endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
685  h1_ele_HoE_fiducial = bookH1withSumw2(iBooker, "HoE_fiducial","ele hadronic energy / em energy, fiducial region",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
686  h2_ele_HoEVsEta = bookH2(iBooker, "HoEVsEta","ele hadronic energy / em energy vs eta",eta_nbin,eta_min,eta_max,hoe_nbin, hoe_min, hoe_max) ;
687  h2_ele_HoEVsPhi = bookH2(iBooker, "HoEVsPhi","ele hadronic energy / em energy vs phi",phi2D_nbin,phi_min,phi_max,hoe_nbin, hoe_min, hoe_max) ;
688  h2_ele_HoEVsE = bookH2(iBooker, "HoEVsE","ele hadronic energy / em energy vs E",p_nbin, 0.,300.,hoe_nbin, hoe_min, hoe_max) ;
689  setBookPrefix("h_scl") ;
690 // h1_scl_ESFrac = bookH1withSumw2(iBooker, "ESFrac","Preshower over SC raw energy",100,0.,0.8,"E_{PS} / E^{raw}_{SC}","Events","ELE_LOGY E1 P");
691  h1_scl_ESFrac_endcaps = bookH1withSumw2(iBooker, "ESFrac_endcaps","Preshower over SC raw energy , endcaps",100,0.,0.8,"E_{PS} / E^{raw}_{SC}","Events","ELE_LOGY E1 P");
692 
693  // seeds
694  setBookPrefix("h_ele") ;
695  h1_ele_seed_subdet2_ = bookH1withSumw2(iBooker, "seedSubdet2","ele seed subdet 2nd layer",11,-0.5,10.5,"2nd hit subdet Id") ;
696  h1_ele_seed_mask_ = bookH1withSumw2(iBooker, "seedMask","ele seed hits mask",13,-0.5,12.5) ;
697  h1_ele_seed_mask_bpix_ = bookH1withSumw2(iBooker, "seedMask_Bpix","ele seed hits mask when subdet2 is bpix",13,-0.5,12.5) ;
698  h1_ele_seed_mask_fpix_ = bookH1withSumw2(iBooker, "seedMask_Fpix","ele seed hits mask when subdet2 is bpix",13,-0.5,12.5) ;
699  h1_ele_seed_mask_tec_ = bookH1withSumw2(iBooker, "seedMask_Tec","ele seed hits mask when subdet2 is bpix",13,-0.5,12.5) ;
700  h1_ele_seed_dphi2_ = bookH1withSumw2(iBooker, "seedDphi2","ele seed dphi 2nd layer", 50,-0.003,+0.003,"#phi_{hit}-#phi_{pred} (rad)") ;
701  h2_ele_seed_dphi2VsEta_ = bookH2(iBooker, "seedDphi2_VsEta","ele seed dphi 2nd layer vs eta",eta2D_nbin,eta_min,eta_max,50,-0.003,+0.003) ;
702  h2_ele_seed_dphi2VsPt_ = bookH2(iBooker, "seedDphi2_VsPt","ele seed dphi 2nd layer vs pt",pt2D_nbin,0.,pt_max,50,-0.003,+0.003) ;
703  h1_ele_seed_dphi2pos_ = bookH1withSumw2(iBooker, "seedDphi2Pos","ele seed dphi 2nd layer positron", 50,-0.003,+0.003,"#phi_{hit}-#phi_{pred} (rad)") ;
704  h2_ele_seed_dphi2posVsEta_ = bookH2(iBooker, "seedDphi2Pos_VsEta","ele seed dphi 2nd layer positron vs eta",eta2D_nbin,eta_min,eta_max,50,-0.003,+0.003) ;
705  h2_ele_seed_dphi2posVsPt_ = bookH2(iBooker, "seedDphi2Pos_VsPt","ele seed dphi 2nd layer positron vs pt",pt2D_nbin,0.,pt_max,50,-0.003,+0.003) ;
706  h1_ele_seed_drz2_ = bookH1withSumw2(iBooker, "seedDrz2","ele seed dr (dz) 2nd layer", 50,-0.03,+0.03,"r(z)_{hit}-r(z)_{pred} (cm)") ;
707  h2_ele_seed_drz2VsEta_ = bookH2(iBooker, "seedDrz2_VsEta","ele seed dr/dz 2nd layer vs eta",eta2D_nbin,eta_min,eta_max,50,-0.03,+0.03) ;
708  h2_ele_seed_drz2VsPt_ = bookH2(iBooker, "seedDrz2_VsPt","ele seed dr/dz 2nd layer vs pt",pt2D_nbin,0.,pt_max,50,-0.03,+0.03) ;
709  h1_ele_seed_drz2pos_ = bookH1withSumw2(iBooker, "seedDrz2Pos","ele seed dr (dz) 2nd layer positron", 50,-0.03,+0.03,"r(z)_{hit}-r(z)_{pred} (cm)") ;
710  h2_ele_seed_drz2posVsEta_ = bookH2(iBooker, "seedDrz2Pos_VsEta","ele seed dr/dz 2nd layer positron vs eta",eta2D_nbin,eta_min,eta_max,50,-0.03,+0.03) ;
711  h2_ele_seed_drz2posVsPt_ = bookH2(iBooker, "seedDrz2Pos_VsPt","ele seed dr/dz 2nd layer positron vs pt",pt2D_nbin,0.,pt_max,50,-0.03,+0.03) ;
712 
713  // classes
714  h1_ele_classes = bookH1withSumw2(iBooker, "classes","ele classes",20,0.0,20.,"class Id");
715  h1_ele_eta = bookH1withSumw2(iBooker, "eta","ele electron eta",eta_nbin/2,0.0,eta_max);
716  h1_ele_eta_golden = bookH1withSumw2(iBooker, "eta_golden","ele electron eta golden",eta_nbin/2,0.0,eta_max);
717  h1_ele_eta_bbrem = bookH1withSumw2(iBooker, "eta_bbrem","ele electron eta bbrem",eta_nbin/2,0.0,eta_max);
718  h1_ele_eta_shower = bookH1withSumw2(iBooker, "eta_shower","ele electron eta showering",eta_nbin/2,0.0,eta_max);
719  h2_ele_PinVsPoutGolden_mode = bookH2(iBooker, "PinVsPoutGolden_mode","ele track inner p vs outer p vs eta, golden, mode of GSF components" ,p2D_nbin,0.,p_max,50,0.,p_max);
720  h2_ele_PinVsPoutShowering_mode = bookH2(iBooker, "PinVsPoutShowering_mode","ele track inner p vs outer p vs eta, showering, mode of GSF components" ,p2D_nbin,0.,p_max,50,0.,p_max);
721  h2_ele_PinVsPoutGolden_mean = bookH2(iBooker, "PinVsPoutGolden_mean","ele track inner p vs outer p vs eta, golden, mean of GSF components" ,p2D_nbin,0.,p_max,50,0.,p_max);
722  h2_ele_PinVsPoutShowering_mean = bookH2(iBooker, "PinVsPoutShowering_mean","ele track inner p vs outer p vs eta, showering, mean of GSF components" ,p2D_nbin,0.,p_max,50,0.,p_max);
723  h2_ele_PtinVsPtoutGolden_mode = bookH2(iBooker, "PtinVsPtoutGolden_mode","ele track inner pt vs outer pt vs eta, golden, mode of GSF components" ,pt2D_nbin,0.,pt_max,50,0.,pt_max);
724  h2_ele_PtinVsPtoutShowering_mode = bookH2(iBooker, "PtinVsPtoutShowering_mode","ele track inner pt vs outer pt vs eta, showering, mode of GSF components" ,pt2D_nbin,0.,pt_max,50,0.,pt_max);
725  h2_ele_PtinVsPtoutGolden_mean = bookH2(iBooker, "PtinVsPtoutGolden_mean","ele track inner pt vs outer pt vs eta, golden, mean of GSF components" ,pt2D_nbin,0.,pt_max,50,0.,pt_max);
726  h2_ele_PtinVsPtoutShowering_mean = bookH2(iBooker, "PtinVsPtoutShowering_mean","ele track inner pt vs outer pt vs eta, showering, mean of GSF components" ,pt2D_nbin,0.,pt_max,50,0.,pt_max);
727  setBookPrefix("h_scl") ;
728  h1_scl_EoEmatchingObjectGolden_barrel = bookH1withSumw2(iBooker, "EoEmatchingObject_golden_barrel","ele supercluster energy / gen energy, golden, barrel",popmatching_nbin,popmatching_min,popmatching_max);
729  h1_scl_EoEmatchingObjectGolden_endcaps = bookH1withSumw2(iBooker, "EoEmatchingObject_golden_endcaps","ele supercluster energy / gen energy, golden, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
730  h1_scl_EoEmatchingObjectShowering_barrel = bookH1withSumw2(iBooker, "EoEmatchingObject_showering_barrel","ele supercluster energy / gen energy, showering, barrel",popmatching_nbin,popmatching_min,popmatching_max);
731  h1_scl_EoEmatchingObjectShowering_endcaps = bookH1withSumw2(iBooker, "EoEmatchingObject_showering_endcaps","ele supercluster energy / gen energy, showering, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
732  setBookPrefix("h_ele") ;
733 
734  // isolation
735  h1_ele_tkSumPt_dr03 = bookH1withSumw2(iBooker, "tkSumPt_dr03","tk isolation sum, dR=0.3",100,0.0,20.,"TkIsoSum, cone 0.3 (GeV/c)","Events","ELE_LOGY E1 P");
736  h1_ele_tkSumPt_dr03_barrel = bookH1withSumw2(iBooker, "tkSumPt_dr03_barrel","tk isolation sum, dR=0.3, barrel",100,0.0,20.,"TkIsoSum, cone 0.3 (GeV/c)","Events","ELE_LOGY E1 P");
737  h1_ele_tkSumPt_dr03_endcaps = bookH1withSumw2(iBooker, "tkSumPt_dr03_endcaps","tk isolation sum, dR=0.3, endcaps",100,0.0,20.,"TkIsoSum, cone 0.3 (GeV/c)","Events","ELE_LOGY E1 P");
738  h1_ele_ecalRecHitSumEt_dr03 = bookH1withSumw2(iBooker, "ecalRecHitSumEt_dr03","ecal isolation sum, dR=0.3",100,0.0,20.,"EcalIsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
739  h1_ele_ecalRecHitSumEt_dr03_barrel = bookH1withSumw2(iBooker, "ecalRecHitSumEt_dr03_barrel","ecal isolation sum, dR=0.3, barrel",100,0.0,20.,"EcalIsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
740  h1_ele_ecalRecHitSumEt_dr03_endcaps = bookH1withSumw2(iBooker, "ecalRecHitSumEt_dr03_endcaps","ecal isolation sum, dR=0.3, endcaps",100,0.0,20.,"EcalIsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
741  h1_ele_hcalTowerSumEt_dr03_depth1 = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr03_depth1","hcal depth1 isolation sum, dR=0.3",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
742  h1_ele_hcalTowerSumEt_dr03_depth1_barrel = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr03_depth1_barrel","hcal depth1 isolation sum, dR=0.3, barrel",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
743  h1_ele_hcalTowerSumEt_dr03_depth1_endcaps = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr03_depth1_endcaps","hcal depth1 isolation sum, dR=0.3, endcaps",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
744  h1_ele_hcalTowerSumEt_dr03_depth2 = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr03_depth2","hcal depth2 isolation sum, dR=0.3",100,0.0,20.,"Hcal2IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
745  h1_ele_tkSumPt_dr04 = bookH1withSumw2(iBooker, "tkSumPt_dr04","tk isolation sum, dR=0.4",100,0.0,20.,"TkIsoSum, cone 0.4 (GeV/c)","Events","ELE_LOGY E1 P");
746  h1_ele_tkSumPt_dr04_barrel = bookH1withSumw2(iBooker, "tkSumPt_dr04_barrel","tk isolation sum, dR=0.4, barrel",100,0.0,20.,"TkIsoSum, cone 0.4 (GeV/c)","Events","ELE_LOGY E1 P");
747  h1_ele_tkSumPt_dr04_endcaps = bookH1withSumw2(iBooker, "tkSumPt_dr04_endcaps","tk isolation sum, dR=0.4, endcaps",100,0.0,20.,"TkIsoSum, cone 0.4 (GeV/c)","Events","ELE_LOGY E1 P");
748  h1_ele_ecalRecHitSumEt_dr04 = bookH1withSumw2(iBooker, "ecalRecHitSumEt_dr04","ecal isolation sum, dR=0.4",100,0.0,20.,"EcalIsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
749  h1_ele_ecalRecHitSumEt_dr04_barrel = bookH1withSumw2(iBooker, "ecalRecHitSumEt_dr04_barrel","ecal isolation sum, dR=0.4, barrel",100,0.0,20.,"EcalIsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
750  h1_ele_ecalRecHitSumEt_dr04_endcaps = bookH1withSumw2(iBooker, "ecalRecHitSumEt_dr04_endcaps","ecal isolation sum, dR=0.4, endcaps",100,0.0,20.,"EcalIsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
751  h1_ele_hcalTowerSumEt_dr04_depth1 = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr04_depth1","hcal depth1 isolation sum, dR=0.4",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
752  h1_ele_hcalTowerSumEt_dr04_depth1_barrel = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr04_depth1_barrel","hcal depth1 isolation sum, dR=0.4, barrel",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
753  h1_ele_hcalTowerSumEt_dr04_depth1_endcaps = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr04_depth1_endcaps","hcal depth1 isolation sum, dR=0.4, endcaps",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
754  h1_ele_hcalTowerSumEt_dr04_depth2 = bookH1withSumw2(iBooker, "hcalTowerSumEt_dr04_depth2","hcal depth2 isolation sum, dR=0.4",100,0.0,20.,"Hcal2IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
755 
756  // newHCAL
757  // isolation new hcal
758  h1_ele_hcalTowerSumEtBc_dr03_depth1 = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth1","hcal depth1 isolation sum behind cluster, dR=0.3",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
759  h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth1_barrel","hcal depth1 isolation sum behind cluster, dR=0.3, barrel",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
760  h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth1_endcaps","hcal depth1 isolation sum behind cluster, dR=0.3, endcaps",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
761 
762  h1_ele_hcalTowerSumEtBc_dr04_depth1 = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr04_depth1","hcal depth1 isolation sum behind cluster, dR=0.4",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
763  h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr04_depth1_barrel","hcal depth1 isolation sum behind cluster, dR=0.4, barrel",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
764  h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr04_depth1_endcaps","hcal depth1 isolation sum behind cluster, dR=0.4, endcaps",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
765 
766  h1_ele_hcalTowerSumEtBc_dr03_depth2 = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth2","hcal depth2 isolation sum behind cluster, dR=0.3",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
767  h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth2_barrel","hcal depth2 isolation sum behind cluster, dR=0.3, barrel",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
768  h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth2_endcaps","hcal depth2 isolation sum behind cluster, dR=0.3, endcaps",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)","Events","ELE_LOGY E1 P");
769 
770  h1_ele_hcalTowerSumEtBc_dr04_depth2 = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr04_depth2","hcal depth2 isolation sum behind cluster, dR=0.4",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
771  h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr04_depth2_barrel","hcal depth2 isolation sum behind cluster, dR=0.4, barrel",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
772  h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr04_depth2_endcaps","hcal depth2 isolation sum behind cluster, dR=0.4, endcaps",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)","Events","ELE_LOGY E1 P");
773 
774  // fbrem
775  h1_ele_fbrem = bookH1withSumw2(iBooker, "fbrem","ele brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}");
776  h1_ele_fbrem_barrel = bookH1withSumw2(iBooker, "fbrem_barrel","ele brem fraction for barrel, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}");
777  h1_ele_fbrem_endcaps = bookH1withSumw2(iBooker, "fbrem_endcaps", "ele brem franction for endcaps, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}");
778  p1_ele_fbremVsEta_mode = bookP1(iBooker, "fbremvsEtamode","mean ele brem fraction vs eta, mode of GSF components",eta2D_nbin,eta_min,eta_max,0.,1.,"#eta","<P_{in} - P_{out} / P_{in}>");
779  p1_ele_fbremVsEta_mean = bookP1(iBooker, "fbremvsEtamean","mean ele brem fraction vs eta, mean of GSF components",eta2D_nbin,eta_min,eta_max,0.,1.,"#eta","<P_{in} - P_{out} / P_{in}>");
780  h1_ele_superclusterfbrem = bookH1withSumw2(iBooker, "superclusterfbrem","supercluster brem fraction",100,0.,1.,"1 - E_{ele} / E_{SC}");
781  h1_ele_superclusterfbrem_barrel = bookH1withSumw2(iBooker, "superclusterfbrem_barrel","supercluster brem fraction for barrel", 100, 0.,1.,"1 - E_{ele} / E_{SC}");
782  h1_ele_superclusterfbrem_endcaps = bookH1withSumw2(iBooker, "superclusterfbrem_endcaps", "supercluster brem franction for endcaps", 100, 0.,1.,"1 - E_{ele} / E_{SC}");
783  // e/g et pflow electrons
784  h1_ele_mva = bookH1withSumw2(iBooker, "mva","ele identification mva",100,-1.,1.);
785  h1_ele_mva_barrel = bookH1withSumw2(iBooker, "mva_barrel", "ele identification mva barrel",100,-1.,1.);
786  h1_ele_mva_endcaps = bookH1withSumw2(iBooker, "mva_endcaps", "ele identification mva endcaps",100,-1.,1.);
787  h1_ele_mva_isolated = bookH1withSumw2(iBooker, "mva_isolated","ele identification mva isolated",100,-1.,1.);
788  h1_ele_mva_barrel_isolated = bookH1withSumw2(iBooker, "mva_isolated_barrel", "ele identification mva isolated barrel",100,-1.,1.);
789  h1_ele_mva_endcaps_isolated = bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps",100,-1.,1.);
790  h1_ele_provenance = bookH1withSumw2(iBooker, "provenance","ele provenance",5,-2.,3.);
791  h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel","ele provenance barrel",5,-2.,3.);
792  h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps","ele provenance endcaps",5,-2.,3.);
793 
794  // pflow isolation variables
795  h1_ele_chargedHadronIso = bookH1withSumw2(iBooker, "chargedHadronIso","chargedHadronIso",100,0.0,20.,"chargedHadronIso","Events","ELE_LOGY E1 P");
796  h1_ele_chargedHadronIso_barrel = bookH1withSumw2(iBooker, "chargedHadronIso_barrel","chargedHadronIso for barrel",100,0.0,20.,"chargedHadronIso_barrel","Events","ELE_LOGY E1 P");
797  h1_ele_chargedHadronIso_endcaps = bookH1withSumw2(iBooker, "chargedHadronIso_endcaps","chargedHadronIso for endcaps",100,0.0,20.,"chargedHadronIso_endcaps","Events","ELE_LOGY E1 P");
798  h1_ele_neutralHadronIso = bookH1withSumw2(iBooker, "neutralHadronIso","neutralHadronIso",21,0.0,20.,"neutralHadronIso","Events", "ELE_LOGY E1 P");
799  h1_ele_neutralHadronIso_barrel = bookH1withSumw2(iBooker, "neutralHadronIso_barrel","neutralHadronIso for barrel",21,0.0,20.,"neutralHadronIso_barrel","Events","ELE_LOGY E1 P");
800  h1_ele_neutralHadronIso_endcaps = bookH1withSumw2(iBooker, "neutralHadronIso_endcaps","neutralHadronIso for endcaps",21,0.0,20.,"neutralHadronIso_endcaps","Events","ELE_LOGY E1 P");
801  h1_ele_photonIso = bookH1withSumw2(iBooker, "photonIso","photonIso",100,0.0,20.,"photonIso","Events","ELE_LOGY E1 P");
802  h1_ele_photonIso_barrel = bookH1withSumw2(iBooker, "photonIso_barrel","photonIso for barrel",100,0.0,20.,"photonIso_barrel","Events","ELE_LOGY E1 P");
803  h1_ele_photonIso_endcaps = bookH1withSumw2(iBooker, "photonIso_endcaps","photonIso for endcaps",100,0.0,20.,"photonIso_endcaps","Events","ELE_LOGY E1 P");
804  // -- pflow over pT
805  h1_ele_chargedHadronRelativeIso = bookH1withSumw2(iBooker, "chargedHadronRelativeIso","chargedHadronRelativeIso",100,0.0,2.,"chargedHadronRelativeIso","Events","ELE_LOGY E1 P");
806  h1_ele_chargedHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_barrel","chargedHadronRelativeIso for barrel",100,0.0,2.,"chargedHadronRelativeIso_barrel","Events","ELE_LOGY E1 P");
807  h1_ele_chargedHadronRelativeIso_endcaps = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_endcaps","chargedHadronRelativeIso for endcaps",100,0.0,2.,"chargedHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P");
808  h1_ele_neutralHadronRelativeIso = bookH1withSumw2(iBooker, "neutralHadronRelativeIso","neutralHadronRelativeIso",100,0.0,2.,"neutralHadronRelativeIso","Events","ELE_LOGY E1 P");
809  h1_ele_neutralHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_barrel","neutralHadronRelativeIso for barrel",100,0.0,2.,"neutralHadronRelativeIso_barrel","Events","ELE_LOGY E1 P");
810  h1_ele_neutralHadronRelativeIso_endcaps = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_endcaps","neutralHadronRelativeIso for endcaps",100,0.0,2.,"neutralHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P");
811  h1_ele_photonRelativeIso = bookH1withSumw2(iBooker, "photonRelativeIso","photonRelativeIso",100,0.0,2.,"photonRelativeIso","Events","ELE_LOGY E1 P");
812  h1_ele_photonRelativeIso_barrel = bookH1withSumw2(iBooker, "photonRelativeIso_barrel","photonRelativeIso for barrel",100,0.0,2.,"photonRelativeIso_barrel","Events","ELE_LOGY E1 P");
813  h1_ele_photonRelativeIso_endcaps = bookH1withSumw2(iBooker, "photonRelativeIso_endcaps","photonRelativeIso for endcaps",100,0.0,2.,"photonRelativeIso_endcaps","Events","ELE_LOGY E1 P");
814 
815  // conversion rejection information
816  h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags","conversion rejection flag",5,-2.5,2.5);
817  h1_ele_convFlags_all = bookH1withSumw2(iBooker, "convFlags_all","conversion rejection flag, all electrons",5,-2.5,2.5);
818  h1_ele_convDist = bookH1withSumw2(iBooker, "convDist","distance to the conversion partner",100,-15.,15.);
819  h1_ele_convDist_all = bookH1withSumw2(iBooker, "convDist_all","distance to the conversion partner, all electrons",100,-15.,15.);
820  h1_ele_convDcot = bookH1withSumw2(iBooker, "convDcot","difference of cot(angle) with the conversion partner",100,-CLHEP::pi/2.,CLHEP::pi/2.);
821  h1_ele_convDcot_all = bookH1withSumw2(iBooker, "convDcot_all","difference of cot(angle) with the conversion partner, all electrons",100,-CLHEP::pi/2.,CLHEP::pi/2.);
822  h1_ele_convRadius = bookH1withSumw2(iBooker, "convRadius","signed conversion radius",100,0.,130.);
823  h1_ele_convRadius_all = bookH1withSumw2(iBooker, "convRadius_all","signed conversion radius, all electrons",100,0.,130.);
824 
825  }
826 
828  {}
829 
830 
831 //=========================================================================
832 // Main methods
833 //=========================================================================
834 
836  {
837  // get reco electrons
839  iEvent.getByToken(electronCollection_,gsfElectrons);
841  iEvent.getByToken(electronCoreCollection_,gsfElectronCores) ;
842  edm::Handle<GsfTrackCollection> gsfElectronTracks ;
843  iEvent.getByToken(electronTrackCollection_,gsfElectronTracks) ;
844  edm::Handle<ElectronSeedCollection> gsfElectronSeeds ;
845  iEvent.getByToken(electronSeedCollection_,gsfElectronSeeds) ;
846 
847  edm::Handle<edm::ValueMap<double> > isoFromDepsTk03Handle ; iEvent.getByToken( isoFromDepsTk03Tag_ , isoFromDepsTk03Handle ) ;
848  edm::Handle<edm::ValueMap<double> > isoFromDepsTk04Handle ; iEvent.getByToken( isoFromDepsTk04Tag_ , isoFromDepsTk04Handle ) ;
849  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalFull03Handle ; iEvent.getByToken( isoFromDepsEcalFull03Tag_ , isoFromDepsEcalFull03Handle ) ;
850  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalFull04Handle ; iEvent.getByToken( isoFromDepsEcalFull04Tag_ , isoFromDepsEcalFull04Handle ) ;
851  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalReduced03Handle ; iEvent.getByToken( isoFromDepsEcalReduced03Tag_, isoFromDepsEcalReduced03Handle ) ;
852  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalReduced04Handle ; iEvent.getByToken( isoFromDepsEcalReduced04Tag_, isoFromDepsEcalReduced04Handle ) ;
853  edm::Handle<edm::ValueMap<double> > isoFromDepsHcal03Handle ; iEvent.getByToken( isoFromDepsHcal03Tag_ , isoFromDepsHcal03Handle ) ;
854  edm::Handle<edm::ValueMap<double> > isoFromDepsHcal04Handle ; iEvent.getByToken( isoFromDepsHcal04Tag_ , isoFromDepsHcal04Handle ) ;
855 
856  /* new 2015.04.02 */
857  edm::Handle<reco::VertexCollection> vertexCollectionHandle;
858  iEvent.getByToken(offlineVerticesCollection_, vertexCollectionHandle);
859  if(!vertexCollectionHandle.isValid())
860  {edm::LogInfo("ElectronMcFakeValidator::analyze") << "vertexCollectionHandle KO" ;}
861  else
862  {
863  edm::LogInfo("ElectronMcFakeValidator::analyze") << "vertexCollectionHandle OK" ;
864  }
865  /* fin new */
866 
867  // get gen jets
869  iEvent.getByToken(matchingObjectCollection_,genJets);
870 
871  // get the beamspot from the Event:
872  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
873  iEvent.getByToken(beamSpotTag_,recoBeamSpotHandle);
874  const BeamSpot bs = *recoBeamSpotHandle;
875 
876  edm::LogInfo("ElectronMcFakeValidator::analyze")
877  <<"Treating event "<<iEvent.id()
878  <<" with "<<gsfElectrons.product()->size()<<" electrons" ;
879  h1_recEleNum_->Fill((*gsfElectrons).size());
880  h1_recCoreNum_->Fill((*gsfElectronCores).size());
881  h1_recTrackNum_->Fill((*gsfElectronTracks).size());
882  h1_recSeedNum_->Fill((*gsfElectronSeeds).size());
883  h1_recOfflineVertices_->Fill((*vertexCollectionHandle).size()); // new 2015.04.02
884 
885  // all rec electrons
886  reco::GsfElectronCollection::const_iterator gsfIter ;
887  for
888  ( gsfIter=gsfElectrons->begin() ;
889  gsfIter!=gsfElectrons->end() ;
890  gsfIter++ )
891  {
892  // preselect electrons
893  if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_)
894  { continue ; }
895 
896  h1_ele_EoverP_all->Fill( gsfIter->eSuperClusterOverP() );
897  h1_ele_EseedOP_all->Fill( gsfIter->eSeedClusterOverP() );
898  h1_ele_EoPout_all->Fill( gsfIter->eSeedClusterOverPout() );
899  h1_ele_EeleOPout_all->Fill( gsfIter->eEleClusterOverPout() );
900  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
901  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
902  h1_ele_dEtaCl_propOut_all->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo());
903  h1_ele_dPhiCl_propOut_all->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo());
904  h1_ele_HoE_all->Fill( gsfIter->hadronicOverEm() );
905  h1_ele_HoE_bc_all->Fill(gsfIter->hcalOverEcalBc());
906  double d
907  = gsfIter->vertex().x()*gsfIter->vertex().x()
908  + gsfIter->vertex().y()*gsfIter->vertex().y() ;
909  h1_ele_TIP_all->Fill( sqrt(d) );
910  h1_ele_vertexEta_all->Fill( gsfIter->eta() );
911  h1_ele_vertexPt_all->Fill( gsfIter->pt() );
912  float enrj1=gsfIter->ecalEnergy();
913 
914  // mee
915  reco::GsfElectronCollection::const_iterator gsfIter2 ;
916  for
917  ( gsfIter2=gsfIter+1 ;
918  gsfIter2!=gsfElectrons->end() ;
919  gsfIter2++ )
920  {
921  math::XYZTLorentzVector p12 = (*gsfIter).p4()+(*gsfIter2).p4();
922  float mee2 = p12.Dot(p12) ;
923  h1_ele_mee_all->Fill(sqrt(mee2)) ;
924  float enrj2=gsfIter2->ecalEnergy();
925  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2),enrj2-enrj1);
926  if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
927  { h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2),enrj2-enrj1) ; }
928  if (gsfIter->charge()*gsfIter2->charge()<0.)
929  { h1_ele_mee_os->Fill(sqrt(mee2)) ; }
930  }
931 
932  // conversion rejection
933  int flags = gsfIter->convFlags() ;
934  if (flags==-9999) { flags=-1 ; }
935  h1_ele_convFlags_all->Fill(flags);
936  if (flags>=0.)
937  {
938  h1_ele_convDist_all->Fill( gsfIter->convDist() );
939  h1_ele_convDcot_all->Fill( gsfIter->convDcot() );
940  h1_ele_convRadius_all->Fill( gsfIter->convRadius() );
941  }
942 
943  }
944 
945  // association matching object-reco electrons
946  int matchingObjectNum=0 ;
947  reco::GenJetCollection::const_iterator moIter ;
948  for
949  ( moIter = genJets->begin() ;
950  moIter != genJets->end() ; ++moIter )
951  {
952 
953  // number of matching objects
954  matchingObjectNum++ ;
955 
956  if (moIter->energy()/cosh(moIter->eta())> maxPt_ || std::abs(moIter->eta())> maxAbsEta_)
957  { continue ; }
958 
959  // suppress the endcaps
960  //if (std::abs(moIter->eta()) > 1.5) continue;
961  // select central z
962  //if ( std::abs((*mcIter)->production_vertex()->position().z())>50.) continue;
963 
964  h1_matchingObjectEta->Fill( moIter->eta() );
965  h1_matchingObjectAbsEta->Fill( std::abs(moIter->eta()) );
966  h1_matchingObjectP->Fill( moIter->energy() );
967  h1_matchingObjectPt->Fill( moIter->energy()/cosh(moIter->eta()) );
968  h1_matchingObjectPhi->Fill( moIter->phi() );
969  h1_matchingObjectZ->Fill( moIter->vz() );
970 
971  // looking for the best matching gsf electron
972  bool okGsfFound = false;
973  double gsfOkRatio = 999999.;
974 
975  // find best matched electron
976  reco::GsfElectron bestGsfElectron ;
977  reco::GsfElectronRef bestGsfElectronRef ;
978  reco::GsfElectronCollection::const_iterator gsfIter ;
980  for
981  ( gsfIter=gsfElectrons->begin(), iElectron=0 ;
982  gsfIter!=gsfElectrons->end() ; gsfIter++, iElectron++ )
983  {
984  double dphi = gsfIter->phi()-moIter->phi();
985  if (std::abs(dphi)>CLHEP::pi)
986  { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi; }
987  double deltaR = sqrt(pow((gsfIter->eta()-moIter->eta()),2) + pow(dphi,2));
988  if ( deltaR < deltaR_ )
989  {
990  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
991  //(gsfIter->charge() > 0.) ){
992  double tmpGsfRatio = gsfIter->p()/moIter->energy() ;
993  if ( std::abs(tmpGsfRatio-1) < std::abs(gsfOkRatio-1) )
994  {
995  gsfOkRatio = tmpGsfRatio ;
996  bestGsfElectronRef = reco::GsfElectronRef(gsfElectrons,iElectron) ;
997  bestGsfElectron = *gsfIter ;
998  okGsfFound = true ;
999  }
1000  //}
1001  }
1002  } // loop over rec ele to look for the best one
1003 
1004  // analysis when the matching object is matched by a rec electron
1005  if (okGsfFound)
1006  {
1007  // electron related distributions
1008  h1_ele_charge->Fill( bestGsfElectron.charge() );
1009  h2_ele_chargeVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.charge() );
1010  h2_ele_chargeVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.charge() );
1011  h2_ele_chargeVsPt->Fill( bestGsfElectron.pt(),bestGsfElectron.charge() );
1012  h1_ele_vertexP->Fill( bestGsfElectron.p() );
1013  h1_ele_vertexPt->Fill( bestGsfElectron.pt() );
1014  h2_ele_vertexPtVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.pt() );
1015  h2_ele_vertexPtVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.pt() );
1016  h1_ele_vertexEta->Fill( bestGsfElectron.eta() );
1017  // generated distributions for matched electrons
1018  h1_ele_matchingObjectPt_matched->Fill( moIter->energy()/cosh(moIter->eta()) );
1019  h1_ele_matchingObjectPhi_matched->Fill( moIter->phi() );
1021  h1_ele_matchingObjectEta_matched->Fill( moIter->eta() );
1022  h2_ele_vertexEtaVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.eta() );
1023  h1_ele_vertexPhi->Fill( bestGsfElectron.phi() );
1024  h1_ele_vertexX->Fill( bestGsfElectron.vertex().x() );
1025  h1_ele_vertexY->Fill( bestGsfElectron.vertex().y() );
1026  h1_ele_vertexZ->Fill( bestGsfElectron.vertex().z() );
1027  h1_ele_matchingObjectZ_matched->Fill( moIter->vz() );
1028  double d
1029  = (bestGsfElectron.vertex().x()-bs.position().x())
1030  * (bestGsfElectron.vertex().x()-bs.position().x())
1031  + (bestGsfElectron.vertex().y()-bs.position().y())
1032  *(bestGsfElectron.vertex().y()-bs.position().y()) ;
1033  d = sqrt(d) ;
1034  h1_ele_vertexTIP->Fill( d );
1035  h2_ele_vertexTIPVsEta->Fill( bestGsfElectron.eta(), d );
1036  h2_ele_vertexTIPVsPhi->Fill( bestGsfElectron.phi(), d );
1037  h2_ele_vertexTIPVsPt->Fill( bestGsfElectron.pt(), d );
1038  h1_ele_EtaMnEtamatchingObject->Fill( bestGsfElectron.eta()-moIter->eta());
1039  h2_ele_EtaMnEtamatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eta()-moIter->eta());
1040  h2_ele_EtaMnEtamatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eta()-moIter->eta());
1041  h2_ele_EtaMnEtamatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.eta()-moIter->eta());
1042  h1_ele_PhiMnPhimatchingObject->Fill( bestGsfElectron.phi()-moIter->phi());
1043  h1_ele_PhiMnPhimatchingObject2->Fill( bestGsfElectron.phi()-moIter->phi());
1044  h2_ele_PhiMnPhimatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.phi()-moIter->phi());
1045  h2_ele_PhiMnPhimatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.phi()-moIter->phi());
1046  h2_ele_PhiMnPhimatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.phi()-moIter->phi());
1047  h1_ele_PoPmatchingObject->Fill( bestGsfElectron.p()/moIter->energy());
1048  h2_ele_PoPmatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.p()/moIter->energy());
1049  h2_ele_PoPmatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.p()/moIter->energy());
1050  h2_ele_PoPmatchingObjectVsPt->Fill( bestGsfElectron.py(), bestGsfElectron.p()/moIter->energy());
1051  if (bestGsfElectron.isEB()) h1_ele_PoPmatchingObject_barrel->Fill( bestGsfElectron.p()/moIter->energy()) ;
1052  if (bestGsfElectron.isEE()) h1_ele_PoPmatchingObject_endcaps->Fill( bestGsfElectron.p()/moIter->energy()) ;
1053 
1054  // supercluster related distributions
1055  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
1056  if (!bestGsfElectron.ecalDrivenSeed()&&bestGsfElectron.trackerDrivenSeed()) sclRef = bestGsfElectron.parentSuperCluster();
1057  if( sclRef.isNonnull() ) {
1058  h1_scl_En_->Fill(sclRef->energy());
1059  double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
1060  double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
1061  h1_scl_Et_->Fill(sclRef->energy()*(Rt/R));
1062  h2_scl_EtVsEta_->Fill(sclRef->eta(),sclRef->energy()*(Rt/R));
1063  h2_scl_EtVsPhi_->Fill(sclRef->phi(),sclRef->energy()*(Rt/R));
1064  if ( bestGsfElectron.isEB() ) h1_scl_EoEmatchingObject_barrel->Fill(sclRef->energy()/moIter->energy());
1065  if ( bestGsfElectron.isEE() ) h1_scl_EoEmatchingObject_endcaps->Fill(sclRef->energy()/moIter->energy());
1066  h1_scl_Eta_->Fill(sclRef->eta());
1067  h2_scl_EtaVsPhi_->Fill(sclRef->phi(),sclRef->eta());
1068  h1_scl_Phi_->Fill(sclRef->phi());
1069  /*New from 06 05 2016*/
1070 // h1_scl_ESFrac->Fill( sclRef->preshowerEnergy() / sclRef->rawEnergy() );
1071  if (bestGsfElectron.isEE()) h1_scl_ESFrac_endcaps->Fill( sclRef->preshowerEnergy() / sclRef->rawEnergy() );
1072  }
1073  h1_scl_SigIEtaIEta_->Fill(bestGsfElectron.scSigmaIEtaIEta());
1074  if (bestGsfElectron.isEB()) h1_scl_SigIEtaIEta_barrel_->Fill(bestGsfElectron.scSigmaIEtaIEta());
1075  if (bestGsfElectron.isEE()) h1_scl_SigIEtaIEta_endcaps_->Fill(bestGsfElectron.scSigmaIEtaIEta());
1077  if (bestGsfElectron.isEB()) h1_scl_full5x5_sigmaIetaIeta_barrel_->Fill(bestGsfElectron.full5x5_sigmaIetaIeta());
1078  if (bestGsfElectron.isEE()) h1_scl_full5x5_sigmaIetaIeta_endcaps_->Fill(bestGsfElectron.full5x5_sigmaIetaIeta());
1079  h1_scl_E1x5_->Fill(bestGsfElectron.scE1x5());
1080  if (bestGsfElectron.isEB()) h1_scl_E1x5_barrel_->Fill(bestGsfElectron.scE1x5());
1081  if (bestGsfElectron.isEE()) h1_scl_E1x5_endcaps_->Fill(bestGsfElectron.scE1x5());
1082  h1_scl_E2x5max_->Fill(bestGsfElectron.scE2x5Max());
1083  if (bestGsfElectron.isEB()) h1_scl_E2x5max_barrel_->Fill(bestGsfElectron.scE2x5Max());
1084  if (bestGsfElectron.isEE()) h1_scl_E2x5max_endcaps_->Fill(bestGsfElectron.scE2x5Max());
1085  h1_scl_E5x5_->Fill(bestGsfElectron.scE5x5());
1086  if (bestGsfElectron.isEB()) h1_scl_E5x5_barrel_->Fill(bestGsfElectron.scE5x5());
1087  if (bestGsfElectron.isEE()) h1_scl_E5x5_endcaps_->Fill(bestGsfElectron.scE5x5());
1088 
1089  // track related distributions
1090  h1_ele_ambiguousTracks->Fill( bestGsfElectron.ambiguousGsfTracksSize() );
1091  h2_ele_ambiguousTracksVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize() );
1092  h2_ele_ambiguousTracksVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize() );
1093  h2_ele_ambiguousTracksVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize() );
1094  if (!readAOD_)
1095  { // track extra does not exist in AOD
1096  h1_ele_foundHits->Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() );
1097  h2_ele_foundHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
1098  h2_ele_foundHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
1099  h2_ele_foundHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
1100  h1_ele_lostHits->Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() );
1101  h2_ele_lostHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
1102  h2_ele_lostHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
1103  h2_ele_lostHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
1104  h1_ele_chi2->Fill( bestGsfElectron.gsfTrack()->normalizedChi2() );
1105  h2_ele_chi2VsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2() );
1106  h2_ele_chi2VsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2() );
1107  h2_ele_chi2VsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2() );
1108  }
1109  // from gsf track interface, hence using mean
1110  if (!readAOD_)
1111  { // track extra does not exist in AOD
1112  h1_ele_PinMnPout->Fill( bestGsfElectron.gsfTrack()->innerMomentum().R() - bestGsfElectron.gsfTrack()->outerMomentum().R() );
1113  h1_ele_outerP->Fill( bestGsfElectron.gsfTrack()->outerMomentum().R() );
1114  h1_ele_outerPt->Fill( bestGsfElectron.gsfTrack()->outerMomentum().Rho() );
1115  }
1116  // from electron interface, hence using mode
1117  h1_ele_PinMnPout_mode->Fill( bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1118  h2_ele_PinMnPoutVsEta_mode->Fill( bestGsfElectron.eta(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1119  h2_ele_PinMnPoutVsPhi_mode->Fill( bestGsfElectron.phi(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1120  h2_ele_PinMnPoutVsPt_mode->Fill( bestGsfElectron.pt(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1121  h2_ele_PinMnPoutVsE_mode->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1122  if (!readAOD_) // track extra does not exist in AOD
1124  ( bestGsfElectron.gsfTrack()->normalizedChi2(),
1125  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() ) ;
1126  h1_ele_outerP_mode->Fill( bestGsfElectron.trackMomentumOut().R() );
1127  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R() );
1128  h1_ele_outerPt_mode->Fill( bestGsfElectron.trackMomentumOut().Rho() );
1129  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho() );
1130  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho() );
1131  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho() );
1132 
1133  if (!readAOD_)
1134  { // track extra does not exist in AOD
1135  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
1136  ElectronSeedRef elseed=seed.castTo<ElectronSeedRef>();
1137  h1_ele_seed_subdet2_->Fill(elseed->subDet2());
1138  h1_ele_seed_mask_->Fill(elseed->hitsMask());
1139  if (elseed->subDet2()==1)
1140  { h1_ele_seed_mask_bpix_->Fill(elseed->hitsMask()); }
1141  else if (elseed->subDet2()==2)
1142  { h1_ele_seed_mask_fpix_->Fill(elseed->hitsMask()); }
1143  else if (elseed->subDet2()==6)
1144  { h1_ele_seed_mask_tec_->Fill(elseed->hitsMask()); }
1145 
1146  if ( elseed->dPhi2() != std::numeric_limits<float>::infinity() ) {
1147  h1_ele_seed_dphi2_->Fill(elseed->dPhi2());
1148  h2_ele_seed_dphi2VsEta_->Fill(bestGsfElectron.eta(), elseed->dPhi2());
1149  h2_ele_seed_dphi2VsPt_->Fill(bestGsfElectron.pt(), elseed->dPhi2()) ;
1150  }
1151  if ( elseed->dPhi2Pos() != std::numeric_limits<float>::infinity() ) {
1152  h1_ele_seed_dphi2pos_->Fill(elseed->dPhi2Pos());
1153  h2_ele_seed_dphi2posVsEta_->Fill(bestGsfElectron.eta(), elseed->dPhi2Pos());
1154  h2_ele_seed_dphi2posVsPt_->Fill(bestGsfElectron.pt(), elseed->dPhi2Pos());
1155  }
1156  if ( elseed->dRz2() != std::numeric_limits<float>::infinity() ) {
1157  h1_ele_seed_drz2_->Fill(elseed->dRz2());
1158  h2_ele_seed_drz2VsEta_->Fill(bestGsfElectron.eta(), elseed->dRz2());
1159  h2_ele_seed_drz2VsPt_->Fill(bestGsfElectron.pt(), elseed->dRz2());
1160  }
1161  if ( elseed->dRz2Pos() != std::numeric_limits<float>::infinity() ) {
1162  h1_ele_seed_drz2pos_->Fill(elseed->dRz2Pos());
1163  h2_ele_seed_drz2posVsEta_->Fill(bestGsfElectron.eta(), elseed->dRz2Pos());
1164  h2_ele_seed_drz2posVsPt_->Fill(bestGsfElectron.pt(), elseed->dRz2Pos());
1165  }
1166  }
1167  // match distributions
1168  h1_ele_EoP->Fill( bestGsfElectron.eSuperClusterOverP() );
1169  if (bestGsfElectron.isEB()) h1_ele_EoP_barrel->Fill( bestGsfElectron.eSuperClusterOverP() );
1170  if (bestGsfElectron.isEE()) h1_ele_EoP_endcaps->Fill( bestGsfElectron.eSuperClusterOverP() );
1171  h2_ele_EoPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP() );
1172  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP() );
1173  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP() );
1174  h1_ele_EseedOP->Fill( bestGsfElectron.eSeedClusterOverP() );
1175  if (bestGsfElectron.isEB()) h1_ele_EseedOP_barrel->Fill( bestGsfElectron.eSeedClusterOverP() );
1176  if (bestGsfElectron.isEE()) h1_ele_EseedOP_endcaps->Fill( bestGsfElectron.eSeedClusterOverP() );
1177  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP() );
1178  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP() );
1179  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP() );
1180  h1_ele_EoPout->Fill( bestGsfElectron.eSeedClusterOverPout() );
1181  if (bestGsfElectron.isEB()) h1_ele_EoPout_barrel->Fill( bestGsfElectron.eSeedClusterOverPout() );
1182  if (bestGsfElectron.isEE()) h1_ele_EoPout_endcaps->Fill( bestGsfElectron.eSeedClusterOverPout() );
1183  h2_ele_EoPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout() );
1184  h2_ele_EoPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout() );
1185  h2_ele_EoPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout() );
1186  h1_ele_EeleOPout->Fill( bestGsfElectron.eEleClusterOverPout() );
1187  if (bestGsfElectron.isEB()) h1_ele_EeleOPout_barrel->Fill( bestGsfElectron.eEleClusterOverPout() );
1188  if (bestGsfElectron.isEE()) h1_ele_EeleOPout_endcaps->Fill( bestGsfElectron.eEleClusterOverPout() );
1189  h2_ele_EeleOPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout() );
1190  h2_ele_EeleOPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout() );
1191  h2_ele_EeleOPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout() );
1193  if (bestGsfElectron.isEB()) h1_ele_dEtaSc_propVtx_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1194  if (bestGsfElectron.isEE())h1_ele_dEtaSc_propVtx_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1195  h2_ele_dEtaScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1196  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1197  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1199  if (bestGsfElectron.isEB()) h1_ele_dPhiSc_propVtx_barrel->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1200  if (bestGsfElectron.isEE())h1_ele_dPhiSc_propVtx_endcaps->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1201  h2_ele_dPhiScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1202  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1203  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1205  if (bestGsfElectron.isEB()) h1_ele_dEtaCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1206  if (bestGsfElectron.isEE()) h1_ele_dEtaCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1207  h2_ele_dEtaClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1208  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1209  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1211  if (bestGsfElectron.isEB()) h1_ele_dPhiCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1212  if (bestGsfElectron.isEE()) h1_ele_dPhiCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1213  h2_ele_dPhiClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1214  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1215  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1217  if (bestGsfElectron.isEB()) h1_ele_dEtaEleCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1218  if (bestGsfElectron.isEE()) h1_ele_dEtaEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1219  h2_ele_dEtaEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1220  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1221  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1223  if (bestGsfElectron.isEB()) h1_ele_dPhiEleCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1224  if (bestGsfElectron.isEE()) h1_ele_dPhiEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1225  h2_ele_dPhiEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1226  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1227  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1228  h1_ele_HoE->Fill(bestGsfElectron.hadronicOverEm());
1229  h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc());
1230  if (bestGsfElectron.isEB()) h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc());
1231  if (bestGsfElectron.isEE()) h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc());
1232  if (bestGsfElectron.isEB()) h1_ele_HoE_barrel->Fill(bestGsfElectron.hadronicOverEm());
1233  if (bestGsfElectron.isEE()) h1_ele_HoE_endcaps->Fill(bestGsfElectron.hadronicOverEm());
1234  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap()&& !bestGsfElectron.isEBEEGap() &&
1235  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap()) h1_ele_HoE_fiducial->Fill(bestGsfElectron.hadronicOverEm());
1236  h2_ele_HoEVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.hadronicOverEm());
1237  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(),bestGsfElectron.hadronicOverEm());
1238  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(),bestGsfElectron.hadronicOverEm());
1239 
1240  //classes
1241  int eleClass = bestGsfElectron.classification();
1242  if (bestGsfElectron.isEE()) eleClass+=10;
1243  h1_ele_classes->Fill(eleClass);
1244 
1245  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
1246  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
1247  if (bestGsfElectron.classification() == GsfElectron::BIGBREM) h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
1248  //if (bestGsfElectron.classification() == GsfElectron::OLDNARROW) h1_ele_eta_narrow->Fill(std::abs(bestGsfElectron.eta()));
1249  if (bestGsfElectron.classification() == GsfElectron::SHOWERING) h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
1250 
1251  // fbrem
1252 
1253  double fbrem_mode = bestGsfElectron.fbrem();
1254  h1_ele_fbrem->Fill(fbrem_mode);
1255  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(),fbrem_mode);
1256 
1257  if (bestGsfElectron.isEB())
1258  {
1259  double fbrem_mode_barrel = bestGsfElectron.fbrem();
1260  h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel);
1261  }
1262 
1263  if (bestGsfElectron.isEE())
1264  {
1265  double fbrem_mode_endcaps = bestGsfElectron.fbrem();
1266  h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps);
1267  }
1268 
1269 // new 2014/02/12
1270  double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem();
1271  h1_ele_superclusterfbrem->Fill(superclusterfbrem_mode);
1272 
1273  if (bestGsfElectron.isEB())
1274  {
1275  double superclusterfbrem_mode_barrel = bestGsfElectron.superClusterFbrem();
1276  h1_ele_superclusterfbrem_barrel->Fill(superclusterfbrem_mode_barrel);
1277  }
1278 
1279  if (bestGsfElectron.isEE())
1280  {
1281  double superclusterfbrem_mode_endcaps = bestGsfElectron.superClusterFbrem();
1282  h1_ele_superclusterfbrem_endcaps->Fill(superclusterfbrem_mode_endcaps);
1283  }
1284 
1285  if (!readAOD_) // track extra does not exist in AOD
1286  {
1287  double fbrem_mean = 1. - bestGsfElectron.gsfTrack()->outerMomentum().R()/bestGsfElectron.gsfTrack()->innerMomentum().R();
1288  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(),fbrem_mean) ;
1289  }
1290 
1291  //
1292 
1293  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
1294  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1295  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
1296  if (!readAOD_) // track extra does not exist in AOD
1297  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
1298  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
1299  if (!readAOD_) // track extra does not exist in AOD
1300  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1301  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
1302  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
1303  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
1304  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1305  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
1306  if (!readAOD_) // track extra does not exist in AOD
1307  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
1308  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
1309  if (!readAOD_) // track extra does not exist in AOD
1310  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1311  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
1312 
1313  h1_ele_mva->Fill(bestGsfElectron.mva_e_pi());
1314  if (bestGsfElectron.isEB()) h1_ele_mva_barrel->Fill(bestGsfElectron.mva_e_pi());
1315  if (bestGsfElectron.isEE()) h1_ele_mva_endcaps->Fill(bestGsfElectron.mva_e_pi());
1316  h1_ele_mva_isolated->Fill(bestGsfElectron.mva_Isolated());
1317  if (bestGsfElectron.isEB()) h1_ele_mva_barrel_isolated->Fill(bestGsfElectron.mva_Isolated());
1318  if (bestGsfElectron.isEE()) h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated());
1319  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(1.);
1320  if (bestGsfElectron.trackerDrivenSeed()) h1_ele_provenance->Fill(-1.);
1321  if (bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(0.);
1322  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(-2.);
1323  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(2.);
1324  if (bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(1.);
1325  if (bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(-1.);
1326  if ((bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(0.);
1327  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(-2.);
1328  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(2.);
1329  if (bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(1.);
1330  if (bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(-1.);
1331  if ((bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(0.);
1332  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(-2.);
1333  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(2.);
1334 
1335  // Pflow isolation
1337  if (bestGsfElectron.isEB()) h1_ele_chargedHadronIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt);
1338  if (bestGsfElectron.isEE()) h1_ele_chargedHadronIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt);
1339 
1341  if (bestGsfElectron.isEB()) h1_ele_neutralHadronIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt);
1342  if (bestGsfElectron.isEE()) h1_ele_neutralHadronIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt);
1343 
1345  if (bestGsfElectron.isEB()) h1_ele_photonIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt);
1346  if (bestGsfElectron.isEE()) h1_ele_photonIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt);
1347 
1348  // -- pflow over pT
1349  h1_ele_chargedHadronRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt());
1350  if (bestGsfElectron.isEB()) h1_ele_chargedHadronRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt());
1351  if (bestGsfElectron.isEE()) h1_ele_chargedHadronRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt());
1352 
1353  h1_ele_neutralHadronRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt());
1354  if (bestGsfElectron.isEB()) h1_ele_neutralHadronRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt());
1355  if (bestGsfElectron.isEE()) h1_ele_neutralHadronRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt());
1356 
1357  h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
1358  if (bestGsfElectron.isEB()) h1_ele_photonRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
1359  if (bestGsfElectron.isEE()) h1_ele_photonRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
1360 
1361  // isolation
1362  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
1363  if (bestGsfElectron.isEB()) h1_ele_tkSumPt_dr03_barrel->Fill(bestGsfElectron.dr03TkSumPt());
1364  if (bestGsfElectron.isEE()) h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt());
1366  if (bestGsfElectron.isEB()) h1_ele_ecalRecHitSumEt_dr03_barrel->Fill(bestGsfElectron.dr03EcalRecHitSumEt());
1367  if (bestGsfElectron.isEE()) h1_ele_ecalRecHitSumEt_dr03_endcaps->Fill(bestGsfElectron.dr03EcalRecHitSumEt());
1369  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEt_dr03_depth1_barrel->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEt());
1370  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEt_dr03_depth1_endcaps->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEt());
1373  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEtBc());
1374  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEtBc());
1376  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel->Fill(bestGsfElectron.dr03HcalDepth2TowerSumEtBc());
1377  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps->Fill(bestGsfElectron.dr03HcalDepth2TowerSumEtBc());
1378  h1_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt());
1379  if (bestGsfElectron.isEB()) h1_ele_tkSumPt_dr04_barrel->Fill(bestGsfElectron.dr04TkSumPt());
1380  if (bestGsfElectron.isEE()) h1_ele_tkSumPt_dr04_endcaps->Fill(bestGsfElectron.dr04TkSumPt());
1382  if (bestGsfElectron.isEB()) h1_ele_ecalRecHitSumEt_dr04_barrel->Fill(bestGsfElectron.dr04EcalRecHitSumEt());
1383  if (bestGsfElectron.isEE()) h1_ele_ecalRecHitSumEt_dr04_endcaps->Fill(bestGsfElectron.dr04EcalRecHitSumEt());
1385  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEt_dr04_depth1_barrel->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEt());
1386  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEt_dr04_depth1_endcaps->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEt());
1389  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEtBc());
1390  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEtBc());
1392  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel->Fill(bestGsfElectron.dr04HcalDepth2TowerSumEtBc());
1393  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps->Fill(bestGsfElectron.dr04HcalDepth2TowerSumEtBc());
1394 
1396  if (bestGsfElectron.isEB()) h1_ele_hcalDepth1OverEcalBc_barrel->Fill(bestGsfElectron.hcalDepth1OverEcalBc());
1397  if (bestGsfElectron.isEE()) h1_ele_hcalDepth1OverEcalBc_endcaps->Fill(bestGsfElectron.hcalDepth1OverEcalBc());
1399  if (bestGsfElectron.isEB()) h1_ele_hcalDepth2OverEcalBc_barrel->Fill(bestGsfElectron.hcalDepth2OverEcalBc());
1400  if (bestGsfElectron.isEE()) h1_ele_hcalDepth2OverEcalBc_endcaps->Fill(bestGsfElectron.hcalDepth2OverEcalBc());
1401 
1402  // conversion rejection
1403  int flags = bestGsfElectron.convFlags() ;
1404  if (flags==-9999) { flags=-1 ; }
1405  h1_ele_convFlags->Fill(flags);
1406  if (flags>=0.)
1407  {
1408  h1_ele_convDist->Fill( bestGsfElectron.convDist() );
1409  h1_ele_convDcot->Fill( bestGsfElectron.convDcot() );
1410  h1_ele_convRadius->Fill( bestGsfElectron.convRadius() );
1411  }
1412 
1413  } // gsf electron found
1414 
1415  } // loop overmatching object
1416 
1417  h1_matchingObjectNum->Fill(matchingObjectNum) ;
1418 
1419  }
1420 
1421 
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:687
MonitorElement * h2_ele_ambiguousTracksVsPhi
MonitorElement * h1_ele_matchingObjectPt_matched
T getParameter(std::string const &) const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:186
MonitorElement * h2_ele_foundHitsVsEta
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsEta
MonitorElement * h2_ele_seed_dphi2posVsPt_
MonitorElement * h1_ele_dEtaSc_propVtx
MonitorElement * h1_ele_provenance_endcaps
MonitorElement * h1_ele_dEtaEleCl_propOut_barrel
MonitorElement * h1_ele_dEtaCl_propOut_endcaps
MonitorElement * h1_ele_hcalDepth1OverEcalBc_endcaps
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
double eta() const final
momentum pseudorapidity
MonitorElement * h1_ele_ecalRecHitSumEt_dr04_barrel
MonitorElement * h1_scl_E2x5max_barrel_
MonitorElement * h1_ele_seed_mask_bpix_
MonitorElement * h1_scl_EoEmatchingObjectGolden_barrel
ElectronMcFakeValidator(const edm::ParameterSet &conf)
MonitorElement * h1_ele_PhiMnPhimatchingObject2
bool isEBEtaGap() const
Definition: GsfElectron.h:361
float dr03HcalDepth1TowerSumEtBc() const
Definition: GsfElectron.h:558
virtual SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:190
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps
MonitorElement * h1_ele_matchingObjectAbsEta_matched
float eSuperClusterOverP() const
Definition: GsfElectron.h:249
MonitorElement * h1_scl_EoEmatchingObjectGolden_endcaps
MonitorElement * h1_ele_ecalRecHitSumEt_dr03
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsPt
edm::EDGetTokenT< reco::ElectronSeedCollection > electronSeedCollection_
MonitorElement * h2_ele_PoPmatchingObjectVsPhi
bool isEBEEGap() const
Definition: GsfElectron.h:359
float dr04HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:567
MonitorElement * h1_ele_photonIso_barrel
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_barrel
MonitorElement * h1_ele_tkSumPt_dr03_endcaps
MonitorElement * h1_ele_dPhiCl_propOut_all
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalReduced04Tag_
MonitorElement * h2_ele_ambiguousTracksVsPt
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps
MonitorElement * h2_ele_PtinVsPtoutGolden_mode
MonitorElement * h1_ele_EseedOP_endcaps
MonitorElement * h1_ele_hcalDepth2OverEcalBc
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:295
MonitorElement * h1_ele_photonIso_endcaps
MonitorElement * p1_ele_fbremVsEta_mode
MonitorElement * h1_ele_chargedHadronIso_endcaps
MonitorElement * h1_scl_EoEmatchingObjectShowering_barrel
#define nullptr
MonitorElement * h1_ele_neutralHadronIso_endcaps
MonitorElement * h1_matchingObjectAbsEta
MonitorElement * bookH1withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
MonitorElement * p1_ele_fbremVsEta_mean
MonitorElement * h1_ele_mva_endcaps_isolated
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalFull03Tag_
MonitorElement * h2_ele_PinVsPoutShowering_mode
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_barrel
edm::EDGetTokenT< reco::GenJetCollection > matchingObjectCollection_
float dr04TkSumPt() const
Definition: GsfElectron.h:564
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
MonitorElement * h1_ele_tkSumPt_dr03_barrel
double pt() const final
transverse momentum
MonitorElement * h2_ele_vertexTIPVsPhi
edm::EDGetTokenT< reco::GsfTrackCollection > electronTrackCollection_
int charge() const final
electric charge
Definition: LeafCandidate.h:91
MonitorElement * h1_ele_foundHits_endcaps
bool isEERingGap() const
Definition: GsfElectron.h:365
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")
float dr03HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:556
MonitorElement * h1_ele_lostHits_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_all
float fbrem() const
Definition: GsfElectron.h:772
float scE2x5Max() const
Definition: GsfElectron.h:493
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel
MonitorElement * h1_ele_hcalDepth1OverEcalBc_barrel
MonitorElement * h1_ele_dPhiSc_propVtx_all
MonitorElement * h2_ele_dPhiScVsPhi_propVtx
MonitorElement * h2_ele_dPhiScVsEta_propVtx
MonitorElement * h2_ele_dPhiEleClVsPhi_propOut
float convDist() const
Definition: GsfElectron.h:618
MonitorElement * h1_ele_dEtaCl_propOut_all
MonitorElement * h2_ele_PinVsPoutShowering_mean
float convRadius() const
Definition: GsfElectron.h:620
MonitorElement * h2_ele_E2mnE1vsMee_all
uint16_t size_type
MonitorElement * h2_ele_seed_drz2VsPt_
bool isEEDeeGap() const
Definition: GsfElectron.h:364
MonitorElement * h1_ele_HoE_bc_endcaps
MonitorElement * h1_ele_superclusterfbrem_endcaps
MonitorElement * h1_ele_neutralHadronRelativeIso_endcaps
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_endcaps_
float superClusterFbrem() const
Definition: GsfElectron.h:766
MonitorElement * h2_ele_ambiguousTracksVsEta
MonitorElement * h2_ele_outerPtVsPt_mode
bool isEE() const
Definition: GsfElectron.h:357
bool isEB() const
Definition: GsfElectron.h:356
MonitorElement * h2_ele_E2mnE1vsMee_egeg_all
MonitorElement * h2_ele_PtinVsPtoutShowering_mean
void Fill(long long x)
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsPt
const Double_t pi
MonitorElement * h2_ele_dEtaEleClVsEta_propOut
MonitorElement * h2_ele_PinMnPoutVsChi2_mode
float convDcot() const
Definition: GsfElectron.h:619
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:462
MonitorElement * h1_ele_matchingObjectEta_matched
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
MonitorElement * h1_scl_E2x5max_endcaps_
float dr04HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:568
MonitorElement * h2_ele_EeleOPoutVsEta
MonitorElement * h2_ele_PinMnPoutVsPt_mode
MonitorElement * h1_ele_dEtaCl_propOut
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:253
int iEvent
Definition: GenABIO.cc:224
MonitorElement * h2_ele_dEtaScVsEta_propVtx
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1
MonitorElement * h2_ele_foundHitsVsPhi
float hadronicOverEm() const
Definition: GsfElectron.h:495
float dr03HcalDepth2TowerSumEtBc() const
Definition: GsfElectron.h:559
MonitorElement * h1_ele_chargedHadronRelativeIso_barrel
MonitorElement * h2_ele_dEtaScVsPt_propVtx
float eSeedClusterOverP() const
Definition: GsfElectron.h:250
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * h2_ele_PtinVsPtoutShowering_mode
MonitorElement * h2_ele_dEtaClVsPt_propOut
MonitorElement * h1_ele_PhiMnPhimatchingObject
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:566
MonitorElement * h1_ele_dPhiCl_propOut
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal04Tag_
MonitorElement * h1_recOfflineVertices_
MonitorElement * h1_scl_EoEmatchingObject_barrel
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2
MonitorElement * h2_ele_PoPmatchingObjectVsEta
float deltaPhiSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:257
MonitorElement * h2_ele_dPhiClVsPt_propOut
MonitorElement * h1_ele_chargedHadronIso_barrel
T sqrt(T t)
Definition: SSEVec.h:18
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk04Tag_
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:297
MonitorElement * h2_ele_dPhiEleClVsPt_propOut
MonitorElement * h1_ele_tkSumPt_dr04_endcaps
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:641
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:256
MonitorElement * h1_ele_hcalDepth1OverEcalBc
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk03Tag_
MonitorElement * h2_ele_dEtaEleClVsPhi_propOut
const Point & vertex() const override
vertex position (overwritten by PF...)
MonitorElement * h1_ele_dEtaEleCl_propOut_endcaps
MonitorElement * h1_ele_PoPmatchingObject
const double infinity
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1
float dr04HcalDepth1TowerSumEtBc() const
Definition: GsfElectron.h:570
float dr03TkSumPt() const
Definition: GsfElectron.h:552
MonitorElement * h1_ele_convRadius_all
MonitorElement * h2_ele_PinMnPoutVsEta_mode
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * h1_ele_lostHits_barrel
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth2
MonitorElement * h1_ele_neutralHadronIso_barrel
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:555
MonitorElement * h1_ele_photonRelativeIso_endcaps
float eEleClusterOverPout() const
Definition: GsfElectron.h:252
void setBookPrefix(const std::string &)
edm::EDGetTokenT< reco::VertexCollection > offlineVerticesCollection_
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:640
float eSeedClusterOverPout() const
Definition: GsfElectron.h:251
MonitorElement * h2_ele_vertexEtaVsPhi
MonitorElement * h1_ele_seed_mask_tec_
MonitorElement * h2_ele_outerPtVsPhi_mode
MonitorElement * h1_ele_dPhiCl_propOut_endcaps
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_endcaps
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalReduced03Tag_
MonitorElement * h2_ele_seed_drz2posVsEta_
bool isValid() const
Definition: HandleBase.h:74
float hcalOverEcalBc() const
Definition: GsfElectron.h:452
MonitorElement * h1_ele_superclusterfbrem_barrel
MonitorElement * h2_ele_vertexTIPVsEta
MonitorElement * h1_ele_chargedHadronRelativeIso
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1
MonitorElement * h2_ele_PinMnPoutVsE_mode
MonitorElement * h2_ele_PinMnPoutVsPhi_mode
MonitorElement * h2_ele_dEtaEleClVsPt_propOut
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:491
MonitorElement * h1_ele_foundHits_barrel
edm::Ref< GsfElectronCollection > GsfElectronRef
reference to an object in a collection of GsfElectron objects
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:258
MonitorElement * h2_ele_PoPmatchingObjectVsPt
MonitorElement * h1_ele_seed_dphi2pos_
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")
void setBookEfficiencyFlag(const bool &)
MonitorElement * h1_ele_neutralHadronRelativeIso_barrel
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollection_
MonitorElement * h2_ele_dEtaClVsEta_propOut
MonitorElement * h1_ele_mva_barrel_isolated
MonitorElement * h1_ele_superclusterfbrem
MonitorElement * h1_scl_EoEmatchingObject_endcaps
MonitorElement * h2_ele_PinVsPoutGolden_mode
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
double p() const final
magnitude of momentum vector
MonitorElement * h1_ele_tkSumPt_dr04_barrel
MonitorElement * h1_ele_ecalRecHitSumEt_dr04
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_
MonitorElement * h1_ele_photonRelativeIso
MonitorElement * h2_ele_seed_dphi2VsPt_
T const * product() const
Definition: Handle.h:74
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1_endcaps
MonitorElement * h2_ele_dEtaClVsPhi_propOut
MonitorElement * h2_ele_seed_drz2VsEta_
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
float deltaEtaEleClusterTrackAtCalo() const
Definition: GsfElectron.h:255
MonitorElement * h1_ele_PoPmatchingObject_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_barrel
Classification classification() const
Definition: GsfElectron.h:768
MonitorElement * h2_ele_outerPtVsEta_mode
float hcalDepth2OverEcalBc() const
Definition: GsfElectron.h:451
REF castTo() const
Definition: RefToBase.h:289
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel
MonitorElement * h1_ele_seed_mask_fpix_
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1_barrel
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
Definition: GsfElectron.h:722
float dr04HcalDepth2TowerSumEtBc() const
Definition: GsfElectron.h:571
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps
MonitorElement * h2_ele_PinVsPoutGolden_mean
MonitorElement * h1_ele_EeleOPout_barrel
double py() const final
y coordinate of momentum vector
MonitorElement * h2_ele_EeleOPoutVsPhi
MonitorElement * h1_ele_dPhiSc_propVtx
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2
MonitorElement * h1_scl_SigIEtaIEta_barrel_
MonitorElement * h1_ele_photonRelativeIso_barrel
float mva_Isolated() const
Definition: GsfElectron.h:701
MonitorElement * h1_ele_neutralHadronIso
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:554
float mva_e_pi() const
Definition: GsfElectron.h:702
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsHcal03Tag_
MonitorElement * h2_ele_dPhiClVsPhi_propOut
MonitorElement * h2_ele_seed_dphi2posVsEta_
MonitorElement * h1_ele_EoPout_endcaps
edm::EventID id() const
Definition: EventBase.h:59
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:254
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsEta
fixed size matrix
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsPhi
MonitorElement * h1_ele_matchingObjectPhi_matched
MonitorElement * h1_ele_ecalRecHitSumEt_dr03_endcaps
MonitorElement * h1_scl_SigIEtaIEta_endcaps_
MonitorElement * h1_ele_EtaMnEtamatchingObject
int convFlags() const
Definition: GsfElectron.h:616
MonitorElement * h1_ele_dPhiEleCl_propOut_endcaps
MonitorElement * h2_ele_dEtaScVsPhi_propVtx
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsPhi
MonitorElement * h1_ele_hcalDepth2OverEcalBc_barrel
bool isEBPhiGap() const
Definition: GsfElectron.h:362
MonitorElement * h1_ele_dPhiEleCl_propOut
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:185
MonitorElement * h1_ele_EseedOP_barrel
MonitorElement * h1_scl_ESFrac_endcaps
bool trackerDrivenSeed() const
Definition: GsfElectron.h:189
MonitorElement * h1_ele_dEtaEleCl_propOut
MonitorElement * h2_ele_seed_drz2posVsPt_
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps
const Point & position() const
position
Definition: BeamSpot.h:62
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 scE5x5() const
Definition: GsfElectron.h:494
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsEcalFull04Tag_
MonitorElement * h1_ele_dPhiSc_propVtx_endcaps
MonitorElement * h1_scl_EoEmatchingObjectShowering_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_endcaps
MonitorElement * h2_ele_seed_dphi2VsEta_
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel
MonitorElement * h2_ele_dPhiClVsEta_propOut
MonitorElement * h1_ele_dEtaCl_propOut_barrel
MonitorElement * h2_ele_dPhiScVsPt_propVtx
float hcalDepth1OverEcalBc() const
Definition: GsfElectron.h:450
MonitorElement * h1_ele_dPhiSc_propVtx_barrel
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1
MonitorElement * h1_ele_hcalDepth2OverEcalBc_endcaps
void setBookStatOverflowFlag(const bool &)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
Definition: GsfElectron.h:639
MonitorElement * h1_ele_dPhiCl_propOut_barrel
float caloEnergy() const
Definition: GsfElectron.h:863
MonitorElement * h1_ele_chargedHadronIso
double phi() const final
momentum azimuthal angle
MonitorElement * h1_ele_matchingObjectZ_matched
MonitorElement * h2_ele_PtinVsPtoutGolden_mean
MonitorElement * h1_ele_dPhiEleCl_propOut_barrel
edm::EDGetTokenT< reco::GsfElectronCoreCollection > electronCoreCollection_
MonitorElement * h1_ele_neutralHadronRelativeIso
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
MonitorElement * h1_ele_provenance_barrel
MonitorElement * h1_ele_PinMnPout_mode
MonitorElement * h2_ele_outerPVsEta_mode
Definition: Run.h:45
MonitorElement * h1_ele_PoPmatchingObject_barrel
float scE1x5() const
Definition: GsfElectron.h:492
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_barrel_
MonitorElement * h2_ele_dPhiEleClVsEta_propOut
MonitorElement * h1_ele_ambiguousTracks
bool ecalDrivenSeed() const
Definition: GsfElectron.h:188
MonitorElement * h1_ele_ecalRecHitSumEt_dr04_endcaps
MonitorElement * h1_ele_EeleOPout_endcaps
MonitorElement * h1_ele_chargedHadronRelativeIso_endcaps