ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::MaterialMapping Class Reference

A simple algorithm that throws random points through detector and associates them with the given/found layer. More...

#include <MaterialMapping.h>

Inheritance diagram for Trk::MaterialMapping:
Collaboration diagram for Trk::MaterialMapping:

Public Member Functions

StatusCode initialize ()
 standard Athena-Algorithm method
StatusCode execute (const EventContext &ctx)
 standard Athena-Algorithm method
StatusCode finalize ()
 standard Athena-Algorithm method
 AthAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool associateHit (const Trk::Layer &tvol, const Amg::Vector3D &pos, const Amg::Vector3D &layerHitPosition, double stepl, const Trk::Material &mat)
 Associate the Step to the Layer.
void registerVolume (const Trk::TrackingVolume &tvol, int lvl)
 Output information with Level.
void assignLayerMaterialProperties (Trk::TrackingVolume &tvol, Trk::LayerMaterialMap *propSet)
 create the LayerMaterialRecord *‍/
void insertLayerMaterialRecord (const Trk::Layer &lay)
StatusCode handleTrackingGeometry ()
 Retrieve the TrackingGeometry and its informations.
const TrackingGeometrytrackingGeometry () const
void throwFailedToGetTrackingGeometry () const
const TrackingGeometryretrieveTrackingGeometry (const EventContext &ctx) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< bool > m_checkForEmptyHits
ToolHandle< IExtrapolationEnginem_extrapolationEngine
Gaudi::Property< std::string > m_mappingVolumeName
const Trk::TrackingVolumem_mappingVolume = nullptr
SG::ReadHandleKey< MaterialStepCollectionm_inputMaterialStepCollection
 output / input steering
std::string m_outputLayerMaterialSetName
Gaudi::Property< double > m_etaCutOff {this, "EtaCutOff", 6.0}
 general steering
Gaudi::Property< int > m_etaSide {this, "EtaSide", 0}
 needed for debugging: -1 negative | 0 all | 1 positive
Gaudi::Property< double > m_useLayerThickness
Gaudi::Property< int > m_associationType {this, "MaterialAssociationType", 1}
ToolHandle< ILayerMaterialAnalyserm_layerMaterialRecordAnalyser
ToolHandleArray< ILayerMaterialAnalyserm_layerMaterialAnalysers
ToolHandleArray< ILayerMaterialCreatorm_layerMaterialCreators
Gaudi::Property< bool > m_mapMaterial {this, "MapMaterial", true}
 Mapper and Inspector.
ToolHandle< IMaterialMapperm_materialMapper
Gaudi::Property< bool > m_mapComposition
Trk::ElementTablem_elementTable = nullptr
 the accumulated element table
SG::ReadHandleKey< Trk::ElementTablem_inputEventElementTable
std::map< const Layer *, LayerMaterialRecordm_layerRecords
 this is the general record for the search
std::map< const Layer *, bool > m_layersRecordedPerEvent
 these are the layers hit per event - for empty hit scaling
double m_accumulatedMaterialXX0 = 0.
 the accumulated material information
double m_accumulatedRhoS = 0.
size_t m_mapped = 0
size_t m_unmapped = 0
size_t m_skippedOutside = 0
SG::ReadCondHandleKey< TrackingGeometrym_trackingGeometryReadKey
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

A simple algorithm that throws random points through detector and associates them with the given/found layer.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 72 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ assignLayerMaterialProperties()

void Trk::MaterialMapping::assignLayerMaterialProperties ( Trk::TrackingVolume & tvol,
Trk::LayerMaterialMap * propSet )
private

create the LayerMaterialRecord *‍/

Definition at line 314 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

316{
317
318 if (!propSet) return;
319
320 ATH_MSG_INFO("Processing TrackingVolume: "<< tvol.volumeName() );
321
322 // ----------------------------------- loop over confined layers ------------------------------------------
323 Trk::BinnedArray< Trk::Layer >* confinedLayers = tvol.confinedLayers();
324 if (confinedLayers) {
325 // get the objects in a vector-like format
326 std::span<Trk::Layer * const> layers = confinedLayers->arrayObjects();
327 ATH_MSG_INFO("--> found : "<< layers.size() << "confined Layers");
328 // the iterator over the vector
329 // loop over layers
330 for (Trk::Layer* layer : layers) {
331 // assign the material and output
332 if (layer && (*layer).layerIndex().value() ) {
333 ATH_MSG_INFO(" > LayerIndex: "<< (*layer).layerIndex() );
334 // set the material!
335 if (propSet) {
336 // find the pair
337 auto curIt = propSet->find((*layer).layerIndex());
338 if (curIt != propSet->end()) {
339 ATH_MSG_INFO("LayerMaterial assigned for Layer with index: "<< (*layer).layerIndex() );
340 // set it to the layer
341 layer->assignMaterialProperties(*((*curIt).second), 1.);
342 }
343 }
344 }
345 }
346 }
347
348 // ----------------------------------- loop over confined volumes -----------------------------
349 Trk::BinnedArray<Trk::TrackingVolume >* confinedVolumes = tvol.confinedVolumes();
350 if (confinedVolumes) {
351 // get the objects in a vector-like format
352 std::span<Trk::TrackingVolume * const> volumes = confinedVolumes->arrayObjects();
353 ATH_MSG_INFO("--> found : "<< volumes.size() << "confined TrackingVolumes");
354 // loop over volumes
355 for (const auto & volume : volumes) {
356 // assing the material and output
357 if (volume)
358 assignLayerMaterialProperties(*volume, propSet); // call itself recursively
359 }
360 }
361}
#define ATH_MSG_INFO(x)
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
void assignLayerMaterialProperties(Trk::TrackingVolume &tvol, Trk::LayerMaterialMap *propSet)
create the LayerMaterialRecord *‍/
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.
layers(flags, cells_name, *args, **kw)
Here we define wrapper functions to set up all of the standard corrections.
@ layer
Definition HitInfo.h:79

