ATLAS Offline Software
Loading...
Searching...
No Matches
PFOClusterMLCorrectionAlgorithm.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
27
28 return StatusCode::SUCCESS;
29}
30
31StatusCode PFOClusterMLCorrectionAlgorithm::shallowCopyChargedFEContainer(const EventContext &ctx) const {
32 // Just a shallow copy, no modifications
34
35 std::pair<xAOD::FlowElementContainer *, xAOD::ShallowAuxContainer *> shallowCopyPair = xAOD::shallowCopyContainer(*chargedFEContainerReadHandle);
36 std::unique_ptr<xAOD::FlowElementContainer> chargedFEMLContainer{shallowCopyPair.first};
37 std::unique_ptr<xAOD::ShallowAuxContainer> chargedFEMLContainerAux{shallowCopyPair.second};
38
40 ATH_CHECK(chargedFEMLContainerWriteHandle.record(std::move(chargedFEMLContainer), std::move(chargedFEMLContainerAux)));
41
42 return StatusCode::SUCCESS;
43}
44
46
47 // Shallow copy step
49 std::pair<xAOD::FlowElementContainer *, xAOD::ShallowAuxContainer *> shallowCopyPair = xAOD::shallowCopyContainer(*neutralFEContainerReadHandle);
50 std::unique_ptr<xAOD::FlowElementContainer> neutralFEMLContainer{shallowCopyPair.first};
51 std::unique_ptr<xAOD::ShallowAuxContainer> neutralFEMLContainerAux{shallowCopyPair.second};
52
53 // Modification step
54 m_correctionTool->correctContainer(*neutralFEMLContainer);
55
56 // Registration of results step
58 ATH_CHECK(neutralFEMLContainerWriteHandle.record(std::move(neutralFEMLContainer), std::move(neutralFEMLContainerAux)));
59
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
StatusCode shallowCopyChargedFEContainer(const EventContext &ctx) const
SG::ReadHandleKey< xAOD::FlowElementContainer > m_neutralFEContainerReadHandleKey
ReadHandleKey for eflowCaloObjectContainer.
SG::WriteHandleKey< xAOD::FlowElementContainer > m_neutralFEMLContainerWriteHandleKey
WriteHandleKey for neutral FE.
StatusCode shallowCopyAndModifyNeutralFEContainer(const EventContext &ctx) const
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.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, const EventContext &ctx)
Function making a shallow copy of a constant container.