CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GsfElectronMCAnalyzer Class Reference

#include <GsfElectronMCAnalyzer.h>

Inheritance diagram for GsfElectronMCAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginJob () override
 
void endJob () override
 
 GsfElectronMCAnalyzer (const edm::ParameterSet &conf)
 
 ~GsfElectronMCAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

double deltaR_
 
double detamatchmax
 
double detamatchmin
 
double detamax
 
double detamin
 
double dphimatchmax
 
double dphimatchmin
 
double dphimax
 
double dphimin
 
edm::InputTag electronCollection_
 
double eopmax
 
double eopmaxsht
 
double etamax
 
double etamin
 
double fhitsmax
 
TH1F * h_ele_ambiguousTracks
 
TH2F * h_ele_ambiguousTracksVsEta
 
TH2F * h_ele_ambiguousTracksVsPhi
 
TH2F * h_ele_ambiguousTracksVsPt
 
TH1F * h_ele_charge
 
TH1F * h_ele_ChargeMnChargeTrue
 
TH2F * h_ele_chargeVsEta
 
TH2F * h_ele_chargeVsPhi
 
TH2F * h_ele_chargeVsPt
 
TH1F * h_ele_chi2
 
TH1F * h_ele_chi2_barrel
 
TH1F * h_ele_chi2_endcaps
 
TH2F * h_ele_chi2VsEta
 
TH2F * h_ele_chi2VsPhi
 
TH2F * h_ele_chi2VsPt
 
TH1F * h_ele_classes
 
TH1F * h_ele_dEtaCl_propOut
 
TH1F * h_ele_dEtaCl_propOut_all
 
TH1F * h_ele_dEtaCl_propOut_all_barrel
 
TH1F * h_ele_dEtaCl_propOut_all_endcaps
 
TH1F * h_ele_dEtaCl_propOut_barrel
 
TH1F * h_ele_dEtaCl_propOut_eg
 
TH1F * h_ele_dEtaCl_propOut_eg_barrel
 
TH1F * h_ele_dEtaCl_propOut_eg_endcaps
 
TH1F * h_ele_dEtaCl_propOut_endcaps
 
TH2F * h_ele_dEtaClVsEta_propOut
 
TH2F * h_ele_dEtaClVsPhi_propOut
 
TH2F * h_ele_dEtaClVsPt_propOut
 
TH1F * h_ele_dEtaEleCl_propOut
 
TH1F * h_ele_dEtaEleCl_propOut_barrel
 
TH1F * h_ele_dEtaEleCl_propOut_eg
 
TH1F * h_ele_dEtaEleCl_propOut_eg_barrel
 
TH1F * h_ele_dEtaEleCl_propOut_eg_endcaps
 
TH1F * h_ele_dEtaEleCl_propOut_endcaps
 
TH2F * h_ele_dEtaEleClVsEta_propOut
 
TH2F * h_ele_dEtaEleClVsPhi_propOut
 
TH2F * h_ele_dEtaEleClVsPt_propOut
 
TH1F * h_ele_dEtaSc_propVtx
 
TH1F * h_ele_dEtaSc_propVtx_all
 
TH1F * h_ele_dEtaSc_propVtx_all_barrel
 
TH1F * h_ele_dEtaSc_propVtx_all_endcaps
 
TH1F * h_ele_dEtaSc_propVtx_barrel
 
TH1F * h_ele_dEtaSc_propVtx_eg
 
TH1F * h_ele_dEtaSc_propVtx_eg_barrel
 
TH1F * h_ele_dEtaSc_propVtx_eg_endcaps
 
TH1F * h_ele_dEtaSc_propVtx_endcaps
 
TH2F * h_ele_dEtaScVsEta_propVtx
 
TH2F * h_ele_dEtaScVsPhi_propVtx
 
TH2F * h_ele_dEtaScVsPt_propVtx
 
TH1F * h_ele_dPhiCl_propOut
 
TH1F * h_ele_dPhiCl_propOut_all
 
TH1F * h_ele_dPhiCl_propOut_all_barrel
 
TH1F * h_ele_dPhiCl_propOut_all_endcaps
 
TH1F * h_ele_dPhiCl_propOut_barrel
 
TH1F * h_ele_dPhiCl_propOut_eg
 
TH1F * h_ele_dPhiCl_propOut_eg_barrel
 
TH1F * h_ele_dPhiCl_propOut_eg_endcaps
 
TH1F * h_ele_dPhiCl_propOut_endcaps
 
TH2F * h_ele_dPhiClVsEta_propOut
 
TH2F * h_ele_dPhiClVsPhi_propOut
 
TH2F * h_ele_dPhiClVsPt_propOut
 
TH1F * h_ele_dPhiEleCl_propOut
 
TH1F * h_ele_dPhiEleCl_propOut_barrel
 
TH1F * h_ele_dPhiEleCl_propOut_eg
 
TH1F * h_ele_dPhiEleCl_propOut_eg_barrel
 
TH1F * h_ele_dPhiEleCl_propOut_eg_endcaps
 
TH1F * h_ele_dPhiEleCl_propOut_endcaps
 
TH2F * h_ele_dPhiEleClVsEta_propOut
 
TH2F * h_ele_dPhiEleClVsPhi_propOut
 
TH2F * h_ele_dPhiEleClVsPt_propOut
 
TH1F * h_ele_dPhiSc_propVtx
 
TH1F * h_ele_dPhiSc_propVtx_all
 
TH1F * h_ele_dPhiSc_propVtx_all_barrel
 
TH1F * h_ele_dPhiSc_propVtx_all_endcaps
 
TH1F * h_ele_dPhiSc_propVtx_barrel
 
TH1F * h_ele_dPhiSc_propVtx_eg
 
TH1F * h_ele_dPhiSc_propVtx_eg_barrel
 
TH1F * h_ele_dPhiSc_propVtx_eg_endcaps
 
TH1F * h_ele_dPhiSc_propVtx_endcaps
 
TH2F * h_ele_dPhiScVsEta_propVtx
 
TH2F * h_ele_dPhiScVsPhi_propVtx
 
TH2F * h_ele_dPhiScVsPt_propVtx
 
TH2F * h_ele_E2mnE1vsMee_all
 
TH2F * h_ele_E2mnE1vsMee_egeg_all
 
TH1F * h_ele_ecalRecHitSumEt_dr03
 
TH1F * h_ele_ecalRecHitSumEt_dr04
 
TH1F * h_ele_EeleOPout
 
TH1F * h_ele_EeleOPout_all
 
TH1F * h_ele_EeleOPout_all_barrel
 
TH1F * h_ele_EeleOPout_all_endcaps
 
TH1F * h_ele_EeleOPout_barrel
 
TH1F * h_ele_EeleOPout_eg
 
TH1F * h_ele_EeleOPout_eg_barrel
 
TH1F * h_ele_EeleOPout_eg_endcaps
 
TH1F * h_ele_EeleOPout_endcaps
 
TH2F * h_ele_EeleOPoutVsE
 
TH2F * h_ele_EeleOPoutVsEta
 
TH2F * h_ele_EeleOPoutVsPhi
 
TH1F * h_ele_EoP
 
TH1F * h_ele_EoP_barrel
 
TH1F * h_ele_EoP_eg
 
TH1F * h_ele_EoP_eg_barrel
 
TH1F * h_ele_EoP_eg_endcaps
 
TH1F * h_ele_EoP_endcaps
 
TH1F * h_ele_EoPout
 
TH1F * h_ele_EoPout_all
 
TH1F * h_ele_EoPout_all_barrel
 
TH1F * h_ele_EoPout_all_endcaps
 
TH1F * h_ele_EoPout_barrel
 
TH1F * h_ele_EoPout_eg
 
TH1F * h_ele_EoPout_eg_barrel
 
TH1F * h_ele_EoPout_eg_endcaps
 
TH1F * h_ele_EoPout_endcaps
 
TH2F * h_ele_EoPoutVsE
 
TH2F * h_ele_EoPoutVsEta
 
TH2F * h_ele_EoPoutVsPhi
 
TH2F * h_ele_EoPVsE
 
TH2F * h_ele_EoPVsEta
 
TH2F * h_ele_EoPVsPhi
 
TH1F * h_ele_EoverP_all
 
TH1F * h_ele_EoverP_all_barrel
 
TH1F * h_ele_EoverP_all_endcaps
 
TH1F * h_ele_EseedOP
 
TH1F * h_ele_EseedOP_all
 
TH1F * h_ele_EseedOP_all_barrel
 
TH1F * h_ele_EseedOP_all_endcaps
 
TH1F * h_ele_EseedOP_barrel
 
TH1F * h_ele_EseedOP_eg
 
TH1F * h_ele_EseedOP_eg_barrel
 
TH1F * h_ele_EseedOP_eg_endcaps
 
TH1F * h_ele_EseedOP_endcaps
 
TH2F * h_ele_EseedOPVsE
 
TH2F * h_ele_EseedOPVsEta
 
TH2F * h_ele_EseedOPVsPhi
 
TH1F * h_ele_Et
 
TH1F * h_ele_Et_all
 
TH1F * h_ele_eta
 
TH1F * h_ele_eta_bbrem
 
TH1F * h_ele_eta_golden
 
TH1F * h_ele_eta_narrow
 
TH1F * h_ele_eta_shower
 
TH1F * h_ele_EtaMnEtaTrue
 
TH1F * h_ele_EtaMnEtaTrue_barrel
 
TH1F * h_ele_EtaMnEtaTrue_endcaps
 
TH2F * h_ele_EtaMnEtaTrueVsEta
 
TH2F * h_ele_EtaMnEtaTrueVsPhi
 
TH2F * h_ele_EtaMnEtaTrueVsPt
 
TH1F * h_ele_fbrem
 
TH1F * h_ele_fbrem_eg
 
TProfile * h_ele_fbremVsEta_mean
 
TProfile * h_ele_fbremVsEta_mode
 
TH1F * h_ele_foundHits
 
TH1F * h_ele_foundHits_barrel
 
TH1F * h_ele_foundHits_endcaps
 
TH2F * h_ele_foundHitsVsEta
 
TH2F * h_ele_foundHitsVsPhi
 
TH2F * h_ele_foundHitsVsPt
 
TH1F * h_ele_hcalDepth1TowerSumEt_dr03
 
TH1F * h_ele_hcalDepth1TowerSumEt_dr04
 
TH1F * h_ele_hcalDepth2TowerSumEt_dr03
 
TH1F * h_ele_hcalDepth2TowerSumEt_dr04
 
TH1F * h_ele_HoE
 
TH1F * h_ele_HoE_all
 
TH1F * h_ele_HoE_all_barrel
 
TH1F * h_ele_HoE_all_endcaps
 
TH1F * h_ele_HoE_barrel
 
TH1F * h_ele_HoE_eg
 
TH1F * h_ele_HoE_eg_barrel
 
TH1F * h_ele_HoE_eg_endcaps
 
TH1F * h_ele_HoE_endcaps
 
TH1F * h_ele_HoE_fiducial
 
TH2F * h_ele_HoEVsE
 
TH2F * h_ele_HoEVsEta
 
TH2F * h_ele_HoEVsPhi
 
TH1F * h_ele_lostHits
 
TH1F * h_ele_lostHits_barrel
 
TH1F * h_ele_lostHits_endcaps
 
TH2F * h_ele_lostHitsVsEta
 
TH2F * h_ele_lostHitsVsPhi
 
TH2F * h_ele_lostHitsVsPt
 
TH1F * h_ele_mee_all
 
TH1F * h_ele_mee_os
 
TH1F * h_ele_mee_os_bb
 
TH1F * h_ele_mee_os_ebeb
 
TH1F * h_ele_mee_os_ebee
 
TH1F * h_ele_mee_os_eeee
 
TH1F * h_ele_mee_os_gb
 
TH1F * h_ele_mee_os_gg
 
TH1F * h_ele_mva
 
TH1F * h_ele_mva_eg
 
TH1F * h_ele_outerP
 
TH1F * h_ele_outerP_mode
 
TH1F * h_ele_outerPt
 
TH1F * h_ele_outerPt_mode
 
TH2F * h_ele_outerPtVsEta_mode
 
TH2F * h_ele_outerPtVsPhi_mode
 
TH2F * h_ele_outerPtVsPt_mode
 
TH2F * h_ele_outerPVsEta_mode
 
TH1F * h_ele_PhiMnPhiTrue
 
TH1F * h_ele_PhiMnPhiTrue2
 
TH1F * h_ele_PhiMnPhiTrue_barrel
 
TH1F * h_ele_PhiMnPhiTrue_endcaps
 
TH2F * h_ele_PhiMnPhiTrueVsEta
 
TH2F * h_ele_PhiMnPhiTrueVsPhi
 
TH2F * h_ele_PhiMnPhiTrueVsPt
 
TH1F * h_ele_PinMnPout
 
TH1F * h_ele_PinMnPout_mode
 
TH2F * h_ele_PinMnPoutVsChi2_mode
 
TH2F * h_ele_PinMnPoutVsE_mode
 
TH2F * h_ele_PinMnPoutVsEta_mode
 
TH2F * h_ele_PinMnPoutVsPhi_mode
 
TH2F * h_ele_PinMnPoutVsPt_mode
 
TH2F * h_ele_PinVsPoutGolden_mean
 
TH2F * h_ele_PinVsPoutGolden_mode
 
TH2F * h_ele_PinVsPoutShowering_mean
 
TH2F * h_ele_PinVsPoutShowering_mode
 
TH1F * h_ele_PoPtrue
 
TH1F * h_ele_PoPtrue_barrel
 
TH1F * h_ele_PoPtrue_endcaps
 
TH1F * h_ele_PoPtrue_golden_barrel
 
TH1F * h_ele_PoPtrue_golden_endcaps
 
TH1F * h_ele_PoPtrue_showering_barrel
 
TH1F * h_ele_PoPtrue_showering_endcaps
 
TH2F * h_ele_PoPtrueVsEta
 
TH2F * h_ele_PoPtrueVsPhi
 
TH2F * h_ele_PoPtrueVsPt
 
TH1F * h_ele_provenance
 
TH2F * h_ele_PtinVsPtoutGolden_mean
 
TH2F * h_ele_PtinVsPtoutGolden_mode
 
TH2F * h_ele_PtinVsPtoutShowering_mean
 
TH2F * h_ele_PtinVsPtoutShowering_mode
 
TH1F * h_ele_PtoPttrue
 
TH1F * h_ele_PtoPttrue_barrel
 
TH1F * h_ele_PtoPttrue_endcaps
 
TH1F * h_ele_seed_dphi2_
 
TH2F * h_ele_seed_dphi2VsEta_
 
TH2F * h_ele_seed_dphi2VsPt_
 
TH1F * h_ele_seed_drz2_
 
TH2F * h_ele_seed_drz2VsEta_
 
TH2F * h_ele_seed_drz2VsPt_
 
TH1F * h_ele_seed_subdet2_
 
TH1F * h_ele_simAbsEta_matched
 
TH1F * h_ele_simAbsEta_matched_qmisid
 
TH1F * h_ele_simEta_matched
 
TH1F * h_ele_simEta_matched_qmisid
 
TH1F * h_ele_simPhi_matched
 
TH1F * h_ele_simPhi_matched_qmisid
 
TH1F * h_ele_simPt_matched
 
TH1F * h_ele_simPt_matched_qmisid
 
TH2F * h_ele_simPtEta_matched
 
TH1F * h_ele_simZ_matched
 
TH1F * h_ele_simZ_matched_qmisid
 
TH1F * h_ele_TIP_all
 
TH1F * h_ele_TIP_all_barrel
 
TH1F * h_ele_TIP_all_endcaps
 
TH1F * h_ele_tkSumPt_dr03
 
TH1F * h_ele_tkSumPt_dr04
 
TH1F * h_ele_vertexAbsEta
 
TH1F * h_ele_vertexEta
 
TH1F * h_ele_vertexEta_all
 
TH2F * h_ele_vertexEtaVsPhi
 
TH1F * h_ele_vertexP
 
TH1F * h_ele_vertexPhi
 
TH1F * h_ele_vertexPt
 
TH1F * h_ele_vertexPt_5100
 
TH1F * h_ele_vertexPt_all
 
TH2F * h_ele_vertexPtVsEta
 
TH2F * h_ele_vertexPtVsPhi
 
TH1F * h_ele_vertexTIP
 
TH2F * h_ele_vertexTIPVsEta
 
TH2F * h_ele_vertexTIPVsPhi
 
TH2F * h_ele_vertexTIPVsPt
 
TH1F * h_ele_vertexX
 
TH1F * h_ele_vertexY
 
TH1F * h_ele_vertexZ
 
TH1F * h_eleNum
 
TH1F * h_gamNum
 
TH1F * h_mcNum
 
TH1F * h_simAbsEta
 
TH1F * h_simEta
 
TH1F * h_simP
 
TH1F * h_simPhi
 
TH1F * h_simPt
 
TH2F * h_simPtEta
 
TH1F * h_simZ
 
TFile * histfile_
 
TH1F * histNum_
 
TH1F * histSclE1x5_
 
TH1F * histSclE1x5_barrel_
 
TH1F * histSclE1x5_eg_
 
TH1F * histSclE1x5_eg_barrel_
 
TH1F * histSclE1x5_eg_endcaps_
 
TH1F * histSclE1x5_endcaps_
 
TH1F * histSclE2x5max_
 
TH1F * histSclE2x5max_barrel_
 
TH1F * histSclE2x5max_eg_
 
TH1F * histSclE2x5max_eg_barrel_
 
TH1F * histSclE2x5max_eg_endcaps_
 
TH1F * histSclE2x5max_endcaps_
 
TH1F * histSclE5x5_
 
TH1F * histSclE5x5_barrel_
 
TH1F * histSclE5x5_eg_
 
TH1F * histSclE5x5_eg_barrel_
 
TH1F * histSclE5x5_eg_endcaps_
 
TH1F * histSclE5x5_endcaps_
 
TH1F * histSclEn_
 
TH1F * histSclEoEtrue_barrel
 
TH1F * histSclEoEtrue_barrel_eg
 
TH1F * histSclEoEtrue_barrel_eg_new
 
TH1F * histSclEoEtrue_barrel_etagap
 
TH1F * histSclEoEtrue_barrel_etagap_new
 
TH1F * histSclEoEtrue_barrel_new
 
TH1F * histSclEoEtrue_barrel_phigap
 
TH1F * histSclEoEtrue_barrel_phigap_new
 
TH1F * histSclEoEtrue_ebeegap
 
TH1F * histSclEoEtrue_ebeegap_new
 
TH1F * histSclEoEtrue_endcaps
 
TH1F * histSclEoEtrue_endcaps_deegap
 
TH1F * histSclEoEtrue_endcaps_deegap_new
 
TH1F * histSclEoEtrue_endcaps_eg
 
TH1F * histSclEoEtrue_endcaps_eg_new
 
TH1F * histSclEoEtrue_endcaps_new
 
TH1F * histSclEoEtrue_endcaps_ringgap
 
TH1F * histSclEoEtrue_endcaps_ringgap_new
 
TH1F * histSclEoEtrueGolden_barrel
 
TH1F * histSclEoEtrueGolden_endcaps
 
TH2F * histSclEoEtruePfVsEg
 
TH1F * histSclEoEtrueShowering_barrel
 
TH1F * histSclEoEtrueShowering_endcaps
 
TH1F * histSclEt_
 
TH1F * histSclEta_
 
TH2F * histSclEtaVsPhi_
 
TH2F * histSclEtVsEta_
 
TH2F * histSclEtVsPhi_
 
TH1F * histSclPhi_
 
TH1F * histSclSigEtaEta_
 
TH1F * histSclSigEtaEta_barrel_
 
TH1F * histSclSigEtaEta_eg_
 
TH1F * histSclSigEtaEta_eg_barrel_
 
TH1F * histSclSigEtaEta_eg_endcaps_
 
TH1F * histSclSigEtaEta_endcaps_
 
TH1F * histSclSigIEtaIEta_
 
TH1F * histSclSigIEtaIEta_barrel_
 
TH1F * histSclSigIEtaIEta_eg_
 
TH1F * histSclSigIEtaIEta_eg_barrel_
 
TH1F * histSclSigIEtaIEta_eg_endcaps_
 
TH1F * histSclSigIEtaIEta_endcaps_
 
double hoemax
 
double hoemin
 
double lhitsmax
 
std::vector< int > matchingIDs_
 
std::vector< int > matchingMotherIDs_
 
double maxAbsEta_
 
double maxPt_
 
float mcEnergy [10]
 
float mcEta [10]
 
float mcPhi [10]
 
float mcPt [10]
 
float mcQ [10]
 
edm::InputTag mcTruthCollection_
 
double meemax
 
double meemin
 
int nbindeta
 
int nbindetamatch
 
int nbindetamatch2D
 
int nbindphi
 
int nbindphimatch
 
int nbindphimatch2D
 
int nbineop
 
int nbineop2D
 
int nbineta
 
int nbineta2D
 
int nbinfhits
 
int nbinhoe
 
int nbinlhits
 
int nbinmee
 
int nbinp
 
int nbinp2D
 
int nbinphi
 
int nbinphi2D
 
int nbinpoptrue
 
int nbinpt
 
int nbinpt2D
 
int nbinpteff
 
int nbinxyz
 
std::string outputFile_
 
edm::ESHandle< TrackerGeometrypDD
 
