From e672deb85aa0758897c84f94940fd89710e25c90 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 30 Nov 2022 11:35:14 +0100 Subject: [PATCH 1/3] FakeHistos V1 : plugins part --- .../plugins/ElectronMcFakePostValidator.cc | 27 +- .../plugins/ElectronMcFakeValidator.cc | 489 +++++++++++------- .../plugins/ElectronMcFakeValidator.h | 47 +- 3 files changed, 338 insertions(+), 225 deletions(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc index 16720a00444c8..1070019f95d01 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc @@ -22,17 +22,22 @@ void ElectronMcFakePostValidator::finalize(DQMStore::IBooker& iBooker, DQMStore: setBookStatOverflowFlag(set_StatOverflowFlag); edm::LogInfo("ElectronMcFakePostValidator::finalize") << "efficiency calculation "; - bookH1andDivide( - iBooker, iGetter, "etaEff", "matchingObjectEta_matched", "matchingObject_eta", "#eta", "Efficiency", ""); - bookH1andDivide(iBooker, iGetter, "zEff", "matchingObjectZ_matched", "matchingObject_z", "z (cm)", "Efficiency", ""); - bookH1andDivide(iBooker, + bookH1andDivide(iBooker, + iGetter, + "etaEff_Extended", + "matchingObjectEta_Extended_matched", + "matchingObject_eta_Extended", + "#eta", + "Efficiency", ""); + bookH1andDivide(iBooker, iGetter, - "absetaEff", - "matchingObjectAbsEta_matched", - "matchingObject_abseta", + "absetaEff_Extended", + "matchingObjectAbsEta_Extended_matched", + "matchingObject_abseta_Extended", "|#eta|", "Efficiency", ""); + bookH1andDivide(iBooker, iGetter, "zEff", "matchingObjectZ_matched", "matchingObject_z", "z (cm)", "Efficiency", ""); bookH1andDivide( iBooker, iGetter, "ptEff", "matchingObjectPt_matched", "matchingObject_Pt", "p_{T} (GeV/c)", "Efficiency", ""); bookH1andDivide( @@ -102,6 +107,10 @@ void ElectronMcFakePostValidator::finalize(DQMStore::IBooker& iBooker, DQMStore: if (h1_ele_provenance_endcaps->getBinContent(3) > 0) { h1_ele_provenance_endcaps->getTH1F()->Scale(1. / h1_ele_provenance_endcaps->getBinContent(3)); } + MonitorElement* h1_ele_provenance_Extended = get(iGetter, "provenance_Extended"); + if (h1_ele_provenance_Extended->getBinContent(3) > 0) { + h1_ele_provenance_Extended->getTH1F()->Scale(1. / h1_ele_provenance_Extended->getBinContent(3)); + } // profiles from 2D histos profileX(iBooker, iGetter, "PoPmatchingObjectVsEta", "", "#eta", "

"); @@ -112,7 +121,7 @@ void ElectronMcFakePostValidator::finalize(DQMStore::IBooker& iBooker, DQMStore: profileX(iBooker, iGetter, "PhiMnPhimatchingObjectVsPhi", "", "#phi (rad)", ""); profileX(iBooker, iGetter, "vertexPtVsEta", "mean ele transverse momentum vs eta", "#eta", " (GeV/c)"); profileX(iBooker, iGetter, "vertexPtVsPhi", "mean ele transverse momentum vs phi", "#phi (rad)", " (GeV/c)"); - profileX(iBooker, iGetter, "EoPVsEta", "mean ele E/p vs eta", "#eta", ""); + profileX(iBooker, iGetter, "EoPVsEta_Extended", "mean ele E/p vs eta", "#eta", ""); profileX(iBooker, iGetter, "EoPVsPhi", "mean ele E/p vs phi", "#phi (rad)", ""); profileX(iBooker, iGetter, "EoPoutVsEta", "mean ele E/pout vs eta", "#eta", ""); profileX(iBooker, iGetter, "EoPoutVsPhi", "mean ele E/pout vs phi", "#phi (rad)", ""); @@ -122,7 +131,7 @@ void ElectronMcFakePostValidator::finalize(DQMStore::IBooker& iBooker, DQMStore: profileX(iBooker, iGetter, "HoEVsPhi", "mean ele H/E vs phi", "#phi (rad)", ""); profileX(iBooker, iGetter, "chi2VsEta", "mean ele track chi2 vs eta", "#eta", "<#Chi^{2}>"); profileX(iBooker, iGetter, "chi2VsPhi", "mean ele track chi2 vs phi", "#phi (rad)", "<#Chi^{2}>"); - profileX(iBooker, iGetter, "foundHitsVsEta", "mean ele track # found hits vs eta", "#eta", ""); + profileX(iBooker, iGetter, "foundHitsVsEta_Extended", "mean ele track # found hits vs eta", "#eta", ""); profileX(iBooker, iGetter, "foundHitsVsPhi", "mean ele track # found hits vs phi", "#phi (rad)", ""); profileX(iBooker, iGetter, "lostHitsVsEta", "mean ele track # lost hits vs eta", "#eta", ""); profileX(iBooker, iGetter, "lostHitsVsPhi", "mean ele track # lost hits vs phi", "#phi (rad)", ""); diff --git a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc index 5c32d162d6ae5..ffaeb627889f7 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc @@ -74,6 +74,7 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) maxPt_ = conf.getParameter("MaxPt"); maxAbsEta_ = conf.getParameter("MaxAbsEta"); + maxAbsEtaExtended_ = conf.getParameter("MaxAbsEtaExtended"); deltaR2_ = conf.getParameter("DeltaR") * conf.getParameter("DeltaR"); inputFile_ = conf.getParameter("InputFile"); outputFile_ = conf.getParameter("OutputFile"); @@ -111,6 +112,11 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) eta_min = histosSet.getParameter("Etamin"); eta_max = histosSet.getParameter("Etamax"); + eta_nbin_extended = histosSet.getParameter("NbinetaExtended"); + eta2D_nbin_extended = histosSet.getParameter("Nbineta2DExtended"); + eta_min_extended = histosSet.getParameter("EtaminExtended"); + eta_max_extended = histosSet.getParameter("EtamaxExtended"); + deta_nbin = histosSet.getParameter("Nbindeta"); deta_min = histosSet.getParameter("Detamin"); deta_max = histosSet.getParameter("Detamax"); @@ -178,7 +184,9 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_recOfflineVertices_ = nullptr; h1_matchingObjectEta = nullptr; + h1_matchingObjectEta_Extended = nullptr; h1_matchingObjectAbsEta = nullptr; + h1_matchingObjectAbsEta_Extended = nullptr; h1_matchingObjectP = nullptr; h1_matchingObjectPt = nullptr; h1_matchingObjectPhi = nullptr; @@ -203,7 +211,9 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h2_ele_E2mnE1vsMee_egeg_all = nullptr; h1_ele_matchingObjectEta_matched = nullptr; + h1_ele_matchingObjectEta_Extended_matched = nullptr; h1_ele_matchingObjectAbsEta_matched = nullptr; + h1_ele_matchingObjectAbsEta_Extended_matched = nullptr; h1_ele_matchingObjectPt_matched = nullptr; h1_ele_matchingObjectPhi_matched = nullptr; h1_ele_matchingObjectZ_matched = nullptr; @@ -259,6 +269,7 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_scl_SigIEtaIEta_barrel_ = nullptr; h1_scl_SigIEtaIEta_endcaps_ = nullptr; h1_scl_full5x5_sigmaIetaIeta_ = nullptr; + h1_scl_full5x5_sigmaIetaIeta_Extended_ = nullptr; h1_scl_full5x5_sigmaIetaIeta_barrel_ = nullptr; h1_scl_full5x5_sigmaIetaIeta_endcaps_ = nullptr; h1_scl_E1x5_ = nullptr; @@ -278,7 +289,7 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_ele_foundHits = nullptr; h1_ele_foundHits_barrel = nullptr; h1_ele_foundHits_endcaps = nullptr; - h2_ele_foundHitsVsEta = nullptr; + h2_ele_foundHitsVsEta_Extended = nullptr; h2_ele_foundHitsVsPhi = nullptr; h2_ele_foundHitsVsPt = nullptr; h1_ele_lostHits = nullptr; @@ -313,7 +324,7 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_ele_EoP = nullptr; h1_ele_EoP_barrel = nullptr; h1_ele_EoP_endcaps = nullptr; - h2_ele_EoPVsEta = nullptr; + h2_ele_EoPVsEta_Extended = nullptr; h2_ele_EoPVsPhi = nullptr; h2_ele_EoPVsE = nullptr; h1_ele_EseedOP = nullptr; @@ -336,12 +347,14 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h2_ele_EeleOPoutVsE = nullptr; h1_ele_dEtaSc_propVtx = nullptr; + h1_ele_dEtaSc_propVtx_Extended = nullptr; h1_ele_dEtaSc_propVtx_barrel = nullptr; h1_ele_dEtaSc_propVtx_endcaps = nullptr; h2_ele_dEtaScVsEta_propVtx = nullptr; h2_ele_dEtaScVsPhi_propVtx = nullptr; h2_ele_dEtaScVsPt_propVtx = nullptr; h1_ele_dPhiSc_propVtx = nullptr; + h1_ele_dPhiSc_propVtx_Extended = nullptr; h1_ele_dPhiSc_propVtx_barrel = nullptr; h1_ele_dPhiSc_propVtx_endcaps = nullptr; h2_ele_dPhiScVsEta_propVtx = nullptr; @@ -398,6 +411,7 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_ele_eta_shower = nullptr; h1_ele_HoE = nullptr; + h1_ele_HoE_Extended = nullptr; h1_ele_HoE_barrel = nullptr; h1_ele_HoE_endcaps = nullptr; h1_ele_HoE_fiducial = nullptr; @@ -407,6 +421,7 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_scl_ESFrac_endcaps = nullptr; h1_ele_fbrem = nullptr; + h1_ele_fbrem_Extended = nullptr; p1_ele_fbremVsEta_mode = nullptr; p1_ele_fbremVsEta_mean = nullptr; h1_ele_superclusterfbrem = nullptr; @@ -428,6 +443,21 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_ele_mva = nullptr; h1_ele_mva_isolated = nullptr; h1_ele_provenance = nullptr; + h1_ele_provenance_Extended = nullptr; + + h1_ele_chargedHadronRelativeIso = nullptr; + h1_ele_chargedHadronRelativeIso_Extended = nullptr; + h1_ele_chargedHadronRelativeIso_barrel = nullptr; + h1_ele_chargedHadronRelativeIso_endcaps = nullptr; + h1_ele_neutralHadronRelativeIso = nullptr; + h1_ele_neutralHadronRelativeIso_Extended = nullptr; + h1_ele_neutralHadronRelativeIso_barrel = nullptr; + h1_ele_neutralHadronRelativeIso_endcaps = nullptr; + h1_ele_photonRelativeIso = nullptr; + h1_ele_photonRelativeIso_Extended = nullptr; + h1_ele_photonRelativeIso_barrel = nullptr; + h1_ele_photonRelativeIso_endcaps = nullptr; + h1_ele_tkSumPt_dr03 = nullptr; h1_ele_tkSumPt_dr03_barrel = nullptr; @@ -439,16 +469,15 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_ele_hcalTowerSumEt_dr03_depth1_barrel = nullptr; h1_ele_hcalTowerSumEt_dr03_depth1_endcaps = nullptr; h1_ele_hcalTowerSumEt_dr03_depth2 = nullptr; - h1_ele_tkSumPt_dr04 = nullptr; - h1_ele_tkSumPt_dr04_barrel = nullptr; - h1_ele_tkSumPt_dr04_endcaps = nullptr; - h1_ele_ecalRecHitSumEt_dr04 = nullptr; - h1_ele_ecalRecHitSumEt_dr04_barrel = nullptr; - h1_ele_ecalRecHitSumEt_dr04_endcaps = nullptr; - h1_ele_hcalTowerSumEt_dr04_depth1 = nullptr; - h1_ele_hcalTowerSumEt_dr04_depth1_barrel = nullptr; - h1_ele_hcalTowerSumEt_dr04_depth1_endcaps = nullptr; - h1_ele_hcalTowerSumEt_dr04_depth2 = nullptr; + + h1_ele_ecalPFClusterIso = nullptr; + h1_ele_hcalPFClusterIso = nullptr; + h1_ele_ecalPFClusterIso_Extended = nullptr; + h1_ele_hcalPFClusterIso_Extended = nullptr; + h1_ele_ecalPFClusterIso_barrel = nullptr; + h1_ele_hcalPFClusterIso_barrel = nullptr; + h1_ele_ecalPFClusterIso_endcaps = nullptr; + h1_ele_hcalPFClusterIso_endcaps = nullptr; h1_ele_convFlags = nullptr; h1_ele_convFlags_all = nullptr; @@ -486,8 +515,12 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru // mc h1_matchingObjectEta = bookH1withSumw2(iBooker, "matchingObject_eta", matchingObjectType + " #eta", eta_nbin, eta_min, eta_max, "#eta"); + h1_matchingObjectEta_Extended = + bookH1withSumw2(iBooker, "matchingObject_eta_Extended", matchingObjectType + " #eta", eta_nbin_extended, eta_min_extended, eta_max_extended, "#eta"); h1_matchingObjectAbsEta = bookH1withSumw2(iBooker, "matchingObject_abseta", matchingObjectType + " |#eta|", eta_nbin / 2, 0., eta_max); + h1_matchingObjectAbsEta_Extended = + bookH1withSumw2(iBooker, "matchingObject_abseta_Extended", matchingObjectType + " |#eta|", eta_nbin_extended / 2, 0., eta_max_extended); h1_matchingObjectP = bookH1withSumw2(iBooker, "matchingObject_P", matchingObjectType + " p", p_nbin, 0., p_max, "p (GeV/c)"); h1_matchingObjectPt = @@ -646,8 +679,12 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru htitle = "Efficiency vs matching " + matchingObjectType + " "; h1_ele_matchingObjectEta_matched = bookH1withSumw2(iBooker, "matchingObjectEta_matched", htitle + "#eta", eta_nbin, eta_min, eta_max); + h1_ele_matchingObjectEta_Extended_matched = + bookH1withSumw2(iBooker, "matchingObjectEta_Extended_matched", htitle + "#eta", eta_nbin_extended, eta_min_extended, eta_max_extended); h1_ele_matchingObjectAbsEta_matched = bookH1withSumw2(iBooker, "matchingObjectAbsEta_matched", htitle + "|#eta|", eta_nbin / 2, 0., eta_max); + h1_ele_matchingObjectAbsEta_Extended_matched = + bookH1withSumw2(iBooker, "matchingObjectAbsEta_Extended_matched", htitle + "|#eta|", eta_nbin_extended / 2, 0., eta_max_extended); h1_ele_matchingObjectPt_matched = bookH1(iBooker, "matchingObjectPt_matched", htitle + "p_{T}", pteff_nbin, 5., pt_max); h1_ele_matchingObjectPhi_matched = @@ -888,6 +925,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "#sigma_{i#eta i#eta}", "Events", "ELE_LOGY E1 P"); + h1_scl_full5x5_sigmaIetaIeta_Extended_ = bookH1withSumw2(iBooker, + "full5x5_sigietaieta_Extended", + "ele supercluster full5x5 sigma ieta ieta, 2.5<|eta|<3", + 100, + 0., + 0.05, + "#sigma_{i#eta i#eta}", + "Events", + "ELE_LOGY E1 P"); h1_scl_full5x5_sigmaIetaIeta_barrel_ = bookH1withSumw2(iBooker, "full5x5_sigietaieta_barrel", "ele supercluster full5x5 sigma ieta ieta, barrel", @@ -995,12 +1041,12 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru bookH2(iBooker, "ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", pt2D_nbin, 0., pt_max, 5, 0., 5.); h1_ele_foundHits = bookH1withSumw2(iBooker, "foundHits", "ele track # found hits", fhits_nbin, 0., fhits_max, "N_{hits}"); - h2_ele_foundHitsVsEta = bookH2(iBooker, - "foundHitsVsEta", + h2_ele_foundHitsVsEta_Extended = bookH2(iBooker, + "foundHitsVsEta_Extended", "ele track # found hits vs eta", - eta2D_nbin, - eta_min, - eta_max, + eta2D_nbin_extended, + eta_min_extended, + eta_max_extended, fhits_nbin, 0., fhits_max); @@ -1152,8 +1198,8 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "E/P_{vertex}", "Events", "ELE_LOGY E1 P"); - h2_ele_EoPVsEta = - bookH2(iBooker, "EoPVsEta", "ele E/P_{vertex} vs eta", eta2D_nbin, eta_min, eta_max, eop2D_nbin, 0., eopmaxsht); + h2_ele_EoPVsEta_Extended = + bookH2(iBooker, "EoPVsEta_Extended", "ele E/P_{vertex} vs eta", eta2D_nbin_extended, eta_min_extended, eta_max_extended, eop2D_nbin, 0., eopmaxsht); h2_ele_EoPVsPhi = bookH2(iBooker, "EoPVsPhi", "ele E/P_{vertex} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht); h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE", "ele E/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.); @@ -1264,6 +1310,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "#eta_{sc} - #eta_{tr}", "Events", "ELE_LOGY E1 P"); + h1_ele_dEtaSc_propVtx_Extended = bookH1withSumw2(iBooker, + "dEtaSc_propVtx_Extended", + "ele #eta_{sc} - #eta_{tr}, prop from vertex, 2.5<|eta|<3", + detamatch_nbin, + detamatch_min, + detamatch_max, + "#eta_{sc} - #eta_{tr}", + "Events", + "ELE_LOGY E1 P"); h1_ele_dEtaSc_propVtx_barrel = bookH1withSumw2(iBooker, "dEtaSc_propVtx_barrel", "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel", @@ -1318,6 +1373,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "#phi_{sc} - #phi_{tr} (rad)", "Events", "ELE_LOGY E1 P"); + h1_ele_dPhiSc_propVtx_Extended = bookH1withSumw2(iBooker, + "dPhiSc_propVtx_Extended", + "ele #phi_{sc} - #phi_{tr}, prop from vertex, 2.5<|eta|<3", + dphimatch_nbin, + dphimatch_min, + dphimatch_max, + "#phi_{sc} - #phi_{tr} (rad)", + "Events", + "ELE_LOGY E1 P"); h1_ele_dPhiSc_propVtx_barrel = bookH1withSumw2(iBooker, "dPhiSc_propVtx_barrel", "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel", @@ -1581,6 +1645,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru dphimatch_max); h1_ele_HoE = bookH1withSumw2( iBooker, "HoE", "ele hadronic energy / em energy", hoe_nbin, hoe_min, hoe_max, "H/E", "Events", "ELE_LOGY E1 P"); + h1_ele_HoE_Extended = bookH1withSumw2(iBooker, + "HoE_Extended", + "ele hadronic energy / em energy, 2.5<|eta|<3", + hoe_nbin, + hoe_min, + hoe_max, + "H/E", + "Events", + "ELE_LOGY E1 P"); h1_ele_HoE_barrel = bookH1withSumw2(iBooker, "HoE_barrel", "ele hadronic energy / em energy, barrel", @@ -1967,96 +2040,6 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Hcal2IsoSum, cone 0.3 (GeV)", "Events", "ELE_LOGY E1 P"); - h1_ele_tkSumPt_dr04 = bookH1withSumw2(iBooker, - "tkSumPt_dr04", - "tk isolation sum, dR=0.4", - 100, - 0.0, - 20., - "TkIsoSum, cone 0.4 (GeV/c)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_tkSumPt_dr04_barrel = bookH1withSumw2(iBooker, - "tkSumPt_dr04_barrel", - "tk isolation sum, dR=0.4, barrel", - 100, - 0.0, - 20., - "TkIsoSum, cone 0.4 (GeV/c)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_tkSumPt_dr04_endcaps = bookH1withSumw2(iBooker, - "tkSumPt_dr04_endcaps", - "tk isolation sum, dR=0.4, endcaps", - 100, - 0.0, - 20., - "TkIsoSum, cone 0.4 (GeV/c)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_ecalRecHitSumEt_dr04 = bookH1withSumw2(iBooker, - "ecalRecHitSumEt_dr04", - "ecal isolation sum, dR=0.4", - 100, - 0.0, - 20., - "EcalIsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_ecalRecHitSumEt_dr04_barrel = bookH1withSumw2(iBooker, - "ecalRecHitSumEt_dr04_barrel", - "ecal isolation sum, dR=0.4, barrel", - 100, - 0.0, - 20., - "EcalIsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_ecalRecHitSumEt_dr04_endcaps = bookH1withSumw2(iBooker, - "ecalRecHitSumEt_dr04_endcaps", - "ecal isolation sum, dR=0.4, endcaps", - 100, - 0.0, - 20., - "EcalIsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEt_dr04_depth1 = bookH1withSumw2(iBooker, - "hcalTowerSumEt_dr04_depth1", - "hcal depth1 isolation sum, dR=0.4", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEt_dr04_depth1_barrel = bookH1withSumw2(iBooker, - "hcalTowerSumEt_dr04_depth1_barrel", - "hcal depth1 isolation sum, dR=0.4, barrel", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEt_dr04_depth1_endcaps = bookH1withSumw2(iBooker, - "hcalTowerSumEt_dr04_depth1_endcaps", - "hcal depth1 isolation sum, dR=0.4, endcaps", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEt_dr04_depth2 = bookH1withSumw2(iBooker, - "hcalTowerSumEt_dr04_depth2", - "hcal depth2 isolation sum, dR=0.4", - 100, - 0.0, - 20., - "Hcal2IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); // newHCAL // isolation new hcal @@ -2090,35 +2073,6 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEtBc_dr04_depth1 = bookH1withSumw2(iBooker, - "hcalTowerSumEtBc_dr04_depth1", - "hcal depth1 isolation sum behind cluster, dR=0.4", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel = - bookH1withSumw2(iBooker, - "hcalTowerSumEtBc_dr04_depth1_barrel", - "hcal depth1 isolation sum behind cluster, dR=0.4, barrel", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps = - bookH1withSumw2(iBooker, - "hcalTowerSumEtBc_dr04_depth1_endcaps", - "hcal depth1 isolation sum behind cluster, dR=0.4, endcaps", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); h1_ele_hcalTowerSumEtBc_dr03_depth2 = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth2", @@ -2150,39 +2104,89 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEtBc_dr04_depth2 = bookH1withSumw2(iBooker, - "hcalTowerSumEtBc_dr04_depth2", - "hcal depth2 isolation sum behind cluster, dR=0.4", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel = - bookH1withSumw2(iBooker, - "hcalTowerSumEtBc_dr04_depth2_barrel", - "hcal depth2 isolation sum behind cluster, dR=0.4, barrel", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps = - bookH1withSumw2(iBooker, - "hcalTowerSumEtBc_dr04_depth2_endcaps", - "hcal depth2 isolation sum behind cluster, dR=0.4, endcaps", - 100, - 0.0, - 20., - "Hcal1IsoSum, cone 0.4 (GeV)", - "Events", - "ELE_LOGY E1 P"); + h1_ele_ecalPFClusterIso = bookH1withSumw2(iBooker, + "ecalPFClusterIso", + "ecal PF Cluster Iso", + 100, + 0.0, + 100., + "hcal PF Cluser Iso", + "Events", + "ELE_LOGY E1 P"); + h1_ele_ecalPFClusterIso_barrel = bookH1withSumw2(iBooker, + "ecalPFClusterIso_barrel", + "ecal PF Cluster Iso barrel", + 100, + 0.0, + 100., + "hcal PF Cluser Iso", + "Events", + "ELE_LOGY E1 P"); + h1_ele_ecalPFClusterIso_endcaps = bookH1withSumw2(iBooker, + "ecalPFClusterIso_endcaps", + "ecal PF Cluster Iso endcaps", + 100, + 0.0, + 100., + "hcal PF Cluser Iso", + "Events", + "ELE_LOGY E1 P"); + h1_ele_hcalPFClusterIso = bookH1withSumw2(iBooker, + "hcalPFClusterIso", + "hcal PF Cluster Iso", + 100, + 0.0, + 100., + "hcal PF Cluser Iso", + "Events", + "ELE_LOGY E1 P"); + h1_ele_hcalPFClusterIso_barrel = bookH1withSumw2(iBooker, + "hcalPFClusterIso_barrel", + "hcal PF Cluster Iso barrel", + 100, + 0.0, + 100., + "hcal PF Cluser Iso", + "Events", + "ELE_LOGY E1 P"); + h1_ele_hcalPFClusterIso_endcaps = bookH1withSumw2(iBooker, + "hcalPFClusterIso_endcaps", + "hcal PF Cluster Iso endcaps", + 100, + 0.0, + 100., + "hcal PF Cluser Iso", + "Events", + "ELE_LOGY E1 P"); + h1_ele_ecalPFClusterIso_Extended = bookH1withSumw2(iBooker, + "ecalPFClusterIso_Extended", + "ecal PF Cluster Iso Extended", + 100, + 0.0, + 100., + "hcal PF Cluser Iso Extended, 2.5<|eta|<3", + "Events", + "ELE_LOGY E1 P"); + h1_ele_hcalPFClusterIso_Extended = bookH1withSumw2(iBooker, + "hcalPFClusterIso_Extended", + "hcal PF Cluster Iso Extended", + 100, + 0.0, + 100., + "hcal PF Cluser Iso Extended, 2.5<|eta|<3", + "Events", + "ELE_LOGY E1 P"); // fbrem h1_ele_fbrem = bookH1withSumw2( iBooker, "fbrem", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}"); + h1_ele_fbrem_Extended = bookH1withSumw2(iBooker, + "fbrem_Extended", + "ele brem fraction, mode of GSF components, 2.5<|eta|<3", + 100, + 0., + 1., + "P_{in} - P_{out} / P_{in}"); h1_ele_fbrem_barrel = bookH1withSumw2(iBooker, "fbrem_barrel", "ele brem fraction for barrel, mode of GSF components", @@ -2238,6 +2242,7 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru h1_ele_mva_endcaps_isolated = bookH1withSumw2(iBooker, "mva_isolated_endcaps", "ele identification mva isolated endcaps", 100, -1., 1.); h1_ele_provenance = bookH1withSumw2(iBooker, "provenance", "ele provenance", 5, -2., 3.); + h1_ele_provenance_Extended = bookH1withSumw2(iBooker, "provenance_Extended", "ele provenance_Extended", 5, -2., 3.); h1_ele_provenance_barrel = bookH1withSumw2(iBooker, "provenance_barrel", "ele provenance barrel", 5, -2., 3.); h1_ele_provenance_endcaps = bookH1withSumw2(iBooker, "provenance_endcaps", "ele provenance endcaps", 5, -2., 3.); @@ -2305,6 +2310,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "chargedHadronRelativeIso", "Events", "ELE_LOGY E1 P"); + h1_ele_chargedHadronRelativeIso_Extended = bookH1withSumw2(iBooker, + "chargedHadronRelativeIso_Extended", + "chargedHadronRelativeIso_Extended", + 100, + 0.0, + 2., + "chargedHadronRelativeIso Extended, 2.5<|eta|<3", + "Events", + "ELE_LOGY E1 P"); h1_ele_chargedHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_barrel", "chargedHadronRelativeIso for barrel", @@ -2332,6 +2346,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "neutralHadronRelativeIso", "Events", "ELE_LOGY E1 P"); + h1_ele_neutralHadronRelativeIso_Extended = bookH1withSumw2(iBooker, + "neutralHadronRelativeIso_Extended", + "neutralHadronRelativeIso_Extended", + 100, + 0.0, + 2., + "neutralHadronRelativeIso Extended, 2.5<|eta|<3", + "Events", + "ELE_LOGY E1 P"); h1_ele_neutralHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_barrel", "neutralHadronRelativeIso for barrel", @@ -2352,6 +2375,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "ELE_LOGY E1 P"); h1_ele_photonRelativeIso = bookH1withSumw2( iBooker, "photonRelativeIso", "photonRelativeIso", 100, 0.0, 2., "photonRelativeIso", "Events", "ELE_LOGY E1 P"); + h1_ele_photonRelativeIso_Extended = bookH1withSumw2(iBooker, + "photonRelativeIso_Extended", + "photonRelativeIso_Extended", + 100, + 0.0, + 2., + "photonRelativeIso Extended, 2.5<|eta|<3", + "Events", + "ELE_LOGY E1 P"); h1_ele_photonRelativeIso_barrel = bookH1withSumw2(iBooker, "photonRelativeIso_barrel", "photonRelativeIso for barrel", @@ -2523,22 +2555,30 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event // number of matching objects matchingObjectNum++; - if (moIter->energy() / cosh(moIter->eta()) > maxPt_ || std::abs(moIter->eta()) > maxAbsEta_) { + if (moIter->energy() / cosh(moIter->eta()) > maxPt_ || std::abs(moIter->eta()) > maxAbsEtaExtended_) { continue; } - h1_matchingObjectEta->Fill(moIter->eta()); - h1_matchingObjectAbsEta->Fill(std::abs(moIter->eta())); - h1_matchingObjectP->Fill(moIter->energy()); - h1_matchingObjectPt->Fill(moIter->energy() / cosh(moIter->eta())); - h1_matchingObjectPhi->Fill(moIter->phi()); - h1_matchingObjectZ->Fill(moIter->vz()); + if (std::abs(moIter->eta()) < maxAbsEta_) { + h1_matchingObjectEta->Fill(moIter->eta()); + h1_matchingObjectAbsEta->Fill(std::abs(moIter->eta())); + h1_matchingObjectAbsEta_Extended->Fill(std::abs(moIter->eta())); + h1_matchingObjectP->Fill(moIter->energy()); + h1_matchingObjectPt->Fill(moIter->energy() / cosh(moIter->eta())); + h1_matchingObjectPhi->Fill(moIter->phi()); + h1_matchingObjectZ->Fill(moIter->vz()); + } + if (std::abs(moIter->eta()) < maxAbsEtaExtended_) { + h1_matchingObjectEta_Extended->Fill(moIter->eta()); + h1_matchingObjectAbsEta_Extended->Fill(std::abs(moIter->eta())); + } // looking for the best matching gsf electron bool okGsfFound = false; double gsfOkRatio = 999999.; bool isEBflag = false; bool isEEflag = false; + bool isEEextendedflag = false; // find best matched electron reco::GsfElectron bestGsfElectron; @@ -2560,9 +2600,62 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event } // loop over rec ele to look for the best one // analysis when the matching object is matched by a rec electron + if (okGsfFound) { + //passMiniAODSelection = bestGsfElectron.pt() >= 5.; isEBflag = bestGsfElectron.isEB(); - isEEflag = bestGsfElectron.isEE(); + isEEflag = bestGsfElectron.isEE() && (std::abs(moIter->eta()) < maxAbsEta_); + isEEextendedflag = bestGsfElectron.isEE(); + /*isEBflag = bestGsfElectron.isEB(); + isEEflag = bestGsfElectron.isEE();*/ + + if (isEEextendedflag) { // Extended flag + if (!isEEflag) { + h1_ele_matchingObjectEta_Extended_matched->Fill(moIter->eta()); + h1_ele_matchingObjectAbsEta_matched->Fill(std::abs(moIter->eta())); + h1_ele_matchingObjectAbsEta_Extended_matched->Fill(std::abs(moIter->eta())); + h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP()); + h1_ele_dEtaSc_propVtx_Extended->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + h1_ele_dPhiSc_propVtx_Extended->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx()); + h1_scl_full5x5_sigmaIetaIeta_Extended_->Fill(bestGsfElectron.full5x5_sigmaIetaIeta()); + h1_ele_HoE_Extended->Fill(bestGsfElectron.hadronicOverEm()); + h1_ele_chargedHadronRelativeIso_Extended->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / + bestGsfElectron.pt()); + h1_ele_neutralHadronRelativeIso_Extended->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / + bestGsfElectron.pt()); + h1_ele_photonRelativeIso_Extended->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + h1_ele_ecalPFClusterIso_Extended->Fill(bestGsfElectron.ecalPFClusterIso()); + h1_ele_hcalPFClusterIso_Extended->Fill(bestGsfElectron.hcalPFClusterIso()); + + double fbrem_mode = bestGsfElectron.fbrem(); + h1_ele_fbrem_Extended->Fill(fbrem_mode); + if (!readAOD_) { + if (bestGsfElectron.ecalDrivenSeed()){ + h1_ele_provenance_Extended->Fill(1.); + } + if (bestGsfElectron.trackerDrivenSeed()){ + h1_ele_provenance_Extended->Fill(-1.); + } + if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()){ + h1_ele_provenance_Extended->Fill(0.); + } + if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()){ + h1_ele_provenance_Extended->Fill(-2.); + } + if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()){ + h1_ele_provenance_Extended->Fill(2.); + } + } + } + + if (!readAOD_) { + h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits()); + } + } + + if (!isEBflag && !isEEflag) + continue; + // electron related distributions h1_ele_charge->Fill(bestGsfElectron.charge()); h2_ele_chargeVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.charge()); @@ -2577,7 +2670,9 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h1_ele_matchingObjectPt_matched->Fill(moIter->energy() / cosh(moIter->eta())); h1_ele_matchingObjectPhi_matched->Fill(moIter->phi()); h1_ele_matchingObjectAbsEta_matched->Fill(std::abs(moIter->eta())); + h1_ele_matchingObjectAbsEta_Extended_matched->Fill(std::abs(moIter->eta())); h1_ele_matchingObjectEta_matched->Fill(moIter->eta()); + h1_ele_matchingObjectEta_Extended_matched->Fill(moIter->eta()); h2_ele_vertexEtaVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eta()); h1_ele_vertexPhi->Fill(bestGsfElectron.phi()); h1_ele_vertexX->Fill(bestGsfElectron.vertex().x()); @@ -2657,8 +2752,8 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h2_ele_ambiguousTracksVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.ambiguousGsfTracksSize()); if (!readAOD_) { // track extra does not exist in AOD h1_ele_foundHits->Fill(bestGsfElectron.gsfTrack()->numberOfValidHits()); - h2_ele_foundHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits()); h2_ele_foundHitsVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits()); + h2_ele_foundHitsVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits()); h2_ele_foundHitsVsPt->Fill(bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits()); h1_ele_lostHits->Fill(bestGsfElectron.gsfTrack()->numberOfLostHits()); h2_ele_lostHitsVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfLostHits()); @@ -2733,8 +2828,8 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event } // match distributions h1_ele_EoP->Fill(bestGsfElectron.eSuperClusterOverP()); - h2_ele_EoPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP()); h2_ele_EoPVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eSuperClusterOverP()); + h2_ele_EoPVsEta_Extended->Fill(bestGsfElectron.eta(), bestGsfElectron.eSuperClusterOverP()); h2_ele_EoPVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eSuperClusterOverP()); h1_ele_EseedOP->Fill(bestGsfElectron.eSeedClusterOverP()); h2_ele_EseedOPVsEta->Fill(bestGsfElectron.eta(), bestGsfElectron.eSeedClusterOverP()); @@ -2749,10 +2844,12 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h2_ele_EeleOPoutVsPhi->Fill(bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout()); h2_ele_EeleOPoutVsE->Fill(bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout()); h1_ele_dEtaSc_propVtx->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + //h1_ele_dEtaSc_propVtx_Extended->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); h2_ele_dEtaScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); h1_ele_dPhiSc_propVtx->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx()); + //h1_ele_dPhiSc_propVtx_Extended->Fill(bestGsfElectron.deltaPhiSuperClusterTrackAtVtx()); h2_ele_dPhiScVsEta_propVtx->Fill(bestGsfElectron.eta(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx()); h2_ele_dPhiScVsPhi_propVtx->Fill(bestGsfElectron.phi(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx()); h2_ele_dPhiScVsPt_propVtx->Fill(bestGsfElectron.pt(), bestGsfElectron.deltaPhiSuperClusterTrackAtVtx()); @@ -2885,16 +2982,21 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated()); } - if (bestGsfElectron.ecalDrivenSeed()) + if (bestGsfElectron.ecalDrivenSeed()){ h1_ele_provenance->Fill(1.); - if (bestGsfElectron.trackerDrivenSeed()) + } + if (bestGsfElectron.trackerDrivenSeed()){ h1_ele_provenance->Fill(-1.); - if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) + } + if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()){ h1_ele_provenance->Fill(0.); - if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) + } + if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()){ h1_ele_provenance->Fill(-2.); - if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) + } + if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()){ h1_ele_provenance->Fill(2.); + } if (bestGsfElectron.ecalDrivenSeed() && isEBflag) h1_ele_provenance_barrel->Fill(1.); if (bestGsfElectron.trackerDrivenSeed() && isEBflag) @@ -2936,6 +3038,7 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h1_ele_neutralHadronRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + if (isEBflag) { h1_ele_chargedHadronRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); @@ -2954,17 +3057,13 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event // isolation h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt()); + h1_ele_ecalPFClusterIso->Fill(bestGsfElectron.ecalPFClusterIso()); + h1_ele_hcalPFClusterIso->Fill(bestGsfElectron.hcalPFClusterIso()); h1_ele_ecalRecHitSumEt_dr03->Fill(bestGsfElectron.dr03EcalRecHitSumEt()); h1_ele_hcalTowerSumEt_dr03_depth1->Fill(bestGsfElectron.dr03HcalTowerSumEt(1)); h1_ele_hcalTowerSumEt_dr03_depth2->Fill(bestGsfElectron.dr03HcalTowerSumEt(2)); h1_ele_hcalTowerSumEtBc_dr03_depth1->Fill(bestGsfElectron.dr03HcalTowerSumEtBc(1)); h1_ele_hcalTowerSumEtBc_dr03_depth2->Fill(bestGsfElectron.dr03HcalTowerSumEtBc(2)); - h1_ele_tkSumPt_dr04->Fill(bestGsfElectron.dr04TkSumPt()); - h1_ele_ecalRecHitSumEt_dr04->Fill(bestGsfElectron.dr04EcalRecHitSumEt()); - h1_ele_hcalTowerSumEt_dr04_depth1->Fill(bestGsfElectron.dr04HcalTowerSumEt(1)); - h1_ele_hcalTowerSumEt_dr04_depth2->Fill(bestGsfElectron.dr04HcalTowerSumEt(2)); - h1_ele_hcalTowerSumEtBc_dr04_depth1->Fill(bestGsfElectron.dr04HcalTowerSumEtBc(1)); - h1_ele_hcalTowerSumEtBc_dr04_depth2->Fill(bestGsfElectron.dr04HcalTowerSumEtBc(2)); h1_ele_hcalDepth1OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(1)); h1_ele_hcalDepth2OverEcalBc->Fill(bestGsfElectron.hcalOverEcalBc(2)); if (isEBflag) { @@ -2973,26 +3072,20 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h1_ele_hcalTowerSumEt_dr03_depth1_barrel->Fill(bestGsfElectron.dr03HcalTowerSumEt(1)); h1_ele_hcalTowerSumEtBc_dr03_depth1_barrel->Fill(bestGsfElectron.dr03HcalTowerSumEtBc(1)); h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel->Fill(bestGsfElectron.dr03HcalTowerSumEtBc(2)); - h1_ele_tkSumPt_dr04_barrel->Fill(bestGsfElectron.dr04TkSumPt()); - h1_ele_ecalRecHitSumEt_dr04_barrel->Fill(bestGsfElectron.dr04EcalRecHitSumEt()); - h1_ele_hcalTowerSumEt_dr04_depth1_barrel->Fill(bestGsfElectron.dr04HcalTowerSumEt(1)); - h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel->Fill(bestGsfElectron.dr04HcalTowerSumEtBc(1)); - h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel->Fill(bestGsfElectron.dr04HcalTowerSumEtBc(2)); h1_ele_hcalDepth1OverEcalBc_barrel->Fill(bestGsfElectron.hcalOverEcalBc(1)); h1_ele_hcalDepth2OverEcalBc_barrel->Fill(bestGsfElectron.hcalOverEcalBc(2)); + h1_ele_ecalPFClusterIso_barrel->Fill(bestGsfElectron.ecalPFClusterIso()); + h1_ele_hcalPFClusterIso_barrel->Fill(bestGsfElectron.hcalPFClusterIso()); } else if (isEEflag) { h1_ele_tkSumPt_dr03_endcaps->Fill(bestGsfElectron.dr03TkSumPt()); h1_ele_ecalRecHitSumEt_dr03_endcaps->Fill(bestGsfElectron.dr03EcalRecHitSumEt()); h1_ele_hcalTowerSumEt_dr03_depth1_endcaps->Fill(bestGsfElectron.dr03HcalTowerSumEt(1)); h1_ele_hcalTowerSumEtBc_dr03_depth1_endcaps->Fill(bestGsfElectron.dr03HcalTowerSumEtBc(1)); h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps->Fill(bestGsfElectron.dr03HcalTowerSumEtBc(2)); - h1_ele_tkSumPt_dr04_endcaps->Fill(bestGsfElectron.dr04TkSumPt()); - h1_ele_ecalRecHitSumEt_dr04_endcaps->Fill(bestGsfElectron.dr04EcalRecHitSumEt()); - h1_ele_hcalTowerSumEt_dr04_depth1_endcaps->Fill(bestGsfElectron.dr04HcalTowerSumEt(1)); - h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps->Fill(bestGsfElectron.dr04HcalTowerSumEtBc(1)); - h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps->Fill(bestGsfElectron.dr04HcalTowerSumEtBc(2)); h1_ele_hcalDepth1OverEcalBc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc(1)); h1_ele_hcalDepth2OverEcalBc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc(2)); + h1_ele_ecalPFClusterIso_endcaps->Fill(bestGsfElectron.ecalPFClusterIso()); + h1_ele_hcalPFClusterIso_endcaps->Fill(bestGsfElectron.hcalPFClusterIso()); } // conversion rejection diff --git a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h index 1d946e107e96e..9a83f6e6b2089 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h @@ -67,6 +67,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { double maxPt_; double maxAbsEta_; + double maxAbsEtaExtended_; double deltaR2_; std::string inputFile_; @@ -92,6 +93,10 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { int eta2D_nbin; double eta_min; double eta_max; + int eta_nbin_extended; + int eta2D_nbin_extended; + double eta_min_extended; + double eta_max_extended; int deta_nbin; double deta_min; double deta_max; @@ -152,7 +157,9 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_recOfflineVertices_; MonitorElement *h1_matchingObjectEta; + MonitorElement *h1_matchingObjectEta_Extended; MonitorElement *h1_matchingObjectAbsEta; + MonitorElement *h1_matchingObjectAbsEta_Extended; MonitorElement *h1_matchingObjectP; MonitorElement *h1_matchingObjectPt; MonitorElement *h1_matchingObjectPhi; @@ -178,7 +185,9 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h2_ele_E2mnE1vsMee_egeg_all; MonitorElement *h1_ele_matchingObjectEta_matched; + MonitorElement *h1_ele_matchingObjectEta_Extended_matched; MonitorElement *h1_ele_matchingObjectAbsEta_matched; + MonitorElement *h1_ele_matchingObjectAbsEta_Extended_matched; MonitorElement *h1_ele_matchingObjectPt_matched; MonitorElement *h1_ele_matchingObjectPhi_matched; MonitorElement *h1_ele_matchingObjectZ_matched; @@ -234,6 +243,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_scl_SigIEtaIEta_barrel_; MonitorElement *h1_scl_SigIEtaIEta_endcaps_; MonitorElement *h1_scl_full5x5_sigmaIetaIeta_; + MonitorElement *h1_scl_full5x5_sigmaIetaIeta_Extended_; MonitorElement *h1_scl_full5x5_sigmaIetaIeta_barrel_; MonitorElement *h1_scl_full5x5_sigmaIetaIeta_endcaps_; MonitorElement *h1_scl_E1x5_; @@ -253,7 +263,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_ele_foundHits; MonitorElement *h1_ele_foundHits_barrel; MonitorElement *h1_ele_foundHits_endcaps; - MonitorElement *h2_ele_foundHitsVsEta; + MonitorElement *h2_ele_foundHitsVsEta_Extended; MonitorElement *h2_ele_foundHitsVsPhi; MonitorElement *h2_ele_foundHitsVsPt; MonitorElement *h1_ele_lostHits; @@ -288,7 +298,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_ele_EoP; MonitorElement *h1_ele_EoP_barrel; MonitorElement *h1_ele_EoP_endcaps; - MonitorElement *h2_ele_EoPVsEta; + MonitorElement *h2_ele_EoPVsEta_Extended; MonitorElement *h2_ele_EoPVsPhi; MonitorElement *h2_ele_EoPVsE; MonitorElement *h1_ele_EseedOP; @@ -311,12 +321,14 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h2_ele_EeleOPoutVsE; MonitorElement *h1_ele_dEtaSc_propVtx; + MonitorElement *h1_ele_dEtaSc_propVtx_Extended; MonitorElement *h1_ele_dEtaSc_propVtx_barrel; MonitorElement *h1_ele_dEtaSc_propVtx_endcaps; MonitorElement *h2_ele_dEtaScVsEta_propVtx; MonitorElement *h2_ele_dEtaScVsPhi_propVtx; MonitorElement *h2_ele_dEtaScVsPt_propVtx; MonitorElement *h1_ele_dPhiSc_propVtx; + MonitorElement *h1_ele_dPhiSc_propVtx_Extended; MonitorElement *h1_ele_dPhiSc_propVtx_barrel; MonitorElement *h1_ele_dPhiSc_propVtx_endcaps; MonitorElement *h2_ele_dPhiScVsEta_propVtx; @@ -373,6 +385,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_ele_eta_shower; MonitorElement *h1_ele_HoE; + MonitorElement *h1_ele_HoE_Extended; MonitorElement *h1_ele_HoE_bc; MonitorElement *h1_ele_HoE_barrel; MonitorElement *h1_ele_HoE_endcaps; @@ -385,6 +398,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_scl_ESFrac_endcaps; MonitorElement *h1_ele_fbrem; + MonitorElement *h1_ele_fbrem_Extended; MonitorElement *h1_ele_fbrem_barrel; MonitorElement *h1_ele_fbrem_endcaps; MonitorElement *h1_ele_superclusterfbrem; @@ -413,6 +427,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_ele_mva_barrel_isolated; MonitorElement *h1_ele_mva_endcaps_isolated; MonitorElement *h1_ele_provenance; + MonitorElement *h1_ele_provenance_Extended; MonitorElement *h1_ele_provenance_barrel; MonitorElement *h1_ele_provenance_endcaps; @@ -428,12 +443,15 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_ele_photonIso_endcaps; // -- pflow over pT MonitorElement *h1_ele_chargedHadronRelativeIso; + MonitorElement *h1_ele_chargedHadronRelativeIso_Extended; MonitorElement *h1_ele_chargedHadronRelativeIso_barrel; MonitorElement *h1_ele_chargedHadronRelativeIso_endcaps; MonitorElement *h1_ele_neutralHadronRelativeIso; + MonitorElement *h1_ele_neutralHadronRelativeIso_Extended; MonitorElement *h1_ele_neutralHadronRelativeIso_barrel; MonitorElement *h1_ele_neutralHadronRelativeIso_endcaps; MonitorElement *h1_ele_photonRelativeIso; + MonitorElement *h1_ele_photonRelativeIso_Extended; MonitorElement *h1_ele_photonRelativeIso_barrel; MonitorElement *h1_ele_photonRelativeIso_endcaps; @@ -447,16 +465,6 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_ele_hcalTowerSumEt_dr03_depth1_barrel; MonitorElement *h1_ele_hcalTowerSumEt_dr03_depth1_endcaps; MonitorElement *h1_ele_hcalTowerSumEt_dr03_depth2; - MonitorElement *h1_ele_tkSumPt_dr04; - MonitorElement *h1_ele_tkSumPt_dr04_barrel; - MonitorElement *h1_ele_tkSumPt_dr04_endcaps; - MonitorElement *h1_ele_ecalRecHitSumEt_dr04; - MonitorElement *h1_ele_ecalRecHitSumEt_dr04_barrel; - MonitorElement *h1_ele_ecalRecHitSumEt_dr04_endcaps; - MonitorElement *h1_ele_hcalTowerSumEt_dr04_depth1; - MonitorElement *h1_ele_hcalTowerSumEt_dr04_depth1_barrel; - MonitorElement *h1_ele_hcalTowerSumEt_dr04_depth1_endcaps; - MonitorElement *h1_ele_hcalTowerSumEt_dr04_depth2; MonitorElement *h1_ele_hcalDepth1OverEcalBc; MonitorElement *h1_ele_hcalDepth1OverEcalBc_barrel; @@ -471,12 +479,15 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase { MonitorElement *h1_ele_hcalTowerSumEtBc_dr03_depth2; MonitorElement *h1_ele_hcalTowerSumEtBc_dr03_depth2_barrel; MonitorElement *h1_ele_hcalTowerSumEtBc_dr03_depth2_endcaps; - MonitorElement *h1_ele_hcalTowerSumEtBc_dr04_depth1; - MonitorElement *h1_ele_hcalTowerSumEtBc_dr04_depth1_barrel; - MonitorElement *h1_ele_hcalTowerSumEtBc_dr04_depth1_endcaps; - MonitorElement *h1_ele_hcalTowerSumEtBc_dr04_depth2; - MonitorElement *h1_ele_hcalTowerSumEtBc_dr04_depth2_barrel; - MonitorElement *h1_ele_hcalTowerSumEtBc_dr04_depth2_endcaps; + + MonitorElement *h1_ele_ecalPFClusterIso; + MonitorElement *h1_ele_hcalPFClusterIso; + MonitorElement *h1_ele_ecalPFClusterIso_Extended; + MonitorElement *h1_ele_hcalPFClusterIso_Extended; + MonitorElement *h1_ele_ecalPFClusterIso_barrel; + MonitorElement *h1_ele_hcalPFClusterIso_barrel; + MonitorElement *h1_ele_ecalPFClusterIso_endcaps; + MonitorElement *h1_ele_hcalPFClusterIso_endcaps; MonitorElement *h1_ele_convFlags; MonitorElement *h1_ele_convFlags_all; From f114077025df938d8f52a59490de9b6164ce9951 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 2 Dec 2022 14:06:52 +0100 Subject: [PATCH 2/3] FakeHistos V1 : plugins part --- .../plugins/ElectronMcFakePostValidator.cc | 17 +- .../plugins/ElectronMcFakeValidator.cc | 207 ++++++++++-------- 2 files changed, 122 insertions(+), 102 deletions(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc index 1070019f95d01..33da13d42b39f 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.cc @@ -22,14 +22,15 @@ void ElectronMcFakePostValidator::finalize(DQMStore::IBooker& iBooker, DQMStore: setBookStatOverflowFlag(set_StatOverflowFlag); edm::LogInfo("ElectronMcFakePostValidator::finalize") << "efficiency calculation "; - bookH1andDivide(iBooker, - iGetter, - "etaEff_Extended", - "matchingObjectEta_Extended_matched", - "matchingObject_eta_Extended", - "#eta", - "Efficiency", ""); - bookH1andDivide(iBooker, + bookH1andDivide(iBooker, + iGetter, + "etaEff_Extended", + "matchingObjectEta_Extended_matched", + "matchingObject_eta_Extended", + "#eta", + "Efficiency", + ""); + bookH1andDivide(iBooker, iGetter, "absetaEff_Extended", "matchingObjectAbsEta_Extended_matched", diff --git a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc index ffaeb627889f7..ac10d44e9a475 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc @@ -458,7 +458,6 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf) h1_ele_photonRelativeIso_barrel = nullptr; h1_ele_photonRelativeIso_endcaps = nullptr; - h1_ele_tkSumPt_dr03 = nullptr; h1_ele_tkSumPt_dr03_barrel = nullptr; h1_ele_tkSumPt_dr03_endcaps = nullptr; @@ -515,12 +514,21 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru // mc h1_matchingObjectEta = bookH1withSumw2(iBooker, "matchingObject_eta", matchingObjectType + " #eta", eta_nbin, eta_min, eta_max, "#eta"); - h1_matchingObjectEta_Extended = - bookH1withSumw2(iBooker, "matchingObject_eta_Extended", matchingObjectType + " #eta", eta_nbin_extended, eta_min_extended, eta_max_extended, "#eta"); + h1_matchingObjectEta_Extended = bookH1withSumw2(iBooker, + "matchingObject_eta_Extended", + matchingObjectType + " #eta", + eta_nbin_extended, + eta_min_extended, + eta_max_extended, + "#eta"); h1_matchingObjectAbsEta = bookH1withSumw2(iBooker, "matchingObject_abseta", matchingObjectType + " |#eta|", eta_nbin / 2, 0., eta_max); - h1_matchingObjectAbsEta_Extended = - bookH1withSumw2(iBooker, "matchingObject_abseta_Extended", matchingObjectType + " |#eta|", eta_nbin_extended / 2, 0., eta_max_extended); + h1_matchingObjectAbsEta_Extended = bookH1withSumw2(iBooker, + "matchingObject_abseta_Extended", + matchingObjectType + " |#eta|", + eta_nbin_extended / 2, + 0., + eta_max_extended); h1_matchingObjectP = bookH1withSumw2(iBooker, "matchingObject_P", matchingObjectType + " p", p_nbin, 0., p_max, "p (GeV/c)"); h1_matchingObjectPt = @@ -679,12 +687,16 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru htitle = "Efficiency vs matching " + matchingObjectType + " "; h1_ele_matchingObjectEta_matched = bookH1withSumw2(iBooker, "matchingObjectEta_matched", htitle + "#eta", eta_nbin, eta_min, eta_max); - h1_ele_matchingObjectEta_Extended_matched = - bookH1withSumw2(iBooker, "matchingObjectEta_Extended_matched", htitle + "#eta", eta_nbin_extended, eta_min_extended, eta_max_extended); + h1_ele_matchingObjectEta_Extended_matched = bookH1withSumw2(iBooker, + "matchingObjectEta_Extended_matched", + htitle + "#eta", + eta_nbin_extended, + eta_min_extended, + eta_max_extended); h1_ele_matchingObjectAbsEta_matched = bookH1withSumw2(iBooker, "matchingObjectAbsEta_matched", htitle + "|#eta|", eta_nbin / 2, 0., eta_max); - h1_ele_matchingObjectAbsEta_Extended_matched = - bookH1withSumw2(iBooker, "matchingObjectAbsEta_Extended_matched", htitle + "|#eta|", eta_nbin_extended / 2, 0., eta_max_extended); + h1_ele_matchingObjectAbsEta_Extended_matched = bookH1withSumw2( + iBooker, "matchingObjectAbsEta_Extended_matched", htitle + "|#eta|", eta_nbin_extended / 2, 0., eta_max_extended); h1_ele_matchingObjectPt_matched = bookH1(iBooker, "matchingObjectPt_matched", htitle + "p_{T}", pteff_nbin, 5., pt_max); h1_ele_matchingObjectPhi_matched = @@ -926,14 +938,14 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); h1_scl_full5x5_sigmaIetaIeta_Extended_ = bookH1withSumw2(iBooker, - "full5x5_sigietaieta_Extended", - "ele supercluster full5x5 sigma ieta ieta, 2.5<|eta|<3", - 100, - 0., - 0.05, - "#sigma_{i#eta i#eta}", - "Events", - "ELE_LOGY E1 P"); + "full5x5_sigietaieta_Extended", + "ele supercluster full5x5 sigma ieta ieta, 2.5<|eta|<3", + 100, + 0., + 0.05, + "#sigma_{i#eta i#eta}", + "Events", + "ELE_LOGY E1 P"); h1_scl_full5x5_sigmaIetaIeta_barrel_ = bookH1withSumw2(iBooker, "full5x5_sigietaieta_barrel", "ele supercluster full5x5 sigma ieta ieta, barrel", @@ -1042,14 +1054,14 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru h1_ele_foundHits = bookH1withSumw2(iBooker, "foundHits", "ele track # found hits", fhits_nbin, 0., fhits_max, "N_{hits}"); h2_ele_foundHitsVsEta_Extended = bookH2(iBooker, - "foundHitsVsEta_Extended", - "ele track # found hits vs eta", - eta2D_nbin_extended, - eta_min_extended, - eta_max_extended, - fhits_nbin, - 0., - fhits_max); + "foundHitsVsEta_Extended", + "ele track # found hits vs eta", + eta2D_nbin_extended, + eta_min_extended, + eta_max_extended, + fhits_nbin, + 0., + fhits_max); h2_ele_foundHitsVsPhi = bookH2(iBooker, "foundHitsVsPhi", "ele track # found hits vs phi", @@ -1198,8 +1210,15 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "E/P_{vertex}", "Events", "ELE_LOGY E1 P"); - h2_ele_EoPVsEta_Extended = - bookH2(iBooker, "EoPVsEta_Extended", "ele E/P_{vertex} vs eta", eta2D_nbin_extended, eta_min_extended, eta_max_extended, eop2D_nbin, 0., eopmaxsht); + h2_ele_EoPVsEta_Extended = bookH2(iBooker, + "EoPVsEta_Extended", + "ele E/P_{vertex} vs eta", + eta2D_nbin_extended, + eta_min_extended, + eta_max_extended, + eop2D_nbin, + 0., + eopmaxsht); h2_ele_EoPVsPhi = bookH2(iBooker, "EoPVsPhi", "ele E/P_{vertex} vs phi", phi2D_nbin, phi_min, phi_max, eop2D_nbin, 0., eopmaxsht); h2_ele_EoPVsE = bookH2(iBooker, "EoPVsE", "ele E/P_{vertex} vs E", 50, 0., p_max, 50, 0., 5.); @@ -1311,14 +1330,14 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); h1_ele_dEtaSc_propVtx_Extended = bookH1withSumw2(iBooker, - "dEtaSc_propVtx_Extended", - "ele #eta_{sc} - #eta_{tr}, prop from vertex, 2.5<|eta|<3", - detamatch_nbin, - detamatch_min, - detamatch_max, - "#eta_{sc} - #eta_{tr}", - "Events", - "ELE_LOGY E1 P"); + "dEtaSc_propVtx_Extended", + "ele #eta_{sc} - #eta_{tr}, prop from vertex, 2.5<|eta|<3", + detamatch_nbin, + detamatch_min, + detamatch_max, + "#eta_{sc} - #eta_{tr}", + "Events", + "ELE_LOGY E1 P"); h1_ele_dEtaSc_propVtx_barrel = bookH1withSumw2(iBooker, "dEtaSc_propVtx_barrel", "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel", @@ -1374,14 +1393,14 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); h1_ele_dPhiSc_propVtx_Extended = bookH1withSumw2(iBooker, - "dPhiSc_propVtx_Extended", - "ele #phi_{sc} - #phi_{tr}, prop from vertex, 2.5<|eta|<3", - dphimatch_nbin, - dphimatch_min, - dphimatch_max, - "#phi_{sc} - #phi_{tr} (rad)", - "Events", - "ELE_LOGY E1 P"); + "dPhiSc_propVtx_Extended", + "ele #phi_{sc} - #phi_{tr}, prop from vertex, 2.5<|eta|<3", + dphimatch_nbin, + dphimatch_min, + dphimatch_max, + "#phi_{sc} - #phi_{tr} (rad)", + "Events", + "ELE_LOGY E1 P"); h1_ele_dPhiSc_propVtx_barrel = bookH1withSumw2(iBooker, "dPhiSc_propVtx_barrel", "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel", @@ -1646,13 +1665,13 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru h1_ele_HoE = bookH1withSumw2( iBooker, "HoE", "ele hadronic energy / em energy", hoe_nbin, hoe_min, hoe_max, "H/E", "Events", "ELE_LOGY E1 P"); h1_ele_HoE_Extended = bookH1withSumw2(iBooker, - "HoE_Extended", - "ele hadronic energy / em energy, 2.5<|eta|<3", - hoe_nbin, - hoe_min, - hoe_max, - "H/E", - "Events", + "HoE_Extended", + "ele hadronic energy / em energy, 2.5<|eta|<3", + hoe_nbin, + hoe_min, + hoe_max, + "H/E", + "Events", "ELE_LOGY E1 P"); h1_ele_HoE_barrel = bookH1withSumw2(iBooker, "HoE_barrel", @@ -2073,7 +2092,6 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); - h1_ele_hcalTowerSumEtBc_dr03_depth2 = bookH1withSumw2(iBooker, "hcalTowerSumEtBc_dr03_depth2", "hcal depth2 isolation sum behind cluster, dR=0.3", @@ -2180,12 +2198,12 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru // fbrem h1_ele_fbrem = bookH1withSumw2( iBooker, "fbrem", "ele brem fraction, mode of GSF components", 100, 0., 1., "P_{in} - P_{out} / P_{in}"); - h1_ele_fbrem_Extended = bookH1withSumw2(iBooker, - "fbrem_Extended", - "ele brem fraction, mode of GSF components, 2.5<|eta|<3", - 100, - 0., - 1., + h1_ele_fbrem_Extended = bookH1withSumw2(iBooker, + "fbrem_Extended", + "ele brem fraction, mode of GSF components, 2.5<|eta|<3", + 100, + 0., + 1., "P_{in} - P_{out} / P_{in}"); h1_ele_fbrem_barrel = bookH1withSumw2(iBooker, "fbrem_barrel", @@ -2311,14 +2329,14 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); h1_ele_chargedHadronRelativeIso_Extended = bookH1withSumw2(iBooker, - "chargedHadronRelativeIso_Extended", - "chargedHadronRelativeIso_Extended", - 100, - 0.0, - 2., - "chargedHadronRelativeIso Extended, 2.5<|eta|<3", - "Events", - "ELE_LOGY E1 P"); + "chargedHadronRelativeIso_Extended", + "chargedHadronRelativeIso_Extended", + 100, + 0.0, + 2., + "chargedHadronRelativeIso Extended, 2.5<|eta|<3", + "Events", + "ELE_LOGY E1 P"); h1_ele_chargedHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_barrel", "chargedHadronRelativeIso for barrel", @@ -2347,14 +2365,14 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "Events", "ELE_LOGY E1 P"); h1_ele_neutralHadronRelativeIso_Extended = bookH1withSumw2(iBooker, - "neutralHadronRelativeIso_Extended", - "neutralHadronRelativeIso_Extended", - 100, - 0.0, - 2., - "neutralHadronRelativeIso Extended, 2.5<|eta|<3", - "Events", - "ELE_LOGY E1 P"); + "neutralHadronRelativeIso_Extended", + "neutralHadronRelativeIso_Extended", + 100, + 0.0, + 2., + "neutralHadronRelativeIso Extended, 2.5<|eta|<3", + "Events", + "ELE_LOGY E1 P"); h1_ele_neutralHadronRelativeIso_barrel = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_barrel", "neutralHadronRelativeIso for barrel", @@ -2375,14 +2393,14 @@ void ElectronMcFakeValidator::bookHistograms(DQMStore::IBooker &iBooker, edm::Ru "ELE_LOGY E1 P"); h1_ele_photonRelativeIso = bookH1withSumw2( iBooker, "photonRelativeIso", "photonRelativeIso", 100, 0.0, 2., "photonRelativeIso", "Events", "ELE_LOGY E1 P"); - h1_ele_photonRelativeIso_Extended = bookH1withSumw2(iBooker, - "photonRelativeIso_Extended", - "photonRelativeIso_Extended", - 100, - 0.0, - 2., - "photonRelativeIso Extended, 2.5<|eta|<3", - "Events", + h1_ele_photonRelativeIso_Extended = bookH1withSumw2(iBooker, + "photonRelativeIso_Extended", + "photonRelativeIso_Extended", + 100, + 0.0, + 2., + "photonRelativeIso Extended, 2.5<|eta|<3", + "Events", "ELE_LOGY E1 P"); h1_ele_photonRelativeIso_barrel = bookH1withSumw2(iBooker, "photonRelativeIso_barrel", @@ -2620,29 +2638,30 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h1_scl_full5x5_sigmaIetaIeta_Extended_->Fill(bestGsfElectron.full5x5_sigmaIetaIeta()); h1_ele_HoE_Extended->Fill(bestGsfElectron.hadronicOverEm()); h1_ele_chargedHadronRelativeIso_Extended->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / - bestGsfElectron.pt()); + bestGsfElectron.pt()); h1_ele_neutralHadronRelativeIso_Extended->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / - bestGsfElectron.pt()); - h1_ele_photonRelativeIso_Extended->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + bestGsfElectron.pt()); + h1_ele_photonRelativeIso_Extended->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / + bestGsfElectron.pt()); h1_ele_ecalPFClusterIso_Extended->Fill(bestGsfElectron.ecalPFClusterIso()); h1_ele_hcalPFClusterIso_Extended->Fill(bestGsfElectron.hcalPFClusterIso()); double fbrem_mode = bestGsfElectron.fbrem(); h1_ele_fbrem_Extended->Fill(fbrem_mode); if (!readAOD_) { - if (bestGsfElectron.ecalDrivenSeed()){ + if (bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance_Extended->Fill(1.); } - if (bestGsfElectron.trackerDrivenSeed()){ + if (bestGsfElectron.trackerDrivenSeed()) { h1_ele_provenance_Extended->Fill(-1.); } - if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()){ + if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance_Extended->Fill(0.); } - if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()){ + if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance_Extended->Fill(-2.); } - if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()){ + if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance_Extended->Fill(2.); } } @@ -2982,19 +3001,19 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event h1_ele_mva_endcaps_isolated->Fill(bestGsfElectron.mva_Isolated()); } - if (bestGsfElectron.ecalDrivenSeed()){ + if (bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance->Fill(1.); } - if (bestGsfElectron.trackerDrivenSeed()){ + if (bestGsfElectron.trackerDrivenSeed()) { h1_ele_provenance->Fill(-1.); } - if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()){ + if (bestGsfElectron.trackerDrivenSeed() || bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance->Fill(0.); } - if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()){ + if (bestGsfElectron.trackerDrivenSeed() && !bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance->Fill(-2.); } - if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()){ + if (!bestGsfElectron.trackerDrivenSeed() && bestGsfElectron.ecalDrivenSeed()) { h1_ele_provenance->Fill(2.); } if (bestGsfElectron.ecalDrivenSeed() && isEBflag) From 9a57ddb3b4127e94306f70ef2e20a23de500bf96 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 2 Dec 2022 14:07:12 +0100 Subject: [PATCH 3/3] FakeHistos V1 : python part --- .../python/ElectronMcFakeValidator_gedGsfElectrons_cfi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Validation/RecoEgamma/python/ElectronMcFakeValidator_gedGsfElectrons_cfi.py b/Validation/RecoEgamma/python/ElectronMcFakeValidator_gedGsfElectrons_cfi.py index 6f6b626f8f9c5..c2b4d59f5152b 100644 --- a/Validation/RecoEgamma/python/ElectronMcFakeValidator_gedGsfElectrons_cfi.py +++ b/Validation/RecoEgamma/python/ElectronMcFakeValidator_gedGsfElectrons_cfi.py @@ -7,6 +7,7 @@ Nbinfhits = cms.int32(30), Fhitsmax = cms.double(30.0), Nbinlhits = cms.int32(5), Lhitsmax = cms.double(10.0), Nbineta = cms.int32(50), Nbineta2D = cms.int32(50),Etamin = cms.double(-2.5), Etamax = cms.double(2.5), + NbinetaExtended = cms.int32(60), Nbineta2DExtended = cms.int32(60),EtaminExtended = cms.double(-3.0), EtamaxExtended = cms.double(3.0), Nbindeta = cms.int32(100), Detamin = cms.double(-0.005), Detamax = cms.double(0.005), Nbindetamatch = cms.int32(100), Nbindetamatch2D = cms.int32(50), Detamatchmin = cms.double(-0.05), Detamatchmax = cms.double(0.05), Nbinphi = cms.int32(64), Nbinphi2D = cms.int32(32), Phimin = cms.double(-3.2), Phimax = cms.double(3.2), @@ -58,6 +59,7 @@ MaxPt = cms.double(100.0), DeltaR = cms.double(0.3), MaxAbsEta = cms.double(2.5), + MaxAbsEtaExtended = cms.double(3.0), histosCfg = cms.PSet(electronMcFakeHistosCfg) )