ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::CaloBlueprintNodeBuilder Class Reference

Builds the Calo Blueprint Node. More...

#include <CaloBlueprintNodeBuilder.h>

Inheritance diagram for ActsTrk::CaloBlueprintNodeBuilder:
Collaboration diagram for ActsTrk::CaloBlueprintNodeBuilder:

Public Types

enum class  caloRegion { DiscNegativeZ , DiscPositiveZ , BarrelCylinder , nRegions }
using DetElVec_t = std::vector<const CaloDetDescrElement*>
using DetElementMap_t = std::array<DetElVec_t, CaloSampling::getNumberOfSamplings()>
 Vector of Detector Elements per calorimeter layer.
using SurfaceMap_t
 Vector of surfaces per calorimeter region.

Public Member Functions

std::shared_ptr< Acts::BlueprintNode > buildBlueprintNode (const Acts::GeometryContext &gctx, std::shared_ptr< Acts::BlueprintNode > &&childNode) override
virtual StatusCode initialize () override final

Private Member Functions

DetElementMap_t fillDetectorElements (const CaloDetDescrManager &detDecrMgr) const
 Fill the detector elements per calorimeter layer and sort them in ascending r(z) for the barrel (endcap) layers.
SurfaceMap_t translateToSurfaces (const DetElementMap_t &detElements) const
 Translate all detector elements to a Cylinder and Disc surfaces.
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::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::vector< std::shared_ptr< Acts::Surface > > fillLayer (const Acts::GeometryContext &tgContext, std::shared_ptr< Acts::Surface > &&centralSurf) const
 Fill the layer with extra surfaces.

Private Attributes

Gaudi::Property< std::vector< std::uint32_t > > m_surfaceDuplicates
 Configure the insert of extra surfaces per each calorimeter layer.
Gaudi::Property< double > m_radiusTolerance
Gaudi::Property< double > m_zTolerance

Friends

std::ostream & operator<< (std::ostream &ostr, const caloRegion region)

Detailed Description

Builds the Calo Blueprint Node.

Definition at line 29 of file CaloBlueprintNodeBuilder.h.

Member Typedef Documentation

◆ DetElementMap_t

Vector of Detector Elements per calorimeter layer.

Definition at line 49 of file CaloBlueprintNodeBuilder.h.

◆ DetElVec_t

◆ SurfaceMap_t

Initial value:
std::array<std::vector<std::shared_ptr<Acts::Surface>>,
Acts::toUnderlying(caloRegion::nRegions)>

Vector of surfaces per calorimeter region.

Definition at line 52 of file CaloBlueprintNodeBuilder.h.

Member Enumeration Documentation

◆ caloRegion

Enumerator
DiscNegativeZ 
DiscPositiveZ 
BarrelCylinder 
nRegions 

Definition at line 32 of file CaloBlueprintNodeBuilder.h.

32 {DiscNegativeZ,
33 DiscPositiveZ,
34 BarrelCylinder,
35 nRegions};

Member Function Documentation

◆ buildBlueprintNode()

std::shared_ptr< Acts::BlueprintNode > ActsTrk::CaloBlueprintNodeBuilder::buildBlueprintNode ( const Acts::GeometryContext & gctx,
std::shared_ptr< Acts::BlueprintNode > && childNode )
override

Build the list of detector elements

Convert the detector elements to surfaces

Bare pointer to put the surfaces that cannot be put into wrapping cylinders

Definition at line 220 of file CaloBlueprintNodeBuilder.cxx.