◆ associateHit()

bool Trk::MaterialMapping::associateHit ( const Trk::Layer & tvol,
const Amg::Vector3D & pos,
const Amg::Vector3D & layerHitPosition,
double stepl,
const Trk::Material & mat )
private

Associate the Step to the Layer.

Definition at line 269 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

274{
275 // get the intersection with the layer
276 ++m_mapped;
277 // get the layer
278 const Trk::Layer* layer = &associatedLayer;
279
280 // get the associated volume
281 const Trk::TrackingVolume* associatedVolume = trackingGeometry().lowestTrackingVolume(pos);
282
283 // try to find the layer material record
284 auto clIter = m_layerRecords.find(layer);
285 if (clIter != m_layerRecords.end() ){
286 // remember that you actually hit this layer
288 // LayerMaterialRecord found, add the hit
289 (*clIter).second.associateGeantinoHit(positionOnLayer, stepl, mat);
290 ATH_MSG_VERBOSE("- associate Geantino Information at intersection [r/z] = " << positionOnLayer.perp() << "/"<< positionOnLayer.z() );
291 ATH_MSG_VERBOSE(" mapping distance = " << (pos-positionOnLayer).mag() );
292 ATH_MSG_VERBOSE("- associate Geantino Information ( s, s/x0 , x0 , l0, a, z, rho ) = "
293 << stepl << ", "<< stepl/mat.X0 << ", "<< mat.X0 << ", "<< mat.L0 << ", "<< mat.A << ", "<< mat.Z << ", "<< mat.rho );
294 m_accumulatedMaterialXX0 += stepl/mat.X0;
295 m_accumulatedRhoS += stepl*mat.rho;
296 ATH_MSG_VERBOSE("- accumulated material information X/x0 = " << m_accumulatedMaterialXX0);
297 ATH_MSG_VERBOSE("- accumulated effective densitity rho*s = " << m_accumulatedRhoS);
298 ATH_MSG_VERBOSE("- to layer with index "<< layer->layerIndex().value() << " from '"<< associatedVolume->volumeName() << "'.");
299 // record the plain information w/o correction & intersection
300 if (m_mapMaterial && !m_materialMapper.empty()){
301 Trk::AssociatedMaterial am(pos, stepl, mat, 1., associatedVolume, layer);
302 m_materialMapper->recordMaterialHit(am, positionOnLayer);
303 ATH_MSG_VERBOSE(" - associated material produced as : " << am);
304 }
305
306 } else if (layer) {
307 ATH_MSG_WARNING("- associate hit - the layer with index " << layer->layerIndex().value() << " was not found - should not happen!");
308 }
309 // return
310 return true;
311}
Scalar mag() const
mag method
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
std::map< const Layer *, LayerMaterialRecord > m_layerRecords
this is the general record for the search
double m_accumulatedMaterialXX0
the accumulated material information
std::map< const Layer *, bool > m_layersRecordedPerEvent
these are the layers hit per event - for empty hit scaling
Gaudi::Property< bool > m_mapMaterial
Mapper and Inspector.
const TrackingVolume * lowestTrackingVolume(const Amg::Vector3D &gp) const
return the lowest tracking Volume

◆ AthAlgorithm()

AthAlgorithm::AthAlgorithm ( const std::string & name,
ISvcLocator * pSvcLocator )

Standard Athena-Algorithm Constructor.

Definition at line 31 of file AthAlgorithm.cxx.

11 :
12 AthCommonAlgorithm<Gaudi::Algorithm>( name, pSvcLocator )
13{
14 // default cardinality for non-reentrant algorithms
15 setProperty( "Cardinality", 1 ).orThrow("Unable to set property 'Cardinality'", name);
16}
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
AthCommonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode Trk::MaterialMapping::execute ( const EventContext & ctx)
virtual

standard Athena-Algorithm method

Implements AthAlgorithm.

Definition at line 64 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

