ATLAS Offline Software
Loading...
Searching...
No Matches
GainDecorator.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// Decorate egamma objects with the energy and number of cells per layer per
6// gain
7
8#ifndef DERIVATIONFRAMEWORK_GainDecorator_H
9#define DERIVATIONFRAMEWORK_GainDecorator_H
10
11
14
18#include <map>
19#include <string>
20#include <vector>
21
22class CaloCell;
23
24namespace DerivationFramework {
25
26 class GainDecorator : public extends<AthAlgTool, IAugmentationTool>
27 {
28 public:
29
30 using base_class::base_class;
31
32 virtual StatusCode initialize() override final;
33 virtual StatusCode addBranches(const EventContext& ctx) const override final;
34 static int getLayer(const CaloCell* cell); // TODO Why is this public?
35
37 {
38 std::map<std::pair<int, int>, float> EnoW;
39 std::map<std::pair<int, int>, float> E;
40 std::map<std::pair<int, int>, uint8_t> nCells;
41 };
42
43 private:
45 this, "SGKey_photons", "", "SG key of photon container" };
46
48 this, "SGKey_electrons", "", "SG key of electron container" };
49
50 Gaudi::Property< std::map<int, std::string> > m_gainNames{this, "gain_names",
51 { { CaloGain::LARHIGHGAIN, "Hi" },
52 { CaloGain::LARMEDIUMGAIN, "Med" },
53 { CaloGain::LARLOWGAIN, "Low" } } };
54 Gaudi::Property< std::vector<unsigned int> > m_layers{this, "layers", { 0, 1, 2, 3 }};
55
56 // // Name of the decorations
57 std::vector<std::pair<int, int>> m_names_E;
58
61 this,
62 "SGKey_photons_decorations",
64 "SG keys for photon decorations not really configurable"
65 };
66
69 this,
70 "SGKey_electrons_decorations",
72 "SG keys for electrons decorations not really configurable"
73 };
74
75 calculation decorateObject(const xAOD::Egamma*& egamma) const;
76 };
77}
78
79#endif // DERIVATIONFRAMEWORK_GainDecorator_H
Property holding a SG store/key/clid from which a ReadHandle is made.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
std::vector< std::pair< int, int > > m_names_E
static int getLayer(const CaloCell *cell)
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
virtual StatusCode initialize() override final
Gaudi::Property< std::map< int, std::string > > m_gainNames
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
virtual StatusCode addBranches(const EventContext &ctx) const override final
Gaudi::Property< std::vector< unsigned int > > m_layers
calculation decorateObject(const xAOD::Egamma *&egamma) const
Property holding a SG store/key/clid from which a ReadHandle is made.
elec/gamma data class.
Definition egamma.h:58
@ LARMEDIUMGAIN
Definition CaloGain.h:18
@ LARLOWGAIN
Definition CaloGain.h:18
@ LARHIGHGAIN
Definition CaloGain.h:18
THE reconstruction tool.
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17
std::map< std::pair< int, int >, uint8_t > nCells
std::map< std::pair< int, int >, float > E
std::map< std::pair< int, int >, float > EnoW