double phimax
 
double phimin
 
double pmax
 
double poptruemax
 
double poptruemin
 
double ptmax
 
bool readAOD_
 
float seedEta [10]
 
float seedMomentum [10]
 
float seedPhi [10]
 
float seedPt [10]
 
float seedQ [10]
 
float superclusterEnergy [10]
 
float superclusterEt [10]
 
float superclusterEta [10]
 
float superclusterPhi [10]
 
edm::ESHandle< MagneticFieldtheMagField
 
TrajectoryStateTransform transformer_
 
TTree * tree_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: GsfElectrons analyzer using MC truth

Implementation: <Notes on="" implementation>="">

Definition at line 38 of file GsfElectronMCAnalyzer.h.

Constructor & Destructor Documentation

GsfElectronMCAnalyzer::GsfElectronMCAnalyzer ( const edm::ParameterSet conf)
explicit

Definition at line 51 of file GsfElectronMCAnalyzer.cc.

References deltaR_, edm::ParameterSet::getParameter(), phimax, phimin, muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

52  {
53  outputFile_ = conf.getParameter<std::string>("outputFile");
54  histfile_ = new TFile(outputFile_.c_str(),"RECREATE");
55  electronCollection_=conf.getParameter<edm::InputTag>("electronCollection");
56  mcTruthCollection_ = conf.getParameter<edm::InputTag>("mcTruthCollection");
57  readAOD_ = conf.getParameter<bool>("readAOD");
58  maxPt_ = conf.getParameter<double>("MaxPt");
59  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
60  deltaR_ = conf.getParameter<double>("DeltaR");
61  matchingIDs_ = conf.getParameter<std::vector<int> >("MatchingID");
62  matchingMotherIDs_ = conf.getParameter<std::vector<int> >("MatchingMotherID");
64  conf.getParameter<edm::ParameterSet>("HistosConfigurationMC") ;
65 
66  etamin=pset.getParameter<double>("Etamin");
67  etamax=pset.getParameter<double>("Etamax");
68  phimin=pset.getParameter<double>("Phimin");
69  phimax=pset.getParameter<double>("Phimax");
70  ptmax=pset.getParameter<double>("Ptmax");
71  pmax=pset.getParameter<double>("Pmax");
72  eopmax=pset.getParameter<double>("Eopmax");
73  eopmaxsht=pset.getParameter<double>("Eopmaxsht");
74  detamin=pset.getParameter<double>("Detamin");
75  detamax=pset.getParameter<double>("Detamax");
76  dphimin=pset.getParameter<double>("Dphimin");
77  dphimax=pset.getParameter<double>("Dphimax");
78  detamatchmin=pset.getParameter<double>("Detamatchmin");
79  detamatchmax=pset.getParameter<double>("Detamatchmax");
80  dphimatchmin=pset.getParameter<double>("Dphimatchmin");
81  dphimatchmax=pset.getParameter<double>("Dphimatchmax");
82  fhitsmax=pset.getParameter<double>("Fhitsmax");
83  lhitsmax=pset.getParameter<double>("Lhitsmax");
84  nbineta=pset.getParameter<int>("Nbineta");
85  nbineta2D=pset.getParameter<int>("Nbineta2D");
86  nbinp=pset.getParameter<int>("Nbinp");
87  nbinpt=pset.getParameter<int>("Nbinpt");
88  nbinp2D=pset.getParameter<int>("Nbinp2D");
89  nbinpt2D=pset.getParameter<int>("Nbinpt2D");
90  nbinpteff=pset.getParameter<int>("Nbinpteff");
91  nbinphi=pset.getParameter<int>("Nbinphi");
92  nbinphi2D=pset.getParameter<int>("Nbinphi2D");
93  nbineop=pset.getParameter<int>("Nbineop");
94  nbineop2D=pset.getParameter<int>("Nbineop2D");
95  nbinfhits=pset.getParameter<int>("Nbinfhits");
96  nbinlhits=pset.getParameter<int>("Nbinlhits");
97  nbinxyz=pset.getParameter<int>("Nbinxyz");
98  nbindeta=pset.getParameter<int>("Nbindeta");
99  nbindphi=pset.getParameter<int>("Nbindphi");
100  nbindetamatch=pset.getParameter<int>("Nbindetamatch");
101  nbindphimatch=pset.getParameter<int>("Nbindphimatch");
102  nbindetamatch2D=pset.getParameter<int>("Nbindetamatch2D");
103  nbindphimatch2D=pset.getParameter<int>("Nbindphimatch2D");
104  nbinpoptrue= pset.getParameter<int>("Nbinpoptrue");
105  poptruemin=pset.getParameter<double>("Poptruemin");
106  poptruemax=pset.getParameter<double>("Poptruemax");
107  nbinmee= pset.getParameter<int>("Nbinmee");
108  meemin=pset.getParameter<double>("Meemin");
109  meemax=pset.getParameter<double>("Meemax");
110  nbinhoe= pset.getParameter<int>("Nbinhoe");
111  hoemin=pset.getParameter<double>("Hoemin");
112  hoemax=pset.getParameter<double>("Hoemax");
113  }
T getParameter(std::string const &) const
std::vector< int > matchingMotherIDs_
std::vector< int > matchingIDs_
GsfElectronMCAnalyzer::~GsfElectronMCAnalyzer ( )
override

Definition at line 1726 of file GsfElectronMCAnalyzer.cc.

1727 {
1728 
1729  // do anything here that needs to be done at desctruction time
1730  // (e.g. close files, deallocate resources etc.)
1731  histfile_->Write();
1732  histfile_->Close();
1733 
1734 }

Member Function Documentation

void GsfElectronMCAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 1742 of file GsfElectronMCAnalyzer.cc.

