CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Validation/RecoEgamma/src/ElectronMcFakeValidator.cc

Go to the documentation of this file.
00001 
00002 // user include files
00003 #include "Validation/RecoEgamma/interface/ElectronMcFakeValidator.h"
00004 
00005 #include "RecoEgamma/EgammaElectronAlgos/interface/ElectronUtilities.h"
00006 
00007 #include "DQMServices/Core/interface/DQMStore.h"
00008 #include "DQMServices/Core/interface/MonitorElement.h"
00009 
00010 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
00011 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00012 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00013 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
00014 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
00015 #include "DataFormats/EgammaReco/interface/ElectronSeed.h"
00016 #include "DataFormats/EgammaReco/interface/ElectronSeedFwd.h"
00017 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00018 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00019 #include "DataFormats/JetReco/interface/GenJetCollection.h"
00020 
00021 #include "DataFormats/Common/interface/Handle.h"
00022 #include "DataFormats/Common/interface/EDProduct.h"
00023 
00024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00025 #include "FWCore/Framework/interface/EDAnalyzer.h"
00026 #include "FWCore/Framework/interface/Event.h"
00027 #include "FWCore/Framework/interface/MakerMacros.h"
00028 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00029 
00030 #include "CLHEP/Units/GlobalPhysicalConstants.h"
00031 #include "TMath.h"
00032 #include "TFile.h"
00033 #include "TH1F.h"
00034 #include "TH1I.h"
00035 #include "TH2F.h"
00036 #include "TProfile.h"
00037 #include "TTree.h"
00038 #include <vector>
00039 #include <iostream>
00040 
00041 using namespace reco;
00042 
00043 ElectronMcFakeValidator::ElectronMcFakeValidator( const edm::ParameterSet & conf )
00044  : ElectronValidator(conf)
00045  {
00046   outputFile_ = conf.getParameter<std::string>("outputFile");
00047   electronCollection_ = conf.getParameter<edm::InputTag>("electronCollection");
00048   matchingObjectCollection_ = conf.getParameter<edm::InputTag>("matchingObjectCollection");
00049   beamSpotTag_ = conf.getParameter<edm::InputTag>("beamSpot");
00050   readAOD_ = conf.getParameter<bool>("readAOD");
00051   maxPt_ = conf.getParameter<double>("MaxPt");
00052   maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
00053   deltaR_ = conf.getParameter<double>("DeltaR");
00054 
00055   // histos bining and limits
00056 
00057   edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg") ;
00058 
00059   xyz_nbin=histosSet.getParameter<int>("Nbinxyz");
00060 
00061   p_nbin=histosSet.getParameter<int>("Nbinp");
00062   p2D_nbin=histosSet.getParameter<int>("Nbinp2D");
00063   p_max=histosSet.getParameter<double>("Pmax");
00064 
00065   pt_nbin=histosSet.getParameter<int>("Nbinpt");
00066   pt2D_nbin=histosSet.getParameter<int>("Nbinpt2D");
00067   pteff_nbin=histosSet.getParameter<int>("Nbinpteff");
00068   pt_max=histosSet.getParameter<double>("Ptmax");
00069 
00070   fhits_nbin=histosSet.getParameter<int>("Nbinfhits");
00071   fhits_max=histosSet.getParameter<double>("Fhitsmax");
00072 
00073   lhits_nbin=histosSet.getParameter<int>("Nbinlhits");
00074   lhits_max=histosSet.getParameter<double>("Lhitsmax");
00075 
00076   eop_nbin=histosSet.getParameter<int>("Nbineop");
00077   eop2D_nbin=histosSet.getParameter<int>("Nbineop2D");
00078   eop_max=histosSet.getParameter<double>("Eopmax");
00079   eopmaxsht=histosSet.getParameter<double>("Eopmaxsht");
00080 
00081   eta_nbin=histosSet.getParameter<int>("Nbineta");
00082   eta2D_nbin=histosSet.getParameter<int>("Nbineta2D");
00083   eta_min=histosSet.getParameter<double>("Etamin");
00084   eta_max=histosSet.getParameter<double>("Etamax");
00085 
00086   deta_nbin=histosSet.getParameter<int>("Nbindeta");
00087   deta_min=histosSet.getParameter<double>("Detamin");
00088   deta_max=histosSet.getParameter<double>("Detamax");
00089 
00090   detamatch_nbin=histosSet.getParameter<int>("Nbindetamatch");
00091   detamatch2D_nbin=histosSet.getParameter<int>("Nbindetamatch2D");
00092   detamatch_min=histosSet.getParameter<double>("Detamatchmin");
00093   detamatch_max=histosSet.getParameter<double>("Detamatchmax");
00094 
00095   phi_nbin=histosSet.getParameter<int>("Nbinphi");
00096   phi2D_nbin=histosSet.getParameter<int>("Nbinphi2D");
00097   phi_min=histosSet.getParameter<double>("Phimin");
00098   phi_max=histosSet.getParameter<double>("Phimax");
00099 
00100   dphi_nbin=histosSet.getParameter<int>("Nbindphi");
00101   dphi_min=histosSet.getParameter<double>("Dphimin");
00102   dphi_max=histosSet.getParameter<double>("Dphimax");
00103 
00104   dphimatch_nbin=histosSet.getParameter<int>("Nbindphimatch");
00105   dphimatch2D_nbin=histosSet.getParameter<int>("Nbindphimatch2D");
00106   dphimatch_min=histosSet.getParameter<double>("Dphimatchmin");
00107   dphimatch_max=histosSet.getParameter<double>("Dphimatchmax");
00108 
00109   mee_nbin= histosSet.getParameter<int>("Nbinmee");
00110   mee_min=histosSet.getParameter<double>("Meemin");
00111   mee_max=histosSet.getParameter<double>("Meemax");
00112 
00113   hoe_nbin= histosSet.getParameter<int>("Nbinhoe");
00114   hoe_min=histosSet.getParameter<double>("Hoemin");
00115   hoe_max=histosSet.getParameter<double>("Hoemax");
00116 
00117   popmatching_nbin= histosSet.getParameter<int>("Nbinpopmatching");
00118   popmatching_min=histosSet.getParameter<double>("Popmatchingmin");
00119   popmatching_max=histosSet.getParameter<double>("Popmatchingmax");
00120  }
00121 
00122 void ElectronMcFakeValidator::beginJob()
00123  {
00124   prepareStore() ;
00125   setStoreFolder("EgammaV/ElectronMcFakeValidator") ;
00126 
00127   // matching object type
00128   std::string matchingObjectType ;
00129   if (std::string::npos!=matchingObjectCollection_.label().find("iterativeCone5GenJets",0))
00130    { matchingObjectType = "GenJet" ; }
00131   if (matchingObjectType=="")
00132    { edm::LogError("ElectronMcFakeValidator::beginJob")<<"Unknown matching object type !" ; }
00133   else
00134    { edm::LogInfo("ElectronMcFakeValidator::beginJob")<<"Matching object type: "<<matchingObjectType ; }
00135   std::string htitle = "# "+matchingObjectType+"s", xtitle = "N_{"+matchingObjectType+"}" ;
00136   h1_matchingObjectNum = bookH1withSumw2("h_matchingObjectNum",htitle,fhits_nbin,0.,fhits_max,xtitle) ;
00137 
00138   // rec event
00139   h1_recEleNum_= bookH1("h_recEleNum","# rec electrons",20, 0.,20.,"N_{ele}");
00140 
00141   // mc
00142   h1_matchingObjectEta = bookH1withSumw2("h_matchingObject_eta",matchingObjectType+" #eta",eta_nbin,eta_min,eta_max,"#eta");
00143   h1_matchingObjectAbsEta = bookH1withSumw2("h_matchingObject_abseta",matchingObjectType+" |#eta|",eta_nbin/2,0.,eta_max);
00144   h1_matchingObjectP = bookH1withSumw2("h_matchingObject_P",matchingObjectType+" p",p_nbin,0.,p_max,"p (GeV/c)");
00145   h1_matchingObjectPt = bookH1withSumw2("h_matchingObject_Pt",matchingObjectType+" pt",pteff_nbin,5.,pt_max);
00146   h1_matchingObjectPhi = bookH1withSumw2("h_matchingObject_phi",matchingObjectType+" phi",phi_nbin,phi_min,phi_max);
00147   h1_matchingObjectZ = bookH1withSumw2("h_matchingObject_z",matchingObjectType+" z",xyz_nbin, -25, 25 );
00148 
00149   // all electrons
00150   h1_ele_EoverP_all = bookH1withSumw2("h_ele_EoverP_all","ele E/P_{vertex}, all reco electrons",eop_nbin,0.,eop_max,"E/P_{vertex}");
00151   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}");
00152   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}");
00153   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}");
00154   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}");
00155   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)");
00156   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}");
00157   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)");
00158   h1_ele_TIP_all = bookH1withSumw2("h_ele_TIP_all","ele vertex transverse radius, all reco electrons",  100,0.,0.2,"r_{T} (cm)");
00159   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") ;
00160   h1_ele_vertexEta_all = bookH1withSumw2("h_ele_vertexEta_all","ele eta, all reco electrons",eta_nbin,eta_min,eta_max);
00161   h1_ele_vertexPt_all = bookH1withSumw2("h_ele_vertexPt_all","ele p_{T}, all reco electrons",pteff_nbin,5.,pt_max);
00162   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})" );
00163   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})" );
00164 
00165   // duplicates
00166   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)");
00167   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)");
00168 
00169 //  // charge ID
00170 //  h1_ele_ChargeMnChargeTrue = bookH1withSumw2("h_ele_ChargeMnChargeTrue","ele charge - gen charge ",5,-1.,4.,"q_{rec} - q_{gen}");
00171 //  h1_ele_matchingObjectEta_matched_qmisid = bookH1withSumw2("h_ele_eta_matched_qmisid","charge misid vs gen eta",eta_nbin,eta_min,eta_max);
00172 //  h1_ele_matchingObjectAbsEta_matched_qmisid = bookH1withSumw2("h_ele_abseta_matched_qmisid","charge misid vs gen |eta|",eta_nbin/2,0.,eta_max);
00173 //  h1_ele_matchingObjectPt_matched_qmisid = bookH1withSumw2("h_ele_Pt_matched_qmisid","charge misid vs gen transverse momentum",pteff_nbin,5.,pt_max);
00174 //  h1_ele_matchingObjectPhi_matched_qmisid = bookH1withSumw2("h_ele_phi_matched_qmisid","charge misid vs gen phi",phi_nbin,phi_min,phi_max);
00175 //  h1_ele_matchingObjectZ_matched_qmisid = bookH1withSumw2("h_ele_z_matched_qmisid","charge misid vs gen z",xyz_nbin, -25, 25 );
00176 
00177   // matched electrons
00178 
00179   htitle = "Efficiency vs matching "+matchingObjectType+" " ;
00180   h1_ele_matchingObjectEta_matched = bookH1withSumw2("h_ele_matchingObjectEta_matched",htitle+"#eta",eta_nbin,eta_min,eta_max);
00181   h1_ele_matchingObjectAbsEta_matched = bookH1withSumw2("h_ele_matchingObjectAbsEta_matched",htitle+"|#eta|",eta_nbin/2,0.,2.5);
00182   h1_ele_matchingObjectPt_matched = bookH1("h_ele_matchingObjectPt_matched",htitle+"p_{T}",pteff_nbin,5.,pt_max);
00183   h1_ele_matchingObjectPhi_matched = bookH1withSumw2("h_ele_matchingObjectPhi_matched",htitle+"phi",phi_nbin,phi_min,phi_max);
00184   h1_ele_matchingObjectZ_matched = bookH1withSumw2("h_ele_matchingObjectZ_matched",htitle+"z",xyz_nbin,-25,25);
00185 
00186   h1_ele_charge = bookH1withSumw2("h_ele_charge","ele charge",5,-2.,2.,"charge");
00187   h2_ele_chargeVsEta = bookH2("h_ele_chargeVsEta","ele charge vs eta",eta2D_nbin,eta_min,eta_max,5,-2.,2.);
00188   h2_ele_chargeVsPhi = bookH2("h_ele_chargeVsPhi","ele charge vs phi",phi2D_nbin,phi_min,phi_max,5,-2.,2.);
00189   h2_ele_chargeVsPt = bookH2("h_ele_chargeVsPt","ele charge vs pt",pt_nbin,0.,100.,5,-2.,2.);
00190   h1_ele_vertexP = bookH1withSumw2("h_ele_vertexP","ele momentum",p_nbin,0.,p_max,"p_{vertex} (GeV/c)");
00191   h1_ele_vertexPt = bookH1withSumw2("h_ele_vertexPt","ele transverse momentum",pt_nbin,0.,pt_max,"p_{T vertex} (GeV/c)");
00192   h2_ele_vertexPtVsEta = bookH2("h_ele_vertexPtVsEta","ele transverse momentum vs eta",eta2D_nbin,eta_min,eta_max,pt2D_nbin,0.,pt_max);
00193   h2_ele_vertexPtVsPhi = bookH2("h_ele_vertexPtVsPhi","ele transverse momentum vs phi",phi2D_nbin,phi_min,phi_max,pt2D_nbin,0.,pt_max);
00194   h1_ele_vertexEta = bookH1withSumw2("h_ele_vertexEta","ele momentum eta",eta_nbin,eta_min,eta_max,"#eta");
00195   h2_ele_vertexEtaVsPhi = bookH2("h_ele_vertexEtaVsPhi","ele momentum eta vs phi",eta2D_nbin,eta_min,eta_max,phi2D_nbin,phi_min,phi_max );
00196   h1_ele_vertexPhi = bookH1withSumw2("h_ele_vertexPhi","ele  momentum #phi",phi_nbin,phi_min,phi_max,"#phi (rad)");
00197   h1_ele_vertexX = bookH1withSumw2("h_ele_vertexX","ele vertex x",xyz_nbin,-0.6,0.6,"x (cm)" );
00198   h1_ele_vertexY = bookH1withSumw2("h_ele_vertexY","ele vertex y",xyz_nbin,-0.6,0.6,"y (cm)" );
00199   h1_ele_vertexZ = bookH1withSumw2("h_ele_vertexZ","ele vertex z",xyz_nbin,-25, 25,"z (cm)" );
00200   h1_ele_vertexTIP = bookH1withSumw2("h_ele_vertexTIP","ele transverse impact parameter (wrt gen vtx)",90,0.,0.15,"TIP (cm)");
00201   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)");
00202   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)");
00203   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)");
00204 
00205   htitle = "Ele / matching "+matchingObjectType+", momemtum" ;
00206   xtitle = "P / P_{"+matchingObjectType+"}" ;
00207   h1_ele_PoPmatchingObject = bookH1withSumw2("h_ele_PoPmatchingObject",htitle,popmatching_nbin,popmatching_min,popmatching_max,xtitle);
00208   h2_ele_PoPmatchingObjectVsEta = bookH2("h_ele_PoPmatchingObjectVsEta",htitle+",vs eta",eta2D_nbin,eta_min,eta_max,50,popmatching_min,popmatching_max);
00209   h2_ele_PoPmatchingObjectVsPhi = bookH2("h_ele_PoPmatchingObjectVsPhi",htitle+",vs phi",phi2D_nbin,phi_min,phi_max,50,popmatching_min,popmatching_max);
00210   h2_ele_PoPmatchingObjectVsPt = bookH2("h_ele_PoPmatchingObjectVsPt",htitle+",vs eta",pt2D_nbin,0.,pt_max,50,popmatching_min,popmatching_max);
00211   h1_ele_PoPmatchingObject_barrel = bookH1withSumw2("h_ele_PoPmatchingObject_barrel",htitle+", barrel",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
00212   h1_ele_PoPmatchingObject_endcaps = bookH1withSumw2("h_ele_PoPmatchingObject_endcaps",htitle+", endcaps",popmatching_nbin,popmatching_min,popmatching_max,xtitle);
00213   htitle = "Ele - "+matchingObjectType+", " ;
00214   xtitle = "#eta - #eta_{"+matchingObjectType+"}" ;
00215   h1_ele_EtaMnEtamatchingObject = bookH1withSumw2("h_ele_EtamatchingObjectEtaTrue",htitle+"eta",deta_nbin,deta_min,deta_max,xtitle);
00216   h2_ele_EtaMnEtamatchingObjectVsEta = bookH2("h_ele_EtaMnEtamatchingObjectVsEta",htitle+"eta, vs eta",eta2D_nbin,eta_min,eta_max,deta_nbin/2,deta_min,deta_max);
00217   h2_ele_EtaMnEtamatchingObjectVsPhi = bookH2("h_ele_EtaMnEtamatchingObjectVsPhi",htitle+"eta, vs phi",phi2D_nbin,phi_min,phi_max,deta_nbin/2,deta_min,deta_max);
00218   h2_ele_EtaMnEtamatchingObjectVsPt = bookH2("h_ele_EtaMnEtamatchingObjectVsPt",htitle+"eta,, vs pt",pt_nbin,0.,pt_max,deta_nbin/2,deta_min,deta_max);
00219   xtitle = "#phi - #phi_{"+matchingObjectType+"} (rad)" ;
00220   h1_ele_PhiMnPhimatchingObject = bookH1withSumw2("h_ele_PhiMnPhimatchingObject",htitle+"phi",dphi_nbin,dphi_min,dphi_max,xtitle);
00221   h1_ele_PhiMnPhimatchingObject2 = bookH1("h_ele_PhiMnPhimatchingObject2",htitle+"phi",dphimatch2D_nbin,dphimatch_min,dphimatch_max);
00222   h2_ele_PhiMnPhimatchingObjectVsEta = bookH2("h_ele_PhiMnPhimatchingObjectVsEta",htitle+"phi, vs eta",eta2D_nbin,eta_min,eta_max,dphi_nbin/2,dphi_min,dphi_max);
00223   h2_ele_PhiMnPhimatchingObjectVsPhi = bookH2("h_ele_PhiMnPhimatchingObjectVsPhi",htitle+"phi, vs phi",phi2D_nbin,phi_min,phi_max,dphi_nbin/2,dphi_min,dphi_max);
00224   h2_ele_PhiMnPhimatchingObjectVsPt = bookH2("h_ele_PhiMnPhimatchingObjectVsPt",htitle+"phi, vs pt",pt2D_nbin,0.,pt_max,dphi_nbin/2,dphi_min,dphi_max);
00225 
00226   // matched electron, superclusters
00227 
00228   h1_scl_En_ = bookH1withSumw2("h_scl_energy","ele supercluster energy",p_nbin,0.,p_max);
00229   htitle = "Ele supercluster / "+matchingObjectType+", energy" ;
00230   xtitle = "E/E_{"+matchingObjectType+"}" ;
00231   h1_scl_EoEmatchingObject_barrel = bookH1withSumw2("h_scl_EoEmatchingObject_barrel",htitle+", barrel",50,0.2,1.2,xtitle);
00232   h1_scl_EoEmatchingObject_endcaps = bookH1withSumw2("h_scl_EoEmatchingObject_endcaps",htitle+", endcaps",50,0.2,1.2,xtitle);
00233   h1_scl_Et_ = bookH1withSumw2("h_scl_et","ele supercluster transverse energy",pt_nbin,0.,pt_max);
00234   h2_scl_EtVsEta_ = bookH2("h_scl_etVsEta","ele supercluster transverse energy vs eta",eta2D_nbin,eta_min,eta_max,pt_nbin,0.,pt_max);
00235   h2_scl_EtVsPhi_ = bookH2("h_scl_etVsPhi","ele supercluster transverse energy vs phi",phi2D_nbin,phi_min,phi_max,pt_nbin,0.,pt_max);
00236   h2_scl_EtaVsPhi_ = bookH2("h_scl_etaVsPhi","ele supercluster eta vs phi",phi2D_nbin,phi_min,phi_max,eta2D_nbin,eta_min,eta_max);
00237   h1_scl_Eta_ = bookH1withSumw2("h_scl_eta","ele supercluster eta",eta_nbin,eta_min,eta_max);
00238   h1_scl_Phi_ = bookH1withSumw2("h_scl_phi","ele supercluster phi",phi_nbin,phi_min,phi_max);
00239   h1_scl_SigIEtaIEta_  = bookH1withSumw2("h_scl_sigietaieta","ele supercluster sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}");
00240   h1_scl_SigIEtaIEta_barrel_  = bookH1withSumw2("h_scl_sigietaieta_barrel","ele supercluster sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}");
00241   h1_scl_SigIEtaIEta_endcaps_  = bookH1withSumw2("h_scl_sigietaieta_endcaps","ele supercluster sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}");
00242   h1_scl_E1x5_  = bookH1withSumw2("h_scl_E1x5","ele supercluster energy in 1x5",p_nbin,0., p_max,"E1x5 (GeV)");
00243   h1_scl_E1x5_barrel_  = bookH1withSumw2("h_scl_E1x5_barrel","ele supercluster energy in 1x5 barrel",p_nbin,0., p_max,"E1x5 (GeV)");
00244   h1_scl_E1x5_endcaps_  = bookH1withSumw2("h_scl_E1x5_endcaps","ele supercluster energy in 1x5 endcaps",p_nbin,0., p_max,"E1x5 (GeV)");
00245   h1_scl_E2x5max_  = bookH1withSumw2("h_scl_E2x5max","ele supercluster energy in 2x5 max",p_nbin,0.,p_max,"E2x5 (GeV)");
00246   h1_scl_E2x5max_barrel_  = bookH1withSumw2("h_scl_E2x5max_barrel","ele supercluster energy in 2x5 _max barrel",p_nbin,0.,p_max,"E2x5 (GeV)");
00247   h1_scl_E2x5max_endcaps_  = bookH1withSumw2("h_scl_E2x5max_endcaps","ele supercluster energy in 2x5 _max endcaps",p_nbin,0.,p_max,"E2x5 (GeV)");
00248   h1_scl_E5x5_  = bookH1withSumw2("h_scl_E5x5","ele supercluster energy in 5x5",p_nbin,0.,p_max,"E5x5 (GeV)");
00249   h1_scl_E5x5_barrel_  = bookH1withSumw2("h_scl_E5x5_barrel","ele supercluster energy in 5x5 barrel",p_nbin,0.,p_max,"E5x5 (GeV)");
00250   h1_scl_E5x5_endcaps_  = bookH1withSumw2("h_scl_E5x5_endcaps","ele supercluster energy in 5x5 endcaps",p_nbin,0.,p_max,"E5x5 (GeV)");
00251 //  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)") ;
00252 
00253   // matched electron, gsf tracks
00254   h1_ele_ambiguousTracks = bookH1withSumw2("h_ele_ambiguousTracks","ele # ambiguous tracks",  5,0.,5.,"N_{ambiguous tracks}");
00255   h2_ele_ambiguousTracksVsEta = bookH2("h_ele_ambiguousTracksVsEta","ele # ambiguous tracks  vs eta",eta2D_nbin,eta_min,eta_max,5,0.,5.);
00256   h2_ele_ambiguousTracksVsPhi = bookH2("h_ele_ambiguousTracksVsPhi","ele # ambiguous tracks  vs phi",phi2D_nbin,phi_min,phi_max,5,0.,5.);
00257   h2_ele_ambiguousTracksVsPt = bookH2("h_ele_ambiguousTracksVsPt","ele # ambiguous tracks vs pt",pt2D_nbin,0.,pt_max,5,0.,5.);
00258   h1_ele_foundHits = bookH1withSumw2("h_ele_foundHits","ele track # found hits",fhits_nbin,0.,fhits_max,"N_{hits}");
00259   h2_ele_foundHitsVsEta = bookH2("h_ele_foundHitsVsEta","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max);
00260   h2_ele_foundHitsVsPhi = bookH2("h_ele_foundHitsVsPhi","ele track # found hits vs phi",phi2D_nbin,phi_min,phi_max,fhits_nbin,0.,fhits_max);
00261   h2_ele_foundHitsVsPt = bookH2("h_ele_foundHitsVsPt","ele track # found hits vs pt",pt2D_nbin,0.,pt_max,fhits_nbin,0.,fhits_max);
00262   h1_ele_lostHits = bookH1withSumw2("h_ele_lostHits","ele track # lost hits",       5,0.,5.,"N_{lost hits}");
00263   h2_ele_lostHitsVsEta = bookH2("h_ele_lostHitsVsEta","ele track # lost hits vs eta",eta2D_nbin,eta_min,eta_max,lhits_nbin,0.,lhits_max);
00264   h2_ele_lostHitsVsPhi = bookH2("h_ele_lostHitsVsPhi","ele track # lost hits vs eta",phi2D_nbin,phi_min,phi_max,lhits_nbin,0.,lhits_max);
00265   h2_ele_lostHitsVsPt = bookH2("h_ele_lostHitsVsPt","ele track # lost hits vs eta",pt2D_nbin,0.,pt_max,lhits_nbin,0.,lhits_max);
00266   h1_ele_chi2 = bookH1withSumw2("h_ele_chi2","ele track #chi^{2}",100,0.,15.,"#Chi^{2}");
00267   h2_ele_chi2VsEta = bookH2("h_ele_chi2VsEta","ele track #chi^{2} vs eta",eta2D_nbin,eta_min,eta_max,50,0.,15.);
00268   h2_ele_chi2VsPhi = bookH2("h_ele_chi2VsPhi","ele track #chi^{2} vs phi",phi2D_nbin,phi_min,phi_max,50,0.,15.);
00269   h2_ele_chi2VsPt = bookH2("h_ele_chi2VsPt","ele track #chi^{2} vs pt",pt2D_nbin,0.,pt_max,50,0.,15.);
00270   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)");
00271   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)");
00272   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.);
00273   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.);
00274   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.);
00275   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.);
00276   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.);
00277   h1_ele_outerP = bookH1withSumw2("h_ele_outerP","ele track outer p, mean of GSF components",p_nbin,0.,p_max,"P_{out} (GeV/c)");
00278   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)");
00279   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);
00280   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)");
00281   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)");
00282   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);
00283   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);
00284   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);
00285 
00286   // matched electrons, matching
00287   h1_ele_EoP = bookH1withSumw2("h_ele_EoP","ele E/P_{vertex}",eop_nbin,0.,eop_max,"E/P_{vertex}");
00288   h1_ele_EoP_eg = bookH1withSumw2("h_ele_EoP_eg","ele E/P_{vertex}, ecal driven",eop_nbin,0.,eop_max);
00289   h1_ele_EoP_barrel = bookH1withSumw2("h_ele_EoP_barrel","ele E/P_{vertex} barrel",eop_nbin,0.,eop_max,"E/P_{vertex}");
00290   h1_ele_EoP_eg_barrel = bookH1withSumw2("h_ele_EoP_eg_barrel","ele E/P_{vertex}, ecal driven barrel",eop_nbin,0.,eop_max);
00291   h1_ele_EoP_endcaps = bookH1withSumw2("h_ele_EoP_endcaps","ele E/P_{vertex} endcaps",eop_nbin,0.,eop_max,"E/P_{vertex}");
00292   h1_ele_EoP_eg_endcaps = bookH1withSumw2("h_ele_EoP_eg_endcaps","ele E/P_{vertex}, ecal driven endcaps",eop_nbin,0.,eop_max);
00293   h2_ele_EoPVsEta = bookH2("h_ele_EoPVsEta","ele E/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
00294   h2_ele_EoPVsPhi = bookH2("h_ele_EoPVsPhi","ele E/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
00295   h2_ele_EoPVsE = bookH2("h_ele_EoPVsE","ele E/P_{vertex} vs E",  50,0.,p_max ,50,0.,5.);
00296   h1_ele_EseedOP = bookH1withSumw2("h_ele_EseedOP","ele E_{seed}/P_{vertex}",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}");
00297   h1_ele_EseedOP_eg = bookH1withSumw2("h_ele_EseedOP_eg","ele E_{seed}/P_{vertex}, ecal driven",eop_nbin,0.,eop_max);
00298   h1_ele_EseedOP_barrel = bookH1withSumw2("h_ele_EseedOP_barrel","ele E_{seed}/P_{vertex} barrel",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}");
00299   h1_ele_EseedOP_eg_barrel = bookH1withSumw2("h_ele_EseedOP_eg_barrel","ele E_{seed}/P_{vertex}, ecal driven barrel",eop_nbin,0.,eop_max);
00300   h1_ele_EseedOP_endcaps = bookH1withSumw2("h_ele_EseedOP_endcaps","ele E_{seed}/P_{vertex} endcaps",eop_nbin,0.,eop_max,"E_{seed}/P_{vertex}");
00301   h1_ele_EseedOP_eg_endcaps = bookH1withSumw2("h_ele_EseedOP_eg_endcaps","ele E_{seed}/P_{vertex}, ecal driven, endcaps",eop_nbin,0.,eop_max);
00302   h2_ele_EseedOPVsEta = bookH2("h_ele_EseedOPVsEta","ele E_{seed}/P_{vertex} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
00303   h2_ele_EseedOPVsPhi = bookH2("h_ele_EseedOPVsPhi","ele E_{seed}/P_{vertex} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
00304   h2_ele_EseedOPVsE = bookH2("h_ele_EseedOPVsE","ele E_{seed}/P_{vertex} vs E",  50,0.,p_max ,50,0.,5.);
00305   h1_ele_EoPout = bookH1withSumw2("h_ele_EoPout","ele E_{seed}/P_{out}",eop_nbin,0.,eop_max,"E_{seed}/P_{out}");
00306   h1_ele_EoPout_eg = bookH1withSumw2("h_ele_EoPout_eg","ele E_{seed}/P_{out}, ecal driven",eop_nbin,0.,eop_max);
00307   h1_ele_EoPout_barrel = bookH1withSumw2("h_ele_EoPout_barrel","ele E_{seed}/P_{out} barrel",eop_nbin,0.,eop_max,"E_{seed}/P_{out}");
00308   h1_ele_EoPout_eg_barrel = bookH1withSumw2("h_ele_EoPout_eg_barrel","ele E_{seed}/P_{out}, ecal driven, barrel",eop_nbin,0.,eop_max);
00309   h1_ele_EoPout_endcaps = bookH1withSumw2("h_ele_EoPout_endcaps","ele E_{seed}/P_{out} endcaps",eop_nbin,0.,eop_max,"E_{seed}/P_{out}");
00310   h1_ele_EoPout_eg_endcaps = bookH1withSumw2("h_ele_EoPout_eg_endcaps","ele E_{seed}/P_{out}, ecal driven, endcaps",eop_nbin,0.,eop_max);
00311   h2_ele_EoPoutVsEta = bookH2("h_ele_EoPoutVsEta","ele E_{seed}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
00312   h2_ele_EoPoutVsPhi = bookH2("h_ele_EoPoutVsPhi","ele E_{seed}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
00313   h2_ele_EoPoutVsE = bookH2("h_ele_EoPoutVsE","ele E_{seed}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
00314   h1_ele_EeleOPout = bookH1withSumw2("h_ele_EeleOPout","ele E_{ele}/P_{out}",eop_nbin,0.,eop_max,"E_{ele}/P_{out}");
00315   h1_ele_EeleOPout_eg = bookH1withSumw2("h_ele_EeleOPout_eg","ele E_{ele}/P_{out}, ecal driven",eop_nbin,0.,eop_max);
00316   h1_ele_EeleOPout_barrel = bookH1withSumw2("h_ele_EeleOPout_barrel","ele E_{ele}/P_{out} barrel",eop_nbin,0.,eop_max,"E_{ele}/P_{out}");
00317   h1_ele_EeleOPout_eg_barrel = bookH1withSumw2("h_ele_EeleOPout_eg_barrel","ele E_{ele}/P_{out}, ecal driven, barrel",eop_nbin,0.,eop_max);
00318   h1_ele_EeleOPout_endcaps = bookH1withSumw2("h_ele_EeleOPout_endcaps","ele E_{ele}/P_{out} endcaps",eop_nbin,0.,eop_max,"E_{ele}/P_{out}");
00319   h1_ele_EeleOPout_eg_endcaps = bookH1withSumw2("h_ele_EeleOPout_eg_endcaps","ele E_{ele}/P_{out}, ecal driven, endcaps",eop_nbin,0.,eop_max);
00320   h2_ele_EeleOPoutVsEta = bookH2("h_ele_EeleOPoutVsEta","ele E_{ele}/P_{out} vs eta",eta2D_nbin,eta_min,eta_max,eop2D_nbin,0.,eopmaxsht);
00321   h2_ele_EeleOPoutVsPhi = bookH2("h_ele_EeleOPoutVsPhi","ele E_{ele}/P_{out} vs phi",phi2D_nbin,phi_min,phi_max,eop2D_nbin,0.,eopmaxsht);
00322   h2_ele_EeleOPoutVsE = bookH2("h_ele_EeleOPoutVsE","ele E_{ele}/P_{out} vs E",p2D_nbin,0.,p_max,eop2D_nbin,0.,eopmaxsht);
00323   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}");
00324   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);
00325   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}");
00326   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);
00327   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}");
00328   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);
00329   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);
00330   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);
00331   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);
00332   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)");
00333   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);
00334   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)");
00335   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);
00336   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)");
00337   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);
00338   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);
00339   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);
00340   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);
00341   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}");
00342   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);
00343   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}");
00344   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);
00345   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}");
00346   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);
00347   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);
00348   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);
00349   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);
00350   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)");
00351   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);
00352   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)");
00353   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);
00354   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)");
00355   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);
00356   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);
00357   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);
00358   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);
00359   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}");
00360   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);
00361   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}");
00362   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);
00363   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}");
00364   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);
00365   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);
00366   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);
00367   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);
00368   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)");
00369   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);
00370   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)");
00371   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);
00372   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)");
00373   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);
00374   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);
00375   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);
00376   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);
00377   h1_ele_HoE = bookH1withSumw2("h_ele_HoE","ele hadronic energy / em energy",hoe_nbin, hoe_min, hoe_max,"H/E") ;
00378   h1_ele_HoE_eg = bookH1withSumw2("h_ele_HoE_eg","ele hadronic energy / em energy, ecal driven",hoe_nbin, hoe_min, hoe_max) ;
00379   h1_ele_HoE_barrel = bookH1withSumw2("h_ele_HoE_barrel","ele hadronic energy / em energy, barrel",hoe_nbin, hoe_min, hoe_max,"H/E") ;
00380   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) ;
00381   h1_ele_HoE_endcaps = bookH1withSumw2("h_ele_HoE_endcaps","ele hadronic energy / em energy, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E") ;
00382   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) ;
00383   h1_ele_HoE_fiducial = bookH1withSumw2("h_ele_HoE_fiducial","ele hadronic energy / em energy, fiducial region",hoe_nbin, hoe_min, hoe_max,"H/E") ;
00384   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) ;
00385   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) ;
00386   h2_ele_HoEVsE = bookH2("h_ele_HoEVsE","ele hadronic energy / em energy vs E",p_nbin, 0.,300.,hoe_nbin, hoe_min, hoe_max) ;
00387   h1_ele_seed_dphi2_ = bookH1withSumw2("h_ele_seedDphi2","ele seed dphi 2nd layer", 50,-0.003,+0.003,"#phi_{hit}-#phi_{pred} (rad)") ;
00388   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) ;
00389   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) ;
00390   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)") ;
00391   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) ;
00392   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) ;
00393   h1_ele_seed_subdet2_ = bookH1withSumw2("h_ele_seedSubdet2","ele seed subdet 2nd layer",10,0.,10.,"2nd hit subdet Id") ;
00394 
00395   // classes
00396   h1_ele_classes = bookH1withSumw2("h_ele_classes","ele classes",20,0.0,20.,"class Id");
00397   h1_ele_eta = bookH1withSumw2("h_ele_eta","ele electron eta",eta_nbin/2,0.0,eta_max);
00398   h1_ele_eta_golden = bookH1withSumw2("h_ele_eta_golden","ele electron eta golden",eta_nbin/2,0.0,eta_max);
00399   h1_ele_eta_bbrem = bookH1withSumw2("h_ele_eta_bbrem","ele electron eta bbrem",eta_nbin/2,0.0,eta_max);
00400   h1_ele_eta_narrow = bookH1withSumw2("h_ele_eta_narrow","ele electron eta narrow",eta_nbin/2,0.0,eta_max);
00401   h1_ele_eta_shower = bookH1withSumw2("h_ele_eta_show","ele electron eta showering",eta_nbin/2,0.0,eta_max);
00402   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);
00403   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);
00404   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);
00405   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);
00406   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);
00407   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);
00408   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);
00409   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);
00410   h1_scl_EoEmatchingObjectGolden_barrel = bookH1withSumw2("h_scl_EoEmatchingObject_golden_barrel","ele supercluster energy / gen energy, golden, barrel",popmatching_nbin,popmatching_min,popmatching_max);
00411   h1_scl_EoEmatchingObjectGolden_endcaps = bookH1withSumw2("h_scl_EoEmatchingObject_golden_endcaps","ele supercluster energy / gen energy, golden, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
00412   h1_scl_EoEmatchingObjectShowering_barrel = bookH1withSumw2("h_scl_EoEmatchingObject_showering_barrel","ele supercluster energy / gen energy, showering, barrel",popmatching_nbin,popmatching_min,popmatching_max);
00413   h1_scl_EoEmatchingObjectShowering_endcaps = bookH1withSumw2("h_scl_EoEmatchingObject_showering_endcaps","ele supercluster energy / gen energy, showering, endcaps",popmatching_nbin,popmatching_min,popmatching_max);
00414 
00415   // isolation
00416   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)");
00417   h1_ele_ecalRecHitSumEt_dr03 = bookH1withSumw2("h_ele_ecalRecHitSumEt_dr03","ecal isolation sum, dR=0.3",100,0.0,20.,"EcalIsoSum, cone 0.3 (GeV)");
00418   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)");
00419   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)");
00420   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)");
00421   h1_ele_ecalRecHitSumEt_dr04 = bookH1withSumw2("h_ele_ecalRecHitSumEt_dr04","ecal isolation sum, dR=0.4",100,0.0,20.,"EcalIsoSum, cone 0.4 (GeV)");
00422   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)");
00423   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)");
00424 
00425   // fbrem
00426   h1_ele_fbrem = bookH1withSumw2("h_ele_fbrem","ele brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}");
00427   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}>");
00428   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}>");
00429 
00430   // e/g et pflow electrons
00431   h1_ele_mva = bookH1withSumw2("h_ele_mva","ele identification mva",100,-1.,1.);
00432   h1_ele_provenance = bookH1withSumw2("h_ele_provenance","ele provenance",5,-2.,3.);
00433  }
00434 
00435 ElectronMcFakeValidator::~ElectronMcFakeValidator()
00436  {}
00437 
00438 
00439 //=========================================================================
00440 // Main methods
00441 //=========================================================================
00442 
00443 void ElectronMcFakeValidator::analyze( const edm::Event & iEvent, const edm::EventSetup & iSetup )
00444  {
00445   // get reco electrons
00446   edm::Handle<reco::GsfElectronCollection> gsfElectrons;
00447   iEvent.getByLabel(electronCollection_,gsfElectrons);
00448   edm::LogInfo("ElectronMcFakeValidator::analyze")
00449     <<"Treating event "<<iEvent.id()
00450     <<" with "<<gsfElectrons.product()->size()<<" electrons" ;
00451 
00452   // get gen jets
00453   edm::Handle<reco::GenJetCollection> genJets ;
00454   iEvent.getByLabel(matchingObjectCollection_,genJets);
00455 
00456   // get the beamspot from the Event:
00457   edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
00458   iEvent.getByLabel(beamSpotTag_,recoBeamSpotHandle);
00459   const BeamSpot bs = *recoBeamSpotHandle;
00460 
00461   h1_recEleNum_->Fill((*gsfElectrons).size());
00462 
00463   // all rec electrons
00464   reco::GsfElectronCollection::const_iterator gsfIter ;
00465   for
00466    ( gsfIter=gsfElectrons->begin() ;
00467      gsfIter!=gsfElectrons->end() ;
00468      gsfIter++ )
00469    {
00470     // preselect electrons
00471     if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_)
00472      { continue ; }
00473     h1_ele_EoverP_all->Fill( gsfIter->eSuperClusterOverP() );
00474     h1_ele_EseedOP_all->Fill( gsfIter->eSeedClusterOverP() );
00475     h1_ele_EoPout_all->Fill( gsfIter->eSeedClusterOverPout() );
00476     h1_ele_EeleOPout_all->Fill( gsfIter->eEleClusterOverPout() );
00477     h1_ele_dEtaSc_propVtx_all->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
00478     h1_ele_dPhiSc_propVtx_all->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
00479     h1_ele_dEtaCl_propOut_all->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo());
00480     h1_ele_dPhiCl_propOut_all->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo());
00481     h1_ele_HoE_all->Fill( gsfIter->hadronicOverEm() );
00482     double d
00483      = gsfIter->vertex().x()*gsfIter->vertex().x()
00484      + gsfIter->vertex().y()*gsfIter->vertex().y() ;
00485     h1_ele_TIP_all->Fill( sqrt(d) );
00486     h1_ele_vertexEta_all->Fill( gsfIter->eta() );
00487     h1_ele_vertexPt_all->Fill( gsfIter->pt() );
00488     float enrj1=gsfIter->superCluster()->energy();
00489     // mee
00490     reco::GsfElectronCollection::const_iterator gsfIter2 ;
00491     for
00492      ( gsfIter2=gsfIter+1 ;
00493        gsfIter2!=gsfElectrons->end() ;
00494        gsfIter2++ )
00495      {
00496       math::XYZTLorentzVector p12 = (*gsfIter).p4()+(*gsfIter2).p4();
00497       float mee2 = p12.Dot(p12) ;
00498       h1_ele_mee_all->Fill(sqrt(mee2)) ;
00499       float enrj2=gsfIter2->superCluster()->energy();
00500       h2_ele_E2mnE1vsMee_all->Fill(sqrt(mee2),enrj2-enrj1);
00501       if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
00502        { h2_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2),enrj2-enrj1) ; }
00503       if (gsfIter->charge()*gsfIter2->charge()<0.)
00504        { h1_ele_mee_os->Fill(sqrt(mee2)) ; }
00505      }
00506    }
00507 
00508   // association matching object-reco electrons
00509   int matchingObjectNum=0 ;
00510   reco::GenJetCollection::const_iterator moIter ;
00511   for
00512    ( moIter = genJets->begin() ;
00513      moIter != genJets->end() ; ++moIter )
00514    {
00515 
00516     // number of matching objects
00517     matchingObjectNum++ ;
00518 
00519     if (moIter->energy()/cosh(moIter->eta())> maxPt_ || std::abs(moIter->eta())> maxAbsEta_)
00520      { continue ; }
00521 
00522     // suppress the endcaps
00523     //if (std::abs(moIter->eta()) > 1.5) continue;
00524     // select central z
00525     //if ( std::abs((*mcIter)->production_vertex()->position().z())>50.) continue;
00526 
00527     h1_matchingObjectEta->Fill( moIter->eta() );
00528     h1_matchingObjectAbsEta->Fill( std::abs(moIter->eta()) );
00529     h1_matchingObjectP->Fill( moIter->energy() );
00530     h1_matchingObjectPt->Fill( moIter->energy()/cosh(moIter->eta()) );
00531     h1_matchingObjectPhi->Fill( moIter->phi() );
00532     h1_matchingObjectZ->Fill(  moIter->vz() );
00533 
00534     // looking for the best matching gsf electron
00535     bool okGsfFound = false;
00536     double gsfOkRatio = 999999.;
00537 
00538     // find best matched electron
00539     reco::GsfElectron bestGsfElectron ;
00540     reco::GsfElectronCollection::const_iterator gsfIter ;
00541     for
00542      ( gsfIter=gsfElectrons->begin() ;
00543        gsfIter!=gsfElectrons->end() ; gsfIter++ )
00544      {
00545       double dphi = gsfIter->phi()-moIter->phi();
00546       if (std::abs(dphi)>CLHEP::pi)
00547        { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi; }
00548       double deltaR = sqrt(pow((gsfIter->eta()-moIter->eta()),2) + pow(dphi,2));
00549       if ( deltaR < deltaR_ )
00550        {
00551         //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
00552         //(gsfIter->charge() > 0.) ){
00553         double tmpGsfRatio = gsfIter->p()/moIter->energy() ;
00554         if ( std::abs(tmpGsfRatio-1) < std::abs(gsfOkRatio-1) )
00555          {
00556           gsfOkRatio = tmpGsfRatio ;
00557           bestGsfElectron =* gsfIter ;
00558           okGsfFound = true ;
00559          }
00560         //}
00561        }
00562      } // loop over rec ele to look for the best one
00563 
00564     // analysis when the matching object is matched by a rec electron
00565     if (okGsfFound)
00566      {
00567       // electron related distributions
00568       h1_ele_charge->Fill( bestGsfElectron.charge() );
00569       h2_ele_chargeVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.charge() );
00570       h2_ele_chargeVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.charge() );
00571       h2_ele_chargeVsPt->Fill( bestGsfElectron.pt(),bestGsfElectron.charge() );
00572       h1_ele_vertexP->Fill( bestGsfElectron.p() );
00573       h1_ele_vertexPt->Fill( bestGsfElectron.pt() );
00574       h2_ele_vertexPtVsEta->Fill(  bestGsfElectron.eta(),bestGsfElectron.pt() );
00575       h2_ele_vertexPtVsPhi->Fill(  bestGsfElectron.phi(),bestGsfElectron.pt() );
00576       h1_ele_vertexEta->Fill( bestGsfElectron.eta() );
00577       // generated distributions for matched electrons
00578       h1_ele_matchingObjectPt_matched->Fill( moIter->energy()/cosh(moIter->eta()) );
00579       h1_ele_matchingObjectPhi_matched->Fill( moIter->phi() );
00580       h1_ele_matchingObjectAbsEta_matched->Fill( std::abs(moIter->eta()) );
00581       h1_ele_matchingObjectEta_matched->Fill( moIter->eta() );
00582       h2_ele_vertexEtaVsPhi->Fill(  bestGsfElectron.phi(),bestGsfElectron.eta() );
00583       h1_ele_vertexPhi->Fill( bestGsfElectron.phi() );
00584       h1_ele_vertexX->Fill( bestGsfElectron.vertex().x() );
00585       h1_ele_vertexY->Fill( bestGsfElectron.vertex().y() );
00586       h1_ele_vertexZ->Fill( bestGsfElectron.vertex().z() );
00587       h1_ele_matchingObjectZ_matched->Fill( moIter->vz() );
00588       double d
00589        =   (bestGsfElectron.vertex().x()-bs.position().x())
00590          * (bestGsfElectron.vertex().x()-bs.position().x())
00591        +   (bestGsfElectron.vertex().y()-bs.position().y())
00592          *(bestGsfElectron.vertex().y()-bs.position().y()) ;
00593       d = sqrt(d) ;
00594       h1_ele_vertexTIP->Fill( d );
00595       h2_ele_vertexTIPVsEta->Fill(  bestGsfElectron.eta(), d );
00596       h2_ele_vertexTIPVsPhi->Fill(  bestGsfElectron.phi(), d );
00597       h2_ele_vertexTIPVsPt->Fill(  bestGsfElectron.pt(), d );
00598       h1_ele_EtaMnEtamatchingObject->Fill( bestGsfElectron.eta()-moIter->eta());
00599       h2_ele_EtaMnEtamatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eta()-moIter->eta());
00600       h2_ele_EtaMnEtamatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eta()-moIter->eta());
00601       h2_ele_EtaMnEtamatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.eta()-moIter->eta());
00602       h1_ele_PhiMnPhimatchingObject->Fill( bestGsfElectron.phi()-moIter->phi());
00603       h1_ele_PhiMnPhimatchingObject2->Fill( bestGsfElectron.phi()-moIter->phi());
00604       h2_ele_PhiMnPhimatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.phi()-moIter->phi());
00605       h2_ele_PhiMnPhimatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.phi()-moIter->phi());
00606       h2_ele_PhiMnPhimatchingObjectVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.phi()-moIter->phi());
00607       h1_ele_PoPmatchingObject->Fill( bestGsfElectron.p()/moIter->energy());
00608       h2_ele_PoPmatchingObjectVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.p()/moIter->energy());
00609       h2_ele_PoPmatchingObjectVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.p()/moIter->energy());
00610       h2_ele_PoPmatchingObjectVsPt->Fill( bestGsfElectron.py(), bestGsfElectron.p()/moIter->energy());
00611       if (bestGsfElectron.isEB()) h1_ele_PoPmatchingObject_barrel->Fill( bestGsfElectron.p()/moIter->energy()) ;
00612       if (bestGsfElectron.isEE()) h1_ele_PoPmatchingObject_endcaps->Fill( bestGsfElectron.p()/moIter->energy()) ;
00613 
00614       // supercluster related distributions
00615       reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
00616       if (!bestGsfElectron.ecalDrivenSeed()&&bestGsfElectron.trackerDrivenSeed()) sclRef = bestGsfElectron.pflowSuperCluster();
00617       h1_scl_En_->Fill(sclRef->energy());
00618       double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
00619       double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
00620       h1_scl_Et_->Fill(sclRef->energy()*(Rt/R));
00621       h2_scl_EtVsEta_->Fill(sclRef->eta(),sclRef->energy()*(Rt/R));
00622       h2_scl_EtVsPhi_->Fill(sclRef->phi(),sclRef->energy()*(Rt/R));
00623       if (bestGsfElectron.classification() < 100)  h1_scl_EoEmatchingObject_barrel->Fill(sclRef->energy()/moIter->energy());
00624       if (bestGsfElectron.classification() >= 100)  h1_scl_EoEmatchingObject_endcaps->Fill(sclRef->energy()/moIter->energy());
00625       h1_scl_Eta_->Fill(sclRef->eta());
00626       h2_scl_EtaVsPhi_->Fill(sclRef->phi(),sclRef->eta());
00627       h1_scl_Phi_->Fill(sclRef->phi());
00628       h1_scl_SigIEtaIEta_->Fill(bestGsfElectron.scSigmaIEtaIEta());
00629       if (bestGsfElectron.isEB()) h1_scl_SigIEtaIEta_barrel_->Fill(bestGsfElectron.scSigmaIEtaIEta());
00630       if (bestGsfElectron.isEE()) h1_scl_SigIEtaIEta_endcaps_->Fill(bestGsfElectron.scSigmaIEtaIEta());
00631       h1_scl_E1x5_->Fill(bestGsfElectron.scE1x5());
00632       if (bestGsfElectron.isEB()) h1_scl_E1x5_barrel_->Fill(bestGsfElectron.scE1x5());
00633       if (bestGsfElectron.isEE()) h1_scl_E1x5_endcaps_->Fill(bestGsfElectron.scE1x5());
00634       h1_scl_E2x5max_->Fill(bestGsfElectron.scE2x5Max());
00635       if (bestGsfElectron.isEB()) h1_scl_E2x5max_barrel_->Fill(bestGsfElectron.scE2x5Max());
00636       if (bestGsfElectron.isEE()) h1_scl_E2x5max_endcaps_->Fill(bestGsfElectron.scE2x5Max());
00637       h1_scl_E5x5_->Fill(bestGsfElectron.scE5x5());
00638       if (bestGsfElectron.isEB()) h1_scl_E5x5_barrel_->Fill(bestGsfElectron.scE5x5());
00639       if (bestGsfElectron.isEE()) h1_scl_E5x5_endcaps_->Fill(bestGsfElectron.scE5x5());
00640 
00641       // track related distributions
00642       h1_ele_ambiguousTracks->Fill( bestGsfElectron.ambiguousGsfTracksSize() );
00643       h2_ele_ambiguousTracksVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize() );
00644       h2_ele_ambiguousTracksVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize() );
00645       h2_ele_ambiguousTracksVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize() );
00646       if (!readAOD_)
00647        { // track extra does not exist in AOD
00648         h1_ele_foundHits->Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() );
00649         h2_ele_foundHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
00650         h2_ele_foundHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
00651         h2_ele_foundHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
00652         h1_ele_lostHits->Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() );
00653         h2_ele_lostHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
00654         h2_ele_lostHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
00655         h2_ele_lostHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
00656         h1_ele_chi2->Fill( bestGsfElectron.gsfTrack()->normalizedChi2() );
00657         h2_ele_chi2VsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2() );
00658         h2_ele_chi2VsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2() );
00659         h2_ele_chi2VsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2() );
00660        }
00661       // from gsf track interface, hence using mean
00662       if (!readAOD_)
00663        { // track extra does not exist in AOD
00664         h1_ele_PinMnPout->Fill( bestGsfElectron.gsfTrack()->innerMomentum().R() - bestGsfElectron.gsfTrack()->outerMomentum().R() );
00665         h1_ele_outerP->Fill( bestGsfElectron.gsfTrack()->outerMomentum().R() );
00666         h1_ele_outerPt->Fill( bestGsfElectron.gsfTrack()->outerMomentum().Rho() );
00667        }
00668       // from electron interface, hence using mode
00669       h1_ele_PinMnPout_mode->Fill( bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
00670       h2_ele_PinMnPoutVsEta_mode->Fill(  bestGsfElectron.eta(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
00671       h2_ele_PinMnPoutVsPhi_mode->Fill(  bestGsfElectron.phi(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
00672       h2_ele_PinMnPoutVsPt_mode->Fill(  bestGsfElectron.pt(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
00673       h2_ele_PinMnPoutVsE_mode->Fill(  bestGsfElectron.caloEnergy(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
00674       if (!readAOD_)  // track extra does not exist in AOD
00675        h2_ele_PinMnPoutVsChi2_mode->Fill
00676         ( bestGsfElectron.gsfTrack()->normalizedChi2(),
00677           bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() ) ;
00678       h1_ele_outerP_mode->Fill( bestGsfElectron.trackMomentumOut().R() );
00679       h2_ele_outerPVsEta_mode->Fill(bestGsfElectron.eta(),  bestGsfElectron.trackMomentumOut().R() );
00680       h1_ele_outerPt_mode->Fill( bestGsfElectron.trackMomentumOut().Rho() );
00681       h2_ele_outerPtVsEta_mode->Fill(bestGsfElectron.eta(),  bestGsfElectron.trackMomentumOut().Rho() );
00682       h2_ele_outerPtVsPhi_mode->Fill(bestGsfElectron.phi(),  bestGsfElectron.trackMomentumOut().Rho() );
00683       h2_ele_outerPtVsPt_mode->Fill(bestGsfElectron.pt(),  bestGsfElectron.trackMomentumOut().Rho() );
00684 
00685       if (!readAOD_)
00686        { // track extra does not exist in AOD
00687         edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
00688         ElectronSeedRef elseed=seed.castTo<ElectronSeedRef>();
00689         h1_ele_seed_dphi2_->Fill(elseed->dPhi2());
00690         h2_ele_seed_dphi2VsEta_->Fill(bestGsfElectron.eta(), elseed->dPhi2());
00691         h2_ele_seed_dphi2VsPt_->Fill(bestGsfElectron.pt(), elseed->dPhi2()) ;
00692         h1_ele_seed_drz2_->Fill(elseed->dRz2());
00693         h2_ele_seed_drz2VsEta_->Fill(bestGsfElectron.eta(), elseed->dRz2());
00694         h2_ele_seed_drz2VsPt_->Fill(bestGsfElectron.pt(), elseed->dRz2());
00695         h1_ele_seed_subdet2_->Fill(elseed->subDet2());
00696        }
00697       // match distributions
00698       h1_ele_EoP->Fill( bestGsfElectron.eSuperClusterOverP() );
00699       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EoP_eg->Fill( bestGsfElectron.eSuperClusterOverP() );
00700       if (bestGsfElectron.isEB()) h1_ele_EoP_barrel->Fill( bestGsfElectron.eSuperClusterOverP() );
00701       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoP_eg_barrel->Fill( bestGsfElectron.eSuperClusterOverP() );
00702       if (bestGsfElectron.isEE()) h1_ele_EoP_endcaps->Fill( bestGsfElectron.eSuperClusterOverP() );
00703       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoP_eg_endcaps->Fill( bestGsfElectron.eSuperClusterOverP() );
00704       h2_ele_EoPVsEta->Fill(bestGsfElectron.eta(),  bestGsfElectron.eSuperClusterOverP() );
00705       h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(),  bestGsfElectron.eSuperClusterOverP() );
00706       h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(),  bestGsfElectron.eSuperClusterOverP() );
00707       h1_ele_EseedOP->Fill( bestGsfElectron.eSeedClusterOverP() );
00708       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EseedOP_eg->Fill( bestGsfElectron.eSeedClusterOverP() );
00709       if (bestGsfElectron.isEB()) h1_ele_EseedOP_barrel->Fill( bestGsfElectron.eSeedClusterOverP() );
00710       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EseedOP_eg_barrel->Fill( bestGsfElectron.eSeedClusterOverP() );
00711       if (bestGsfElectron.isEE()) h1_ele_EseedOP_endcaps->Fill( bestGsfElectron.eSeedClusterOverP() );
00712       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EseedOP_eg_endcaps->Fill( bestGsfElectron.eSeedClusterOverP() );
00713       h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(),  bestGsfElectron.eSeedClusterOverP() );
00714       h2_ele_EseedOPVsPhi->Fill(bestGsfElectron.phi(),  bestGsfElectron.eSeedClusterOverP() );
00715       h2_ele_EseedOPVsE->Fill(bestGsfElectron.caloEnergy(),  bestGsfElectron.eSeedClusterOverP() );
00716       h1_ele_EoPout->Fill( bestGsfElectron.eSeedClusterOverPout() );
00717       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EoPout_eg->Fill( bestGsfElectron.eSeedClusterOverPout() );
00718       if (bestGsfElectron.isEB()) h1_ele_EoPout_barrel->Fill( bestGsfElectron.eSeedClusterOverPout() );
00719       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoPout_eg_barrel->Fill( bestGsfElectron.eSeedClusterOverPout() );
00720       if (bestGsfElectron.isEE()) h1_ele_EoPout_endcaps->Fill( bestGsfElectron.eSeedClusterOverPout() );
00721       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EoPout_eg_endcaps->Fill( bestGsfElectron.eSeedClusterOverPout() );
00722       h2_ele_EoPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout() );
00723       h2_ele_EoPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout() );
00724       h2_ele_EoPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout() );
00725       h1_ele_EeleOPout->Fill( bestGsfElectron.eEleClusterOverPout() );
00726       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_EeleOPout_eg->Fill( bestGsfElectron.eEleClusterOverPout() );
00727       if (bestGsfElectron.isEB()) h1_ele_EeleOPout_barrel->Fill( bestGsfElectron.eEleClusterOverPout() );
00728       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EeleOPout_eg_barrel->Fill( bestGsfElectron.eEleClusterOverPout() );
00729       if (bestGsfElectron.isEE()) h1_ele_EeleOPout_endcaps->Fill( bestGsfElectron.eEleClusterOverPout() );
00730       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_EeleOPout_eg_endcaps->Fill( bestGsfElectron.eEleClusterOverPout() );
00731       h2_ele_EeleOPoutVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout() );
00732       h2_ele_EeleOPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout() );
00733       h2_ele_EeleOPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout() );
00734       h1_ele_dEtaSc_propVtx->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00735       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaSc_propVtx_eg->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00736       if (bestGsfElectron.isEB()) h1_ele_dEtaSc_propVtx_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00737       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaSc_propVtx_eg_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00738       if (bestGsfElectron.isEE())h1_ele_dEtaSc_propVtx_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00739       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaSc_propVtx_eg_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00740       h2_ele_dEtaScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00741       h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00742       h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
00743       h1_ele_dPhiSc_propVtx->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00744       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiSc_propVtx_eg->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00745       if (bestGsfElectron.isEB()) h1_ele_dPhiSc_propVtx_barrel->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00746       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiSc_propVtx_eg_barrel->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00747       if (bestGsfElectron.isEE())h1_ele_dPhiSc_propVtx_endcaps->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00748       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiSc_propVtx_eg_endcaps->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00749       h2_ele_dPhiScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00750       h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00751       h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
00752       h1_ele_dEtaCl_propOut->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00753       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaCl_propOut_eg->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00754       if (bestGsfElectron.isEB()) h1_ele_dEtaCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00755       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00756       if (bestGsfElectron.isEE()) h1_ele_dEtaCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00757       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00758       h2_ele_dEtaClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00759       h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00760       h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
00761       h1_ele_dPhiCl_propOut->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00762       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiCl_propOut_eg->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00763       if (bestGsfElectron.isEB()) h1_ele_dPhiCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00764       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00765       if (bestGsfElectron.isEE()) h1_ele_dPhiCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00766       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00767       h2_ele_dPhiClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00768       h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00769       h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
00770       h1_ele_dEtaEleCl_propOut->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00771       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaEleCl_propOut_eg->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00772       if (bestGsfElectron.isEB()) h1_ele_dEtaEleCl_propOut_barrel->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00773       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaEleCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00774       if (bestGsfElectron.isEE()) h1_ele_dEtaEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00775       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dEtaEleCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00776       h2_ele_dEtaEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00777       h2_ele_dEtaEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00778       h2_ele_dEtaEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
00779       h1_ele_dPhiEleCl_propOut->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00780       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiEleCl_propOut_eg->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00781       if (bestGsfElectron.isEB()) h1_ele_dPhiEleCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00782       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiEleCl_propOut_eg_barrel->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00783       if (bestGsfElectron.isEE()) h1_ele_dPhiEleCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00784       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_dPhiEleCl_propOut_eg_endcaps->Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00785       h2_ele_dPhiEleClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00786       h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00787       h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
00788       h1_ele_HoE->Fill(bestGsfElectron.hadronicOverEm());
00789       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_HoE_eg->Fill(bestGsfElectron.hadronicOverEm());
00790       if (bestGsfElectron.isEB()) h1_ele_HoE_barrel->Fill(bestGsfElectron.hadronicOverEm());
00791       if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_HoE_eg_barrel->Fill(bestGsfElectron.hadronicOverEm());
00792       if (bestGsfElectron.isEE()) h1_ele_HoE_endcaps->Fill(bestGsfElectron.hadronicOverEm());
00793       if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_HoE_eg_endcaps->Fill(bestGsfElectron.hadronicOverEm());
00794       if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap()&& !bestGsfElectron.isEBEEGap() &&
00795           !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap()) h1_ele_HoE_fiducial->Fill(bestGsfElectron.hadronicOverEm());
00796       h2_ele_HoEVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.hadronicOverEm());
00797       h2_ele_HoEVsPhi->Fill(bestGsfElectron.phi(),bestGsfElectron.hadronicOverEm());
00798       h2_ele_HoEVsE->Fill(bestGsfElectron.caloEnergy(),bestGsfElectron.hadronicOverEm());
00799 
00800       //classes
00801       int eleClass = bestGsfElectron.classification();
00802       if (bestGsfElectron.isEE()) eleClass+=10;
00803       h1_ele_classes->Fill(eleClass);
00804 
00805       h1_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
00806       if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h1_ele_eta_golden->Fill(std::abs(bestGsfElectron.eta()));
00807       if (bestGsfElectron.classification() == GsfElectron::BIGBREM) h1_ele_eta_bbrem->Fill(std::abs(bestGsfElectron.eta()));
00808       if (bestGsfElectron.classification() == GsfElectron::OLDNARROW) h1_ele_eta_narrow->Fill(std::abs(bestGsfElectron.eta()));
00809       if (bestGsfElectron.classification() == GsfElectron::SHOWERING) h1_ele_eta_shower->Fill(std::abs(bestGsfElectron.eta()));
00810 
00811       //fbrem
00812       double fbrem_mean=0.;
00813       if (!readAOD_) // track extra does not exist in AOD
00814         fbrem_mean =  1. - bestGsfElectron.gsfTrack()->outerMomentum().R()/bestGsfElectron.gsfTrack()->innerMomentum().R();
00815       double fbrem_mode =  bestGsfElectron.fbrem();
00816       h1_ele_fbrem->Fill(fbrem_mode);
00817       p1_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(),fbrem_mode);
00818       if (!readAOD_) // track extra does not exist in AOD
00819         p1_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(),fbrem_mean);
00820 
00821       if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h2_ele_PinVsPoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
00822       if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
00823         h2_ele_PinVsPoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
00824       if (!readAOD_) // track extra does not exist in AOD
00825         if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
00826           h2_ele_PinVsPoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
00827       if (!readAOD_) // track extra does not exist in AOD
00828         if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
00829           h2_ele_PinVsPoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
00830       if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
00831         h2_ele_PtinVsPtoutGolden_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
00832       if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
00833         h2_ele_PtinVsPtoutShowering_mode->Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
00834       if (!readAOD_) // track extra does not exist in AOD
00835         if (bestGsfElectron.classification() == GsfElectron::GOLDEN)
00836           h2_ele_PtinVsPtoutGolden_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
00837       if (!readAOD_) // track extra does not exist in AOD
00838         if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
00839           h2_ele_PtinVsPtoutShowering_mean->Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
00840 
00841       h1_ele_mva->Fill(bestGsfElectron.mva());
00842       if (bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(1.);
00843       if (bestGsfElectron.trackerDrivenSeed()) h1_ele_provenance->Fill(-1.);
00844       if (bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(0.);
00845       if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(-2.);
00846       if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed()) h1_ele_provenance->Fill(2.);
00847 
00848       h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
00849       h1_ele_ecalRecHitSumEt_dr03->Fill(bestGsfElectron.dr03EcalRecHitSumEt());
00850       h1_ele_hcalTowerSumEt_dr03_depth1->Fill(bestGsfElectron.dr03HcalDepth1TowerSumEt());
00851       h1_ele_hcalTowerSumEt_dr03_depth2->Fill(bestGsfElectron.dr03HcalDepth2TowerSumEt());
00852       h1_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt());
00853       h1_ele_ecalRecHitSumEt_dr04->Fill(bestGsfElectron.dr04EcalRecHitSumEt());
00854       h1_ele_hcalTowerSumEt_dr04_depth1->Fill(bestGsfElectron.dr04HcalDepth1TowerSumEt());
00855       h1_ele_hcalTowerSumEt_dr04_depth2->Fill(bestGsfElectron.dr04HcalDepth2TowerSumEt());
00856 
00857      } // gsf electron found
00858 
00859 //    } // matching object found
00860 
00861 //    }
00862 
00863    } // loop overmatching object
00864 
00865   h1_matchingObjectNum->Fill(matchingObjectNum) ;
00866 
00867  }
00868 
00869 void ElectronMcFakeValidator::endJob()
00870  {
00871   if (outputFile_!="")
00872    {
00873     setStoreFolder("EgammaV/ElectronMcFakeValidator") ;
00874 
00875     // matching object type
00876     std::string matchingObjectType = "Unknown" ;
00877     if (std::string::npos!=matchingObjectCollection_.label().find("iterativeCone5GenJets",0))
00878      { matchingObjectType = "GenJet" ; }
00879 
00880     std::string htitle, xtitle, ytitle ;
00881 
00882     std::cout << "[ElectronMcFakeValidator] efficiency calculation " << std::endl ;
00883     bookH1andDivide("h_ele_etaEff",h1_ele_matchingObjectEta_matched,h1_matchingObjectEta,"#eta","Efficiency","",true);
00884     bookH1andDivide("h_ele_zEff",h1_ele_matchingObjectZ_matched,h1_matchingObjectZ,"z (cm)","Efficiency","",true);
00885     bookH1andDivide("h_ele_absetaEff",h1_ele_matchingObjectAbsEta_matched,h1_matchingObjectAbsEta,"|#eta|","Efficiency");
00886     bookH1andDivide("h_ele_ptEff",h1_ele_matchingObjectPt_matched,h1_matchingObjectPt,"p_{T} (GeV/c)","Efficiency");
00887     bookH1andDivide("h_ele_phiEff",h1_ele_matchingObjectPhi_matched,h1_matchingObjectPhi,"#phi (rad)","Efficiency");
00888 //    bookH2andDivide("h_ele_ptEtaEff",h2_ele_matchingObjectPtEta_matched,h2_matchingObjectPtEta,"#eta","p_{T} (GeV/c)");
00889 //
00890 //    std::cout << "[ElectronMcFakeValidator] q-misid calculation " << std::endl;
00891 //    bookH1andDivide("h_ele_etaQmisid",h1_ele_matchingObjectEta_matched_qmisid,h1_simEta,"#eta","q misId","",true);
00892 //    bookH1andDivide("h_ele_zQmisid",h1_ele_matchingObjectZ_matched_qmisid,h1_simZ,"z (cm)","q misId","",true);
00893 //    bookH1andDivide("h_ele_absetaQmisid",h1_ele_matchingObjectAbsEta_matched_qmisid,h1_simAbsEta,"|#eta|","q misId");
00894 //    bookH1andDivide("h_ele_ptQmisid",h1_ele_matchingObjectPt_matched_qmisid,h1_simPt,"p_{T} (GeV/c)","q misId");
00895 
00896     std::cout << "[ElectronMcFakeValidator] all reco electrons " << std::endl ;
00897     bookH1andDivide("h_ele_etaEff_all",h1_ele_vertexEta_all,h1_matchingObjectEta,"#eta","N_{rec}/N_{gen}","",true);
00898     bookH1andDivide("h_ele_ptEff_all",h1_ele_vertexPt_all,h1_matchingObjectPt,"p_{T} (GeV/c)","N_{rec}/N_{gen}","",true);
00899 
00900     std::cout << "[ElectronMcFakeValidator] classes " << std::endl ;
00901     bookH1andDivide("h_ele_eta_goldenFrac",h1_ele_eta_golden,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of golden electrons vs eta");
00902     bookH1andDivide("h_ele_eta_bbremFrac" ,h1_ele_eta_bbrem ,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of big brem electrons vs eta");
00903     bookH1andDivide("h_ele_eta_narrowFrac",h1_ele_eta_narrow,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of narrow electrons vs eta");
00904     bookH1andDivide("h_ele_eta_showerFrac",h1_ele_eta_shower,h1_ele_eta,"|#eta|","Fraction of electrons","fraction of showering electrons vs eta");
00905 
00906     // fbrem
00907     MonitorElement * h1_ele_xOverX0VsEta = bookH1withSumw2("h_ele_xOverx0VsEta","mean X/X_0 vs eta",eta_nbin/2,0.0,2.5);
00908     for (int ibin=1;ibin<p1_ele_fbremVsEta_mean->getNbinsX()+1;ibin++) {
00909       double xOverX0 = 0.;
00910       if (p1_ele_fbremVsEta_mean->getBinContent(ibin)>0.)
00911        { xOverX0 = -log(p1_ele_fbremVsEta_mean->getBinContent(ibin)) ; }
00912       h1_ele_xOverX0VsEta->setBinContent(ibin,xOverX0) ;
00913     }
00914 
00915     // profiles from 2D histos
00916     htitle = "Electron / Matching "+matchingObjectType ;
00917     profileX("h_ele_PoPmatchingObjectVsEta_pfx",h2_ele_PoPmatchingObjectVsEta,htitle+", mean momentum, vs eta","#eta","<P/P_{gen}>");
00918     profileX("h_ele_PoPmatchingObjectVsPhi_pfx",h2_ele_PoPmatchingObjectVsPhi,htitle+", mean momentum, vs phi","#phi (rad)","<P/P_{gen}>");
00919     htitle = "Electron - Matching "+matchingObjectType ;
00920     profileX("h_ele_EtaMnEtamatchingObjectVsEta_pfx",h2_ele_EtaMnEtamatchingObjectVsEta,htitle+", mean eta, vs eta","#eta","<#eta_{rec} - #eta_{gen}>");
00921     profileX("h_ele_EtaMnEtamatchingObjectVsPhi_pfx",h2_ele_EtaMnEtamatchingObjectVsPhi,htitle+", mean eta, vs phi","#phi (rad)","<#eta_{rec} - #eta_{gen}>");
00922     profileX("h_ele_PhiMnPhimatchingObjectVsEta_pfx",h2_ele_PhiMnPhimatchingObjectVsEta,htitle+", mean phi, vs eta","#eta","<#phi_{rec} - #phi_{gen}> (rad)");
00923     profileX("h_ele_PhiMnPhimatchingObjectVsPhi_pfx",h2_ele_PhiMnPhimatchingObjectVsPhi,htitle+", mean phi, vs phi","#phi (rad)","");
00924     profileX("h_ele_vertexPtVsEta_pfx",h2_ele_vertexPtVsEta,"mean ele transverse momentum vs eta","#eta","<p_{T}> (GeV/c)");
00925     profileX("h_ele_vertexPtVsPhi_pfx",h2_ele_vertexPtVsPhi,"mean ele transverse momentum vs phi","#phi (rad)","<p_{T}> (GeV/c)");
00926     profileX("h_ele_EoPVsEta_pfx",h2_ele_EoPVsEta,"mean ele E/p vs eta","#eta","<E/P_{vertex}>");
00927     profileX("h_ele_EoPVsPhi_pfx",h2_ele_EoPVsPhi,"mean ele E/p vs phi","#phi (rad)","<E/P_{vertex}>");
00928     profileX("h_ele_EoPoutVsEta_pfx",h2_ele_EoPoutVsEta,"mean ele E/pout vs eta","#eta","<E_{seed}/P_{out}>");
00929     profileX("h_ele_EoPoutVsPhi_pfx",h2_ele_EoPoutVsPhi,"mean ele E/pout vs phi","#phi (rad)","<E_{seed}/P_{out}>");
00930     profileX("h_ele_EeleOPoutVsEta_pfx",h2_ele_EeleOPoutVsEta,"mean ele Eele/pout vs eta","#eta","<E_{ele}/P_{out}>");
00931     profileX("h_ele_EeleOPoutVsPhi_pfx",h2_ele_EeleOPoutVsPhi,"mean ele Eele/pout vs phi","#phi (rad)","<E_{ele}/P_{out}>");
00932     profileX("h_ele_HoEVsEta_pfx",h2_ele_HoEVsEta,"mean ele H/E vs eta","#eta","<H/E>");
00933     profileX("h_ele_HoEVsPhi_pfx",h2_ele_HoEVsPhi,"mean ele H/E vs phi","#phi (rad)","<H/E>");
00934     profileX("h_ele_chi2VsEta_pfx",h2_ele_chi2VsEta,"mean ele track chi2 vs eta","#eta","<#Chi^{2}>");
00935     profileX("h_ele_chi2VsPhi_pfx",h2_ele_chi2VsPhi,"mean ele track chi2 vs phi","#phi (rad)","<#Chi^{2}>");
00936     profileX("h_ele_foundHitsVsEta_pfx",h2_ele_foundHitsVsEta,"mean ele track # found hits vs eta","#eta","<N_{hits}>");
00937     profileX("h_ele_foundHitsVsPhi_pfx",h2_ele_foundHitsVsPhi,"mean ele track # found hits vs phi","#phi (rad)","<N_{hits}>");
00938     profileX("h_ele_lostHitsVsEta_pfx",h2_ele_lostHitsVsEta,"mean ele track # lost hits vs eta","#eta","<N_{hits}>");
00939     profileX("h_ele_lostHitsVsPhi_pfx",h2_ele_lostHitsVsPhi,"mean ele track # lost hits vs phi","#phi (rad)","<N_{hits}>");
00940     profileX("h_ele_vertexTIPVsEta_pfx",h2_ele_vertexTIPVsEta,"mean tip (wrt gen vtx) vs eta","#eta","<TIP> (cm)");
00941     profileX("h_ele_vertexTIPVsPhi_pfx",h2_ele_vertexTIPVsPhi,"mean tip (wrt gen vtx) vs phi","#phi","<TIP> (cm)");
00942     profileX("h_ele_vertexTIPVsPt_pfx",h2_ele_vertexTIPVsPt,"mean tip (wrt gen vtx) vs phi","p_{T} (GeV/c)","<TIP> (cm)");
00943 
00944     saveStore(outputFile_) ;
00945    }
00946  }
00947 
00948