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

zeroing PF clustering uncertainty : 106X #27208

Merged
merged 1 commit into from Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -53,6 +53,7 @@ class PFClusterEMEnergyCorrector {
bool srfAwareCorrection_;
bool applyCrackCorrections_;
bool applyMVACorrections_;
bool setEnergyUncertainty_;

bool autoDetectBunchSpacing_;
int bunchSpacingManual_;
Expand Down
Expand Up @@ -132,6 +132,7 @@ void CorrectedECALPFClusterProducer::fillDescriptions(edm::ConfigurationDescript
psd0.add<bool>("applyCrackCorrections",false);
psd0.add<bool>("applyMVACorrections",false);
psd0.add<bool>("srfAwareCorrection",false);
psd0.add<bool>("setEnergyUncertainty",false);
psd0.add<bool>("autoDetectBunchSpacing",true);
psd0.add<int>("bunchSpacing",25);
psd0.add<double>("maxPtForMVAEvaluation",-99.);
Expand Down
Expand Up @@ -19,7 +19,7 @@ PFClusterEMEnergyCorrector::PFClusterEMEnergyCorrector(const edm::ParameterSet&
applyCrackCorrections_ = conf.getParameter<bool>("applyCrackCorrections");
applyMVACorrections_ = conf.getParameter<bool>("applyMVACorrections");
srfAwareCorrection_ = conf.getParameter<bool>("srfAwareCorrection");

setEnergyUncertainty_ = conf.getParameter<bool>("setEnergyUncertainty");
maxPtForMVAEvaluation_ = conf.getParameter<double>("maxPtForMVAEvaluation");

if (applyMVACorrections_) {
Expand Down Expand Up @@ -250,8 +250,9 @@ void PFClusterEMEnergyCorrector::correctEnergies(const edm::Event &evt,
double sigmacor = sigma*ecor;

cluster.setCorrectedEnergy(ecor);
cluster.setCorrectedEnergyUncertainty(sigmacor);

if(setEnergyUncertainty_) cluster.setCorrectedEnergyUncertainty(sigmacor);
else cluster.setCorrectedEnergyUncertainty(0.);

}
return;
}
Expand Down Expand Up @@ -414,7 +415,9 @@ void PFClusterEMEnergyCorrector::correctEnergies(const edm::Event &evt,
<< exp(mean) << " " << ecor;

cluster.setCorrectedEnergy(ecor);
cluster.setCorrectedEnergyUncertainty(sigmacor);
if(setEnergyUncertainty_) cluster.setCorrectedEnergyUncertainty(sigmacor);
else cluster.setCorrectedEnergyUncertainty(0.);

}

}
Expand Down