From 5f4b728789eab395d8e9e83b362ba715da395b74 Mon Sep 17 00:00:00 2001 From: Gianluca Date: Thu, 16 Nov 2023 17:35:49 +0100 Subject: [PATCH] cleanup TkElectron interface --- DataFormats/L1TCorrelator/interface/TkElectron.h | 4 ---- DataFormats/L1TCorrelator/src/TkElectron.cc | 2 -- DataFormats/L1TCorrelator/src/classes_def.xml | 3 ++- L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc | 12 ++++-------- L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc | 6 ++---- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/DataFormats/L1TCorrelator/interface/TkElectron.h b/DataFormats/L1TCorrelator/interface/TkElectron.h index 3afc327655563..29a1df62b023b 100644 --- a/DataFormats/L1TCorrelator/interface/TkElectron.h +++ b/DataFormats/L1TCorrelator/interface/TkElectron.h @@ -39,13 +39,11 @@ namespace l1t { const edm::Ptr& trkPtr() const { return trkPtr_; } float trkzVtx() const { return trkzVtx_; } - double trackCurvature() const { return trackCurvature_; } float idScore() const { return idScore_; } // ---------- member functions --------------------------- void setTrkPtr(const edm::Ptr& tkPtr) { trkPtr_ = tkPtr; } void setTrkzVtx(float TrkzVtx) { trkzVtx_ = TrkzVtx; } - void setTrackCurvature(double trackCurvature) { trackCurvature_ = trackCurvature; } void setIdScore(float score) { idScore_ = score; } l1gt::Electron hwObj() const { @@ -58,8 +56,6 @@ namespace l1t { private: edm::Ptr trkPtr_; float trkzVtx_; - // FIXME: do we really need this? - double trackCurvature_; float idScore_; }; } // namespace l1t diff --git a/DataFormats/L1TCorrelator/src/TkElectron.cc b/DataFormats/L1TCorrelator/src/TkElectron.cc index 1b5c85f514eee..60a1ae72c91d7 100644 --- a/DataFormats/L1TCorrelator/src/TkElectron.cc +++ b/DataFormats/L1TCorrelator/src/TkElectron.cc @@ -5,8 +5,6 @@ // #include "DataFormats/L1TCorrelator/interface/TkElectron.h" -// FIXME: can remove -#include "DataFormats/Common/interface/RefToPtr.h" using namespace l1t; diff --git a/DataFormats/L1TCorrelator/src/classes_def.xml b/DataFormats/L1TCorrelator/src/classes_def.xml index 49474b8f81a3f..2846fcf2ba77a 100644 --- a/DataFormats/L1TCorrelator/src/classes_def.xml +++ b/DataFormats/L1TCorrelator/src/classes_def.xml @@ -51,7 +51,8 @@ - + + diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc index 147ef36cc31ec..3fc9a7246fd4d 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc @@ -202,8 +202,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + l1extra_.tkElectronChg.push_back(it->charge()); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); l1extra_.tkElectronHwQual.push_back(it->egCaloPtr()->hwQual()); @@ -227,8 +226,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + l1extra_.tkElectronChg.push_back(it->charge()); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); l1extra_.tkElectronHwQual.push_back(it->egCaloPtr()->hwQual()); @@ -255,8 +253,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handleet()); l1extra_.tkElectronV2Eta.push_back(it->eta()); l1extra_.tkElectronV2Phi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronV2Chg.push_back(chargeFromCurvature); + l1extra_.tkElectronV2Chg.push_back(it->charge()); l1extra_.tkElectronV2zVtx.push_back(it->trkzVtx()); l1extra_.tkElectronV2TrkIso.push_back(it->trkIsol()); l1extra_.tkElectronV2HwQual.push_back(it->egCaloPtr()->hwQual()); @@ -280,8 +277,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handleet()); l1extra_.tkElectronV2Eta.push_back(it->eta()); l1extra_.tkElectronV2Phi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronV2Chg.push_back(chargeFromCurvature); + l1extra_.tkElectronV2Chg.push_back(it->charge()); l1extra_.tkElectronV2zVtx.push_back(it->trkzVtx()); l1extra_.tkElectronV2TrkIso.push_back(it->trkIsol()); l1extra_.tkElectronV2HwQual.push_back(it->egCaloPtr()->hwQual()); diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc index ba5fe648d3d43..fb8b40bd8f778 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc @@ -170,8 +170,7 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + l1extra_.tkElectronChg.push_back(it->charge()); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); l1extra_.tkElectronPfIso.push_back(it->pfIsol()); @@ -198,8 +197,7 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + l1extra_.tkElectronChg.push_back(it->charge()); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); l1extra_.tkElectronPfIso.push_back(it->pfIsol());