Skip to content

Commit

Permalink
cleanup TkElectron interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cerminar committed Nov 16, 2023
1 parent 7104592 commit 5f4b728
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
4 changes: 0 additions & 4 deletions DataFormats/L1TCorrelator/interface/TkElectron.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ namespace l1t {
const edm::Ptr<L1TTTrackType>& 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<L1TTTrackType>& 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 {
Expand All @@ -58,8 +56,6 @@ namespace l1t {
private:
edm::Ptr<L1TTTrackType> trkPtr_;
float trkzVtx_;
// FIXME: do we really need this?
double trackCurvature_;
float idScore_;
};
} // namespace l1t
Expand Down
2 changes: 0 additions & 2 deletions DataFormats/L1TCorrelator/src/TkElectron.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
//

#include "DataFormats/L1TCorrelator/interface/TkElectron.h"
// FIXME: can remove
#include "DataFormats/Common/interface/RefToPtr.h"

using namespace l1t;

Expand Down
3 changes: 2 additions & 1 deletion DataFormats/L1TCorrelator/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
<class name="edm::Wrapper<std::vector<l1t::L1CaloTkTau> >"/>
<class name="edm::Ref<std::vector<l1t::L1CaloTkTau>,l1t::L1CaloTkTau,edm::refhelper::FindUsingAdvance<std::vector<l1t::L1CaloTkTau>,l1t::L1CaloTkTau> >"/>

<class name="l1t::TkElectron" ClassVersion="7">
<class name="l1t::TkElectron" ClassVersion="8">
<version ClassVersion="8" checksum="3565138561"/>
<version ClassVersion="7" checksum="3055953431"/>
<version ClassVersion="6" checksum="3899336964"/>
<version ClassVersion="5" checksum="965807884"/>
Expand Down
12 changes: 4 additions & 8 deletions L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handle<l1t::TkElectronCol
l1extra_.tkElectronEt.push_back(it->et());
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());
Expand All @@ -227,8 +226,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handle<l1t::TkElectronCol
l1extra_.tkElectronEt.push_back(it->et());
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());
Expand All @@ -255,8 +253,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handle<l1t::TkElectronC
l1extra_.tkElectronV2Et.push_back(it->et());
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());
Expand All @@ -280,8 +277,7 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handle<l1t::TkElectronC
l1extra_.tkElectronV2Et.push_back(it->et());
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());
Expand Down
6 changes: 2 additions & 4 deletions L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handle<l1t::TkElectr
l1extra_.tkElectronEt.push_back(it->et());
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());
Expand All @@ -198,8 +197,7 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handle<l1t::TkElectr
l1extra_.tkElectronEt.push_back(it->et());
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());
Expand Down

0 comments on commit 5f4b728

Please sign in to comment.