221 {
222 std::unique_ptr<CaloDetDescrManager> caloDetDescrMgr = buildCaloDetDescrNoAlign(serviceLocator(), Athena::getMessageSvc());
224 DetElementMap_t detElements = fillDetectorElements(*caloDetDescrMgr);
226 SurfaceMap_t sensitives = translateToSurfaces(detElements);
227
228 std::shared_ptr<Acts::BlueprintNode> caloNode{};
230 Acts::TrackingVolume* caloVolume{};
231 {
232 auto caloEnvelope = envelopeVolume(tgContext, sensitives);
233 caloVolume = caloEnvelope.get();
234 caloNode = std::make_unique<Acts::StaticBlueprintNode>(std::move(caloEnvelope));
235 }
236 auto barrelNode = std::make_shared<Acts::CylinderContainerBlueprintNode>(
237 "CaloBarrelCylinder", Acts::AxisDirection::AxisR);
238 barrelNode->setAttachmentStrategy(Acts::VolumeAttachmentStrategy::Second);
239 barrelNode->setResizeStrategy(Acts::VolumeResizeStrategy::Expand);
240 if (childNode) {
241 barrelNode->addChild(std::move(childNode));
242 }
243 std::unordered_map<CaloSampling::CaloSample, unsigned> barrelExtraCounts{};
244 for (std::shared_ptr<Acts::Surface>& surface : sensitives[Acts::toUnderlying(caloRegion::BarrelCylinder)]) {
245 const auto layer = static_cast<CaloSampling::CaloSample>(surface->geometryId().layer());
246 if (s_caloCylinderAsymmetricSampleList.count(layer) ||
247 layer == CaloSampling::TileBar2) {
248 std::ranges::for_each(fillLayer(tgContext, std::move(surface)),
249 [&](std::shared_ptr<Acts::Surface>& surfToAdd){
250 surfToAdd->assignGeometryId(Acts::GeometryIdentifier{}.withVolume(s_caloEnvelopeID)
251 .withLayer(layer)
252 .withSensitive(barrelExtraCounts[layer]++));
253 caloVolume->addSurface(std::move(surfToAdd));
254 });
255 continue;
256 }
257 auto layerNode = std::make_shared<Acts::LayerBlueprintNode>(std::format("{:}_Layer", CaloSampling::getSamplingName(layer)));
258 layerNode->setSurfaces(fillLayer(tgContext, std::move(surface)));
259 layerNode->setEnvelope(Acts::ExtentEnvelope{{
260 .z = {0.1_mm, 0.1_mm},
261 .r = {1._cm, 1._cm}}});
262 auto idNode = std::make_shared<Acts::GeometryIdentifierBlueprintNode>();
263 idNode->addChild(std::move(layerNode));
264 idNode->setAllVolumeIdsTo(s_caloBarrelId);
265 idNode->setLayerIdTo(layer);
266 barrelNode->addChild(std::move(idNode));
267 }
268 caloNode->addChild(std::move(barrelNode));
269 for (const auto& disc: {caloRegion::DiscNegativeZ, caloRegion::DiscPositiveZ}){
270 auto layerNode = std::make_shared<Acts::LayerBlueprintNode>(std::format("CaloLayer{:}", disc));
271 layerNode->setEnvelope(Acts::ExtentEnvelope{{
272 .z = {1_mm, 1_mm},
273 .r = {2_mm, 2_mm}, }});
274 using namespace ActsTrk::detail::GeoVolIds;
275 const std::size_t volId = disc == caloRegion::DiscNegativeZ ? s_caloEndcapCId : s_caloEndcapAId;
276 std::vector<std::shared_ptr<Acts::Surface>> layerSurfaces{};
277
278 for (auto& surface : sensitives[Acts::toUnderlying(disc)]) {
279
280 const auto layer = static_cast<CaloSampling::CaloSample>(surface->geometryId().layer());
281 if (layer != CaloSampling::TileGap3) {
282 std::ranges::for_each(fillLayer(tgContext, std::move(surface)),
283 [&](std::shared_ptr<Acts::Surface>& surf) {
284 surf->assignGeometryId(Acts::GeometryIdentifier{}.withVolume(volId).
285 withLayer(layer).withSensitive(layerSurfaces.size()+1));
286 layerSurfaces.push_back(std::move(surf));
287 });
288 } else {
289 surface->assignGeometryId(surface->geometryId().withVolume(s_caloEnvelopeID)
290 .withSensitive(barrelExtraCounts[layer]++));
291 caloVolume->addSurface(std::move(surface));
292 }
293 }
294 layerNode->setSurfaces(std::move(layerSurfaces));
295 auto idNode = std::make_shared<Acts::GeometryIdentifierBlueprintNode>();
296 idNode->addChild(std::move(layerNode));
297 idNode->setAllVolumeIdsTo(volId);
298 caloNode->addChild(std::move(idNode));
299 }
300 return caloNode;
301}
std::unique_ptr< CaloDetDescrManager > buildCaloDetDescrNoAlign(ISvcLocator *svcLocator, IMessageSvc *msgSvc)
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...
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::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::array< DetElVec_t, CaloSampling::getNumberOfSamplings()> DetElementMap_t
Vector of Detector Elements per calorimeter layer.
static std::string getSamplingName(CaloSample theSample)
Returns a string (name) for each CaloSampling.
constexpr std::size_t s_caloEndcapAId
constexpr std::size_t s_caloEnvelopeID
Volume Ids ofthe Calorimeter.
constexpr std::size_t s_caloBarrelId
constexpr std::size_t s_caloEndcapCId
IMessageSvc * getMessageSvc(bool quiet=false)
@ layer
Definition HitInfo.h:79

