ATLAS Offline Software
Loading...
Searching...
No Matches
PFOClusterMLCorrectionAlgorithm.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9{
10 ATH_MSG_DEBUG("Initializing");
11 ATH_CHECK(m_correctionTool.retrieve());
16
17 return StatusCode::SUCCESS;
18}
19
20StatusCode PFOClusterMLCorrectionAlgorithm::execute(const EventContext &ctx) const
21{
22
23 ATH_MSG_DEBUG("Executing");
24
25 // Read charged container
27 auto [chargedFEMLContainer, chargedFEMLContainerAux] = xAOD::shallowCopy(*chargedFEContainerReadHandle);
28
29 // Read neutral container
31 auto [neutralFEMLContainer, neutralFEMLContainerAux] = xAOD::shallowCopy(*neutralFEContainerReadHandle);
32
33 // Modification step
34 m_correctionTool->correctContainer(*neutralFEMLContainer, *chargedFEMLContainer);
35
36 // Writing containers
38 ATH_CHECK(chargedFEMLContainerWriteHandle.record(std::move(chargedFEMLContainer), std::move(chargedFEMLContainerAux)));
40 ATH_CHECK(neutralFEMLContainerWriteHandle.record(std::move(neutralFEMLContainer), std::move(neutralFEMLContainerAux)));
41
42 return StatusCode::SUCCESS;
43}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
SG::ReadHandleKey< xAOD::FlowElementContainer > m_neutralFEContainerReadHandleKey
ReadHandleKey for eflowCaloObjectContainer.
SG::WriteHandleKey< xAOD::FlowElementContainer > m_neutralFEMLContainerWriteHandleKey
WriteHandleKey for neutral FE.
ToolHandle< IPFOContainerCorrectionTool > m_correctionTool
SG::ReadHandleKey< xAOD::FlowElementContainer > m_chargedFEContainerReadHandleKey
SG::WriteHandleKey< xAOD::FlowElementContainer > m_chargedFEMLContainerWriteHandleKey
StatusCode execute(const EventContext &ctx) const
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ShallowCopyResult_t< T > shallowCopy(const T &cont, const EventContext &ctx)
Create a shallow copy of an existing container.