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 
9 
20 
23 
29 
30 #include "CLHEP/Units/GlobalPhysicalConstants.h"
31 #include "TMath.h"
32 #include "TFile.h"
33 #include "TH1F.h"
34 #include "TH1I.h"
35 #include "TH2F.h"
36 #include "TProfile.h"
37 #include "TTree.h"
38 #include <vector>
39 #include <iostream>
40 
41 using namespace reco;
42 
44  : ElectronValidator(conf)
45  {
46  outputFile_ = conf.getParameter<std::string>("outputFile");
47  electronCollection_ = conf.getParameter<edm::InputTag>("electronCollection");
48  matchingObjectCollection_ = conf.getParameter<edm::InputTag>("matchingObjectCollection");
49  beamSpotTag_ = conf.getParameter<edm::InputTag>("beamSpot");
50  readAOD_ = conf.getParameter<bool>("readAOD");
51  maxPt_ = conf.getParameter<double>("MaxPt");
52  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
53  deltaR_ = conf.getParameter<double>("DeltaR");
54 
55  // histos bining and limits
56 
57  edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg") ;
58 
59  xyz_nbin=histosSet.getParameter<int>("Nbinxyz");
60 
61  p_nbin=histosSet.getParameter<int>("Nbinp");
62  p2D_nbin=histosSet.getParameter<int>("Nbinp2D");
63  p_max=histosSet.getParameter<double>("Pmax");
64 
65  pt_nbin=histosSet.getParameter<int>("Nbinpt");
66  pt2D_nbin=histosSet.getParameter<int>("Nbinpt2D");
67  pteff_nbin=histosSet.getParameter<int>("Nbinpteff");
68  pt_max=histosSet.getParameter<double>("Ptmax");
69 
70  fhits_nbin=histosSet.getParameter<int>("Nbinfhits");
71  fhits_max=histosSet.getParameter<double>("Fhitsmax");
72 
73  lhits_nbin=histosSet.getParameter<int>("Nbinlhits");
74  lhits_max=histosSet.getParameter<double>("Lhitsmax");
75 
76  eop_nbin=histosSet.getParameter<int>("Nbineop");
77  eop2D_nbin=histosSet.getParameter<int>("Nbineop2D");
78  eop_max=histosSet.getParameter<double>("Eopmax");
79  eopmaxsht=histosSet.getParameter<double>("Eopmaxsht");
80 
81  eta_nbin=histosSet.getParameter<int>("Nbineta");
82  eta2D_nbin=histosSet.getParameter<int>("Nbineta2D");
83  eta_min=histosSet.getParameter<double>("Etamin");
84  eta_max=histosSet.getParameter<double>("Etamax");
85 
86  deta_nbin=histosSet.getParameter<int>("Nbindeta");
87  deta_min=histosSet.getParameter<double>("Detamin");
88  deta_max=histosSet.getParameter<double>("Detamax");
89 
90  detamatch_nbin=histosSet.getParameter<int>("Nbindetamatch");
91  detamatch2D_nbin=histosSet.getParameter<int>("Nbindetamatch2D");
92  detamatch_min=histosSet.getParameter<double>("Detamatchmin");
93  detamatch_max=histosSet.getParameter<double>("Detamatchmax");
94 
95  phi_nbin=histosSet.getParameter<int>("Nbinphi");
96  phi2D_nbin=histosSet.getParameter<int>("Nbinphi2D");
97  phi_min=histosSet.getParameter<double>("Phimin");
98  phi_max=histosSet.getParameter<double>("Phimax");
99 
100  dphi_nbin=histosSet.getParameter<int>("Nbindphi");
101  dphi_min=histosSet.getParameter<double>("Dphimin");
102  dphi_max=histosSet.getParameter<double>("Dphimax");
103 
104  dphimatch_nbin=histosSet.getParameter<int>("Nbindphimatch");
105  dphimatch2D_nbin=histosSet.getParameter<int>("Nbindphimatch2D");
106  dphimatch_min=histosSet.getParameter<double>("Dphimatchmin");
107  dphimatch_max=histosSet.getParameter<double>("Dphimatchmax");
108 
109  mee_nbin= histosSet.getParameter<int>("Nbinmee");
110  mee_min=histosSet.getParameter<double>("Meemin");
111  mee_max=histosSet.getParameter<double>("Meemax");
112 
113  hoe_nbin= histosSet.getParameter<int>("Nbinhoe");
114  hoe_min=histosSet.getParameter<double>("Hoemin");
115  hoe_max=histosSet.getParameter<double>("Hoemax");
116 
117  popmatching_nbin= histosSet.getParameter<int>("Nbinpopmatching");
118  popmatching_min=histosSet.getParameter<double>("Popmatchingmin");
119  popmatching_max=histosSet.getParameter<double>("Popmatchingmax");
120  }
121 
123  {
124  prepareStore() ;
125  setStoreFolder("EgammaV/ElectronMcFakeValidator") ;
126 
127  // matching object type
128  std::string matchingObjectType ;
129  if (std::string::npos!=matchingObjectCollection_.label().find("iterativeCone5GenJets",0))
130  { matchingObjectType = "GenJet" ; }
131  if (matchingObjectType=="")
132  { edm::LogError("ElectronMcFakeValidator::beginJob")<<"Unknown matching object type !" ; }
133  else
134  { edm::LogInfo("ElectronMcFakeValidator::beginJob")<<"Matching object type: "<<matchingObjectType ; }
135  std::string htitle = "# "+matchingObjectType+"s", xtitle = "N_{"+matchingObjectType+"}" ;
136  h1_matchingObjectNum = bookH1withSumw2("h_matchingObjectNum",htitle,fhits_nbin,0.,fhits_max,xtitle) ;
137 
138  // rec event
139  h1_recEleNum_= bookH1("h_recEleNum","# rec electrons",20, 0.,20.,"N_{ele}");
140 
141  // mc
142  h1_matchingObjectEta = bookH1withSumw2("h_matchingObject_eta",matchingObjectType+" #eta",eta_nbin,eta_min,eta_max,"#eta");
143  h1_matchingObjectAbsEta = bookH1withSumw2("h_matchingObject_abseta",matchingObjectType+" |#eta|",eta_nbin/2,0.,eta_max);
144  h1_matchingObjectP = bookH1withSumw2("h_matchingObject_P",matchingObjectType+" p",p_nbin,0.,p_max,"p (GeV/c)");
145  h1_matchingObjectPt = bookH1withSumw2("h_matchingObject_Pt",matchingObjectType+" pt",pteff_nbin,5.,pt_max);
146  h1_matchingObjectPhi = bookH1withSumw2("h_matchingObject_phi",matchingObjectType+" phi",phi_nbin,phi_min,phi_max);
147  h1_matchingObjectZ = bookH1withSumw2("h_matchingObject_z",matchingObjectType+" z",xyz_nbin, -25, 25 );
148 
149  // all electrons
150  h1_ele_EoverP_all = bookH1withSumw2("h_ele_EoverP_all","ele E/P_{vertex}, all reco electrons",eop_nbin,0.,eop_max,"E/P_{vertex}");
151  h1_ele_EseedOP_all = bookH1withSumw2("h_ele_EseedOP_all","ele E_{seed}/P_{vertex}, all reco electrons",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}");
152  h1_ele_EoPout_all = bookH1withSumw2("h_ele_EoPout_all","ele E_{seed}/P_{out}, all reco electrons",eop_nbin,0.,eop_max,"E_{seed}/P_{out}");
153  h1_ele_EeleOPout_all = bookH1withSumw2("h_ele_EeleOPout_all","ele E_{ele}/P_{out}, all reco electrons",eop_nbin,0.,eop_max,"E_{ele}/P_{out}");
154  h1_ele_dEtaSc_propVtx_all = bookH1withSumw2("h_ele_dEtaSc_propVtx_all","ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}");
155  h1_ele_dPhiSc_propVtx_all = bookH1withSumw2("h_ele_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)");
156  h1_ele_dEtaCl_propOut_all = bookH1withSumw2("h_ele_dEtaCl_propOut_all","ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}");
157  h1_ele_dPhiCl_propOut_all = bookH1withSumw2("h_ele_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)");
158  h1_ele_TIP_all = bookH1withSumw2("h_ele_TIP_all","ele vertex transverse radius, all reco electrons", 100,0.,0.2,"r_{T} (cm)");
159  h1_ele_HoE_all = bookH1withSumw2("h_ele_HoE_all","ele hadronic energy / em energy, all reco electrons",hoe_nbin, hoe_min, hoe_max,"H/E") ;
160  h1_ele_vertexEta_all = bookH1withSumw2("h_ele_vertexEta_all","ele eta, all reco electrons",eta_nbin,eta_min,eta_max);
161  h1_ele_vertexPt_all = bookH1withSumw2("h_ele_vertexPt_all","ele p_{T}, all reco electrons",pteff_nbin,5.,pt_max);
162  h1_ele_mee_all = bookH1withSumw2("h_ele_mee_all","ele pairs invariant mass, all reco electrons",mee_nbin, mee_min, mee_max,"m_{ee} (GeV/c^{2})" );
163  h1_ele_mee_os = bookH1withSumw2("h_ele_mee_os","ele pairs invariant mass, opp. sign",mee_nbin, mee_min, mee_max,"m_{e^{+}e^{-}} (GeV/c^{2})" );
164 
165  // duplicates
166  h2_ele_E2mnE1vsMee_all = bookH2("h_ele_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)");
167  h2_ele_E2mnE1vsMee_egeg_all = bookH2("h_ele_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)");
168 
169 // // charge ID
170 // h1_ele_ChargeMnChargeTrue = bookH1withSumw2("h_ele_ChargeMnChargeTrue","ele charge - gen charge ",5,-1.,4.,"q_{rec} - q_{gen}");
171 // h1_ele_matchingObjectEta_matched_qmisid = bookH1withSumw2("h_ele_eta_matched_qmisid","charge misid vs gen eta",eta_nbin,eta_min,eta_max);
172 // h1_ele_matchingObjectAbsEta_matched_qmisid = bookH1withSumw2("h_ele_abseta_matched_qmisid","charge misid vs gen |eta|",eta_nbin/2,0.,eta_max);
173 // h1_ele_matchingObjectPt_matched_qmisid = bookH1withSumw2("h_ele_Pt_matched_qmisid","charge misid vs gen transverse momentum",pteff_nbin,5.,pt_max);
174 // h1_ele_matchingObjectPhi_matched_qmisid = bookH1withSumw2("h_ele_phi_matched_qmisid","charge misid vs gen phi",phi_nbin,phi_min,phi_max);
175 // h1_ele_matchingObjectZ_matched_qmisid = bookH1withSumw2("h_ele_z_matched_qmisid","charge misid vs gen z",xyz_nbin, -25, 25 );
176 
177  // matched electrons
178 
179  htitle = "Efficiency vs matching "+matchingObjectType+" " ;
180  h1_ele_matchingObjectEta_matched = bookH1withSumw2("h_ele_matchingObjectEta_matched",htitle+"#eta",eta_nbin,eta_min,eta_max);
181  h1_ele_matchingObjectAbsEta_matched = bookH1withSumw2("h_ele_matchingObjectAbsEta_matched",htitle+"|#eta|",eta_nbin/2,0.,2.5);
182  h1_ele_matchingObjectPt_matched = bookH1("h_ele_matchingObjectPt_matched",htitle+"p_{T}",pteff_nbin,5.,pt_max);
183  h1_ele_matchingObjectPhi_matched = bookH1withSumw2("h_ele_matchingObjectPhi_matched",htitle+"phi",phi_nbin,phi_min,phi_max);
184  h1_ele_matchingObjectZ_matched = bookH1withSumw2("h_ele_matchingObjectZ_matched",htitle+"z",xyz_nbin,-25,25);
185 
186  h1_ele_charge = bookH1withSumw2("h_ele_charge","ele charge",5,-2.,2.,"charge");
187  h2_ele_chargeVsEta = bookH2("h_ele_chargeVsEta","ele charge vs eta",eta2D_nbin,eta_min,eta_max,5,-2.,2.);
188  h2_ele_chargeVsPhi = bookH2("h_ele_chargeVsPhi","ele charge vs phi",phi2D_nbin,phi_min,phi_max,5,-2.,2.);
189  h2_ele_chargeVsPt = bookH2("h_ele_chargeVsPt","ele charge vs pt",pt_nbin,0.,100.,5,-2.,2.);
190  h1_ele_vertexP = bookH1withSumw2("h_ele_vertexP","ele momentum",p_nbin,0.,p_max,"p_{vertex} (GeV/c)");
191  h1_ele_vertexPt = bookH1withSumw2("h_ele_vertexPt","ele transverse momentum",pt_nbin,0.,pt_max,"p_{T vertex} (GeV/c)");
192  h2_ele_vertexPtVsEta = bookH2("h_ele_vertexPtVsEta","ele transverse momentum vs eta",eta2D_nbin,eta_min,eta_max,pt2D_nbin,0.,pt_max);
193  h2_ele_vertexPtVsPhi = bookH2("h_ele_vertexPtVsPhi","ele transverse momentum vs phi",phi2D_nbin,phi_min,phi_max,pt2D_nbin,0.,pt_max);
194  h1_ele_vertexEta = bookH1withSumw2("h_ele_vertexEta","ele momentum eta",eta_nbin,eta_min,eta_max,"#eta");
195  h2_ele_vertexEtaVsPhi = bookH2("h_ele_vertexEtaVsPhi","ele momentum eta vs phi",eta2D_nbin,eta_min,eta_max,phi2D_nbin,phi_min,phi_max );
196  h1_ele_vertexPhi = bookH1withSumw2("h_ele_vertexPhi","ele momentum #phi",phi_nbin,phi_min,phi_max,"#phi (rad)");
197  h1_ele_vertexX = bookH1withSumw2("h_ele_vertexX","ele vertex x",xyz_nbin,-0.6,0.6,"x (cm)" );
198  h1_ele_vertexY = bookH1withSumw2("h_ele_vertexY","ele vertex y",xyz_nbin,-0.6,0.6,"y (cm)" );
199  h1_ele_vertexZ = bookH1withSumw2("h_ele_vertexZ","ele vertex z",xyz_nbin,-25, 25,"z (cm)" );
200  h1_ele_vertexTIP = bookH1withSumw2("h_ele_vertexTIP","ele transverse impact parameter (wrt gen vtx)",90,0.,0.15,"TIP (cm)");
201  h2_ele_vertexTIPVsEta = bookH2("h_ele_vertexTIPVsEta","ele transverse impact parameter (wrt gen vtx) vs eta",eta2D_nbin,eta_min,eta_max,45,0.,0.15,"#eta","TIP (cm)");
202  h2_ele_vertexTIPVsPhi = bookH2("h_ele_vertexTIPVsPhi","ele transverse impact parameter (wrt gen vtx) vs phi",phi2D_nbin,phi_min,phi_max,45,0.,0.15,"#phi (rad)","TIP (cm)");
203  h2_ele_vertexTIPVsPt = bookH2("h_ele_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)");
204 
205  htitle = "Ele / matching "+matchingObjectType+", momemtum" ;
206  xtitle = "P / P_{"+matchingObjectType+"}" ;
208  h2_ele_PoPmatchingObjectVsEta = bookH2("h_ele_PoPmatchingObjectVsEta",htitle+",vs eta",eta2D_nbin,eta_min,eta_max,50,popmatching_min,popmatching_max);
209  h2_ele_PoPmatchingObjectVsPhi = bookH2("h_ele_PoPmatchingObjectVsPhi",htitle+",vs phi",phi2D_nbin,phi_min,phi_max,50,popmatching_min,popmatching_max);
210  h2_ele_PoPmatchingObjectVsPt = bookH2("h_ele_PoPmatchingObjectVsPt",htitle+",vs eta",pt2D_nbin,0.,pt_max,50,popmatching_min,popmatching_max);
211  h1_ele_PoPmatchingObject_barrel = bookH1withSumw2("h_ele_PoPmatchingObject_barrel",htitle+", barrel",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
212  h1_ele_PoPmatchingObject_endcaps = bookH1withSumw2("h_ele_PoPmatchingObject_endcaps",htitle+", endcaps",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
213  htitle = "Ele - "+matchingObjectType+", " ;
214  xtitle = "#eta - #eta_{"+matchingObjectType+"}" ;
215  h1_ele_EtaMnEtamatchingObject = bookH1withSumw2("h_ele_EtamatchingObjectEtaTrue",htitle+"eta",deta_nbin,deta_min,deta_max,xtitle);
216  h2_ele_EtaMnEtamatchingObjectVsEta = bookH2("h_ele_EtaMnEtamatchingObjectVsEta",htitle+"eta, vs eta",eta2D_nbin,eta_min,eta_max,deta_nbin/2,deta_min,deta_max);
217  h2_ele_EtaMnEtamatchingObjectVsPhi = bookH2("h_ele_EtaMnEtamatchingObjectVsPhi",htitle+"eta, vs phi",phi2D_nbin,phi_min,phi_max,deta_nbin/2,deta_min,deta_max);
218  h2_ele_EtaMnEtamatchingObjectVsPt = bookH2("h_ele_EtaMnEtamatchingObjectVsPt",htitle+"eta,, vs pt",pt_nbin,0.,pt_max,deta_nbin/2,deta_min,deta_max);
219  xtitle = "#phi - #phi_{"+matchingObjectType+"} (rad)" ;
220  h1_ele_PhiMnPhimatchingObject = bookH1withSumw2("h_ele_PhiMnPhimatchingObject",htitle+"phi",dphi_nbin,dphi_min,dphi_max,xtitle);
221  h1_ele_PhiMnPhimatchingObject2 = bookH1("h_ele_PhiMnPhimatchingObject2",htitle+"phi",dphimatch2D_nbin,dphimatch_min,dphimatch_max);
222  h2_ele_PhiMnPhimatchingObjectVsEta = bookH2("h_ele_PhiMnPhimatchingObjectVsEta",htitle+"phi, vs eta",eta2D_nbin,eta_min,eta_max,dphi_nbin/2,dphi_min,dphi_max);
223  h2_ele_PhiMnPhimatchingObjectVsPhi = bookH2("h_ele_PhiMnPhimatchingObjectVsPhi",htitle+"phi, vs phi",phi2D_nbin,phi_min,phi_max,dphi_nbin/2,dphi_min,dphi_max);
224  h2_ele_PhiMnPhimatchingObjectVsPt = bookH2("h_ele_PhiMnPhimatchingObjectVsPt",htitle+"phi, vs pt",pt2D_nbin,0.,pt_max,dphi_nbin/2,dphi_min,dphi_max);
225 
226  // matched electron, superclusters
227 
228  h1_scl_En_ = bookH1withSumw2("h_scl_energy","ele supercluster energy",p_nbin,0.,p_max);
229  htitle = "Ele supercluster / "+matchingObjectType+", energy" ;
230  xtitle = "E/E_{"+matchingObjectType+"}" ;
231  h1_scl_EoEmatchingObject_barrel = bookH1withSumw2("h_scl_EoEmatchingObject_barrel",htitle+", barrel",50,0.2,1.2,xtitle);
232  h1_scl_EoEmatchingObject_endcaps = bookH1withSumw2("h_scl_EoEmatchingObject_endcaps",htitle+", endcaps",50,0.2,1.2,xtitle);
233  h1_scl_Et_ = bookH1withSumw2("h_scl_et","ele supercluster transverse energy",pt_nbin,0.,pt_max);
234  h2_scl_EtVsEta_ = bookH2("h_scl_etVsEta","ele supercluster transverse energy vs eta",eta2D_nbin,eta_min,eta_max,pt_nbin,0.,pt_max);
235  h2_scl_EtVsPhi_ = bookH2("h_scl_etVsPhi","ele supercluster transverse energy vs phi",phi2D_nbin,phi_min,phi_max,pt_nbin,0.,pt_max);
236  h2_scl_EtaVsPhi_ = bookH2("h_scl_etaVsPhi","ele supercluster eta vs phi",phi2D_nbin,phi_min,phi_max,eta2D_nbin,eta_min,eta_max);
237  h1_scl_Eta_ = bookH1withSumw2("h_scl_eta","ele supercluster eta",eta_nbin,eta_min,eta_max);
238  h1_scl_Phi_ = bookH1withSumw2("h_scl_phi","ele supercluster phi",phi_nbin,phi_min,phi_max);
239  h1_scl_SigIEtaIEta_ = bookH1withSumw2("h_scl_sigietaieta","ele supercluster sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}");
240  h1_scl_SigIEtaIEta_barrel_ = bookH1withSumw2("h_scl_sigietaieta_barrel","ele supercluster sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}");
241  h1_scl_SigIEtaIEta_endcaps_ = bookH1withSumw2("h_scl_sigietaieta_endcaps","ele supercluster sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}");
242  h1_scl_E1x5_ = bookH1withSumw2("h_scl_E1x5","ele supercluster energy in 1x5",p_nbin,0., p_max,"E1x5 (GeV)");
243  h1_scl_E1x5_barrel_ = bookH1withSumw2("h_scl_E1x5_barrel","ele supercluster energy in 1x5 barrel",p_nbin,0., p_max,"E1x5 (GeV)");
244  h1_scl_E1x5_endcaps_ = bookH1withSumw2("h_scl_E1x5_endcaps","ele supercluster energy in 1x5 endcaps",p_nbin,0., p_max,"E1x5 (GeV)");
245  h1_scl_E2x5max_ = bookH1withSumw2("h_scl_E2x5max","ele supercluster energy in 2x5 max",p_nbin,0.,p_max,"E2x5 (GeV)");
246  h1_scl_E2x5max_barrel_ = bookH1withSumw2("h_scl_E2x5max_barrel","ele supercluster energy in 2x5 _max barrel",p_nbin,0.,p_max,"E2x5 (GeV)");
247  h1_scl_E2x5max_endcaps_ = bookH1withSumw2("h_scl_E2x5max_endcaps","ele supercluster energy in 2x5 _max endcaps",p_nbin,0.,p_max,"E2x5 (GeV)");
248  h1_scl_E5x5_ = bookH1withSumw2("h_scl_E5x5","ele supercluster energy in 5x5",p_nbin,0.,p_max,"E5x5 (GeV)");
249  h1_scl_E5x5_barrel_ = bookH1withSumw2("h_scl_E5x5_barrel","ele supercluster energy in 5x5 barrel",p_nbin,0.,p_max,"E5x5 (GeV)");
250  h1_scl_E5x5_endcaps_ = bookH1withSumw2("h_scl_E5x5_endcaps","ele supercluster energy in 5x5 endcaps",p_nbin,0.,p_max,"E5x5 (GeV)");
251 // h2_scl_EoEtruePfVsEg = bookH2("h_scl_EoEtruePfVseg","ele supercluster energy / gen energy pflow vs eg",75,-0.1,1.4, 75, -0.1, 1.4,"E/E_{gen} (e/g)","E/E_{gen} (pflow)") ;
252 
253  // matched electron, gsf tracks
254  h1_ele_ambiguousTracks = bookH1withSumw2("h_ele_ambiguousTracks","ele # ambiguous tracks", 5,0.,5.,"N_{ambiguous tracks}");
255  h2_ele_ambiguousTracksVsEta = bookH2("h_ele_ambiguousTracksVsEta","ele # ambiguous tracks vs eta",eta2D_nbin,eta_min,eta_max,5,0.,5.);
256  h2_ele_ambiguousTracksVsPhi = bookH2("h_ele_ambiguousTracksVsPhi","ele # ambiguous tracks vs phi",phi2D_nbin,phi_min,phi_max,5,0.,5.);
257  h2_ele_ambiguousTracksVsPt = bookH2("h_ele_ambiguousTracksVsPt","ele # ambiguous tracks vs pt",pt2D_nbin,0.,pt_max,5,0.,5.);
258  h1_ele_foundHits = bookH1withSumw2("h_ele_foundHits","ele track # found hits",fhits_nbin,0.,fhits_max,"N_{hits}");
259  h2_ele_foundHitsVsEta = bookH2("h_ele_foundHitsVsEta","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max);
260  h2_ele_foundHitsVsPhi = bookH2("h_ele_foundHitsVsPhi","ele track # found hits vs phi",phi2D_nbin,phi_min,phi_max,fhits_nbin,0.,fhits_max);
261  h2_ele_foundHitsVsPt = bookH2("h_ele_foundHitsVsPt","ele track # found hits vs pt",pt2D_nbin,0.,pt_max,fhits_nbin,0.,fhits_max);
262  h1_ele_lostHits = bookH1withSumw2("h_ele_lostHits","ele track # lost hits", 5,0.,5.,"N_{lost hits}");
263  h2_ele_lostHitsVsEta = bookH2("h_ele_lostHitsVsEta","ele track # lost hits vs eta",eta2D_nbin,eta_min,eta_max,lhits_nbin,0.,lhits_max);
264  h2_ele_lostHitsVsPhi = bookH2("h_ele_lostHitsVsPhi","ele track # lost hits vs eta",phi2D_nbin,phi_min,phi_max,lhits_nbin,0.,lhits_max);
265  h2_ele_lostHitsVsPt = bookH2("h_ele_lostHitsVsPt","ele track # lost hits vs eta",pt2D_nbin,0.,pt_max,lhits_nbin,0.,lhits_max);
266  h1_ele_chi2 = bookH1withSumw2("h_ele_chi2","ele track #chi^{2}",100,0.,15.,"#Chi^{2}");
267  h2_ele_chi2VsEta = bookH2("h_ele_chi2VsEta","ele track #chi^{2} vs eta",eta2D_nbin,eta_min,eta_max,50,0.,15.);
268  h2_ele_chi2VsPhi = bookH2("h_ele_chi2VsPhi","ele track #chi^{2} vs phi",phi2D_nbin,phi_min,phi_max,50,0.,15.);
269  h2_ele_chi2VsPt = bookH2("h_ele_chi2VsPt","ele track #chi^{2} vs pt",pt2D_nbin,0.,pt_max,50,0.,15.);
270  h1_ele_PinMnPout = bookH1withSumw2("h_ele_PinMnPout","ele track inner p - outer p, mean of GSF components" ,p_nbin,0.,200.,"P_{vertex} - P_{out} (GeV/c)");
271  h1_ele_PinMnPout_mode = bookH1withSumw2("h_ele_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)");
272  h2_ele_PinMnPoutVsEta_mode = bookH2("h_ele_PinMnPoutVsEta_mode","ele track inner p - outer p vs eta, mode of GSF components" ,eta2D_nbin, eta_min,eta_max,p2D_nbin,0.,100.);
273  h2_ele_PinMnPoutVsPhi_mode = bookH2("h_ele_PinMnPoutVsPhi_mode","ele track inner p - outer p vs phi, mode of GSF components" ,phi2D_nbin, phi_min,phi_max,p2D_nbin,0.,100.);
274  h2_ele_PinMnPoutVsPt_mode = bookH2("h_ele_PinMnPoutVsPt_mode","ele track inner p - outer p vs pt, mode of GSF components" ,pt2D_nbin, 0.,pt_max,p2D_nbin,0.,100.);
275  h2_ele_PinMnPoutVsE_mode = bookH2("h_ele_PinMnPoutVsE_mode","ele track inner p - outer p vs E, mode of GSF components" ,p2D_nbin, 0.,200.,p2D_nbin,0.,100.);
276  h2_ele_PinMnPoutVsChi2_mode = bookH2("h_ele_PinMnPoutVsChi2_mode","ele track inner p - outer p vs track chi2, mode of GSF components" ,50, 0.,20.,p2D_nbin,0.,100.);
277  h1_ele_outerP = bookH1withSumw2("h_ele_outerP","ele track outer p, mean of GSF components",p_nbin,0.,p_max,"P_{out} (GeV/c)");
278  h1_ele_outerP_mode = bookH1withSumw2("h_ele_outerP_mode","ele track outer p, mode of GSF components",p_nbin,0.,p_max,"P_{out} (GeV/c)");
279  h2_ele_outerPVsEta_mode = bookH2("h_ele_outerPVsEta_mode","ele track outer p vs eta mode",eta2D_nbin,eta_min,eta_max,50,0.,p_max);
280  h1_ele_outerPt = bookH1withSumw2("h_ele_outerPt","ele track outer p_{T}, mean of GSF components",pt_nbin,0.,pt_max,"P_{T out} (GeV/c)");
281  h1_ele_outerPt_mode = bookH1withSumw2("h_ele_outerPt_mode","ele track outer p_{T}, mode of GSF components",pt_nbin,0.,pt_max,"P_{T out} (GeV/c)");
282  h2_ele_outerPtVsEta_mode = bookH2("h_ele_outerPtVsEta_mode","ele track outer p_{T} vs eta, mode of GSF components",eta2D_nbin,eta_min,eta_max,pt2D_nbin,0.,pt_max);
283  h2_ele_outerPtVsPhi_mode = bookH2("h_ele_outerPtVsPhi_mode","ele track outer p_{T} vs phi, mode of GSF components",phi2D_nbin,phi_min,phi_max,pt2D_nbin,0.,pt_max);
284  h2_ele_outerPtVsPt_mode = bookH2("h_ele_outerPtVsPt_mode","ele track outer p_{T} vs pt, mode of GSF components",pt2D_nbin,0.,100.,pt2D_nbin,0.,pt_max);
285 
286  // matched electrons, matching
287  h1_ele_EoP = bookH1withSumw2("h_ele_EoP","ele E/P_{vertex}",eop_nbin,0.,eop_max,"E/P_{vertex}");
288  h1_ele_EoP_eg = bookH1withSumw2("h_ele_EoP_eg","ele E/P_{vertex}, ecal driven",eop_nbin,0.,eop_max);
289  h1_ele_EoP_barrel = bookH1withSumw2("h_ele_EoP_barrel","ele E/P_{vertex} barrel",eop_nbin,0.,eop_max,"E/P_{vertex}");
290  h1_ele_EoP_eg_barrel = bookH1withSumw2("h_ele_EoP_eg_barrel","ele E/P_{vertex}, ecal driven barrel",eop_nbin,0.,eop_max);
291  h1_ele_EoP_endcaps = bookH1withSumw2("h_ele_EoP_endcaps","ele E/P_{vertex} endcaps",eop_nbin,0.,eop_max,"E/P_{vertex}");
292  h1_ele_EoP_eg_endcaps = bookH1withSumw2("h_ele_EoP_eg_endcaps","ele E/P_{vertex}, ecal driven endcaps",eop_nbin,0.,eop_max);
293  h2_ele_EoPVsEta = bookH2("h_ele_EoPVsEta","ele E/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
294  h2_ele_EoPVsPhi = bookH2("h_ele_EoPVsPhi","ele E/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
295  h2_ele_EoPVsE = bookH2("h_ele_EoPVsE","ele E/P_{vertex} vs E", 50,0.,p_max ,50,0.,5.);
296  h1_ele_EseedOP = bookH1withSumw2("h_ele_EseedOP","ele E_{seed}/P_{vertex}",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}");
297  h1_ele_EseedOP_eg = bookH1withSumw2("h_ele_EseedOP_eg","ele E_{seed}/P_{vertex}, ecal driven",eop_nbin,0.,eop_max);
298  h1_ele_EseedOP_barrel = bookH1withSumw2("h_ele_EseedOP_barrel","ele E_{seed}/P_{vertex} barrel",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}");
299  h1_ele_EseedOP_eg_barrel = bookH1withSumw2("h_ele_EseedOP_eg_barrel","ele E_{seed}/P_{vertex}, ecal driven barrel",eop_nbin,0.,eop_max);
300  h1_ele_EseedOP_endcaps = bookH1withSumw2("h_ele_EseedOP_endcaps","ele E_{seed}/P_{vertex} endcaps",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}");
301  h1_ele_EseedOP_eg_endcaps = bookH1withSumw2("h_ele_EseedOP_eg_endcaps","ele E_{seed}/P_{vertex}, ecal driven, endcaps",eop_nbin,0.,eop_max);
302  h2_ele_EseedOPVsEta = bookH2("h_ele_EseedOPVsEta","ele E_{seed}/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
303  h2_ele_EseedOPVsPhi = bookH2("h_ele_EseedOPVsPhi","ele E_{seed}/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
304  h2_ele_EseedOPVsE = bookH2("h_ele_EseedOPVsE","ele E_{seed}/P_{vertex} vs E", 50,0.,p_max ,50,0.,5.);
305  h1_ele_EoPout = bookH1withSumw2("h_ele_EoPout","ele E_{seed}/P_{out}",eop_nbin,0.,eop_max,"E_{seed}/P_{out}");
306  h1_ele_EoPout_eg = bookH1withSumw2("h_ele_EoPout_eg","ele E_{seed}/P_{out}, ecal driven",eop_nbin,0.,eop_max);
307  h1_ele_EoPout_barrel = bookH1withSumw2("h_ele_EoPout_barrel","ele E_{seed}/P_{out} barrel",eop_nbin,0.,eop_max,"E_{seed}/P_{out}");
308  h1_ele_EoPout_eg_barrel = bookH1withSumw2("h_ele_EoPout_eg_barrel","ele E_{seed}/P_{out}, ecal driven, barrel",eop_nbin,0.,eop_max);
309  h1_ele_EoPout_endcaps = bookH1withSumw2("h_ele_EoPout_endcaps","ele E_{seed}/P_{out} endcaps",eop_nbin,0.,eop_max,"E_{seed}/P_{out}");
310  h1_ele_EoPout_eg_endcaps = bookH1withSumw2("h_ele_EoPout_eg_endcaps","ele E_{seed}/P_{out}, ecal driven, endcaps",eop_nbin,0.,eop_max);
311  h2_ele_EoPoutVsEta = bookH2("h_ele_EoPoutVsEta","ele E_{seed}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
312  h2_ele_EoPoutVsPhi = bookH2("h_ele_EoPoutVsPhi","ele E_{seed}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
313  h2_ele_EoPoutVsE = bookH2("h_ele_EoPoutVsE","ele E_{seed}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
314  h1_ele_EeleOPout = bookH1withSumw2("h_ele_EeleOPout","ele E_{ele}/P_{out}",eop_nbin,0.,eop_max,"E_{ele}/P_{out}");
315  h1_ele_EeleOPout_eg = bookH1withSumw2("h_ele_EeleOPout_eg","ele E_{ele}/P_{out}, ecal driven",eop_nbin,0.,eop_max);
316  h1_ele_EeleOPout_barrel = bookH1withSumw2("h_ele_EeleOPout_barrel","ele E_{ele}/P_{out} barrel",eop_nbin,0.,eop_max,"E_{ele}/P_{out}");
317  h1_ele_EeleOPout_eg_barrel = bookH1withSumw2("h_ele_EeleOPout_eg_barrel","ele E_{ele}/P_{out}, ecal driven, barrel",eop_nbin,0.,eop_max);
318  h1_ele_EeleOPout_endcaps = bookH1withSumw2("h_ele_EeleOPout_endcaps","ele E_{ele}/P_{out} endcaps",eop_nbin,0.,eop_max,"E_{ele}/P_{out}");
319  h1_ele_EeleOPout_eg_endcaps = bookH1withSumw2("h_ele_EeleOPout_eg_endcaps","ele E_{ele}/P_{out}, ecal driven, endcaps",eop_nbin,0.,eop_max);
320  h2_ele_EeleOPoutVsEta = bookH2("h_ele_EeleOPoutVsEta","ele E_{ele}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
321  h2_ele_EeleOPoutVsPhi = bookH2("h_ele_EeleOPoutVsPhi","ele E_{ele}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
322  h2_ele_EeleOPoutVsE = bookH2("h_ele_EeleOPoutVsE","ele E_{ele}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
323  h1_ele_dEtaSc_propVtx = bookH1withSumw2("h_ele_dEtaSc_propVtx","ele #eta_{sc} - #eta_{tr}, prop from vertex",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}");
324  h1_ele_dEtaSc_propVtx_eg = bookH1withSumw2("h_ele_dEtaSc_propVtx_eg","ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven",detamatch_nbin,detamatch_min,detamatch_max);
325  h1_ele_dEtaSc_propVtx_barrel = bookH1withSumw2("h_ele_dEtaSc_propVtx_barrel","ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}");
326  h1_ele_dEtaSc_propVtx_eg_barrel = bookH1withSumw2("h_ele_dEtaSc_propVtx_eg_barrel","ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, barrel",detamatch_nbin,detamatch_min,detamatch_max);
327  h1_ele_dEtaSc_propVtx_endcaps = bookH1withSumw2("h_ele_dEtaSc_propVtx_endcaps","ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}");
328  h1_ele_dEtaSc_propVtx_eg_endcaps = bookH1withSumw2("h_ele_dEtaSc_propVtx_eg_endcaps","ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, endcaps",detamatch_nbin,detamatch_min,detamatch_max);
329  h2_ele_dEtaScVsEta_propVtx = bookH2("h_ele_dEtaScVsEta_propVtx","ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",eta2D_nbin,eta_min,eta_max,detamatch2D_nbin,detamatch_min,detamatch_max);
330  h2_ele_dEtaScVsPhi_propVtx = bookH2("h_ele_dEtaScVsPhi_propVtx","ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",phi2D_nbin,phi_min,phi_max,detamatch2D_nbin,detamatch_min,detamatch_max);
331  h2_ele_dEtaScVsPt_propVtx = bookH2("h_ele_dEtaScVsPt_propVtx","ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",pt2D_nbin,0.,pt_max,detamatch2D_nbin,detamatch_min,detamatch_max);
332  h1_ele_dPhiSc_propVtx = bookH1withSumw2("h_ele_dPhiSc_propVtx","ele #phi_{sc} - #phi_{tr}, prop from vertex",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)");
333  h1_ele_dPhiSc_propVtx_eg = bookH1withSumw2("h_ele_dPhiSc_propVtx_eg","ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven",dphimatch_nbin,dphimatch_min,dphimatch_max);
334  h1_ele_dPhiSc_propVtx_barrel = bookH1withSumw2("h_ele_dPhiSc_propVtx_barrel","ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)");
335  h1_ele_dPhiSc_propVtx_eg_barrel = bookH1withSumw2("h_ele_dPhiSc_propVtx_eg_barrel","ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max);
336  h1_ele_dPhiSc_propVtx_endcaps = bookH1withSumw2("h_ele_dPhiSc_propVtx_endcaps","ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{sc} - #phi_{tr} (rad)");
337  h1_ele_dPhiSc_propVtx_eg_endcaps = bookH1withSumw2("h_ele_dPhiSc_propVtx_eg_endcaps","ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max);
338  h2_ele_dPhiScVsEta_propVtx = bookH2("h_ele_dPhiScVsEta_propVtx","ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",eta2D_nbin,eta_min,eta_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
339  h2_ele_dPhiScVsPhi_propVtx = bookH2("h_ele_dPhiScVsPhi_propVtx","ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",phi2D_nbin,phi_min,phi_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
340  h2_ele_dPhiScVsPt_propVtx = bookH2("h_ele_dPhiScVsPt_propVtx","ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",pt2D_nbin,0.,pt_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
341  h1_ele_dEtaCl_propOut = bookH1withSumw2("h_ele_dEtaCl_propOut","ele #eta_{cl} - #eta_{tr}, prop from outermost",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{seedcl} - #eta_{tr}");
342  h1_ele_dEtaCl_propOut_eg = bookH1withSumw2("h_ele_dEtaCl_propOut_eg","ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven",detamatch_nbin,detamatch_min,detamatch_max);
343  h1_ele_dEtaCl_propOut_barrel = bookH1withSumw2("h_ele_dEtaCl_propOut_barrel","ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{seedcl} - #eta_{tr}");
344  h1_ele_dEtaCl_propOut_eg_barrel = bookH1withSumw2("h_ele_dEtaCl_propOut_eg_barrel","ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, barrel",detamatch_nbin,detamatch_min,detamatch_max);
345  h1_ele_dEtaCl_propOut_endcaps = bookH1withSumw2("h_ele_dEtaCl_propOut_endcaps","ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{seedcl} - #eta_{tr}");
346  h1_ele_dEtaCl_propOut_eg_endcaps = bookH1withSumw2("h_ele_dEtaCl_propOut_eg_endcaps","ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",detamatch_nbin,detamatch_min,detamatch_max);
347  h2_ele_dEtaClVsEta_propOut = bookH2("h_ele_dEtaClVsEta_propOut","ele #eta_{cl} - #eta_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,detamatch2D_nbin,detamatch_min,detamatch_max);
348  h2_ele_dEtaClVsPhi_propOut = bookH2("h_ele_dEtaClVsPhi_propOut","ele #eta_{cl} - #eta_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,detamatch2D_nbin,detamatch_min,detamatch_max);
349  h2_ele_dEtaClVsPt_propOut = bookH2("h_ele_dEtaScVsPt_propOut","ele #eta_{cl} - #eta_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,detamatch2D_nbin,detamatch_min,detamatch_max);
350  h1_ele_dPhiCl_propOut = bookH1withSumw2("h_ele_dPhiCl_propOut","ele #phi_{cl} - #phi_{tr}, prop from outermost",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)");
351  h1_ele_dPhiCl_propOut_eg = bookH1withSumw2("h_ele_dPhiCl_propOut_eg","ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven",dphimatch_nbin,dphimatch_min,dphimatch_max);
352  h1_ele_dPhiCl_propOut_barrel = bookH1withSumw2("h_ele_dPhiCl_propOut_barrel","ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)");
353  h1_ele_dPhiCl_propOut_eg_barrel = bookH1withSumw2("h_ele_dPhiCl_propOut_eg_barrel","ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max);
354  h1_ele_dPhiCl_propOut_endcaps = bookH1withSumw2("h_ele_dPhiCl_propOut_endcaps","ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)");
355  h1_ele_dPhiCl_propOut_eg_endcaps = bookH1withSumw2("h_ele_dPhiCl_propOut_eg_endcaps","ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max);
356  h2_ele_dPhiClVsEta_propOut = bookH2("h_ele_dPhiClVsEta_propOut","ele #phi_{cl} - #phi_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
357  h2_ele_dPhiClVsPhi_propOut = bookH2("h_ele_dPhiClVsPhi_propOut","ele #phi_{cl} - #phi_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
358  h2_ele_dPhiClVsPt_propOut = bookH2("h_ele_dPhiSClsPt_propOut","ele #phi_{cl} - #phi_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
359  h1_ele_dEtaEleCl_propOut = bookH1withSumw2("h_ele_dEtaEleCl_propOut","ele #eta_{EleCl} - #eta_{tr}, prop from outermost",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{elecl} - #eta_{tr}");
360  h1_ele_dEtaEleCl_propOut_eg = bookH1withSumw2("h_ele_dEtaEleCl_propOut_eg","ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven",detamatch_nbin,detamatch_min,detamatch_max);
361  h1_ele_dEtaEleCl_propOut_barrel = bookH1withSumw2("h_ele_dEtaEleCl_propOut_barrel","ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{elecl} - #eta_{tr}");
362  h1_ele_dEtaEleCl_propOut_eg_barrel = bookH1withSumw2("h_ele_dEtaEleCl_propOut_eg_barrel","ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, barrel",detamatch_nbin,detamatch_min,detamatch_max);
363  h1_ele_dEtaEleCl_propOut_endcaps = bookH1withSumw2("h_ele_dEtaEleCl_propOut_endcaps","ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{elecl} - #eta_{tr}");
364  h1_ele_dEtaEleCl_propOut_eg_endcaps = bookH1withSumw2("h_ele_dEtaEleCl_propOut_eg_endcaps","ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",detamatch_nbin,detamatch_min,detamatch_max);
365  h2_ele_dEtaEleClVsEta_propOut = bookH2("h_ele_dEtaEleClVsEta_propOut","ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,detamatch2D_nbin,detamatch_min,detamatch_max);
366  h2_ele_dEtaEleClVsPhi_propOut = bookH2("h_ele_dEtaEleClVsPhi_propOut","ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,detamatch2D_nbin,detamatch_min,detamatch_max);
367  h2_ele_dEtaEleClVsPt_propOut = bookH2("h_ele_dEtaScVsPt_propOut","ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,detamatch2D_nbin,detamatch_min,detamatch_max);
368  h1_ele_dPhiEleCl_propOut = bookH1withSumw2("h_ele_dPhiEleCl_propOut","ele #phi_{EleCl} - #phi_{tr}, prop from outermost",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{elecl} - #phi_{tr} (rad)");
369  h1_ele_dPhiEleCl_propOut_eg = bookH1withSumw2("h_ele_dPhiEleCl_propOut_eg","ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven",dphimatch_nbin,dphimatch_min,dphimatch_max);
370  h1_ele_dPhiEleCl_propOut_barrel = bookH1withSumw2("h_ele_dPhiEleCl_propOut_barrel","ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{elecl} - #phi_{tr} (rad)");
371  h1_ele_dPhiEleCl_propOut_eg_barrel = bookH1withSumw2("h_ele_dPhiEleCl_propOut_eg_barrel","ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max);
372  h1_ele_dPhiEleCl_propOut_endcaps = bookH1withSumw2("h_ele_dPhiEleCl_propOut_endcaps","ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{elecl} - #phi_{tr} (rad)");
373  h1_ele_dPhiEleCl_propOut_eg_endcaps = bookH1withSumw2("h_ele_dPhiEleCl_propOut_eg_endcaps","ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max);
374  h2_ele_dPhiEleClVsEta_propOut = bookH2("h_ele_dPhiEleClVsEta_propOut","ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
375  h2_ele_dPhiEleClVsPhi_propOut = bookH2("h_ele_dPhiEleClVsPhi_propOut","ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
376  h2_ele_dPhiEleClVsPt_propOut = bookH2("h_ele_dPhiSEleClsPt_propOut","ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max);
377  h1_ele_HoE = bookH1withSumw2("h_ele_HoE","ele hadronic energy / em energy",hoe_nbin, hoe_min, hoe_max,"H/E") ;
378  h1_ele_HoE_eg = bookH1withSumw2("h_ele_HoE_eg","ele hadronic energy / em energy, ecal driven",hoe_nbin, hoe_min, hoe_max) ;
379  h1_ele_HoE_barrel = bookH1withSumw2("h_ele_HoE_barrel","ele hadronic energy / em energy, barrel",hoe_nbin, hoe_min, hoe_max,"H/E") ;
380  h1_ele_HoE_eg_barrel = bookH1withSumw2("h_ele_HoE_eg_barrel","ele hadronic energy / em energy, ecal driven, barrel",hoe_nbin, hoe_min, hoe_max) ;
381  h1_ele_HoE_endcaps = bookH1withSumw2("h_ele_HoE_endcaps","ele hadronic energy / em energy, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E") ;
382  h1_ele_HoE_eg_endcaps = bookH1withSumw2("h_ele_HoE_eg_endcaps","ele hadronic energy / em energy, ecal driven, endcaps",hoe_nbin, hoe_min, hoe_max) ;
383  h1_ele_HoE_fiducial = bookH1withSumw2("h_ele_HoE_fiducial","ele hadronic energy / em energy, fiducial region",hoe_nbin, hoe_min, hoe_max,"H/E") ;
384  h2_ele_HoEVsEta = bookH2("h_ele_HoEVsEta","ele hadronic energy / em energy vs eta",eta_nbin,eta_min,eta_max,hoe_nbin, hoe_min, hoe_max) ;
385  h2_ele_HoEVsPhi = bookH2("h_ele_HoEVsPhi","ele hadronic energy / em energy vs phi",phi2D_nbin,phi_min,phi_max,hoe_nbin, hoe_min, hoe_max) ;
386  h2_ele_HoEVsE = bookH2("h_ele_HoEVsE","ele hadronic energy / em energy vs E",p_nbin, 0.,300.,hoe_nbin, hoe_min, hoe_max) ;
387  h1_ele_seed_dphi2_ = bookH1withSumw2("h_ele_seedDphi2","ele seed dphi 2nd layer", 50,-0.003,+0.003,"#phi_{hit}-#phi_{pred} (rad)") ;
388  h2_ele_seed_dphi2VsEta_ = bookH2("h_ele_seedDphi2VsEta","ele seed dphi 2nd layer vs eta",eta2D_nbin,eta_min,eta_max,50,-0.003,+0.003) ;
389  h2_ele_seed_dphi2VsPt_ = bookH2("h_ele_seedDphi2VsPt","ele seed dphi 2nd layer vs pt",pt2D_nbin,0.,pt_max,50,-0.003,+0.003) ;
390  h1_ele_seed_drz2_ = bookH1withSumw2("h_ele_seedDrz2","ele seed dr (dz) 2nd layer", 50,-0.03,+0.03,"r(z)_{hit}-r(z)_{pred} (cm)") ;
391  h2_ele_seed_drz2VsEta_ = bookH2("h_ele_seedDrz2VsEta","ele seed dr/dz 2nd layer vs eta",eta2D_nbin,eta_min,eta_max,50,-0.03,+0.03) ;
392  h2_ele_seed_drz2VsPt_ = bookH2("h_ele_seedDrz2VsPt","ele seed dr/dz 2nd layer vs pt",pt2D_nbin,0.,pt_max,50,-0.03,+0.03) ;
393  h1_ele_seed_subdet2_ = bookH1withSumw2("h_ele_seedSubdet2","ele seed subdet 2nd layer",10,0.,10.,"2nd hit subdet Id") ;
394 
395  // classes
396  h1_ele_classes = bookH1withSumw2("h_ele_classes","ele classes",20,0.0,20.,"class Id");
397  h1_ele_eta = bookH1withSumw2("h_ele_eta","ele electron eta",eta_nbin/2,0.0,eta_max);
398  h1_ele_eta_golden = bookH1withSumw2("h_ele_eta_golden","ele electron eta golden",eta_nbin/2,0.0,eta_max);
399  h1_ele_eta_bbrem = bookH1withSumw2("h_ele_eta_bbrem","ele electron eta bbrem",eta_nbin/2,0.0,eta_max);
400  h1_ele_eta_narrow = bookH1withSumw2("h_ele_eta_narrow","ele electron eta narrow",eta_nbin/2,0.0,eta_max);
401  h1_ele_eta_shower = bookH1withSumw2("h_ele_eta_show","ele electron eta showering",eta_nbin/2,0.0,eta_max);
402  h2_ele_PinVsPoutGolden_mode = bookH2("h_ele_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);
403  h2_ele_PinVsPoutShowering_mode = bookH2("h_ele_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);
404  h2_ele_PinVsPoutGolden_mean = bookH2("h_ele_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);
405  h2_ele_PinVsPoutShowering_mean = bookH2("h_ele_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);
406  h2_ele_PtinVsPtoutGolden_mode = bookH2("h_ele_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);
407  h2_ele_PtinVsPtoutShowering_mode = bookH2("h_ele_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);
408  h2_ele_PtinVsPtoutGolden_mean = bookH2("h_ele_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);
409  h2_ele_PtinVsPtoutShowering_mean = bookH2("h_ele_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);
410  h1_scl_EoEmatchingObjectGolden_barrel = bookH1withSumw2("h_scl_EoEmatchingObject_golden_barrel","ele supercluster energy / gen energy, golden, barrel",popmatching_nbin,popmatching_min,popmatching_max);
411  h1_scl_EoEmatchingObjectGolden_endcaps = bookH1withSumw2("h_scl_EoEmatchingObject_golden_endcaps","ele supercluster energy / gen energy, golden, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
412  h1_scl_EoEmatchingObjectShowering_barrel = bookH1withSumw2("h_scl_EoEmatchingObject_showering_barrel","ele supercluster energy / gen energy, showering, barrel",popmatching_nbin,popmatching_min,popmatching_max);
413  h1_scl_EoEmatchingObjectShowering_endcaps = bookH1withSumw2("h_scl_EoEmatchingObject_showering_endcaps","ele supercluster energy / gen energy, showering, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
414 
415  // isolation
416  h1_ele_tkSumPt_dr03 = bookH1withSumw2("h_ele_tkSumPt_dr03","tk isolation sum, dR=0.3",100,0.0,20.,"TkIsoSum, cone 0.3 (GeV/c)");
417  h1_ele_ecalRecHitSumEt_dr03 = bookH1withSumw2("h_ele_ecalRecHitSumEt_dr03","ecal isolation sum, dR=0.3",100,0.0,20.,"EcalIsoSum, cone 0.3 (GeV)");
418  h1_ele_hcalTowerSumEt_dr03_depth1 = bookH1withSumw2("h_ele_hcalTowerSumEt_dr03_depth1","hcal depth1 isolation sum, dR=0.3",100,0.0,20.,"Hcal1IsoSum, cone 0.3 (GeV)");
419  h1_ele_hcalTowerSumEt_dr03_depth2 = bookH1withSumw2("h_ele_hcalTowerSumEt_dr03_depth2","hcal depth2 isolation sum, dR=0.3",100,0.0,20.,"Hcal2IsoSum, cone 0.3 (GeV)");
420  h1_ele_tkSumPt_dr04 = bookH1withSumw2("h_ele_tkSumPt_dr04","tk isolation sum, dR=0.4",100,0.0,20.,"TkIsoSum, cone 0.4 (GeV/c)");
421  h1_ele_ecalRecHitSumEt_dr04 = bookH1withSumw2("h_ele_ecalRecHitSumEt_dr04","ecal isolation sum, dR=0.4",100,0.0,20.,"EcalIsoSum, cone 0.4 (GeV)");
422  h1_ele_hcalTowerSumEt_dr04_depth1 = bookH1withSumw2("h_ele_hcalTowerSumEt_dr04_depth1","hcal depth1 isolation sum, dR=0.4",100,0.0,20.,"Hcal1IsoSum, cone 0.4 (GeV)");
423  h1_ele_hcalTowerSumEt_dr04_depth2 = bookH1withSumw2("h_ele_hcalTowerSumEt_dr04_depth2","hcal depth2 isolation sum, dR=0.4",100,0.0,20.,"Hcal2IsoSum, cone 0.4 (GeV)");
424 
425  // fbrem
426  h1_ele_fbrem = bookH1withSumw2("h_ele_fbrem","ele brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}");
427  p1_ele_fbremVsEta_mode = bookP1("h_ele_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}>");
428  p1_ele_fbremVsEta_mean = bookP1("h_ele_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}>");
429 
430  // e/g et pflow electrons
431  h1_ele_mva = bookH1withSumw2("h_ele_mva","ele identification mva",100,-1.,1.);
432  h1_ele_provenance = bookH1withSumw2("h_ele_provenance","ele provenance",5,-2.,3.);
433  }
434 
436  {}
437 
438 
439 //=========================================================================
440 // Main methods
441 //=========================================================================
442 
444  {
445  // get reco electrons
447  iEvent.getByLabel(electronCollection_,gsfElectrons);
448  edm::LogInfo("ElectronMcFakeValidator::analyze")
449  <<"Treating event "<<iEvent.id()
450  <<" with "<<gsfElectrons.product()->size()<<" electrons" ;
451 
452  // get gen jets
454  iEvent.getByLabel(matchingObjectCollection_,genJets);
455 
456  // get the beamspot from the Event:
457  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
458  iEvent.getByLabel(beamSpotTag_,recoBeamSpotHandle);
459  const BeamSpot bs = *recoBeamSpotHandle;
460 
461  h1_recEleNum_->Fill((*gsfElectrons).size());
462 
463  // all rec electrons
464  reco::GsfElectronCollection::const_iterator gsfIter ;
465  for
466  ( gsfIter=gsfElectrons->begin() ;
467  gsfIter!=gsfElectrons->end() ;
468  gsfIter++ )
469  {
470  // preselect electrons
471  if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_)
472  { continue ; }
473  h1_ele_EoverP_all->Fill( gsfIter->eSuperClusterOverP() );
474  h1_ele_EseedOP_all->Fill( gsfIter->eSeedClusterOverP() );
475  h1_ele_EoPout_all->Fill( gsfIter->eSeedClusterOverPout() );
476  h1_ele_EeleOPout_all->Fill( gsfIter->eEleClusterOverPout() );
477  h1_ele_dEtaSc_propVtx_all->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
478  h1_ele_dPhiSc_propVtx_all->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
479  h1_ele_dEtaCl_propOut_all->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo());
480  h1_ele_dPhiCl_propOut_all->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo());
481  h1_ele_HoE_all->Fill( gsfIter->hadronicOverEm() );
482  double d
483  = gsfIter->vertex().x()*gsfIter->vertex().x()
484  + gsfIter->vertex().y()*gsfIter->vertex().y() ;
485  h1_ele_TIP_all->Fill( sqrt(d) );
486  h1_ele_vertexEta_all->Fill( gsfIter->eta() );
487  h1_ele_vertexPt_all->Fill( gsfIter->pt() );
488  float enrj1=gsfIter->superCluster()->energy();
489  // mee
490  reco::GsfElectronCollection::const_iterator gsfIter2 ;
491  for
492  ( gsfIter2=gsfIter+1 ;
493  gsfIter2!=gsfElectrons->end() ;
494  gsfIter2++ )
495  {
496  math::XYZTLorentzVector p12 = (*gsfIter).p4()+(*gsfIter2).p4();
497  float mee2 = p12.Dot(p12) ;
498  h1_ele_mee_all->Fill(sqrt(mee2)) ;
499  float enrj2=gsfIter2->superCluster()->energy();
500  h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2),enrj2-enrj1);
501  if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
502  { h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2),enrj2-enrj1) ; }
503  if (gsfIter->charge()*gsfIter2->charge()<0.)
504  { h1_ele_mee_os->Fill(sqrt(mee2)) ; }
505  }
506  }
507 
508  // association matching object-reco electrons
509  int matchingObjectNum=0 ;
510  reco::GenJetCollection::const_iterator moIter ;
511  for
512  ( moIter = genJets->begin() ;
513  moIter != genJets->end() ; ++moIter )
514  {
515 
516  // number of matching objects
517  matchingObjectNum++ ;
518 
519  if (moIter->energy()/cosh(moIter->eta())> maxPt_ || std::abs(moIter->eta())> maxAbsEta_)
520  { continue ; }
521 
522  // suppress the endcaps
523  //if (std::abs(moIter->eta()) > 1.5) continue;
524  // select central z
525  //if ( std::abs((*mcIter)->production_vertex()->position().z())>50.) continue;
526 
527  h1_matchingObjectEta->Fill( moIter->eta() );
528  h1_matchingObjectAbsEta->Fill( std::abs(moIter->eta()) );
529  h1_matchingObjectP->Fill( moIter->energy() );
530  h1_matchingObjectPt->Fill( moIter->energy()/cosh(moIter->eta()) );
531  h1_matchingObjectPhi->Fill( moIter->phi() );
532  h1_matchingObjectZ->Fill( moIter->vz() );
533 
534  // looking for the best matching gsf electron
535  bool okGsfFound = false;
536  double gsfOkRatio = 999999.;
537 
538  // find best matched electron
539  reco::GsfElectron bestGsfElectron ;
540  reco::GsfElectronCollection::const_iterator gsfIter ;
541  for
542  ( gsfIter=gsfElectrons->begin() ;
543  gsfIter!=gsfElectrons->end() ; gsfIter++ )
544  {
545  double dphi = gsfIter->phi()-moIter->phi();
546  if (std::abs(dphi)>CLHEP::pi)
547  { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi; }
548  double deltaR = sqrt(pow((gsfIter->eta()-moIter->eta()),2) + pow(dphi,2));
549  if ( deltaR < deltaR_ )
550  {
551  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
552  //(gsfIter->charge() > 0.) ){
553  double tmpGsfRatio = gsfIter->p()/moIter->energy() ;
554  if ( std::abs(tmpGsfRatio-1) < std::abs(gsfOkRatio-1) )
555  {
556  gsfOkRatio = tmpGsfRatio ;
557  bestGsfElectron =* gsfIter ;
558  okGsfFound = true ;
559  }
560  //}
561  }
562  } // loop over rec ele to look for the best one
563 
564  // analysis when the matching object is matched by a rec electron
565  if (okGsfFound)
566  {
567  // electron related distributions
568  h1_ele_charge->Fill( bestGsfElectron.charge() );
569  h2_ele_chargeVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.charge() );
570  h2_ele_chargeVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.charge() );
571  h2_ele_chargeVsPt->Fill( bestGsfElectron.pt(),bestGsfElectron.charge() );
572  h1_ele_vertexP->Fill( bestGsfElectron.p() );
573  h1_ele_vertexPt->Fill( bestGsfElectron.pt() );
574  h2_ele_vertexPtVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.pt() );
575  h2_ele_vertexPtVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.pt() );
576  h1_ele_vertexEta->Fill( bestGsfElectron.eta() );
577  // generated distributions for matched electrons
578  h1_ele_matchingObjectPt_matched->Fill( moIter->energy()/cosh(moIter->eta()) );
579  h1_ele_matchingObjectPhi_matched->Fill( moIter->phi() );
581  h1_ele_matchingObjectEta_matched->Fill( moIter->eta() );
582  h2_ele_vertexEtaVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.eta() );
583  h1_ele_vertexPhi->Fill( bestGsfElectron.phi() );
584  h1_ele_vertexX->Fill( bestGsfElectron.vertex().x() );
585  h1_ele_vertexY->Fill( bestGsfElectron.vertex().y() );
586  h1_ele_vertexZ->Fill( bestGsfElectron.vertex().z() );
587  h1_ele_matchingObjectZ_matched->Fill( moIter->vz() );
588  double d
589  = (bestGsfElectron.vertex().x()-bs.position().x())
590  * (bestGsfElectron.vertex().x()-bs.position().x())
591  + (bestGsfElectron.vertex().y()-bs.position().y())
592  *(bestGsfElectron.vertex().y()-bs.position().y()) ;
593  d = sqrt(d) ;
594  h1_ele_vertexTIP->Fill( d );
595  h2_ele_vertexTIPVsEta->Fill( bestGsfElectron.eta(), d );
596  h2_ele_vertexTIPVsPhi->Fill( bestGsfElectron.phi(), d );
597  h2_ele_vertexTIPVsPt->Fill( bestGsfElectron.pt(), d );
598  h1_ele_EtaMnEtamatchingObject->Fill( bestGsfElectron.eta()-moIter->eta());
599  h2_ele_EtaMnEtamatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eta()-moIter->eta());
600  h2_ele_EtaMnEtamatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eta()-moIter->eta());
601  h2_ele_EtaMnEtamatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.eta()-moIter->eta());
602  h1_ele_PhiMnPhimatchingObject->Fill( bestGsfElectron.phi()-moIter->phi());
603  h1_ele_PhiMnPhimatchingObject2->Fill( bestGsfElectron.phi()-moIter->phi());
604  h2_ele_PhiMnPhimatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.phi()-moIter->phi());
605  h2_ele_PhiMnPhimatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.phi()-moIter->phi());
606  h2_ele_PhiMnPhimatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.phi()-moIter->phi());
607  h1_ele_PoPmatchingObject->Fill( bestGsfElectron.p()/moIter->energy());
608  h2_ele_PoPmatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.p()/moIter->energy());
609  h2_ele_PoPmatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.p()/moIter->energy());
610  h2_ele_PoPmatchingObjectVsPt->Fill( bestGsfElectron.py(), bestGsfElectron.p()/moIter->energy());
611  if (bestGsfElectron.isEB()) h1_ele_PoPmatchingObject_barrel->Fill( bestGsfElectron.p()/moIter->energy()) ;
612  if (bestGsfElectron.isEE()) h1_ele_PoPmatchingObject_endcaps->Fill( bestGsfElectron.p()/moIter->energy()) ;
613 
614  // supercluster related distributions
615  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
616  if (!bestGsfElectron.ecalDrivenSeed()&&bestGsfElectron.trackerDrivenSeed()) sclRef = bestGsfElectron.pflowSuperCluster();
617  h1_scl_En_->Fill(sclRef->energy());
618  double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
619  double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
620  h1_scl_Et_->Fill(sclRef->energy()*(Rt/R));
621  h2_scl_EtVsEta_->Fill(sclRef->eta(),sclRef->energy()*(Rt/R));
622  h2_scl_EtVsPhi_->Fill(sclRef->phi(),sclRef->energy()*(Rt/R));
623  if (bestGsfElectron.classification() < 100) h1_scl_EoEmatchingObject_barrel->Fill(sclRef->energy()/moIter->energy());
624  if (bestGsfElectron.classification() >= 100) h1_scl_EoEmatchingObject_endcaps->Fill(sclRef->energy()/moIter->energy());
625  h1_scl_Eta_->Fill(sclRef->eta());
626  h2_scl_EtaVsPhi_->Fill(sclRef->phi(),sclRef->eta());
627  h1_scl_Phi_->Fill(sclRef->phi());
628  h1_scl_SigIEtaIEta_->Fill(bestGsfElectron.scSigmaIEtaIEta());
629  if (bestGsfElectron.isEB()) h1_scl_SigIEtaIEta_barrel_->Fill(bestGsfElectron.scSigmaIEtaIEta());
630  if (bestGsfElectron.isEE()) h1_scl_SigIEtaIEta_endcaps_->Fill(bestGsfElectron.scSigmaIEtaIEta());
631  h1_scl_E1x5_->Fill(bestGsfElectron.scE1x5());
632  if (bestGsfElectron.isEB()) h1_scl_E1x5_barrel_->Fill(bestGsfElectron.scE1x5());
633  if (bestGsfElectron.isEE()) h1_scl_E1x5_endcaps_->Fill(bestGsfElectron.scE1x5());
634  h1_scl_E2x5max_->Fill(bestGsfElectron.scE2x5Max());
635  if (bestGsfElectron.isEB()) h1_scl_E2x5max_barrel_->Fill(bestGsfElectron.scE2x5Max());
636  if (bestGsfElectron.isEE()) h1_scl_E2x5max_endcaps_->Fill(bestGsfElectron.scE2x5Max());
637  h1_scl_E5x5_->Fill(bestGsfElectron.scE5x5());
638  if (bestGsfElectron.isEB()) h1_scl_E5x5_barrel_->Fill(bestGsfElectron.scE5x5());
639  if (bestGsfElectron.isEE()) h1_scl_E5x5_endcaps_->Fill(bestGsfElectron.scE5x5());
640 
641  // track related distributions
642  h1_ele_ambiguousTracks->Fill( bestGsfElectron.ambiguousGsfTracksSize() );
643  h2_ele_ambiguousTracksVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize() );
644  h2_ele_ambiguousTracksVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize() );
645  h2_ele_ambiguousTracksVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize() );
646  if (!readAOD_)
647  { // track extra does not exist in AOD
648  h1_ele_foundHits->Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() );
649  h2_ele_foundHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
650  h2_ele_foundHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
651  h2_ele_foundHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
652  h1_ele_lostHits->Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() );
653  h2_ele_lostHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
654  h2_ele_lostHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
655  h2_ele_lostHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
656  h1_ele_chi2->Fill( bestGsfElectron.gsfTrack()->normalizedChi2() );
657  h2_ele_chi2VsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2() );
658  h2_ele_chi2VsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2() );
659  h2_ele_chi2VsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2() );
660  }
661  // from gsf track interface, hence using mean
662  if (!readAOD_)
663  { // track extra does not exist in AOD
664  h1_ele_PinMnPout->Fill( bestGsfElectron.gsfTrack()->innerMomentum().R() - bestGsfElectron.gsfTrack()->outerMomentum().R() );
665  h1_ele_outerP->Fill( bestGsfElectron.gsfTrack()->outerMomentum().R() );
666  h1_ele_outerPt->Fill( bestGsfElectron.gsfTrack()->outerMomentum().Rho() );
667  }
668  // from electron interface, hence using mode
669  h1_ele_PinMnPout_mode->Fill( bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
670  h2_ele_PinMnPoutVsEta_mode->Fill( bestGsfElectron.eta(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
671  h2_ele_PinMnPoutVsPhi_mode->Fill( bestGsfElectron.phi(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
672  h2_ele_PinMnPoutVsPt_mode->Fill( bestGsfElectron.pt(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
673  h2_ele_PinMnPoutVsE_mode->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
674  if (!readAOD_) // track extra does not exist in AOD
676  ( bestGsfElectron.gsfTrack()->normalizedChi2(),
677  bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() ) ;
678  h1_ele_outerP_mode->Fill( bestGsfElectron.trackMomentumOut().R() );
679  h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R() );
680  h1_ele_outerPt_mode->Fill( bestGsfElectron.trackMomentumOut().Rho() );
681  h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho() );
682  h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho() );
683  h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho() );
684 
685  if (!readAOD_)
686  { // track extra does not exist in AOD
687  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
688  ElectronSeedRef elseed=seed.castTo<ElectronSeedRef>();
689  h1_ele_seed_dphi2_->Fill(elseed->dPhi2());
690  h2_ele_seed_dphi2VsEta_->Fill(bestGsfElectron.eta(), elseed->dPhi2());
691  h2_ele_seed_dphi2VsPt_->Fill(bestGsfElectron.pt(), elseed->dPhi2()) ;
692  h1_ele_seed_drz2_->Fill(elseed->dRz2());
693  h2_ele_seed_drz2VsEta_->Fill(bestGsfElectron.eta(), elseed->dRz2());
694  h2_ele_seed_drz2VsPt_->Fill(bestGsfElectron.pt(), elseed->dRz2());
695  h1_ele_seed_subdet2_->Fill(elseed->subDet2());
696  }
697  // match distributions
698  h1_ele_EoP->Fill( bestGsfElectron.eSuperClusterOverP() );
699  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EoP_eg->Fill( bestGsfElectron.eSuperClusterOverP() );
700  if (bestGsfElectron.isEB()) h1_ele_EoP_barrel->Fill( bestGsfElectron.eSuperClusterOverP() );
701  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoP_eg_barrel->Fill( bestGsfElectron.eSuperClusterOverP() );
702  if (bestGsfElectron.isEE()) h1_ele_EoP_endcaps->Fill( bestGsfElectron.eSuperClusterOverP() );
703  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoP_eg_endcaps->Fill( bestGsfElectron.eSuperClusterOverP() );
704  h2_ele_EoPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP() );
705  h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP() );
706  h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP() );
707  h1_ele_EseedOP->Fill( bestGsfElectron.eSeedClusterOverP() );
708  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EseedOP_eg->Fill( bestGsfElectron.eSeedClusterOverP() );
709  if (bestGsfElectron.isEB()) h1_ele_EseedOP_barrel->Fill( bestGsfElectron.eSeedClusterOverP() );
710  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EseedOP_eg_barrel->Fill( bestGsfElectron.eSeedClusterOverP() );
711  if (bestGsfElectron.isEE()) h1_ele_EseedOP_endcaps->Fill( bestGsfElectron.eSeedClusterOverP() );
712  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EseedOP_eg_endcaps->Fill( bestGsfElectron.eSeedClusterOverP() );
713  h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP() );
714  h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP() );
715  h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP() );
716  h1_ele_EoPout->Fill( bestGsfElectron.eSeedClusterOverPout() );
717  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EoPout_eg->Fill( bestGsfElectron.eSeedClusterOverPout() );
718  if (bestGsfElectron.isEB()) h1_ele_EoPout_barrel->Fill( bestGsfElectron.eSeedClusterOverPout() );
719  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoPout_eg_barrel->Fill( bestGsfElectron.eSeedClusterOverPout() );
720  if (bestGsfElectron.isEE()) h1_ele_EoPout_endcaps->Fill( bestGsfElectron.eSeedClusterOverPout() );
721  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoPout_eg_endcaps->Fill( bestGsfElectron.eSeedClusterOverPout() );
722  h2_ele_EoPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout() );
723  h2_ele_EoPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout() );
724  h2_ele_EoPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout() );
725  h1_ele_EeleOPout->Fill( bestGsfElectron.eEleClusterOverPout() );
726  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EeleOPout_eg->Fill( bestGsfElectron.eEleClusterOverPout() );
727  if (bestGsfElectron.isEB()) h1_ele_EeleOPout_barrel->Fill( bestGsfElectron.eEleClusterOverPout() );
728  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EeleOPout_eg_barrel->Fill( bestGsfElectron.eEleClusterOverPout() );
729  if (bestGsfElectron.isEE()) h1_ele_EeleOPout_endcaps->Fill( bestGsfElectron.eEleClusterOverPout() );
730  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EeleOPout_eg_endcaps->Fill( bestGsfElectron.eEleClusterOverPout() );
731  h2_ele_EeleOPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout() );
732  h2_ele_EeleOPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout() );
733  h2_ele_EeleOPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout() );
735  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaSc_propVtx_eg->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
736  if (bestGsfElectron.isEB()) h1_ele_dEtaSc_propVtx_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
737  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaSc_propVtx_eg_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
738  if (bestGsfElectron.isEE())h1_ele_dEtaSc_propVtx_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
739  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaSc_propVtx_eg_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
740  h2_ele_dEtaScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
741  h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
742  h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
744  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiSc_propVtx_eg->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
745  if (bestGsfElectron.isEB()) h1_ele_dPhiSc_propVtx_barrel->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
746  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiSc_propVtx_eg_barrel->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
747  if (bestGsfElectron.isEE())h1_ele_dPhiSc_propVtx_endcaps->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
748  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiSc_propVtx_eg_endcaps->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
749  h2_ele_dPhiScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
750  h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
751  h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
753  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaCl_propOut_eg->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
754  if (bestGsfElectron.isEB()) h1_ele_dEtaCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
755  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
756  if (bestGsfElectron.isEE()) h1_ele_dEtaCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
757  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
758  h2_ele_dEtaClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
759  h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
760  h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
762  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiCl_propOut_eg->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
763  if (bestGsfElectron.isEB()) h1_ele_dPhiCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
764  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
765  if (bestGsfElectron.isEE()) h1_ele_dPhiCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
766  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
767  h2_ele_dPhiClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
768  h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
769  h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
771  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaEleCl_propOut_eg->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
772  if (bestGsfElectron.isEB()) h1_ele_dEtaEleCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
773  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaEleCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
774  if (bestGsfElectron.isEE()) h1_ele_dEtaEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
775  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaEleCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
776  h2_ele_dEtaEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
777  h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
778  h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
780  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiEleCl_propOut_eg->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
781  if (bestGsfElectron.isEB()) h1_ele_dPhiEleCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
782  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiEleCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
783  if (bestGsfElectron.isEE()) h1_ele_dPhiEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
784  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiEleCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
785  h2_ele_dPhiEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
786  h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
787  h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
788  h1_ele_HoE->Fill(bestGsfElectron.hadronicOverEm());
789  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_HoE_eg->Fill(bestGsfElectron.hadronicOverEm());
790  if (bestGsfElectron.isEB()) h1_ele_HoE_barrel->Fill(bestGsfElectron.hadronicOverEm());
791  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_HoE_eg_barrel->Fill(bestGsfElectron.hadronicOverEm());
792  if (bestGsfElectron.isEE()) h1_ele_HoE_endcaps->Fill(bestGsfElectron.hadronicOverEm());
793  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_HoE_eg_endcaps->Fill(bestGsfElectron.hadronicOverEm());
794  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap()&& !bestGsfElectron.isEBEEGap() &&
795  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap()) h1_ele_HoE_fiducial->Fill(bestGsfElectron.hadronicOverEm());
796  h2_ele_HoEVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.hadronicOverEm());
797  h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(),bestGsfElectron.hadronicOverEm());
798  h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(),bestGsfElectron.hadronicOverEm());
799 
800  //classes
801  int eleClass = bestGsfElectron.classification();
802  if (bestGsfElectron.isEE()) eleClass+=10;
803  h1_ele_classes->Fill(eleClass);
804 
805  h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
806  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
807  if (bestGsfElectron.classification() == GsfElectron::BIGBREM) h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
808  if (bestGsfElectron.classification() == GsfElectron::OLDNARROW) h1_ele_eta_narrow->Fill(std::abs(bestGsfElectron.eta()));
809  if (bestGsfElectron.classification() == GsfElectron::SHOWERING) h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
810 
811  //fbrem
812  double fbrem_mean=0.;
813  if (!readAOD_) // track extra does not exist in AOD
814  fbrem_mean = 1. - bestGsfElectron.gsfTrack()->outerMomentum().R()/bestGsfElectron.gsfTrack()->innerMomentum().R();
815  double fbrem_mode = bestGsfElectron.fbrem();
816  h1_ele_fbrem->Fill(fbrem_mode);
817  p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(),fbrem_mode);
818  if (!readAOD_) // track extra does not exist in AOD
819  p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(),fbrem_mean);
820 
821  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
822  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
823  h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
824  if (!readAOD_) // track extra does not exist in AOD
825  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
826  h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
827  if (!readAOD_) // track extra does not exist in AOD
828  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
829  h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
830  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
831  h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
832  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
833  h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
834  if (!readAOD_) // track extra does not exist in AOD
835  if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
836  h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
837  if (!readAOD_) // track extra does not exist in AOD
838  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
839  h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
840 
841  h1_ele_mva->Fill(bestGsfElectron.mva());
842  if (bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(1.);
843  if (bestGsfElectron.trackerDrivenSeed()) h1_ele_provenance->Fill(-1.);
844  if (bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(0.);
845  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(-2.);
846  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(2.);
847 
848  h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
852  h1_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt());
856 
857  } // gsf electron found
858 
859 // } // matching object found
860 
861 // }
862 
863  } // loop overmatching object
864 
865  h1_matchingObjectNum->Fill(matchingObjectNum) ;
866 
867  }
868 
870  {
871  if (outputFile_!="")
872  {
873  setStoreFolder("EgammaV/ElectronMcFakeValidator") ;
874 
875  // matching object type
876  std::string matchingObjectType = "Unknown" ;
877  if (std::string::npos!=matchingObjectCollection_.label().find("iterativeCone5GenJets",0))
878  { matchingObjectType = "GenJet" ; }
879 
880  std::string htitle, xtitle, ytitle ;
881 
882  std::cout << "[ElectronMcFakeValidator] efficiency calculation " << std::endl ;
883  bookH1andDivide("h_ele_etaEff",h1_ele_matchingObjectEta_matched,h1_matchingObjectEta,"#eta","Efficiency","",true);
884  bookH1andDivide("h_ele_zEff",h1_ele_matchingObjectZ_matched,h1_matchingObjectZ,"z (cm)","Efficiency","",true);
885  bookH1andDivide("h_ele_absetaEff",h1_ele_matchingObjectAbsEta_matched,h1_matchingObjectAbsEta,"|#eta|","Efficiency");
886  bookH1andDivide("h_ele_ptEff",h1_ele_matchingObjectPt_matched,h1_matchingObjectPt,"p_{T} (GeV/c)","Efficiency");
887  bookH1andDivide("h_ele_phiEff",h1_ele_matchingObjectPhi_matched,h1_matchingObjectPhi,"#phi (rad)","Efficiency");
888 // bookH2andDivide("h_ele_ptEtaEff",h2_ele_matchingObjectPtEta_matched,h2_matchingObjectPtEta,"#eta","p_{T} (GeV/c)");
889 //
890 // std::cout << "[ElectronMcFakeValidator] q-misid calculation " << std::endl;
891 // bookH1andDivide("h_ele_etaQmisid",h1_ele_matchingObjectEta_matched_qmisid,h1_simEta,"#eta","q misId","",true);
892 // bookH1andDivide("h_ele_zQmisid",h1_ele_matchingObjectZ_matched_qmisid,h1_simZ,"z (cm)","q misId","",true);
893 // bookH1andDivide("h_ele_absetaQmisid",h1_ele_matchingObjectAbsEta_matched_qmisid,h1_simAbsEta,"|#eta|","q misId");
894 // bookH1andDivide("h_ele_ptQmisid",h1_ele_matchingObjectPt_matched_qmisid,h1_simPt,"p_{T} (GeV/c)","q misId");
895 
896  std::cout << "[ElectronMcFakeValidator] all reco electrons " << std::endl ;
897  bookH1andDivide("h_ele_etaEff_all",h1_ele_vertexEta_all,h1_matchingObjectEta,"#eta","N_{rec}/N_{gen}","",true);
898  bookH1andDivide("h_ele_ptEff_all",h1_ele_vertexPt_all,h1_matchingObjectPt,"p_{T} (GeV/c)","N_{rec}/N_{gen}","",true);
899 
900  std::cout << "[ElectronMcFakeValidator] classes " << std::endl ;
901  bookH1andDivide("h_ele_eta_goldenFrac",h1_ele_eta_golden,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of golden electrons vs eta");
902  bookH1andDivide("h_ele_eta_bbremFrac" ,h1_ele_eta_bbrem ,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of big brem electrons vs eta");
903  bookH1andDivide("h_ele_eta_narrowFrac",h1_ele_eta_narrow,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of narrow electrons vs eta");
904  bookH1andDivide("h_ele_eta_showerFrac",h1_ele_eta_shower,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of showering electrons vs eta");
905 
906  // fbrem
907  MonitorElement * h1_ele_xOverX0VsEta = bookH1withSumw2("h_ele_xOverx0VsEta","mean X/X_0 vs eta",eta_nbin/2,0.0,2.5);
908  for (int ibin=1;ibin<p1_ele_fbremVsEta_mean->getNbinsX()+1;ibin++) {
909  double xOverX0 = 0.;
911  { xOverX0 = -log(p1_ele_fbremVsEta_mean->getBinContent(ibin)) ; }
912  h1_ele_xOverX0VsEta->setBinContent(ibin,xOverX0) ;
913  }
914 
915  // profiles from 2D histos
916  htitle = "Electron / Matching "+matchingObjectType ;
917  profileX("h_ele_PoPmatchingObjectVsEta_pfx",h2_ele_PoPmatchingObjectVsEta,htitle+", mean momentum, vs eta","#eta","<P/P_{gen}>");
918  profileX("h_ele_PoPmatchingObjectVsPhi_pfx",h2_ele_PoPmatchingObjectVsPhi,htitle+", mean momentum, vs phi","#phi (rad)","<P/P_{gen}>");
919  htitle = "Electron - Matching "+matchingObjectType ;
920  profileX("h_ele_EtaMnEtamatchingObjectVsEta_pfx",h2_ele_EtaMnEtamatchingObjectVsEta,htitle+", mean eta, vs eta","#eta","<#eta_{rec} - #eta_{gen}>");
921  profileX("h_ele_EtaMnEtamatchingObjectVsPhi_pfx",h2_ele_EtaMnEtamatchingObjectVsPhi,htitle+", mean eta, vs phi","#phi (rad)","<#eta_{rec} - #eta_{gen}>");
922  profileX("h_ele_PhiMnPhimatchingObjectVsEta_pfx",h2_ele_PhiMnPhimatchingObjectVsEta,htitle+", mean phi, vs eta","#eta","<#phi_{rec} - #phi_{gen}> (rad)");
923  profileX("h_ele_PhiMnPhimatchingObjectVsPhi_pfx",h2_ele_PhiMnPhimatchingObjectVsPhi,htitle+", mean phi, vs phi","#phi (rad)","");
924  profileX("h_ele_vertexPtVsEta_pfx",h2_ele_vertexPtVsEta,"mean ele transverse momentum vs eta","#eta","<p_{T}> (GeV/c)");
925  profileX("h_ele_vertexPtVsPhi_pfx",h2_ele_vertexPtVsPhi,"mean ele transverse momentum vs phi","#phi (rad)","<p_{T}> (GeV/c)");
926  profileX("h_ele_EoPVsEta_pfx",h2_ele_EoPVsEta,"mean ele E/p vs eta","#eta","<E/P_{vertex}>");
927  profileX("h_ele_EoPVsPhi_pfx",h2_ele_EoPVsPhi,"mean ele E/p vs phi","#phi (rad)","<E/P_{vertex}>");
928  profileX("h_ele_EoPoutVsEta_pfx",h2_ele_EoPoutVsEta,"mean ele E/pout vs eta","#eta","<E_{seed}/P_{out}>");
929  profileX("h_ele_EoPoutVsPhi_pfx",h2_ele_EoPoutVsPhi,"mean ele E/pout vs phi","#phi (rad)","<E_{seed}/P_{out}>");
930  profileX("h_ele_EeleOPoutVsEta_pfx",h2_ele_EeleOPoutVsEta,"mean ele Eele/pout vs eta","#eta","<E_{ele}/P_{out}>");
931  profileX("h_ele_EeleOPoutVsPhi_pfx",h2_ele_EeleOPoutVsPhi,"mean ele Eele/pout vs phi","#phi (rad)","<E_{ele}/P_{out}>");
932  profileX("h_ele_HoEVsEta_pfx",h2_ele_HoEVsEta,"mean ele H/E vs eta","#eta","<H/E>");
933  profileX("h_ele_HoEVsPhi_pfx",h2_ele_HoEVsPhi,"mean ele H/E vs phi","#phi (rad)","<H/E>");
934  profileX("h_ele_chi2VsEta_pfx",h2_ele_chi2VsEta,"mean ele track chi2 vs eta","#eta","<#Chi^{2}>");
935  profileX("h_ele_chi2VsPhi_pfx",h2_ele_chi2VsPhi,"mean ele track chi2 vs phi","#phi (rad)","<#Chi^{2}>");
936  profileX("h_ele_foundHitsVsEta_pfx",h2_ele_foundHitsVsEta,"mean ele track # found hits vs eta","#eta","<N_{hits}>");
937  profileX("h_ele_foundHitsVsPhi_pfx",h2_ele_foundHitsVsPhi,"mean ele track # found hits vs phi","#phi (rad)","<N_{hits}>");
938  profileX("h_ele_lostHitsVsEta_pfx",h2_ele_lostHitsVsEta,"mean ele track # lost hits vs eta","#eta","<N_{hits}>");
939  profileX("h_ele_lostHitsVsPhi_pfx",h2_ele_lostHitsVsPhi,"mean ele track # lost hits vs phi","#phi (rad)","<N_{hits}>");
940  profileX("h_ele_vertexTIPVsEta_pfx",h2_ele_vertexTIPVsEta,"mean tip (wrt gen vtx) vs eta","#eta","<TIP> (cm)");
941  profileX("h_ele_vertexTIPVsPhi_pfx",h2_ele_vertexTIPVsPhi,"mean tip (wrt gen vtx) vs phi","#phi","<TIP> (cm)");
942  profileX("h_ele_vertexTIPVsPt_pfx",h2_ele_vertexTIPVsPt,"mean tip (wrt gen vtx) vs phi","p_{T} (GeV/c)","<TIP> (cm)");
943 
945  }
946  }
947 
948 
MonitorElement * h2_ele_ambiguousTracksVsPhi
MonitorElement * h1_ele_matchingObjectPt_matched
MonitorElement * h1_ele_EoP_eg_endcaps
T getParameter(std::string const &) const
MonitorElement * h2_ele_foundHitsVsEta
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsEta
virtual double p() const
magnitude of momentum vector
MonitorElement * h1_ele_dEtaSc_propVtx
MonitorElement * h1_ele_dPhiCl_propOut_eg
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * h1_ele_dEtaEleCl_propOut_barrel
MonitorElement * h1_ele_dEtaCl_propOut_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_eg_endcaps
MonitorElement * h1_ele_dEtaCl_propOut_eg_endcaps
MonitorElement * h1_scl_E2x5max_barrel_
MonitorElement * h1_scl_EoEmatchingObjectGolden_barrel
ElectronMcFakeValidator(const edm::ParameterSet &conf)
MonitorElement * h1_ele_PhiMnPhimatchingObject2
bool isEBEtaGap() const
Definition: GsfElectron.h:339
MonitorElement * h1_ele_matchingObjectAbsEta_matched
float eSuperClusterOverP() const
Definition: GsfElectron.h:201
MonitorElement * h1_scl_EoEmatchingObjectGolden_endcaps
MonitorElement * bookH1withSumw2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events")
MonitorElement * h1_ele_ecalRecHitSumEt_dr03
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsPt
MonitorElement * bookH2(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="")
MonitorElement * h2_ele_PoPmatchingObjectVsPhi
bool isEBEEGap() const
Definition: GsfElectron.h:337
float dr04HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:432
MonitorElement * h1_ele_dPhiCl_propOut_all
MonitorElement * h2_ele_ambiguousTracksVsPt
virtual const Point & vertex() const
vertex position
MonitorElement * h1_ele_EeleOPout_eg_barrel
MonitorElement * h2_ele_PtinVsPtoutGolden_mode
MonitorElement * h1_ele_EseedOP_endcaps
MonitorElement * p1_ele_fbremVsEta_mode
MonitorElement * h1_scl_EoEmatchingObjectShowering_barrel
MonitorElement * h1_matchingObjectAbsEta
MonitorElement * h1_ele_dEtaSc_propVtx_eg_barrel
MonitorElement * p1_ele_fbremVsEta_mean
MonitorElement * profileX(const std::string &name, MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * h2_ele_PinVsPoutShowering_mode
float dr04TkSumPt() const
Definition: GsfElectron.h:430
MonitorElement * h2_ele_vertexTIPVsPhi
bool isEERingGap() const
Definition: GsfElectron.h:343
float dr03HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:425
MonitorElement * h1_ele_dEtaSc_propVtx_all
float fbrem() const
Definition: GsfElectron.h:528
SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:166
float scE2x5Max() const
Definition: GsfElectron.h:391
MonitorElement * h1_ele_EseedOP_eg_endcaps
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
MonitorElement * h1_ele_dEtaCl_propOut_all
MonitorElement * h2_ele_PinVsPoutShowering_mean
MonitorElement * h2_ele_E2mnE1vsMee_all
MonitorElement * h2_ele_seed_drz2VsPt_
bool isEEDeeGap() const
Definition: GsfElectron.h:342
virtual double eta() const
momentum pseudorapidity
MonitorElement * h2_ele_ambiguousTracksVsEta
MonitorElement * h2_ele_outerPtVsPt_mode
bool isEE() const
Definition: GsfElectron.h:335
bool isEB() const
Definition: GsfElectron.h:334
MonitorElement * h2_ele_E2mnE1vsMee_egeg_all
MonitorElement * h2_ele_PtinVsPtoutShowering_mean
void Fill(long long x)
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsPt
MonitorElement * h2_ele_dEtaEleClVsEta_propOut
MonitorElement * h2_ele_PinMnPoutVsChi2_mode
MonitorElement * h1_ele_dEtaCl_propOut_eg_barrel
MonitorElement * h1_matchingObjectEta
MonitorElement * h1_ele_matchingObjectEta_matched
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
MonitorElement * h1_scl_E2x5max_endcaps_
float dr04HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:433
MonitorElement * h2_ele_EeleOPoutVsEta
MonitorElement * h2_ele_PinMnPoutVsPt_mode
MonitorElement * h1_ele_dEtaCl_propOut
MonitorElement * h1_ele_dEtaCl_propOut_eg
float mva() const
Definition: GsfElectron.h:500
MonitorElement * h1_ele_dEtaEleCl_propOut_eg
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:205
int iEvent
Definition: GenABIO.cc:243
MonitorElement * h2_ele_dEtaScVsEta_propVtx
void saveStore(const std::string &filename)
MonitorElement * h2_ele_foundHitsVsPhi
float hadronicOverEm() const
Definition: GsfElectron.h:393
MonitorElement * h2_ele_dEtaScVsPt_propVtx
float eSeedClusterOverP() const
Definition: GsfElectron.h:202
MonitorElement * h1_ele_dPhiSc_propVtx_eg_barrel
MonitorElement * h2_ele_PtinVsPtoutShowering_mode
MonitorElement * h2_ele_dEtaClVsPt_propOut
MonitorElement * h1_ele_PhiMnPhimatchingObject
MonitorElement * h1_ele_dPhiEleCl_propOut_eg_endcaps
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:431
MonitorElement * h1_ele_dPhiCl_propOut
math::XYZVector trackMomentumOut() const
Definition: GsfElectron.h:246
math::XYZVector trackMomentumAtVtx() const
Definition: GsfElectron.h:244
MonitorElement * h1_scl_EoEmatchingObject_barrel
MonitorElement * h1_ele_dPhiEleCl_propOut_eg
MonitorElement * h1_ele_hcalTowerSumEt_dr03_depth2
MonitorElement * h2_ele_PoPmatchingObjectVsEta
float deltaPhiSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:209
MonitorElement * h2_ele_dPhiClVsPt_propOut
MonitorElement * h1_ele_dPhiCl_propOut_eg_barrel
T sqrt(T t)
Definition: SSEVec.h:28
MonitorElement * h2_ele_dPhiEleClVsPt_propOut
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:208
MonitorElement * h2_ele_dEtaEleClVsPhi_propOut
MonitorElement * h1_matchingObjectPt
MonitorElement * h1_ele_dEtaEleCl_propOut_endcaps
MonitorElement * h1_ele_dPhiCl_propOut_eg_endcaps
virtual int charge() const
electric charge
MonitorElement * h1_ele_PoPmatchingObject
float dr03TkSumPt() const
Definition: GsfElectron.h:422
MonitorElement * h2_ele_PinMnPoutVsEta_mode
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:424
MonitorElement * h1_ele_vertexPt_all
float eEleClusterOverPout() const
Definition: GsfElectron.h:204
float eSeedClusterOverPout() const
Definition: GsfElectron.h:203
MonitorElement * h2_ele_vertexEtaVsPhi
MonitorElement * h2_ele_outerPtVsPhi_mode
MonitorElement * h1_ele_dPhiCl_propOut_endcaps
MonitorElement * h2_ele_vertexTIPVsEta
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:389
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
MonitorElement * h1_ele_dPhiSc_propVtx_eg
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:210
MonitorElement * h2_ele_PoPmatchingObjectVsPt
tuple conf
Definition: dbtoconf.py:185
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
MonitorElement * h2_ele_dEtaClVsEta_propOut
MonitorElement * h1_scl_EoEmatchingObject_endcaps
MonitorElement * h2_ele_PinVsPoutGolden_mode
GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:167
MonitorElement * h1_ele_EseedOP_eg_barrel
MonitorElement * h1_ele_ecalRecHitSumEt_dr04
MonitorElement * h1_ele_EeleOPout_all
MonitorElement * h1_matchingObjectPhi
Log< T >::type log(const T &t)
Definition: Log.h:22
MonitorElement * h2_ele_seed_dphi2VsPt_
MonitorElement * h2_ele_dEtaClVsPhi_propOut
MonitorElement * h2_ele_seed_drz2VsEta_
float deltaEtaEleClusterTrackAtCalo() const
Definition: GsfElectron.h:207
MonitorElement * h1_ele_dEtaEleCl_propOut_eg_barrel
virtual double pt() const
transverse momentum
MonitorElement * h1_ele_PoPmatchingObject_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_barrel
Classification classification() const
Definition: GsfElectron.h:530
MonitorElement * h2_ele_outerPtVsEta_mode
REF castTo() const
cast to a concrete type
Definition: RefToBase.h:236
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
Definition: GsfElectron.h:295
MonitorElement * h1_ele_dPhiSc_propVtx_eg_endcaps
MonitorElement * h1_ele_HoE_eg_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
T const * product() const
Definition: Handle.h:74
MonitorElement * h1_scl_SigIEtaIEta_barrel_
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:423
std::string const & label() const
Definition: InputTag.h:25
MonitorElement * h2_ele_dPhiClVsPhi_propOut
MonitorElement * h1_ele_dPhiEleCl_propOut_eg_barrel
MonitorElement * h1_ele_vertexEta_all
MonitorElement * h1_ele_EoPout_endcaps
double getBinContent(int binx) const
get content of bin (1-D)
edm::EventID id() const
Definition: EventBase.h:56
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:206
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsEta
MonitorElement * h2_ele_EtaMnEtamatchingObjectVsPhi
MonitorElement * bookH1(const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events")
MonitorElement * h1_ele_matchingObjectPhi_matched
MonitorElement * h1_scl_SigIEtaIEta_endcaps_
MonitorElement * h1_ele_EtaMnEtamatchingObject
MonitorElement * h1_ele_dPhiEleCl_propOut_endcaps
MonitorElement * h1_ele_dEtaEleCl_propOut_eg_endcaps
MonitorElement * h2_ele_dEtaScVsPhi_propVtx
MonitorElement * h2_ele_PhiMnPhimatchingObjectVsPhi
void setStoreFolder(const std::string &path)
bool isEBPhiGap() const
Definition: GsfElectron.h:340
MonitorElement * h1_ele_dEtaSc_propVtx_eg
MonitorElement * h1_ele_dPhiEleCl_propOut
MonitorElement * bookH1andDivide(const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="", bool print=false)
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * h1_ele_EeleOPout_eg_endcaps
MonitorElement * h1_ele_EseedOP_barrel
bool trackerDrivenSeed() const
Definition: GsfElectron.h:169
MonitorElement * h1_ele_dEtaEleCl_propOut
tuple cout
Definition: gather_cfg.py:41
const Point & position() const
position
Definition: BeamSpot.h:63
float scE5x5() const
Definition: GsfElectron.h:392
MonitorElement * h1_ele_dPhiSc_propVtx_endcaps
MonitorElement * h1_scl_EoEmatchingObjectShowering_endcaps
MonitorElement * h1_ele_dEtaSc_propVtx_endcaps
MonitorElement * h2_ele_seed_dphi2VsEta_
MonitorElement * h2_ele_dPhiClVsEta_propOut
MonitorElement * h1_ele_dEtaCl_propOut_barrel
double pi
MonitorElement * h2_ele_dPhiScVsPt_propVtx
MonitorElement * h1_ele_dPhiSc_propVtx_barrel
MonitorElement * h1_ele_hcalTowerSumEt_dr04_depth1
MonitorElement * h1_ele_dPhiCl_propOut_barrel
float caloEnergy() const
Definition: GsfElectron.h:595
virtual double phi() const
momentum azimuthal angle
MonitorElement * h1_ele_matchingObjectZ_matched
MonitorElement * h2_ele_PtinVsPtoutGolden_mean
MonitorElement * h1_ele_dPhiEleCl_propOut_barrel
SuperClusterRef pflowSuperCluster() const
Definition: GsfElectron.h:170
virtual double py() const
y coordinate of momentum vector
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
MonitorElement * h1_ele_PinMnPout_mode
MonitorElement * h1_matchingObjectNum
MonitorElement * h2_ele_outerPVsEta_mode
MonitorElement * h1_ele_PoPmatchingObject_barrel
MonitorElement * h1_ele_EoPout_eg_barrel
float scE1x5() const
Definition: GsfElectron.h:390
MonitorElement * h2_ele_dPhiEleClVsEta_propOut
MonitorElement * h1_ele_ambiguousTracks
bool ecalDrivenSeed() const
Definition: GsfElectron.h:168
MonitorElement * bookP1(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="")
MonitorElement * h1_ele_EeleOPout_endcaps
MonitorElement * h1_ele_EoPout_eg_endcaps