65{
66 ATH_MSG_VERBOSE("MaterialMapping execute() start");
67
68 // ------------------------------- get the trackingGeometry at first place
69 if (!m_mappingVolume) {
70 StatusCode retrieveCode = handleTrackingGeometry();
71 if (retrieveCode.isFailure()){
72 ATH_MSG_INFO("Could not retrieve mapping volume from tracking geometry. Exiting.");
73 return retrieveCode;
74 }
75 }
77 ATH_MSG_VERBOSE("Mapping volume correctly retrieved from tracking geometry");
78
79
80 SG::ReadHandle<MaterialStepCollection> materialStepCollection(m_inputMaterialStepCollection, ctx);
81
82 // --------- prepare the element table ---------------------------------------------------
83
84 if (m_mapComposition) {
85 SG::ReadHandle<Trk::ElementTable> eTableEvent(m_inputEventElementTable, ctx);
86 (*m_elementTable) += (*eTableEvent); // accummulate the table
87 }
88
89
90 // event parameters - associated asteps, and layers hit per event
91 int associatedSteps = 0;
95 // clearing the recorded layers per event
96 if (materialStepCollection.isValid() && !materialStepCollection->empty()){
97
98 // get the number of material steps
99 size_t materialSteps = materialStepCollection->size();
100 ATH_MSG_DEBUG("[+] Successfully read "<< materialSteps << " geantino steps");
101
102 // create a direction out of the last material step
103 double dirx = (*materialStepCollection)[materialSteps-1]->hitX();
104 double diry = (*materialStepCollection)[materialSteps-1]->hitY();
105 double dirz = (*materialStepCollection)[materialSteps-1]->hitZ();
106 Amg::Vector3D direction = Amg::Vector3D(dirx,diry,dirz).unit();
107
108 double eta = direction.eta();
109 // skip the event if the eta cut is not met
110 if ( fabs(eta) > m_etaCutOff || (m_etaSide && m_etaSide*eta < 0.) ) {
111 ATH_MSG_VERBOSE("[-] Event is outside eta acceptance of " << m_etaCutOff << ". Skipping it.");
112 return StatusCode::SUCCESS;
113 }
114
115 // now propagate through the full detector and collect the layers
117 // create a neutral extrapolation cell
118 Trk::ExtrapolationCell<Trk::NeutralParameters> ecc(ncP);
119 ecc.navigationCurvilinear = false;
120 ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary);
121 ecc.addConfigurationMode(Trk::ExtrapolationMode::CollectPassive);
122 ecc.addConfigurationMode(Trk::ExtrapolationMode::CollectBoundary);
123
124 // let's extrapolate through the detector and remember which layers (with material) should have been hit
125 std::vector< std::pair<const Trk::Layer*, Amg::Vector3D> > layersAndHits;
126 // call the extrapolation engine
127 Trk::ExtrapolationCode eCode = m_extrapolationEngine->extrapolate(ecc);
128 // end the parameters if there
129 if (eCode.isSuccess()){
130 // name of passive surfaces found
131 size_t nLayersHit = ecc.extrapolationSteps.size();
132 ATH_MSG_VERBOSE("[+] Extrapolation to layers did succeed and found " << nLayersHit << " layers.");
133 // reserve the size of the vectors
134 layersAndHits.reserve(nLayersHit);
135 // for screen output
136 size_t ilayer = 0;
137 // find all the intersected material - remember the last parameters
138 const Trk::NeutralParameters* parameters = nullptr;
139 // loop over the collected information
140 for (auto& es : ecc.extrapolationSteps){
141 // continue if we have parameters
142 parameters = es.parameters;
143 if (parameters){
144 const Trk::Surface& pSurface = parameters->associatedSurface();
145 // get the surface with associated layer (that has material)
146 ATH_MSG_VERBOSE("[L] Testing layer with associatedLayer() " << pSurface.associatedLayer() << " and materialLayer() " << pSurface.materialLayer() );
147
148 if ((pSurface.associatedLayer() &&
150 pSurface.materialLayer()) {
151 // material layer
152
153 const Trk::Layer* mLayer = pSurface.materialLayer()
154 ? pSurface.materialLayer()
155 : pSurface.associatedLayer();
156 // record that one
157 std::pair<const Trk::Layer*, Amg::Vector3D> layerHitPair(
158 mLayer, parameters->position());
159 ATH_MSG_VERBOSE("[L] Layer "
160 << ++ilayer << " with index "
161 << mLayer->layerIndex().value()
162 << " hit at "
163 << Amg::toString(parameters->position()));
164 layersAndHits.push_back(layerHitPair);
165 }
166 delete parameters;
167 }
168 }
169 // cleanup of the final hits
170 if (ecc.endParameters != parameters) delete ecc.endParameters;
171
172 // we have no layers and Hits
173 if (layersAndHits.empty()){
174 ATH_MSG_VERBOSE("[!] No Layer was intersected - skipping.");
175 return StatusCode::SUCCESS;
176 }
177
178 // layers are ordered, hence you can move the starting point along
179 size_t currentLayer = 0;
180 // loop through hits and find the closest layer, the start point moves outwards as we go
181 for ( const Trk::MaterialStep* step : *materialStepCollection ) {
182 // verbose output
183 ATH_MSG_VERBOSE("[L] starting from layer " << currentLayer << " from layer collection for this step.");
184 // step length and position
185 double t = step->steplength();
186 Amg::Vector3D pos(step->hitX(), step->hitY(), step->hitZ());
187 // skip if :
188 // -- 0) no mapping volume exists
189 // -- 1) outside the mapping volume
190 // -- 2) outside the eta acceptance
191 if (!m_mappingVolume || !(m_mappingVolume->inside(pos)) || fabs(pos.eta()) > m_etaCutOff ){
193 continue;
194 }
195 // now find the closest layer
196 // (a) if the currentLayer is the last layer and the hit is still inside -> assign
197 if (currentLayer < nLayersHit-1) {
198 // search through the layers - this is the reference distance for projection
199 double currentDistance = (pos-layersAndHits[currentLayer].second).mag();
200 ATH_MSG_VERBOSE("- current distance is " << currentDistance << " from " << Amg::toString(pos) << " and " << Amg::toString(layersAndHits[currentLayer].second) );
201 for (size_t testLayer = (currentLayer+1); testLayer < nLayersHit; ++testLayer){
202 // calculate teh distance to the testLayer
203 double testDistance = (pos-layersAndHits[testLayer].second).mag();
204 ATH_MSG_VERBOSE("[L] Testing layer " << testLayer << " from layer collection for this step.");
205 ATH_MSG_VERBOSE("- test distance is " << testDistance << " from " << Amg::toString(pos) << " and " << Amg::toString(layersAndHits[testLayer].second) );
206 if ( testDistance < currentDistance ){
207 // screen output
208 ATH_MSG_VERBOSE("[L] Skipping over to current layer " << testLayer << " because " << testDistance << " < " << currentDistance);
209 // the test distance did shrink - update currentLayer
210 currentLayer = testLayer;
211 currentDistance = testDistance;
212 } else {
213 // stick to the layer you have
214 break;
215 }
216 }
217 }
218 // the currentLayer *should* be correct now
219 const Trk::Layer* assignedLayer = layersAndHits[currentLayer].first;
220 Amg::Vector3D assignedPosition = layersAndHits[currentLayer].second;
221 // associate the hit
222 // (1) count it
223 ++associatedSteps;
224 // (2) associate it
225 associateHit(*assignedLayer, pos, assignedPosition, t, step->fullMaterial());
226 } // loop over material Steps
227
228 // check for the empty hits - they need to be taken into account
229 ATH_MSG_VERBOSE("Found " << layersAndHits.size() << " intersected layers - while having " << m_layersRecordedPerEvent.size() << " recorded ones.");
230
231 // now - cross-chek if you have additional layers
232 for ( auto& lhp : layersAndHits){
233 // check if you find the layer int he already done record-map : not found - we need to do an empty hit scaling
234 if (m_layersRecordedPerEvent.find(lhp.first) == m_layersRecordedPerEvent.end()){
235 // try to find the layer material record
236 auto clIter = m_layerRecords.find(lhp.first);
237 if (clIter != m_layerRecords.end() ){
238 (*clIter).second.associateEmptyHit(lhp.second);
239 ATH_MSG_VERBOSE("- to layer with index "<< lhp.first->layerIndex().value() << " with empty hit detected.");
240 } else
241 ATH_MSG_WARNING("- no Layer found in the associated map! Should not happen.");
242 }
243 }
244
245 // check whether the event was good for at least one hit
246 if (associatedSteps) {
247 ATH_MSG_VERBOSE("There are associated steps, need to call finalizeEvent() & record to the MaterialMapper.");
248 // finalize the event --------------------- Layers ---------------------------------------------
249 for (auto& lRecord : m_layerRecords ) {
250 // associated material
251 Trk::AssociatedMaterial* assMatHit = lRecord.second.finalizeEvent((*lRecord.first));
252 // record the full layer hit
253 if (assMatHit && !m_materialMapper.empty()) m_materialMapper->recordLayerHit(*assMatHit, true);
254 delete assMatHit;
255 // call the material mapper finalize method
256 ATH_MSG_VERBOSE("Calling finalizeEvent on the MaterialMapper ...");
257 }
258 } // the event had at least one associated hit
259
260 } // end of eCode.success : needed for new mapping schema
261
262 } // material steps existed
263
264
265 return StatusCode::SUCCESS;
266}
Scalar eta() const
pseudorapidity method
#define ATH_MSG_DEBUG(x)
bool isSuccess() const
return success
int value() const
layerIndex expressed in an integer
Definition LayerIndex.h:71
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
const LayerIndex & layerIndex() const
get the layerIndex
Gaudi::Property< double > m_etaCutOff
general steering
SG::ReadHandleKey< Trk::ElementTable > m_inputEventElementTable
Gaudi::Property< int > m_etaSide
needed for debugging: -1 negative | 0 all | 1 positive
SG::ReadHandleKey< MaterialStepCollection > m_inputMaterialStepCollection
output / input steering
StatusCode handleTrackingGeometry()
Retrieve the TrackingGeometry and its informations.
bool associateHit(const Trk::Layer &tvol, const Amg::Vector3D &pos, const Amg::Vector3D &layerHitPosition, double stepl, const Trk::Material &mat)
Associate the Step to the Layer.
ToolHandle< IExtrapolationEngine > m_extrapolationEngine
const Trk::Layer * associatedLayer() const
return the associated Layer
const Trk::MaterialLayer * materialLayer() const
return the material Layer
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D
::StatusCode StatusCode
StatusCode definition for legacy code.
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
ParametersBase< NeutralParametersDim, Neutral > NeutralParameters
CurvilinearParametersT< NeutralParametersDim, Neutral, PlaneSurface > NeutralCurvilinearParameters

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode Trk::MaterialMapping::finalize ( )

