59 return StatusCode::SUCCESS;
91 return StatusCode::SUCCESS;
98 const EventContext& ctx)
const
111 decoration0(decorKeys[0], ctx);
113 decoration1(decorKeys[1], ctx);
115 decoration2(decorKeys[2], ctx);
117 decoration3(decorKeys[3], ctx);
119 decoration4(decorKeys[4], ctx);
121 decoration5(decorKeys[5], ctx);
123 decoration6(decorKeys[6], ctx);
125 decoration7(decorKeys[7], ctx);
127 decoration8(decorKeys[8], ctx);
129 decoration9(decorKeys[9], ctx);
131 decoration10(decorKeys[10], ctx);
133 decoration11(decorKeys[11], ctx);
140 for (
const auto*
egamma : *importedEgamma) {
155 decoration9(*
egamma) =
res.cells_quality;
157 decoration11(*
egamma) =
res.cells_clusterOriginInfo;
160 return StatusCode::SUCCESS;
169 const EventContext& ctx)
const
183 throw std::runtime_error(
"Cabling retrieval failed");
186 std::unordered_map<const CaloCell*, CaloCellDecorator::CellClusterInfo> info;
191 auto registerCell = [&](
const CaloCell* cell, uint8_t originMask) {
193 if (layer < 0)
return;
199 ci.
mask |= originMask;
204 uint64_t onlId = (uint64_t)(cabling->createSignalChannelID(cell->caloDDE()->identify())).get_compact();
205 decorations.
cells_E.push_back(cell->e());
206 decorations.
cells_time.push_back(cell->time());
207 decorations.
cells_eta.push_back(cell->eta());
208 decorations.
cells_phi.push_back(cell->phi());
209 decorations.
cells_x.push_back(cell->x());
210 decorations.
cells_y.push_back(cell->y());
211 decorations.
cells_z.push_back(cell->z());
212 decorations.
cells_gain.push_back((
int)cell->gain());
229 for (
const CaloCell* cell : *cluster) {
233 if (cell->e() > emax) {
238 registerCell(cell, 0x01);
242 if (maxcell->
e() > 0.) {
249 ATH_MSG_WARNING(
"Max cell in L2 has zero energy, should never happen! Skipping timing cut recovery");
254 registerCell(cell, 0x02);
259 ATH_MSG_WARNING(
"egammaLargeClusterCellRecoveryTool execution failed");
264 registerCell(cell, 0x04);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Adds cell-level features as decorations to e/gamma objects. The cells included are those in the objec...
Calculate total energy, position, etc. for a given layer of a cluster.
std::pair< std::vector< unsigned int >, bool > res
Handle class for reading from StoreGate.
Container class for CaloCell.
Data object for each calorimeter readout cell.
virtual double e() const override final
get energy (data member) (synonym to method energy()
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
float eta_raw() const
cell eta_raw
float phi_raw() const
cell phi_raw
This class provides the client interface for accessing the detector description information common to...
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
ToolHandle< IegammaLargeClusterCellRecoveryTool > m_egammaLargeClusterCellRecoveryTool
Pointer to egammaLargeClusterCellRecoveryTool.
ToolHandle< IegammaCellRecoveryTool > m_egammaCellRecoveryTool
Pointer to the egammaCellRecoveryTool.
StatusCode decorateCells(const SG::ReadHandleKey< xAOD::EgammaContainer > &contKey, const SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > &decorKeys, const EventContext &ctx) const
Decorates e/gamma objects with vector cell features E, t, eta, phi, layer, x, y, z,...
CellDecorationData getDecorations(const xAOD::CaloCluster *cluster, const CaloCellContainer *caloCells, const CaloDetDescrManager *cmgr, const EventContext &ctx) const
Loops through cells and adds to decoration struct.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
virtual StatusCode addBranches(const EventContext &ctx) const override final
int layerFromSampling(int s) const
Inline to get calorimeter sampling.
virtual StatusCode initialize() override final
SG::ReadHandleKey< CaloCellContainer > m_SGKey_CaloCells
Property holding a SG store/key/clid from which a ReadHandle is made.
const_pointer_type ptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
This is a data object, containing a collection of egamma Objects.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current egammaContainer
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
EgammaContainer_v1 EgammaContainer
Definition of the current "egamma container version".
Struct to keep track of where cell came from e.g.
Struct to hold cell decoration data.
std::vector< uint64_t > cells_onlId
std::vector< float > cells_phi
std::vector< float > cells_y
std::vector< int > cells_gain
std::vector< int > cells_quality
std::vector< int > cells_layer
std::vector< float > cells_E
std::vector< float > cells_z
std::vector< float > cells_x
std::vector< float > cells_eta
std::vector< float > cells_time
std::vector< uint8_t > cells_clusterOriginInfo