Skip to content

Commit

Permalink
fix: s4 is correct variable to be used with the model, not e2x2
Browse files Browse the repository at this point in the history
  • Loading branch information
smorovic committed Mar 27, 2024
1 parent a0ed168 commit b365265
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PhotonXGBoostEstimator {
float sigmaIEtaIEtaIn,
float etaWidthIn,
float phiWidthIn,
float e2x2In,
float s4In,
float etaIn,
float hOvrEIn,
float ecalPFIsoIn) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ void PhotonXGBoostProducer::produce(edm::StreamID, edm::Event& event, edm::Event
float hoe = (*hoEMap).find(ref)->val / scEnergy;
float siEtaiEta = (*sigmaiEtaiEtaMap).find(ref)->val;
float e2x2 = (*e2x2Map).find(ref)->val;
float s4 = e2x2 / scEnergy;
float iso = (*isoMap).find(ref)->val;

float rawEnergy = ref->superCluster()->rawEnergy();
Expand All @@ -124,9 +125,9 @@ void PhotonXGBoostProducer::produce(edm::StreamID, edm::Event& event, edm::Event
//compute only above threshold used for training and cand filter, else store negative value into the association map.
if (scEt >= mvaThresholdEt_) {
if (std::abs(etaSC) < 1.5)
xgbScore = mvaEstimatorB_->computeMva(rawEnergy, r9, siEtaiEta, etaW, phiW, e2x2, etaSC, hoe, iso);
xgbScore = mvaEstimatorB_->computeMva(rawEnergy, r9, siEtaiEta, etaW, phiW, s4, etaSC, hoe, iso);
else
xgbScore = mvaEstimatorE_->computeMva(rawEnergy, r9, siEtaiEta, etaW, phiW, e2x2, etaSC, hoe, iso);
xgbScore = mvaEstimatorE_->computeMva(rawEnergy, r9, siEtaiEta, etaW, phiW, s4, etaSC, hoe, iso);
}
mvaScoreMap.insert(ref, xgbScore);
}
Expand Down
6 changes: 3 additions & 3 deletions RecoEgamma/PhotonIdentification/src/PhotonXGBoostEstimator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace {
sigmaIEtaIEta = 2, // 2
etaWidth = 3, // 3
phiWidth = 4, // 4
e2x2 = 5, // 5
s4 = 5, // 5
eta = 6, // 6
hOvrE = 7, // 7
ecalPFIso = 8, // 8
Expand All @@ -33,7 +33,7 @@ float PhotonXGBoostEstimator::computeMva(float rawEnergyIn,
float sigmaIEtaIEtaIn,
float etaWidthIn,
float phiWidthIn,
float e2x2In,
float s4In,
float etaIn,
float hOvrEIn,
float ecalPFIsoIn) const {
Expand All @@ -43,7 +43,7 @@ float PhotonXGBoostEstimator::computeMva(float rawEnergyIn,
var[sigmaIEtaIEta] = sigmaIEtaIEtaIn;
var[etaWidth] = etaWidthIn;
var[phiWidth] = phiWidthIn;
var[e2x2] = e2x2In;
var[s4] = s4In;
var[eta] = etaIn;
var[hOvrE] = hOvrEIn;
var[ecalPFIso] = ecalPFIsoIn;
Expand Down

0 comments on commit b365265

Please sign in to comment.