27 return StatusCode::SUCCESS;
37 layerMaterialMap = *layerMaterialMapH;
51 if (
process(*worldVolume, *layerMaterialMap, 0).isFailure() ) {
52 ATH_MSG_FATAL(
"Could not load material maps for provided TrackingGeometry, abort job.");
53 return StatusCode::FAILURE;
60 int layCount = bLayerIter.second;
64 StatusCode
sc(
process(*lay, *layerMaterialMap, 0) );
67 ATH_MSG_DEBUG(
"---[B] Boundary layer with " << layCount <<
" references : successfully loaded material map for layer " << layIndex );
71 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on layer. Aborting.");
72 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
80 ATH_MSG_FATAL(
"No highest level TrackingVolume found. Stopping recursive parsing, abort job.");
81 return StatusCode::FAILURE;
92 layerMaterialMap = *layerMaterialMapH;
99 return StatusCode::SUCCESS;
107 std::stringstream displayBuffer;
108 for (
size_t il = 0; il < level; ++il) displayBuffer <<
" ";
118 std::span<Trk::Layer * const> layers = layerArray->
arrayObjects();
119 ATH_MSG_VERBOSE(displayBuffer.str() <<
"--> has " << layers.size() <<
" confined layers." );
120 for (
const auto & layIter : layers ){
122 ATH_MSG_WARNING(
"Zero-pointer found in LayerArray - indicates problem !");
125 int layIndex = layIter->layerIndex().value();
127 StatusCode
sc =
process(*layIter, layerMaterialMap, level);
129 ATH_MSG_DEBUG(displayBuffer.str() <<
"---[M] Material layer: successfully loaded material map for layer " << layIndex );
130 else if (
sc.isRecoverable())
131 ATH_MSG_WARNING(
"Failed to call process(const Layer&) on layers - but recoverable.");
133 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on layer. Aborting.");
134 return StatusCode::FAILURE;
137 ATH_MSG_DEBUG(displayBuffer.str() <<
"---[o] Navigation layer: skipping.");
145 if (confinedVolumes) {
146 std::span<Trk::TrackingVolume * const> volumes = confinedVolumes->
arrayObjects();
147 std::span<Trk::TrackingVolume * const>::iterator volumesIter = volumes.begin();
148 for (; volumesIter != volumes.end(); ++volumesIter){
150 ATH_MSG_WARNING(
"Zero-pointer found in VolumeArray - indicates problem !");
151 if ((*volumesIter) &&
process(**volumesIter, layerMaterialMap, ++level).isFailure() ){
152 ATH_MSG_FATAL(
"Failed to call process(const TrackingVolume&) on confined volumes. Aborting.");
153 return StatusCode::FAILURE;
159 return StatusCode::SUCCESS;
170 layerMaterialMap = *layerMaterialMapH;
176 return StatusCode::SUCCESS;
186 return StatusCode::SUCCESS;
192 std::stringstream displayBuffer;
193 for (
size_t il = 0; il < level; ++il)
194 displayBuffer <<
" ";
197 auto lmIter = layerMaterialMap.find(lIndex);
198 if (lmIter != layerMaterialMap.end()) {
200 <<
"---[+] found material for Layer with Index: "
204 <<
"---[!] the Layer is not owned by the "
205 "TrackingGeometry, could indicate problem.");
208 <<
"---[+] the Layer is owned by the TrackingGeometry.");
213 <<
"---[!] could not find material for Layer with Index: "
215 return StatusCode::RECOVERABLE;
217 return StatusCode::SUCCESS;
222 return StatusCode::SUCCESS;
229 if (msgLvl (MSG::VERBOSE)) {
231 if (!flag.test_and_set()) {
232 ATH_MSG_VERBOSE(
"Listing the layer indeces found in the loaded LayerMaterialMap");
233 for (
const auto & lmIter : layerMaterialMap ){
234 ATH_MSG_VERBOSE(
" -> Found map for layer with index " << lmIter.first);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
Binned Array for avoiding map searches/.
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
LayerIndex for the identification of layers in a simplified detector geometry of Cylinders and Discs.
int value() const
layerIndex expressed in an integer
This class extends the DataVector<Trk::LayerMaterialProperties> by an elementTable;.
void dumpMaterialMap(const LayerMaterialMap &layerMaterialMap) const
virtual StatusCode initialize() override
virtual StatusCode process(TrackingGeometry &tgeo) const override
Processor Action to work on TrackingGeometry& tgeo.
SG::ReadCondHandleKey< LayerMaterialMap > m_layerMaterialMapKey
Gaudi::Property< std::string > m_layerMaterialMapName
Base Class for a Detector Layer in the Tracking realm.
void assignMaterialProperties(const LayerMaterialProperties &, double scale=1.0)
assignMaterialPropeties
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
const LayerIndex & layerIndex() const
get the layerIndex
Abstract Base Class for tracking surfaces.
bool isFree() const
Returns 'true' if this surface is 'free', i.e.
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
const std::map< Layer *, int > & boundaryLayers()
Return the unique BoundarySurfaces with MaterialInformation.
const TrackingVolume * highestTrackingVolume() const
return the world
size_t numBoundaryLayers() const
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
const LayerArray * confinedLayers() const
Return the subLayer array.
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
const std::string process
BinnedArray< Layer > LayerArray
simply for the eye