29 : FexBase(
name, pSvcLocator)
38 if (m_inputCategoryKey.key().find(
".") == std::string::npos)
39 m_inputCategoryKey = m_inputKey.key() +
"." + m_inputCategoryKey.key();
42 ATH_MSG_ERROR(
"Input category key does not match the input key!");
43 return StatusCode::FAILURE;
45 CHECK(m_inputCategoryKey.initialize());
46 return initializeBase({
"NeutralForward",
"ChargedHS",
"ChargedPU",
"UncorrSelNF"});
51 const EventContext &context,
52 MonGroupBuilder &)
const
59 return StatusCode::FAILURE;
61 auto categoryAcc = SG::makeHandle<int>(m_inputCategoryKey, context);
71 ipart->e(), ipart->eta(), ipart->phi());
85 return StatusCode::FAILURE;
98 std::size_t
count = 0;
99 for (PUSplitGrid &grid : gridset.grids)
101 if (tower.sumEt(m_neutralThresholdMode) >
threshold)
118 gridset, m_neutralThresholdMode);
119 const PUSplitGrid &grid = gridset[displacement];
124 PufitUtils::CovarianceSum pileupSum;
125 std::vector<SignedKinematics> masked;
126 masked.reserve(
count);
127 std::vector<double> means;
128 means.reserve(
count);
129 std::vector<double> variances(
count, variance);
138 pileupSum.add(kin, getSigma(kin));
145 if (m_subtractCPUFromMean)
146 means.push_back(
mean - cPUKin.pt());
148 means.push_back(
mean);
152 pileupSum.add(cPUKin, getSigma(cPUKin));
163 for (
const SignedKinematics &kin : masked)
184 pileupSum.covariance,
188 m_constraintImportance);
192 for (
const SignedKinematics &kin : corrections)
194 ATH_MSG_DEBUG(
"Correction: (px, py, pz, et) = (" << kin.px() <<
", " << kin.py() <<
", " << kin.pz() <<
", " << kin.et() <<
")");
199 ATH_MSG_DEBUG(
"Tower variance is 0 => there were no towers in the trimmed mean calculation with energy > 0. Skip the corrections");
203 return StatusCode::SUCCESS;