ATLAS Offline Software
Loading...
Searching...
No Matches
CaloRingsBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 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// STL includes:
13#include <string>
14#include <vector>
15#include <memory>
16#include <limits>
17
18// Wrap-around phi helper include:
20
22
23// xAOD Includes:
24#include "xAODBase/IParticle.h"
28
29// StoreGate includes:
33// Forward declarations
37class CaloCellList;
38
39namespace Ringer {
40
42 virtual public ICaloRingsBuilder
43{
44
45 public:
46
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
74 , const std::size_t nReserve = 0) override;
78 virtual StatusCode execute(const xAOD::IParticle &particle,
79 ElementLink<xAOD::CaloRingsContainer> &clRingsLink) override;
83 virtual StatusCode execute(const xAOD::CaloCluster &cluster,
84 ElementLink<xAOD::CaloRingsContainer> &clRingsLink) override;
88 virtual StatusCode finalize() override;
90
93
97 return m_rsRawConfCol;
98 };
99
102 bool useShowerShapeBarycenter() override {
104 };
105
106
107 std::size_t nRingSets() const override { return m_nRingSets; }
108
111
112 protected:
113
116
119 template<typename T>
120 StatusCode executeTemp(
121 const T &input,
126 virtual StatusCode buildRingSet(
128 const AtlasGeoPoint &seed,
133 StatusCode getRingSetSeed(
134 const xAOD::RingSetConf::RawConf &conf,
135 const xAOD::CaloCluster &cluster,
136 AtlasGeoPoint &seed );
140 static StatusCode getRingSetSeed(
141 const xAOD::RingSetConf::RawConf &/*rawConf*/,
142 const xAOD::IParticle &part,
143 AtlasGeoPoint &seed);
147 // static StatusCode getRingSetSeed(
148 // const xAOD::RingSetConf::RawConf &/*rawConf*/,
149 // const xAOD::Jet_v1 &jet,
150 // AtlasGeoPoint &seed);
152
155
160 "CaloRingsContainerName",
161 "CaloRings",
162 "Name of the CaloRings container"};
163
168 "RingSetContainerName",
169 "RingSets",
170 "Name of the RingSets container"};
171
176 "CellsContainerName",
177 "AllCalo",
178 "Key to obtain the cell container"};
179
183 Gaudi::Property<std::vector<float>> m_etaWidth {this,
184 "EtaWidth", {}, "Each RingSet ring eta width."};
185
188 Gaudi::Property<std::vector<float>> m_phiWidth {this,
189 "PhiWidth", {}, "Each RingSet ring phi width."};
190
193 Gaudi::Property<float> m_cellMaxDEtaDist{this,
194 "CellMaxDEtaDist", 0,
195 "Maximum cell distance to the seed in eta."};
196
199 Gaudi::Property<float> m_cellMaxDPhiDist{this,
200 "CellMaxDPhiDist", 0,
201 "Maximum cell distance to the seed in phi."};
202
205 Gaudi::Property<std::vector<unsigned int>> m_nRings{this,
206 "NRings", {},
207 "Each RingSet number of rings."};
208
211 Gaudi::Property<float> m_minEnergy{this,
212 "MinPartEnergy", std::numeric_limits<float>::lowest(),
213 "Minimum particle/cluster energy to build rings (GeV)."};
214
222 Gaudi::Property<std::vector<int/*=CaloCell_ID::CaloSample*/>>
224 "Layers", {},
225 "Concatenated list of layers which will be used "
226 "to build the RingSets"};
227
230 Gaudi::Property<std::vector<unsigned int>> m_nLayers{this,
231 "RingSetNLayers", {},
232 "Each RingSet number of layers from the Layers "
233 "configurable property to use."};
234
240 Gaudi::Property<bool> m_useShowShapeBarycenter{this,
241 "useShowerShapeBarycenter", false,
242 "Switch to use shower barycenter for each layer, "
243 "instead of the cluster center."};
244
248 Gaudi::Property<bool> m_doTransverseEnergy{this,
249 "doTransverseEnergy", false,
250 "Switch to use raw cell energy, "
251 "instead of cells ET."};
252
253 SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager", "CaloDetDescrManager"};
254
256
259
286
287};
288
289} // namespace Ringer
290
291#endif
292
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)
main method where the RingSets are built.
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
Fill RingSet seed for IParticle.
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 protected 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.
Gaudi::Property< std::vector< int > > m_layers
Calorimeter layers in each ringset.
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.
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".