◆ createCylinderSurface()

std::shared_ptr< Acts::Surface > ActsTrk::CaloBlueprintNodeBuilder::createCylinderSurface ( std::span< const CaloDetDescrElement *const > detElements) const
private

Create a cylinder surface from a list of Calo detector description elements.

The surface is constructed such that the radius is the radial midpoint of the passed elements, the thickness is capturing the minimal and maximal passed radius and the half length completley encloses the passed description elements.

Parameters
detElementsThe list of detector elements from which the envelope surface shall be translated.

Definition at line 138 of file CaloBlueprintNodeBuilder.cxx.

138 {
139
140 float zMin{std::numeric_limits<float>::max()},
141 zMax{-std::numeric_limits<float>::max()},
142 rMin{std::numeric_limits<float>::max()}, rMax{0.f};
143 for (const CaloDetDescrElement* detEl : detElVec){
144 zMin = std::min(zMin, detEl->z() - 0.5f*detEl->dz());
145 zMax = std::max(zMax, detEl->z() + 0.5f*detEl->dz());
146 rMin = std::min(rMin, detEl->r() - 0.5f*detEl->dr());
147 rMax = std::max(rMax, detEl->r() + 0.5f*detEl->dr());
148 }
149 const float cylinderR = 0.5*(rMin + rMax);
150 const float cylinderZ = 0.5*(zMax - zMin);
151 const float surfaceZ = 0.5*(zMin + zMax);
152 auto cylinder = Acts::Surface::makeShared<Acts::CylinderSurface>(Amg::getTranslateZ3D(surfaceZ), cylinderR, cylinderZ);
153 cylinder->assignThickness(0.5*(rMax - rMin));
154 cylinder->assignGeometryId(Acts::GeometryIdentifier{}.withLayer(detElVec.front()->getSampling()));
155 ATH_MSG_DEBUG(__func__<<"() - Create surface "<<CaloSampling::getSamplingName(detElVec.front()->getSampling())
156 <<" r["<<rMin<<";"<<rMax<<"] z["<<zMin<<";"<<zMax<<"]"
157 <<" -> surface parameters R: "<<cylinder->bounds()<<", Z position: "<<surfaceZ
158 <<", "<<cylinder->geometryId());
159 return cylinder;
160}
#define ATH_MSG_DEBUG(x,...)
Amg::Isometry3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis

◆ createDiscSurface()

