22 ATH_MSG_FATAL(
"No e-gamma collection provided for thinning. At least one "
23 "egamma collection (photons/electrons) must be provided!");
24 return StatusCode::FAILURE;
33 &(*m_caloFillRectangularTool));
35 ATH_MSG_ERROR(
"Pointer to CaloFillRectantularCluster tool is invalid");
36 return StatusCode::FAILURE;
52 return StatusCode::SUCCESS;
75 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>> decorations;
76 for (
unsigned int i = 0; i <
m_layers.size(); i++) {
77 decorations.emplace_back(
83 for (
const auto* photon : *importedPhotons) {
85 for (
unsigned int i = 0; i <
m_layers.size(); i++) {
86 decorations[i](*photon) =
result[i];
101 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>> decorations;
102 for (
unsigned int i = 0; i <
m_layers.size(); i++) {
103 decorations.emplace_back(
109 for (
const auto* electron : *importedElectrons) {
111 for (
unsigned int i = 0; i <
m_layers.size(); i++) {
112 decorations[i](*electron) =
result[i];
117 return StatusCode::SUCCESS;
122 const EventContext& ctx,
126 std::vector<float>
result;
131 std::unique_ptr<xAOD::CaloCluster> egcClone;
135 egamma->caloCluster()->eta0(),
136 egamma->caloCluster()->phi0(),
137 egamma->caloCluster()->clusterSize());
138 m_tool->makeCorrection(ctx, egcClone.get());
141 for (
unsigned int layer :
m_layers) {
142 result.emplace_back(egcClone ? egcClone->energyBE(layer) : 0.);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
xAOD::ElectronContainer * electronContainer
xAOD::PhotonContainer * photonContainer
Container class for CaloCell.
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
Gaudi::Property< std::vector< unsigned int > > m_layers
SG::ReadHandleKey< CaloCellContainer > m_SGKey_caloCells
ToolHandle< CaloClusterProcessor > m_caloFillRectangularTool
virtual StatusCode addBranches(const EventContext &ctx) const override final
std::vector< float > decorateObject(const EventContext &ctx, const xAOD::Egamma *egamma, const CaloCellContainer *cellCont) const
virtual StatusCode initialize() override final
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
const CaloFillRectangularCluster * m_tool
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
const_pointer_type ptr()
Dereference the pointer.
unsigned int author() const
Reconstruction Author.
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
Egamma_v1 Egamma
Definition of the current "egamma version".
EgammaContainer_v1 EgammaContainer
Definition of the current "egamma container version".