ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellDecorator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * @file DerivationFrameworkCalo/DerivationFrameworkCalo/CaloCellDecorator.h
7 * @author Gabriel P. Matos <gpinheir@cern.ch>, adapted from MaxCellDecorator by Nikiforos K. Nikiforou and others.
8 * @date Aug, 2025
9 * @brief Adds cell-level features as decorations to e/gamma objects.
10 */
11
12#ifndef DERIVATIONFRAMEWORK_CALOCELLDECORATOR_H
13#define DERIVATIONFRAMEWORK_CALOCELLDECORATOR_H
14
15#include <string>
16#include <vector>
17
20
21#include "GaudiKernel/EventContext.h"
29
30namespace DerivationFramework {
31
32 class CaloCellDecorator : public extends<AthAlgTool, IAugmentationTool>
33 {
34
35 public:
36 using base_class::base_class;
37
39 virtual StatusCode initialize() override final;
40 virtual StatusCode addBranches(const EventContext& ctx) const override final;
41
43 {
44
45 // Vector features, LAr only
46 std::vector<float> cells_E{};
47 std::vector<float> cells_time{};
48 std::vector<float> cells_eta{};
49 std::vector<float> cells_phi{};
50 std::vector<float> cells_x{};
51 std::vector<float> cells_y{};
52 std::vector<float> cells_z{};
53 std::vector<int> cells_gain{};
54 std::vector<int> cells_layer{};
55 std::vector<int> cells_quality{};
56 std::vector<uint64_t> cells_onlId{};
57
58 // Total number of cells, LAr + Tile
59 int ncells = 0;
60
61 };
62
63 private:
64
65 // LAr cabling
67 this,
68 "CablingKey",
69 "LArOnOffIdMap",
70 "SG Key of LArOnOffIdMapping object"
71 };
72
73 // Photon containers
75 this,
76 "SGKey_photons",
77 "",
78 "SG key of photon container"
79 };
80
83 this,
84 "SGKey_photons_decorations",
86 "cells_E", "cells_time", "cells_eta", "cells_phi",
87 "cells_x", "cells_y", "cells_z", "cells_gain",
88 "cells_layer", "cells_quality", "cells_onlId", "ncells"},
89 "SG keys for photon decorations"
90 };
91
92 // Electron containers
94 this,
95 "SGKey_electrons",
96 "",
97 "SG key of electron container"
98 };
99
102 this,
103 "SGKey_electrons_decorations",
105 "cells_E", "cells_time", "cells_eta", "cells_phi",
106 "cells_x", "cells_y", "cells_z", "cells_gain",
107 "cells_layer", "cells_quality", "cells_onlId", "ncells"},
108 "SG keys for electrons decorations"
109 };
110
111 /* @brief Decorates e/gamma objects with vector cell features
112 * E, t, eta, phi, layer, x, y, z, gain, quality factor, and online ID
113 * for LAr cells. Tabulates the total number of cells in the topo
114 * cluster for both LAr and Tile.
115 */
116 StatusCode decorateCells(
119 const EventContext& ctx) const;
120
121 /*
122 * @brief Loops through cells in an e/gamma topo cluster and adds
123 * them to vectors in output struct
124 */
125 cell_decorations getDecorations(
126 const xAOD::CaloCluster* cluster,
127 const EventContext& ctx) const;
128 };
129
130}
131#endif // DERIVATIONFRAMEWORK_CALOCELLDECORATOR_H
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
StatusCode decorateCells(const SG::ReadHandleKey< xAOD::EgammaContainer > &contKey, const SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > &decorKeys, const EventContext &ctx) const
virtual StatusCode addBranches(const EventContext &ctx) const override final
virtual StatusCode initialize() override final
cell_decorations getDecorations(const xAOD::CaloCluster *cluster, const EventContext &ctx) const
Property holding a SG store/key/clid from which a ReadHandle is made.
THE reconstruction tool.
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.