std::shared_ptr< Acts::Surface > ActsTrk::CaloBlueprintNodeBuilder::createDiscSurface ( std::span< const CaloDetDescrElement *const > detElements) const
private

Create a disc surface from the passed calo description elements.

The disc is placed at the central z considering the longitudinal spread of the elements. The radius of the disc fully encapsulates the detector description elements and the assigned thickness represents the maximum and minimum z

Parameters
detElementsThe list of detector elements from which the envelope surface shall be translated.

Definition at line 162 of file CaloBlueprintNodeBuilder.cxx.

162 {
163 float zMin{std::numeric_limits<float>::max()},
164 zMax{-std::numeric_limits<float>::max()},
165 rMin{std::numeric_limits<float>::max()}, rMax{0.f};
166 for (const CaloDetDescrElement* detEl : detElVec){
167 zMin = std::min(zMin, detEl->z() - 0.5f*detEl->dz());
168 zMax = std::max(zMax, detEl->z() + 0.5f*detEl->dz());
169 rMin = std::min(rMin, detEl->r() - 0.5f*detEl->dr());
170 rMax = std::max(rMax, detEl->r() + 0.5f*detEl->dr());
171 }
172 const float surfaceZ = 0.5*(zMin + zMax);
173 const auto sampling = detElVec.front()->getSampling();
174 ATH_MSG_DEBUG(__func__<<"() - Create surface "<<CaloSampling::getSamplingName(sampling)
175 <<" r["<<rMin<<";"<<rMax<<"] z["<<zMin<<";"<<zMax<<"]"
176 <<" -> surface position: "<<surfaceZ);
177 auto disc = Acts::Surface::makeShared<Acts::DiscSurface>(Amg::getTranslateZ3D(surfaceZ), rMin, rMax);
178 disc->assignThickness(0.5*(zMax - zMin));
179 disc->assignGeometryId(Acts::GeometryIdentifier{}.withLayer(sampling));
180 return disc;
181}

◆ envelopeVolume()

std::unique_ptr< Acts::TrackingVolume > ActsTrk::CaloBlueprintNodeBuilder::envelopeVolume ( const Acts::GeometryContext & tgContext,
const SurfaceMap_t & surfacesPerRegion ) const
private

Create the envelope volume of the Calo Tracking Geometry.

The volume encapsulates all calorimeter surfaces taking the respective thickness into account. The inner radius is set to zero to make space for the ITk. The GeometryIdentifier is set to the central calo volume ID

Parameters
tgContextThe geometry context to align the particular surfaces and volumes
surfacesPerRegionList of the constructed calorimeter surfaces

Definition at line 302 of file CaloBlueprintNodeBuilder.cxx.

303 {
304 double maxR{0.}, minZ{std::numeric_limits<double>::max()}, maxZ{-std::numeric_limits<double>::max()};
305 for (auto& surfaces : surfacePerRegion) {
306 for (auto& surface : surfaces) {
307 const Amg::Vector3D center = surface->center(tgContext);
308 if (surface->type() == Acts::Surface::SurfaceType::Disc) {
309 minZ = std::min(minZ, center.z() - 0.5*surface->thickness());
310 maxZ = std::max(maxZ, center.z() + 0.5*surface->thickness());
311 const auto& bounds = static_cast<const Acts::RadialBounds&>(surface->bounds());
312 maxR = std::max(maxR, bounds.rMax());
313 } else {
314 const auto& bounds = static_cast<const Acts::CylinderBounds&>(surface->bounds());
315 using enum Acts::CylinderBounds::BoundValues;
316 minZ = std::min(minZ, center.z() - bounds.get(eHalfLengthZ));
317 maxZ = std::max(maxZ, center.z() + bounds.get(eHalfLengthZ));
318 maxR = std::max(maxR, bounds.get(eR) + 0.5*surface->thickness());
319 }
320 }
321 }
322 auto volBounds = std::make_shared<Acts::CylinderVolumeBounds>(0, maxR + 1_cm, 0.5*(maxZ - minZ) + 1._cm);
323 ATH_MSG_DEBUG(__func__<<"() Create envelope volume with bounds "<<(*volBounds));
324 auto volume = std::make_unique<Acts::TrackingVolume>(Amg::getTranslateZ3D(0.5*(minZ + maxZ)),
325 volBounds, "ITkCalo");
326 volume->assignGeometryId(Acts::GeometryIdentifier{}.withVolume(s_caloEnvelopeID));
327 return volume;
328 }
Eigen::Matrix< double, 3, 1 > Vector3D