standard Athena-Algorithm method

Definition at line 364 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

365{
366
367 ATH_MSG_INFO("========================================================================================= ");
368 ATH_MSG_INFO("finalize() starts ...");
369
370#ifdef TRKDETDESCR_MEMUSAGE
371 m_memoryLogger.refresh(getpid());
372 ATH_MSG_INFO("[ memory usage ] Start building of material maps: " );
373 ATH_MSG_INFO( m_memoryLogger );
374#endif
375
376 // create a dedicated LayerMaterialMap by layerMaterialCreator;
377 std::map< std::string, Trk::LayerMaterialMap* > layerMaterialMaps;
378 for ( auto& lmcIter : m_layerMaterialCreators ){
379 ATH_MSG_INFO("-> Creating material map '"<< lmcIter->layerMaterialName() << "' from creator "<< lmcIter.typeAndName() );
380 layerMaterialMaps[lmcIter->layerMaterialName()] = new Trk::LayerMaterialMap();
381 }
382
383 ATH_MSG_INFO( m_layerRecords.size() << " LayerMaterialRecords to be finalized for this material mapping run.");
384
385 // loop over the layers and output the stuff --- fill the associatedLayerMaterialProperties
386 for ( auto& lIter : m_layerRecords ) {
387 // Get the key map, the layer & the volume name
388 const Trk::Layer* layer = lIter.first;
389 Trk::LayerIndex layerKey = layer->layerIndex();
390 // get the enclosing tracking volume
391 const Trk::TrackingVolume* eVolume = layer->enclosingTrackingVolume();
392 // assign the string
393 std::string vName = eVolume ? (eVolume->volumeName()) : " BoundaryCollection ";
394 ATH_MSG_INFO("Finalize MaterialAssociation for Layer "<< layerKey.value() << " in " << vName );
395 // normalize - use m_finalizeRunDebug
396 (lIter.second).finalizeRun(m_mapComposition);
397 // output the material to the analyser if registered
398 if (!m_layerMaterialRecordAnalyser.empty() && m_layerMaterialRecordAnalyser->analyseLayerMaterial(*layer, lIter.second).isFailure() )
399 ATH_MSG_WARNING("Could not analyse the LayerMaterialRecord for layer "<< layerKey.value() );
400 // check if we have analysers per creator
401 bool analyse = (m_layerMaterialCreators.size() == m_layerMaterialAnalysers.size());
402 // and now use the creators to make the maps out of the LayerMaterialRecord
403 size_t ilmc = 0;
404 for ( auto& lmcIter : m_layerMaterialCreators ){
405 // call the creator and register in the according map
406#ifdef TRKDETDESCR_MEMUSAGE
407 m_memoryLogger.refresh(getpid());
408 ATH_MSG_INFO("[ memory usage ] Before building the map for Layer "<< layerKey.value() );
409 ATH_MSG_INFO( m_memoryLogger );
410#endif
411 const Trk::LayerMaterialProperties* lMaterial = lmcIter->createLayerMaterial(lIter.second);
412#ifdef TRKDETDESCR_MEMUSAGE
413 m_memoryLogger.refresh(getpid());
414 ATH_MSG_INFO("[ memory usage ] After building the map for Layer "<< layerKey.value() );
415 ATH_MSG_INFO( m_memoryLogger );
416#endif
417 if (lMaterial)
418 ATH_MSG_VERBOSE("LayerMaterial map created as "<< *lMaterial );
419 // insert the created map for the given layer
420 (*layerMaterialMaps[lmcIter->layerMaterialName()])[layerKey.value()] = lMaterial;
421 // analyse the it if configured
422 if (analyse && lMaterial && (m_layerMaterialAnalysers[ilmc]->analyseLayerMaterial(*layer, *lMaterial)).isFailure() )
423 ATH_MSG_WARNING("Could not analyse created LayerMaterialProperties for layer "<< layerKey.value() );
424 ++ilmc;
425 }
426 }
427
428 ATH_MSG_INFO("Finalize map synchronization and write the maps to the DetectorStore.");
429
430 for (auto& ilmIter : layerMaterialMaps ){
431 // elementTable handling - if existent
432 if (m_mapComposition){
433 auto tElementTable = std::make_shared<Trk::ElementTable>(*m_elementTable);
434 ilmIter.second->updateElementTable(tElementTable);
435 if (ilmIter.second->elementTable()){
436 ATH_MSG_INFO("ElementTable for LayerMaterialMap '" << ilmIter.first << "' found and syncrhonized." );
437 ATH_MSG_INFO( *(ilmIter.second->elementTable()) );
438 }
439 }
440 // detector store writing
441 if ( (detStore()->record(ilmIter.second, ilmIter.first, false)).isFailure()){
442 ATH_MSG_ERROR( "Writing of LayerMaterialMap with name '" << ilmIter.first << "' was not successful." );
443 delete ilmIter.second;
444 } else ATH_MSG_INFO( "LayerMaterialMap: " << ilmIter.first << " written to the DetectorStore!" );
445 }
446 delete m_elementTable;
447
448#ifdef TRKDETDESCR_MEMUSAGE
449 m_memoryLogger.refresh(getpid());
450 ATH_MSG_INFO( "[ memory usage ] At the end of the material map creation.");
451 ATH_MSG_INFO( m_memoryLogger );
452#endif
453
454 ATH_MSG_INFO( "========================================================================================= " );
455 ATH_MSG_INFO( " -> Total mapped hits : " << m_mapped );
457 ATH_MSG_INFO( " -> Total (rel.) unmapped hits : " << m_unmapped << " (" << unmapped << ")" );
458 ATH_MSG_INFO( " -> Skipped (outisde) : " << m_skippedOutside );
459 ATH_MSG_INFO( "========================================================================================= " );
460 ATH_MSG_INFO( "finalize() successful");
461 return StatusCode::SUCCESS;
462}
#define ATH_MSG_ERROR(x)
const ServiceHandle< StoreGateSvc > & detStore() const
ToolHandleArray< ILayerMaterialAnalyser > m_layerMaterialAnalysers
Trk::ElementTable * m_elementTable
the accumulated element table
ToolHandleArray< ILayerMaterialCreator > m_layerMaterialCreators
ToolHandle< ILayerMaterialAnalyser > m_layerMaterialRecordAnalyser

