19 const std::string& name, ISvcLocator* loc )
29 return StatusCode::SUCCESS;
35 using IPLV = std::vector<ElementLink<xAOD::IParticleContainer>>;
42 for (
const auto* obj: *constituents) {
45 for (
const auto& link: constituents(*obj)) {
46 if (!link.isValid())
throw std::runtime_error(
47 "invalid constituent link");
49 if (!flow)
throw std::runtime_error(
"constituent isn't flow object");
50 if (!flow->isCharged()) neutral_flows.push_back(link);
51 else charged_flows.push_back(link);
53 neutralConstituentsOut(*obj) = std::move(neutral_flows);
54 chargedConstituentsOut(*obj) = std::move(charged_flows);
57 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
FlowSelectorAlg(const std::string &name, ISvcLocator *pSvcLocator)
< Constructors
SG::ReadDecorHandleKey< IPC > m_constituentKey
virtual StatusCode execute(const EventContext &) const override
SG::WriteDecorHandleKey< IPC > m_chargedConstituentOutKey
virtual StatusCode initialize() override
SG::WriteDecorHandleKey< IPC > m_neutralConstituentOutKey
FlowElement_v1 FlowElement
Definition of the current "pfo version".