◆ fillDetectorElements()

DetElementMap_t ActsTrk::CaloBlueprintNodeBuilder::fillDetectorElements ( const CaloDetDescrManager & detDecrMgr) const
private

Fill the detector elements per calorimeter layer and sort them in ascending r(z) for the barrel (endcap) layers.

Remove duplicates from the list where r and z are within the precision tolerance

Parameters
detDescrMgrThe calorimeter detector description manager from which the detector elements are retrieved

Barrel elements that are cylinders sort them by R

Endcap elements are discs and sort them first by Z

Remove duplicate elements

The detector elements from TileBar2 and TileGap2 produce each a cylinder which is exactly at the same R but overlaping with the other. Merge them into a single vector

Definition at line 90 of file CaloBlueprintNodeBuilder.cxx.

90 {
91 DetElementMap_t sortedElements{};
92 for (const CaloDetDescrElement* theDDE : detDecrMgr.element_range()){
93 const CaloCell_ID::CaloSample sample =theDDE->getSampling();
94 sortedElements[Acts::toUnderlying(sample)].push_back(theDDE);
95 }
96 for (DetElVec_t& detElVec : sortedElements) {
97 if (detElVec.empty()) {
98 continue;
99 }
100 const CaloCell_ID::CaloSample sample = detElVec.front()->getSampling();
101 std::ranges::sort(detElVec, [&](const CaloDetDescrElement* a, const CaloDetDescrElement* b){
103 if (!s_caloDiscSampleList.count(sample)) {
104 if (std::abs(a->r() - b->r()) > Acts::s_epsilon) {
105 return a->r() < b->r();
106 }
107 return a->z() < b->z();
108 }
110 if (std::abs(a->z() - b->z()) > Acts::s_epsilon) {
111 return a->z() < b->z();
112 }
113 return a->r() < b->r();
114 });
116 auto [begin, end] = std::ranges::unique(detElVec,
117 [&](const CaloDetDescrElement* a, const CaloDetDescrElement* b) {
118 return std::abs(a->r() - b->r()) < Acts::s_onSurfaceTolerance &&
119 std::abs(a->z() - b->z()) < Acts::s_onSurfaceTolerance;
120 });
121 const std::size_t nBefore = detElVec.size();
122 detElVec.erase(begin, end);
123 ATH_MSG_DEBUG(__func__<<"() "<<__LINE__<<" - Removed "<<(nBefore - detElVec.size())
124 <<" detector elements for layer "<<CaloSampling::getSamplingName(sample)
125 <<", current size: "<<detElVec.size()<<"\n"<<print(detElVec));
126 }
131 DetElVec_t& gapVec = sortedElements[CaloSampling::TileGap2];
132 DetElVec_t& barVec = sortedElements[CaloSampling::TileBar2];
133 barVec.insert(barVec.end(), gapVec.begin(), gapVec.end());
134 gapVec.clear();
135 return sortedElements;
136}
static Double_t a
void print(char *figname, TCanvas *c1)
std::vector< const CaloDetDescrElement * > DetElVec_t
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
calo_element_range element_range() const
Range over element vector.

◆ fillLayer()

std::vector< std::shared_ptr< Acts::Surface > > ActsTrk::CaloBlueprintNodeBuilder::fillLayer ( const Acts::GeometryContext & tgContext,
std::shared_ptr< Acts::Surface > && centralSurf ) const
private

Fill the layer with extra surfaces.

Via the <insertExtraSuraces> property, it can be steered how many extra surfaces are inserted between the central surface and the virtual boundaries (defined by the extra thickness). E.g. a value of one inserts one surface in front and another one behind the central surface

Parameters
tgContextThe geometry context to access the surface transforms
centralSurfThe central surface to be duplicated

Definition at line 330 of file CaloBlueprintNodeBuilder.cxx.

331 {
332 unsigned extraSurf = m_surfaceDuplicates.value().at(centralSurf->geometryId().layer());
333 centralSurf->assignGeometryId(Acts::GeometryIdentifier{});
334 if (extraSurf == 0) {
335 return {std::move(centralSurf)};
336 }
337 const double stepLength = centralSurf->thickness() / (extraSurf +1u);
338 const Acts::Transform3& trf = centralSurf->localToGlobalTransform(tgContext);
339 std::vector<std::shared_ptr<Acts::Surface>> surfaces{};
340 if (centralSurf->type() == Acts::Surface::SurfaceType::Cylinder) {
341 const auto& bounds = static_cast<const Acts::CylinderBounds&>(centralSurf->bounds());
342 const double radius = bounds.get(Acts::CylinderBounds::BoundValues::eR);
343 const double halfZ = bounds.get(Acts::CylinderBounds::BoundValues::eHalfLengthZ);
344 for (unsigned extra = 1ul; extra <= extraSurf; ++extra) {
345 surfaces.emplace_back(Acts::Surface::makeShared<Acts::CylinderSurface>(trf, radius - stepLength* extra, halfZ));
346 surfaces.emplace_back(Acts::Surface::makeShared<Acts::CylinderSurface>(trf, radius + stepLength* extra, halfZ));
347 }
348 } else if (centralSurf->type() == Acts::Surface::SurfaceType::Disc) {
349 using DiscB = Acts::RadialBounds;
350 auto bounds = std::make_shared<DiscB>(static_cast<const DiscB&>(centralSurf->bounds()));
351 for (unsigned extra = 1ul; extra <= extraSurf; ++extra) {
352 const double shiftZ = stepLength *extra;
353 surfaces.emplace_back(Acts::Surface::makeShared<Acts::DiscSurface>(trf * Amg::getTranslateZ3D(shiftZ),
354 bounds));
355 surfaces.emplace_back(Acts::Surface::makeShared<Acts::DiscSurface>(trf * Amg::getTranslateZ3D(-shiftZ),
356 bounds));
357 }
358 }
359 surfaces.push_back(std::move(centralSurf));
360 return surfaces;
361 }
Gaudi::Property< std::vector< std::uint32_t > > m_surfaceDuplicates
Configure the insert of extra surfaces per each calorimeter layer.
double halfZ(const Acts::VolumeBounds &bounds)
Returns the half-Z length for the parsed volume bounds (Trapezoid/ Cuboid).

◆ initialize()

StatusCode ActsTrk::CaloBlueprintNodeBuilder::initialize ( )
finaloverridevirtual

Definition at line 81 of file CaloBlueprintNodeBuilder.cxx.

81 {
83 ATH_MSG_ERROR("Invalid size of "<<m_surfaceDuplicates<<". Expected: "
84 <<CaloSampling::getNumberOfSamplings()<<" got "<<m_surfaceDuplicates.value().size());
85 return StatusCode::FAILURE;
86 }
87 return StatusCode::SUCCESS;
88}
#define ATH_MSG_ERROR(x,...)
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.

◆ translateToSurfaces()

SurfaceMap_t ActsTrk::CaloBlueprintNodeBuilder::translateToSurfaces ( const DetElementMap_t & detElements) const
private

Translate all detector elements to a Cylinder and Disc surfaces.

Per calorimeter layer the detector elements are combined to single or multiple surfaces and then sorted into the

Parameters
detElementsThe calorimeter detector description elements split by their logical CaloSamplingID

Definition at line 183 of file CaloBlueprintNodeBuilder.cxx.

183 {
184 SurfaceMap_t surfaces{};
185 for (const DetElVec_t& detElVec : sortedElements) {
186 if (detElVec.empty()) {
187 continue;
188 }
189 const CaloCell_ID::CaloSample sample = detElVec.front()->getSampling();
190 using enum caloRegion;
191 if (s_caloCylinderSymmetricSampleList.count(sample)) {
192 surfaces[Acts::toUnderlying(BarrelCylinder)].push_back(createCylinderSurface(detElVec));
193 } else if (s_caloCylinderAsymmetricSampleList.count(sample)) {
194 for (DetElVec_t::const_iterator itr = detElVec.begin();
195 itr != detElVec.end(); ) {
196 const CaloDetDescrElement* detEl{*itr};
197 auto next = std::ranges::find_if(itr, detElVec.end(), [&](const CaloDetDescrElement* testMe){
198 return detEl->z() * testMe->z() < 0.;
199 });
200 surfaces[Acts::toUnderlying(BarrelCylinder)].push_back(createCylinderSurface({itr, next}));
201 itr = next;
202 }
203 } else {
204 for (DetElVec_t::const_iterator itr = detElVec.begin();
205 itr != detElVec.end(); ) {
206 const CaloDetDescrElement* detEl{*itr};
207 auto next = std::ranges::find_if(itr, detElVec.end(), [&](const CaloDetDescrElement* testMe){
208 return detEl->z() * testMe->z() < 0.;
209 });
210 const auto idx = detEl->z() > 0 ? Acts::toUnderlying(DiscPositiveZ)
211 : Acts::toUnderlying(DiscNegativeZ);
212 surfaces[idx].push_back(createDiscSurface({itr, next}));
213 itr = next;
214 }
215 }
216 }
217 return surfaces;
218}
std::shared_ptr< Acts::Surface > createDiscSurface(std::span< const CaloDetDescrElement *const > detElements) const
Create a disc surface from the passed calo description elements.
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.

◆ operator<<

std::ostream & operator<< ( std::ostream & ostr,
const caloRegion region )
friend

Definition at line 36 of file CaloBlueprintNodeBuilder.h.

36 {
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 }

Member Data Documentation

◆ m_radiusTolerance

Gaudi::Property<double> ActsTrk::CaloBlueprintNodeBuilder::m_radiusTolerance
private
Initial value:
{ this
, "RadiusTolerance"
, 2.0
, "Tolerance for determining if a ring of cells in phi has changed the radius w.r.t to the previous ring in phi" }

Definition at line 109 of file CaloBlueprintNodeBuilder.h.

109 { 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" };

◆ m_surfaceDuplicates

Gaudi::Property<std::vector<std::uint32_t> > ActsTrk::CaloBlueprintNodeBuilder::m_surfaceDuplicates
private
Initial value:
{this, "insertExtraSurfaces",
std::vector<std::uint32_t>(CaloSampling::Unknown, 0) }

Configure the insert of extra surfaces per each calorimeter layer.

Definition at line 106 of file CaloBlueprintNodeBuilder.h.

106 {this, "insertExtraSurfaces",
107 std::vector<std::uint32_t>(CaloSampling::Unknown, 0) };

◆ m_zTolerance

Gaudi::Property<double> ActsTrk::CaloBlueprintNodeBuilder::m_zTolerance
private
Initial value:
{ this
, "ZTolerance"
, 2.0
, "Tolerance for determining if a ring of cells in phi has changed the z w.r.t to the previous ring in phi" }

Definition at line 114 of file CaloBlueprintNodeBuilder.h.

114 { 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" };

The documentation for this class was generated from the following files: