14#include "Gaudi/Interfaces/IOptionsSvc.h"
27 m_tool.setTypeAndName(
"CP::EgammaCalibrationAndSmearingTool/AutoConfiguredEgammaCalibTool");
29 josvc->set(
"ToolSvc.AutoConfiguredEgammaCalibTool.esModel",
"es2012c");
33 return StatusCode::SUCCESS;
37 const EventContext& ctx = Gaudi::Hive::currentContext();
47 return StatusCode::FAILURE;
54 std::pair<std::unique_ptr<xAOD::ElectronContainer>, std::unique_ptr<xAOD::ShallowAuxContainer>> output =
xAOD::shallowCopyContainer(*electrons, ctx);
55 if (!output.first || !output.second) {
57 return StatusCode::FAILURE;
59 outcontainer = output.first.get();
64 std::pair<std::unique_ptr<xAOD::PhotonContainer>, std::unique_ptr<xAOD::ShallowAuxContainer>> output =
xAOD::shallowCopyContainer(*photons, ctx);
65 if (!output.first || !output.second) {
67 return StatusCode::FAILURE;
69 outcontainer = output.first.get();
74 return StatusCode::FAILURE;
78 return StatusCode::FAILURE;
86 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode initialize()
Function initialising the algorithm.
CalibratedEgammaProvider(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
virtual StatusCode execute()
Function executing the algorithm.
SG::ReadHandleKey< xAOD::EgammaContainer > m_inputKey
ToolHandle< CP::IEgammaCalibrationAndSmearingTool > m_tool
SG::WriteHandleKey< xAOD::EgammaContainer > m_outputKey
@ Error
Some error happened during the object correction.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode recordNonConst(std::unique_ptr< T > data)
Record a non-const object to the store.
Select isolated Photons, Electrons and Muons.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
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.
Egamma_v1 Egamma
Definition of the current "egamma version".
bool setOriginalObjectLink(const IParticle &original, IParticle ©)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
EgammaContainer_v1 EgammaContainer
Definition of the current "egamma container version".