ATLAS Offline Software
Loading...
Searching...
No Matches
CaloBlueprintNodeBuilder.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 ACTSGEOMETRY_CALOBLUEPRINTNODEBUILDER_H
6#define ACTSGEOMETRY_CALOBLUEPRINTNODEBUILDER_H
7
10
11#include "Acts/Surfaces/CylinderSurface.hpp"
12#include "Acts/Surfaces/DiscSurface.hpp"
13#include "Acts/Utilities/Helpers.hpp"
14
16#include "CaloDetDescr/CaloDetDescrElement.h"
17
18#include <array>
19#include <memory>
20#include <span>
21
22
23namespace ActsTrk {
24
25
29 class CaloBlueprintNodeBuilder : public extends<AthAlgTool, IBlueprintNodeBuilder> {
30 public:
31
36 friend std::ostream& operator<<(std::ostream& ostr, const caloRegion region) {
37 using enum caloRegion;
38 switch(region) {
39 case DiscNegativeZ: ostr<<"DiscNegativeZ"; break;
40 case DiscPositiveZ: ostr<<"DiscPositiveZ"; break;
41 case BarrelCylinder: ostr<<"BarrelCylinder"; break;
42 case nRegions: ostr<<"nRegions"; break;
43 }
44 return ostr;
45 }
46
47 using DetElVec_t = std::vector<const CaloDetDescrElement*>;
50
52 using SurfaceMap_t = std::array<std::vector<std::shared_ptr<Acts::Surface>>,
53 Acts::toUnderlying(caloRegion::nRegions)>;
54
55 using base_class::base_class;
57 std::shared_ptr<Acts::BlueprintNode> buildBlueprintNode(const Acts::GeometryContext& gctx,
58 std::shared_ptr<Acts::BlueprintNode>&& childNode) override;
60 virtual StatusCode initialize() override final;
61
62 private:
75
81 std::shared_ptr<Acts::Surface> createCylinderSurface(std::span<const CaloDetDescrElement* const> detElements) const;
82
87 std::shared_ptr<Acts::Surface> createDiscSurface(std::span<const CaloDetDescrElement* const> detElements) const;
94 std::unique_ptr<Acts::TrackingVolume> envelopeVolume(const Acts::GeometryContext& tgContext,
95 const SurfaceMap_t& surfacesPerRegion) const;
102 std::vector<std::shared_ptr<Acts::Surface>> fillLayer(const Acts::GeometryContext& tgContext,
103 std::shared_ptr<Acts::Surface>&& centralSurf) const;
104
106 Gaudi::Property<std::vector<std::uint32_t>> m_surfaceDuplicates{this, "insertExtraSurfaces",
107 std::vector<std::uint32_t>(CaloSampling::Unknown, 0) };
108
109 Gaudi::Property<double> m_radiusTolerance { this
110 , "RadiusTolerance"
111 , 2.0
112 , "Tolerance for determining if a ring of cells in phi has changed the radius w.r.t to the previous ring in phi" };
113
114 Gaudi::Property<double> m_zTolerance { this
115 , "ZTolerance"
116 , 2.0
117 , "Tolerance for determining if a ring of cells in phi has changed the z w.r.t to the previous ring in phi" };
118 };
119}
121#endif
ACTS_OSTREAM_FORMATTER(ActsTrk::CaloBlueprintNodeBuilder::caloRegion)
Definition of CaloDetDescrManager.
Builds the Calo Blueprint Node.
DetElementMap_t fillDetectorElements(const CaloDetDescrManager &detDecrMgr) const
Fill the detector elements per calorimeter layer and sort them in ascending r(z) for the barrel (endc...
Gaudi::Property< std::vector< std::uint32_t > > m_surfaceDuplicates
Configure the insert of extra surfaces per each calorimeter layer.
std::vector< const CaloDetDescrElement * > DetElVec_t
std::vector< std::shared_ptr< Acts::Surface > > fillLayer(const Acts::GeometryContext &tgContext, std::shared_ptr< Acts::Surface > &&centralSurf) const
Fill the layer with extra surfaces.
SurfaceMap_t translateToSurfaces(const DetElementMap_t &detElements) const
Translate all detector elements to a Cylinder and Disc surfaces.
std::shared_ptr< Acts::Surface > createDiscSurface(std::span< const CaloDetDescrElement *const > detElements) const
Create a disc surface from the passed calo description elements.
std::unique_ptr< Acts::TrackingVolume > envelopeVolume(const Acts::GeometryContext &tgContext, const SurfaceMap_t &surfacesPerRegion) const
Create the envelope volume of the Calo Tracking Geometry.
std::array< std::vector< std::shared_ptr< Acts::Surface > >, Acts::toUnderlying(caloRegion::nRegions)> SurfaceMap_t
Vector of surfaces per calorimeter region.
std::shared_ptr< Acts::Surface > createCylinderSurface(std::span< const CaloDetDescrElement *const > detElements) const
Create a cylinder surface from a list of Calo detector description elements.
std::array< DetElVec_t, CaloSampling::getNumberOfSamplings()> DetElementMap_t
Vector of Detector Elements per calorimeter layer.
friend std::ostream & operator<<(std::ostream &ostr, const caloRegion region)
virtual StatusCode initialize() override final
std::shared_ptr< Acts::BlueprintNode > buildBlueprintNode(const Acts::GeometryContext &gctx, std::shared_ptr< Acts::BlueprintNode > &&childNode) override
This class groups all DetDescr information related to a CaloCell.
This class provides the client interface for accessing the detector description information common to...
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
Support class for PropertyMgr.
Definition Property.h:23
STL class.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
=============================================================================
STL namespace.
#define private
Definition testRead.cxx:27