diff --git a/DataFormats/interface/ElectronCandidateFeatures.h b/DataFormats/interface/ElectronCandidateFeatures.h index 0121ded..76e1d35 100644 --- a/DataFormats/interface/ElectronCandidateFeatures.h +++ b/DataFormats/interface/ElectronCandidateFeatures.h @@ -23,31 +23,37 @@ class ElectronCandidateFeatures { float elec_convRadius; float elec_hadronicOverEm; float elec_ecalDrivenSeed; + float elec_2dIP; + float elec_2dIPSig; + float elec_3dIP; + float elec_3dIPSig; - // superCluster block float elecSC_energy; float elecSC_deta; float elecSC_dphi; float elecSC_et; float elecSC_eSuperClusterOverP; - float elec_scE1x5Overe5x5; - float elec_scE2x5MaxOvere5x5; - float elec_scE5x5; - float elec_scE5x5Rel; float elec_scPixCharge; - float elec_scSigmaEtaEta; - float elec_scSigmaIEtaIEta; float elec_superClusterFbrem; - float elec_2dIP; - float elec_2dIPSig; - float elec_3dIP; - float elec_3dIPSig; float elec_eSeedClusterOverP; float elec_eSeedClusterOverPout; float elec_eSuperClusterOverP; - float elec_eTopOvere5x5; + // shower shape + float elec_sigmaEtaEta; + float elec_sigmaIetaIeta; + float elec_sigmaIphiIphi; + float elec_e5x5; + float elec_e5x5Rel; + float elec_e1x5Overe5x5; + float elec_e2x5MaxOvere5x5; + float elec_r9; + float elec_hcalOverEcal; + float elec_hcalDepth1OverEcal; + float elec_hcalDepth2OverEcal; + + // Track-Cluster Matching Attributes float elec_deltaEtaEleClusterTrackAtCalo; float elec_deltaEtaSeedClusterTrackAtCalo; float elec_deltaPhiSeedClusterTrackAtCalo; @@ -55,6 +61,7 @@ class ElectronCandidateFeatures { float elec_deltaEtaSuperClusterTrackAtVtx; float elec_deltaPhiEleClusterTrackAtCalo; float elec_deltaPhiSuperClusterTrackAtVtx; + float elec_sCseedEta; // electron gsf variables. @@ -65,40 +72,9 @@ class ElectronCandidateFeatures { float elec_gsfCharge; int elec_ndof; float elec_chi2; - - - int elec_numberOfBrems; float elec_trackFbrem; float elec_fbrem; - float elec_e5x5; - float elec_e5x5Rel; - float elec_e1x5Overe5x5; - float elec_e2x5MaxOvere5x5; - - // 5*5 cells cluster - float elec_full5x5_e5x5; - float elec_full5x5_e5x5Rel; - float elec_full5x5_sigmaIetaIeta; - float elec_full5x5_e1x5Overe5x5; - float elec_full5x5_e2x5BottomOvere5x5; - float elec_full5x5_e2x5LeftOvere5x5; - float elec_full5x5_e2x5MaxOvere5x5; - float elec_full5x5_e2x5RightOvere5x5; - float elec_full5x5_e2x5TopOvere5x5; - - float elec_full5x5_eBottomOvere5x5; - float elec_full5x5_eLeftOvere5x5; - float elec_full5x5_eRightOvere5x5; - float elec_full5x5_eTopOvere5x5; - float elec_full5x5_hcalDepth1OverEcal; - float elec_full5x5_hcalDepth1OverEcalBc; - float elec_full5x5_hcalDepth2OverEcal; - float elec_full5x5_hcalDepth2OverEcalBc; - float elec_full5x5_hcalOverEcal; - float elec_full5x5_hcalOverEcalBc; - float elec_full5x5_r9; - // Isolation block float elec_neutralHadronIso; @@ -106,22 +82,15 @@ class ElectronCandidateFeatures { float elec_photonIso; float elec_puChargedHadronIso; float elec_trackIso; - float elec_hcalDepth1OverEcal; - float elec_hcalDepth2OverEcal; float elec_ecalPFClusterIso; float elec_hcalPFClusterIso; - float elec_dr03TkSumPt; - - float elec_dr03EcalRecHitSumEt; - float elec_dr03HcalDepth1TowerSumEt; - float elec_dr03HcalDepth1TowerSumEtBc; - float elec_dr03HcalDepth2TowerSumEt; - float elec_dr03HcalDepth2TowerSumEtBc; + float elec_pfSumPhotonEt; float elec_pfSumChargedHadronPt; float elec_pfSumNeutralHadronEt; float elec_pfSumPUPt; + float elec_dr04TkSumPt; float elec_dr04EcalRecHitSumEt; float elec_dr04HcalDepth1TowerSumEt; float elec_dr04HcalDepth1TowerSumEtBc; diff --git a/NANOProducer/plugins/NANOProducer.cc b/NANOProducer/plugins/NANOProducer.cc index 896c91e..dd8124b 100644 --- a/NANOProducer/plugins/NANOProducer.cc +++ b/NANOProducer/plugins/NANOProducer.cc @@ -278,13 +278,11 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) std::vector elecSC_dphi; std::vector elecSC_et; std::vector elecSC_eSuperClusterOverP; - std::vector elec_scE1x5Overe5x5; - std::vector elec_scE2x5MaxOvere5x5; - std::vector elec_scE5x5; - std::vector elec_scE5x5Rel; std::vector elec_scPixCharge; - std::vector elec_scSigmaEtaEta; - std::vector elec_scSigmaIEtaIEta; + std::vector elec_sigmaEtaEta; + std::vector elec_sigmaIetaIeta; + std::vector elec_sigmaIphiIphi; + std::vector elec_r9; std::vector elec_superClusterFbrem; std::vector elec_2dIP; @@ -294,7 +292,6 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) std::vector elec_eSeedClusterOverP; std::vector elec_eSeedClusterOverPout; std::vector elec_eSuperClusterOverP; - std::vector elec_eTopOvere5x5; std::vector elec_deltaEtaEleClusterTrackAtCalo; std::vector elec_deltaEtaSeedClusterTrackAtCalo; @@ -304,7 +301,7 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) std::vector elec_deltaPhiEleClusterTrackAtCalo; std::vector elec_deltaPhiSuperClusterTrackAtVtx; std::vector elec_sCseedEta; - /////// + std::vector elec_EtaRel; std::vector elec_dxy; std::vector elec_dz; @@ -317,27 +314,6 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) std::vector elec_e1x5Overe5x5; std::vector elec_e5x5; std::vector elec_e5x5Rel; - std::vector elec_full5x5_sigmaIetaIeta; - std::vector elec_full5x5_e1x5Overe5x5; - std::vector elec_full5x5_e2x5BottomOvere5x5; - std::vector elec_full5x5_e2x5LeftOvere5x5; - std::vector elec_full5x5_e2x5MaxOvere5x5; - std::vector elec_full5x5_e2x5RightOvere5x5; - std::vector elec_full5x5_e2x5TopOvere5x5; - std::vector elec_full5x5_e5x5; - std::vector elec_full5x5_e5x5Rel; - std::vector elec_full5x5_eBottomOvere5x5; - std::vector elec_full5x5_eLeftOvere5x5; - std::vector elec_full5x5_eRightOvere5x5; - std::vector elec_full5x5_eTopOvere5x5; - - std::vector elec_full5x5_hcalDepth1OverEcal; - std::vector elec_full5x5_hcalDepth1OverEcalBc; - std::vector elec_full5x5_hcalDepth2OverEcal; - std::vector elec_full5x5_hcalDepth2OverEcalBc; - std::vector elec_full5x5_hcalOverEcal; - std::vector elec_full5x5_hcalOverEcalBc; - std::vector elec_full5x5_r9; std::vector elec_numberOfBrems; std::vector elec_fbrem; std::vector elec_neutralHadronIso; @@ -349,16 +325,11 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) std::vector elec_hcalDepth2OverEcal; std::vector elec_ecalPFClusterIso; std::vector elec_hcalPFClusterIso; - std::vector elec_dr03TkSumPt; - std::vector elec_dr03EcalRecHitSumEt; - std::vector elec_dr03HcalDepth1TowerSumEt; - std::vector elec_dr03HcalDepth1TowerSumEtBc; - std::vector elec_dr03HcalDepth2TowerSumEt; - std::vector elec_dr03HcalDepth2TowerSumEtBc; std::vector elec_pfSumPhotonEt; std::vector elec_pfSumChargedHadronPt; std::vector elec_pfSumNeutralHadronEt; std::vector elec_pfSumPUPt; + std::vector elec_dr04TkSumPt; std::vector elec_dr04EcalRecHitSumEt; std::vector elec_dr04HcalDepth1TowerSumEt; std::vector elec_dr04HcalDepth1TowerSumEtBc; @@ -649,14 +620,11 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) elecSC_et.push_back(elec_features.elecSC_et ); elecSC_eSuperClusterOverP.push_back(elec_features.elecSC_eSuperClusterOverP ); - elec_scE1x5Overe5x5.push_back(elec_features.elec_scE1x5Overe5x5 ); - elec_scE2x5MaxOvere5x5.push_back(elec_features.elec_scE2x5MaxOvere5x5 ); - elec_scE5x5.push_back(elec_features.elec_scE5x5 ); - elec_scE5x5Rel.push_back(elec_features.elec_scE5x5Rel ); - elec_scPixCharge.push_back(elec_features.elec_scPixCharge ); - elec_scSigmaEtaEta.push_back(elec_features.elec_scSigmaEtaEta ); - elec_scSigmaIEtaIEta.push_back(elec_features.elec_scSigmaIEtaIEta ); + elec_sigmaEtaEta.push_back(elec_features.elec_sigmaEtaEta ); + elec_sigmaIetaIeta.push_back(elec_features.elec_sigmaIetaIeta ); + elec_sigmaIphiIphi.push_back(elec_features.elec_sigmaIphiIphi ); + elec_r9.push_back(elec_features.elec_r9 ); elec_superClusterFbrem.push_back(elec_features.elec_superClusterFbrem ); elec_2dIP.push_back(elec_features.elec_2dIP ); @@ -666,7 +634,6 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) elec_eSeedClusterOverP.push_back(elec_features.elec_eSeedClusterOverP ); elec_eSeedClusterOverPout.push_back(elec_features.elec_eSeedClusterOverPout ); elec_eSuperClusterOverP.push_back(elec_features.elec_eSuperClusterOverP ); - elec_eTopOvere5x5.push_back(elec_features.elec_eTopOvere5x5 ); elec_deltaEtaEleClusterTrackAtCalo.push_back(elec_features.elec_deltaEtaEleClusterTrackAtCalo ); elec_deltaEtaSeedClusterTrackAtCalo.push_back(elec_features.elec_deltaEtaSeedClusterTrackAtCalo ); @@ -685,28 +652,6 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) elec_gsfCharge.push_back(elec_features.elec_gsfCharge ); elec_ndof.push_back(elec_features.elec_ndof ); elec_chi2.push_back(elec_features.elec_chi2 ); - - elec_full5x5_sigmaIetaIeta.push_back(elec_features.elec_full5x5_sigmaIetaIeta ); - elec_full5x5_e1x5Overe5x5.push_back(elec_features.elec_full5x5_e1x5Overe5x5 ); - elec_full5x5_e2x5BottomOvere5x5.push_back(elec_features.elec_full5x5_e2x5BottomOvere5x5 ); - elec_full5x5_e2x5LeftOvere5x5.push_back(elec_features.elec_full5x5_e2x5LeftOvere5x5 ); - elec_full5x5_e2x5MaxOvere5x5.push_back(elec_features.elec_full5x5_e2x5MaxOvere5x5 ); - elec_full5x5_e2x5RightOvere5x5.push_back(elec_features.elec_full5x5_e2x5RightOvere5x5 ); - elec_full5x5_e2x5TopOvere5x5.push_back(elec_features.elec_full5x5_e2x5TopOvere5x5 ); - elec_full5x5_e5x5.push_back(elec_features.elec_full5x5_e5x5 ); - elec_full5x5_e5x5Rel.push_back(elec_features.elec_full5x5_e5x5Rel ); - - elec_full5x5_eBottomOvere5x5.push_back(elec_features.elec_full5x5_eBottomOvere5x5 ); - elec_full5x5_eLeftOvere5x5.push_back(elec_features.elec_full5x5_eLeftOvere5x5 ); - elec_full5x5_eRightOvere5x5.push_back(elec_features.elec_full5x5_eRightOvere5x5 ); - elec_full5x5_eTopOvere5x5.push_back(elec_features.elec_full5x5_eTopOvere5x5 ); - elec_full5x5_hcalDepth1OverEcal.push_back(elec_features.elec_full5x5_hcalDepth1OverEcal ); - elec_full5x5_hcalDepth1OverEcalBc.push_back(elec_features.elec_full5x5_hcalDepth1OverEcalBc ); - elec_full5x5_hcalDepth2OverEcal.push_back(elec_features.elec_full5x5_hcalDepth2OverEcal ); - elec_full5x5_hcalDepth2OverEcalBc.push_back(elec_features.elec_full5x5_hcalDepth2OverEcalBc ); - elec_full5x5_hcalOverEcal.push_back(elec_features.elec_full5x5_hcalOverEcal ); - elec_full5x5_hcalOverEcalBc.push_back(elec_features.elec_full5x5_hcalOverEcalBc ); - elec_full5x5_r9.push_back(elec_features.elec_full5x5_r9 ); elec_numberOfBrems.push_back(elec_features.elec_numberOfBrems ); elec_fbrem.push_back(elec_features.elec_fbrem ); elec_e2x5MaxOvere5x5.push_back(elec_features.elec_e2x5MaxOvere5x5 ); @@ -722,16 +667,11 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) elec_hcalDepth2OverEcal.push_back(elec_features.elec_hcalDepth2OverEcal ); elec_ecalPFClusterIso.push_back(elec_features.elec_ecalPFClusterIso ); elec_hcalPFClusterIso.push_back(elec_features.elec_hcalPFClusterIso ); - elec_dr03TkSumPt.push_back(elec_features.elec_dr03TkSumPt ); - elec_dr03EcalRecHitSumEt.push_back(elec_features.elec_dr03EcalRecHitSumEt ); - elec_dr03HcalDepth1TowerSumEt.push_back(elec_features.elec_dr03HcalDepth1TowerSumEt ); - elec_dr03HcalDepth1TowerSumEtBc.push_back(elec_features.elec_dr03HcalDepth1TowerSumEtBc ); - elec_dr03HcalDepth2TowerSumEt.push_back(elec_features.elec_dr03HcalDepth2TowerSumEt ); - elec_dr03HcalDepth2TowerSumEtBc.push_back(elec_features.elec_dr03HcalDepth2TowerSumEtBc ); elec_pfSumPhotonEt.push_back(elec_features.elec_pfSumPhotonEt ); elec_pfSumChargedHadronPt.push_back(elec_features.elec_pfSumChargedHadronPt ); elec_pfSumNeutralHadronEt.push_back(elec_features.elec_pfSumNeutralHadronEt ); elec_pfSumPUPt.push_back(elec_features.elec_pfSumPUPt ); + elec_dr04TkSumPt.push_back(elec_features.elec_dr04TkSumPt ); elec_dr04EcalRecHitSumEt.push_back(elec_features.elec_dr04EcalRecHitSumEt ); elec_dr04HcalDepth1TowerSumEt.push_back(elec_features.elec_dr04HcalDepth1TowerSumEt ); elec_dr04HcalDepth1TowerSumEtBc.push_back(elec_features.elec_dr04HcalDepth1TowerSumEtBc ); @@ -930,13 +870,11 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) electronTable->addColumn("SC_dphi",elecSC_dphi,"absolute difference between the electron supercluster phi and gsfTrack electron phi",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("SC_et",elecSC_et,"electron supercluster transverse energy normalized against the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("SC_eSuperClusterOverP",elecSC_eSuperClusterOverP,"the electron supercluster energy / track momentum at the PCA to the beam spot",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("scE1x5Overe5x5",elec_scE1x5Overe5x5,"electron supercluster energy ratio of highest energy 1x5 ECAL block containing seed over total energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("scE2x5MaxOvere5x5",elec_scE2x5MaxOvere5x5,"electron supercluster energy ratio of highest energy 2x5 ECAL block containing seed over total energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("scE5x5",elec_scE5x5,"electron supercluster energy in 5x5 ECAL block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("scE5x5Rel",elec_scE5x5Rel,"electron supercluster energy in 5x5 ECAL block on seed relative to the jet pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("scPixCharge",elec_scPixCharge,"electron supercluster pixel charge",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("scSigmaEtaEta",elec_scSigmaEtaEta,"electron supercluster Sigma Eta Eta variable (quite unintuitive)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("scSigmaIEtaIEta",elec_scSigmaIEtaIEta,"electron supercluster Sigma iEta iEta variable (improved variable against Sigma Eta Eta to resolv issues in cracks)",nanoaod::FlatTable::FloatColumn); + electronTable->addColumn("sigmaEtaEta",elec_sigmaEtaEta,"electron supercluster Sigma Eta Eta variable (quite unintuitive)",nanoaod::FlatTable::FloatColumn); + electronTable->addColumn("sigmaIetaIeta",elec_sigmaIetaIeta,"electron supercluster Sigma iEta iEta variable (improved variable against Sigma Eta Eta to resolv issues in cracks)",nanoaod::FlatTable::FloatColumn); + electronTable->addColumn("sigmaIphiIphi",elec_sigmaIphiIphi,"electron supercluster Sigma iphi iphi variable",nanoaod::FlatTable::FloatColumn); + electronTable->addColumn("r9",elec_r9,"electron supercluster r9 variable",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("superClusterFbrem",elec_superClusterFbrem,"the brem fraction from supercluster: (supercluster energy - electron cluster energy) / supercluster energy",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("2dIP",elec_2dIP,"electron inner track transverse impact parameter relative to the primary vertex in transverse plane (2D), absolute value",nanoaod::FlatTable::FloatColumn); @@ -946,7 +884,6 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) electronTable->addColumn("eSeedClusterOverP",elec_eSeedClusterOverP,"the seed cluster energy / track momentum at the PCA to the beam spot",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("eSeedClusterOverPout",elec_eSeedClusterOverPout,"the seed cluster energy / track momentum at calo extrapolated from the outermost track state",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("eSuperClusterOverP",elec_eSuperClusterOverP,"the supercluster energy / track momentum at the PCA to the beam spot",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("eTopOvere5x5",elec_eTopOvere5x5,"electron.full5x5_eTop()/ electron.full5x5_e5x5()",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("deltaEtaEleClusterTrackAtCalo",elec_deltaEtaEleClusterTrackAtCalo,"doc",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("deltaEtaSeedClusterTrackAtCalo",elec_deltaEtaSeedClusterTrackAtCalo,"doc",nanoaod::FlatTable::FloatColumn); @@ -972,26 +909,6 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) electronTable->addColumn("e5x5Rel",elec_e5x5Rel,"electron energy in 5x5 ECAL block on seed relative to the jet pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("e2x5MaxOvere5x5",elec_e2x5MaxOvere5x5,"electron energy ratio of highest energy 2x5 ECAL block containing seed over total energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("e1x5Overe5x5",elec_e1x5Overe5x5,"electron energy ratio of highest energy 1x5 ECAL block containing seed over total energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_sigmaIetaIeta",elec_full5x5_sigmaIetaIeta,"electron full shower Sigma iEta iEta variable (improved variable against Sigma Eta Eta to resolv issues in cracks)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e1x5Overe5x5",elec_full5x5_e1x5Overe5x5,"electron full shower energy ratio of highest energy 1x5 ECAL block containing seed over total full shower energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e2x5BottomOvere5x5",elec_full5x5_e2x5BottomOvere5x5,"electron full shower energy ratio of bottom 2x5 ECAL block containing seed over total full shower energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e2x5LeftOvere5x5",elec_full5x5_e2x5LeftOvere5x5,"electron full shower energy ratio of left 2x5 ECAL block containing seed over total full shower energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e2x5MaxOvere5x5",elec_full5x5_e2x5MaxOvere5x5,"electron full shower energy ratio of highest energy 2x5 ECAL block containing seed over total full shower energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e2x5RightOvere5x5",elec_full5x5_e2x5RightOvere5x5,"electron full shower energy ratio of right 2x5 ECAL block containing seed over total full shower energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e2x5TopOvere5x5",elec_full5x5_e2x5TopOvere5x5,"electron full shower energy ratio of top 2x5 ECAL block containing seed over total full shower energy in 5x5 block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e5x5",elec_full5x5_e5x5,"electron full shower energy in 5x5 full shower ECAL block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_e5x5Rel",elec_full5x5_e5x5Rel,"electron full shower energy in 5x5 full shower ECAL block on seed relative to the jet pt",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_eBottomOvere5x5",elec_full5x5_eBottomOvere5x5,"electron full shower energy in bottom ECAL blocks ratio of 5x5 full shower block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_eLeftOvere5x5",elec_full5x5_eLeftOvere5x5,"electron full shower energy in left ECAL blocks ratio of 5x5 full shower block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_eRightOvere5x5",elec_full5x5_eRightOvere5x5,"electron full shower energy in right ECAL blocks ratio of 5x5 full shower block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_eTopOvere5x5",elec_full5x5_eTopOvere5x5,"electron full shower energy in top ECAL blocks ratio of 5x5 full shower block on seed",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_hcalDepth1OverEcal",elec_full5x5_hcalDepth1OverEcal,"HCAL over ECAL seed cluster full shower energy using 1st HCAL depth (using HCAL towers within a cone)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_hcalDepth1OverEcalBc",elec_full5x5_hcalDepth1OverEcalBc,"HCAL over ECAL seed cluster full shower energy using 1st HCAL depth (using HCAL towers behind clusters)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_hcalDepth2OverEcal",elec_full5x5_hcalDepth2OverEcal,"HCAL over ECAL seed cluster full shower energy using 2nd HCAL depth (using HCAL towers within a cone)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_hcalDepth2OverEcalBc",elec_full5x5_hcalDepth2OverEcalBc,"HCAL over ECAL seed cluster full shower energy using 2nd HCAL depth (using HCAL towers behind clusters)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_hcalOverEcal",elec_full5x5_hcalOverEcal,"HCAL over ECAL seed cluster full shower energy summing the 1st and 2nd HCAL depth (using HCAL towers within a cone)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_hcalOverEcalBc",elec_full5x5_hcalOverEcalBc,"HCAL over ECAL seed cluster full shower energy summing the 1st and 2nd HCAL depth (using HCAL towers behind clusters)",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("full5x5_r9",elec_full5x5_r9,"ratio of the 3x3 full shower energy and supercluster energy",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("neutralHadronIso",elec_neutralHadronIso,"returns the isolation calculated with only the neutral hadron PFCandidates relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("particleIso",elec_particleIso,"returns the isolation calculated with all the PFCandidates relative to the electron pt",nanoaod::FlatTable::FloatColumn); @@ -1002,16 +919,11 @@ NANOProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) electronTable->addColumn("hcalDepth2OverEcal",elec_hcalDepth2OverEcal,"HCAL over ECAL seed cluster energy using 2nd HCAL depth (using HCAL towers within a cone)",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("ecalPFClusterIso",elec_ecalPFClusterIso,"sum pt of isolated ECAL clusters, vetoing clusters part of electron",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("hcalPFClusterIso",elec_hcalPFClusterIso,"sum pt of isolated HCAL clusters, vetoing clusters part of electron",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("dr03TkSumPt",elec_dr03TkSumPt,"track iso deposit with electron footprint removed relative to the electron pt",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("dr03EcalRecHitSumEt",elec_dr03EcalRecHitSumEt,"ECAL iso deposit with electron footprint removed relative to the electron pt",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("dr03HcalDepth1TowerSumEt",elec_dr03HcalDepth1TowerSumEt,"HCAL depth 1 iso deposit with electron footprint removed relative to the electron pt",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("dr03HcalDepth1TowerSumEtBc",elec_dr03HcalDepth1TowerSumEtBc,"HCAL depth 1 iso deposit without towers behind cluster relative to the electron pt",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("dr03HcalDepth2TowerSumEt",elec_dr03HcalDepth2TowerSumEt,"HCAL depth 2 iso deposit with electron footprint removed relative to the electron pt",nanoaod::FlatTable::FloatColumn); - electronTable->addColumn("dr03HcalDepth2TowerSumEtBc",elec_dr03HcalDepth2TowerSumEtBc,"HCAL depth 2 iso deposit without towers behind cluster relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("pfSumPhotonEt",elec_pfSumPhotonEt,"sum pt of PF photons // old float photonIso, relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("pfSumChargedHadronPt",elec_pfSumChargedHadronPt,"sum pt of charged hadron // old float chargedHadronIso, relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("pfSumNeutralHadronEt",elec_pfSumNeutralHadronEt,"sum transverse energy of neutral hadron // old float neutralHadronIso, relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("pfSumPUPt",elec_pfSumPUPt,"sum pt of charged particles not from PV (for PU corrections) ",nanoaod::FlatTable::FloatColumn); + electronTable->addColumn("dr04TkSumPt",elec_dr04TkSumPt,"track iso deposit with electron footprint removed relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("dr04EcalRecHitSumEt",elec_dr04EcalRecHitSumEt,"ECAL iso deposit with electron footprint removed relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("dr04HcalDepth1TowerSumEt",elec_dr04HcalDepth1TowerSumEt,"HCAL depth 1 iso deposit with electron footprint removed relative to the electron pt",nanoaod::FlatTable::FloatColumn); electronTable->addColumn("dr04HcalDepth1TowerSumEtBc",elec_dr04HcalDepth1TowerSumEtBc,"HCAL depth 1 iso deposit without towers behind cluster relative to the electron pt",nanoaod::FlatTable::FloatColumn); diff --git a/NANOProducer/test/crab.py b/NANOProducer/test/crab.py index e64990f..8515558 100644 --- a/NANOProducer/test/crab.py +++ b/NANOProducer/test/crab.py @@ -7,25 +7,6 @@ myJobs = { - "TTToSemiLeptonic_TuneCP5_PSweights_13TeV-powheg-pythia8-2016":{ - "inputDataset":"/TTToSemiLeptonic_TuneCP5_PSweights_13TeV-powheg-pythia8/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v1/MINIAODSIM", - "year": 2016, - "unitsPerJob": 2 - }, - "SingleMuon_Run2016D":{ - "inputDataset": "/SingleMuon/Run2016D-17Jul2018-v1/MINIAOD", - "isData": True, - "year": 2016 - }, - "GluGluH_HToSSTobbbb_MH-125_MS-15_ctauS-100_TuneCUETP8M1_13TeV-powheg-pythia8":{ - "inputDataset": "/GluGluH_HToSSTobbbb_MH-125_MS-15_ctauS-100_TuneCUETP8M1_13TeV-powheg-pythia8_PRIVATE-MC/kjpena-RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3_MINIAODSIM-bd3e7bcff6c9bcad356ea4ed7e4f08b4/USER", - "year": 2016, - "LLPtype": "hss" - } -} - - -''' "TTJets_TuneCUETP8M1_13TeV-madgraphMLM-pythia8-2016":{ "inputDataset":"/TTJets_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v1/MINIAODSIM", "year": 2016, @@ -41,6 +22,13 @@ "year": 2018, "unitsPerJob": 2 }, + + "TTToSemiLeptonic_TuneCP5_PSweights_13TeV-powheg-pythia8-2016":{ + "inputDataset":"/TTToSemiLeptonic_TuneCP5_PSweights_13TeV-powheg-pythia8/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v1/MINIAODSIM", + "year": 2016, + "unitsPerJob": 2 + }, + "TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8_ext1-2017":{ "inputDataset":"/TTToSemiLeptonic_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14_ext1-v1/MINIAODSIM", "year": 2017, @@ -68,10 +56,68 @@ "year": 2018, "unitsPerJob": 2 }, -''' -''' -myJobs = { + + "ST_tW_top_5f_inclusiveDecays_13TeV-powheg-pythia8_TuneCUETP8M1-2016":{ + "inputDataset":"/ST_tW_top_5f_inclusiveDecays_13TeV-powheg-pythia8_TuneCUETP8M1/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3_ext1-v1/MINIAODSIM", + "year": 2016 + }, + + "ST_tW_antitop_5f_inclusiveDecays_13TeV-powheg-pythia8_TuneCUETP8M1-2016":{ + "inputDataset":"/ST_tW_antitop_5f_inclusiveDecays_13TeV-powheg-pythia8_TuneCUETP8M1/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3_ext1-v1/MINIAODSIM", + "year": 2016 + }, + + "ST_tW_top_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8-2017":{ + "inputDataset":"/ST_tW_top_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v1/MINIAODSIM", + "year": 2017 + }, + + "ST_tW_antitop_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8-2017":{ + "inputDataset":"/ST_tW_antitop_5f_inclusiveDecays_TuneCP5_PSweights_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v2/MINIAODSIM", + "year": 2017 + }, + + "ST_tW_top_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8-2018":{ + "inputDataset":"/ST_tW_top_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15_ext1-v1/MINIAODSIM", + "year": 2018 + }, + + "ST_tW_antitop_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8-2018":{ + "inputDataset":"/ST_tW_antitop_5f_inclusiveDecays_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15_ext1-v1/MINIAODSIM", + "year": 2018 + }, + + "ST_t-channel_top_4f_inclusiveDecays_13TeV-powhegV2-madspin-pythia8_TuneCUETP8M1-2016":{ + "inputDataset":"/ST_t-channel_top_4f_inclusiveDecays_13TeV-powhegV2-madspin-pythia8_TuneCUETP8M1/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v1/MINIAODSIM", + "year": 2016 + }, + + "ST_t-channel_antitop_4f_inclusiveDecays_13TeV-powhegV2-madspin-pythia8_TuneCUETP8M1-2016":{ + "inputDataset":"/ST_t-channel_antitop_4f_inclusiveDecays_13TeV-powhegV2-madspin-pythia8_TuneCUETP8M1/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v1/MINIAODSIM", + "year": 2016 + }, + + "ST_t-channel_top_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8-2017":{ + "inputDataset":"/ST_t-channel_top_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v1/MINIAODSIM", + "year": 2017 + }, + + "ST_t-channel_antitop_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8-2017":{ + "inputDataset":"/ST_t-channel_antitop_4f_inclusiveDecays_TuneCP5_13TeV-powhegV2-madspin-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v1/MINIAODSIM", + "year": 2017 + }, + + "ST_t-channel_top_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8-2018":{ + "inputDataset":"/ST_t-channel_top_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v1/MINIAODSIM", + "year": 2018 + }, + + "ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8-2018":{ + "inputDataset":"/ST_t-channel_antitop_4f_InclusiveDecays_TuneCP5_13TeV-powheg-madspin-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v1/MINIAODSIM", + "year": 2018 + }, + "DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8-2016":{ "inputDataset":"/DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v3/MINIAODSIM", "year": 2016, @@ -88,9 +134,7 @@ "year": 2016, "unitsPerJob": 2 }, - - - + "DYJetsToLL_0J_TuneCP5_13TeV-amcatnloFXFX-pythia8-2017":{ "inputDataset":"/DYJetsToLL_0J_TuneCP5_13TeV-amcatnloFXFX-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v1/MINIAODSIM", "year": 2017, @@ -123,13 +167,6 @@ "year": 2018, "unitsPerJob": 2 }, -} -''' - - - -''' -myJobs = { "WToLNu_0J_13TeV-amcatnloFXFX-pythia8-2016":{ "inputDataset":"/WToLNu_0J_13TeV-amcatnloFXFX-pythia8/RunIISummer16MiniAODv3-PUMoriond17_backup_94X_mcRun2_asymptotic_v3-v1/MINIAODSIM", @@ -155,7 +192,7 @@ }, - + "WToLNu_1J_13TeV-amcatnloFXFX-pythia8-2016":{ "inputDataset":"/WToLNu_1J_13TeV-amcatnloFXFX-pythia8/RunIISummer16MiniAODv3-PUMoriond17_backup_94X_mcRun2_asymptotic_v3-v2/MINIAODSIM", "year": 2016, @@ -193,10 +230,7 @@ "year": 2018, "unitsPerJob": 2 }, -} -''' -''' -myJobs = { + "QCD_Pt-15to20_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8-2016":{ "inputDataset":"/QCD_Pt-15to20_MuEnrichedPt5_TuneCUETP8M1_13TeV_pythia8/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v2/MINIAODSIM", "year": 2016, @@ -259,8 +293,6 @@ }, - - "QCD_Pt-15to20_MuEnrichedPt5_TuneCP5_13TeV_pythia8-2017":{ "inputDataset":"/QCD_Pt-15to20_MuEnrichedPt5_TuneCP5_13TeV_pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v1/MINIAODSIM", "year": 2017, @@ -322,8 +354,7 @@ "unitsPerJob": 2 }, - - + "QCD_Pt-15to20_MuEnrichedPt5_TuneCP5_13TeV_pythia8-2018":{ "inputDataset":"/QCD_Pt-15to20_MuEnrichedPt5_TuneCP5_13TeV_pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM", "year": 2018, @@ -385,7 +416,6 @@ "unitsPerJob": 2 }, } -''' @@ -433,7 +463,6 @@ ''' -''' myJobs = { "SingleMuon_Run2016B_ver1":{ "inputDataset": "/SingleMuon/Run2016B-17Jul2018_ver1-v1/MINIAOD", diff --git a/NANOProducer/test/produceNANO.py b/NANOProducer/test/produceNANO.py index 77bdb00..e1c823b 100644 --- a/NANOProducer/test/produceNANO.py +++ b/NANOProducer/test/produceNANO.py @@ -200,7 +200,8 @@ jetCorrections = jetCorrectionsAK4PFchs, pfCandidates = cms.InputTag('packedPFCandidates'), pvSource = cms.InputTag("offlineSlimmedPrimaryVertices"), - svSource = cms.InputTag('adaptedSlimmedSecondaryVertices'), + #svSource = cms.InputTag('adaptedSlimmedSecondaryVertices'), + svSource = cms.InputTag('slimmedSecondaryVertices'), muSource = cms.InputTag('slimmedMuons'), elSource = cms.InputTag('slimmedElectrons'), btagInfos = [ @@ -218,7 +219,8 @@ electronSrc = cms.InputTag("slimmedElectrons"), shallow_tag_infos = cms.InputTag('pfDeepCSVTagInfosXTag'), vertices = cms.InputTag('offlineSlimmedPrimaryVertices'), - secondary_vertices = cms.InputTag("adaptedSlimmedSecondaryVertices") + #secondary_vertices = cms.InputTag("adaptedSlimmedSecondaryVertices") + secondary_vertices = cms.InputTag("slimmedSecondaryVertices") ) process.nanoTable = cms.EDProducer("NANOProducer", @@ -293,7 +295,7 @@ electronPtThreshold = cms.double(1.), ) #process.load('RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff') -process.load('LLPReco.NANOProducer.adaptedSV_cff') +#process.load('LLPReco.NANOProducer.adaptedSV_cff') process.selectedMuonsForFilter = cms.EDFilter("CandViewSelector", @@ -324,14 +326,14 @@ process.llpnanoAOD_step = cms.Path( process.muonFilterSequence+ process.nanoSequence+ - process.adaptedVertexing+ + #process.adaptedVertexing+ process.pfXTagInfos+ process.nanoTable ) else: process.llpnanoAOD_step = cms.Path( process.nanoSequenceMC+ - process.adaptedVertexing+ + #process.adaptedVertexing+ process.pfXTagInfos+ process.displacedGenVertexSequence+ process.llpGenDecayInfo+ @@ -385,7 +387,9 @@ #override final jets -print process.nanoSequence +#process.finalJets.addBTagInfo=cms.bool(True) +#process.finalJets.addDiscriminators = cms.bool(True) +#process.finalJets.addTagInfos=cms.bool(True) #remove unneeded modules for moduleName in modulesToRemove: diff --git a/XTagInfoProducer/plugins/XTagInfoProducer.cc b/XTagInfoProducer/plugins/XTagInfoProducer.cc index 21e3822..8a785d8 100644 --- a/XTagInfoProducer/plugins/XTagInfoProducer.cc +++ b/XTagInfoProducer/plugins/XTagInfoProducer.cc @@ -268,8 +268,8 @@ XTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) llpdnnx::SecondaryVertexFeatures sv_features; sv_features.sv_ptrel = sv.pt()/uncorrectedPt; - sv_features.sv_deta = std::fabs(sv.eta()-jet.eta()); - sv_features.sv_dphi = std::fabs(reco::deltaPhi(sv.phi(),jet.phi())); + sv_features.sv_deta = sv.eta()-jet.eta(); + sv_features.sv_dphi = reco::deltaPhi(sv.phi(),jet.phi()); sv_features.sv_deltaR = reco::deltaR(sv,jet); sv_features.sv_mass = sv.mass(); sv_features.sv_ntracks = sv.numberOfDaughters(); @@ -428,8 +428,8 @@ XTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) mu_features.mu_isStandAlone = muon.isStandAloneMuon(); mu_features.mu_ptrel = muon.pt()/uncorrectedPt; - mu_features.mu_deta = std::fabs(muon.eta()-jet.eta()); - mu_features.mu_dphi = std::fabs(reco::deltaPhi(muon.phi(),jet.phi())); + mu_features.mu_deta = muon.eta()-jet.eta(); + mu_features.mu_dphi = reco::deltaPhi(muon.phi(),jet.phi()); mu_features.mu_charge = muon.charge(); mu_features.mu_energy = muon.energy()/muon.pt(); mu_features.mu_et = muon.et(); @@ -518,12 +518,12 @@ XTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) if (reco::deltaR(electron, jet) > 0.4) continue; elec_features.elec_ptrel = electron.pt()/uncorrectedPt; - elec_features.elec_deta = std::fabs(electron.eta()-jet.eta()); - elec_features.elec_dphi = std::fabs(reco::deltaPhi(electron.phi(),jet.phi())); + elec_features.elec_deta = electron.eta()-jet.eta(); + elec_features.elec_dphi = reco::deltaPhi(electron.phi(),jet.phi()); elec_features.elec_charge = electron.charge(); elec_features.elec_energy = electron.energy()/electron.pt(); elec_features.elec_jetDeltaR = reco::deltaR(electron,jet); - elec_features.elec_EtFromCaloEn = electron.caloEnergy() * sin(electron.p4().theta()); + elec_features.elec_EtFromCaloEn = electron.caloEnergy() * sin(electron.p4().theta())/ electron.pt(); elec_features.elec_ecalDrivenSeed = electron.ecalDrivenSeed(); elec_features.elec_isEB = electron.isEB(); @@ -555,39 +555,11 @@ XTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) elec_features.elec_sCseedEta = electron.superCluster()->seed()->eta(); - elec_features.elec_e5x5 = electron.e5x5(); - elec_features.elec_e5x5Rel = electron.e5x5()/jet.pt(); - elec_features.elec_e1x5Overe5x5 = electron.e1x5()/electron.e5x5(); - elec_features.elec_e2x5MaxOvere5x5 = electron.e2x5Max()/electron.e5x5(); elec_features.elec_eSeedClusterOverP = electron.eSeedClusterOverP(); elec_features.elec_eSeedClusterOverPout = electron.eSeedClusterOverPout(); elec_features.elec_eSuperClusterOverP = electron.eSuperClusterOverP(); - elec_features.elec_eTopOvere5x5 = electron.eTop()/electron.e5x5(); - elec_features.elec_hadronicOverEm = electron.hadronicOverEm(); - elec_features.elec_full5x5_sigmaIetaIeta = electron.full5x5_sigmaIetaIeta(); - - elec_features.elec_full5x5_e5x5 = electron.full5x5_e5x5(); - elec_features.elec_full5x5_e5x5Rel = electron.full5x5_e5x5()/jet.pt(); - - elec_features.elec_full5x5_e1x5Overe5x5 = electron.full5x5_e1x5()/electron.full5x5_e5x5(); - elec_features.elec_full5x5_e2x5BottomOvere5x5 = electron.full5x5_e2x5Bottom()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_e2x5LeftOvere5x5 = electron.full5x5_e2x5Left()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_e2x5MaxOvere5x5 = electron.full5x5_e2x5Max()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_e2x5RightOvere5x5 = electron.full5x5_e2x5Right()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_e2x5TopOvere5x5 = electron.full5x5_e2x5Top()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_eBottomOvere5x5 = electron.full5x5_eBottom()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_eLeftOvere5x5 = electron.full5x5_eLeft()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_eRightOvere5x5 = electron.full5x5_eRight()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_eTopOvere5x5 = electron.full5x5_eTop()/ electron.full5x5_e5x5(); - elec_features.elec_full5x5_hcalDepth1OverEcal = electron.full5x5_hcalDepth1OverEcal(); - elec_features.elec_full5x5_hcalDepth1OverEcalBc = electron.full5x5_hcalDepth1OverEcalBc(); - elec_features.elec_full5x5_hcalDepth2OverEcal = electron.full5x5_hcalDepth2OverEcal(); - elec_features.elec_full5x5_hcalDepth2OverEcalBc = electron.full5x5_hcalDepth2OverEcalBc(); - elec_features.elec_full5x5_hcalOverEcal = electron.full5x5_hcalOverEcal(); - elec_features.elec_full5x5_hcalOverEcalBc = electron.full5x5_hcalOverEcalBc(); - elec_features.elec_full5x5_r9 = electron.full5x5_r9(); elec_features.elec_deltaEtaEleClusterTrackAtCalo = electron.deltaEtaEleClusterTrackAtCalo(); @@ -603,7 +575,7 @@ XTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) reco::Candidate::Vector electronMom = electron.gsfTrack()->momentum(); - elec_features.elec_EtaRel =reco::btau::etaRel(jetDir, electronMom); + elec_features.elec_EtaRel = reco::btau::etaRel(jetDir, electronMom); elec_features.elec_dxy = electron.gsfTrack()->dxy(pv.position()); elec_features.elec_dz = electron.gsfTrack()->dz(pv.position()); elec_features.elec_nbOfMissingHits = electron.gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS); @@ -613,35 +585,45 @@ XTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) elec_features.elecSC_energy = electron.superCluster()->energy()/electron.pt(); - elec_features.elecSC_deta = std::fabs(electron.superCluster()->eta()-electron.gsfTrack()->eta()); - elec_features.elecSC_dphi = std::fabs(reco::deltaPhi(electron.superCluster()->phi(),electron.gsfTrack()->phi())); + elec_features.elecSC_deta = electron.superCluster()->eta()-electron.gsfTrack()->eta(); + elec_features.elecSC_dphi = reco::deltaPhi(electron.superCluster()->phi(),electron.gsfTrack()->phi()); elec_features.elecSC_et = electron.superCluster()->energy() * sin(electron.p4().theta())/electron.pt(); elec_features.elec_scPixCharge = electron.scPixCharge(); elec_features.elec_numberOfBrems = electron.numberOfBrems(); - if(electron.pt() >= 5. ){ + if(electron.pt() >= 5.){ elec_features.elec_fbrem = electron.fbrem(); - elec_features.elec_scSigmaEtaEta = electron.scSigmaEtaEta(); - elec_features.elec_scSigmaIEtaIEta = electron.scSigmaIEtaIEta(); + elec_features.elec_sigmaEtaEta = electron.sigmaEtaEta(); + elec_features.elec_sigmaIetaIeta = electron.sigmaIetaIeta(); + elec_features.elec_sigmaIphiIphi = electron.sigmaIphiIphi(); + elec_features.elec_r9 = electron.r9(); elec_features.elec_superClusterFbrem = electron.superClusterFbrem(); + } else { elec_features.elec_fbrem = -1.; - elec_features.elec_scSigmaEtaEta = -1.; - elec_features.elec_scSigmaIEtaIEta = -1.; + elec_features.elec_sigmaEtaEta = -1.; + elec_features.elec_sigmaIetaIeta = -1.; + elec_features.elec_sigmaIphiIphi = -1; elec_features.elec_superClusterFbrem = -1.; } + elec_features.elec_e5x5 = electron.e5x5(); + elec_features.elec_e5x5Rel = electron.e5x5()/jet.pt(); + elec_features.elec_e1x5Overe5x5 = electron.e1x5()/electron.e5x5(); + elec_features.elec_e2x5MaxOvere5x5 = electron.e2x5Max()/electron.e5x5(); + + if (electron.e5x5() == 0){ + elec_features.elec_e1x5Overe5x5 = -1.; + elec_features.elec_e2x5MaxOvere5x5 = -1.; + } + elec_features.elec_hcalOverEcal = electron.hcalOverEcal(); + elec_features.elec_hcalDepth1OverEcal = electron.hcalDepth1OverEcal(); + elec_features.elec_hcalDepth2OverEcal = electron.hcalDepth2OverEcal(); - // scSigmaEtaEta and scSigmaIEtaIEta and fbrem and superClusterFbrem - elec_features.elec_scE5x5 = electron.scE5x5(); - elec_features.elec_scE5x5Rel = electron.scE5x5()/jet.pt(); - elec_features.elec_scE1x5Overe5x5 = electron.scE1x5 ()/electron.scE5x5(); - elec_features.elec_scE2x5MaxOvere5x5 = electron.scE2x5Max()/electron.scE5x5(); elec_features.elecSC_eSuperClusterOverP = electron.eSuperClusterOverP(); - elec_features.elec_neutralHadronIso = electron.neutralHadronIso()/electron.pt(); elec_features.elec_photonIso = electron.photonIso()/electron.pt(); @@ -653,21 +635,16 @@ XTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) elec_features.elec_ecalPFClusterIso = electron.ecalPFClusterIso()/electron.pt(); elec_features.elec_hcalPFClusterIso = electron.hcalPFClusterIso()/electron.pt(); - elec_features.elec_dr03TkSumPt = electron.dr03TkSumPt()/electron.pt(); - elec_features.elec_dr03EcalRecHitSumEt = electron.dr03EcalRecHitSumEt()/electron.pt(); - - elec_features.elec_dr03HcalDepth1TowerSumEt = electron.dr03HcalDepth1TowerSumEt()/electron.pt(); - elec_features.elec_dr03HcalDepth1TowerSumEtBc = electron.dr03HcalDepth1TowerSumEtBc()/electron.pt(); - elec_features.elec_dr03HcalDepth2TowerSumEt = electron.dr03HcalDepth2TowerSumEt()/electron.pt(); - elec_features.elec_dr03HcalDepth2TowerSumEtBc = electron.dr03HcalDepth2TowerSumEtBc()/electron.pt(); + elec_features.elec_pfSumPhotonEt = electron.pfIsolationVariables().sumPhotonEt/electron.pt(); elec_features.elec_pfSumChargedHadronPt = electron.pfIsolationVariables().sumChargedHadronPt/electron.pt(); elec_features.elec_pfSumNeutralHadronEt = electron.pfIsolationVariables().sumNeutralHadronEt/electron.pt(); elec_features.elec_pfSumPUPt = electron.pfIsolationVariables().sumPUPt/electron.pt(); - + // isolation + elec_features.elec_dr04TkSumPt = electron.dr04TkSumPt()/electron.pt(); elec_features.elec_dr04EcalRecHitSumEt = electron.dr04EcalRecHitSumEt()/electron.pt(); elec_features.elec_dr04HcalDepth1TowerSumEt = electron.dr04HcalDepth1TowerSumEt()/electron.pt(); elec_features.elec_dr04HcalDepth1TowerSumEtBc = electron.dr04HcalDepth1TowerSumEtBc()/electron.pt();