Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix using fabs(eta) and the smearingSigma method #12

Open
wants to merge 1 commit into
base: Egamma80XMiniAODV2_946
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions RecoEgamma/EgammaTools/src/EnergyScaleCorrection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ float EnergyScaleCorrection::smearingSigma(int runnr, double et, double eta, dou
{
const SmearCorrection* smearCorr = getSmearCorr(runnr,et,eta,r9,gainSeed);

if(smearCorr!=nullptr) return smearCorr->sigma(nrSigmaRho,nrSigmaPhi);
if(smearCorr!=nullptr) return smearCorr->sigma(et, nrSigmaRho,nrSigmaPhi);
else return kDefaultSmearVal_;
}

Expand All @@ -76,7 +76,7 @@ const EnergyScaleCorrection::ScaleCorrection*
EnergyScaleCorrection::getScaleCorr(unsigned int runnr, double et, double eta, double r9,
unsigned int gainSeed) const
{

eta=fabs(eta);
// buld the category based on the values of the object
CorrectionCategory category(runnr, et, eta, r9, gainSeed);
auto result = std::equal_range(scales_.begin(),scales_.end(),category,Sorter<CorrectionCategory,ScaleCorrection>());
Expand All @@ -102,7 +102,7 @@ const EnergyScaleCorrection::SmearCorrection*
EnergyScaleCorrection::getSmearCorr(unsigned int runnr, double et, double eta, double r9,
unsigned int gainSeed) const
{

eta=fabs(eta);
// buld the category based on the values of the object
CorrectionCategory category(runnr, et, eta, r9, gainSeed);
auto result = std::equal_range(smearings_.begin(),smearings_.end(),category,Sorter<CorrectionCategory,SmearCorrection>());
Expand Down