|
ATLAS Offline Software
|
#include <LayerMaterialProvider.h>
AlgTool that retrieves the LayerMaterial from COOL and loads it onto the geometry
- Author
- Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Definition at line 38 of file LayerMaterialProvider.h.
◆ LayerMaterialProvider()
Trk::LayerMaterialProvider::LayerMaterialProvider |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Constructor.
Definition at line 24 of file LayerMaterialProvider.cxx.
28 "If LayerMaterialMapKey is not set, then fall back to retrieving this from the detector store.");
◆ ~LayerMaterialProvider()
Trk::LayerMaterialProvider::~LayerMaterialProvider |
( |
| ) |
|
|
virtualdefault |
◆ dumpMaterialMap()
◆ initialize()
StatusCode Trk::LayerMaterialProvider::initialize |
( |
| ) |
|
|
overridevirtual |
◆ process() [1/6]
Definition at line 192 of file LayerMaterialProvider.cxx.
198 return StatusCode::SUCCESS;
204 std::stringstream displayBuffer;
206 displayBuffer <<
" ";
209 auto lmIter = layerMaterialMap.find(lIndex);
210 if (lmIter != layerMaterialMap.end()) {
212 <<
"---[+] found material for Layer with Index: "
216 <<
"---[!] the Layer is not owned by the "
217 "TrackingGeometry, could indicate problem.");
220 <<
"---[+] the Layer is owned by the TrackingGeometry.");
225 <<
"---[!] could not find material for Layer with Index: "
227 return StatusCode::RECOVERABLE;
229 return StatusCode::SUCCESS;
◆ process() [2/6]
StatusCode Trk::LayerMaterialProvider::process |
( |
Trk::Layer & |
lay, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
overridevirtual |
Processor Action to work on Layers.
Definition at line 176 of file LayerMaterialProvider.cxx.
178 const LayerMaterialMap* layerMaterialMap =
nullptr;
182 layerMaterialMap = *layerMaterialMapH;
188 return StatusCode::SUCCESS;
◆ process() [3/6]
StatusCode Trk::LayerMaterialProvider::process |
( |
Trk::Surface & |
surf, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
overridevirtual |
◆ process() [4/6]
Processor Action to work on TrackingGeometry& tgeo.
Definition at line 44 of file LayerMaterialProvider.cxx.
46 const LayerMaterialMap* layerMaterialMap =
nullptr;
49 layerMaterialMap = *layerMaterialMapH;
63 if (
process(*worldVolume, *layerMaterialMap, 0).isFailure() ) {
64 ATH_MSG_FATAL(
"Could not load material maps for provided TrackingGeometry, abort job.");
65 return StatusCode::FAILURE;
72 int layCount = bLayerIter.second;
79 ATH_MSG_DEBUG(
"---[B] Boundary layer with " << layCount <<
" references : successfully loaded material map for layer " << layIndex );
83 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on layer. Aborting.");
84 return StatusCode::FAILURE;
89 return StatusCode::SUCCESS;
92 ATH_MSG_FATAL(
"No highest level TrackingVolume found. Stopping recursive parsing, abort job.");
93 return StatusCode::FAILURE;
◆ process() [5/6]
Definition at line 115 of file LayerMaterialProvider.cxx.
119 std::stringstream displayBuffer;
120 for (
size_t il = 0;
il <
level; ++
il) displayBuffer <<
" ";
132 for (
const auto & layIter :
layers ){
134 ATH_MSG_WARNING(
"Zero-pointer found in LayerArray - indicates problem !");
137 int layIndex = layIter->layerIndex().value();
141 ATH_MSG_DEBUG(displayBuffer.str() <<
"---[M] Material layer: successfully loaded material map for layer " << layIndex );
142 else if (
sc.isRecoverable())
143 ATH_MSG_WARNING(
"Failed to call process(const Layer&) on layers - but recoverable.");
145 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on layer. Aborting.");
146 return StatusCode::FAILURE;
149 ATH_MSG_DEBUG(displayBuffer.str() <<
"---[o] Navigation layer: skipping.");
157 if (confinedVolumes) {
160 for (; volumesIter != volumes.end(); ++volumesIter){
162 ATH_MSG_WARNING(
"Zero-pointer found in VolumeArray - indicates problem !");
163 if ((*volumesIter) &&
process(**volumesIter, layerMaterialMap, ++
level).isFailure() ){
164 ATH_MSG_FATAL(
"Failed to call process(const TrackingVolume&) on confined volumes. Aborting.");
165 return StatusCode::FAILURE;
171 return StatusCode::SUCCESS;
◆ process() [6/6]
StatusCode Trk::LayerMaterialProvider::process |
( |
Trk::TrackingVolume & |
tvol, |
|
|
size_t |
level = 0 |
|
) |
| const |
|
overridevirtual |
Processor Action to work on TrackingVolumes - the level is for the hierachy tree.
Definition at line 98 of file LayerMaterialProvider.cxx.
101 const LayerMaterialMap* layerMaterialMap =
nullptr;
104 layerMaterialMap = *layerMaterialMapH;
111 return StatusCode::SUCCESS;
◆ m_layerMaterialMapKey
Initial value:{ this, "LayerMaterialMapKey", "/GLOBAL/TrackingGeo/LayerMaterialV2",
"COOL folder for material map" }
Definition at line 76 of file LayerMaterialProvider.h.
◆ m_layerMaterialMapName
std::string Trk::LayerMaterialProvider::m_layerMaterialMapName |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
size_t numBoundaryLayers() const
#define ATH_MSG_VERBOSE(x)
std::string m_layerMaterialMapName
const LayerArray * confinedLayers() const
Return the subLayer array.
void dumpMaterialMap(const LayerMaterialMap &layerMaterialMap) const
void assignMaterialProperties(const LayerMaterialProperties &, double scale=1.0)
assignMaterialPropeties
const TrackingVolume * highestTrackingVolume() const
return the world
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
::StatusCode StatusCode
StatusCode definition for legacy code.
int value() const
layerIndex expressed in an integer
SG::ReadCondHandleKey< LayerMaterialMap > m_layerMaterialMapKey
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
virtual StatusCode process(TrackingGeometry &tgeo) const override
Processor Action to work on TrackingGeometry& tgeo.
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
const std::map< Layer *, int > & boundaryLayers()
Return the unique BoundarySurfaces with MaterialInformation.
bool isFree() const
Returns 'true' if this surface is 'free', i.e.
#define ATH_MSG_WARNING(x)
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
#define ATLAS_THREAD_SAFE
std::span< T > BinnedArraySpan
const LayerIndex & layerIndex() const
get the layerIndex