17namespace HLT {
namespace MET {
27 return initializeBase({
"NeutralPFOs",
"ChargedHSPFOs",
"ChargedPUPFOs"});
32 const EventContext& context,
36 if (!charged.isValid())
39 return StatusCode::FAILURE;
42 if (!neutral.isValid())
45 return StatusCode::FAILURE;
48 std::array<METComponent, 3> pfoSums;
51 pfoSums.at(0) += *ipfo;
55 (PVMatchedAcc(*ipfo) ? pfoSums.at(1) : pfoSums.at(2) ) += *ipfo;
60 total += pfoSums.at(2);
62 for (std::size_t ii = 0; ii < 3; ++ii)
63 pfoSums.at(ii).fillMETComponent(ii,
met);
64 return StatusCode::SUCCESS;
#define CHECK(...)
Evaluate an expression and check for errors.
FexBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode initializeBase(const std::vector< std::string > &componentNames)
Initialize the base class.
Helper struct to build up MET values before moving them into the EDM.
void fillMET(xAOD::TrigMissingET &met) const
Fill the main component of the MET with this.
virtual StatusCode initialize() override
Initialize the fex.
virtual StatusCode fillMET(xAOD::TrigMissingET &met, const EventContext &context, MonGroupBuilder &monitors) const override
Calculate and fill the output MET value.
PFSumFex(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< xAOD::IParticleContainer > m_chargedPFOKey
Input charged PFOs.
SG::ReadHandleKey< xAOD::IParticleContainer > m_neutralPFOKey
Input neutral PFOs.
Gaudi::Property< bool > m_chargedOnlyFromPV
Whether to only include charged PFOs that are matched to the PV vertex.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Class providing the definition of the 4-vector interface.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TrigMissingET_v1 TrigMissingET
Define the most recent version of the TrigMissingET class.