CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
148  h1_recEleNum_ = 0 ;
149  h1_recCoreNum_ = 0 ;
150  h1_recTrackNum_ = 0 ;
151  h1_recSeedNum_ = 0 ;
152  h1_recOfflineVertices_ = 0 ; // new 2015.04.02
153 
156  h1_matchingObjectP = 0 ;
157  h1_matchingObjectPt = 0 ;
159  h1_matchingObjectZ = 0 ;
160 
161  h1_ele_EoverP_all = 0 ;
162  h1_ele_EseedOP_all = 0 ;
163  h1_ele_EoPout_all = 0 ;
169  h1_ele_TIP_all = 0 ;
170  h1_ele_HoE_all = 0 ;
172  h1_ele_vertexPt_all = 0 ;
173  h1_ele_mee_all = 0 ;
174  h1_ele_mee_os = 0 ;
175 
178 
184 
185  h1_ele_charge = 0 ;
186  h2_ele_chargeVsEta = 0 ;
187  h2_ele_chargeVsPhi = 0 ;
188  h2_ele_chargeVsPt = 0 ;
189  h1_ele_vertexP = 0 ;
190  h1_ele_vertexPt = 0 ;
193  h1_ele_vertexEta = 0 ;
195  h1_ele_vertexAbsEta = 0 ;
196  h1_ele_vertexPhi = 0 ;
197  h1_ele_vertexX = 0 ;
198  h1_ele_vertexY = 0 ;
199  h1_ele_vertexZ = 0 ;
200  h1_ele_vertexTIP = 0 ;
204 
211 
221 
222  h1_scl_En_ = 0 ;
225  h1_scl_Et_ = 0 ;
226  h2_scl_EtVsEta_ = 0 ;
227  h2_scl_EtVsPhi_ = 0 ;
228  h2_scl_EtaVsPhi_ = 0 ;
229  h1_scl_Eta_ = 0 ;
230  h1_scl_Phi_ = 0 ;
231 
232  h1_scl_SigIEtaIEta_ = 0 ;
235  h1_scl_full5x5_sigmaIetaIeta_ = 0 ; // new 2014.01.12
236  h1_scl_full5x5_sigmaIetaIeta_barrel_ = 0 ; // new 2014.01.12
237  h1_scl_full5x5_sigmaIetaIeta_endcaps_ = 0 ; // new 2014.01.12
238  h1_scl_E1x5_ = 0 ;
239  h1_scl_E1x5_barrel_ = 0 ;
241  h1_scl_E2x5max_ = 0 ;
244  h1_scl_E5x5_ = 0 ;
245  h1_scl_E5x5_barrel_ = 0 ;
247 
252  h1_ele_foundHits = 0 ;
258  h1_ele_lostHits = 0 ;
263  h2_ele_lostHitsVsPt = 0 ;
264  h1_ele_chi2 = 0 ;
265  h1_ele_chi2_barrel = 0 ;
266  h1_ele_chi2_endcaps = 0 ;
267  h2_ele_chi2VsEta = 0 ;
268  h2_ele_chi2VsPhi = 0 ;
269  h2_ele_chi2VsPt = 0 ;
270 
271  h1_ele_PinMnPout = 0 ;
278 
279  h1_ele_outerP = 0 ;
280  h1_ele_outerP_mode = 0 ;
282  h1_ele_outerPt = 0 ;
283  h1_ele_outerPt_mode = 0 ;
287  h1_ele_EoP = 0 ;
288  h1_ele_EoP_barrel = 0 ;
289  h1_ele_EoP_endcaps = 0 ;
290  h2_ele_EoPVsEta = 0 ;
291  h2_ele_EoPVsPhi = 0 ;
292  h2_ele_EoPVsE = 0 ;
293  h1_ele_EseedOP = 0 ;
296  h2_ele_EseedOPVsEta = 0 ;
297  h2_ele_EseedOPVsPhi = 0 ;
298  h2_ele_EseedOPVsE = 0 ;
299  h1_ele_EoPout = 0 ;
302  h2_ele_EoPoutVsEta = 0 ;
303  h2_ele_EoPoutVsPhi = 0 ;
304  h2_ele_EoPoutVsE = 0 ;
305  h1_ele_EeleOPout = 0 ;
310  h2_ele_EeleOPoutVsE = 0 ;
311 
348 
350  h1_ele_seed_mask_ = 0 ;
354  h1_ele_seed_dphi2_ = 0 ;
360  h1_ele_seed_drz2_ = 0 ;
366 
367  h1_ele_classes = 0 ;
368  h1_ele_eta = 0 ;
369  h1_ele_eta_golden = 0 ;
370  h1_ele_eta_bbrem = 0 ;
371  h1_ele_eta_narrow = 0 ;
372  h1_ele_eta_shower = 0 ;
373 
374  h1_ele_HoE = 0 ;
375  h1_ele_HoE_barrel = 0 ;
376  h1_ele_HoE_endcaps = 0 ;
377  h1_ele_HoE_fiducial = 0 ;
378  h2_ele_HoEVsEta = 0 ;
379  h2_ele_HoEVsPhi = 0 ;
380  h2_ele_HoEVsE = 0 ;
381 
382  h1_ele_fbrem = 0 ;
385  h1_ele_superclusterfbrem = 0 ; // new 2014.02.12
386  h1_ele_superclusterfbrem_barrel = 0 ; // new 2014.02.12
387  h1_ele_superclusterfbrem_endcaps = 0 ; // new 2014.02.12
400 
401  h1_ele_mva = 0 ;
403  h1_ele_provenance = 0 ;
404 
405  h1_ele_tkSumPt_dr03 = 0 ;
415  h1_ele_tkSumPt_dr04 = 0 ;
425 
426  h1_ele_convFlags = 0 ;
428  h1_ele_convDist = 0 ;
429  h1_ele_convDist_all = 0 ;
430  h1_ele_convDcot = 0 ;
431  h1_ele_convDcot_all = 0 ;
432  h1_ele_convRadius = 0 ;
434 
435  }
436 
438  {
440 
441  setBookIndex(-1) ;
442  setBookPrefix("h") ;
445 
446  // matching object type
447  std::string matchingObjectType ;
448  // Emilia
449  matchingObjectType = "GenJet" ;
450 
451  std::string htitle = "# "+matchingObjectType+"s", xtitle = "N_{"+matchingObjectType+"}" ;
452  h1_matchingObjectNum = bookH1withSumw2(iBooker, "matchingObjectNum",htitle,fhits_nbin,0.,fhits_max,xtitle) ;
453 
454  // rec event collections sizes
455  h1_recEleNum_= bookH1(iBooker, "recEleNum","# rec electrons",11, -0.5,10.5,"N_{ele}");
456  h1_recCoreNum_= bookH1(iBooker, "recCoreNum","# rec electron cores",21, -0.5,20.5,"N_{core}");
457  h1_recTrackNum_= bookH1(iBooker, "recTrackNum","# rec gsf tracks",41, -0.5,40.5,"N_{track}");
458  h1_recSeedNum_= bookH1(iBooker, "recSeedNum","# rec electron seeds",101, -0.5,100.5,"N_{seed}");
459  h1_recOfflineVertices_ = bookH1(iBooker, "recOfflineVertices","# rec Offline Primary Vertices",61, -0.5,60.5,"N_{Vertices}"); // new 2015.04.02
460 
461  // mc
462  h1_matchingObjectEta = bookH1withSumw2(iBooker, "matchingObject_eta",matchingObjectType+" #eta",eta_nbin,eta_min,eta_max,"#eta");
463  h1_matchingObjectAbsEta = bookH1withSumw2(iBooker, "matchingObject_abseta",matchingObjectType+" |#eta|",eta_nbin/2,0.,eta_max);
464  h1_matchingObjectP = bookH1withSumw2(iBooker, "matchingObject_P",matchingObjectType+" p",p_nbin,0.,p_max,"p (GeV/c)");
465  h1_matchingObjectPt = bookH1withSumw2(iBooker, "matchingObject_Pt",matchingObjectType+" pt",pteff_nbin,5.,pt_max);
466  h1_matchingObjectPhi = bookH1withSumw2(iBooker, "matchingObject_phi",matchingObjectType+" phi",phi_nbin,phi_min,phi_max);
467  h1_matchingObjectZ = bookH1withSumw2(iBooker, "matchingObject_z",matchingObjectType+" z",xyz_nbin, -25, 25 );
468 
469  setBookPrefix("h_ele") ;
470 
471  // all electrons
472  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");
473  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");
474  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");
475  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");
476  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");
477  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");
478  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");
479  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");
480  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");
481  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") ;
482  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") ;
483  h1_ele_vertexEta_all = bookH1withSumw2(iBooker, "vertexEta_all","ele eta, all reco electrons",eta_nbin,eta_min,eta_max,"","Events","ELE_LOGY E1 P");
484  h1_ele_vertexPt_all = bookH1withSumw2(iBooker, "vertexPt_all","ele p_{T}, all reco electrons",pteff_nbin,5.,pt_max,"","Events","ELE_LOGY E1 P");
485  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})" );
486  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})" );
487 
488  // duplicates
489  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)");
490  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)");
491 
492  // matched electrons
493 
494  htitle = "Efficiency vs matching "+matchingObjectType+" " ;
495  h1_ele_matchingObjectEta_matched = bookH1withSumw2(iBooker, "matchingObjectEta_matched",htitle+"#eta",eta_nbin,eta_min,eta_max);
496  h1_ele_matchingObjectAbsEta_matched = bookH1withSumw2(iBooker, "matchingObjectAbsEta_matched",htitle+"|#eta|",eta_nbin/2,0.,2.5);
497  h1_ele_matchingObjectPt_matched = bookH1(iBooker, "matchingObjectPt_matched",htitle+"p_{T}",pteff_nbin,5.,pt_max);
498  h1_ele_matchingObjectPhi_matched = bookH1withSumw2(iBooker, "matchingObjectPhi_matched",htitle+"phi",phi_nbin,phi_min,phi_max);
499  h1_ele_matchingObjectZ_matched = bookH1withSumw2(iBooker, "matchingObjectZ_matched",htitle+"z",xyz_nbin,-25,25);
500 
501  h1_ele_charge = bookH1withSumw2(iBooker, "charge","ele charge",5,-2.5,2.5,"charge");
502  h2_ele_chargeVsEta = bookH2(iBooker, "chargeVsEta","ele charge vs eta",eta2D_nbin,eta_min,eta_max,5,-2.,2.);
503  h2_ele_chargeVsPhi = bookH2(iBooker, "chargeVsPhi","ele charge vs phi",phi2D_nbin,phi_min,phi_max,5,-2.,2.);
504  h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt","ele charge vs pt",pt_nbin,0.,100.,5,-2.,2.);
505  h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP","ele momentum",p_nbin,0.,p_max,"p_{vertex} (GeV/c)");
506  h1_ele_vertexPt = bookH1withSumw2(iBooker, "vertexPt","ele transverse momentum",pt_nbin,0.,pt_max,"p_{T vertex} (GeV/c)");
507  h2_ele_vertexPtVsEta = bookH2(iBooker, "vertexPtVsEta","ele transverse momentum vs eta",eta2D_nbin,eta_min,eta_max,pt2D_nbin,0.,pt_max);
508  h2_ele_vertexPtVsPhi = bookH2(iBooker, "vertexPtVsPhi","ele transverse momentum vs phi",phi2D_nbin,phi_min,phi_max,pt2D_nbin,0.,pt_max);
509  h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta","ele momentum eta",eta_nbin,eta_min,eta_max,"#eta");
510  h2_ele_vertexEtaVsPhi = bookH2(iBooker, "vertexEtaVsPhi","ele momentum eta vs phi",eta2D_nbin,eta_min,eta_max,phi2D_nbin,phi_min,phi_max );
511  h1_ele_vertexPhi = bookH1withSumw2(iBooker, "vertexPhi","ele momentum #phi",phi_nbin,phi_min,phi_max,"#phi (rad)");
512  h1_ele_vertexX = bookH1withSumw2(iBooker, "vertexX","ele vertex x",xyz_nbin,-0.6,0.6,"x (cm)" );
513  h1_ele_vertexY = bookH1withSumw2(iBooker, "vertexY","ele vertex y",xyz_nbin,-0.6,0.6,"y (cm)" );
514  h1_ele_vertexZ = bookH1withSumw2(iBooker, "vertexZ","ele vertex z",xyz_nbin,-25, 25,"z (cm)" );
515  h1_ele_vertexTIP = bookH1withSumw2(iBooker, "vertexTIP","ele transverse impact parameter (wrt gen vtx)",90,0.,0.15,"TIP (cm)","Events","ELE_LOGY E1 P");
516  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)");
517  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)");
518  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)");
519 
520  htitle = "Electron / Matching "+matchingObjectType+", momemtum" ;
521  xtitle = "P / P_{"+matchingObjectType+"}" ;
522  h1_ele_PoPmatchingObject = bookH1withSumw2(iBooker, "PoPmatchingObject",htitle,popmatching_nbin,popmatching_min,popmatching_max,xtitle);
523  h2_ele_PoPmatchingObjectVsEta = bookH2(iBooker, "PoPmatchingObjectVsEta",htitle+",vs eta",eta2D_nbin,eta_min,eta_max,50,popmatching_min,popmatching_max);
524  h2_ele_PoPmatchingObjectVsPhi = bookH2(iBooker, "PoPmatchingObjectVsPhi",htitle+",vs phi",phi2D_nbin,phi_min,phi_max,50,popmatching_min,popmatching_max);
525  h2_ele_PoPmatchingObjectVsPt = bookH2(iBooker, "PoPmatchingObjectVsPt",htitle+",vs eta",pt2D_nbin,0.,pt_max,50,popmatching_min,popmatching_max);
526  h1_ele_PoPmatchingObject_barrel = bookH1withSumw2(iBooker, "PoPmatchingObject_barrel",htitle+", barrel",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
527  h1_ele_PoPmatchingObject_endcaps = bookH1withSumw2(iBooker, "PoPmatchingObject_endcaps",htitle+", endcaps",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
528  htitle = "Ele - "+matchingObjectType+", " ;
529  xtitle = "#eta - #eta_{"+matchingObjectType+"}" ;
530  h1_ele_EtaMnEtamatchingObject = bookH1withSumw2(iBooker, "EtamatchingObjectEtaTrue",htitle+"eta",deta_nbin,deta_min,deta_max,xtitle);
531  h2_ele_EtaMnEtamatchingObjectVsEta = bookH2(iBooker, "EtaMnEtamatchingObjectVsEta",htitle+"eta, vs eta",eta2D_nbin,eta_min,eta_max,deta_nbin/2,deta_min,deta_max);
532  h2_ele_EtaMnEtamatchingObjectVsPhi = bookH2(iBooker, "EtaMnEtamatchingObjectVsPhi",htitle+"eta, vs phi",phi2D_nbin,phi_min,phi_max,deta_nbin/2,deta_min,deta_max);
533  h2_ele_EtaMnEtamatchingObjectVsPt = bookH2(iBooker, "EtaMnEtamatchingObjectVsPt",htitle+"eta,, vs pt",pt_nbin,0.,pt_max,deta_nbin/2,deta_min,deta_max);
534  xtitle = "#phi - #phi_{"+matchingObjectType+"} (rad)" ;
535  h1_ele_PhiMnPhimatchingObject = bookH1withSumw2(iBooker, "PhiMnPhimatchingObject",htitle+"phi",dphi_nbin,dphi_min,dphi_max,xtitle);
536  h1_ele_PhiMnPhimatchingObject2 = bookH1(iBooker, "PhiMnPhimatchingObject2",htitle+"phi",dphimatch2D_nbin,dphimatch_min,dphimatch_max);
537  h2_ele_PhiMnPhimatchingObjectVsEta = bookH2(iBooker, "PhiMnPhimatchingObjectVsEta",htitle+"phi, vs eta",eta2D_nbin,eta_min,eta_max,dphi_nbin/2,dphi_min,dphi_max);
538  h2_ele_PhiMnPhimatchingObjectVsPhi = bookH2(iBooker, "PhiMnPhimatchingObjectVsPhi",htitle+"phi, vs phi",phi2D_nbin,phi_min,phi_max,dphi_nbin/2,dphi_min,dphi_max);
539  h2_ele_PhiMnPhimatchingObjectVsPt = bookH2(iBooker, "PhiMnPhimatchingObjectVsPt",htitle+"phi, vs pt",pt2D_nbin,0.,pt_max,dphi_nbin/2,dphi_min,dphi_max);
540 
541  // matched electron, superclusters
542 
543  setBookPrefix("h_scl") ;
544 
545  h1_scl_En_ = bookH1withSumw2(iBooker, "energy","ele supercluster energy",p_nbin,0.,p_max);
546  htitle = "Ele supercluster / "+matchingObjectType+", energy" ;
547  xtitle = "E/E_{"+matchingObjectType+"}" ;
548  h1_scl_EoEmatchingObject_barrel = bookH1withSumw2(iBooker, "EoEmatchingObject_barrel",htitle+", barrel",50,0.2,1.2,xtitle);
549  h1_scl_EoEmatchingObject_endcaps = bookH1withSumw2(iBooker, "EoEmatchingObject_endcaps",htitle+", endcaps",50,0.2,1.2,xtitle);
550  h1_scl_Et_ = bookH1withSumw2(iBooker, "et","ele supercluster transverse energy",pt_nbin,0.,pt_max);
551  h2_scl_EtVsEta_ = bookH2(iBooker, "etVsEta","ele supercluster transverse energy vs eta",eta2D_nbin,eta_min,eta_max,pt_nbin,0.,pt_max);
552  h2_scl_EtVsPhi_ = bookH2(iBooker, "etVsPhi","ele supercluster transverse energy vs phi",phi2D_nbin,phi_min,phi_max,pt_nbin,0.,pt_max);
553  h2_scl_EtaVsPhi_ = bookH2(iBooker, "etaVsPhi","ele supercluster eta vs phi",phi2D_nbin,phi_min,phi_max,eta2D_nbin,eta_min,eta_max);
554  h1_scl_Eta_ = bookH1withSumw2(iBooker, "eta","ele supercluster eta",eta_nbin,eta_min,eta_max);
555  h1_scl_Phi_ = bookH1withSumw2(iBooker, "phi","ele supercluster phi",phi_nbin,phi_min,phi_max);
556  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");
557  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");
558  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");
559 // new 2014.01.12
560  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");
561  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");
562  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");
563 // new 2014.01.12
564  h1_scl_E1x5_ = bookH1withSumw2(iBooker, "E1x5","ele supercluster energy in 1x5",p_nbin,0., p_max,"E1x5 (GeV)","Events","ELE_LOGY E1 P");
565  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");
566  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");
567  h1_scl_E2x5max_ = bookH1withSumw2(iBooker, "E2x5max","ele supercluster energy in 2x5 max",p_nbin,0.,p_max,"E2x5 (GeV)","Events","ELE_LOGY E1 P");
568  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");
569  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");
570  h1_scl_E5x5_ = bookH1withSumw2(iBooker, "E5x5","ele supercluster energy in 5x5",p_nbin,0.,p_max,"E5x5 (GeV)","Events","ELE_LOGY E1 P");
571  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");
572  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");
573 
574  // matched electron, gsf tracks
575 
576  setBookPrefix("h_ele") ;
577 
578  h1_ele_ambiguousTracks = bookH1withSumw2(iBooker, "ambiguousTracks","ele # ambiguous tracks", 5,0.,5.,"N_{ambiguous tracks}","Events","ELE_LOGY E1 P");
579  h2_ele_ambiguousTracksVsEta = bookH2(iBooker, "ambiguousTracksVsEta","ele # ambiguous tracks vs eta",eta2D_nbin,eta_min,eta_max,5,0.,5.);
580  h2_ele_ambiguousTracksVsPhi = bookH2(iBooker, "ambiguousTracksVsPhi","ele # ambiguous tracks vs phi",phi2D_nbin,phi_min,phi_max,5,0.,5.);
581  h2_ele_ambiguousTracksVsPt = bookH2(iBooker, "ambiguousTracksVsPt","ele # ambiguous tracks vs pt",pt2D_nbin,0.,pt_max,5,0.,5.);
582  h1_ele_foundHits = bookH1withSumw2(iBooker, "foundHits","ele track # found hits",fhits_nbin,0.,fhits_max,"N_{hits}");
583  h2_ele_foundHitsVsEta = bookH2(iBooker, "foundHitsVsEta","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max);
584  h2_ele_foundHitsVsPhi = bookH2(iBooker, "foundHitsVsPhi","ele track # found hits vs phi",phi2D_nbin,phi_min,phi_max,fhits_nbin,0.,fhits_max);
585  h2_ele_foundHitsVsPt = bookH2(iBooker, "foundHitsVsPt","ele track # found hits vs pt",pt2D_nbin,0.,pt_max,fhits_nbin,0.,fhits_max);
586  h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits","ele track # lost hits", 5,0.,5.,"N_{lost hits}");
587  h2_ele_lostHitsVsEta = bookH2(iBooker, "lostHitsVsEta","ele track # lost hits vs eta",eta2D_nbin,eta_min,eta_max,lhits_nbin,0.,lhits_max);
588  h2_ele_lostHitsVsPhi = bookH2(iBooker, "lostHitsVsPhi","ele track # lost hits vs eta",phi2D_nbin,phi_min,phi_max,lhits_nbin,0.,lhits_max);
589  h2_ele_lostHitsVsPt = bookH2(iBooker, "lostHitsVsPt","ele track # lost hits vs eta",pt2D_nbin,0.,pt_max,lhits_nbin,0.,lhits_max);
590  h1_ele_chi2 = bookH1withSumw2(iBooker, "chi2","ele track #chi^{2}",100,0.,15.,"#Chi^{2}","Events","ELE_LOGY E1 P");
591  h2_ele_chi2VsEta = bookH2(iBooker, "chi2VsEta","ele track #chi^{2} vs eta",eta2D_nbin,eta_min,eta_max,50,0.,15.);
592  h2_ele_chi2VsPhi = bookH2(iBooker, "chi2VsPhi","ele track #chi^{2} vs phi",phi2D_nbin,phi_min,phi_max,50,0.,15.);
593  h2_ele_chi2VsPt = bookH2(iBooker, "chi2VsPt","ele track #chi^{2} vs pt",pt2D_nbin,0.,pt_max,50,0.,15.);
594  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)");
595  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)");
596  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.);
597  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.);
598  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.);
599  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.);
600  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.);
601  h1_ele_outerP = bookH1withSumw2(iBooker, "outerP","ele track outer p, mean of GSF components",p_nbin,0.,p_max,"P_{out} (GeV/c)");
602  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)");
603  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);
604  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)");
605  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)");
606  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);
607  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);
608  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);
609 
610  // matched electrons, matching
611  h1_ele_EoP = bookH1withSumw2(iBooker, "EoP","ele E/P_{vertex}",eop_nbin,0.,eop_max,"E/P_{vertex}","Events","ELE_LOGY E1 P");
612  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");
613  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");
614  h2_ele_EoPVsEta = bookH2(iBooker, "EoPVsEta","ele E/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
615  h2_ele_EoPVsPhi = bookH2(iBooker, "EoPVsPhi","ele E/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
616  h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE","ele E/P_{vertex} vs E", 50,0.,p_max ,50,0.,5.);
617  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");
618  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");
619  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");
620  h2_ele_EseedOPVsEta = bookH2(iBooker, "EseedOPVsEta","ele E_{seed}/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
621  h2_ele_EseedOPVsPhi = bookH2(iBooker, "EseedOPVsPhi","ele E_{seed}/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
622  h2_ele_EseedOPVsE = bookH2(iBooker, "EseedOPVsE","ele E_{seed}/P_{vertex} vs E", 50,0.,p_max ,50,0.,5.);
623  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");
624  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");
625  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");
626  h2_ele_EoPoutVsEta = bookH2(iBooker, "EoPoutVsEta","ele E_{seed}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
627  h2_ele_EoPoutVsPhi = bookH2(iBooker, "EoPoutVsPhi","ele E_{seed}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
628  h2_ele_EoPoutVsE = bookH2(iBooker, "EoPoutVsE","ele E_{seed}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
629  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");
630  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");
631  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");
632  h2_ele_EeleOPoutVsEta = bookH2(iBooker, "EeleOPoutVsEta","ele E_{ele}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
633  h2_ele_EeleOPoutVsPhi = bookH2(iBooker, "EeleOPoutVsPhi","ele E_{ele}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
634  h2_ele_EeleOPoutVsE = bookH2(iBooker, "EeleOPoutVsE","ele E_{ele}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
635  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");
636  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");
637  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");
638  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);
639  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);
640  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);
641  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");
642  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");
643  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");
644  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);
645  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);
646  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);
647  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");
648  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");
649  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");
650  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);
651  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);
652  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);
653  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");
654  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");
655  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");
656  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);
657  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);
658  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);
659  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");
660  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");
661  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");
662  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);
663  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);
664  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);
665  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");
666  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");
667  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");
668  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);
669  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);
670  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);
671  h1_ele_HoE = bookH1withSumw2(iBooker, "HoE","ele hadronic energy / em energy",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ;
672  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") ;
673  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") ;
674  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") ;
675  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") ;
676  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") ;
677  h1_ele_hcalDepth1OverEcalBc = bookH1withSumw2(iBooker, "hcalDepth1OverEcalBc","hcalDepth1OverEcalBc",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
678  h1_ele_hcalDepth1OverEcalBc_barrel = bookH1withSumw2(iBooker, "hcalDepth1OverEcalBc_barrel","hcalDepth1OverEcalBc_barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
679  h1_ele_hcalDepth1OverEcalBc_endcaps = bookH1withSumw2(iBooker, "hcalDepth1OverEcalBc_endcaps","hcalDepth1OverEcalBc_endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
680  h1_ele_hcalDepth2OverEcalBc = bookH1withSumw2(iBooker, "hcalDepth2OverEcalBc","hcalDepth2OverEcalBc",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
681  h1_ele_hcalDepth2OverEcalBc_barrel = bookH1withSumw2(iBooker, "hcalDepth2OverEcalBc_barrel","hcalDepth2OverEcalBc_barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
682  h1_ele_hcalDepth2OverEcalBc_endcaps = bookH1withSumw2(iBooker, "hcalDepth2OverEcalBc_endcaps","hcalDepth2OverEcalBc_endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P");
683  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") ;
684  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) ;
685  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) ;
686  h2_ele_HoEVsE = bookH2(iBooker, "HoEVsE","ele hadronic energy / em energy vs E",p_nbin, 0.,300.,hoe_nbin, hoe_min, hoe_max) ;
687 
688  // seeds
689  h1_ele_seed_subdet2_ = bookH1withSumw2(iBooker, "seedSubdet2","ele seed subdet 2nd layer",11,-0.5,10.5,"2nd hit subdet Id") ;
690  h1_ele_seed_mask_ = bookH1withSumw2(iBooker, "seedMask","ele seed hits mask",13,-0.5,12.5) ;
691  h1_ele_seed_mask_bpix_ = bookH1withSumw2(iBooker, "seedMask_Bpix","ele seed hits mask when subdet2 is bpix",13,-0.5,12.5) ;
692  h1_ele_seed_mask_fpix_ = bookH1withSumw2(iBooker, "seedMask_Fpix","ele seed hits mask when subdet2 is bpix",13,-0.5,12.5) ;
693  h1_ele_seed_mask_tec_ = bookH1withSumw2(iBooker, "seedMask_Tec","ele seed hits mask when subdet2 is bpix",13,-0.5,12.5) ;
694  h1_ele_seed_dphi2_ = bookH1withSumw2(iBooker, "seedDphi2","ele seed dphi 2nd layer", 50,-0.003,+0.003,"#phi_{hit}-#phi_{pred} (rad)") ;
695  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) ;
696  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) ;
697  h1_ele_seed_dphi2pos_ = bookH1withSumw2(iBooker, "seedDphi2Pos","ele seed dphi 2nd layer positron", 50,-0.003,+0.003,"#phi_{hit}-#phi_{pred} (rad)") ;
698  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) ;
699  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) ;
700  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)") ;
701  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) ;
702  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) ;
703  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)") ;
704  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) ;
705  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) ;
706 
707  // classes
708  h1_ele_classes = bookH1withSumw2(iBooker, "classes","ele classes",20,0.0,20.,"class Id");
709  h1_ele_eta = bookH1withSumw2(iBooker, "eta","ele electron eta",eta_nbin/2,0.0,eta_max);
710  h1_ele_eta_golden = bookH1withSumw2(iBooker, "eta_golden","ele electron eta golden",eta_nbin/2,0.0,eta_max);
711  h1_ele_eta_bbrem = bookH1withSumw2(iBooker, "eta_bbrem","ele electron eta bbrem",eta_nbin/2,0.0,eta_max);
712  h1_ele_eta_shower = bookH1withSumw2(iBooker, "eta_shower","ele electron eta showering",eta_nbin/2,0.0,eta_max);
713  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);
714  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);
715  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);
716  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);
717  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);
718  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);
719  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);
720  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);
721  setBookPrefix("h_scl") ;
722  h1_scl_EoEmatchingObjectGolden_barrel = bookH1withSumw2(iBooker, "EoEmatchingObject_golden_barrel","ele supercluster energy / gen energy, golden, barrel",popmatching_nbin,popmatching_min,popmatching_max);
723  h1_scl_EoEmatchingObjectGolden_endcaps = bookH1withSumw2(iBooker, "EoEmatchingObject_golden_endcaps","ele supercluster energy / gen energy, golden, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
724  h1_scl_EoEmatchingObjectShowering_barrel = bookH1withSumw2(iBooker, "EoEmatchingObject_showering_barrel","ele supercluster energy / gen energy, showering, barrel",popmatching_nbin,popmatching_min,popmatching_max);
725  h1_scl_EoEmatchingObjectShowering_endcaps = bookH1withSumw2(iBooker, "EoEmatchingObject_showering_endcaps","ele supercluster energy / gen energy, showering, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
726  setBookPrefix("h_ele") ;
727 
728  // isolation
729  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");
730  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");
731  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");
732  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");
733  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");
734  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");
735  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");
736  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");
737  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");
738  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");
739  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");
740  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");
741  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");
742  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");
743  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");
744  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");
745  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");
746  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");
747  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");
748  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");
749 
750  // newHCAL
751  // isolation new hcal
752  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");
753  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");
754  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");
755 
756  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");
757  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");
758  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");
759 
760  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");
761  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");
762  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");
763 
764  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");
765  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");
766  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");
767 
768  // fbrem
769  h1_ele_fbrem = bookH1withSumw2(iBooker, "fbrem","ele brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}");
770  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}");
771  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}");
772  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}>");
773  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}>");
774  h1_ele_superclusterfbrem = bookH1withSumw2(iBooker, "superclusterfbrem","supercluster brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}");
775  h1_ele_superclusterfbrem_barrel = bookH1withSumw2(iBooker, "superclusterfbrem_barrel","supercluster brem fraction for barrel, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}");
776  h1_ele_superclusterfbrem_endcaps = bookH1withSumw2(iBooker, "superclusterfbrem_endcaps", "supercluster brem franction for endcaps, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}");
777  // e/g et pflow electrons
778  h1_ele_mva = bookH1withSumw2(iBooker, "mva","ele identification mva",100,-1.,1.);
779  h1_ele_mva_barrel = bookH1withSumw2(iBooker, "mva_barrel", "ele identification mva barrel",100,-1.,1.);
780  h1_ele_mva_endcaps = bookH1withSumw2(iBooker, "mva_endcaps", "ele identification mva endcaps",100,-1.,1.);
781  h1_ele_mva_isolated = bookH1withSumw2(iBooker, "mva_isolated","ele identification mva isolated",100,-1.,1.);
782  h1_ele_mva_barrel_isolated = bookH1withSumw2(iBooker, "mva_isolated_barrel", "ele identification mva isolated barrel",100,-1.,1.);
783  h1_ele_mva_endcaps_isolated = bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps",100,-1.,1.);
784  h1_ele_provenance = bookH1withSumw2(iBooker, "provenance","ele provenance",5,-2.,3.);
785  h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel","ele provenance barrel",5,-2.,3.);
786  h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps","ele provenance endcaps",5,-2.,3.);
787 
788  // pflow isolation variables
789  h1_ele_chargedHadronIso = bookH1withSumw2(iBooker, "chargedHadronIso","chargedHadronIso",100,0.0,20.,"chargedHadronIso","Events","ELE_LOGY E1 P");
790  h1_ele_chargedHadronIso_barrel = bookH1withSumw2(iBooker, "chargedHadronIso_barrel","chargedHadronIso for barrel",100,0.0,20.,"chargedHadronIso_barrel","Events","ELE_LOGY E1 P");
791  h1_ele_chargedHadronIso_endcaps = bookH1withSumw2(iBooker, "chargedHadronIso_endcaps","chargedHadronIso for endcaps",100,0.0,20.,"chargedHadronIso_endcaps","Events","ELE_LOGY E1 P");
792  h1_ele_neutralHadronIso = bookH1withSumw2(iBooker, "neutralHadronIso","neutralHadronIso",21,0.0,20.,"neutralHadronIso","Events", "ELE_LOGY E1 P");
793  h1_ele_neutralHadronIso_barrel = bookH1withSumw2(iBooker, "neutralHadronIso_barrel","neutralHadronIso for barrel",21,0.0,20.,"neutralHadronIso_barrel","Events","ELE_LOGY E1 P");
794  h1_ele_neutralHadronIso_endcaps = bookH1withSumw2(iBooker, "neutralHadronIso_endcaps","neutralHadronIso for endcaps",21,0.0,20.,"neutralHadronIso_endcaps","Events","ELE_LOGY E1 P");
795  h1_ele_photonIso = bookH1withSumw2(iBooker, "photonIso","photonIso",100,0.0,20.,"photonIso","Events","ELE_LOGY E1 P");
796  h1_ele_photonIso_barrel = bookH1withSumw2(iBooker, "photonIso_barrel","photonIso for barrel",100,0.0,20.,"photonIso_barrel","Events","ELE_LOGY E1 P");
797  h1_ele_photonIso_endcaps = bookH1withSumw2(iBooker, "photonIso_endcaps","photonIso for endcaps",100,0.0,20.,"photonIso_endcaps","Events","ELE_LOGY E1 P");
798  // -- pflow over pT
799  h1_ele_chargedHadronRelativeIso = bookH1withSumw2(iBooker, "chargedHadronRelativeIso","chargedHadronRelativeIso",100,0.0,2.,"chargedHadronRelativeIso","Events","ELE_LOGY E1 P");
800  h1_ele_chargedHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_barrel","chargedHadronRelativeIso for barrel",100,0.0,2.,"chargedHadronRelativeIso_barrel","Events","ELE_LOGY E1 P");
801  h1_ele_chargedHadronRelativeIso_endcaps = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_endcaps","chargedHadronRelativeIso for endcaps",100,0.0,2.,"chargedHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P");
802  h1_ele_neutralHadronRelativeIso = bookH1withSumw2(iBooker, "neutralHadronRelativeIso","neutralHadronRelativeIso",100,0.0,2.,"neutralHadronRelativeIso","Events","ELE_LOGY E1 P");
803  h1_ele_neutralHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_barrel","neutralHadronRelativeIso for barrel",100,0.0,2.,"neutralHadronRelativeIso_barrel","Events","ELE_LOGY E1 P");
804  h1_ele_neutralHadronRelativeIso_endcaps = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_endcaps","neutralHadronRelativeIso for endcaps",100,0.0,2.,"neutralHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P");
805  h1_ele_photonRelativeIso = bookH1withSumw2(iBooker, "photonRelativeIso","photonRelativeIso",100,0.0,2.,"photonRelativeIso","Events","ELE_LOGY E1 P");
806  h1_ele_photonRelativeIso_barrel = bookH1withSumw2(iBooker, "photonRelativeIso_barrel","photonRelativeIso for barrel",100,0.0,2.,"photonRelativeIso_barrel","Events","ELE_LOGY E1 P");
807  h1_ele_photonRelativeIso_endcaps = bookH1withSumw2(iBooker, "photonRelativeIso_endcaps","photonRelativeIso for endcaps",100,0.0,2.,"photonRelativeIso_endcaps","Events","ELE_LOGY E1 P");
808 
809  // conversion rejection information
810  h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags","conversion rejection flag",5,-2.5,2.5);
811  h1_ele_convFlags_all = bookH1withSumw2(iBooker, "convFlags_all","conversion rejection flag, all electrons",5,-2.5,2.5);
812  h1_ele_convDist = bookH1withSumw2(iBooker, "convDist","distance to the conversion partner",100,-15.,15.);
813  h1_ele_convDist_all = bookH1withSumw2(iBooker, "convDist_all","distance to the conversion partner, all electrons",100,-15.,15.);
814  h1_ele_convDcot = bookH1withSumw2(iBooker, "convDcot","difference of cot(angle) with the conversion partner",100,-CLHEP::pi/2.,CLHEP::pi/2.);
815  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.);
816  h1_ele_convRadius = bookH1withSumw2(iBooker, "convRadius","signed conversion radius",100,0.,130.);
817  h1_ele_convRadius_all = bookH1withSumw2(iBooker, "convRadius_all","signed conversion radius, all electrons",100,0.,130.);
818 
819  }
820 
822  {}
823 
824 
825 //=========================================================================
826 // Main methods
827 //=========================================================================
828 
830  {
831  // get reco electrons
833  iEvent.getByToken(electronCollection_,gsfElectrons);
835  iEvent.getByToken(electronCoreCollection_,gsfElectronCores) ;
836  edm::Handle<GsfTrackCollection> gsfElectronTracks ;
837  iEvent.getByToken(electronTrackCollection_,gsfElectronTracks) ;
838  edm::Handle<ElectronSeedCollection> gsfElectronSeeds ;
839  iEvent.getByToken(electronSeedCollection_,gsfElectronSeeds) ;
840 
841  edm::Handle<edm::ValueMap<double> > isoFromDepsTk03Handle ; iEvent.getByToken( isoFromDepsTk03Tag_ , isoFromDepsTk03Handle ) ;
842  edm::Handle<edm::ValueMap<double> > isoFromDepsTk04Handle ; iEvent.getByToken( isoFromDepsTk04Tag_ , isoFromDepsTk04Handle ) ;
843  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalFull03Handle ; iEvent.getByToken( isoFromDepsEcalFull03Tag_ , isoFromDepsEcalFull03Handle ) ;
844  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalFull04Handle ; iEvent.getByToken( isoFromDepsEcalFull04Tag_ , isoFromDepsEcalFull04Handle ) ;
845  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalReduced03Handle ; iEvent.getByToken( isoFromDepsEcalReduced03Tag_, isoFromDepsEcalReduced03Handle ) ;
846  edm::Handle<edm::ValueMap<double> > isoFromDepsEcalReduced04Handle ; iEvent.getByToken( isoFromDepsEcalReduced04Tag_, isoFromDepsEcalReduced04Handle ) ;
847  edm::Handle<edm::ValueMap<double> > isoFromDepsHcal03Handle ; iEvent.getByToken( isoFromDepsHcal03Tag_ , isoFromDepsHcal03Handle ) ;
848  edm::Handle<edm::ValueMap<double> > isoFromDepsHcal04Handle ; iEvent.getByToken( isoFromDepsHcal04Tag_ , isoFromDepsHcal04Handle ) ;
849 
850  /* new 2015.04.02 */
851  edm::Handle<reco::VertexCollection> vertexCollectionHandle;
852  iEvent.getByToken(offlineVerticesCollection_, vertexCollectionHandle);
853  if(!vertexCollectionHandle.isValid())
854  {edm::LogInfo("ElectronMcFakeValidator::analyze") << "vertexCollectionHandle KO" ;}
855  else
856  {
857  edm::LogInfo("ElectronMcFakeValidator::analyze") << "vertexCollectionHandle OK" ;
858  }
859  /* fin new */
860 
861  // get gen jets
863  iEvent.getByToken(matchingObjectCollection_,genJets);
864 
865  // get the beamspot from the Event:
866  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
867  iEvent.getByToken(beamSpotTag_,recoBeamSpotHandle);
868  const BeamSpot bs = *recoBeamSpotHandle;
869 
870  edm::LogInfo("ElectronMcFakeValidator::analyze")
871  <<"Treating event "<<iEvent.id()
872  <<" with "<<gsfElectrons.product()->size()<<" electrons" ;
873  h1_recEleNum_->Fill((*gsfElectrons).size());
874  h1_recCoreNum_->Fill((*gsfElectronCores).size());
875  h1_recTrackNum_->Fill((*gsfElectronTracks).size());
876  h1_recSeedNum_->Fill((*gsfElectronSeeds).size());
877  h1_recOfflineVertices_->Fill((*vertexCollectionHandle).size()); // new 2015.04.02
878 
879  // all rec electrons
880  reco::GsfElectronCollection::const_iterator gsfIter ;
881  for
882  ( gsfIter=gsfElectrons->begin() ;
883  gsfIter!=gsfElectrons->end() ;
884  gsfIter++ )
885  {
886  // preselect electrons
887  if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_)
888  { continue ; }
889 
890  h1_ele_EoverP_all->Fill( gsfIter->eSuperClusterOverP() );
891  h1_ele_EseedOP_all->Fill( gsfIter->eSeedClusterOverP() );
892  h1_ele_EoPout_all->Fill( gsfIter->eSeedClusterOverPout() );
893  h1_ele_EeleOPout_all->Fill( gsfIter->eEleClusterOverPout() );
894  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
895  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
896  h1_ele_dEtaCl_propOut_all->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo());
897  h1_ele_dPhiCl_propOut_all->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo());
898  h1_ele_HoE_all->Fill( gsfIter->hadronicOverEm() );
899  h1_ele_HoE_bc_all->Fill(gsfIter->hcalOverEcalBc());
900  double d
901  = gsfIter->vertex().x()*gsfIter->vertex().x()
902  + gsfIter->vertex().y()*gsfIter->vertex().y() ;
903  h1_ele_TIP_all->Fill( sqrt(d) );
904  h1_ele_vertexEta_all->Fill( gsfIter->eta() );
905  h1_ele_vertexPt_all->Fill( gsfIter->pt() );
906  float enrj1=gsfIter->ecalEnergy();
907 
908  // mee
909  reco::GsfElectronCollection::const_iterator gsfIter2 ;
910  for
911  ( gsfIter2=gsfIter+1 ;
912  gsfIter2!=gsfElectrons->end() ;
913  gsfIter2++ )
914  {
915  math::XYZTLorentzVector p12 = (*gsfIter).p4()+(*gsfIter2).p4();
916  float mee2 = p12.Dot(p12) ;
917  h1_ele_mee_all->Fill(sqrt(mee2)) ;
918  float enrj2=gsfIter2->ecalEnergy();
919  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2),enrj2-enrj1);
920  if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
921  { h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2),enrj2-enrj1) ; }
922  if (gsfIter->charge()*gsfIter2->charge()<0.)
923  { h1_ele_mee_os->Fill(sqrt(mee2)) ; }
924  }
925 
926  // conversion rejection
927  int flags = gsfIter->convFlags() ;
928  if (flags==-9999) { flags=-1 ; }
929  h1_ele_convFlags_all->Fill(flags);
930  if (flags>=0.)
931  {
932  h1_ele_convDist_all->Fill( gsfIter->convDist() );
933  h1_ele_convDcot_all->Fill( gsfIter->convDcot() );
934  h1_ele_convRadius_all->Fill( gsfIter->convRadius() );
935  }
936 
937  }
938 
939  // association matching object-reco electrons
940  int matchingObjectNum=0 ;
941  reco::GenJetCollection::const_iterator moIter ;
942  for
943  ( moIter = genJets->begin() ;
944  moIter != genJets->end() ; ++moIter )
945  {
946 
947  // number of matching objects
948  matchingObjectNum++ ;
949 
950  if (moIter->energy()/cosh(moIter->eta())> maxPt_ || std::abs(moIter->eta())> maxAbsEta_)
951  { continue ; }
952 
953  // suppress the endcaps
954  //if (std::abs(moIter->eta()) > 1.5) continue;
955  // select central z
956  //if ( std::abs((*mcIter)->production_vertex()->position().z())>50.) continue;
957 
958  h1_matchingObjectEta->Fill( moIter->eta() );
959  h1_matchingObjectAbsEta->Fill( std::abs(moIter->eta()) );
960  h1_matchingObjectP->Fill( moIter->energy() );
961  h1_matchingObjectPt->Fill( moIter->energy()/cosh(moIter->eta()) );
962  h1_matchingObjectPhi->Fill( moIter->phi() );
963  h1_matchingObjectZ->Fill( moIter->vz() );
964 
965  // looking for the best matching gsf electron
966  bool okGsfFound = false;
967  double gsfOkRatio = 999999.;
968 
969  // find best matched electron
970  reco::GsfElectron bestGsfElectron ;
971  reco::GsfElectronRef bestGsfElectronRef ;
972  reco::GsfElectronCollection::const_iterator gsfIter ;
974  for
975  ( gsfIter=gsfElectrons->begin(), iElectron=0 ;
976  gsfIter!=gsfElectrons->end() ; gsfIter++, iElectron++ )
977  {
978  double dphi = gsfIter->phi()-moIter->phi();
979  if (std::abs(dphi)>CLHEP::pi)
980  { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi; }
981  double deltaR = sqrt(pow((gsfIter->eta()-moIter->eta()),2) + pow(dphi,2));
982  if ( deltaR < deltaR_ )
983  {
984  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
985  //(gsfIter->charge() > 0.) ){
986  double tmpGsfRatio = gsfIter->p()/moIter->energy() ;
987  if ( std::abs(tmpGsfRatio-1) < std::abs(gsfOkRatio-1) )
988  {
989  gsfOkRatio = tmpGsfRatio ;
990  bestGsfElectronRef = reco::GsfElectronRef(gsfElectrons,iElectron) ;
991  bestGsfElectron = *gsfIter ;
992  okGsfFound = true ;
993  }
994  //}
995  }
996  } // loop over rec ele to look for the best one
997 
998  // analysis when the matching object is matched by a rec electron
999  if (okGsfFound)
1000  {
1001  // electron related distributions
1002  h1_ele_charge->Fill( bestGsfElectron.charge() );
1003  h2_ele_chargeVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.charge() );
1004  h2_ele_chargeVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.charge() );
1005  h2_ele_chargeVsPt->Fill( bestGsfElectron.pt(),bestGsfElectron.charge() );
1006  h1_ele_vertexP->Fill( bestGsfElectron.p() );
1007  h1_ele_vertexPt->Fill( bestGsfElectron.pt() );
1008  h2_ele_vertexPtVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.pt() );
1009  h2_ele_vertexPtVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.pt() );
1010  h1_ele_vertexEta->Fill( bestGsfElectron.eta() );
1011  // generated distributions for matched electrons
1012  h1_ele_matchingObjectPt_matched->Fill( moIter->energy()/cosh(moIter->eta()) );
1013  h1_ele_matchingObjectPhi_matched->Fill( moIter->phi() );
1015  h1_ele_matchingObjectEta_matched->Fill( moIter->eta() );
1016  h2_ele_vertexEtaVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.eta() );
1017  h1_ele_vertexPhi->Fill( bestGsfElectron.phi() );
1018  h1_ele_vertexX->Fill( bestGsfElectron.vertex().x() );
1019  h1_ele_vertexY->Fill( bestGsfElectron.vertex().y() );
1020  h1_ele_vertexZ->Fill( bestGsfElectron.vertex().z() );
1021  h1_ele_matchingObjectZ_matched->Fill( moIter->vz() );
1022  double d
1023  = (bestGsfElectron.vertex().x()-bs.position().x())
1024  * (bestGsfElectron.vertex().x()-bs.position().x())
1025  + (bestGsfElectron.vertex().y()-bs.position().y())
1026  *(bestGsfElectron.vertex().y()-bs.position().y()) ;
1027  d = sqrt(d) ;
1028  h1_ele_vertexTIP->Fill( d );
1029  h2_ele_vertexTIPVsEta->Fill( bestGsfElectron.eta(), d );
1030  h2_ele_vertexTIPVsPhi->Fill( bestGsfElectron.phi(), d );
1031  h2_ele_vertexTIPVsPt->Fill( bestGsfElectron.pt(), d );
1032  h1_ele_EtaMnEtamatchingObject->Fill( bestGsfElectron.eta()-moIter->eta());
1033  h2_ele_EtaMnEtamatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eta()-moIter->eta());
1034  h2_ele_EtaMnEtamatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eta()-moIter->eta());
1035  h2_ele_EtaMnEtamatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.eta()-moIter->eta());
1036  h1_ele_PhiMnPhimatchingObject->Fill( bestGsfElectron.phi()-moIter->phi());
1037  h1_ele_PhiMnPhimatchingObject2->Fill( bestGsfElectron.phi()-moIter->phi());
1038  h2_ele_PhiMnPhimatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.phi()-moIter->phi());
1039  h2_ele_PhiMnPhimatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.phi()-moIter->phi());
1040  h2_ele_PhiMnPhimatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.phi()-moIter->phi());
1041  h1_ele_PoPmatchingObject->Fill( bestGsfElectron.p()/moIter->energy());
1042  h2_ele_PoPmatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.p()/moIter->energy());
1043  h2_ele_PoPmatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.p()/moIter->energy());
1044  h2_ele_PoPmatchingObjectVsPt->Fill( bestGsfElectron.py(), bestGsfElectron.p()/moIter->energy());
1045  if (bestGsfElectron.isEB()) h1_ele_PoPmatchingObject_barrel->Fill( bestGsfElectron.p()/moIter->energy()) ;
1046  if (bestGsfElectron.isEE()) h1_ele_PoPmatchingObject_endcaps->Fill( bestGsfElectron.p()/moIter->energy()) ;
1047 
1048  // supercluster related distributions
1049  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
1050  if (!bestGsfElectron.ecalDrivenSeed()&&bestGsfElectron.trackerDrivenSeed()) sclRef = bestGsfElectron.parentSuperCluster();
1051  if( sclRef.isNonnull() ) {
1052  h1_scl_En_->Fill(sclRef->energy());
1053  double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
1054  double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
1055  h1_scl_Et_->Fill(sclRef->energy()*(Rt/R));
1056  h2_scl_EtVsEta_->Fill(sclRef->eta(),sclRef->energy()*(Rt/R));
1057  h2_scl_EtVsPhi_->Fill(sclRef->phi(),sclRef->energy()*(Rt/R));
1058  if (bestGsfElectron.classification() < 100) h1_scl_EoEmatchingObject_barrel->Fill(sclRef->energy()/moIter->energy());
1059  if (bestGsfElectron.classification() >= 100) h1_scl_EoEmatchingObject_endcaps->Fill(sclRef->energy()/moIter->energy());
1060  h1_scl_Eta_->Fill(sclRef->eta());
1061  h2_scl_EtaVsPhi_->Fill(sclRef->phi(),sclRef->eta());
1062  h1_scl_Phi_->Fill(sclRef->phi());
1063  }
1064  h1_scl_SigIEtaIEta_->Fill(bestGsfElectron.scSigmaIEtaIEta());
1065  if (bestGsfElectron.isEB()) h1_scl_SigIEtaIEta_barrel_->Fill(bestGsfElectron.scSigmaIEtaIEta());
1066  if (bestGsfElectron.isEE()) h1_scl_SigIEtaIEta_endcaps_->Fill(bestGsfElectron.scSigmaIEtaIEta());
1067 // new 2014.01.12
1069  if (bestGsfElectron.isEB()) h1_scl_full5x5_sigmaIetaIeta_barrel_->Fill(bestGsfElectron.full5x5_sigmaIetaIeta());
1070  if (bestGsfElectron.isEE()) h1_scl_full5x5_sigmaIetaIeta_endcaps_->Fill(bestGsfElectron.full5x5_sigmaIetaIeta());
1071 // new 2014.01.12
1072  h1_scl_E1x5_->Fill(bestGsfElectron.scE1x5());
1073  if (bestGsfElectron.isEB()) h1_scl_E1x5_barrel_->Fill(bestGsfElectron.scE1x5());
1074  if (bestGsfElectron.isEE()) h1_scl_E1x5_endcaps_->Fill(bestGsfElectron.scE1x5());
1075  h1_scl_E2x5max_->Fill(bestGsfElectron.scE2x5Max());
1076  if (bestGsfElectron.isEB()) h1_scl_E2x5max_barrel_->Fill(bestGsfElectron.scE2x5Max());
1077  if (bestGsfElectron.isEE()) h1_scl_E2x5max_endcaps_->Fill(bestGsfElectron.scE2x5Max());
1078  h1_scl_E5x5_->Fill(bestGsfElectron.scE5x5());
1079  if (bestGsfElectron.isEB()) h1_scl_E5x5_barrel_->Fill(bestGsfElectron.scE5x5());
1080  if (bestGsfElectron.isEE()) h1_scl_E5x5_endcaps_->Fill(bestGsfElectron.scE5x5());
1081 
1082  // track related distributions
1083  h1_ele_ambiguousTracks->Fill( bestGsfElectron.ambiguousGsfTracksSize() );
1084  h2_ele_ambiguousTracksVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize() );
1085  h2_ele_ambiguousTracksVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize() );
1086  h2_ele_ambiguousTracksVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize() );
1087  if (!readAOD_)
1088  { // track extra does not exist in AOD
1089  h1_ele_foundHits->Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() );
1090  h2_ele_foundHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
1091  h2_ele_foundHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
1092  h2_ele_foundHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
1093  h1_ele_lostHits->Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() );
1094  h2_ele_lostHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
1095  h2_ele_lostHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
1096  h2_ele_lostHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
1097  h1_ele_chi2->Fill( bestGsfElectron.gsfTrack()->normalizedChi2() );
1098  h2_ele_chi2VsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2() );
1099  h2_ele_chi2VsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2() );
1100  h2_ele_chi2VsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2() );
1101  }
1102  // from gsf track interface, hence using mean
1103  if (!readAOD_)
1104  { // track extra does not exist in AOD
1105  h1_ele_PinMnPout->Fill( bestGsfElectron.gsfTrack()->innerMomentum().R() - bestGsfElectron.gsfTrack()->outerMomentum().R() );
1106  h1_ele_outerP->Fill( bestGsfElectron.gsfTrack()->outerMomentum().R() );
1107  h1_ele_outerPt->Fill( bestGsfElectron.gsfTrack()->outerMomentum().Rho() );
1108  }
1109  // from electron interface, hence using mode
1110  h1_ele_PinMnPout_mode->Fill( bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1111  h2_ele_PinMnPoutVsEta_mode->Fill( bestGsfElectron.eta(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1112  h2_ele_PinMnPoutVsPhi_mode->Fill( bestGsfElectron.phi(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1113  h2_ele_PinMnPoutVsPt_mode->Fill( bestGsfElectron.pt(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1114  h2_ele_PinMnPoutVsE_mode->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
1115  if (!readAOD_) // track extra does not exist in AOD
1117  ( bestGsfElectron.gsfTrack()->normalizedChi2(),
1118  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() ) ;
1119  h1_ele_outerP_mode->Fill( bestGsfElectron.trackMomentumOut().R() );
1120  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R() );
1121  h1_ele_outerPt_mode->Fill( bestGsfElectron.trackMomentumOut().Rho() );
1122  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho() );
1123  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho() );
1124  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho() );
1125 
1126  if (!readAOD_)
1127  { // track extra does not exist in AOD
1128  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
1129  ElectronSeedRef elseed=seed.castTo<ElectronSeedRef>();
1130  h1_ele_seed_subdet2_->Fill(elseed->subDet2());
1131  h1_ele_seed_mask_->Fill(elseed->hitsMask());
1132  if (elseed->subDet2()==1)
1133  { h1_ele_seed_mask_bpix_->Fill(elseed->hitsMask()); }
1134  else if (elseed->subDet2()==2)
1135  { h1_ele_seed_mask_fpix_->Fill(elseed->hitsMask()); }
1136  else if (elseed->subDet2()==6)
1137  { h1_ele_seed_mask_tec_->Fill(elseed->hitsMask()); }
1138 
1139  if ( elseed->dPhi2() != std::numeric_limits<float>::infinity() ) {
1140  h1_ele_seed_dphi2_->Fill(elseed->dPhi2());
1141  h2_ele_seed_dphi2VsEta_->Fill(bestGsfElectron.eta(), elseed->dPhi2());
1142  h2_ele_seed_dphi2VsPt_->Fill(bestGsfElectron.pt(), elseed->dPhi2()) ;
1143  }
1144  if ( elseed->dPhi2Pos() != std::numeric_limits<float>::infinity() ) {
1145  h1_ele_seed_dphi2pos_->Fill(elseed->dPhi2Pos());
1146  h2_ele_seed_dphi2posVsEta_->Fill(bestGsfElectron.eta(), elseed->dPhi2Pos());
1147  h2_ele_seed_dphi2posVsPt_->Fill(bestGsfElectron.pt(), elseed->dPhi2Pos());
1148  }
1149  if ( elseed->dRz2() != std::numeric_limits<float>::infinity() ) {
1150  h1_ele_seed_drz2_->Fill(elseed->dRz2());
1151  h2_ele_seed_drz2VsEta_->Fill(bestGsfElectron.eta(), elseed->dRz2());
1152  h2_ele_seed_drz2VsPt_->Fill(bestGsfElectron.pt(), elseed->dRz2());
1153  }
1154  if ( elseed->dRz2Pos() != std::numeric_limits<float>::infinity() ) {
1155  h1_ele_seed_drz2pos_->Fill(elseed->dRz2Pos());
1156  h2_ele_seed_drz2posVsEta_->Fill(bestGsfElectron.eta(), elseed->dRz2Pos());
1157  h2_ele_seed_drz2posVsPt_->Fill(bestGsfElectron.pt(), elseed->dRz2Pos());
1158  }
1159  }
1160  // match distributions
1161  h1_ele_EoP->Fill( bestGsfElectron.eSuperClusterOverP() );
1162  if (bestGsfElectron.isEB()) h1_ele_EoP_barrel->Fill( bestGsfElectron.eSuperClusterOverP() );
1163  if (bestGsfElectron.isEE()) h1_ele_EoP_endcaps->Fill( bestGsfElectron.eSuperClusterOverP() );
1164  h2_ele_EoPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP() );
1165  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP() );
1166  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP() );
1167  h1_ele_EseedOP->Fill( bestGsfElectron.eSeedClusterOverP() );
1168  if (bestGsfElectron.isEB()) h1_ele_EseedOP_barrel->Fill( bestGsfElectron.eSeedClusterOverP() );
1169  if (bestGsfElectron.isEE()) h1_ele_EseedOP_endcaps->Fill( bestGsfElectron.eSeedClusterOverP() );
1170  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP() );
1171  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP() );
1172  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP() );
1173  h1_ele_EoPout->Fill( bestGsfElectron.eSeedClusterOverPout() );
1174  if (bestGsfElectron.isEB()) h1_ele_EoPout_barrel->Fill( bestGsfElectron.eSeedClusterOverPout() );
1175  if (bestGsfElectron.isEE()) h1_ele_EoPout_endcaps->Fill( bestGsfElectron.eSeedClusterOverPout() );
1176  h2_ele_EoPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout() );
1177  h2_ele_EoPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout() );
1178  h2_ele_EoPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout() );
1179  h1_ele_EeleOPout->Fill( bestGsfElectron.eEleClusterOverPout() );
1180  if (bestGsfElectron.isEB()) h1_ele_EeleOPout_barrel->Fill( bestGsfElectron.eEleClusterOverPout() );
1181  if (bestGsfElectron.isEE()) h1_ele_EeleOPout_endcaps->Fill( bestGsfElectron.eEleClusterOverPout() );
1182  h2_ele_EeleOPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout() );
1183  h2_ele_EeleOPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout() );
1184  h2_ele_EeleOPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout() );
1186  if (bestGsfElectron.isEB()) h1_ele_dEtaSc_propVtx_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1187  if (bestGsfElectron.isEE())h1_ele_dEtaSc_propVtx_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1188  h2_ele_dEtaScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1189  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1190  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
1192  if (bestGsfElectron.isEB()) h1_ele_dPhiSc_propVtx_barrel->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1193  if (bestGsfElectron.isEE())h1_ele_dPhiSc_propVtx_endcaps->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1194  h2_ele_dPhiScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1195  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1196  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
1198  if (bestGsfElectron.isEB()) h1_ele_dEtaCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1199  if (bestGsfElectron.isEE()) h1_ele_dEtaCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1200  h2_ele_dEtaClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1201  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1202  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
1204  if (bestGsfElectron.isEB()) h1_ele_dPhiCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1205  if (bestGsfElectron.isEE()) h1_ele_dPhiCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1206  h2_ele_dPhiClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1207  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1208  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
1210  if (bestGsfElectron.isEB()) h1_ele_dEtaEleCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1211  if (bestGsfElectron.isEE()) h1_ele_dEtaEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1212  h2_ele_dEtaEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1213  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1214  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
1216  if (bestGsfElectron.isEB()) h1_ele_dPhiEleCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1217  if (bestGsfElectron.isEE()) h1_ele_dPhiEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1218  h2_ele_dPhiEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1219  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1220  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
1221  h1_ele_HoE->Fill(bestGsfElectron.hadronicOverEm());
1222  h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc());
1223  if (bestGsfElectron.isEB()) h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc());
1224  if (bestGsfElectron.isEE()) h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc());
1225  if (bestGsfElectron.isEB()) h1_ele_HoE_barrel->Fill(bestGsfElectron.hadronicOverEm());
1226  if (bestGsfElectron.isEE()) h1_ele_HoE_endcaps->Fill(bestGsfElectron.hadronicOverEm());
1227  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap()&& !bestGsfElectron.isEBEEGap() &&
1228  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap()) h1_ele_HoE_fiducial->Fill(bestGsfElectron.hadronicOverEm());
1229  h2_ele_HoEVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.hadronicOverEm());
1230  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(),bestGsfElectron.hadronicOverEm());
1231  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(),bestGsfElectron.hadronicOverEm());
1232 
1233  //classes
1234  int eleClass = bestGsfElectron.classification();
1235  if (bestGsfElectron.isEE()) eleClass+=10;
1236  h1_ele_classes->Fill(eleClass);
1237 
1238  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
1239  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
1240  if (bestGsfElectron.classification() == GsfElectron::BIGBREM) h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
1241  //if (bestGsfElectron.classification() == GsfElectron::OLDNARROW) h1_ele_eta_narrow->Fill(std::abs(bestGsfElectron.eta()));
1242  if (bestGsfElectron.classification() == GsfElectron::SHOWERING) h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
1243 
1244  // fbrem
1245 
1246  double fbrem_mode = bestGsfElectron.fbrem();
1247  h1_ele_fbrem->Fill(fbrem_mode);
1248  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(),fbrem_mode);
1249 
1250  if (bestGsfElectron.isEB())
1251  {
1252  double fbrem_mode_barrel = bestGsfElectron.fbrem();
1253  h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel);
1254  }
1255 
1256  if (bestGsfElectron.isEE())
1257  {
1258  double fbrem_mode_endcaps = bestGsfElectron.fbrem();
1259  h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps);
1260  }
1261 
1262 // new 2014/02/12
1263  double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem();
1264  h1_ele_superclusterfbrem->Fill(superclusterfbrem_mode);
1265 
1266  if (bestGsfElectron.isEB())
1267  {
1268  double superclusterfbrem_mode_barrel = bestGsfElectron.superClusterFbrem();
1269  h1_ele_superclusterfbrem_barrel->Fill(superclusterfbrem_mode_barrel);
1270  }
1271 
1272  if (bestGsfElectron.isEE())
1273  {
1274  double superclusterfbrem_mode_endcaps = bestGsfElectron.superClusterFbrem();
1275  h1_ele_superclusterfbrem_endcaps->Fill(superclusterfbrem_mode_endcaps);
1276  }
1277 // new 2014/02/12
1278 
1279  if (!readAOD_) // track extra does not exist in AOD
1280  {
1281  double fbrem_mean = 1. - bestGsfElectron.gsfTrack()->outerMomentum().R()/bestGsfElectron.gsfTrack()->innerMomentum().R();
1282  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(),fbrem_mean) ;
1283  }
1284 
1285  //
1286 
1287  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
1288  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1289  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
1290  if (!readAOD_) // track extra does not exist in AOD
1291  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
1292  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
1293  if (!readAOD_) // track extra does not exist in AOD
1294  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1295  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
1296  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
1297  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
1298  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1299  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
1300  if (!readAOD_) // track extra does not exist in AOD
1301  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
1302  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
1303  if (!readAOD_) // track extra does not exist in AOD
1304  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
1305  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
1306 
1307  h1_ele_mva->Fill(bestGsfElectron.mva_e_pi());
1308  if (bestGsfElectron.isEB()) h1_ele_mva_barrel->Fill(bestGsfElectron.mva_e_pi());
1309  if (bestGsfElectron.isEE()) h1_ele_mva_endcaps->Fill(bestGsfElectron.mva_e_pi());
1310  h1_ele_mva_isolated->Fill(bestGsfElectron.mva_Isolated());
1311  if (bestGsfElectron.isEB()) h1_ele_mva_barrel_isolated->Fill(bestGsfElectron.mva_Isolated());
1312  if (bestGsfElectron.isEE()) h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated());
1313  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(1.);
1314  if (bestGsfElectron.trackerDrivenSeed()) h1_ele_provenance->Fill(-1.);
1315  if (bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(0.);
1316  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(-2.);
1317  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(2.);
1318  if (bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(1.);
1319  if (bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(-1.);
1320  if ((bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(0.);
1321  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(-2.);
1322  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEB()) h1_ele_provenance_barrel->Fill(2.);
1323  if (bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(1.);
1324  if (bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(-1.);
1325  if ((bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(0.);
1326  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(-2.);
1327  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed() && bestGsfElectron.isEE()) h1_ele_provenance_endcaps->Fill(2.);
1328 
1329  // Pflow isolation
1331  if (bestGsfElectron.isEB()) h1_ele_chargedHadronIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt);
1332  if (bestGsfElectron.isEE()) h1_ele_chargedHadronIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt);
1333 
1335  if (bestGsfElectron.isEB()) h1_ele_neutralHadronIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt);
1336  if (bestGsfElectron.isEE()) h1_ele_neutralHadronIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt);
1337 
1339  if (bestGsfElectron.isEB()) h1_ele_photonIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt);
1340  if (bestGsfElectron.isEE()) h1_ele_photonIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt);
1341 
1342  // -- pflow over pT
1343  h1_ele_chargedHadronRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt());
1344  if (bestGsfElectron.isEB()) h1_ele_chargedHadronRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt());
1345  if (bestGsfElectron.isEE()) h1_ele_chargedHadronRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt());
1346 
1347  h1_ele_neutralHadronRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt());
1348  if (bestGsfElectron.isEB()) h1_ele_neutralHadronRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt());
1349  if (bestGsfElectron.isEE()) h1_ele_neutralHadronRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt());
1350 
1351  h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
1352  if (bestGsfElectron.isEB()) h1_ele_photonRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
1353  if (bestGsfElectron.isEE()) h1_ele_photonRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt());
1354 
1355  // isolation
1356  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
1357  if (bestGsfElectron.isEB()) h1_ele_tkSumPt_dr03_barrel->Fill(bestGsfElectron.dr03TkSumPt());
1358  if (bestGsfElectron.isEE()) h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt());
1360  if (bestGsfElectron.isEB()) h1_ele_ecalRecHitSumEt_dr03_barrel->Fill(bestGsfElectron.dr03EcalRecHitSumEt());
1361  if (bestGsfElectron.isEE()) h1_ele_ecalRecHitSumEt_dr03_endcaps->Fill(bestGsfElectron.dr03EcalRecHitSumEt());
1363  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEt_dr03_depth1_barrel->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEt());
1364  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEt_dr03_depth1_endcaps->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEt());
1367  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEtBc());
1368  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEtBc());
1370  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel->Fill(bestGsfElectron.dr03HcalDepth2TowerSumEtBc());
1371  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps->Fill(bestGsfElectron.dr03HcalDepth2TowerSumEtBc());
1372  h1_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt());
1373  if (bestGsfElectron.isEB()) h1_ele_tkSumPt_dr04_barrel->Fill(bestGsfElectron.dr04TkSumPt());
1374  if (bestGsfElectron.isEE()) h1_ele_tkSumPt_dr04_endcaps->Fill(bestGsfElectron.dr04TkSumPt());
1376  if (bestGsfElectron.isEB()) h1_ele_ecalRecHitSumEt_dr04_barrel->Fill(bestGsfElectron.dr04EcalRecHitSumEt());
1377  if (bestGsfElectron.isEE()) h1_ele_ecalRecHitSumEt_dr04_endcaps->Fill(bestGsfElectron.dr04EcalRecHitSumEt());
1379  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEt_dr04_depth1_barrel->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEt());
1380  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEt_dr04_depth1_endcaps->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEt());
1383  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEtBc());
1384  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEtBc());
1386  if (bestGsfElectron.isEB()) h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel->Fill(bestGsfElectron.dr04HcalDepth2TowerSumEtBc());
1387  if (bestGsfElectron.isEE()) h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps->Fill(bestGsfElectron.dr04HcalDepth2TowerSumEtBc());
1388 
1390  if (bestGsfElectron.isEB()) h1_ele_hcalDepth1OverEcalBc_barrel->Fill(bestGsfElectron.hcalDepth1OverEcalBc());
1391  if (bestGsfElectron.isEE()) h1_ele_hcalDepth1OverEcalBc_endcaps->Fill(bestGsfElectron.hcalDepth1OverEcalBc());
1393  if (bestGsfElectron.isEB()) h1_ele_hcalDepth2OverEcalBc_barrel->Fill(bestGsfElectron.hcalDepth2OverEcalBc());
1394  if (bestGsfElectron.isEE()) h1_ele_hcalDepth2OverEcalBc_endcaps->Fill(bestGsfElectron.hcalDepth2OverEcalBc());
1395 
1396  // conversion rejection
1397  int flags = bestGsfElectron.convFlags() ;
1398  if (flags==-9999) { flags=-1 ; }
1399  h1_ele_convFlags->Fill(flags);
1400  if (flags>=0.)
1401  {
1402  h1_ele_convDist->Fill( bestGsfElectron.convDist() );
1403  h1_ele_convDcot->Fill( bestGsfElectron.convDcot() );
1404  h1_ele_convRadius->Fill( bestGsfElectron.convRadius() );
1405  }
1406 
1407  } // gsf electron found
1408 
1409  } // loop overmatching object
1410 
1411  h1_matchingObjectNum->Fill(matchingObjectNum) ;
1412 
1413  }
1414 
1415 
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:618
MonitorElement * h2_ele_ambiguousTracksVsPhi
MonitorElement * h1_ele_matchingObjectPt_matched
T getParameter(std::string const &) const
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:252
SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:188
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:355
float dr03HcalDepth1TowerSumEtBc() const
Definition: GsfElectron.h:496
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth2
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps
MonitorElement * h1_ele_matchingObjectAbsEta_matched
float eSuperClusterOverP() const
Definition: GsfElectron.h:243
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:353
float dr04HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:504
MonitorElement * h1_ele_photonIso_barrel
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
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
virtual const Point & vertex() const
vertex position (overwritten by PF...)
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:289
MonitorElement * h1_ele_photonIso_endcaps
MonitorElement * p1_ele_fbremVsEta_mode
MonitorElement * h1_ele_chargedHadronIso_endcaps
MonitorElement * h1_scl_EoEmatchingObjectShowering_barrel
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_
virtual double phi() const final
momentum azimuthal angle
MonitorElement * h2_ele_PinVsPoutShowering_mode
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth1_barrel
edm::EDGetTokenT< reco::GenJetCollection > matchingObjectCollection_
float dr04TkSumPt() const
Definition: GsfElectron.h:502
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
MonitorElement * h1_ele_tkSumPt_dr03_barrel
MonitorElement * h2_ele_vertexTIPVsPhi
edm::EDGetTokenT< reco::GsfTrackCollection > electronTrackCollection_
MonitorElement * h1_ele_foundHits_endcaps
bool isEERingGap() const
Definition: GsfElectron.h:359
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:494
MonitorElement * h1_ele_lostHits_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_all
float fbrem() const
Definition: GsfElectron.h:698
float scE2x5Max() const
Definition: GsfElectron.h:455
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel
MonitorElement * h1_ele_hcalDepth1OverEcalBc_barrel
MonitorElement * h1_ele_dPhiSc_propVtx_all
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * h2_ele_dPhiScVsPhi_propVtx
MonitorElement * h2_ele_dPhiScVsEta_propVtx
MonitorElement * h2_ele_dPhiEleClVsPhi_propOut
float convDist() const
Definition: GsfElectron.h:553
MonitorElement * h1_ele_dEtaCl_propOut_all
MonitorElement * h2_ele_PinVsPoutShowering_mean
float convRadius() const
Definition: GsfElectron.h:555
MonitorElement * h2_ele_E2mnE1vsMee_all
uint16_t size_type
MonitorElement * h2_ele_seed_drz2VsPt_
bool isEEDeeGap() const
Definition: GsfElectron.h:358
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:692
MonitorElement * h2_ele_ambiguousTracksVsEta
MonitorElement * h2_ele_outerPtVsPt_mode
bool isEE() const
Definition: GsfElectron.h:351
bool isEB() const
Definition: GsfElectron.h:350
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:554
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:433
MonitorElement * h1_ele_matchingObjectEta_matched
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
tuple d
Definition: ztail.py:151
MonitorElement * h1_scl_E2x5max_endcaps_
float dr04HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:505
MonitorElement * h2_ele_EeleOPoutVsEta
MonitorElement * h2_ele_PinMnPoutVsPt_mode
MonitorElement * h1_ele_dEtaCl_propOut
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:247
int iEvent
Definition: GenABIO.cc:230
MonitorElement * h2_ele_dEtaScVsEta_propVtx
MonitorElement * h1_ele_hcalTowerSumEtBc_dr04_depth1
MonitorElement * h2_ele_foundHitsVsPhi
float hadronicOverEm() const
Definition: GsfElectron.h:457
float dr03HcalDepth2TowerSumEtBc() const
Definition: GsfElectron.h:497
MonitorElement * h1_ele_chargedHadronRelativeIso_barrel
MonitorElement * h2_ele_dEtaScVsPt_propVtx
float eSeedClusterOverP() const
Definition: GsfElectron.h:244
MonitorElement * h2_ele_PtinVsPtoutShowering_mode
MonitorElement * h2_ele_dEtaClVsPt_propOut
MonitorElement * h1_ele_PhiMnPhimatchingObject
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:503
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:251
MonitorElement * h2_ele_dPhiClVsPt_propOut
MonitorElement * h1_ele_chargedHadronIso_barrel
T sqrt(T t)
Definition: SSEVec.h:18
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:182
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk04Tag_
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:291
MonitorElement * h2_ele_dPhiEleClVsPt_propOut
MonitorElement * h1_ele_tkSumPt_dr04_endcaps
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:575
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:250
MonitorElement * h1_ele_hcalDepth1OverEcalBc
edm::EDGetTokenT< edm::ValueMap< double > > isoFromDepsTk03Tag_
MonitorElement * h2_ele_dEtaEleClVsPhi_propOut
virtual int charge() const final
electric charge
Definition: LeafCandidate.h:91
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:507
float dr03TkSumPt() const
Definition: GsfElectron.h:491
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:493
MonitorElement * h1_ele_photonRelativeIso_endcaps
virtual double py() const final
y coordinate of momentum vector
float eEleClusterOverPout() const
Definition: GsfElectron.h:246
void setBookPrefix(const std::string &)
edm::EDGetTokenT< reco::VertexCollection > offlineVerticesCollection_
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:574
float eSeedClusterOverPout() const
Definition: GsfElectron.h:245
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:75
float hcalOverEcalBc() const
Definition: GsfElectron.h:428
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:453
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:252
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_
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
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
MonitorElement * h1_ele_tkSumPt_dr04_barrel
MonitorElement * h1_ele_ecalRecHitSumEt_dr04
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * h1_ele_photonRelativeIso
MonitorElement * h2_ele_seed_dphi2VsPt_
T const * product() const
Definition: Handle.h:81
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:249
MonitorElement * h1_ele_PoPmatchingObject_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_barrel
Classification classification() const
Definition: GsfElectron.h:694
MonitorElement * h2_ele_outerPtVsEta_mode
float hcalDepth2OverEcalBc() const
Definition: GsfElectron.h:427
REF castTo() const
Definition: RefToBase.h:271
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:649
float dr04HcalDepth2TowerSumEtBc() const
Definition: GsfElectron.h:508
MonitorElement * h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps
MonitorElement * h2_ele_PinVsPoutGolden_mean
MonitorElement * h1_ele_EeleOPout_barrel
MonitorElement * h2_ele_EeleOPoutVsPhi
MonitorElement * h1_ele_dPhiSc_propVtx
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth2
MonitorElement * h1_scl_SigIEtaIEta_barrel_
MonitorElement * h1_ele_photonRelativeIso_barrel
float mva_Isolated() const
Definition: GsfElectron.h:628
MonitorElement * h1_ele_neutralHadronIso
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:492
virtual double p() const final
magnitude of momentum vector
float mva_e_pi() const
Definition: GsfElectron.h:629
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:248
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsEta
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:551
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:356
MonitorElement * h1_ele_dPhiEleCl_propOut
MonitorElement * h1_ele_EseedOP_barrel
bool trackerDrivenSeed() const
Definition: GsfElectron.h:187
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:456
virtual double eta() const final
momentum pseudorapidity
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:426
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:573
MonitorElement * h1_ele_dPhiCl_propOut_barrel
float caloEnergy() const
Definition: GsfElectron.h:788
MonitorElement * h1_ele_chargedHadronIso
MonitorElement * h1_ele_matchingObjectZ_matched
MonitorElement * h2_ele_PtinVsPtoutGolden_mean
MonitorElement * h1_ele_dPhiEleCl_propOut_barrel
edm::EDGetTokenT< reco::GsfElectronCoreCollection > electronCoreCollection_
MonitorElement * h1_ele_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:43
MonitorElement * h1_ele_PoPmatchingObject_barrel
float scE1x5() const
Definition: GsfElectron.h:454
MonitorElement * h1_scl_full5x5_sigmaIetaIeta_barrel_
MonitorElement * h2_ele_dPhiEleClVsEta_propOut
MonitorElement * h1_ele_ambiguousTracks
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:183
virtual double pt() const final
transverse momentum
bool ecalDrivenSeed() const
Definition: GsfElectron.h:186
MonitorElement * h1_ele_ecalRecHitSumEt_dr04_endcaps
MonitorElement * h1_ele_EeleOPout_endcaps
MonitorElement * h1_ele_chargedHadronRelativeIso_endcaps