ATLAS Offline Software
Loading...
Searching...
No Matches
CaloRingsBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CALORINGERTOOLS_CALORINGSBUILDER_H
6#define CALORINGERTOOLS_CALORINGSBUILDER_H
7
8// Base includes:
11
12// Wrap-around phi helper include:
14
16
17// xAOD Includes:
18#include "xAODBase/IParticle.h"
22
23// StoreGate includes:
27// Forward declarations
30
31// STL includes:
32#include <string>
33#include <vector>
34#include <limits>
35
37class CaloCellList;
38
39namespace Ringer
40{
41
43 virtual public ICaloRingsBuilder
44 {
45
46 public:
49
52 CaloRingsBuilder(const std::string &type,
53 const std::string &name,
54 const IInterface *parent);
55
61
64
67 virtual StatusCode initialize() override;
68
72 virtual StatusCode preExecute(xAOD::CaloRingsContainer *crCont, xAOD::RingSetContainer *rsCont, const std::size_t nReserve = 0) override;
76 virtual StatusCode execute(const xAOD::IParticle &particle,
77 ElementLink<xAOD::CaloRingsContainer> &clRingsLink) override;
81 virtual StatusCode execute(const xAOD::CaloCluster &cluster,
82 ElementLink<xAOD::CaloRingsContainer> &clRingsLink) override;
86 virtual StatusCode finalize() override;
88
91
95 {
96 return m_rsRawConfCol;
97 };
98
102 {
104 };
105
106
107 std::size_t nRingSets() const override { return m_nRingSets; }
108
111
112 protected:
115
118 virtual StatusCode buildRingSet(
120 const AtlasGeoPoint &seed,
125 StatusCode getRingSetSeed(
126 const xAOD::RingSetConf::RawConf &conf,
127 const xAOD::CaloCluster &cluster,
128 AtlasGeoPoint &seed);
132 static StatusCode getRingSetSeed(
133 const xAOD::RingSetConf::RawConf & /*rawConf*/,
134 const xAOD::IParticle &part,
135 AtlasGeoPoint &seed);
137
140
145 this,
146 "CaloRingsContainerName",
147 "CaloRings",
148 "Name of the CaloRings container"};
149
154 this,
155 "RingSetContainerName",
156 "RingSets",
157 "Name of the RingSets container"};
158
163 this,
164 "CellsContainerName",
165 "AllCalo",
166 "Key to obtain the cell container"};
167
171 Gaudi::Property<std::vector<float>> m_etaWidth{
172 this,
173 "EtaWidth",
174 {},
175 "Each RingSet ring eta width."};
176
179 Gaudi::Property<std::vector<float>> m_phiWidth{
180 this,
181 "PhiWidth",
182 {},
183 "Each RingSet ring phi width."};
184
187 Gaudi::Property<float> m_cellMaxDEtaDist{
188 this,
189 "CellMaxDEtaDist", 0,
190 "Maximum cell distance to the seed in eta."};
191
194 Gaudi::Property<float> m_cellMaxDPhiDist{
195 this,
196 "CellMaxDPhiDist", 0,
197 "Maximum cell distance to the seed in phi."};
198
201 Gaudi::Property<std::vector<unsigned int>> m_nRings{
202 this,
203 "NRings",
204 {},
205 "Each RingSet number of rings."};
206
209 Gaudi::Property<float> m_minEnergy{
210 this,
211 "MinPartEnergy", std::numeric_limits<float>::lowest(),
212 "Minimum particle/cluster energy to build rings (GeV)."};
213
221 Gaudi::Property<std::vector<int /*=CaloCell_ID::CaloSample*/>>
223 this,
224 "Layers",
225 {},
226 "Concatenated list of layers which will be used "
227 "to build the RingSets"};
228
231 Gaudi::Property<std::vector<unsigned int>> m_nLayers{
232 this,
233 "RingSetNLayers",
234 {},
235 "Each RingSet number of layers from the Layers "
236 "configurable property to use."};
237
243 Gaudi::Property<bool> m_useShowShapeBarycenter{
244 this,
245 "useShowerShapeBarycenter", false,
246 "Switch to use shower barycenter for each layer, "
247 "instead of the cluster center."};
248
252 Gaudi::Property<bool> m_doTransverseEnergy{
253 this,
254 "doTransverseEnergy", false,
255 "Switch to use raw cell energy, "
256 "instead of cells ET."};
257
258 SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this, "CaloDetDescrManager", "CaloDetDescrManager"};
259
261
264
291
292 private:
295
298 template <typename T>
299 StatusCode executeTemp(
300 const T &input,
303 };
304
305} // namespace Ringer
306
307#endif
Definition of CaloDetDescrManager.
CaloPhiRange class declaration.
static Double_t rs
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Container class for CaloCell.
This class defines the phi convention for Calorimeters.
virtual StatusCode buildRingSet(const xAOD::RingSetConf::RawConf &rawConf, const AtlasGeoPoint &seed, xAOD::RingSet *rs)
Tool protected methods:
CaloRingsBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
const SG::WriteHandleKey< xAOD::RingSetContainer > & rsContName() const override
~CaloRingsBuilder()
Destructor.
SG::WriteHandleKey< xAOD::RingSetContainer > m_rsContName
Name of RingSetContainer on Event StoreGate.
const xAOD::RingSetConf::RawConfCollection & rawConf() override
Extra methods:
xAOD::RingSetConf::RawConfCollection m_rsRawConfCol
holds each RingSet configuration (filled at initialize)
virtual StatusCode execute(const xAOD::IParticle &particle, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override
build CaloRings for IParticle
StatusCode getRingSetSeed(const xAOD::RingSetConf::RawConf &conf, const xAOD::CaloCluster &cluster, AtlasGeoPoint &seed)
Fill RingSet seed for CaloCluster.
std::size_t nRingSets() const override
SG::WriteHandleKey< xAOD::CaloRingsContainer > m_crContName
Tool props (python configurables):
Gaudi::Property< float > m_minEnergy
Minimum particle energy to build rings (GeV)
size_t m_nRingSets
hold the number of RingSets we are building for each CaloRings
Gaudi::Property< std::vector< float > > m_etaWidth
Width of the ring in eta.
static const CaloPhiRange m_phiHelper
used for phi wrap-around
Gaudi::Property< bool > m_doTransverseEnergy
Switch to use raw cell energy instead ET.
StatusCode executeTemp(const T &input, ElementLink< xAOD::CaloRingsContainer > &crEL)
Tool private methods:
Gaudi::Property< std::vector< unsigned int > > m_nLayers
Number of calorimeter layers in each ringset.
Gaudi::Property< float > m_cellMaxDEtaDist
Maximum cell distance in eta to seed.
const SG::WriteHandleKey< xAOD::CaloRingsContainer > & crContName() const override
xAOD::RingSetContainer * m_rsCont
Tool props (non configurables):
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
virtual StatusCode preExecute(xAOD::CaloRingsContainer *crCont, xAOD::RingSetContainer *rsCont, const std::size_t nReserve=0) override
method for working on containers
Gaudi::Property< std::vector< float > > m_phiWidth
Width of the ring in phi.
xAOD::CaloRingsContainer * m_crCont
Create and hold CaloRingsContainer for each event.
bool useShowerShapeBarycenter() override
Retrieve whether it was set used shower shape barycenter.
SG::ReadHandleKey< CaloCellContainer > m_cellsContName
Name of CaloCellContainer.
AtlasGeoPoint m_lastValidSeed
last valid RingSet seed
Gaudi::Property< std::vector< unsigned int > > m_nRings
Number of rings in a ringset.
Gaudi::Property< bool > m_useShowShapeBarycenter
Switch to use shower barycenter seed for each RingSets.
Gaudi::Property< std::vector< int > > m_layers
Calorimeter layers in each ringset.
virtual StatusCode finalize() override
finalize method
virtual StatusCode initialize() override
Tool main methods:
Gaudi::Property< float > m_cellMaxDPhiDist
Maximum cell distance in phi to seed.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Class providing the definition of the 4-vector interface.
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
Namespace dedicated for Ringer utilities.
RingSet_v1 RingSet
Definition of the current "RingSet version".
Definition RingSet.h:15
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
RingSetContainer_v1 RingSetContainer
Definition of the current "RingSet container version".
CaloRingsContainer_v1 CaloRingsContainer
Definition of the current "CaloRings container version".