◆ handleTrackingGeometry()

StatusCode Trk::MaterialMapping::handleTrackingGeometry ( )
private

Retrieve the TrackingGeometry and its informations.

Definition at line 465 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

466{
467 // either get a string volume or the highest one
468 const Trk::TrackingVolume* trackingVolume = trackingGeometry().highestTrackingVolume();
469
470 // prepare the mapping volume
472
473 // register the confined layers from the TrackingVolume
474 registerVolume(*trackingVolume, 0);
475
476 ATH_MSG_INFO("Add "<< m_layerRecords.size() << " confined volume layers to mapping setup.");
477 ATH_MSG_INFO("Add "<< trackingGeometry().numBoundaryLayers() << " boundary layers to mapping setup.");
478
479 // register the layers from boundary surfaces
480 for (const auto bLayerIter : trackingGeometry().boundaryLayers())
481 insertLayerMaterialRecord(*(bLayerIter.first));
482
483 ATH_MSG_INFO("Map for "<< m_layerRecords.size() << " layers booked & prepared for mapping procedure");
484
485 return StatusCode::SUCCESS;
486
487}
void registerVolume(const Trk::TrackingVolume &tvol, int lvl)
Output information with Level.
const TrackingVolume * trackingVolume(const std::string &name) const
return the tracking Volume by name, 0 if it doesn't exist
const TrackingVolume * highestTrackingVolume() const
return the world

◆ initialize()

StatusCode Trk::MaterialMapping::initialize ( )

standard Athena-Algorithm method

Definition at line 36 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

37{
38
39 ATH_MSG_INFO("initialize()");
40
42
44
45 if ( !m_materialMapper.empty() )
46 ATH_CHECK( m_materialMapper.retrieve() );
47
48 if ( !m_layerMaterialRecordAnalyser.empty() )
50
51 if ( !m_layerMaterialCreators.empty() )
53
54 if ( !m_layerMaterialAnalysers.empty() )
56
58 ATH_CHECK( m_inputEventElementTable.initialize() );
59
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ insertLayerMaterialRecord()

void Trk::MaterialMapping::insertLayerMaterialRecord ( const Trk::Layer & lay)
private

Definition at line 543 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

543 {
544 // first occurrance, create a new LayerMaterialRecord
545 // - get the bin utility for the binned material (if necessary)
546 // - get the material first
547 const Trk::LayerMaterialProperties* layerMaterialProperties = lay.layerMaterialProperties();
548 // - dynamic cast to the BinnedLayerMaterial
549 const Trk::BinnedLayerMaterial* layerBinnedMaterial
550 = dynamic_cast<const Trk::BinnedLayerMaterial*>(layerMaterialProperties);
551 // get the binned array
552 const Trk::BinUtility* layerMaterialBinUtility = (layerBinnedMaterial) ? layerBinnedMaterial->binUtility() : nullptr;
553 // now fill the layer material record
554 if (layerMaterialBinUtility){
555 // create a new Layer Material record in the map
556 Trk::LayerMaterialRecord lmr
557 ((m_useLayerThickness ? lay.thickness() : 1.),
558 layerMaterialBinUtility,
559 static_cast<Trk::MaterialAssociationType>(m_associationType.value()));
560 // and fill it into the map
561 m_layerRecords[&lay] = lmr;
562 }
563}
virtual const BinUtility * binUtility() const override
Return the BinUtility.
double thickness() const
Return the Thickness of the Layer.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ registerVolume()

void Trk::MaterialMapping::registerVolume ( const Trk::TrackingVolume & tvol,
int lvl )
private

Output information with Level.

private void Method to map the layer material

Definition at line 490 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

491{
492 int sublevel = lvl+1;
493
494 for (int indent=0; indent<sublevel; ++indent)
495 std::cout << " ";
496 std::cout << "TrackingVolume name: "<< tvol.volumeName() << std::endl;
497
498 // all those to be processed
499 std::vector<const Trk::Layer*> volumeLayers;
500
501 // collect all material layers that have layerMaterial
502 const Trk::BinnedArray< Trk::Layer >* confinedLayers = tvol.confinedLayers();
503 if (confinedLayers) {
504 // this go ahead with the layers
505 std::span<Trk::Layer const * const> layers = confinedLayers->arrayObjects();
506 for (int indent=0; indent<sublevel; ++indent)
507 std::cout << " ";
508 std::cout << "- found : "<< layers.size() << "confined Layers"<< std::endl;
509 // loop over and fill them
510 auto clIter = layers.begin();
511 auto clIterE = layers.end();
512 for ( ; clIter != clIterE; ++clIter ) {
513 // only take layers with MaterialProperties defined and which are within the mapping volume
514 const Amg::Vector3D& sReferencePoint = (*clIter)->surfaceRepresentation().globalReferencePoint();
515 bool insideMappingVolume = m_mappingVolume ? m_mappingVolume->inside(sReferencePoint) : true;
516 if ((*clIter)->layerMaterialProperties() && insideMappingVolume)
517 volumeLayers.push_back((*clIter));
518 }
519 }
520
521 // now create LayerMaterialRecords for all
522 for ( auto& lIter : volumeLayers )
524
525 // step dopwn the navigation tree to reach the confined volumes
526 const Trk::BinnedArray<Trk::TrackingVolume >* confinedVolumes = tvol.confinedVolumes();
527 if (confinedVolumes) {
528 std::span<Trk::TrackingVolume const * const> volumes = confinedVolumes->arrayObjects();
529
530 for (int indent=0; indent<sublevel; ++indent)
531 std::cout << " ";
532 std::cout << "- found : "<< volumes.size() << "confined TrackingVolumes"<< std::endl;
533 // loop over the confined volumes
534 auto volumesIter = volumes.begin();
535 for (; volumesIter != volumes.end(); ++volumesIter)
536 if (*volumesIter) {
537 registerVolume(**volumesIter, sublevel);
538 }
539 }
540
541}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ retrieveTrackingGeometry()

const TrackingGeometry * Trk::MaterialMapping::retrieveTrackingGeometry ( const EventContext & ctx) const
inlineprivate

Definition at line 169 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

171 {
172 SG::ReadCondHandle<TrackingGeometry> handle(m_trackingGeometryReadKey, ctx);
173 if (!handle.isValid()) {
174 ATH_MSG_FATAL("Could not load TrackingGeometry with name '"
175 << m_trackingGeometryReadKey.key() << "'. Aborting.");
177 }
178 return handle.cptr();
179 }
#define ATH_MSG_FATAL(x)
virtual void handle(const Incident &inc)
Handle end of run incidents to save the metadata at that point.

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ throwFailedToGetTrackingGeometry()

void Trk::MaterialMapping::throwFailedToGetTrackingGeometry ( ) const
private

Definition at line 565 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx.

565 {
566 std::stringstream msg;
567 msg << "Failed to get conditions data " << m_trackingGeometryReadKey.key() << ".";
568 throw std::runtime_error(msg.str());
569}

◆ trackingGeometry()

const Trk::TrackingGeometry & Trk::MaterialMapping::trackingGeometry ( ) const
inlineprivate

Definition at line 194 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

195{
196 const Trk::TrackingGeometry* tracking_geometry =
197 retrieveTrackingGeometry(Gaudi::Hive::currentContext());
198 if (!tracking_geometry) {
199 ATH_MSG_FATAL("Did not get valid TrackingGeometry. Aborting.");
200 throw GaudiException("MaterialMapping",
201 "Problem with TrackingGeometry loading.",
202 StatusCode::FAILURE);
203 }
204 return *tracking_geometry;
205}
const TrackingGeometry * retrieveTrackingGeometry(const EventContext &ctx) const

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_accumulatedMaterialXX0

double Trk::MaterialMapping::m_accumulatedMaterialXX0 = 0.
private

the accumulated material information

Definition at line 160 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

◆ m_accumulatedRhoS

double Trk::MaterialMapping::m_accumulatedRhoS = 0.
private

◆ m_associationType

Gaudi::Property<int> Trk::MaterialMapping::m_associationType {this, "MaterialAssociationType", 1}
private

Definition at line 132 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

132{this, "MaterialAssociationType", 1};

◆ m_checkForEmptyHits

Gaudi::Property<bool> Trk::MaterialMapping::m_checkForEmptyHits
private
Initial value:
{
this, "CheckForEmptyHits", true,
"use extrapoaltion engine to check for empty hits"}

Definition at line 111 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

111 {
112 this, "CheckForEmptyHits", true,
113 "use extrapoaltion engine to check for empty hits"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_elementTable

Trk::ElementTable* Trk::MaterialMapping::m_elementTable = nullptr
private

the accumulated element table

Definition at line 150 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

◆ m_etaCutOff

Gaudi::Property<double> Trk::MaterialMapping::m_etaCutOff {this, "EtaCutOff", 6.0}
private

general steering

Definition at line 127 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

127{this, "EtaCutOff", 6.0};

◆ m_etaSide

Gaudi::Property<int> Trk::MaterialMapping::m_etaSide {this, "EtaSide", 0}
private

needed for debugging: -1 negative | 0 all | 1 positive

Definition at line 128 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

128{this, "EtaSide", 0};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_extrapolationEngine

ToolHandle<IExtrapolationEngine> Trk::MaterialMapping::m_extrapolationEngine
private
Initial value:
{
this, "ExtrapolationEngine", "", "Extrapolation Engine"}

Definition at line 114 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

114 {
115 this, "ExtrapolationEngine", "", "Extrapolation Engine"};

◆ m_inputEventElementTable

SG::ReadHandleKey<Trk::ElementTable> Trk::MaterialMapping::m_inputEventElementTable
private
Initial value:
{
this, "InputElementTable", "ElementTable", "input event table"}

Definition at line 151 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

151 {
152 this, "InputElementTable", "ElementTable", "input event table"};

◆ m_inputMaterialStepCollection

SG::ReadHandleKey<MaterialStepCollection> Trk::MaterialMapping::m_inputMaterialStepCollection
private
Initial value:
{
this, "InputMaterialStepCollection", "MaterialStepRecords"}

output / input steering

Definition at line 122 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

122 {
123 this, "InputMaterialStepCollection", "MaterialStepRecords"};

◆ m_layerMaterialAnalysers

ToolHandleArray<ILayerMaterialAnalyser> Trk::MaterialMapping::m_layerMaterialAnalysers
private
Initial value:
{
this, "LayerMaterialAnalysers", {},
"Layer material analysers per creator (if wanted)"}

Definition at line 137 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

137 {
138 this, "LayerMaterialAnalysers", {},
139 "Layer material analysers per creator (if wanted)"};

◆ m_layerMaterialCreators

ToolHandleArray<ILayerMaterialCreator> Trk::MaterialMapping::m_layerMaterialCreators
private
Initial value:
{
this, "LayerMaterialCreators", {}, "Layer material creators"}

Definition at line 140 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

140 {
141 this, "LayerMaterialCreators", {}, "Layer material creators"};

◆ m_layerMaterialRecordAnalyser

ToolHandle<ILayerMaterialAnalyser> Trk::MaterialMapping::m_layerMaterialRecordAnalyser
private
Initial value:
{
this, "LayerMaterialRecordAnalyser", "",
"Layer material analyser for the layer material record"}

Definition at line 134 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

134 {
135 this, "LayerMaterialRecordAnalyser", "",
136 "Layer material analyser for the layer material record"};

◆ m_layerRecords

std::map<const Layer*, LayerMaterialRecord> Trk::MaterialMapping::m_layerRecords
private

this is the general record for the search

Definition at line 156 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

◆ m_layersRecordedPerEvent

std::map<const Layer*, bool> Trk::MaterialMapping::m_layersRecordedPerEvent
private

these are the layers hit per event - for empty hit scaling

Definition at line 158 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

◆ m_mapComposition

Gaudi::Property<bool> Trk::MaterialMapping::m_mapComposition
private
Initial value:
{this, "MapComposition", false,
"map the composition of the material"}

Definition at line 147 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

147 {this, "MapComposition", false,
148 "map the composition of the material"};

◆ m_mapMaterial

Gaudi::Property<bool> Trk::MaterialMapping::m_mapMaterial {this, "MapMaterial", true}
private

Mapper and Inspector.

Definition at line 144 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

144{this, "MapMaterial", true};

◆ m_mapped

size_t Trk::MaterialMapping::m_mapped = 0
private

◆ m_mappingVolume

const Trk::TrackingVolume* Trk::MaterialMapping::m_mappingVolume = nullptr
private

◆ m_mappingVolumeName

Gaudi::Property<std::string> Trk::MaterialMapping::m_mappingVolumeName
private
Initial value:
{
this, "MappingVolumeName", "Atlas"}

Definition at line 117 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

117 {
118 this, "MappingVolumeName", "Atlas"};

◆ m_materialMapper

ToolHandle<IMaterialMapper> Trk::MaterialMapping::m_materialMapper
private
Initial value:
{
this, "MaterialMapper", "", "IMaterialMapper algTool" }

Definition at line 145 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

145 {
146 this, "MaterialMapper", "", "IMaterialMapper algTool" };

◆ m_outputLayerMaterialSetName

std::string Trk::MaterialMapping::m_outputLayerMaterialSetName
private

◆ m_skippedOutside

size_t Trk::MaterialMapping::m_skippedOutside = 0
private

◆ m_trackingGeometryReadKey

SG::ReadCondHandleKey<TrackingGeometry> Trk::MaterialMapping::m_trackingGeometryReadKey
private
Initial value:
{
this,
"TrackingGeometryReadKey",
"",
"Key of the TrackingGeometry conditions data."
}

Definition at line 181 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

181 {
182 this,
183 "TrackingGeometryReadKey",
184 "",
185 "Key of the TrackingGeometry conditions data."
186 };

◆ m_unmapped

size_t Trk::MaterialMapping::m_unmapped = 0
private

◆ m_useLayerThickness

Gaudi::Property<double> Trk::MaterialMapping::m_useLayerThickness
private
Initial value:
{
this, "UseActualLayerThicknesss", false,
"use the actual layer thickness"}

Definition at line 129 of file TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.h.

129 {
130 this, "UseActualLayerThicknesss", false,
131 "use the actual layer thickness"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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