References funct::abs(), reco::GsfElectron::ambiguousGsfTracksSize(), reco::GsfElectron::BIGBREM, reco::GsfElectron::caloEnergy(), edm::RefToBase< T >::castTo(), reco::LeafCandidate::charge(), reco::GsfElectron::classification(), gather_cfg::cout, edmIntegrityCheck::d, reco::GsfElectron::deltaEtaEleClusterTrackAtCalo(), reco::GsfElectron::deltaEtaSeedClusterTrackAtCalo(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiEleClusterTrackAtCalo(), reco::GsfElectron::deltaPhiSeedClusterTrackAtCalo(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::deltaR(), deltaR_, reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalDepth1TowerSumEt(), reco::GsfElectron::dr03HcalDepth2TowerSumEt(), reco::GsfElectron::dr03TkSumPt(), reco::GsfElectron::dr04EcalRecHitSumEt(), reco::GsfElectron::dr04HcalDepth1TowerSumEt(), reco::GsfElectron::dr04HcalDepth2TowerSumEt(), reco::GsfElectron::dr04TkSumPt(), reco::GsfElectron::ecalDrivenSeed(), reco::GsfElectron::eEleClusterOverPout(), reco::GsfElectron::eSeedClusterOverP(), reco::GsfElectron::eSeedClusterOverPout(), reco::GsfElectron::eSuperClusterOverP(), reco::LeafCandidate::eta(), reco::GsfElectron::fbrem(), HcalObjRepresent::Fill(), GenHFHadronMatcher_cfi::genParticles, edm::Event::getByLabel(), reco::GsfElectron::GOLDEN, gsfElectrons_cfi::gsfElectrons, reco::GsfElectron::gsfTrack(), reco::GsfElectron::hadronicOverEm(), mps_fire::i, edm::EventBase::id(), reco::GsfElectron::isEB(), reco::GsfElectron::isEBEEGap(), reco::GsfElectron::isEBEtaGap(), reco::GsfElectron::isEBPhiGap(), reco::GsfElectron::isEE(), reco::GsfElectron::isEEDeeGap(), reco::GsfElectron::isEERingGap(), edm::Ref< C, T, F >::isNull(), reco::Candidate::mother(), reco::GsfElectron::mva_e_pi(), reco::LeafCandidate::p(), reco::GsfElectron::parentSuperCluster(), reco::Candidate::pdgId(), reco::LeafCandidate::phi(), pi, funct::pow(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), reco::LeafCandidate::py(), dttmaxenums::R, reco::GsfElectron::scE1x5(), reco::GsfElectron::scE2x5Max(), reco::GsfElectron::scE5x5(), reco::GsfElectron::scSigmaEtaEta(), reco::GsfElectron::scSigmaIEtaIEta(), SurveyInfoScenario_cff::seed, reco::GsfElectron::SHOWERING, mathSSE::sqrt(), reco::GsfElectron::superCluster(), reco::GsfElectron::trackerDrivenSeed(), reco::GsfElectron::trackMomentumAtVtx(), reco::GsfElectron::trackMomentumOut(), and reco::LeafCandidate::vertex().

1743 {
1744  std::cout << "analyzing new event " << std::endl;
1745  // get electrons
1746 
1748  iEvent.getByLabel(electronCollection_,gsfElectrons);
1749  edm::LogInfo("")<<"\n\n =================> Treating event "<<iEvent.id()<<" Number of electrons "<<gsfElectrons.product()->size();
1750 
1752  iEvent.getByLabel(mcTruthCollection_, genParticles);
1753 
1754  histNum_->Fill((*gsfElectrons).size());
1755 
1756  // all rec electrons
1757  for (reco::GsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin();
1758  gsfIter!=gsfElectrons->end(); gsfIter++){
1759  // preselect electrons
1760  if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_) continue;
1761  h_ele_EoverP_all -> Fill( gsfIter->eSuperClusterOverP() );
1762  h_ele_EseedOP_all -> Fill( gsfIter->eSeedClusterOverP() );
1763  h_ele_EoPout_all -> Fill( gsfIter->eSeedClusterOverPout() );
1764  h_ele_EeleOPout_all -> Fill( gsfIter->eEleClusterOverPout() );
1765  h_ele_dEtaSc_propVtx_all -> Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
1766  h_ele_dPhiSc_propVtx_all -> Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
1767  h_ele_dEtaCl_propOut_all -> Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo());
1768  h_ele_dPhiCl_propOut_all -> Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo());
1769  h_ele_HoE_all -> Fill( gsfIter->hadronicOverEm() );
1770  double d = gsfIter->vertex().x()*gsfIter->vertex().x()+gsfIter->vertex().y()*gsfIter->vertex().y();
1771  h_ele_TIP_all -> Fill( sqrt(d) );
1772  h_ele_vertexEta_all -> Fill( gsfIter->eta() );
1773  h_ele_vertexPt_all -> Fill( gsfIter->pt() );
1774  h_ele_Et_all -> Fill( gsfIter->superCluster()->energy()/cosh(gsfIter->superCluster()->eta()));
1775  float enrj1=gsfIter->superCluster()->energy();
1776  // mee
1777  for (reco::GsfElectronCollection::const_iterator gsfIter2=gsfIter+1;
1778  gsfIter2!=gsfElectrons->end(); gsfIter2++){
1779  math::XYZTLorentzVector p12 = (*gsfIter).p4()+(*gsfIter2).p4();
1780  float mee2 = p12.Dot(p12);
1781  float enrj2=gsfIter2->superCluster()->energy();
1782  h_ele_mee_all -> Fill(sqrt(mee2));
1783  h_ele_E2mnE1vsMee_all->Fill(sqrt(mee2),enrj2-enrj1);
1784  if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed()) h_ele_E2mnE1vsMee_egeg_all->Fill(sqrt(mee2),enrj2-enrj1);
1785  if (gsfIter->charge()*gsfIter2->charge()<0.) {
1786  h_ele_mee_os -> Fill(sqrt(mee2));
1787  if (gsfIter->isEB() && gsfIter2->isEB()) h_ele_mee_os_ebeb -> Fill(sqrt(mee2));
1788  if ((gsfIter->isEB() && gsfIter2->isEE()) || (gsfIter->isEE() && gsfIter2->isEB())) h_ele_mee_os_ebee -> Fill(sqrt(mee2));
1789  if (gsfIter->isEE() && gsfIter2->isEE()) h_ele_mee_os_eeee -> Fill(sqrt(mee2));
1790  if ((gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1791  (gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::BIGBREM) ||
1792  //(gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::OLDNARROW) ||
1793  (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1794  (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::BIGBREM)/* ||
1795  (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::OLDNARROW) ||
1796  (gsfIter->classification()==GsfElectron::OLDNARROW && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1797  (gsfIter->classification()==GsfElectron::OLDNARROW && gsfIter2->classification()==GsfElectron::BIGBREM) ||
1798  (gsfIter->classification()==GsfElectron::OLDNARROW && gsfIter2->classification()==GsfElectron::OLDNARROW)*/ )
1799  { h_ele_mee_os_gg -> Fill(sqrt(mee2));}
1800  else if (
1801  (gsfIter->classification()==GsfElectron::SHOWERING && gsfIter2->classification()==GsfElectron::SHOWERING) ||
1802  (gsfIter->classification()==GsfElectron::SHOWERING && gsfIter2->isGap()) ||
1803  (gsfIter->isGap() && gsfIter2->classification()==GsfElectron::SHOWERING) ||
1804  (gsfIter->isGap() && gsfIter2->isGap()))
1805  { h_ele_mee_os_bb -> Fill(sqrt(mee2));}
1806  else
1807  { h_ele_mee_os_gb -> Fill(sqrt(mee2));}
1808  }
1809  }
1810  }
1811 
1812  int mcNum=0, gamNum=0, eleNum=0;
1813  bool matchingID, matchingMotherID;
1814 
1815  // charge mis-ID
1816  for (reco::GenParticleCollection::const_iterator mcIter=genParticles->begin(); mcIter != genParticles->end(); mcIter++ ) {
1817 
1818  // select requested matching gen particle
1819  matchingID=false;
1820  for (unsigned int i=0; i<matchingIDs_.size(); i++)
1821  if ( mcIter->pdgId() == matchingIDs_[i] ) matchingID=true;
1822 
1823  if (matchingID) {
1824 
1825  // select requested mother matching gen particle
1826  // always include single particle with no mother
1827  const Candidate * mother = mcIter->mother();
1828  matchingMotherID=false;
1829  for (unsigned int i=0; i<matchingMotherIDs_.size(); i++)
1830  if ((mother == nullptr) || ((mother != nullptr) && mother->pdgId() == matchingMotherIDs_[i]) ) matchingMotherID=true;
1831 
1832  if (matchingMotherID) {
1833 
1834  if (mcIter->pt()> maxPt_ || std::abs(mcIter->eta())> maxAbsEta_) continue;
1835 
1836  // suppress the endcaps
1837  //if (std::abs(mcIter->eta()) > 1.5) continue;
1838  // select central z
1839  //if ( std::abs(mcIter->production_vertex()->position().z())>50.) continue;
1840 
1841  // looking for the best matching gsf electron
1842  bool okGsfFound = false;
1843  double gsfOkRatio = 999999.;
1844 
1845  // find best matched electron
1846  reco::GsfElectron bestGsfElectron;
1847  for (reco::GsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin();
1848  gsfIter!=gsfElectrons->end(); gsfIter++){
1849 
1850  double dphi = gsfIter->phi()-mcIter->phi();
1851  if (std::abs(dphi)>CLHEP::pi)
1852  dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1853  double deltaR = sqrt(std::pow((gsfIter->eta()-mcIter->eta()),2) + std::pow(dphi,2));
1854  if ( deltaR < deltaR_ ){
1855  double mc_charge = mcIter->pdgId() == 11 ? -1. : 1. ;
1856  h_ele_ChargeMnChargeTrue -> Fill( std::abs(gsfIter->charge()-mc_charge));
1857  // require here a charge mismatch
1858  if ( ( (mcIter->pdgId() == 11) && (gsfIter->charge() > 0.) ) ||
1859  ( (mcIter->pdgId() == -11) && (gsfIter->charge() < 0.) ) )
1860  {
1861  double tmpGsfRatio = gsfIter->p()/mcIter->p();
1862  if ( std::abs(tmpGsfRatio-1) < std::abs(gsfOkRatio-1) ) {
1863  gsfOkRatio = tmpGsfRatio;
1864  bestGsfElectron=*gsfIter;
1865  okGsfFound = true;
1866  }
1867  }
1868  }
1869  } // loop over rec ele to look for the best one
1870 
1871  // analysis when the mc track is found
1872  if (okGsfFound)
1873  {
1874 
1875  // generated distributions for matched electrons
1876  h_ele_simPt_matched_qmisid -> Fill( mcIter->pt() );
1877  h_ele_simPhi_matched_qmisid -> Fill( mcIter->phi() );
1878  h_ele_simAbsEta_matched_qmisid -> Fill( std::abs(mcIter->eta()) );
1879  h_ele_simEta_matched_qmisid -> Fill( mcIter->eta() );
1880  h_ele_simZ_matched_qmisid -> Fill( mcIter->vz() );
1881 
1882  }
1883  }
1884  }
1885 
1886  }
1887 
1888  // association mc-reco
1889  for (reco::GenParticleCollection::const_iterator mcIter=genParticles->begin(); mcIter != genParticles->end(); mcIter++ ) {
1890 
1891  // number of mc particles
1892  mcNum++;
1893 
1894  // counts photons
1895  if (mcIter->pdgId() == 22 ){ gamNum++; }
1896 
1897  // select requested matching gen particle
1898  matchingID=false;
1899  for (unsigned int i=0; i<matchingIDs_.size(); i++)
1900  if ( mcIter->pdgId() == matchingIDs_[i] ) matchingID=true;
1901 
1902  if (matchingID) {
1903 
1904  // select requested mother matching gen particle
1905  // always include single particle with no mother
1906  const Candidate * mother = mcIter->mother();
1907  matchingMotherID=false;
1908  for (unsigned int i=0; i<matchingMotherIDs_.size(); i++)
1909  if ((mother == nullptr) || ((mother != nullptr) && mother->pdgId() == matchingMotherIDs_[i]) ) matchingMotherID=true;
1910 
1911  if (matchingMotherID) {
1912 
1913  if (mcIter->pt()> maxPt_ || std::abs(mcIter->eta())> maxAbsEta_) continue;
1914 
1915  // suppress the endcaps
1916  //if (std::abs(mcIter->eta()) > 1.5) continue;
1917  // select central z
1918  //if ( std::abs(mcIter->production_vertex()->position().z())>50.) continue;
1919 
1920  eleNum++;
1921  h_simEta -> Fill( mcIter->eta() );
1922  h_simAbsEta -> Fill( std::abs(mcIter->eta()) );
1923  h_simP -> Fill( mcIter->p() );
1924  h_simPt -> Fill( mcIter->pt() );
1925  h_simPhi -> Fill( mcIter->phi() );
1926  h_simZ -> Fill( mcIter->vz() );
1927  h_simPtEta -> Fill( mcIter->eta(),mcIter->pt() );
1928 
1929  // looking for the best matching gsf electron
1930  bool okGsfFound = false;
1931  double gsfOkRatio = 999999.;
1932 
1933  // find best matched electron
1934  reco::GsfElectron bestGsfElectron;
1935  for (reco::GsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin();
1936  gsfIter!=gsfElectrons->end(); gsfIter++){
1937 
1938  double dphi = gsfIter->phi()-mcIter->phi();
1939  if (std::abs(dphi)>CLHEP::pi)
1940  dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1941  double deltaR = sqrt(std::pow((gsfIter->eta()-mcIter->eta()),2) + std::pow(dphi,2));
1942  if ( deltaR < deltaR_ ){
1943  if ( ( (mcIter->pdgId() == 11) && (gsfIter->charge() < 0.) ) ||
1944  ( (mcIter->pdgId() == -11) && (gsfIter->charge() > 0.) ) )
1945  {
1946  double tmpGsfRatio = gsfIter->p()/mcIter->p();
1947  if ( std::abs(tmpGsfRatio-1) < std::abs(gsfOkRatio-1) ) {
1948  gsfOkRatio = tmpGsfRatio;
1949  bestGsfElectron=*gsfIter;
1950  okGsfFound = true;
1951  }
1952  }
1953  }
1954  } // loop over rec ele to look for the best one
1955 
1956  // analysis when the mc track is found
1957  if (okGsfFound){
1958 
1959  // electron related distributions
1960  h_ele_charge -> Fill( bestGsfElectron.charge() );
1961  h_ele_chargeVsEta -> Fill( bestGsfElectron.eta(),bestGsfElectron.charge() );
1962  h_ele_chargeVsPhi -> Fill( bestGsfElectron.phi(),bestGsfElectron.charge() );
1963  h_ele_chargeVsPt -> Fill( bestGsfElectron.pt(),bestGsfElectron.charge() );
1964  h_ele_vertexP -> Fill( bestGsfElectron.p() );
1965  h_ele_vertexPt -> Fill( bestGsfElectron.pt() );
1966  h_ele_Et -> Fill( bestGsfElectron.superCluster()->energy()/cosh(bestGsfElectron.superCluster()->eta()));
1967  h_ele_vertexPtVsEta -> Fill( bestGsfElectron.eta(),bestGsfElectron.pt() );
1968  h_ele_vertexPtVsPhi -> Fill( bestGsfElectron.phi(),bestGsfElectron.pt() );
1969  h_ele_vertexEta -> Fill( bestGsfElectron.eta() );
1970  // generated distributions for matched electrons
1971  h_ele_simPt_matched -> Fill( mcIter->pt() );
1972  h_ele_simPhi_matched -> Fill( mcIter->phi() );
1973  h_ele_simAbsEta_matched -> Fill( std::abs(mcIter->eta()) );
1974  h_ele_simEta_matched -> Fill( mcIter->eta() );
1975  h_ele_simPtEta_matched -> Fill( mcIter->eta(),mcIter->pt() );
1976  h_ele_vertexEtaVsPhi -> Fill( bestGsfElectron.phi(),bestGsfElectron.eta() );
1977  h_ele_vertexPhi -> Fill( bestGsfElectron.phi() );
1978  h_ele_vertexX -> Fill( bestGsfElectron.vertex().x() );
1979  h_ele_vertexY -> Fill( bestGsfElectron.vertex().y() );
1980  h_ele_vertexZ -> Fill( bestGsfElectron.vertex().z() );
1981  h_ele_simZ_matched -> Fill( mcIter->vz() );
1982  double d = (bestGsfElectron.vertex().x()-mcIter->vx())
1983  *(bestGsfElectron.vertex().x()-mcIter->vx())+
1984  (bestGsfElectron.vertex().y()-mcIter->vy())
1985  *(bestGsfElectron.vertex().y()-mcIter->vy());
1986  d = sqrt(d);
1987  h_ele_vertexTIP -> Fill( d );
1988  h_ele_vertexTIPVsEta -> Fill( bestGsfElectron.eta(), d );
1989  h_ele_vertexTIPVsPhi -> Fill( bestGsfElectron.phi(), d );
1990  h_ele_vertexTIPVsPt -> Fill( bestGsfElectron.pt(), d );
1991  h_ele_EtaMnEtaTrue -> Fill( bestGsfElectron.eta()-mcIter->eta());
1992  if (bestGsfElectron.isEB()) h_ele_EtaMnEtaTrue_barrel -> Fill( bestGsfElectron.eta()-mcIter->eta());
1993  if (bestGsfElectron.isEE()) h_ele_EtaMnEtaTrue_endcaps -> Fill( bestGsfElectron.eta()-mcIter->eta());
1994  h_ele_EtaMnEtaTrueVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.eta()-mcIter->eta());
1995  h_ele_EtaMnEtaTrueVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.eta()-mcIter->eta());
1996  h_ele_EtaMnEtaTrueVsPt -> Fill( bestGsfElectron.pt(), bestGsfElectron.eta()-mcIter->eta());
1997  h_ele_PhiMnPhiTrue -> Fill( bestGsfElectron.phi()-mcIter->phi());
1998  if (bestGsfElectron.isEB()) h_ele_PhiMnPhiTrue_barrel -> Fill( bestGsfElectron.phi()-mcIter->phi());
1999  if (bestGsfElectron.isEE()) h_ele_PhiMnPhiTrue_endcaps -> Fill( bestGsfElectron.phi()-mcIter->phi());
2000  h_ele_PhiMnPhiTrue2 -> Fill( bestGsfElectron.phi()-mcIter->phi());
2001  h_ele_PhiMnPhiTrueVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.phi()-mcIter->phi());
2002  h_ele_PhiMnPhiTrueVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.phi()-mcIter->phi());
2003  h_ele_PhiMnPhiTrueVsPt -> Fill( bestGsfElectron.pt(), bestGsfElectron.phi()-mcIter->phi());
2004  h_ele_PoPtrue -> Fill( bestGsfElectron.p()/mcIter->p());
2005  h_ele_PtoPttrue -> Fill( bestGsfElectron.pt()/mcIter->pt());
2006  h_ele_PoPtrueVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.p()/mcIter->p());
2007  h_ele_PoPtrueVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.p()/mcIter->p());
2008  h_ele_PoPtrueVsPt -> Fill( bestGsfElectron.py(), bestGsfElectron.p()/mcIter->p());
2009  if (bestGsfElectron.isEB()) h_ele_PoPtrue_barrel -> Fill( bestGsfElectron.p()/mcIter->p());
2010  if (bestGsfElectron.isEE()) h_ele_PoPtrue_endcaps -> Fill( bestGsfElectron.p()/mcIter->p());
2011  if (bestGsfElectron.isEB() && bestGsfElectron.classification() == GsfElectron::GOLDEN) h_ele_PoPtrue_golden_barrel -> Fill( bestGsfElectron.p()/mcIter->p());
2012  if (bestGsfElectron.isEE() && bestGsfElectron.classification() == GsfElectron::GOLDEN) h_ele_PoPtrue_golden_endcaps -> Fill( bestGsfElectron.p()/mcIter->p());
2013  if (bestGsfElectron.isEB() && bestGsfElectron.classification() == GsfElectron::SHOWERING) h_ele_PoPtrue_showering_barrel -> Fill( bestGsfElectron.p()/mcIter->p());
2014  if (bestGsfElectron.isEE() && bestGsfElectron.classification() == GsfElectron::SHOWERING) h_ele_PoPtrue_showering_endcaps -> Fill( bestGsfElectron.p()/mcIter->p());
2015  if (bestGsfElectron.isEB()) h_ele_PtoPttrue_barrel -> Fill( bestGsfElectron.pt()/mcIter->pt());
2016  if (bestGsfElectron.isEE()) h_ele_PtoPttrue_endcaps -> Fill( bestGsfElectron.pt()/mcIter->pt());
2017 
2018  // supercluster related distributions
2019  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
2020  if (!bestGsfElectron.ecalDrivenSeed()&&bestGsfElectron.trackerDrivenSeed()) sclRef = bestGsfElectron.parentSuperCluster();
2021  histSclEn_->Fill(sclRef->energy());
2022  double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
2023  double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
2024  histSclEt_->Fill(sclRef->energy()*(Rt/R));
2025  histSclEtVsEta_->Fill(sclRef->eta(),sclRef->energy()*(Rt/R));
2026  histSclEtVsPhi_->Fill(sclRef->phi(),sclRef->energy()*(Rt/R));
2027  if (bestGsfElectron.isEB()) histSclEoEtrue_barrel->Fill(sclRef->energy()/mcIter->p());
2028  if (bestGsfElectron.isEE()) histSclEoEtrue_endcaps->Fill(sclRef->energy()/mcIter->p());
2029  if (bestGsfElectron.isEB() && bestGsfElectron.ecalDrivenSeed()) histSclEoEtrue_barrel_eg->Fill(sclRef->energy()/mcIter->p());
2030  if (bestGsfElectron.isEE() && bestGsfElectron.ecalDrivenSeed()) histSclEoEtrue_endcaps_eg->Fill(sclRef->energy()/mcIter->p());
2031  if (bestGsfElectron.isEB() && bestGsfElectron.isEBEtaGap()) histSclEoEtrue_barrel_etagap->Fill(sclRef->energy()/mcIter->p());
2032  if (bestGsfElectron.isEB() && bestGsfElectron.isEBPhiGap()) histSclEoEtrue_barrel_phigap->Fill(sclRef->energy()/mcIter->p());
2033  if (bestGsfElectron.isEBEEGap()) histSclEoEtrue_ebeegap->Fill(sclRef->energy()/mcIter->p());
2034  //if (bestGsfElectron.isEE()) histSclEoEtrue_endcaps->Fill(sclRef->energy()/mcIter->p());
2035  if (bestGsfElectron.isEE() && bestGsfElectron.isEEDeeGap()) histSclEoEtrue_endcaps_deegap->Fill(sclRef->energy()/mcIter->p());
2036  if (bestGsfElectron.isEE() && bestGsfElectron.isEERingGap()) histSclEoEtrue_endcaps_ringgap->Fill(sclRef->energy()/mcIter->p());
2037  if (bestGsfElectron.isEB()) histSclEoEtrue_barrel_new->Fill(sclRef->energy()/mcIter->p());
2038  if (bestGsfElectron.isEE()) histSclEoEtrue_endcaps_new->Fill(sclRef->energy()/mcIter->p());
2039  if (bestGsfElectron.isEB() && bestGsfElectron.ecalDrivenSeed()) histSclEoEtrue_barrel_eg_new->Fill(sclRef->energy()/mcIter->p());
2040  if (bestGsfElectron.isEE() && bestGsfElectron.ecalDrivenSeed()) histSclEoEtrue_endcaps_eg_new->Fill(sclRef->energy()/mcIter->p());
2041  if (bestGsfElectron.isEB() && bestGsfElectron.isEBEtaGap()) histSclEoEtrue_barrel_etagap_new->Fill(sclRef->energy()/mcIter->p());
2042  if (bestGsfElectron.isEB() && bestGsfElectron.isEBPhiGap()) histSclEoEtrue_barrel_phigap_new->Fill(sclRef->energy()/mcIter->p());
2043  if (bestGsfElectron.isEBEEGap()) histSclEoEtrue_ebeegap_new->Fill(sclRef->energy()/mcIter->p());
2044  //if (bestGsfElectron.isEE()) histSclEoEtrue_endcaps_new->Fill(sclRef->energy()/mcIter->p());
2045  if (bestGsfElectron.isEE() && bestGsfElectron.isEEDeeGap()) histSclEoEtrue_endcaps_deegap_new->Fill(sclRef->energy()/mcIter->p());
2046  if (bestGsfElectron.isEE() && bestGsfElectron.isEERingGap()) histSclEoEtrue_endcaps_ringgap_new->Fill(sclRef->energy()/mcIter->p());
2047  histSclEta_->Fill(sclRef->eta());
2048  histSclEtaVsPhi_->Fill(sclRef->phi(),sclRef->eta());
2049  histSclPhi_->Fill(sclRef->phi());
2050  histSclSigEtaEta_->Fill(bestGsfElectron.scSigmaEtaEta());
2051  if (bestGsfElectron.isEB()) histSclSigEtaEta_barrel_->Fill(bestGsfElectron.scSigmaEtaEta());
2052  if (bestGsfElectron.isEE()) histSclSigEtaEta_endcaps_->Fill(bestGsfElectron.scSigmaEtaEta());
2053  histSclSigIEtaIEta_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2054  if (bestGsfElectron.isEB()) histSclSigIEtaIEta_barrel_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2055  if (bestGsfElectron.isEE()) histSclSigIEtaIEta_endcaps_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2056  histSclE1x5_->Fill(bestGsfElectron.scE1x5());
2057  if (bestGsfElectron.isEB()) histSclE1x5_barrel_->Fill(bestGsfElectron.scE1x5());
2058  if (bestGsfElectron.isEE()) histSclE1x5_endcaps_->Fill(bestGsfElectron.scE1x5());
2059  histSclE2x5max_->Fill(bestGsfElectron.scE2x5Max());
2060  if (bestGsfElectron.isEB()) histSclE2x5max_barrel_->Fill(bestGsfElectron.scE2x5Max());
2061  if (bestGsfElectron.isEE()) histSclE2x5max_endcaps_->Fill(bestGsfElectron.scE2x5Max());
2062  histSclE5x5_->Fill(bestGsfElectron.scE5x5());
2063  if (bestGsfElectron.isEB()) histSclE5x5_barrel_->Fill(bestGsfElectron.scE5x5());
2064  if (bestGsfElectron.isEE()) histSclE5x5_endcaps_->Fill(bestGsfElectron.scE5x5());
2065  if (bestGsfElectron.ecalDrivenSeed()) histSclSigIEtaIEta_eg_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2066  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) histSclSigIEtaIEta_eg_barrel_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2067  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) histSclSigIEtaIEta_eg_endcaps_->Fill(bestGsfElectron.scSigmaIEtaIEta());
2068  if (bestGsfElectron.ecalDrivenSeed())histSclE1x5_eg_->Fill(bestGsfElectron.scE1x5());
2069  if (bestGsfElectron.isEB() && bestGsfElectron.ecalDrivenSeed())histSclE1x5_eg_barrel_->Fill(bestGsfElectron.scE1x5());
2070  if (bestGsfElectron.isEE() && bestGsfElectron.ecalDrivenSeed())histSclE1x5_eg_endcaps_->Fill(bestGsfElectron.scE1x5());
2071  if (bestGsfElectron.ecalDrivenSeed())histSclE2x5max_eg_->Fill(bestGsfElectron.scE2x5Max());
2072  if (bestGsfElectron.isEB() && bestGsfElectron.ecalDrivenSeed())histSclE2x5max_eg_barrel_->Fill(bestGsfElectron.scE2x5Max());
2073  if (bestGsfElectron.isEE() && bestGsfElectron.ecalDrivenSeed())histSclE2x5max_eg_endcaps_->Fill(bestGsfElectron.scE2x5Max());
2074  if (bestGsfElectron.ecalDrivenSeed())histSclE5x5_eg_->Fill(bestGsfElectron.scE5x5());
2075  if (bestGsfElectron.isEB() && bestGsfElectron.ecalDrivenSeed())histSclE5x5_eg_barrel_->Fill(bestGsfElectron.scE5x5());
2076  if (bestGsfElectron.isEE() && bestGsfElectron.ecalDrivenSeed())histSclE5x5_eg_endcaps_->Fill(bestGsfElectron.scE5x5());
2077  float pfEnergy=0., egEnergy=0.;
2078  if (!bestGsfElectron.superCluster().isNull()) egEnergy = bestGsfElectron.superCluster()->energy();
2079  if (!bestGsfElectron.parentSuperCluster().isNull()) pfEnergy = bestGsfElectron.parentSuperCluster()->energy();
2080  histSclEoEtruePfVsEg->Fill(egEnergy/mcIter->p(),pfEnergy/mcIter->p());
2081 
2082  // track related distributions
2083  h_ele_ambiguousTracks -> Fill( bestGsfElectron.ambiguousGsfTracksSize() );
2084  h_ele_ambiguousTracksVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.ambiguousGsfTracksSize() );
2085  h_ele_ambiguousTracksVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.ambiguousGsfTracksSize() );
2086  h_ele_ambiguousTracksVsPt -> Fill( bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize() );
2087  if (!readAOD_) { // track extra does not exist in AOD
2088  h_ele_foundHits -> Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() );
2089  if (bestGsfElectron.isEB()) h_ele_foundHits_barrel -> Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() );
2090  if (bestGsfElectron.isEE()) h_ele_foundHits_endcaps -> Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() );
2091  h_ele_foundHitsVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
2092  h_ele_foundHitsVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
2093  h_ele_foundHitsVsPt -> Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits() );
2094  h_ele_lostHits -> Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() );
2095  if (bestGsfElectron.isEB()) h_ele_lostHits_barrel -> Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() );
2096  if (bestGsfElectron.isEE()) h_ele_lostHits_endcaps -> Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() );
2097  h_ele_lostHitsVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
2098  h_ele_lostHitsVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
2099  h_ele_lostHitsVsPt -> Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfLostHits() );
2100  h_ele_chi2 -> Fill( bestGsfElectron.gsfTrack()->normalizedChi2() );
2101  if (bestGsfElectron.isEB()) h_ele_chi2_barrel -> Fill( bestGsfElectron.gsfTrack()->normalizedChi2() );
2102  if (bestGsfElectron.isEE()) h_ele_chi2_endcaps -> Fill( bestGsfElectron.gsfTrack()->normalizedChi2() );
2103  h_ele_chi2VsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->normalizedChi2() );
2104  h_ele_chi2VsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->normalizedChi2() );
2105  h_ele_chi2VsPt -> Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->normalizedChi2() );
2106  }
2107  // from gsf track interface, hence using mean
2108  if (!readAOD_) { // track extra does not exist in AOD
2109  h_ele_PinMnPout -> Fill( bestGsfElectron.gsfTrack()->innerMomentum().R() - bestGsfElectron.gsfTrack()->outerMomentum().R() );
2110  h_ele_outerP -> Fill( bestGsfElectron.gsfTrack()->outerMomentum().R() );
2111  h_ele_outerPt -> Fill( bestGsfElectron.gsfTrack()->outerMomentum().Rho() );
2112  }
2113  // from electron interface, hence using mode
2114  h_ele_PinMnPout_mode -> Fill( bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
2115  h_ele_PinMnPoutVsEta_mode -> Fill( bestGsfElectron.eta(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
2116  h_ele_PinMnPoutVsPhi_mode -> Fill( bestGsfElectron.phi(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
2117  h_ele_PinMnPoutVsPt_mode -> Fill( bestGsfElectron.pt(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
2118  h_ele_PinMnPoutVsE_mode -> Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
2119  if (!readAOD_) // track extra does not exist in AOD
2120  h_ele_PinMnPoutVsChi2_mode -> Fill( bestGsfElectron.gsfTrack()->normalizedChi2(), bestGsfElectron.trackMomentumAtVtx().R() - bestGsfElectron.trackMomentumOut().R() );
2121  h_ele_outerP_mode -> Fill( bestGsfElectron.trackMomentumOut().R() );
2122  h_ele_outerPVsEta_mode -> Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().R() );
2123  h_ele_outerPt_mode -> Fill( bestGsfElectron.trackMomentumOut().Rho() );
2124  h_ele_outerPtVsEta_mode -> Fill(bestGsfElectron.eta(), bestGsfElectron.trackMomentumOut().Rho() );
2125  h_ele_outerPtVsPhi_mode -> Fill(bestGsfElectron.phi(), bestGsfElectron.trackMomentumOut().Rho() );
2126  h_ele_outerPtVsPt_mode -> Fill(bestGsfElectron.pt(), bestGsfElectron.trackMomentumOut().Rho() );
2127 
2128  if (!readAOD_) { // track extra does not exist in AOD
2129  edm::RefToBase<TrajectorySeed> seed = bestGsfElectron.gsfTrack()->extra()->seedRef();
2130  ElectronSeedRef elseed=seed.castTo<ElectronSeedRef>();
2131  h_ele_seed_dphi2_-> Fill(elseed->dPhi2());
2132  h_ele_seed_dphi2VsEta_-> Fill(bestGsfElectron.eta(), elseed->dPhi2());
2133  h_ele_seed_dphi2VsPt_-> Fill(bestGsfElectron.pt(), elseed->dPhi2()) ;
2134  h_ele_seed_drz2_-> Fill(elseed->dRz2());
2135  h_ele_seed_drz2VsEta_-> Fill(bestGsfElectron.eta(), elseed->dRz2());
2136  h_ele_seed_drz2VsPt_-> Fill(bestGsfElectron.pt(), elseed->dRz2());
2137  h_ele_seed_subdet2_-> Fill(elseed->subDet2());
2138  }
2139  // match distributions
2140  h_ele_EoP -> Fill( bestGsfElectron.eSuperClusterOverP() );
2141  if (bestGsfElectron.ecalDrivenSeed()) h_ele_EoP_eg -> Fill( bestGsfElectron.eSuperClusterOverP() );
2142  if (bestGsfElectron.isEB()) h_ele_EoP_barrel -> Fill( bestGsfElectron.eSuperClusterOverP() );
2143  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EoP_eg_barrel -> Fill( bestGsfElectron.eSuperClusterOverP() );
2144  if (bestGsfElectron.isEE()) h_ele_EoP_endcaps -> Fill( bestGsfElectron.eSuperClusterOverP() );
2145  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EoP_eg_endcaps -> Fill( bestGsfElectron.eSuperClusterOverP() );
2146  h_ele_EoPVsEta -> Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP() );
2147  h_ele_EoPVsPhi -> Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP() );
2148  h_ele_EoPVsE -> Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP() );
2149  h_ele_EseedOP -> Fill( bestGsfElectron.eSeedClusterOverP() );
2150  if (bestGsfElectron.ecalDrivenSeed()) h_ele_EseedOP_eg -> Fill( bestGsfElectron.eSeedClusterOverP() );
2151  if (bestGsfElectron.isEB()) h_ele_EseedOP_barrel -> Fill( bestGsfElectron.eSeedClusterOverP() );
2152  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EseedOP_eg_barrel -> Fill( bestGsfElectron.eSeedClusterOverP() );
2153  if (bestGsfElectron.isEE()) h_ele_EseedOP_endcaps -> Fill( bestGsfElectron.eSeedClusterOverP() );
2154  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EseedOP_eg_endcaps -> Fill( bestGsfElectron.eSeedClusterOverP() );
2155  h_ele_EseedOPVsEta -> Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP() );
2156  h_ele_EseedOPVsPhi -> Fill(bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverP() );
2157  h_ele_EseedOPVsE -> Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverP() );
2158  h_ele_EoPout -> Fill( bestGsfElectron.eSeedClusterOverPout() );
2159  if (bestGsfElectron.ecalDrivenSeed()) h_ele_EoPout_eg -> Fill( bestGsfElectron.eSeedClusterOverPout() );
2160  if (bestGsfElectron.isEB()) h_ele_EoPout_barrel -> Fill( bestGsfElectron.eSeedClusterOverPout() );
2161  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EoPout_eg_barrel -> Fill( bestGsfElectron.eSeedClusterOverPout() );
2162  if (bestGsfElectron.isEE()) h_ele_EoPout_endcaps -> Fill( bestGsfElectron.eSeedClusterOverPout() );
2163  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EoPout_eg_endcaps -> Fill( bestGsfElectron.eSeedClusterOverPout() );
2164  h_ele_EoPoutVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverPout() );
2165  h_ele_EoPoutVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.eSeedClusterOverPout() );
2166  h_ele_EoPoutVsE -> Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eSeedClusterOverPout() );
2167  h_ele_EeleOPout -> Fill( bestGsfElectron.eEleClusterOverPout() );
2168  if (bestGsfElectron.ecalDrivenSeed()) h_ele_EeleOPout_eg -> Fill( bestGsfElectron.eEleClusterOverPout() );
2169  if (bestGsfElectron.isEB()) h_ele_EeleOPout_barrel -> Fill( bestGsfElectron.eEleClusterOverPout() );
2170  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EeleOPout_eg_barrel -> Fill( bestGsfElectron.eEleClusterOverPout() );
2171  if (bestGsfElectron.isEE()) h_ele_EeleOPout_endcaps -> Fill( bestGsfElectron.eEleClusterOverPout() );
2172  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_EeleOPout_eg_endcaps -> Fill( bestGsfElectron.eEleClusterOverPout() );
2173  h_ele_EeleOPoutVsEta -> Fill( bestGsfElectron.eta(), bestGsfElectron.eEleClusterOverPout() );
2174  h_ele_EeleOPoutVsPhi -> Fill( bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout() );
2175  h_ele_EeleOPoutVsE -> Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout() );
2177  if (bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaSc_propVtx_eg -> Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2178  if (bestGsfElectron.isEB()) h_ele_dEtaSc_propVtx_barrel -> Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2179  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaSc_propVtx_eg_barrel -> Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2180  if (bestGsfElectron.isEE())h_ele_dEtaSc_propVtx_endcaps -> Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2181  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaSc_propVtx_eg_endcaps -> Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2182  h_ele_dEtaScVsEta_propVtx -> Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2183  h_ele_dEtaScVsPhi_propVtx -> Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2184  h_ele_dEtaScVsPt_propVtx -> Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx());
2186  if (bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiSc_propVtx_eg -> Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2187  if (bestGsfElectron.isEB()) h_ele_dPhiSc_propVtx_barrel -> Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2188  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiSc_propVtx_eg_barrel -> Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2189  if (bestGsfElectron.isEE())h_ele_dPhiSc_propVtx_endcaps -> Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2190  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiSc_propVtx_eg_endcaps -> Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2191  h_ele_dPhiScVsEta_propVtx -> Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2192  h_ele_dPhiScVsPhi_propVtx -> Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2193  h_ele_dPhiScVsPt_propVtx -> Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSuperClusterTrackAtVtx());
2195  if (bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaCl_propOut_eg -> Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2196  if (bestGsfElectron.isEB()) h_ele_dEtaCl_propOut_barrel -> Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2197  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaCl_propOut_eg_barrel -> Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2198  if (bestGsfElectron.isEE()) h_ele_dEtaCl_propOut_endcaps -> Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2199  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaCl_propOut_eg_endcaps -> Fill(bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2200  h_ele_dEtaClVsEta_propOut -> Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2201  h_ele_dEtaClVsPhi_propOut -> Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2202  h_ele_dEtaClVsPt_propOut -> Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo());
2204  if (bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiCl_propOut_eg -> Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2205  if (bestGsfElectron.isEB()) h_ele_dPhiCl_propOut_barrel -> Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2206  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiCl_propOut_eg_barrel -> Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2207  if (bestGsfElectron.isEE()) h_ele_dPhiCl_propOut_endcaps -> Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2208  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiCl_propOut_eg_endcaps -> Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2209  h_ele_dPhiClVsEta_propOut -> Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2210  h_ele_dPhiClVsPhi_propOut -> Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2211  h_ele_dPhiClVsPt_propOut -> Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo());
2213  if (bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaEleCl_propOut_eg -> Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2214  if (bestGsfElectron.isEB()) h_ele_dEtaEleCl_propOut_barrel -> Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2215  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaEleCl_propOut_eg_barrel -> Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2216  if (bestGsfElectron.isEE()) h_ele_dEtaEleCl_propOut_endcaps -> Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2217  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dEtaEleCl_propOut_eg_endcaps -> Fill(bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2218  h_ele_dEtaEleClVsEta_propOut -> Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2219  h_ele_dEtaEleClVsPhi_propOut -> Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2220  h_ele_dEtaEleClVsPt_propOut -> Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaEleClusterTrackAtCalo());
2222  if (bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiEleCl_propOut_eg -> Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2223  if (bestGsfElectron.isEB()) h_ele_dPhiEleCl_propOut_barrel -> Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2224  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiEleCl_propOut_eg_barrel -> Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2225  if (bestGsfElectron.isEE()) h_ele_dPhiEleCl_propOut_endcaps -> Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2226  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_dPhiEleCl_propOut_eg_endcaps -> Fill(bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2227  h_ele_dPhiEleClVsEta_propOut -> Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2228  h_ele_dPhiEleClVsPhi_propOut -> Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2229  h_ele_dPhiEleClVsPt_propOut -> Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo());
2230  h_ele_HoE -> Fill(bestGsfElectron.hadronicOverEm());
2231  if (bestGsfElectron.ecalDrivenSeed()) h_ele_HoE_eg -> Fill(bestGsfElectron.hadronicOverEm());
2232  if (bestGsfElectron.isEB()) h_ele_HoE_barrel -> Fill(bestGsfElectron.hadronicOverEm());
2233  if (bestGsfElectron.isEB()&&bestGsfElectron.ecalDrivenSeed()) h_ele_HoE_eg_barrel -> Fill(bestGsfElectron.hadronicOverEm());
2234  if (bestGsfElectron.isEE()) h_ele_HoE_endcaps -> Fill(bestGsfElectron.hadronicOverEm());
2235  if (bestGsfElectron.isEE()&&bestGsfElectron.ecalDrivenSeed()) h_ele_HoE_eg_endcaps -> Fill(bestGsfElectron.hadronicOverEm());
2236  if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap()&& !bestGsfElectron.isEBEEGap() &&
2237  !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap()) h_ele_HoE_fiducial -> Fill(bestGsfElectron.hadronicOverEm());
2238  h_ele_HoEVsEta -> Fill( bestGsfElectron.eta(),bestGsfElectron.hadronicOverEm());
2239  h_ele_HoEVsPhi -> Fill(bestGsfElectron.phi(),bestGsfElectron.hadronicOverEm());
2240  h_ele_HoEVsE -> Fill(bestGsfElectron.caloEnergy(),bestGsfElectron.hadronicOverEm());
2241 
2242  //classes
2243  int eleClass = bestGsfElectron.classification();
2244  if (bestGsfElectron.isEE()) eleClass+=10;
2245  h_ele_classes ->Fill(eleClass);
2246 
2247  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && bestGsfElectron.isEB()) histSclEoEtrueGolden_barrel->Fill(sclRef->energy()/mcIter->p());
2248  if (bestGsfElectron.classification() == GsfElectron::GOLDEN && bestGsfElectron.isEE()) histSclEoEtrueGolden_endcaps->Fill(sclRef->energy()/mcIter->p());
2249  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && bestGsfElectron.isEB()) histSclEoEtrueShowering_barrel->Fill(sclRef->energy()/mcIter->p());
2250  if (bestGsfElectron.classification() == GsfElectron::SHOWERING && bestGsfElectron.isEE()) histSclEoEtrueShowering_endcaps->Fill(sclRef->energy()/mcIter->p());
2251 
2252  //eleClass = eleClass%100; // get rid of barrel/endcap distinction
2253  h_ele_eta->Fill(std::abs(bestGsfElectron.eta()));
2254  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h_ele_eta_golden ->Fill(std::abs(bestGsfElectron.eta()));
2255  if (bestGsfElectron.classification() == GsfElectron::BIGBREM) h_ele_eta_bbrem ->Fill(std::abs(bestGsfElectron.eta()));
2256  //if (bestGsfElectron.classification() == GsfElectron::NARROW) h_ele_eta_narrow ->Fill(std::abs(bestGsfElectron.eta()));
2257  if (bestGsfElectron.classification() == GsfElectron::SHOWERING) h_ele_eta_shower ->Fill(std::abs(bestGsfElectron.eta()));
2258 
2259  //fbrem
2260  double fbrem_mean=0.;
2261  if (!readAOD_) // track extra does not exist in AOD
2262  fbrem_mean = 1. - bestGsfElectron.gsfTrack()->outerMomentum().R()/bestGsfElectron.gsfTrack()->innerMomentum().R();
2263  double fbrem_mode = bestGsfElectron.fbrem();
2264  h_ele_fbrem->Fill(fbrem_mode);
2265  if (bestGsfElectron.ecalDrivenSeed()) h_ele_fbrem_eg->Fill(fbrem_mode);
2266  h_ele_fbremVsEta_mode->Fill(bestGsfElectron.eta(),fbrem_mode);
2267  if (!readAOD_) // track extra does not exist in AOD
2268  h_ele_fbremVsEta_mean->Fill(bestGsfElectron.eta(),fbrem_mean);
2269 
2270  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h_ele_PinVsPoutGolden_mode -> Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
2271  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
2272  h_ele_PinVsPoutShowering_mode -> Fill(bestGsfElectron.trackMomentumOut().R(), bestGsfElectron.trackMomentumAtVtx().R());
2273  if (!readAOD_) { // track extra not available in AOD
2274  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h_ele_PinVsPoutGolden_mean -> Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
2275  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
2276  h_ele_PinVsPoutShowering_mean -> Fill(bestGsfElectron.gsfTrack()->outerMomentum().R(), bestGsfElectron.gsfTrack()->innerMomentum().R());
2277  }
2278  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h_ele_PtinVsPtoutGolden_mode -> Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
2279  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
2280  h_ele_PtinVsPtoutShowering_mode -> Fill(bestGsfElectron.trackMomentumOut().Rho(), bestGsfElectron.trackMomentumAtVtx().Rho());
2281  if (!readAOD_) { // track extra not available in AOD
2282  if (bestGsfElectron.classification() == GsfElectron::GOLDEN) h_ele_PtinVsPtoutGolden_mean -> Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
2283  if (bestGsfElectron.classification() == GsfElectron::SHOWERING)
2284  h_ele_PtinVsPtoutShowering_mean -> Fill(bestGsfElectron.gsfTrack()->outerMomentum().Rho(), bestGsfElectron.gsfTrack()->innerMomentum().Rho());
2285  }
2286 
2287  h_ele_mva->Fill(bestGsfElectron.mva_e_pi());
2288  if (bestGsfElectron.ecalDrivenSeed()) h_ele_mva_eg->Fill(bestGsfElectron.mva_e_pi());
2289  if (bestGsfElectron.ecalDrivenSeed()) h_ele_provenance->Fill(1.);
2290  if (bestGsfElectron.trackerDrivenSeed()) h_ele_provenance->Fill(-1.);
2291  if (bestGsfElectron.trackerDrivenSeed()||bestGsfElectron.ecalDrivenSeed()) h_ele_provenance->Fill(0.);
2292  if (bestGsfElectron.trackerDrivenSeed()&&!bestGsfElectron.ecalDrivenSeed()) h_ele_provenance->Fill(-2.);
2293  if (!bestGsfElectron.trackerDrivenSeed()&&bestGsfElectron.ecalDrivenSeed()) h_ele_provenance->Fill(2.);
2294 
2295  h_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt());
2296  h_ele_ecalRecHitSumEt_dr03->Fill(bestGsfElectron.dr03EcalRecHitSumEt());
2299  h_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt());
2300  h_ele_ecalRecHitSumEt_dr04->Fill(bestGsfElectron.dr04EcalRecHitSumEt());
2303 
2304  } // gsf electron found
2305 
2306  } // mc particle found
2307 
2308  }
2309 
2310  } // loop over mc particle
2311 
2312  h_mcNum->Fill(mcNum);
2313  h_eleNum->Fill(eleNum);
2314 
2315 }
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:186
double eta() const final
momentum pseudorapidity
float scSigmaEtaEta() const
Definition: GsfElectron.h:490
bool isEBEtaGap() const
Definition: GsfElectron.h:361
virtual SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:190
float eSuperClusterOverP() const
Definition: GsfElectron.h:249
bool isEBEEGap() const
Definition: GsfElectron.h:359
float dr04HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:567
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:295
float dr04TkSumPt() const
Definition: GsfElectron.h:564
double pt() const final
transverse momentum
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
int charge() const final
electric charge
Definition: LeafCandidate.h:91
bool isEERingGap() const
Definition: GsfElectron.h:365
float dr03HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:556
float fbrem() const
Definition: GsfElectron.h:772
float scE2x5Max() const
Definition: GsfElectron.h:493
bool isEEDeeGap() const
Definition: GsfElectron.h:364
bool isEE() const
Definition: GsfElectron.h:357
bool isEB() const
Definition: GsfElectron.h:356
const Double_t pi
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
float dr04HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:568
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:253
int iEvent
Definition: GenABIO.cc:224
float hadronicOverEm() const
Definition: GsfElectron.h:495
float eSeedClusterOverP() const
Definition: GsfElectron.h:250
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:566
float deltaPhiSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:257
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
virtual int pdgId() const =0
PDG identifier.
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< int > matchingMotherIDs_
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:297
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:256
const Point & vertex() const override
vertex position (overwritten by PF...)
float dr03TkSumPt() const
Definition: GsfElectron.h:552
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:555
float eEleClusterOverPout() const
Definition: GsfElectron.h:252
float eSeedClusterOverPout() const
Definition: GsfElectron.h:251
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:491
bool isNull() const
Checks for null.
Definition: Ref.h:248
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:258
double p() const final
magnitude of momentum vector
T const * product() const
Definition: Handle.h:74
float deltaEtaEleClusterTrackAtCalo() const
Definition: GsfElectron.h:255
Classification classification() const
Definition: GsfElectron.h:768
REF castTo() const
Definition: RefToBase.h:289
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
Definition: GsfElectron.h:722
double py() const final
y coordinate of momentum vector
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:554
float mva_e_pi() const
Definition: GsfElectron.h:702
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:254
bool isEBPhiGap() const
Definition: GsfElectron.h:362
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:185
bool trackerDrivenSeed() const
Definition: GsfElectron.h:189
float scE5x5() const
Definition: GsfElectron.h:494
std::vector< int > matchingIDs_
float caloEnergy() const
Definition: GsfElectron.h:863
double phi() const final
momentum azimuthal angle
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
float scE1x5() const
Definition: GsfElectron.h:492
bool ecalDrivenSeed() const
Definition: GsfElectron.h:188
void GsfElectronMCAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 115 of file GsfElectronMCAnalyzer.cc.

