ATLAS Offline Software
Loading...
Searching...
No Matches
TrkDetDescr/TrkDetDescrAlgs/src/MaterialMapping.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// MaterialMapping.cxx, (c) ATLAS Detector software
8
9// Gaudi Units
10#include "GaudiKernel/SystemOfUnits.h"
11//TrkDetDescr Algs, Interfaces, Utils
12#include "MaterialMapping.h"
16// TrkGeometry
27// TrkEvent
29// Amg
31
32#ifdef TRKDETDESCR_MEMUSAGE
33#include <unistd.h>
34#endif
35
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}
62
63
64StatusCode Trk::MaterialMapping::execute(const EventContext& ctx)
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
81
82 // --------- prepare the element table ---------------------------------------------------
83
84 if (m_mapComposition) {
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
119 ecc.navigationCurvilinear = false;
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}
267
268
270 const Amg::Vector3D& pos,
271 const Amg::Vector3D& positionOnLayer,
272 double stepl,
273 const Trk::Material& mat)
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
287 m_layersRecordedPerEvent[layer] = true;
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}
312
313
315 Trk::LayerMaterialMap* propSet)
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 -----------------------------
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}
362
363
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 );
456 double unmapped = (m_unmapped+m_mapped) ? double(m_unmapped)/double(m_unmapped+m_mapped) : 0.;
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}
463
464
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}
488
489
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}
542
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
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}
564
566 std::stringstream msg;
567 msg << "Failed to get conditions data " << m_trackingGeometryReadKey.key() << ".";
568 throw std::runtime_error(msg.str());
569}
570
571
Scalar eta() const
pseudorapidity method
Scalar mag() const
mag method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
const ServiceHandle< StoreGateSvc > & detStore() const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
It is used in the Mapping process ( using MaterialSteps ), the validation and recostruction ( using M...
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
Definition BinUtility.h:39
Binned Array for avoiding map searches/.
Definition BinnedArray.h:36
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
It extends the LayerMaterialProperties base class.
virtual const BinUtility * binUtility() const override
Return the BinUtility.
templated class as an input-output object of the extrapolation, only public members,...
void addConfigurationMode(ExtrapolationMode::eMode em)
add a configuration mode
T * endParameters
by pointer - are newly created and can be optionally 0
std::vector< ExtrapolationStep< T > > extrapolationSteps
parameters on sensitive detector elements
bool navigationCurvilinear
stay in curvilinear parameters where possible, default : true
bool isSuccess() const
return success
LayerIndex for the identification of layers in a simplified detector geometry of Cylinders and Discs.
Definition LayerIndex.h:37
int value() const
layerIndex expressed in an integer
Definition LayerIndex.h:71
This class extends the DataVector<Trk::LayerMaterialProperties> by an elementTable;.
This virtual base class encapsulates the logics to build pre/post/full update material for Layer stru...
Helper Class to record the material during the GeantinoNtupleMappingProcess.
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
const LayerIndex & layerIndex() const
get the layerIndex
double thickness() const
Return the Thickness of the Layer.
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
void registerVolume(const Trk::TrackingVolume &tvol, int lvl)
Output information with Level.
Gaudi::Property< double > m_etaCutOff
general steering
SG::ReadHandleKey< Trk::ElementTable > m_inputEventElementTable
StatusCode finalize()
standard Athena-Algorithm method
ToolHandleArray< ILayerMaterialAnalyser > m_layerMaterialAnalysers
Trk::ElementTable * m_elementTable
the accumulated element table
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
StatusCode initialize()
standard Athena-Algorithm method
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.
void assignLayerMaterialProperties(Trk::TrackingVolume &tvol, Trk::LayerMaterialMap *propSet)
create the LayerMaterialRecord *‍/
ToolHandleArray< ILayerMaterialCreator > m_layerMaterialCreators
StatusCode execute(const EventContext &ctx)
standard Athena-Algorithm method
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< ILayerMaterialAnalyser > m_layerMaterialRecordAnalyser
ToolHandle< IExtrapolationEngine > m_extrapolationEngine
Gaudi::Property< bool > m_mapMaterial
Mapper and Inspector.
is needed for the recording of MaterialProperties from Geant4 and read them in with the mapping algor...
A common object to be contained by.
Definition Material.h:117
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
const Trk::Layer * associatedLayer() const
return the associated Layer
const Trk::MaterialLayer * materialLayer() const
return the material Layer
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.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
ParametersBase< NeutralParametersDim, Neutral > NeutralParameters
CurvilinearParametersT< NeutralParametersDim, Neutral, PlaneSurface > NeutralCurvilinearParameters