Skip to content

Commit

Permalink
Merge pull request #27208 from Sam-Harper/ZeroPFClusEUncert_1060
Browse files Browse the repository at this point in the history
zeroing PF clustering uncertainty : 106X
  • Loading branch information
cmsbuild committed Jun 17, 2019
2 parents 6af6c5f + 91ba701 commit d032c93
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
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

0 comments on commit d032c93

Please sign in to comment.