ATLAS Offline Software
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
35 class CaloCellContainer;
36 class CaloCellList;
37 
38 namespace Ringer {
39 
41  virtual public ICaloRingsBuilder
42 {
43 
44  public:
45 
48 
51  CaloRingsBuilder(const std::string& type,
52  const std::string& name,
53  const IInterface* parent);
54 
60 
63 
66  virtual StatusCode initialize() override;
67 
72  , xAOD::RingSetContainer* rsCont
73  , const std::size_t nReserve = 0) override;
78  ElementLink<xAOD::CaloRingsContainer> &clRingsLink) override;
82  virtual StatusCode execute(const xAOD::CaloCluster &cluster,
83  ElementLink<xAOD::CaloRingsContainer> &clRingsLink) override;
87  virtual StatusCode finalize() override;
89 
92 
96  return m_rsRawConfCol;
97  };
101  bool useShowerShapeBarycenter() override {
103  };
105 
106  std::size_t nRingSets() const override { return m_nRingSets; }
107 
110 
111  protected:
112 
115 
118  template<typename T>
120  const T &input,
125  virtual StatusCode buildRingSet(
127  const AtlasGeoPoint &seed,
128  xAOD::RingSet *rs);
134  const xAOD::CaloCluster &cluster,
135  AtlasGeoPoint &seed );
139  static StatusCode getRingSetSeed(
140  const xAOD::RingSetConf::RawConf &/*rawConf*/,
141  const xAOD::IParticle &part,
142  AtlasGeoPoint &seed);
144 
147 
152  "CaloRingsContainerName",
153  "CaloRings",
154  "Name of the CaloRings container"};
155 
160  "RingSetContainerName",
161  "RingSets",
162  "Name of the RingSets container"};
163 
168  "CellsContainerName",
169  "AllCalo",
170  "Key to obtain the cell container"};
171 
175  Gaudi::Property<std::vector<float>> m_etaWidth {this,
176  "EtaWidth", {}, "Each RingSet ring eta width."};
180  Gaudi::Property<std::vector<float>> m_phiWidth {this,
181  "PhiWidth", {}, "Each RingSet ring phi width."};
185  Gaudi::Property<float> m_cellMaxDEtaDist{this,
186  "CellMaxDEtaDist", 0,
187  "Maximum cell distance to the seed in eta."};
191  Gaudi::Property<float> m_cellMaxDPhiDist{this,
192  "CellMaxDPhiDist", 0,
193  "Maximum cell distance to the seed in phi."};
197  Gaudi::Property<std::vector<unsigned int>> m_nRings{this,
198  "NRings", {},
199  "Each RingSet number of rings."};
203  Gaudi::Property<float> m_minEnergy{this,
204  "MinPartEnergy", std::numeric_limits<float>::lowest(),
205  "Minimum particle/cluster energy to build rings (GeV)."};
214  Gaudi::Property<std::vector<int/*=CaloCell_ID::CaloSample*/>>
215  m_layers{this,
216  "Layers", {},
217  "Concatenated list of layers which will be used "
218  "to build the RingSets"};
222  Gaudi::Property<std::vector<unsigned int>> m_nLayers{this,
223  "RingSetNLayers", {},
224  "Each RingSet number of layers from the Layers "
225  "configurable property to use."};
232  Gaudi::Property<bool> m_useShowShapeBarycenter{this,
233  "useShowerShapeBarycenter", false,
234  "Switch to use shower barycenter for each layer, "
235  "instead of the cluster center."};
236 
240  Gaudi::Property<bool> m_doTransverseEnergy{this,
241  "doTransverseEnergy", false,
242  "Switch to use raw cell energy, "
243  "instead of cells ET."};
244 
245  SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this,"CaloDetDescrManager", "CaloDetDescrManager"};
246 
248 
251 
272  static const CaloPhiRange m_phiHelper;
276  size_t m_nRingSets;
278 
279 };
280 
281 } // namespace Ringer
282 
283 #endif
284 
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
RingSetContainerFwd.h
Ringer::CaloRingsBuilder::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: CaloRingsBuilder.h:245
ICaloRingsBuilder.h
Ringer::CaloRingsBuilder::~CaloRingsBuilder
~CaloRingsBuilder()
Destructor.
Ringer::CaloRingsBuilder::finalize
virtual StatusCode finalize() override
finalize method
Definition: CaloRingsBuilder.cxx:125
Ringer::CaloRingsBuilder::useShowerShapeBarycenter
bool useShowerShapeBarycenter() override
Retrieve whether it was set used shower shape barycenter.
Definition: CaloRingsBuilder.h:101
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
CaloPhiRange
This class defines the phi convention for Calorimeters.
Definition: CaloPhiRange.h:28
Ringer::CaloRingsBuilder::getRingSetSeed
StatusCode getRingSetSeed(const xAOD::RingSetConf::RawConf &conf, const xAOD::CaloCluster &cluster, AtlasGeoPoint &seed)
Fill RingSet seed for CaloCluster.
Definition: CaloRingsBuilder.cxx:245
CaloCellList
Definition: CaloCellList.h:40
IParticle.h
Ringer::CaloRingsBuilder::initialize
virtual StatusCode initialize() override
Tool main methods:
Definition: CaloRingsBuilder.cxx:54
Ringer::CaloRingsBuilder::m_etaWidth
Gaudi::Property< std::vector< float > > m_etaWidth
Width of the ring in eta.
Definition: CaloRingsBuilder.h:175
Ringer::CaloRingsBuilder::m_crCont
xAOD::CaloRingsContainer * m_crCont
Create and hold CaloRingsContainer for each event.
Definition: CaloRingsBuilder.h:258
xAOD::RingSetConf_v1::RawConfCollection
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
Definition: RingSetConf_v1.h:124
Ringer::CaloRingsBuilder::m_cellMaxDPhiDist
Gaudi::Property< float > m_cellMaxDPhiDist
Maximum cell distance in phi to seed.
Definition: CaloRingsBuilder.h:191
CaloRingsContainerFwd.h
Ringer::CaloRingsBuilder::m_rsContName
SG::WriteHandleKey< xAOD::RingSetContainer > m_rsContName
Name of RingSetContainer on Event StoreGate.
Definition: CaloRingsBuilder.h:159
Ringer::CaloRingsBuilder::rawConf
const xAOD::RingSetConf::RawConfCollection & rawConf() override
Extra methods:
Definition: CaloRingsBuilder.h:95
Ringer::CaloRingsBuilder::m_phiWidth
Gaudi::Property< std::vector< float > > m_phiWidth
Width of the ring in phi.
Definition: CaloRingsBuilder.h:180
AtlasGeoPoint.h
xAOD::RingSet_v1
Class holding a set of rings.
Definition: RingSet_v1.h:31
Ringer::CaloRingsBuilder::m_cellsContName
SG::ReadHandleKey< CaloCellContainer > m_cellsContName
Name of CaloCellContainer.
Definition: CaloRingsBuilder.h:167
SG::ReadHandleKey< CaloCellContainer >
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Ringer::CaloRingsBuilder::buildRingSet
virtual StatusCode buildRingSet(const xAOD::RingSetConf::RawConf &rawConf, const AtlasGeoPoint &seed, xAOD::RingSet *rs)
main method where the RingSets are built.
Definition: CaloRingsBuilder.cxx:304
Ringer::CaloRingsBuilder::m_doTransverseEnergy
Gaudi::Property< bool > m_doTransverseEnergy
Switch to use raw cell energy instead ET.
Definition: CaloRingsBuilder.h:240
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
Ringer::ICaloRingsBuilder
Definition: ICaloRingsBuilder.h:38
Ringer::CaloRingsBuilder::executeTemp
StatusCode executeTemp(const T &input, ElementLink< xAOD::CaloRingsContainer > &crEL)
Tool protected methods:
Definition: CaloRingsBuilder.cxx:193
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
python.ConfigurableDb.conf
def conf
Definition: ConfigurableDb.py:282
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
Ringer::CaloRingsBuilder::m_layers
Gaudi::Property< std::vector< int > > m_layers
Calorimeter layers in each ringset.
Definition: CaloRingsBuilder.h:215
Ringer::CaloRingsBuilder::CaloRingsBuilder
CaloRingsBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
Definition: CaloRingsBuilder.cxx:39
CaloClusterFwd.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Ringer::CaloRingsBuilder::m_nLayers
Gaudi::Property< std::vector< unsigned int > > m_nLayers
Number of calorimeter layers in each ringset.
Definition: CaloRingsBuilder.h:222
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
AthAlgTool.h
Ringer::CaloRingsBuilder::m_cellMaxDEtaDist
Gaudi::Property< float > m_cellMaxDEtaDist
Maximum cell distance in eta to seed.
Definition: CaloRingsBuilder.h:185
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloPhiRange.h
CaloPhiRange class declaration.
Ringer::CaloRingsBuilder::m_lastValidSeed
AtlasGeoPoint m_lastValidSeed
last valid RingSet seed
Definition: CaloRingsBuilder.h:268
Ringer::CaloRingsBuilder::m_phiHelper
static const CaloPhiRange m_phiHelper
used for phi wrap-around
Definition: CaloRingsBuilder.h:272
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ReadCondHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
Ringer::CaloRingsBuilder::crContName
const SG::WriteHandleKey< xAOD::CaloRingsContainer > & crContName() const override
Definition: CaloRingsBuilder.h:108
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Ringer::CaloRingsBuilder::m_minEnergy
Gaudi::Property< float > m_minEnergy
Minimum particle energy to build rings (GeV)
Definition: CaloRingsBuilder.h:203
Ringer::CaloRingsBuilder::nRingSets
std::size_t nRingSets() const override
Definition: CaloRingsBuilder.h:106
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
Ringer::CaloRingsBuilder::m_nRingSets
size_t m_nRingSets
hold the number of RingSets we are building for each CaloRings
Definition: CaloRingsBuilder.h:276
Ringer::CaloRingsBuilder::m_rsCont
xAOD::RingSetContainer * m_rsCont
Tool props (non configurables):
Definition: CaloRingsBuilder.h:254
SG::ReadCondHandleKey< CaloDetDescrManager >
Ringer::CaloRingsBuilder::m_rsRawConfCol
xAOD::RingSetConf::RawConfCollection m_rsRawConfCol
holds each RingSet configuration (filled at initialize)
Definition: CaloRingsBuilder.h:262
Ringer::CaloRingsBuilder::preExecute
virtual StatusCode preExecute(xAOD::CaloRingsContainer *crCont, xAOD::RingSetContainer *rsCont, const std::size_t nReserve=0) override
method for working on containers
Definition: CaloRingsBuilder.cxx:131
Ringer::CaloRingsBuilder
Definition: CaloRingsBuilder.h:42
Ringer::CaloRingsBuilder::m_crContName
SG::WriteHandleKey< xAOD::CaloRingsContainer > m_crContName
Tool props (python configurables):
Definition: CaloRingsBuilder.h:151
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AtlasGeoPoint
Definition: AtlasGeoPoint.h:15
xAOD::RingSetConf_v1::RawConf
Definition: RingSetConf_v1.h:49
Ringer::CaloRingsBuilder::execute
virtual StatusCode execute(const xAOD::IParticle &particle, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override
build CaloRings for IParticle
Definition: CaloRingsBuilder.cxx:175
Ringer::CaloRingsBuilder::m_nRings
Gaudi::Property< std::vector< unsigned int > > m_nRings
Number of rings in a ringset.
Definition: CaloRingsBuilder.h:197
AthAlgTool
Definition: AthAlgTool.h:26
Ringer::CaloRingsBuilder::rsContName
const SG::WriteHandleKey< xAOD::RingSetContainer > & rsContName() const override
Definition: CaloRingsBuilder.h:109
Ringer::CaloRingsBuilder::m_useShowShapeBarycenter
Gaudi::Property< bool > m_useShowShapeBarycenter
Switch to use shower barycenter seed for each RingSets.
Definition: CaloRingsBuilder.h:232
Ringer
Namespace dedicated for Ringer utilities.
Definition: CaloRingsDefs.h:9