References phimax, and phimin.

115  {
116 
117  histfile_->cd();
118 
119  // mc truth
120  h_mcNum = new TH1F( "h_mcNum", "# mc particles", nbinfhits,0.,fhitsmax );
121  h_mcNum->Sumw2();
122  h_eleNum = new TH1F( "h_mcNum_ele", "# mc electrons", nbinfhits,0.,fhitsmax);
123  h_eleNum->Sumw2();
124  h_gamNum = new TH1F( "h_mcNum_gam", "# mc gammas", nbinfhits,0.,fhitsmax);
125  h_gamNum->Sumw2();
126 
127  // rec event
128  histNum_= new TH1F("h_recEleNum","# rec electrons",20, 0.,20.);
129 
130  // mc
131  h_simEta = new TH1F( "h_mc_eta", "gen #eta", nbineta,etamin,etamax);
132  h_simEta->Sumw2();
133  h_simAbsEta = new TH1F( "h_mc_abseta", "gen |#eta|", nbineta/2,0.,etamax);
134  h_simAbsEta->Sumw2();
135  h_simP = new TH1F( "h_mc_P", "gen p", nbinp,0.,pmax);
136  h_simP->Sumw2();
137  h_simPt = new TH1F( "h_mc_Pt", "gen pt", nbinpteff,5.,ptmax);
138  h_simPt->Sumw2();
139  h_simPhi = new TH1F( "h_mc_phi", "gen phi", nbinphi,phimin,phimax);
140  h_simPhi->Sumw2();
141  h_simZ = new TH1F( "h_mc_z", "gen z ", nbinxyz, -25, 25 );
142  h_simZ->Sumw2();
143  h_simPtEta = new TH2F( "h_mc_pteta", "gen pt vs #eta", nbineta2D,etamin,etamax, nbinpt2D,5.,ptmax );
144  h_simPtEta->Sumw2();
145 
146  // all electrons
147  h_ele_EoverP_all = new TH1F( "h_ele_EoverP_all", "ele E/P_{vertex}, all reco electrons", nbineop,0.,eopmax);
148  h_ele_EoverP_all->Sumw2();
149  h_ele_EoverP_all_barrel = new TH1F( "h_ele_EoverP_all_barrel", "ele E/P_{vertex}, all reco electrons, barrel", nbineop,0.,eopmax);
150  h_ele_EoverP_all_barrel->Sumw2();
151  h_ele_EoverP_all_endcaps = new TH1F( "h_ele_EoverP_all_endcaps", "ele E/P_{vertex}, all reco electrons, endcaps", nbineop,0.,eopmax);
152  h_ele_EoverP_all_endcaps->Sumw2();
153  h_ele_EseedOP_all = new TH1F( "h_ele_EseedOP_all", "ele E_{seed}/P_{vertex}, all reco electrons", nbineop,0.,eopmax);
154  h_ele_EseedOP_all->Sumw2();
155  h_ele_EseedOP_all_barrel = new TH1F( "h_ele_EseedOP_all_barrel", "ele E_{seed}/P_{vertex}, all reco electrons, barrel", nbineop,0.,eopmax);
156  h_ele_EseedOP_all_barrel->Sumw2();
157  h_ele_EseedOP_all_endcaps = new TH1F( "h_ele_EseedOP_all_endcaps", "ele E_{seed}/P_{vertex}, all reco electrons, endcaps", nbineop,0.,eopmax);
158  h_ele_EseedOP_all_endcaps->Sumw2();
159  h_ele_EoPout_all = new TH1F( "h_ele_EoPout_all", "ele E_{seed}/P_{out}, all reco electrons", nbineop,0.,eopmax);
160  h_ele_EoPout_all->Sumw2();
161  h_ele_EoPout_all_barrel = new TH1F( "h_ele_EoPout_all_barrel", "ele E_{seed}/P_{out}, all reco electrons barrel", nbineop,0.,eopmax);
162  h_ele_EoPout_all_barrel->Sumw2();
163  h_ele_EoPout_all_endcaps = new TH1F( "h_ele_EoPout_all_endcaps", "ele E_{seed}/P_{out}, all reco electrons endcaps", nbineop,0.,eopmax);
164  h_ele_EoPout_all_endcaps->Sumw2();
165  h_ele_EeleOPout_all = new TH1F( "h_ele_EeleOPout_all", "ele E_{ele}/P_{out}, all reco electrons", nbineop,0.,eopmax);
166  h_ele_EeleOPout_all->Sumw2();
167  h_ele_EeleOPout_all_barrel = new TH1F( "h_ele_EeleOPout_all_barrel", "ele E_{ele}/P_{out}, all reco electrons barrel", nbineop,0.,eopmax);
169  h_ele_EeleOPout_all_endcaps = new TH1F( "h_ele_EeleOPout_all_endcaps", "ele E_{ele}/P_{out}, all reco electrons endcaps", nbineop,0.,eopmax);
171  h_ele_dEtaSc_propVtx_all = new TH1F( "h_ele_dEtaSc_propVtx_all", "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons", nbindetamatch,detamatchmin,detamatchmax);
172  h_ele_dEtaSc_propVtx_all->Sumw2();
173  h_ele_dEtaSc_propVtx_all_barrel = new TH1F( "h_ele_dEtaSc_propVtx_all_barrel", "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons barrel", nbindetamatch,detamatchmin,detamatchmax);
175  h_ele_dEtaSc_propVtx_all_endcaps = new TH1F( "h_ele_dEtaSc_propVtx_all_endcaps", "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons endcaps", nbindetamatch,detamatchmin,detamatchmax);
177  h_ele_dPhiSc_propVtx_all = new TH1F( "h_ele_dPhiSc_propVtx_all", "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons", nbindphimatch,dphimatchmin,dphimatchmax);
178  h_ele_dPhiSc_propVtx_all->Sumw2();
179  h_ele_dPhiSc_propVtx_all_barrel = new TH1F( "h_ele_dPhiSc_propVtx_all_barrel", "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons barrel", nbindphimatch,dphimatchmin,dphimatchmax);
181  h_ele_dPhiSc_propVtx_all_endcaps = new TH1F( "h_ele_dPhiSc_propVtx_all_endcaps", "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
183  h_ele_dEtaCl_propOut_all = new TH1F( "h_ele_dEtaCl_propOut_all", "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons", nbindetamatch,detamatchmin,detamatchmax);
184  h_ele_dEtaCl_propOut_all->Sumw2();
185  h_ele_dEtaCl_propOut_all_barrel = new TH1F( "h_ele_dEtaCl_propOut_all_barrel", "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons barrel", nbindetamatch,detamatchmin,detamatchmax);
187  h_ele_dEtaCl_propOut_all_endcaps = new TH1F( "h_ele_dEtaCl_propOut_all_endcaps", "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons endcaps", nbindetamatch,detamatchmin,detamatchmax);
189  h_ele_dPhiCl_propOut_all = new TH1F( "h_ele_dPhiCl_propOut_all", "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons", nbindphimatch,dphimatchmin,dphimatchmax);
190  h_ele_dPhiCl_propOut_all->Sumw2();
191  h_ele_dPhiCl_propOut_all_barrel = new TH1F( "h_ele_dPhiCl_propOut_all_barrel", "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons barrel", nbindphimatch,dphimatchmin,dphimatchmax);
192  h_ele_dPhiCl_propOut_all_endcaps = new TH1F( "h_ele_dPhiCl_propOut_all_endcaps", "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
195  h_ele_HoE_all = new TH1F("h_ele_HoE_all", "ele hadronic energy / em energy, all reco electrons", nbinhoe, hoemin, hoemax) ;
196  h_ele_HoE_all->Sumw2();
197  h_ele_HoE_all_barrel = new TH1F("h_ele_HoE_all_barrel", "ele hadronic energy / em energy, all reco electrons barrel", nbinhoe, hoemin, hoemax) ;
198  h_ele_HoE_all_barrel->Sumw2();
199  h_ele_HoE_all_endcaps = new TH1F("h_ele_HoE_all_endcaps", "ele hadronic energy / em energy, all reco electrons endcaps", nbinhoe, hoemin, hoemax) ;
200  h_ele_HoE_all_endcaps->Sumw2();
201  h_ele_vertexPt_all = new TH1F( "h_ele_vertexPt_all", "ele p_{T}, all reco electrons", nbinpteff,5.,ptmax);
202  h_ele_vertexPt_all->Sumw2();
203  h_ele_Et_all = new TH1F( "h_ele_Et_all", "ele SC E_{T}, all reco electrons", nbinpteff,5.,ptmax);
204  h_ele_Et_all->Sumw2();
205  h_ele_vertexEta_all = new TH1F( "h_ele_vertexEta_all", "ele eta, all reco electrons", nbineta,etamin,etamax);
206  h_ele_vertexEta_all->Sumw2();
207  h_ele_TIP_all = new TH1F( "h_ele_TIP_all", "ele vertex transverse radius, all reco electrons", 100,0.,0.2);
208  h_ele_TIP_all->Sumw2();
209  h_ele_TIP_all_barrel = new TH1F( "h_ele_TIP_all_barrel", "ele vertex transverse radius, all reco electrons barrel", 100,0.,0.2);
210  h_ele_TIP_all_barrel->Sumw2();
211  h_ele_TIP_all_endcaps = new TH1F( "h_ele_TIP_all_endcaps", "ele vertex transverse radius, all reco electrons endcaps", 100,0.,0.2);
212  h_ele_TIP_all_endcaps->Sumw2();
213  h_ele_mee_all = new TH1F( "h_ele_mee_all", "ele pairs invariant mass, all reco electrons", nbinmee, meemin, meemax );
214  h_ele_mee_all->Sumw2();
215  h_ele_mee_os = new TH1F( "h_ele_mee_os", "ele pairs invariant mass, opp. sign", nbinmee, meemin, meemax );
216  h_ele_mee_os->Sumw2();
217  h_ele_mee_os_ebeb = new TH1F( "h_ele_mee_os_ebeb", "ele pairs invariant mass, opp. sign, EB-EB", nbinmee, meemin, meemax );
218  h_ele_mee_os_ebeb->Sumw2();
219  h_ele_mee_os_ebee = new TH1F( "h_ele_mee_os_ebee", "ele pairs invariant mass, opp. sign, EB-EE", nbinmee, meemin, meemax );
220  h_ele_mee_os_ebee->Sumw2();
221  h_ele_mee_os_eeee = new TH1F( "h_ele_mee_os_eeee", "ele pairs invariant mass, opp. sign, EE-EE", nbinmee, meemin, meemax );
222  h_ele_mee_os_eeee->Sumw2();
223  h_ele_mee_os_gg = new TH1F( "h_ele_mee_os_gg", "ele pairs invariant mass, opp. sign, good-good", nbinmee, meemin, meemax );
224  h_ele_mee_os_gg->Sumw2();
225  h_ele_mee_os_gb = new TH1F( "h_ele_mee_os_gb", "ele pairs invariant mass, opp. sign, good-bad", nbinmee, meemin, meemax );
226  h_ele_mee_os_gb->Sumw2();
227  h_ele_mee_os_bb = new TH1F( "h_ele_mee_os_bb", "ele pairs invariant mass, opp. sign, bad-bad", nbinmee, meemin, meemax );
228  h_ele_mee_os_bb->Sumw2();
229 
230  // duplicates
231  h_ele_E2mnE1vsMee_all = new TH2F("h_ele_E2mnE1vsMee_all", "E2 - E1 vs ele pairs invariant mass, all electrons", nbinmee, meemin, meemax, 100, -50., 50. );
232  h_ele_E2mnE1vsMee_egeg_all = new TH2F("h_ele_E2mnE1vsMee_egeg_all", "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons", nbinmee, meemin, meemax, 100, -50., 50. );
233 
234  // charge ID
235  h_ele_ChargeMnChargeTrue = new TH1F( "h_ele_ChargeMnChargeTrue", "ele charge - gen charge ",5,-1.,4.);
236  h_ele_ChargeMnChargeTrue->Sumw2();
237  h_ele_simEta_matched_qmisid = new TH1F( "h_ele_eta_matched_qmisid","charge misid vs gen eta", nbineta,etamin,etamax);
239  h_ele_simAbsEta_matched_qmisid = new TH1F( "h_ele_abseta_matched_qmisid", "charge misid vs gen |eta|", nbineta/2,0.,etamax);
241  h_ele_simPt_matched_qmisid = new TH1F( "h_ele_Pt_matched_qmisid", "charge misid vs gen transverse momentum", nbinpteff,5.,ptmax);
243  h_ele_simPhi_matched_qmisid = new TH1F( "h_ele_phi_matched_qmisid","charge misid vs gen phi", nbinphi,phimin,phimax);
245  h_ele_simZ_matched_qmisid = new TH1F( "h_ele_z_matched_qmisid","charge misid vs gen z",nbinxyz, -25, 25 );
246  h_ele_simZ_matched_qmisid->Sumw2();
247 
248  // matched electrons
249  h_ele_charge = new TH1F( "h_ele_charge", "ele charge", 5,-2.,2.);
250  h_ele_charge->Sumw2();
251  h_ele_chargeVsEta = new TH2F( "h_ele_chargeVsEta", "ele charge vs eta", nbineta2D,etamin,etamax,5,-2.,2.);
252  h_ele_chargeVsPhi = new TH2F( "h_ele_chargeVsPhi", "ele charge vs phi", nbinphi2D,phimin,phimax,5,-2.,2.);
253  h_ele_chargeVsPt = new TH2F( "h_ele_chargeVsPt", "ele charge vs pt", nbinpt,0.,100.,5,-2.,2.);
254  h_ele_vertexP = new TH1F( "h_ele_vertexP", "ele momentum", nbinp,0.,pmax);
255  h_ele_vertexP->Sumw2();
256  h_ele_vertexPt = new TH1F( "h_ele_vertexPt", "ele transverse momentum", nbinpt,0.,ptmax);
257  h_ele_vertexPt->Sumw2();
258  h_ele_Et = new TH1F( "h_ele_Et", "ele transverse energy", nbinpt,0.,ptmax);
259  h_ele_Et->Sumw2();
260  h_ele_vertexPtVsEta = new TH2F( "h_ele_vertexPtVsEta", "ele transverse momentum vs eta",nbineta2D,etamin,etamax,nbinpt2D,0.,ptmax);
261  h_ele_vertexPtVsPhi = new TH2F( "h_ele_vertexPtVsPhi", "ele transverse momentum vs phi",nbinphi2D,phimin,phimax,nbinpt2D,0.,ptmax);
262  h_ele_simPt_matched = new TH1F( "h_ele_simPt_matched", "Efficiency vs gen transverse momentum", nbinpteff,5.,ptmax);
263  h_ele_vertexEta = new TH1F( "h_ele_vertexEta", "ele momentum eta", nbineta,etamin,etamax);
264  h_ele_vertexEta->Sumw2();
265  h_ele_vertexEtaVsPhi = new TH2F( "h_ele_vertexEtaVsPhi", "ele momentum eta vs phi",nbineta2D,etamin,etamax,nbinphi2D,phimin,phimax );
266  h_ele_simAbsEta_matched = new TH1F( "h_ele_simAbsEta_matched", "Efficiency vs gen |eta|", nbineta/2,0.,2.5);
267  h_ele_simAbsEta_matched->Sumw2();
268  h_ele_simEta_matched = new TH1F( "h_ele_simEta_matched", "Efficiency vs gen eta", nbineta,etamin,etamax);
269  h_ele_simEta_matched->Sumw2();
270  h_ele_simPtEta_matched = new TH2F( "h_ele_simPtEta_matched", "Efficiency vs pt #eta", nbineta2D,etamin,etamax, nbinpt2D,5.,ptmax );
271  h_ele_simPtEta_matched->Sumw2();
272  h_ele_simPhi_matched = new TH1F( "h_ele_simPhi_matched", "Efficiency vs gen phi", nbinphi,phimin,phimax);
273  h_ele_simPhi_matched->Sumw2();
274  h_ele_vertexPhi = new TH1F( "h_ele_vertexPhi", "ele momentum #phi", nbinphi,phimin,phimax);
275  h_ele_vertexPhi->Sumw2();
276  h_ele_vertexX = new TH1F( "h_ele_vertexX", "ele vertex x", nbinxyz,-0.1,0.1 );
277  h_ele_vertexX->Sumw2();
278  h_ele_vertexY = new TH1F( "h_ele_vertexY", "ele vertex y", nbinxyz,-0.1,0.1 );
279  h_ele_vertexY->Sumw2();
280  h_ele_vertexZ = new TH1F( "h_ele_vertexZ", "ele vertex z", nbinxyz,-25, 25 );
281  h_ele_vertexZ->Sumw2();
282  h_ele_simZ_matched = new TH1F( "h_ele_simZ_matched", "Efficiency vs gen vertex z", nbinxyz,-25,25);
283  h_ele_simZ_matched->Sumw2();
284  h_ele_vertexTIP = new TH1F( "h_ele_vertexTIP", "ele transverse impact parameter (wrt gen vtx)", 90,0.,0.15);
285  h_ele_vertexTIP->Sumw2();
286  h_ele_vertexTIPVsEta = new TH2F( "h_ele_vertexTIPVsEta", "ele transverse impact parameter (wrt gen vtx) vs eta", nbineta2D,etamin,etamax,45,0.,0.15);
287  h_ele_vertexTIPVsPhi = new TH2F( "h_ele_vertexTIPVsPhi", "ele transverse impact parameter (wrt gen vtx) vs phi", nbinphi2D,phimin,phimax,45,0.,0.15);
288  h_ele_vertexTIPVsPt = new TH2F( "h_ele_vertexTIPVsPt", "ele transverse impact parameter (wrt gen vtx) vs transverse momentum", nbinpt2D,0.,ptmax,45,0.,0.15);
289  h_ele_PoPtrue = new TH1F( "h_ele_PoPtrue", "ele momentum / gen momentum", nbinpoptrue,poptruemin,poptruemax);
290  h_ele_PoPtrue->Sumw2();
291  h_ele_PtoPttrue = new TH1F( "h_ele_PtoPttrue", "ele transverse momentum / gen transverse momentum", nbinpoptrue,poptruemin,poptruemax);
292  h_ele_PtoPttrue->Sumw2();
293  h_ele_PoPtrueVsEta = new TH2F( "h_ele_PoPtrueVsEta", "ele momentum / gen momentum vs eta", nbineta2D,etamin,etamax,50,poptruemin,poptruemax);
294  h_ele_PoPtrueVsPhi = new TH2F( "h_ele_PoPtrueVsPhi", "ele momentum / gen momentum vs phi", nbinphi2D,phimin,phimax,50,poptruemin,poptruemax);
295  h_ele_PoPtrueVsPt = new TH2F( "h_ele_PoPtrueVsPt", "ele momentum / gen momentum vs eta", nbinpt2D,0.,ptmax,50,poptruemin,poptruemax);
296  h_ele_PoPtrue_barrel = new TH1F( "h_ele_PoPtrue_barrel", "ele momentum / gen momentum, barrel",nbinpoptrue,poptruemin,poptruemax);
297  h_ele_PoPtrue_barrel->Sumw2();
298  h_ele_PoPtrue_endcaps = new TH1F( "h_ele_PoPtrue_endcaps", "ele momentum / gen momentum, endcaps",nbinpoptrue,poptruemin,poptruemax);
299  h_ele_PoPtrue_endcaps->Sumw2();
300  h_ele_PoPtrue_golden_barrel = new TH1F( "h_ele_PoPtrue_golden_barrel", "ele momentum / gen momentum, golden, barrel",nbinpoptrue,poptruemin,poptruemax);
302  h_ele_PoPtrue_golden_endcaps = new TH1F( "h_ele_PoPtrue_golden_endcaps", "ele momentum / gen momentum, golden, endcaps",nbinpoptrue,poptruemin,poptruemax);
304  h_ele_PoPtrue_showering_barrel = new TH1F( "h_ele_PoPtrue_showering_barrel", "ele momentum / gen momentum, showering, barrel",nbinpoptrue,poptruemin,poptruemax);
306  h_ele_PoPtrue_showering_endcaps = new TH1F( "h_ele_PoPtrue_showering_endcaps", "ele momentum / gen momentum, showering, endcaps",nbinpoptrue,poptruemin,poptruemax);
308  h_ele_PtoPttrue_barrel = new TH1F( "h_ele_PtoPttrue_barrel", "ele transverse momentum / gen transverse momentum, barrel",nbinpoptrue,poptruemin,poptruemax);
309  h_ele_PtoPttrue_barrel->Sumw2();
310  h_ele_PtoPttrue_endcaps = new TH1F( "h_ele_PtoPttrue_endcaps", "ele transverse momentum / gen transverse momentum, endcaps",nbinpoptrue,poptruemin,poptruemax);
311  h_ele_PtoPttrue_endcaps->Sumw2();
312  h_ele_EtaMnEtaTrue = new TH1F( "h_ele_EtaMnEtaTrue", "ele momentum eta - gen eta",nbindeta,detamin,detamax);
313  h_ele_EtaMnEtaTrue->Sumw2();
314  h_ele_EtaMnEtaTrue_barrel = new TH1F( "h_ele_EtaMnEtaTrue_barrel", "ele momentum eta - gen eta barrel",nbindeta,detamin,detamax);
315  h_ele_EtaMnEtaTrue_barrel->Sumw2();
316  h_ele_EtaMnEtaTrue_endcaps = new TH1F( "h_ele_EtaMnEtaTrue_endcaps", "ele momentum eta - gen eta endcaps",nbindeta,detamin,detamax);
318  h_ele_EtaMnEtaTrueVsEta = new TH2F( "h_ele_EtaMnEtaTrueVsEta", "ele momentum eta - gen eta vs eta",nbineta2D,etamin,etamax,nbindeta/2,detamin,detamax);
319  h_ele_EtaMnEtaTrueVsPhi = new TH2F( "h_ele_EtaMnEtaTrueVsPhi", "ele momentum eta - gen eta vs phi",nbinphi2D,phimin,phimax,nbindeta/2,detamin,detamax);
320  h_ele_EtaMnEtaTrueVsPt = new TH2F( "h_ele_EtaMnEtaTrueVsPt", "ele momentum eta - gen eta vs pt",nbinpt,0.,ptmax,nbindeta/2,detamin,detamax);
321  h_ele_PhiMnPhiTrue = new TH1F( "h_ele_PhiMnPhiTrue", "ele momentum phi - gen phi",nbindphi,dphimin,dphimax);
322  h_ele_PhiMnPhiTrue->Sumw2();
323  h_ele_PhiMnPhiTrue_barrel = new TH1F( "h_ele_PhiMnPhiTrue_barrel", "ele momentum phi - gen phi barrel",nbindphi,dphimin,dphimax);
324  h_ele_PhiMnPhiTrue_barrel->Sumw2();
325  h_ele_PhiMnPhiTrue_endcaps = new TH1F( "h_ele_PhiMnPhiTrue_endcaps", "ele momentum phi - gen phi endcaps",nbindphi,dphimin,dphimax);
327  h_ele_PhiMnPhiTrue2 = new TH1F( "h_ele_PhiMnPhiTrue2", "ele momentum phi - gen phi",nbindphimatch2D,dphimatchmin,dphimatchmax);
328  h_ele_PhiMnPhiTrueVsEta = new TH2F( "h_ele_PhiMnPhiTrueVsEta", "ele momentum phi - gen phi vs eta",nbineta2D,etamin,etamax,nbindphi/2,dphimin,dphimax);
329  h_ele_PhiMnPhiTrueVsPhi = new TH2F( "h_ele_PhiMnPhiTrueVsPhi", "ele momentum phi - gen phi vs phi",nbinphi2D,phimin,phimax,nbindphi/2,dphimin,dphimax);
330  h_ele_PhiMnPhiTrueVsPt = new TH2F( "h_ele_PhiMnPhiTrueVsPt", "ele momentum phi - gen phi vs pt",nbinpt2D,0.,ptmax,nbindphi/2,dphimin,dphimax);
331 
332  // matched electron, superclusters
333  histSclEn_ = new TH1F("h_scl_energy","ele supercluster energy",nbinp,0.,pmax);
334  histSclEn_->Sumw2();
335  histSclEoEtrue_barrel = new TH1F("h_scl_EoEtrue_barrel","ele supercluster energy / gen energy, barrel",50,0.2,1.2);
336  histSclEoEtrue_barrel->Sumw2();
337  histSclEoEtrue_barrel_eg = new TH1F("h_scl_EoEtrue_barrel_eg","ele supercluster energy / gen energy, barrel, ecal driven",50,0.2,1.2);
338  histSclEoEtrue_barrel_eg->Sumw2();
339  histSclEoEtrue_barrel_etagap = new TH1F("h_scl_EoEtrue_barrel_etagap","ele supercluster energy / gen energy, barrel, etagap",50,0.2,1.2);
341  histSclEoEtrue_barrel_phigap = new TH1F("h_scl_EoEtrue_barrel_phigap","ele supercluster energy / gen energy, barrel, phigap",50,0.2,1.2);
343  histSclEoEtrue_ebeegap = new TH1F("h_scl_EoEtrue_ebeegap","ele supercluster energy / gen energy, ebeegap",50,0.2,1.2);
344  histSclEoEtrue_ebeegap->Sumw2();
345  histSclEoEtrue_endcaps = new TH1F("h_scl_EoEtrue_endcaps","ele supercluster energy / gen energy, endcaps",50,0.2,1.2);
346  histSclEoEtrue_endcaps->Sumw2();
347  histSclEoEtrue_endcaps_eg = new TH1F("h_scl_EoEtrue_endcaps_eg","ele supercluster energy / gen energy, endcaps, ecal driven",50,0.2,1.2);
348  histSclEoEtrue_endcaps_eg->Sumw2();
349  histSclEoEtrue_endcaps_deegap = new TH1F("h_scl_EoEtrue_endcaps_deegap","ele supercluster energy / gen energy, endcaps, deegap",50,0.2,1.2);
351  histSclEoEtrue_endcaps_ringgap = new TH1F("h_scl_EoEtrue_endcaps_ringgap","ele supercluster energy / gen energy, endcaps, ringgap",50,0.2,1.2);
353  histSclEoEtrue_barrel_new = new TH1F("h_scl_EoEtrue_barrel_new","ele supercluster energy / gen energy, barrel",nbinpoptrue,poptruemin,poptruemax);
354  histSclEoEtrue_barrel_new->Sumw2();
355  histSclEoEtrue_barrel_eg_new = new TH1F("h_scl_EoEtrue_barrel_eg_new","ele supercluster energy / gen energy, barrel, ecal driven",nbinpoptrue,poptruemin,poptruemax);
357  histSclEoEtrue_barrel_etagap_new = new TH1F("h_scl_EoEtrue_barrel_etagap_new","ele supercluster energy / gen energy, barrel, etagap",nbinpoptrue,poptruemin,poptruemax);
359  histSclEoEtrue_barrel_phigap_new = new TH1F("h_scl_EoEtrue_barrel_phigap_new","ele supercluster energy / gen energy, barrel, phigap",nbinpoptrue,poptruemin,poptruemax);
361  histSclEoEtrue_ebeegap_new = new TH1F("h_scl_EoEtrue_ebeegap_new","ele supercluster energy / gen energy, ebeegap",nbinpoptrue,poptruemin,poptruemax);
363  histSclEoEtrue_endcaps_new = new TH1F("h_scl_EoEtrue_endcaps_new","ele supercluster energy / gen energy, endcaps",nbinpoptrue,poptruemin,poptruemax);
365  histSclEoEtrue_endcaps_eg_new = new TH1F("h_scl_EoEtrue_endcaps_eg_new","ele supercluster energy / gen energy, endcaps, ecal driven",nbinpoptrue,poptruemin,poptruemax);
367  histSclEoEtrue_endcaps_deegap_new = new TH1F("h_scl_EoEtrue_endcaps_deegap_new","ele supercluster energy / gen energy, endcaps, deegap",nbinpoptrue,poptruemin,poptruemax);
369  histSclEoEtrue_endcaps_ringgap_new = new TH1F("h_scl_EoEtrue_endcaps_ringgap_new","ele supercluster energy / gen energy, endcaps, ringgap",nbinpoptrue,poptruemin,poptruemax);
371  histSclEt_ = new TH1F("h_scl_et","ele supercluster transverse energy",nbinpt,0.,ptmax);
372  histSclEt_->Sumw2();
373  histSclEtVsEta_ = new TH2F("h_scl_etVsEta","ele supercluster transverse energy vs eta",nbineta2D,etamin,etamax,nbinpt,0.,ptmax);
374  histSclEtVsPhi_ = new TH2F("h_scl_etVsPhi","ele supercluster transverse energy vs phi",nbinphi2D,phimin,phimax,nbinpt,0.,ptmax);
375  histSclEtaVsPhi_ = new TH2F("h_scl_etaVsPhi","ele supercluster eta vs phi",nbinphi2D,phimin,phimax,nbineta2D,etamin,etamax);
376  histSclEta_ = new TH1F("h_scl_eta","ele supercluster eta",nbineta,etamin,etamax);
377  histSclEta_->Sumw2();
378  histSclPhi_ = new TH1F("h_scl_phi","ele supercluster phi",nbinphi,phimin,phimax);
379  histSclPhi_->Sumw2();
380 
381  histSclSigEtaEta_ = new TH1F("h_scl_sigetaeta","ele supercluster sigma eta eta",100,0.,0.05);
382  histSclSigEtaEta_->Sumw2();
383  histSclSigEtaEta_barrel_ = new TH1F("h_scl_sigetaeta_barrel","ele supercluster sigma eta eta barrel",100,0.,0.05);
384  histSclSigEtaEta_barrel_->Sumw2();
385  histSclSigEtaEta_endcaps_ = new TH1F("h_scl_sigetaeta_endcaps","ele supercluster sigma eta eta endcaps",100,0.,0.05);
386  histSclSigEtaEta_endcaps_->Sumw2();
387  histSclSigIEtaIEta_ = new TH1F("h_scl_sigietaieta","ele supercluster sigma ieta ieta",100,0.,0.05);
388  histSclSigIEtaIEta_->Sumw2();
389  histSclSigIEtaIEta_barrel_ = new TH1F("h_scl_sigietaieta_barrel","ele supercluster sigma ieta ieta, barrel",100,0.,0.05);
391  histSclSigIEtaIEta_endcaps_ = new TH1F("h_scl_sigietaieta_endcaps","ele supercluster sigma ieta ieta, endcaps",100,0.,0.05);
393  histSclE1x5_ = new TH1F("h_scl_E1x5","ele supercluster energy in 1x5",nbinp,0., pmax);
394  histSclE1x5_->Sumw2();
395  histSclE1x5_barrel_ = new TH1F("h_scl_E1x5_barrel","ele supercluster energy in 1x5 barrel",nbinp,0., pmax);
396  histSclE1x5_barrel_->Sumw2();
397  histSclE1x5_endcaps_ = new TH1F("h_scl_E1x5_endcaps","ele supercluster energy in 1x5 endcaps",nbinp,0., pmax);
398  histSclE1x5_endcaps_->Sumw2();
399  histSclE2x5max_ = new TH1F("h_scl_E2x5max","ele supercluster energy in 2x5 max",nbinp,0.,pmax);
400  histSclE2x5max_->Sumw2();
401  histSclE2x5max_barrel_ = new TH1F("h_scl_E2x5max_barrel","ele supercluster energy in 2x5 max barrel",nbinp,0.,pmax);
402  histSclE2x5max_barrel_->Sumw2();
403  histSclE2x5max_endcaps_ = new TH1F("h_scl_E2x5max_endcaps","ele supercluster energy in 2x5 max endcaps",nbinp,0.,pmax);
404  histSclE2x5max_endcaps_->Sumw2();
405  histSclE5x5_ = new TH1F("h_scl_E5x5","ele supercluster energy in 5x5",nbinp,0.,pmax);
406  histSclE5x5_->Sumw2();
407  histSclE5x5_barrel_ = new TH1F("h_scl_E5x5_barrel","ele supercluster energy in 5x5 barrel",nbinp,0.,pmax);
408  histSclE5x5_barrel_->Sumw2();
409  histSclE5x5_endcaps_ = new TH1F("h_scl_E5x5_endcaps","ele supercluster energy in 5x5 endcaps",nbinp,0.,pmax);
410  histSclE5x5_endcaps_->Sumw2();
411  histSclSigEtaEta_eg_ = new TH1F("h_scl_sigetaeta_eg","ele supercluster sigma eta eta, ecal driven",100,0.,0.05);
412  histSclSigEtaEta_eg_->Sumw2();
413  histSclSigEtaEta_eg_barrel_ = new TH1F("h_scl_sigetaeta_eg_barrel","ele supercluster sigma eta eta, ecal driven barrel",100,0.,0.05);
415  histSclSigEtaEta_eg_endcaps_ = new TH1F("h_scl_sigetaeta_eg_endcaps","ele supercluster sigma eta eta, ecal driven endcaps",100,0.,0.05);
417  histSclSigIEtaIEta_eg_ = new TH1F("h_scl_sigietaieta_eg","ele supercluster sigma ieta ieta, ecal driven",100,0.,0.05);
418  histSclSigIEtaIEta_eg_->Sumw2();
419  histSclSigIEtaIEta_eg_barrel_ = new TH1F("h_scl_sigietaieta_barrel_eg","ele supercluster sigma ieta ieta, barrel, ecal driven",100,0.,0.05);
421  histSclSigIEtaIEta_eg_endcaps_ = new TH1F("h_scl_sigietaieta_endcaps_eg","ele supercluster sigma ieta ieta, endcaps, ecal driven",100,0.,0.05);
423  histSclE1x5_eg_ = new TH1F("h_scl_E1x5_eg","ele supercluster energy in 1x5, ecal driven",nbinp,0., pmax);
424  histSclE1x5_eg_->Sumw2();
425  histSclE1x5_eg_barrel_ = new TH1F("h_scl_E1x5_eg_barrel","ele supercluster energy in 1x5, ecal driven barrel",nbinp,0., pmax);
426  histSclE1x5_eg_barrel_->Sumw2();
427  histSclE1x5_eg_endcaps_ = new TH1F("h_scl_E1x5_eg_endcaps","ele supercluster energy in 1x5, ecal driven endcaps",nbinp,0., pmax);
428  histSclE1x5_eg_endcaps_->Sumw2();
429  histSclE2x5max_eg_ = new TH1F("h_scl_E2x5max_eg","ele supercluster energy in 2x5 max, ecal driven",nbinp,0.,pmax);
430  histSclE2x5max_eg_->Sumw2();
431  histSclE2x5max_eg_barrel_ = new TH1F("h_scl_E2x5max_eg_barrel","ele supercluster energy in 2x5 max, ecal driven barrel",nbinp,0.,pmax);
432  histSclE2x5max_eg_barrel_->Sumw2();
433  histSclE2x5max_eg_endcaps_ = new TH1F("h_scl_E2x5max_eg_endcaps","ele supercluster energy in 2x5 max, ecal driven endcaps",nbinp,0.,pmax);
435  histSclE5x5_eg_ = new TH1F("h_scl_E5x5_eg","ele supercluster energy in 5x5, ecal driven",nbinp,0.,pmax);
436  histSclE5x5_eg_->Sumw2();
437  histSclE5x5_eg_barrel_ = new TH1F("h_scl_E5x5_eg_barrel","ele supercluster energy in 5x5, ecal driven barrel",nbinp,0.,pmax);
438  histSclE5x5_eg_barrel_->Sumw2();
439  histSclE5x5_eg_endcaps_ = new TH1F("h_scl_E5x5_eg_endcaps","ele supercluster energy in 5x5, ecal driven endcaps",nbinp,0.,pmax);
440  histSclE5x5_eg_endcaps_->Sumw2();
441 
442  histSclEoEtruePfVsEg = new TH2F("h_scl_EoEtruePfVsEg","ele supercluster energy / gen energy pflow vs eg",75,-0.1,1.4, 75, -0.1, 1.4);
443 
444  // matched electron, gsf tracks
445  h_ele_ambiguousTracks = new TH1F( "h_ele_ambiguousTracks", "ele # ambiguous tracks", 5,0.,5.);
446  h_ele_ambiguousTracks->Sumw2();
447  h_ele_ambiguousTracksVsEta = new TH2F( "h_ele_ambiguousTracksVsEta","ele # ambiguous tracks vs eta", nbineta2D,etamin,etamax,5,0.,5.);
448  h_ele_ambiguousTracksVsPhi = new TH2F( "h_ele_ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", nbinphi2D,phimin,phimax,5,0.,5.);
449  h_ele_ambiguousTracksVsPt = new TH2F( "h_ele_ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", nbinpt2D,0.,ptmax,5,0.,5.);
450  h_ele_foundHits = new TH1F( "h_ele_foundHits", "ele track # found hits", nbinfhits,0.,fhitsmax);
451  h_ele_foundHits->Sumw2();
452  h_ele_foundHits_barrel = new TH1F( "h_ele_foundHits_barrel", "ele track # found hits, barrel", nbinfhits,0.,fhitsmax);
453  h_ele_foundHits_barrel->Sumw2();
454  h_ele_foundHits_endcaps = new TH1F( "h_ele_foundHits_endcaps", "ele track # found hits, endcaps", nbinfhits,0.,fhitsmax);
455  h_ele_foundHits_endcaps->Sumw2();
456  h_ele_foundHitsVsEta = new TH2F( "h_ele_foundHitsVsEta", "ele track # found hits vs eta", nbineta2D,etamin,etamax,nbinfhits,0.,fhitsmax);
457  h_ele_foundHitsVsPhi = new TH2F( "h_ele_foundHitsVsPhi", "ele track # found hits vs phi", nbinphi2D,phimin,phimax,nbinfhits,0.,fhitsmax);
458  h_ele_foundHitsVsPt = new TH2F( "h_ele_foundHitsVsPt", "ele track # found hits vs pt", nbinpt2D,0.,ptmax,nbinfhits,0.,fhitsmax);
459  h_ele_lostHits = new TH1F( "h_ele_lostHits", "ele track # lost hits", 5,0.,5.);
460  h_ele_lostHits->Sumw2();
461  h_ele_lostHits_barrel = new TH1F( "h_ele_lostHits_barrel", "ele track # lost hits, barrel", 5,0.,5.);
462  h_ele_lostHits_barrel->Sumw2();
463  h_ele_lostHits_endcaps = new TH1F( "h_ele_lostHits_endcaps", "ele track # lost hits, endcaps", 5,0.,5.);
464  h_ele_lostHits_endcaps->Sumw2();
465  h_ele_lostHitsVsEta = new TH2F( "h_ele_lostHitsVsEta", "ele track # lost hits vs eta", nbineta2D,etamin,etamax,nbinlhits,0.,lhitsmax);
466  h_ele_lostHitsVsPhi = new TH2F( "h_ele_lostHitsVsPhi", "ele track # lost hits vs eta", nbinphi2D,phimin,phimax,nbinlhits,0.,lhitsmax);
467  h_ele_lostHitsVsPt = new TH2F( "h_ele_lostHitsVsPt", "ele track # lost hits vs eta", nbinpt2D,0.,ptmax,nbinlhits,0.,lhitsmax);
468  h_ele_chi2 = new TH1F( "h_ele_chi2", "ele track #chi^{2}", 100,0.,15.);
469  h_ele_chi2->Sumw2();
470  h_ele_chi2_barrel = new TH1F( "h_ele_chi2_barrel", "ele track #chi^{2}, barrel", 100,0.,15.);
471  h_ele_chi2_barrel->Sumw2();
472  h_ele_chi2_endcaps = new TH1F( "h_ele_chi2_endcaps", "ele track #chi^{2}, endcaps", 100,0.,15.);
473  h_ele_chi2_endcaps->Sumw2();
474  h_ele_chi2VsEta = new TH2F( "h_ele_chi2VsEta", "ele track #chi^{2} vs eta", nbineta2D,etamin,etamax,50,0.,15.);
475  h_ele_chi2VsPhi = new TH2F( "h_ele_chi2VsPhi", "ele track #chi^{2} vs phi", nbinphi2D,phimin,phimax,50,0.,15.);
476  h_ele_chi2VsPt = new TH2F( "h_ele_chi2VsPt", "ele track #chi^{2} vs pt", nbinpt2D,0.,ptmax,50,0.,15.);
477  h_ele_PinMnPout = new TH1F( "h_ele_PinMnPout", "ele track inner p - outer p, mean of GSF components" ,nbinp,0.,200.);
478  h_ele_PinMnPout->Sumw2();
479  h_ele_PinMnPout_mode = new TH1F( "h_ele_PinMnPout_mode", "ele track inner p - outer p, mode of GSF components" ,nbinp,0.,100.);
480  h_ele_PinMnPout_mode->Sumw2();
481  h_ele_PinMnPoutVsEta_mode = new TH2F( "h_ele_PinMnPoutVsEta_mode", "ele track inner p - outer p vs eta, mode of GSF components" ,nbineta2D, etamin,etamax,nbinp2D,0.,100.);
482  h_ele_PinMnPoutVsPhi_mode = new TH2F( "h_ele_PinMnPoutVsPhi_mode", "ele track inner p - outer p vs phi, mode of GSF components" ,nbinphi2D, phimin,phimax,nbinp2D,0.,100.);
483  h_ele_PinMnPoutVsPt_mode = new TH2F( "h_ele_PinMnPoutVsPt_mode", "ele track inner p - outer p vs pt, mode of GSF components" ,nbinpt2D, 0.,ptmax,nbinp2D,0.,100.);
484  h_ele_PinMnPoutVsE_mode = new TH2F( "h_ele_PinMnPoutVsE_mode", "ele track inner p - outer p vs E, mode of GSF components" ,nbinp2D, 0.,200.,nbinp2D,0.,100.);
485  h_ele_PinMnPoutVsChi2_mode = new TH2F( "h_ele_PinMnPoutVsChi2_mode", "ele track inner p - outer p vs track chi2, mode of GSF components" ,50, 0.,20.,nbinp2D,0.,100.);
486  h_ele_outerP = new TH1F( "h_ele_outerP", "ele track outer p, mean of GSF components", nbinp,0.,pmax);
487  h_ele_outerP->Sumw2();
488  h_ele_outerP_mode = new TH1F( "h_ele_outerP_mode", "ele track outer p, mode of GSF components", nbinp,0.,pmax);
489  h_ele_outerP_mode->Sumw2();
490  h_ele_outerPVsEta_mode = new TH2F( "h_ele_outerPVsEta_mode", "ele track outer p vs eta mode", nbineta2D,etamin,etamax,50,0.,pmax);
491  h_ele_outerPt = new TH1F( "h_ele_outerPt", "ele track outer p_{T}, mean of GSF components", nbinpt,0.,ptmax);
492  h_ele_outerPt->Sumw2();
493  h_ele_outerPt_mode = new TH1F( "h_ele_outerPt_mode", "ele track outer p_{T}, mode of GSF components", nbinpt,0.,ptmax);
494  h_ele_outerPt_mode->Sumw2();
495  h_ele_outerPtVsEta_mode = new TH2F( "h_ele_outerPtVsEta_mode", "ele track outer p_{T} vs eta, mode of GSF components", nbineta2D,etamin,etamax,nbinpt2D,0.,ptmax);
496  h_ele_outerPtVsPhi_mode = new TH2F( "h_ele_outerPtVsPhi_mode", "ele track outer p_{T} vs phi, mode of GSF components", nbinphi2D,phimin,phimax,nbinpt2D,0.,ptmax);
497  h_ele_outerPtVsPt_mode = new TH2F( "h_ele_outerPtVsPt_mode", "ele track outer p_{T} vs pt, mode of GSF components", nbinpt2D,0.,100.,nbinpt2D,0.,ptmax);
498 
499  // matched electrons, matching
500  h_ele_EoP = new TH1F( "h_ele_EoP", "ele E/P_{vertex}", nbineop,0.,eopmax);
501  h_ele_EoP->Sumw2();
502  h_ele_EoP_eg = new TH1F( "h_ele_EoP_eg", "ele E/P_{vertex}, ecal driven", nbineop,0.,eopmax);
503  h_ele_EoP_eg->Sumw2();
504  h_ele_EoP_barrel = new TH1F( "h_ele_EoP_barrel", "ele E/P_{vertex} barrel", nbineop,0.,eopmax);
505  h_ele_EoP_barrel->Sumw2();
506  h_ele_EoP_eg_barrel = new TH1F( "h_ele_EoP_eg_barrel", "ele E/P_{vertex}, ecal driven barrel", nbineop,0.,eopmax);
507  h_ele_EoP_eg_barrel->Sumw2();
508  h_ele_EoP_endcaps = new TH1F( "h_ele_EoP_endcaps", "ele E/P_{vertex} endcaps", nbineop,0.,eopmax);
509  h_ele_EoP_endcaps->Sumw2();
510  h_ele_EoP_eg_endcaps = new TH1F( "h_ele_EoP_eg_endcaps", "ele E/P_{vertex}, ecal driven endcaps", nbineop,0.,eopmax);
511  h_ele_EoP_eg_endcaps->Sumw2();
512  h_ele_EoPVsEta = new TH2F( "h_ele_EoPVsEta", "ele E/P_{vertex} vs eta", nbineta2D,etamin,etamax,nbineop2D,0.,eopmaxsht);
513  h_ele_EoPVsPhi = new TH2F( "h_ele_EoPVsPhi", "ele E/P_{vertex} vs phi", nbinphi2D,phimin,phimax,nbineop2D,0.,eopmaxsht);
514  h_ele_EoPVsE = new TH2F( "h_ele_EoPVsE", "ele E/P_{vertex} vs E", 50,0.,pmax ,50,0.,5.);
515  h_ele_EseedOP = new TH1F( "h_ele_EseedOP", "ele E_{seed}/P_{vertex}", nbineop,0.,eopmax);
516  h_ele_EseedOP->Sumw2();
517  h_ele_EseedOP_eg = new TH1F( "h_ele_EseedOP_eg", "ele E_{seed}/P_{vertex}, ecal driven", nbineop,0.,eopmax);
518  h_ele_EseedOP_eg->Sumw2();
519  h_ele_EseedOP_barrel = new TH1F( "h_ele_EseedOP_barrel", "ele E_{seed}/P_{vertex} barrel", nbineop,0.,eopmax);
520  h_ele_EseedOP_barrel->Sumw2();
521  h_ele_EseedOP_eg_barrel = new TH1F( "h_ele_EseedOP_eg_barrel", "ele E_{seed}/P_{vertex}, ecal driven barrel", nbineop,0.,eopmax);
522  h_ele_EseedOP_eg_barrel->Sumw2();
523  h_ele_EseedOP_endcaps = new TH1F( "h_ele_EseedOP_endcaps", "ele E_{seed}/P_{vertex} endcaps", nbineop,0.,eopmax);
524  h_ele_EseedOP_endcaps->Sumw2();
525  h_ele_EseedOP_eg_endcaps = new TH1F( "h_ele_EseedOP_eg_endcaps", "ele E_{seed}/P_{vertex}, ecal driven, endcaps", nbineop,0.,eopmax);
526  h_ele_EseedOP_eg_endcaps->Sumw2();
527  h_ele_EseedOPVsEta = new TH2F( "h_ele_EseedOPVsEta", "ele E_{seed}/P_{vertex} vs eta", nbineta2D,etamin,etamax,nbineop2D,0.,eopmaxsht);
528  h_ele_EseedOPVsPhi = new TH2F( "h_ele_EseedOPVsPhi", "ele E_{seed}/P_{vertex} vs phi", nbinphi2D,phimin,phimax,nbineop2D,0.,eopmaxsht);
529  h_ele_EseedOPVsE = new TH2F( "h_ele_EseedOPVsE", "ele E_{seed}/P_{vertex} vs E", 50,0.,pmax ,50,0.,5.);
530  h_ele_EoPout = new TH1F( "h_ele_EoPout", "ele E_{seed}/P_{out}", nbineop,0.,eopmax);
531  h_ele_EoPout->Sumw2();
532  h_ele_EoPout_eg = new TH1F( "h_ele_EoPout_eg", "ele E_{seed}/P_{out}, ecal driven", nbineop,0.,eopmax);
533  h_ele_EoPout_eg->Sumw2();
534  h_ele_EoPout_barrel = new TH1F( "h_ele_EoPout_barrel", "ele E_{seed}/P_{out} barrel", nbineop,0.,eopmax);
535  h_ele_EoPout_barrel->Sumw2();
536  h_ele_EoPout_eg_barrel = new TH1F( "h_ele_EoPout_eg_barrel", "ele E_{seed}/P_{out}, ecal driven, barrel", nbineop,0.,eopmax);
537  h_ele_EoPout_eg_barrel->Sumw2();
538  h_ele_EoPout_endcaps = new TH1F( "h_ele_EoPout_endcaps", "ele E_{seed}/P_{out} endcaps", nbineop,0.,eopmax);
539  h_ele_EoPout_endcaps->Sumw2();
540  h_ele_EoPout_eg_endcaps = new TH1F( "h_ele_EoPout_eg_endcaps", "ele E_{seed}/P_{out}, ecal driven, endcaps", nbineop,0.,eopmax);
541  h_ele_EoPout_eg_endcaps->Sumw2();
542  h_ele_EoPoutVsEta = new TH2F( "h_ele_EoPoutVsEta", "ele E_{seed}/P_{out} vs eta", nbineta2D,etamin,etamax,nbineop2D,0.,eopmaxsht);
543  h_ele_EoPoutVsPhi = new TH2F( "h_ele_EoPoutVsPhi", "ele E_{seed}/P_{out} vs phi", nbinphi2D,phimin,phimax,nbineop2D,0.,eopmaxsht);
544  h_ele_EoPoutVsE = new TH2F( "h_ele_EoPoutVsE", "ele E_{seed}/P_{out} vs E", nbinp2D,0.,pmax,nbineop2D,0.,eopmaxsht);
545  h_ele_EeleOPout = new TH1F( "h_ele_EeleOPout", "ele E_{ele}/P_{out}", nbineop,0.,eopmax);
546  h_ele_EeleOPout->Sumw2();
547  h_ele_EeleOPout_eg = new TH1F( "h_ele_EeleOPout_eg", "ele E_{ele}/P_{out}, ecal driven", nbineop,0.,eopmax);
548  h_ele_EeleOPout_eg->Sumw2();
549  h_ele_EeleOPout_barrel = new TH1F( "h_ele_EeleOPout_barrel", "ele E_{ele}/P_{out} barrel", nbineop,0.,eopmax);
550  h_ele_EeleOPout_barrel->Sumw2();
551  h_ele_EeleOPout_eg_barrel = new TH1F( "h_ele_EeleOPout_eg_barrel", "ele E_{ele}/P_{out}, ecal driven, barrel", nbineop,0.,eopmax);
552  h_ele_EeleOPout_eg_barrel->Sumw2();
553  h_ele_EeleOPout_endcaps = new TH1F( "h_ele_EeleOPout_endcaps", "ele E_{ele}/P_{out} endcaps", nbineop,0.,eopmax);
554  h_ele_EeleOPout_endcaps->Sumw2();
555  h_ele_EeleOPout_eg_endcaps = new TH1F( "h_ele_EeleOPout_eg_endcaps", "ele E_{ele}/P_{out}, ecal driven, endcaps", nbineop,0.,eopmax);
557  h_ele_EeleOPoutVsEta = new TH2F( "h_ele_EeleOPoutVsEta", "ele E_{ele}/P_{out} vs eta", nbineta2D,etamin,etamax,nbineop2D,0.,eopmaxsht);
558  h_ele_EeleOPoutVsPhi = new TH2F( "h_ele_EeleOPoutVsPhi", "ele E_{ele}/P_{out} vs phi", nbinphi2D,phimin,phimax,nbineop2D,0.,eopmaxsht);
559  h_ele_EeleOPoutVsE = new TH2F( "h_ele_EeleOPoutVsE", "ele E_{ele}/P_{out} vs E", nbinp2D,0.,pmax,nbineop2D,0.,eopmaxsht);
560  h_ele_dEtaSc_propVtx = new TH1F( "h_ele_dEtaSc_propVtx", "ele #eta_{sc} - #eta_{tr}, prop from vertex", nbindetamatch,detamatchmin,detamatchmax);
561  h_ele_dEtaSc_propVtx->Sumw2();
562  h_ele_dEtaSc_propVtx_eg = new TH1F( "h_ele_dEtaSc_propVtx_eg", "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven", nbindetamatch,detamatchmin,detamatchmax);
563  h_ele_dEtaSc_propVtx_eg->Sumw2();
564  h_ele_dEtaSc_propVtx_barrel = new TH1F( "h_ele_dEtaSc_propVtx_barrel", "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel", nbindetamatch,detamatchmin,detamatchmax);
566  h_ele_dEtaSc_propVtx_eg_barrel = new TH1F( "h_ele_dEtaSc_propVtx_eg_barrel", "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, barrel", nbindetamatch,detamatchmin,detamatchmax);
568  h_ele_dEtaSc_propVtx_endcaps = new TH1F( "h_ele_dEtaSc_propVtx_endcaps", "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps", nbindetamatch,detamatchmin,detamatchmax);
570  h_ele_dEtaSc_propVtx_eg_endcaps = new TH1F( "h_ele_dEtaSc_propVtx_eg_endcaps", "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, endcaps", nbindetamatch,detamatchmin,detamatchmax);
572  h_ele_dEtaScVsEta_propVtx = new TH2F( "h_ele_dEtaScVsEta_propVtx", "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex", nbineta2D,etamin,etamax,nbindetamatch2D,detamatchmin,detamatchmax);
573  h_ele_dEtaScVsPhi_propVtx = new TH2F( "h_ele_dEtaScVsPhi_propVtx", "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex", nbinphi2D,phimin,phimax,nbindetamatch2D,detamatchmin,detamatchmax);
574  h_ele_dEtaScVsPt_propVtx = new TH2F( "h_ele_dEtaScVsPt_propVtx", "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex", nbinpt2D,0.,ptmax,nbindetamatch2D,detamatchmin,detamatchmax);
575  h_ele_dPhiSc_propVtx = new TH1F( "h_ele_dPhiSc_propVtx", "ele #phi_{sc} - #phi_{tr}, prop from vertex", nbindphimatch,dphimatchmin,dphimatchmax);
576  h_ele_dPhiSc_propVtx->Sumw2();
577  h_ele_dPhiSc_propVtx_eg = new TH1F( "h_ele_dPhiSc_propVtx_eg", "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven", nbindphimatch,dphimatchmin,dphimatchmax);
578  h_ele_dPhiSc_propVtx_eg->Sumw2();
579  h_ele_dPhiSc_propVtx_barrel = new TH1F( "h_ele_dPhiSc_propVtx_barrel", "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel", nbindphimatch,dphimatchmin,dphimatchmax);
581  h_ele_dPhiSc_propVtx_eg_barrel = new TH1F( "h_ele_dPhiSc_propVtx_eg_barrel", "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, barrel", nbindphimatch,dphimatchmin,dphimatchmax);
583  h_ele_dPhiSc_propVtx_endcaps = new TH1F( "h_ele_dPhiSc_propVtx_endcaps", "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
585  h_ele_dPhiSc_propVtx_eg_endcaps = new TH1F( "h_ele_dPhiSc_propVtx_eg_endcaps", "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
587  h_ele_dPhiScVsEta_propVtx = new TH2F( "h_ele_dPhiScVsEta_propVtx", "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex", nbineta2D,etamin,etamax,nbindphimatch2D,dphimatchmin,dphimatchmax);
588  h_ele_dPhiScVsPhi_propVtx = new TH2F( "h_ele_dPhiScVsPhi_propVtx", "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex", nbinphi2D,phimin,phimax,nbindphimatch2D,dphimatchmin,dphimatchmax);
589  h_ele_dPhiScVsPt_propVtx = new TH2F( "h_ele_dPhiScVsPt_propVtx", "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex", nbinpt2D,0.,ptmax,nbindphimatch2D,dphimatchmin,dphimatchmax);
590  h_ele_dEtaCl_propOut = new TH1F( "h_ele_dEtaCl_propOut", "ele #eta_{cl} - #eta_{tr}, prop from outermost", nbindetamatch,detamatchmin,detamatchmax);
591  h_ele_dEtaCl_propOut->Sumw2();
592  h_ele_dEtaCl_propOut_eg = new TH1F( "h_ele_dEtaCl_propOut_eg", "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven", nbindetamatch,detamatchmin,detamatchmax);
593  h_ele_dEtaCl_propOut_eg->Sumw2();
594  h_ele_dEtaCl_propOut_barrel = new TH1F( "h_ele_dEtaCl_propOut_barrel", "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel", nbindetamatch,detamatchmin,detamatchmax);
596  h_ele_dEtaCl_propOut_eg_barrel = new TH1F( "h_ele_dEtaCl_propOut_eg_barrel", "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, barrel", nbindetamatch,detamatchmin,detamatchmax);
598  h_ele_dEtaCl_propOut_endcaps = new TH1F( "h_ele_dEtaCl_propOut_endcaps", "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps", nbindetamatch,detamatchmin,detamatchmax);
600  h_ele_dEtaCl_propOut_eg_endcaps = new TH1F( "h_ele_dEtaCl_propOut_eg_endcaps", "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, endcaps", nbindetamatch,detamatchmin,detamatchmax);
602  h_ele_dEtaClVsEta_propOut = new TH2F( "h_ele_dEtaClVsEta_propOut", "ele #eta_{cl} - #eta_{tr} vs eta, prop from out", nbineta2D,etamin,etamax,nbindetamatch2D,detamatchmin,detamatchmax);
603  h_ele_dEtaClVsPhi_propOut = new TH2F( "h_ele_dEtaClVsPhi_propOut", "ele #eta_{cl} - #eta_{tr} vs phi, prop from out", nbinphi2D,phimin,phimax,nbindetamatch2D,detamatchmin,detamatchmax);
604  h_ele_dEtaClVsPt_propOut = new TH2F( "h_ele_dEtaScVsPt_propOut", "ele #eta_{cl} - #eta_{tr} vs pt, prop from out", nbinpt2D,0.,ptmax,nbindetamatch2D,detamatchmin,detamatchmax);
605  h_ele_dPhiCl_propOut = new TH1F( "h_ele_dPhiCl_propOut", "ele #phi_{cl} - #phi_{tr}, prop from outermost", nbindphimatch,dphimatchmin,dphimatchmax);
606  h_ele_dPhiCl_propOut->Sumw2();
607  h_ele_dPhiCl_propOut_eg = new TH1F( "h_ele_dPhiCl_propOut_eg", "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven", nbindphimatch,dphimatchmin,dphimatchmax);
608  h_ele_dPhiCl_propOut_eg->Sumw2();
609  h_ele_dPhiCl_propOut_barrel = new TH1F( "h_ele_dPhiCl_propOut_barrel", "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel", nbindphimatch,dphimatchmin,dphimatchmax);
611  h_ele_dPhiCl_propOut_eg_barrel = new TH1F( "h_ele_dPhiCl_propOut_eg_barrel", "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, barrel", nbindphimatch,dphimatchmin,dphimatchmax);
613  h_ele_dPhiCl_propOut_endcaps = new TH1F( "h_ele_dPhiCl_propOut_endcaps", "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
615  h_ele_dPhiCl_propOut_eg_endcaps = new TH1F( "h_ele_dPhiCl_propOut_eg_endcaps", "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
617  h_ele_dPhiClVsEta_propOut = new TH2F( "h_ele_dPhiClVsEta_propOut", "ele #phi_{cl} - #phi_{tr} vs eta, prop from out", nbineta2D,etamin,etamax,nbindphimatch2D,dphimatchmin,dphimatchmax);
618  h_ele_dPhiClVsPhi_propOut = new TH2F( "h_ele_dPhiClVsPhi_propOut", "ele #phi_{cl} - #phi_{tr} vs phi, prop from out", nbinphi2D,phimin,phimax,nbindphimatch2D,dphimatchmin,dphimatchmax);
619  h_ele_dPhiClVsPt_propOut = new TH2F( "h_ele_dPhiSClsPt_propOut", "ele #phi_{cl} - #phi_{tr} vs pt, prop from out", nbinpt2D,0.,ptmax,nbindphimatch2D,dphimatchmin,dphimatchmax);
620  h_ele_dEtaEleCl_propOut = new TH1F( "h_ele_dEtaEleCl_propOut", "ele #eta_{EleCl} - #eta_{tr}, prop from outermost", nbindetamatch,detamatchmin,detamatchmax);
621  h_ele_dEtaEleCl_propOut->Sumw2();
622  h_ele_dEtaEleCl_propOut_eg = new TH1F( "h_ele_dEtaEleCl_propOut_eg", "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven", nbindetamatch,detamatchmin,detamatchmax);
624  h_ele_dEtaEleCl_propOut_barrel = new TH1F( "h_ele_dEtaEleCl_propOut_barrel", "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel", nbindetamatch,detamatchmin,detamatchmax);
626  h_ele_dEtaEleCl_propOut_eg_barrel = new TH1F( "h_ele_dEtaEleCl_propOut_eg_barrel", "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, barrel", nbindetamatch,detamatchmin,detamatchmax);
628  h_ele_dEtaEleCl_propOut_endcaps = new TH1F( "h_ele_dEtaEleCl_propOut_endcaps", "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps", nbindetamatch,detamatchmin,detamatchmax);
630  h_ele_dEtaEleCl_propOut_eg_endcaps = new TH1F( "h_ele_dEtaEleCl_propOut_eg_endcaps", "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, endcaps", nbindetamatch,detamatchmin,detamatchmax);
632  h_ele_dEtaEleClVsEta_propOut = new TH2F( "h_ele_dEtaEleClVsEta_propOut", "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out", nbineta2D,etamin,etamax,nbindetamatch2D,detamatchmin,detamatchmax);
633  h_ele_dEtaEleClVsPhi_propOut = new TH2F( "h_ele_dEtaEleClVsPhi_propOut", "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out", nbinphi2D,phimin,phimax,nbindetamatch2D,detamatchmin,detamatchmax);
634  h_ele_dEtaEleClVsPt_propOut = new TH2F( "h_ele_dEtaScVsPt_propOut", "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out", nbinpt2D,0.,ptmax,nbindetamatch2D,detamatchmin,detamatchmax);
635  h_ele_dPhiEleCl_propOut = new TH1F( "h_ele_dPhiEleCl_propOut", "ele #phi_{EleCl} - #phi_{tr}, prop from outermost", nbindphimatch,dphimatchmin,dphimatchmax);
636  h_ele_dPhiEleCl_propOut->Sumw2();
637  h_ele_dPhiEleCl_propOut_eg = new TH1F( "h_ele_dPhiEleCl_propOut_eg", "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven", nbindphimatch,dphimatchmin,dphimatchmax);
639  h_ele_dPhiEleCl_propOut_barrel = new TH1F( "h_ele_dPhiEleCl_propOut_barrel", "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel", nbindphimatch,dphimatchmin,dphimatchmax);
641  h_ele_dPhiEleCl_propOut_eg_barrel = new TH1F( "h_ele_dPhiEleCl_propOut_eg_barrel", "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, barrel", nbindphimatch,dphimatchmin,dphimatchmax);
643  h_ele_dPhiEleCl_propOut_endcaps = new TH1F( "h_ele_dPhiEleCl_propOut_endcaps", "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
645  h_ele_dPhiEleCl_propOut_eg_endcaps = new TH1F( "h_ele_dPhiEleCl_propOut_eg_endcaps", "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, endcaps", nbindphimatch,dphimatchmin,dphimatchmax);
647  h_ele_dPhiEleClVsEta_propOut = new TH2F( "h_ele_dPhiEleClVsEta_propOut", "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out", nbineta2D,etamin,etamax,nbindphimatch2D,dphimatchmin,dphimatchmax);
648  h_ele_dPhiEleClVsPhi_propOut = new TH2F( "h_ele_dPhiEleClVsPhi_propOut", "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out", nbinphi2D,phimin,phimax,nbindphimatch2D,dphimatchmin,dphimatchmax);
649  h_ele_dPhiEleClVsPt_propOut = new TH2F( "h_ele_dPhiSEleClsPt_propOut", "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out", nbinpt2D,0.,ptmax,nbindphimatch2D,dphimatchmin,dphimatchmax);
650 
651  h_ele_HoE = new TH1F("h_ele_HoE", "ele hadronic energy / em energy", nbinhoe, hoemin, hoemax) ;
652  h_ele_HoE->Sumw2();
653  h_ele_HoE_eg = new TH1F("h_ele_HoE_eg", "ele hadronic energy / em energy, ecal driven", nbinhoe, hoemin, hoemax) ;
654  h_ele_HoE_eg->Sumw2();
655  h_ele_HoE_barrel = new TH1F("h_ele_HoE_barrel", "ele hadronic energy / em energy, barrel", nbinhoe, hoemin, hoemax) ;
656  h_ele_HoE_barrel->Sumw2();
657  h_ele_HoE_eg_barrel = new TH1F("h_ele_HoE_eg_barrel", "ele hadronic energy / em energy, ecal driven, barrel", nbinhoe, hoemin, hoemax) ;
658  h_ele_HoE_eg_barrel->Sumw2();
659  h_ele_HoE_endcaps = new TH1F("h_ele_HoE_endcaps", "ele hadronic energy / em energy, endcaps", nbinhoe, hoemin, hoemax) ;
660  h_ele_HoE_endcaps->Sumw2();
661  h_ele_HoE_eg_endcaps = new TH1F("h_ele_HoE_eg_endcaps", "ele hadronic energy / em energy, ecal driven, endcaps", nbinhoe, hoemin, hoemax) ;
662  h_ele_HoE_eg_endcaps->Sumw2();
663  h_ele_HoE_fiducial = new TH1F("h_ele_HoE_fiducial", "ele hadronic energy / em energy, fiducial region", nbinhoe, hoemin, hoemax) ;
664  h_ele_HoE_fiducial->Sumw2();
665  h_ele_HoEVsEta = new TH2F("h_ele_HoEVsEta", "ele hadronic energy / em energy vs eta", nbineta,etamin,etamax,nbinhoe, hoemin, hoemax) ;
666  h_ele_HoEVsPhi = new TH2F("h_ele_HoEVsPhi", "ele hadronic energy / em energy vs phi", nbinphi2D,phimin,phimax,nbinhoe, hoemin, hoemax) ;
667  h_ele_HoEVsE = new TH2F("h_ele_HoEVsE", "ele hadronic energy / em energy vs E", nbinp, 0.,300.,nbinhoe, hoemin, hoemax) ;
668 
669  h_ele_seed_dphi2_ = new TH1F("h_ele_seedDphi2", "ele seed dphi 2nd layer", 50,-0.003,+0.003) ;
670  h_ele_seed_dphi2_->Sumw2();
671  h_ele_seed_dphi2VsEta_ = new TH2F("h_ele_seedDphi2VsEta", "ele seed dphi 2nd layer vs eta", nbineta2D,etamin,etamax,50,-0.003,+0.003) ;
672  h_ele_seed_dphi2VsPt_ = new TH2F("h_ele_seedDphi2VsPt", "ele seed dphi 2nd layer vs pt", nbinpt2D,0.,ptmax,50,-0.003,+0.003) ;
673  h_ele_seed_drz2_ = new TH1F("h_ele_seedDrz2", "ele seed dr (dz) 2nd layer", 50,-0.03,+0.03) ;
674  h_ele_seed_drz2_->Sumw2();
675  h_ele_seed_drz2VsEta_ = new TH2F("h_ele_seedDrz2VsEta", "ele seed dr/dz 2nd layer vs eta", nbineta2D,etamin,etamax,50,-0.03,+0.03) ;
676  h_ele_seed_drz2VsPt_ = new TH2F("h_ele_seedDrz2VsPt", "ele seed dr/dz 2nd layer vs pt", nbinpt2D,0.,ptmax,50,-0.03,+0.03) ;
677  h_ele_seed_subdet2_ = new TH1F("h_ele_seedSubdet2", "ele seed subdet 2nd layer", 10,0.,10.) ;
678  h_ele_seed_subdet2_->Sumw2();
679 
680  // classes
681  h_ele_classes = new TH1F( "h_ele_classes", "ele classes", 20,0.0,20.);
682  h_ele_classes->Sumw2();
683  h_ele_eta = new TH1F( "h_ele_eta", "ele electron eta", nbineta/2,0.0,etamax);
684  h_ele_eta->Sumw2();
685  h_ele_eta_golden = new TH1F( "h_ele_eta_golden", "ele electron eta golden", nbineta/2,0.0,etamax);
686  h_ele_eta_golden->Sumw2();
687  h_ele_eta_bbrem = new TH1F( "h_ele_eta_bbrem", "ele electron eta bbrem", nbineta/2,0.0,etamax);
688  h_ele_eta_bbrem->Sumw2();
689  h_ele_eta_narrow = new TH1F( "h_ele_eta_narrow", "ele electron eta narrow", nbineta/2,0.0,etamax);
690  h_ele_eta_narrow->Sumw2();
691  h_ele_eta_shower = new TH1F( "h_ele_eta_show", "ele electron eta showering", nbineta/2,0.0,etamax);
692  h_ele_eta_shower->Sumw2();
693  h_ele_PinVsPoutGolden_mode = new TH2F( "h_ele_PinVsPoutGolden_mode", "ele track inner p vs outer p vs eta, golden, mode of GSF components" ,nbinp2D,0.,pmax,50,0.,pmax);
694  h_ele_PinVsPoutShowering_mode = new TH2F( "h_ele_PinVsPoutShowering_mode", "ele track inner p vs outer p vs eta, showering, mode of GSF components" ,nbinp2D,0.,pmax,50,0.,pmax);
695  h_ele_PinVsPoutGolden_mean = new TH2F( "h_ele_PinVsPoutGolden_mean", "ele track inner p vs outer p vs eta, golden, mean of GSF components" ,nbinp2D,0.,pmax,50,0.,pmax);
696  h_ele_PinVsPoutShowering_mean = new TH2F( "h_ele_PinVsPoutShowering_mean", "ele track inner p vs outer p vs eta, showering, mean of GSF components" ,nbinp2D,0.,pmax,50,0.,pmax);
697  h_ele_PtinVsPtoutGolden_mode = new TH2F( "h_ele_PtinVsPtoutGolden_mode", "ele track inner pt vs outer pt vs eta, golden, mode of GSF components" ,nbinpt2D,0.,ptmax,50,0.,ptmax);
698  h_ele_PtinVsPtoutShowering_mode = new TH2F( "h_ele_PtinVsPtoutShowering_mode", "ele track inner pt vs outer pt vs eta, showering, mode of GSF components" ,nbinpt2D,0.,ptmax,50,0.,ptmax);
699  h_ele_PtinVsPtoutGolden_mean = new TH2F( "h_ele_PtinVsPtoutGolden_mean", "ele track inner pt vs outer pt vs eta, golden, mean of GSF components" ,nbinpt2D,0.,ptmax,50,0.,ptmax);
700  h_ele_PtinVsPtoutShowering_mean = new TH2F( "h_ele_PtinVsPtoutShowering_mean", "ele track inner pt vs outer pt vs eta, showering, mean of GSF components" ,nbinpt2D,0.,ptmax,50,0.,ptmax);
701  histSclEoEtrueGolden_barrel = new TH1F("h_scl_EoEtrue_golden_barrel","ele supercluster energy / gen energy, golden, barrel",nbinpoptrue,poptruemin,poptruemax);
703  histSclEoEtrueGolden_endcaps = new TH1F("h_scl_EoEtrue_golden_endcaps","ele supercluster energy / gen energy, golden, endcaps",nbinpoptrue,poptruemin,poptruemax);
705  histSclEoEtrueShowering_barrel = new TH1F("h_scl_EoEtrue_showering_barrel","ele supercluster energy / gen energy, showering, barrel",nbinpoptrue,poptruemin,poptruemax);
707  histSclEoEtrueShowering_endcaps = new TH1F("h_scl_EoEtrue_showering_endcaps","ele supercluster energy / gen energy, showering, endcaps",nbinpoptrue,poptruemin,poptruemax);
709 
710  // isolation
711  h_ele_tkSumPt_dr03 = new TH1F("h_ele_tkSumPt_dr03","tk isolation sum, dR=0.3",100,0.0,20.);
712  h_ele_tkSumPt_dr03->Sumw2();
713  h_ele_ecalRecHitSumEt_dr03= new TH1F("h_ele_ecalRecHitSumEt_dr03","ecal isolation sum, dR=0.3",100,0.0,20.);
715  h_ele_hcalDepth1TowerSumEt_dr03= new TH1F("h_ele_hcalDepth1TowerSumEt_dr03","hcal depth1 isolation sum, dR=0.3",100,0.0,20.);
717  h_ele_hcalDepth2TowerSumEt_dr03= new TH1F("h_ele_hcalDepth2TowerSumEt_dr03","hcal depth2 isolation sum, dR=0.3",100,0.0,20.);
719  h_ele_tkSumPt_dr04= new TH1F("h_ele_tkSumPt_dr04","tk isolation sum, dR=0.4",100,0.0,20.);
720  h_ele_tkSumPt_dr04->Sumw2();
721  h_ele_ecalRecHitSumEt_dr04= new TH1F("h_ele_ecalRecHitSumEt_dr04","ecal isolation sum, dR=0.4",100,0.0,20.);
723  h_ele_hcalDepth1TowerSumEt_dr04= new TH1F("h_ele_hcalDepth1TowerSumEt_dr04","hcal depth1 isolation sum, dR=0.4",100,0.0,20.);
725  h_ele_hcalDepth2TowerSumEt_dr04= new TH1F("h_ele_hcalDepth2TowerSumEt_dr04","hcal depth2 isolation sum, dR=0.4",100,0.0,20.);
727 
728  // fbrem
729  h_ele_fbrem = new TH1F( "h_ele_fbrem","ele brem fraction, mode of GSF components",100,0.,1.);
730  h_ele_fbrem->Sumw2();
731  h_ele_fbrem_eg = new TH1F( "h_ele_fbrem_eg","ele brem fraction, mode of GSF components, ecal driven",100,0.,1.);
732  h_ele_fbrem_eg->Sumw2();
733  h_ele_fbremVsEta_mode = new TProfile( "h_ele_fbremvsEtamode","mean ele brem fraction vs eta, mode of GSF components",nbineta2D,etamin,etamax,0.,1.);
734  h_ele_fbremVsEta_mean = new TProfile( "h_ele_fbremvsEtamean","mean ele brem fraction vs eta, mean of GSF components",nbineta2D,etamin,etamax,0.,1.);
735 
736  // e/g et pflow electrons
737  h_ele_mva = new TH1F( "h_ele_mva","ele identification mva",100,-1.,1.);
738  h_ele_mva->Sumw2();
739  h_ele_mva_eg = new TH1F( "h_ele_mva_eg","ele identification mva, ecal driven",100,-1.,1.);
740  h_ele_mva_eg->Sumw2();
741  h_ele_provenance = new TH1F( "h_ele_provenance","ele provenance",5,-2.,3.);
742  h_ele_provenance->Sumw2();
743 
744  // histos titles
745  h_mcNum -> GetXaxis()-> SetTitle("N_{gen}");
746  h_mcNum -> GetYaxis()-> SetTitle("Events");
747  h_eleNum -> GetXaxis()-> SetTitle("# gen ele");
748  h_eleNum -> GetYaxis()-> SetTitle("Events");
749  h_gamNum -> GetXaxis()-> SetTitle("N_{gen #gamma}");
750  h_gamNum -> GetYaxis()-> SetTitle("Events");
751  h_simEta -> GetXaxis()-> SetTitle("#eta");
752  h_simEta -> GetYaxis()-> SetTitle("Events");
753  h_simP -> GetXaxis()-> SetTitle("p (GeV/c)");
754  h_simP -> GetYaxis()-> SetTitle("Events");
755  h_ele_foundHits -> GetXaxis()-> SetTitle("N_{hits}");
756  h_ele_foundHits -> GetYaxis()-> SetTitle("Events");
757  h_ele_foundHits_barrel -> GetXaxis()-> SetTitle("N_{hits}");
758  h_ele_foundHits_barrel -> GetYaxis()-> SetTitle("Events");
759  h_ele_foundHits_endcaps -> GetXaxis()-> SetTitle("N_{hits}");
760  h_ele_foundHits_endcaps -> GetYaxis()-> SetTitle("Events");
761  h_ele_ambiguousTracks -> GetXaxis()-> SetTitle("N_{ambiguous tracks}");
762  h_ele_ambiguousTracks -> GetYaxis()-> SetTitle("Events");
763  h_ele_lostHits -> GetXaxis()-> SetTitle("N_{lost hits}");
764  h_ele_lostHits -> GetYaxis()-> SetTitle("Events");
765  h_ele_lostHits_barrel -> GetXaxis()-> SetTitle("N_{lost hits}");
766  h_ele_lostHits_barrel -> GetYaxis()-> SetTitle("Events");
767  h_ele_lostHits_endcaps -> GetXaxis()-> SetTitle("N_{lost hits}");
768  h_ele_lostHits_endcaps -> GetYaxis()-> SetTitle("Events");
769  h_ele_chi2 -> GetXaxis()-> SetTitle("#Chi^{2}");
770  h_ele_chi2 -> GetYaxis()-> SetTitle("Events");
771  h_ele_chi2_barrel -> GetXaxis()-> SetTitle("#Chi^{2}");
772  h_ele_chi2_barrel -> GetYaxis()-> SetTitle("Events");
773  h_ele_chi2_endcaps -> GetXaxis()-> SetTitle("#Chi^{2}");
774  h_ele_chi2_endcaps -> GetYaxis()-> SetTitle("Events");
775  h_ele_charge -> GetXaxis()-> SetTitle("charge");
776  h_ele_charge -> GetYaxis()-> SetTitle("Events");
777  h_ele_vertexP -> GetXaxis()-> SetTitle("p_{vertex} (GeV/c)");
778  h_ele_vertexP -> GetYaxis()-> SetTitle("Events");
779  h_ele_vertexPt -> GetXaxis()-> SetTitle("p_{T vertex} (GeV/c)");
780  h_ele_vertexPt -> GetYaxis()-> SetTitle("Events");
781  h_ele_Et -> GetXaxis()-> SetTitle("E_{T} (GeV)");
782  h_ele_Et -> GetYaxis()-> SetTitle("Events");
783  h_ele_Et_all -> GetXaxis()-> SetTitle("E_{T} (GeV)");
784  h_ele_Et_all -> GetYaxis()-> SetTitle("Events");
785  h_ele_vertexEta -> GetXaxis()-> SetTitle("#eta");
786  h_ele_vertexEta -> GetYaxis()-> SetTitle("Events");
787  h_ele_vertexPhi -> GetXaxis()-> SetTitle("#phi (rad)");
788  h_ele_vertexPhi -> GetYaxis()-> SetTitle("Events");
789  h_ele_PoPtrue -> GetXaxis()-> SetTitle("P/P_{gen}");
790  h_ele_PoPtrue -> GetYaxis()-> SetTitle("Events");
791  h_ele_PoPtrue_barrel -> GetXaxis()-> SetTitle("P/P_{gen}");
792  h_ele_PoPtrue_barrel -> GetYaxis()-> SetTitle("Events");
793  h_ele_PoPtrue_endcaps -> GetXaxis()-> SetTitle("P/P_{gen}");
794  h_ele_PoPtrue_endcaps -> GetYaxis()-> SetTitle("Events");
795  h_ele_PoPtrue_golden_barrel -> GetXaxis()-> SetTitle("P/P_{gen}");
796  h_ele_PoPtrue_golden_barrel -> GetYaxis()-> SetTitle("Events");
797  h_ele_PoPtrue_showering_barrel -> GetXaxis()-> SetTitle("P/P_{gen}");
798  h_ele_PoPtrue_showering_barrel -> GetYaxis()-> SetTitle("Events");
799  h_ele_PoPtrue_golden_endcaps -> GetXaxis()-> SetTitle("P/P_{gen}");
800  h_ele_PoPtrue_golden_endcaps -> GetYaxis()-> SetTitle("Events");
801  h_ele_PoPtrue_showering_endcaps -> GetXaxis()-> SetTitle("P/P_{gen}");
802  h_ele_PoPtrue_showering_endcaps -> GetYaxis()-> SetTitle("Events");
803  h_ele_PtoPttrue -> GetXaxis()-> SetTitle("P_{T}/P_{T}^{gen}");
804  h_ele_PtoPttrue -> GetYaxis()-> SetTitle("Events");
805  h_ele_PtoPttrue_barrel -> GetXaxis()-> SetTitle("P_{T}/P_{T}^{gen}");
806  h_ele_PtoPttrue_barrel -> GetYaxis()-> SetTitle("Events");
807  h_ele_PtoPttrue_endcaps -> GetXaxis()-> SetTitle("P_{T}/P_{T}^{gen}");
808  h_ele_PtoPttrue_endcaps -> GetYaxis()-> SetTitle("Events");
809  histSclEoEtrue_barrel -> GetXaxis()-> SetTitle("E/E_{gen}") ;
810  histSclEoEtrue_barrel -> GetYaxis()-> SetTitle("Events") ;
811  histSclEoEtrue_endcaps -> GetXaxis()-> SetTitle("E/E_{gen}") ;
812  histSclEoEtrue_endcaps -> GetYaxis()-> SetTitle("Events") ;
813  histSclEoEtrueGolden_barrel -> GetXaxis()-> SetTitle("E/E_{gen}") ;
814  histSclEoEtrueGolden_barrel -> GetYaxis()-> SetTitle("Events") ;
815  histSclEoEtrueShowering_barrel -> GetXaxis()-> SetTitle("E/E_{gen}") ;
816  histSclEoEtrueShowering_barrel -> GetYaxis()-> SetTitle("Events") ;
817  histSclEoEtrueGolden_endcaps -> GetXaxis()-> SetTitle("E/E_{gen}") ;
818  histSclEoEtrueGolden_endcaps -> GetYaxis()-> SetTitle("Events") ;
819  histSclEoEtrueShowering_endcaps -> GetXaxis()-> SetTitle("E/E_{gen}") ;
820  histSclEoEtrueShowering_endcaps -> GetYaxis()-> SetTitle("Events") ;
821  histSclEoEtrue_barrel_etagap -> GetXaxis()-> SetTitle("E/E_{gen}");
822  histSclEoEtrue_barrel_etagap -> GetYaxis()-> SetTitle("Events");
823  histSclEoEtrue_barrel_phigap -> GetXaxis()-> SetTitle("E/E_{gen}");
824  histSclEoEtrue_barrel_phigap -> GetYaxis()-> SetTitle("Events");
825  histSclEoEtrue_ebeegap -> GetXaxis()-> SetTitle("E/E_{gen}");
826  histSclEoEtrue_ebeegap -> GetYaxis()-> SetTitle("Events");
827  histSclEoEtrue_endcaps_deegap -> GetXaxis()-> SetTitle("E/E_{gen}");
828  histSclEoEtrue_endcaps_deegap -> GetYaxis()-> SetTitle("Events");
829  histSclEoEtrue_endcaps_ringgap -> GetXaxis()-> SetTitle("E/E_{gen}");
830  histSclEoEtrue_endcaps_ringgap -> GetYaxis()-> SetTitle("Events");
831  histSclEoEtrue_barrel_new -> GetXaxis()-> SetTitle("E/E_{gen}") ;
832  histSclEoEtrue_barrel_new -> GetYaxis()-> SetTitle("Events") ;
833  histSclEoEtrue_endcaps_new -> GetXaxis()-> SetTitle("E/E_{gen}") ;
834  histSclEoEtrue_endcaps_new -> GetYaxis()-> SetTitle("Events") ;
835  histSclEoEtrue_barrel_etagap_new -> GetXaxis()-> SetTitle("E/E_{gen}");
836  histSclEoEtrue_barrel_etagap_new -> GetYaxis()-> SetTitle("Events");
837  histSclEoEtrue_barrel_phigap_new -> GetXaxis()-> SetTitle("E/E_{gen}");
838  histSclEoEtrue_barrel_phigap_new -> GetYaxis()-> SetTitle("Events");
839  histSclEoEtrue_ebeegap_new -> GetXaxis()-> SetTitle("E/E_{gen}");
840  histSclEoEtrue_ebeegap_new -> GetYaxis()-> SetTitle("Events");
841  histSclEoEtrue_endcaps_deegap_new -> GetXaxis()-> SetTitle("E/E_{gen}");
842  histSclEoEtrue_endcaps_deegap_new -> GetYaxis()-> SetTitle("Events");
843  histSclEoEtrue_endcaps_ringgap_new -> GetXaxis()-> SetTitle("E/E_{gen}");
844  histSclEoEtrue_endcaps_ringgap_new -> GetYaxis()-> SetTitle("Events");
845  histSclSigEtaEta_-> GetXaxis()-> SetTitle("#sigma_{#eta #eta}") ;
846  histSclSigEtaEta_-> GetYaxis()-> SetTitle("Events") ;
847  histSclSigEtaEta_barrel_-> GetXaxis()-> SetTitle("#sigma_{#eta #eta}") ;
848  histSclSigEtaEta_barrel_-> GetYaxis()-> SetTitle("Events") ;
849  histSclSigEtaEta_endcaps_-> GetXaxis()-> SetTitle("#sigma_{#eta #eta}") ;
850  histSclSigEtaEta_endcaps_-> GetYaxis()-> SetTitle("Events") ;
851  histSclSigIEtaIEta_-> GetXaxis()-> SetTitle("#sigma_{i#eta i#eta}") ;
852  histSclSigIEtaIEta_-> GetYaxis()-> SetTitle("Events") ;
853  histSclSigIEtaIEta_barrel_-> GetXaxis()-> SetTitle("#sigma_{i#eta i#eta}") ;
854  histSclSigIEtaIEta_barrel_-> GetYaxis()-> SetTitle("Events") ;
855  histSclSigIEtaIEta_endcaps_-> GetXaxis()-> SetTitle("#sigma_{i#eta i#eta}") ;
856  histSclSigIEtaIEta_endcaps_-> GetYaxis()-> SetTitle("Events") ;
857  histSclE1x5_-> GetXaxis()-> SetTitle("E1x5 (GeV)") ;
858  histSclE1x5_-> GetYaxis()-> SetTitle("Events") ;
859  histSclE1x5_barrel_-> GetXaxis()-> SetTitle("E1x5 (GeV)") ;
860  histSclE1x5_barrel_-> GetYaxis()-> SetTitle("Events") ;
861  histSclE1x5_endcaps_-> GetXaxis()-> SetTitle("E1x5 (GeV)") ;
862  histSclE1x5_endcaps_-> GetYaxis()-> SetTitle("Events") ;
863  histSclE2x5max_-> GetXaxis()-> SetTitle("E2x5 (GeV)") ;
864  histSclE2x5max_-> GetYaxis()-> SetTitle("Events") ;
865  histSclE2x5max_barrel_-> GetXaxis()-> SetTitle("E2x5 (GeV)") ;
866  histSclE2x5max_barrel_-> GetYaxis()-> SetTitle("Events") ;
867  histSclE2x5max_endcaps_-> GetXaxis()-> SetTitle("E2x5 (GeV)") ;
868  histSclE2x5max_endcaps_-> GetYaxis()-> SetTitle("Events") ;
869  histSclE5x5_-> GetXaxis()-> SetTitle("E5x5 (GeV)") ;
870  histSclE5x5_-> GetYaxis()-> SetTitle("Events") ;
871  histSclE5x5_barrel_-> GetXaxis()-> SetTitle("E5x5 (GeV)") ;
872  histSclE5x5_barrel_-> GetYaxis()-> SetTitle("Events") ;
873  histSclE5x5_endcaps_-> GetXaxis()-> SetTitle("E5x5 (GeV)") ;
874  histSclE5x5_endcaps_-> GetYaxis()-> SetTitle("Events") ;
875  histSclEoEtruePfVsEg->GetXaxis()->SetTitle("E/E_{gen} (e/g)") ;
876  histSclEoEtruePfVsEg->GetYaxis()->SetTitle("E/E_{gen} (pflow)") ;
877  h_ele_ChargeMnChargeTrue -> GetXaxis()-> SetTitle("q_{rec} - q_{gen}");
878  h_ele_ChargeMnChargeTrue -> GetYaxis()-> SetTitle("Events");
879  h_ele_EtaMnEtaTrue -> GetXaxis()-> SetTitle("#eta_{rec} - #eta_{gen}");
880  h_ele_EtaMnEtaTrue -> GetYaxis()-> SetTitle("Events");
881  h_ele_EtaMnEtaTrue_barrel -> GetXaxis()-> SetTitle("#eta_{rec} - #eta_{gen}");
882  h_ele_EtaMnEtaTrue_barrel -> GetYaxis()-> SetTitle("Events");
883  h_ele_EtaMnEtaTrue_endcaps -> GetXaxis()-> SetTitle("#eta_{rec} - #eta_{gen}");
884  h_ele_EtaMnEtaTrue_endcaps -> GetYaxis()-> SetTitle("Events");
885  h_ele_PhiMnPhiTrue -> GetXaxis()-> SetTitle("#phi_{rec} - #phi_{gen} (rad)");
886  h_ele_PhiMnPhiTrue -> GetYaxis()-> SetTitle("Events");
887  h_ele_PhiMnPhiTrue_barrel -> GetXaxis()-> SetTitle("#phi_{rec} - #phi_{gen} (rad)");
888  h_ele_PhiMnPhiTrue_barrel -> GetYaxis()-> SetTitle("Events");
889  h_ele_PhiMnPhiTrue_endcaps -> GetXaxis()-> SetTitle("#phi_{rec} - #phi_{gen} (rad)");
890  h_ele_PhiMnPhiTrue_endcaps -> GetYaxis()-> SetTitle("Events");
891  h_ele_PinMnPout -> GetXaxis()-> SetTitle("P_{vertex} - P_{out} (GeV/c)");
892  h_ele_PinMnPout -> GetYaxis()-> SetTitle("Events");
893  h_ele_PinMnPout_mode -> GetXaxis()-> SetTitle("P_{vertex} - P_{out}, mode of GSF components (GeV/c)");
894  h_ele_PinMnPout_mode -> GetYaxis()-> SetTitle("Events");
895  h_ele_outerP -> GetXaxis()-> SetTitle("P_{out} (GeV/c)");
896  h_ele_outerP -> GetYaxis()-> SetTitle("Events");
897  h_ele_outerP_mode -> GetXaxis()-> SetTitle("P_{out} (GeV/c)");
898  h_ele_outerP_mode -> GetYaxis()-> SetTitle("Events");
899  h_ele_outerPt -> GetXaxis()-> SetTitle("P_{T out} (GeV/c)");
900  h_ele_outerPt -> GetYaxis()-> SetTitle("Events");
901  h_ele_outerPt_mode -> GetXaxis()-> SetTitle("P_{T out} (GeV/c)");
902  h_ele_outerPt_mode -> GetYaxis()-> SetTitle("Events");
903  h_ele_EoP -> GetXaxis()-> SetTitle("E/P_{vertex}");
904  h_ele_EoP -> GetYaxis()-> SetTitle("Events");
905  h_ele_EseedOP -> GetXaxis()-> SetTitle("E_{seed}/P_{vertex}");
906  h_ele_EseedOP -> GetYaxis()-> SetTitle("Events");
907  h_ele_EoPout -> GetXaxis()-> SetTitle("E_{seed}/P_{out}");
908  h_ele_EoPout -> GetYaxis()-> SetTitle("Events");
909  h_ele_EeleOPout -> GetXaxis()-> SetTitle("E_{ele}/P_{out}");
910  h_ele_EeleOPout -> GetYaxis()-> SetTitle("Events");
911  h_ele_EoP_barrel -> GetXaxis()-> SetTitle("E/P_{vertex}");
912  h_ele_EoP_barrel -> GetYaxis()-> SetTitle("Events");
913  h_ele_EseedOP_barrel -> GetXaxis()-> SetTitle("E_{seed}/P_{vertex}");
914  h_ele_EseedOP_barrel -> GetYaxis()-> SetTitle("Events");