Skip to content
Snippets Groups Projects
Commit a682e7ce authored by Jon Burr's avatar Jon Burr Committed by Andrea Coccaro
Browse files

Add protection for very low energy events

Add protection for very low energy events
parent e920faa3
No related branches found
No related tags found
4 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!5717730.09.2022: daily merge merge of 22.0 into master,!57037Add protection for very low energy events
...@@ -82,14 +82,6 @@ namespace HLT ...@@ -82,14 +82,6 @@ namespace HLT
else else
masked.push_back(tower); masked.push_back(tower);
} }
// Perform the fit
std::vector<SignedKinematics> corrections = PufitUtils::pufit(
pileupSum.sum,
pileupSum.covariance,
mean,
variance,
masked,
m_constraintImportance);
// Save the sum over all towers to the corresponding component // Save the sum over all towers to the corresponding component
grid.sum(PufitGrid::SumStrategy::All).fillMETComponent(0, met); grid.sum(PufitGrid::SumStrategy::All).fillMETComponent(0, met);
...@@ -97,9 +89,24 @@ namespace HLT ...@@ -97,9 +89,24 @@ namespace HLT
METComponent sum = grid.sum(PufitGrid::SumStrategy::Masked); METComponent sum = grid.sum(PufitGrid::SumStrategy::Masked);
// Save this uncorrected sum to the corresponding component // Save this uncorrected sum to the corresponding component
sum.fillMETComponent(1, met); sum.fillMETComponent(1, met);
// Apply the corrections
for (const SignedKinematics &kin : corrections) // If variance is 0 then there are no towers in the trimmed mean calculation with energy > 0
sum += kin; // This will cause the fit to fail!
if (variance != 0)
{
// Perform the fit
std::vector<SignedKinematics> corrections = PufitUtils::pufit(
pileupSum.sum,
pileupSum.covariance,
mean,
variance,
masked,
m_constraintImportance);
// Apply the corrections
for (const SignedKinematics &kin : corrections)
sum += kin;
}
sum.fillMET(met); sum.fillMET(met);
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment