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 Member Functions

StatusCode initialize () override
StatusCode finalize () override
std::shared_ptr< Acts::Experimental::BlueprintNode > buildBlueprintNode (const Acts::GeometryContext &gctx, std::shared_ptr< Acts::Experimental::BlueprintNode > &&childNode) override
 Build the Itk Blueprint Node.

Private Member Functions

void fillMaps (caloSampleSurfaceMap_t &caloSampleSurfaceMap, caloSampleDDEElementsMap_t &caloSampleDDEElementsMap) const
 fillMaps fills two maps.
void fillCaloDimensionsMap (caloDimensionMap_t &caloDimensionsMap, caloSampleDDEElementsMap_t &caloSampleDDEElementsMap) const
 fillCaloDimensionsMap fills a map of calorimeter dimensions for each sampling layer.
void generateCylinderSurfaces (caloSampleSurfaceMap_t &caloSampleSurfaceMap, caloSampleDDEElementsMap_t &caloSampleDDEElementsMap) const
 generateCylinderSurfaces generates cylindrical surfaces for each calo sampling.
std::shared_ptr< Acts::CylinderSurface > generateCylinderSurface (const double &maxLArBRadius, const double &minLArBRadius, const double &lowZLarB, const double &highZLarB) const
 generateCylinderSurface generates a cylindrical surface for a given set of parameters.
void addCylindricalTrackingVolumeToCaloNode (Acts::Experimental::CylinderContainerBlueprintNode &containerNode, caloDimensionMap_t &caloDimensionMap, const std::string &volumeName, const std::vector< std::shared_ptr< Acts::Surface > > &surfaces, int layerIndex) const
 addCylindricalTrackingVolumeToCaloNode adds a cylindrical tracking volume to the calo node.
std::string getSampleName (CaloCell_ID::CaloSample currentSample) const
CaloCell_ID::CaloSample getSampleEnum (const std::string &sampleName) const

Private Attributes

std::unique_ptr< CaloDetDescrManagerm_caloDetSecrMgr
std::vector< std::pair< std::string, CaloCell_ID::CaloSample > > m_caloDiscSampleList
std::vector< std::pair< std::string, CaloCell_ID::CaloSample > > m_caloCylinderSampleList
Gaudi::Property< double > m_radiusTolerance
Gaudi::Property< double > m_zTolerance

Detailed Description

Builds the Calo Blueprint Node.

Definition at line 30 of file CaloBlueprintNodeBuilder.h.

Member Function Documentation

◆ addCylindricalTrackingVolumeToCaloNode()

void ActsTrk::CaloBlueprintNodeBuilder::addCylindricalTrackingVolumeToCaloNode ( Acts::Experimental::CylinderContainerBlueprintNode & containerNode,
caloDimensionMap_t & caloDimensionMap,
const std::string & volumeName,
const std::vector< std::shared_ptr< Acts::Surface > > & surfaces,
int layerIndex ) const
private

addCylindricalTrackingVolumeToCaloNode adds a cylindrical tracking volume to the calo node.

It takes as input the container node, the calo dimensions map, the name of the volume and the vector of surfaces to be added to the volume. It creates a new CylinderContainerBlueprintNode in the container node, then creates a new Acts::TrackingVolume with the appropriate dimensions. Finally it adds the Acts::CylinderSurface to that Acts::TrackingVolume, then adds the tracking volume to the container node.

Definition at line 355 of file CaloBlueprintNodeBuilder.cxx.

355 {
356
357 // Construct the container node with geometry identifier and layer, and add the surfaces to the layer.
358
359 Acts::Experimental::GeometryIdentifierBlueprintNode& geoIdNode = containerNode.withGeometryIdentifier();
360 geoIdNode.setAllVolumeIdsTo(s_caloBarrelId +
361 layerIndex);
362 CylinderContainerBlueprintNode& cylinder = geoIdNode.addCylinderContainer(volumeName,
363 AxisDirection::AxisZ);
364
365 cylinder.addLayer(volumeName + "_Layer", [&](auto& layer) {
366 layer.setSurfaces(surfaces);
367 layer.setEnvelope(Acts::ExtentEnvelope{{
368 .z = {0.1_mm, 0.1_mm},
369 .r = {2_mm, 2_mm},
370 }});
371 });
372
373}
@ layer
Definition HitInfo.h:79

◆ buildBlueprintNode()

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

Build the Itk Blueprint Node.

Parameters
gctxGeometry context
childThe child node which is added to the itk node.

Definition at line 50 of file CaloBlueprintNodeBuilder.cxx.

51 {
52
53 caloSampleSurfaceMap_t caloSampleSurfaceMap;
54 caloSampleDDEElementsMap_t caloSampleDDEElementsMap;
55 fillMaps(caloSampleSurfaceMap, caloSampleDDEElementsMap);
56
57 ATH_MSG_DEBUG("Have filled first two maps");
58
59 // TODO: it seems that only the CaloMaxR and CaloHalfLengthZ
60 // m_radiusTolerancesions are used later on... do we need the others?
61 caloDimensionMap_t caloDimensionMap;
62 fillCaloDimensionsMap(caloDimensionMap, caloSampleDDEElementsMap);
63
64 ATH_MSG_DEBUG("Have filled calo dimensions map");
65
66 generateCylinderSurfaces(caloSampleSurfaceMap, caloSampleDDEElementsMap);
67
68 ATH_MSG_DEBUG("Have generated calorimeter cylindrical surfaces");
69
70 // The calo node is a container node that will hold the itk and calo nodes as children.
71 // The calo cylinder is static in order to avoid merging issues with the itk portals
72 // that are supposed to carry material.
73 // Take the itk+calo cylinder dimensions based from the previously evaluated map adding some tolerance.
74 auto itkCaloNode = std::make_shared<StaticBlueprintNode>(
75 std::make_unique<TrackingVolume>(Transform3::Identity(),
76 std::make_shared<CylinderVolumeBounds>(0.,
77 caloDimensionMap["CaloMaxR"] + m_radiusTolerance,
78 caloDimensionMap["CaloHalfLengthZ"] + m_zTolerance),"ITkCalo"));
79
80 if (childNode) itkCaloNode->addChild(std::move(childNode));
81
82 ATH_MSG_DEBUG("Top level calorimeter node created");
83
84 // create the caloBarrel cylinder container node, which will hold all the barrel layers as cylinders.
85 auto caloBarrelNode = std::make_shared<CylinderContainerBlueprintNode>("CaloBarrel", AxisDirection::AxisR);
86 caloBarrelNode->setAttachmentStrategy(VolumeAttachmentStrategy::Gap);
87 caloBarrelNode->setResizeStrategy(ResizeStrategy::Gap);
88
89 ATH_MSG_DEBUG("EM Barrel container node created");
90
91 // This is a temporary list for the cylindrical layers in the barrel.
92 // TODO: Extend to include the disk layers and the endcap.
93
94 std::vector<std::string> caloBarrelCylindricalLayerNames = {"PreSamplerB", "EMB1", "EMB2", "EMB3", "TileBar0", "TileBar1", "TileBar2"};
95 for (unsigned int sampleIndex = 0; sampleIndex < caloBarrelCylindricalLayerNames.size(); ++sampleIndex) {
96 auto& sampleName = caloBarrelCylindricalLayerNames.at(sampleIndex);
97 addCylindricalTrackingVolumeToCaloNode(*caloBarrelNode, caloDimensionMap, sampleName, caloSampleSurfaceMap.at({sampleName, getSampleEnum(sampleName)}), sampleIndex);
98 }
99
100 ATH_MSG_DEBUG("Have added all Barrel layers to caloBarrelNode");
101
102 // Add calo barrel node to the top level calo node.
103 itkCaloNode->addChild(caloBarrelNode);
104
105 //return the top level calo node
106 return itkCaloNode;
107}
#define ATH_MSG_DEBUG(x)
std::map< std::string, double > caloDimensionMap_t
std::map< std::pair< std::string, CaloCell_ID::CaloSample >, std::vector< std::shared_ptr< Acts::Surface > > > caloSampleSurfaceMap_t
std::map< std::pair< std::string, CaloCell_ID::CaloSample >, std::vector< const CaloDetDescrElement * > > caloSampleDDEElementsMap_t
void fillCaloDimensionsMap(caloDimensionMap_t &caloDimensionsMap, caloSampleDDEElementsMap_t &caloSampleDDEElementsMap) const
fillCaloDimensionsMap fills a map of calorimeter dimensions for each sampling layer.
void addCylindricalTrackingVolumeToCaloNode(Acts::Experimental::CylinderContainerBlueprintNode &containerNode, caloDimensionMap_t &caloDimensionMap, const std::string &volumeName, const std::vector< std::shared_ptr< Acts::Surface > > &surfaces, int layerIndex) const
addCylindricalTrackingVolumeToCaloNode adds a cylindrical tracking volume to the calo node.
void generateCylinderSurfaces(caloSampleSurfaceMap_t &caloSampleSurfaceMap, caloSampleDDEElementsMap_t &caloSampleDDEElementsMap) const
generateCylinderSurfaces generates cylindrical surfaces for each calo sampling.
void fillMaps(caloSampleSurfaceMap_t &caloSampleSurfaceMap, caloSampleDDEElementsMap_t &caloSampleDDEElementsMap) const
fillMaps fills two maps.

◆ fillCaloDimensionsMap()

void ActsTrk::CaloBlueprintNodeBuilder::fillCaloDimensionsMap ( caloDimensionMap_t & caloDimensionsMap,
caloSampleDDEElementsMap_t & caloSampleDDEElementsMap ) const
private

fillCaloDimensionsMap fills a map of calorimeter dimensions for each sampling layer.

The map contains minR, maxR, minZ, maxZ and halfLengthZ for each sampling layer.

Definition at line 270 of file CaloBlueprintNodeBuilder.cxx.

270 {
271
272 //initialise parameters we will use to find the dimensions of the calorimeter
273 double minR = std::numeric_limits<double>::max();
274 double maxR = 0.0;
275 double minZ = std::numeric_limits<double>::max();
276 double maxZ = -std::numeric_limits<double>::max();
277
278 //define functions we will use
279 auto checkMinR = [&minR](const CaloDetDescrElement* theDDE){double r = theDDE->r();if (r < minR) minR = r;};
280 auto checkMaxR = [&maxR](const CaloDetDescrElement* theDDE){double r = theDDE->r();if (r > maxR) maxR = r;};
281 auto checkMinMaxZ = [&minZ,&maxZ](const CaloDetDescrElement* theDDE){double z = theDDE->z();if (z > maxZ) maxZ = z;if (z < minZ) minZ = z;};
282 auto calcHalfLengthZ = [&minZ, &maxZ](){return (maxZ - minZ) / 2.0;};
283
284 //function to use the above to get minR, maxR and halfLengthZ
285 auto getMinRMaxRHalfLengthZ = [&minR, &maxR, &minZ, &maxZ, &caloSampleDDEElementsMap, &checkMinR, &checkMaxR, &checkMinMaxZ, &calcHalfLengthZ, this](CaloCell_ID::CaloSample currentSample) {
286
287 minR = std::numeric_limits<double>::max();
288 maxR = 0.0;
289 minZ = std::numeric_limits<double>::max();
290 maxZ = -std::numeric_limits<double>::max();
291
292 for (const CaloDetDescrElement* theDDE : caloSampleDDEElementsMap.at({getSampleName(currentSample), currentSample})) {
293 checkMinR(theDDE);
294 checkMaxR(theDDE);
295 checkMinMaxZ(theDDE);
296 }
297
298 return calcHalfLengthZ();
299 };
300
301 //find minR from PreSamplerB
302 for (const CaloDetDescrElement* theDDE : caloSampleDDEElementsMap.at({getSampleName(CaloCell_ID::PreSamplerB), CaloCell_ID::PreSamplerB})) checkMinR(theDDE);
303
304 //find maxR from TileBar2, TileGap2 and Tile Ext2
305 for (auto& currentSample : std::vector<std::pair<std::string, CaloCell_ID::CaloSample>>{{"TileBar2", CaloCell_ID::TileBar2}, {"TileGap2", CaloCell_ID::TileGap2}, {"TileExt2", CaloCell_ID::TileExt2}}) {
306 for (const CaloDetDescrElement* theDDE : caloSampleDDEElementsMap.at(currentSample)) checkMaxR(theDDE);
307 }
308
309 ATH_MSG_DEBUG("Min R in PreSamplerB is " << minR);
310 ATH_MSG_DEBUG("Max R in TileBar2, TileGap2 and TileExt2 is " << maxR);
311
312 caloDimensionsMap["CaloMinR"] = minR;
313 caloDimensionsMap["CaloMaxR"] = maxR;
314
315 //find minZ and maxZ from all barrel samplings
316 for (auto& currentSample : m_caloCylinderSampleList) {
317 for (const CaloDetDescrElement* theDDE : caloSampleDDEElementsMap.at(currentSample)) checkMinMaxZ(theDDE);
318 }
319
320 caloDimensionsMap["CaloMinZ"] = minZ;
321 caloDimensionsMap["CaloMaxZ"] = maxZ;
322
323 double halfLengthZ = calcHalfLengthZ();
324 ATH_MSG_DEBUG("Half length in Z for entire barrel is " << halfLengthZ);
325 caloDimensionsMap["CaloHalfLengthZ"] = halfLengthZ;
326
327 auto putMinRMaxRHalfLengthZInMap = [&caloDimensionsMap,&minR,&maxR,&halfLengthZ](const std::string& sampleString){
328 //PresamplerB, TileBar0/2, TileGap1/2, TileExt0/1/2 return the same radial value for all DDE, so need to make a small offset because a zero thickness
329 //cylinder is not allowed by Acts volumes etc.
330 float smallOffset = 0.1;
331 if (std::fabs((maxR - minR)) < smallOffset) maxR = minR + smallOffset;
332 caloDimensionsMap[sampleString + "MinR"] = minR;
333 caloDimensionsMap[sampleString + "MaxR"] = maxR;
334 caloDimensionsMap[sampleString + "HalfLengthZ"] = halfLengthZ;
335 };
336
337 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::PreSamplerB);
338 putMinRMaxRHalfLengthZInMap("PreSamplerB");
339 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::EMB1);
340 putMinRMaxRHalfLengthZInMap("EMB1");
341 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::EMB2);
342 putMinRMaxRHalfLengthZInMap("EMB2");
343 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::EMB3);
344 putMinRMaxRHalfLengthZInMap("EMB3");
345 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::TileBar0);
346 putMinRMaxRHalfLengthZInMap("TileBar0");
347 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::TileBar1);
348 putMinRMaxRHalfLengthZInMap("TileBar1");
349 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::TileBar2);
350 putMinRMaxRHalfLengthZInMap("TileBar2");
351 halfLengthZ = getMinRMaxRHalfLengthZ(CaloCell_ID::TileGap1);
352
353}
#define z
std::vector< std::pair< std::string, CaloCell_ID::CaloSample > > m_caloCylinderSampleList
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
int r
Definition globals.cxx:22

◆ fillMaps()

void ActsTrk::CaloBlueprintNodeBuilder::fillMaps ( caloSampleSurfaceMap_t & caloSampleSurfaceMap,
caloSampleDDEElementsMap_t & caloSampleDDEElementsMap ) const
private

fillMaps fills two maps.

The first maps each calo sampling to a vector of surfaces (initially empty) The second maps each calo sampling to a vector of CaloDetDescrElements The second map is filled by looping over all DDE in the CaloDetDescrManager and adding each DDE to the vector corresponding to its sampling in the map

Definition at line 114 of file CaloBlueprintNodeBuilder.cxx.

114 {
115
116
117 //loop over all possible calo sampling layers
118 //and create empty vectors of surfaces in the map
119
120 //Create map between each calorimeter sampling and a vector of
121 //cylinder surfaces. We can have N cylinders in a given sampling,
122 //and the value of N is determined by how often the average radius
123 //calculated for a given phi ring, at fixed Z, changes by more than
124 //a tolerance value
125
126 //Use the same loop to create map bwteeen sampling and vectors of DDE
127 for (const auto & currentSample : m_caloCylinderSampleList) {
128 caloSampleSurfaceMap[currentSample] = std::vector<std::shared_ptr<Surface> >();
129 caloSampleDDEElementsMap[currentSample] = std::vector<const CaloDetDescrElement*>();
130 }
131
132 for (const auto & currentSample : m_caloDiscSampleList) {
133 caloSampleSurfaceMap[currentSample] = std::vector<std::shared_ptr<Surface> >();
134 caloSampleDDEElementsMap[currentSample] = std::vector<const CaloDetDescrElement*>();
135 }
136
137 //for each calo sampling collect all the DDE in a vector
138 for (const CaloDetDescrElement* theDDE : m_caloDetSecrMgr->element_range()){
139 if (!theDDE){
140 ATH_MSG_ERROR("Null pointer to CaloDetDescrElement");
141 continue;
142 }
143 CaloCell_ID::CaloSample currentSample=theDDE->getSampling();
144 caloSampleDDEElementsMap[{getSampleName(currentSample), currentSample}].push_back(theDDE);
145 }
146
147 auto sortAllLayersInZ = [&caloSampleDDEElementsMap](const std::vector<std::pair<std::string, CaloCell_ID::CaloSample>>& caloSampleList) {
148 for (const auto & currentSample : caloSampleList) {
149 std::vector<const CaloDetDescrElement*> currentElements = caloSampleDDEElementsMap[currentSample];
150 std::sort(currentElements.begin(), currentElements.end(), [](const CaloDetDescrElement* a, const CaloDetDescrElement* b) {return a->z() < b->z();});
151 caloSampleDDEElementsMap[currentSample] = std::move(currentElements);
152 }
153 };
154
155 //Sort the DDE, by Z, in all possible layers
156 sortAllLayersInZ(m_caloCylinderSampleList);
157 sortAllLayersInZ(m_caloDiscSampleList);
158
159}
#define ATH_MSG_ERROR(x)
static Double_t a
std::vector< std::pair< std::string, CaloCell_ID::CaloSample > > m_caloDiscSampleList
std::string getSampleName(CaloCell_ID::CaloSample currentSample) const
std::unique_ptr< CaloDetDescrManager > m_caloDetSecrMgr
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ finalize()

StatusCode ActsTrk::CaloBlueprintNodeBuilder::finalize ( )
override

Definition at line 109 of file CaloBlueprintNodeBuilder.cxx.

109 {
110 ATH_MSG_DEBUG("Finalizing CaloBlueprintNodeBuilder");
111 return StatusCode::SUCCESS;
112}

◆ generateCylinderSurface()

std::shared_ptr< CylinderSurface > ActsTrk::CaloBlueprintNodeBuilder::generateCylinderSurface ( const double & maxLArBRadius,
const double & minLArBRadius,
const double & lowZLarB,
const double & highZLarB ) const
private

generateCylinderSurface generates a cylindrical surface for a given set of parameters.

To do this it calculates the radius and length of the cylinder, then shifts it in Z to the midpoint of the Z values used to build it. It then creates the Acts::CylinderSurface and returns it via a shared pointer.

Definition at line 256 of file CaloBlueprintNodeBuilder.cxx.

256 {
257
258 //Characterise the dimensions of the cylinder
259 double LArBRadius = (maxLArBRadius + minLArBRadius) / 2.0;
260 double LArBLength = std::abs(highZLarB - lowZLarB);
261
262 ATH_MSG_DEBUG("Cylinder radius and length are " << LArBRadius << " and " << LArBLength);
263
264 auto surface = Surface::makeShared<CylinderSurface>(Transform3::Identity(), LArBRadius, LArBLength);
265
266 return surface;
267
268}

◆ generateCylinderSurfaces()

void ActsTrk::CaloBlueprintNodeBuilder::generateCylinderSurfaces ( caloSampleSurfaceMap_t & caloSampleSurfaceMap,
caloSampleDDEElementsMap_t & caloSampleDDEElementsMap ) const
private

generateCylinderSurfaces generates cylindrical surfaces for each calo sampling.

It does this for cylindrical layers by scanning in Z, for each Z finding the average radius of the cells in a phi ring If the average radius changes by more than a tolerance value (m_radiusTolerance), a new cylinder surface is created. The surfaces are added to the relevant vector of surfaces in the caloSampleSurfaceMap.

Definition at line 161 of file CaloBlueprintNodeBuilder.cxx.

161 {
162
163 for (const auto & currentSample : m_caloCylinderSampleList) {
164
165 std::vector<const CaloDetDescrElement*> currentElements = caloSampleDDEElementsMap[currentSample];
166
167 double maxLArBRadius = 0.0, minLArBRadius = std::numeric_limits<double>::max();
168 double lowZLarB = 0.0, highZLarB = 0.0;
169
170 //loop over cells runs from -z to +z in a given sampling layer
171 //There are many cells with the same z value, but different phi values
172 //We will find the average radius of the cells in a given phi ring
173 double totalRadiusFixedPhi = 0.0;
174 bool firstCellInPhiRing = true;
175 unsigned int phiCounter = 0;
176
177 //Then we will also track changes in radius as we move in Z from
178 //each ring of cells in phi to the next ring of cells in phi
179 bool firstPhiRing = true;
180 double initialRadius = 0.0;
181 double initialZ = -std::numeric_limits<double>::max();
182
183 for (const CaloDetDescrElement* theDDE : currentElements){
184
185 double z = theDDE->z();
186 double radius = theDDE->r();
187
188 ATH_MSG_DEBUG(" Calo Sampling is " << currentSample.first);
189
190 if (firstCellInPhiRing) {
191 ATH_MSG_DEBUG("First Cell in phi ring " << currentSample.first << " has z = " << z << " and r = " << radius);
192 initialZ = z;
193 firstCellInPhiRing = false;
194 }
195
196 if (firstPhiRing) {
197 ATH_MSG_DEBUG("First Cell in layer " << currentSample.first << " has z = " << z << " and r = " << radius);
198 initialRadius = theDDE->r();
199 firstPhiRing = false;
200 lowZLarB = z;
201 }
202
203 ATH_MSG_DEBUG("Z and initialZ are " << z << " and " << initialZ);
204
205 //if z has not changed then we add the radius to the summed radius for this phi ring
206 //and increment the counter of cells in this phi ring
207 if (std::abs(z - initialZ) < 0.0001) {
208 ATH_MSG_DEBUG("phiCounter is " << phiCounter << " and radius is " << radius << " and totalRadiusFixedPhi is " << totalRadiusFixedPhi << " and hash is " << theDDE->calo_hash());
209 totalRadiusFixedPhi += radius;
210 phiCounter++;
211 continue;
212 }
213 else {
214 firstCellInPhiRing = true;
215 if (phiCounter > 0) {
216 double cellRingRadius = totalRadiusFixedPhi / phiCounter;
217 totalRadiusFixedPhi = 0.0;
218 phiCounter = 0;
219
220 if (cellRingRadius > maxLArBRadius) maxLArBRadius = radius;
221 if (cellRingRadius < minLArBRadius) minLArBRadius = radius;
222
223 //if radius changes by more than tolerance, then we will create a cylinder
224 //with the average cell radius and length from neg to pos z
225 highZLarB = z;
226 ATH_MSG_DEBUG("Values of cellRingRadius, initialRadius, highZLarB and lowZLarB are " << cellRingRadius << ", " << initialRadius << ", " << highZLarB << " and " << lowZLarB);
227 if (std::abs(cellRingRadius - initialRadius) > m_radiusTolerance && highZLarB - lowZLarB > 0.0) {
228 ATH_MSG_DEBUG("CYLINDER: Create cylinder for layer " << currentSample.first);
229 ATH_MSG_DEBUG("CYLINDER: Create Cylinder: Min and Max LAr B radius are " << minLArBRadius << " " << maxLArBRadius);
230 ATH_MSG_DEBUG("CYLINDER: Create Cylinder: Min and Max LAr B z are " << lowZLarB << " " << highZLarB);
231
232 caloSampleSurfaceMap[currentSample].push_back(generateCylinderSurface(maxLArBRadius, minLArBRadius, lowZLarB, highZLarB));
233
234 //reset the dimensions of the cylinder to the initial conditions, in
235 //preparation for the next cylinder
236 firstPhiRing = true;
237 minLArBRadius = std::numeric_limits<double>::max();
238 maxLArBRadius = 0.0;
239 lowZLarB = 0.0;
240 highZLarB = 0.0;
241 }//if radius changes by more than tolerance
242 }//if at least one cell in phi (should always be the case!)
243 else ATH_MSG_ERROR("phiCounter is zero!");
244 }//if z has changed
245 }//loop over calorimeter DDE
246
247 if (0 == caloSampleSurfaceMap[currentSample].size()){
248 ATH_MSG_DEBUG("CYLINDER: Zero size Vector: Create cylinder for layer " << currentSample.first);
249 ATH_MSG_DEBUG("CYLINDER: Create Cylinder: Min and Max LAr B radius are " << minLArBRadius << " " << maxLArBRadius);
250 ATH_MSG_DEBUG("CYLINDER: Create Cylinder: Min and Max LAr B z are " << lowZLarB << " " << highZLarB);
251 caloSampleSurfaceMap[currentSample].push_back(generateCylinderSurface(maxLArBRadius, minLArBRadius, lowZLarB, highZLarB));
252 }
253 }
254}
std::shared_ptr< Acts::CylinderSurface > generateCylinderSurface(const double &maxLArBRadius, const double &minLArBRadius, const double &lowZLarB, const double &highZLarB) const
generateCylinderSurface generates a cylindrical surface for a given set of parameters.

◆ getSampleEnum()

CaloCell_ID::CaloSample ActsTrk::CaloBlueprintNodeBuilder::getSampleEnum ( const std::string & sampleName) const
inlineprivate

Definition at line 134 of file CaloBlueprintNodeBuilder.h.

134 {
135 CaloCell_ID::CaloSample sampleEnum = CaloCell_ID::Unknown;
136 for (auto& [name, sample] : m_caloCylinderSampleList) {
137 if (sampleName == name) {
138 sampleEnum = sample;
139 break;
140 }
141 }
142 if (sampleEnum == CaloCell_ID::Unknown) {
143 for (auto& [name, sample] : m_caloDiscSampleList) {
144 if (sampleName == name) {
145 sampleEnum = sample;
146 break;
147 }
148 }
149 }
150 return sampleEnum;
151 }

◆ getSampleName()

std::string ActsTrk::CaloBlueprintNodeBuilder::getSampleName ( CaloCell_ID::CaloSample currentSample) const
inlineprivate

Definition at line 115 of file CaloBlueprintNodeBuilder.h.

115 {
116 std::string sampleName = "";
117 for ( auto& [name, sample] : m_caloCylinderSampleList) {
118 if (currentSample == sample) {
120 break;
121 }
122 }
123 if (sampleName == "") {
124 for ( auto& [name, sample] : m_caloDiscSampleList) {
125 if (currentSample == sample) {
127 break;
128 }
129 }
130 }
131 return sampleName;
132 }

◆ initialize()

StatusCode ActsTrk::CaloBlueprintNodeBuilder::initialize ( )
override

Definition at line 41 of file CaloBlueprintNodeBuilder.cxx.

41 {
42 ATH_MSG_DEBUG("Initializing CaloBlueprintNodeBuilder");
43
46
47 return StatusCode::SUCCESS;
48}
std::unique_ptr< CaloDetDescrManager > buildCaloDetDescrNoAlign(ISvcLocator *svcLocator, IMessageSvc *msgSvc)
IMessageSvc * getMessageSvc(bool quiet=false)

Member Data Documentation

◆ m_caloCylinderSampleList

std::vector<std::pair<std::string, CaloCell_ID::CaloSample> > ActsTrk::CaloBlueprintNodeBuilder::m_caloCylinderSampleList
private
Initial value:
{ { "PreSamplerB", CaloCell_ID::PreSamplerB},
{"EMB1", CaloCell_ID::EMB1},
{"EMB2", CaloCell_ID::EMB2},
{"EMB3", CaloCell_ID::EMB3},
{"TileBar0", CaloCell_ID::TileBar0},
{"TileBar1", CaloCell_ID::TileBar1},
{"TileBar2", CaloCell_ID::TileBar2},
{"TileGap1", CaloCell_ID::TileGap1},
{"TileGap2", CaloCell_ID::TileGap2},
{"TileExt0", CaloCell_ID::TileExt0},
{"TileExt1", CaloCell_ID::TileExt1},
{"TileExt2", CaloCell_ID::TileExt2}}

Definition at line 91 of file CaloBlueprintNodeBuilder.h.

91 { { "PreSamplerB", CaloCell_ID::PreSamplerB},
92 {"EMB1", CaloCell_ID::EMB1},
93 {"EMB2", CaloCell_ID::EMB2},
94 {"EMB3", CaloCell_ID::EMB3},
95 {"TileBar0", CaloCell_ID::TileBar0},
96 {"TileBar1", CaloCell_ID::TileBar1},
97 {"TileBar2", CaloCell_ID::TileBar2},
98 {"TileGap1", CaloCell_ID::TileGap1},
99 {"TileGap2", CaloCell_ID::TileGap2},
100 {"TileExt0", CaloCell_ID::TileExt0},
101 {"TileExt1", CaloCell_ID::TileExt1},
102 {"TileExt2", CaloCell_ID::TileExt2}};

◆ m_caloDetSecrMgr

std::unique_ptr<CaloDetDescrManager> ActsTrk::CaloBlueprintNodeBuilder::m_caloDetSecrMgr
private

Definition at line 76 of file CaloBlueprintNodeBuilder.h.

◆ m_caloDiscSampleList

std::vector<std::pair<std::string, CaloCell_ID::CaloSample> > ActsTrk::CaloBlueprintNodeBuilder::m_caloDiscSampleList
private
Initial value:
{{"PreSamplerE", CaloCell_ID::PreSamplerE},
{"EME1",CaloCell_ID::EME1},
{"EME2",CaloCell_ID::EME2},
{"EME3",CaloCell_ID::EME3},
{"HEC0",CaloCell_ID::HEC0},
{"HEC1",CaloCell_ID::HEC1},
{"HEC2",CaloCell_ID::HEC2},
{"HEC3",CaloCell_ID::HEC3},
{"TileGap3",CaloCell_ID::TileGap3}}

Definition at line 81 of file CaloBlueprintNodeBuilder.h.

81 {{"PreSamplerE", CaloCell_ID::PreSamplerE},
82 {"EME1",CaloCell_ID::EME1},
83 {"EME2",CaloCell_ID::EME2},
84 {"EME3",CaloCell_ID::EME3},
85 {"HEC0",CaloCell_ID::HEC0},
86 {"HEC1",CaloCell_ID::HEC1},
87 {"HEC2",CaloCell_ID::HEC2},
88 {"HEC3",CaloCell_ID::HEC3},
89 {"TileGap3",CaloCell_ID::TileGap3}};

◆ 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 104 of file CaloBlueprintNodeBuilder.h.

104 { this
105 , "RadiusTolerance"
106 , 2.0
107 , "Tolerance for determining if a ring of cells in phi has changed the radius w.r.t to the previous ring in phi" };

◆ 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 109 of file CaloBlueprintNodeBuilder.h.

109 { this
110 , "ZTolerance"
111 , 2.0
112 , "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: