ATLAS Offline Software
SurfaceOfMeasurementUtil.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  */
4 /* Dear emacs, this is -*-c++-*- */
5 #ifndef ACTSTRK_SURFACEOFMEASUREMENTHELPER_H
6 #define ACTSTRK_SURFACEOFMEASUREMENTHELPER_H
7 
8 #include "Acts/Geometry/TrackingGeometry.hpp"
11 
12 namespace ActsTrk {
13  inline const Acts::Surface *getSurfaceOfMeasurement(const Acts::TrackingGeometry &tracking_geometry,
14  const DetectorElementToActsGeometryIdMap &detector_element_to_geoid,
15  const xAOD::UncalibratedMeasurement &measurement)
16  {
17  DetectorElementToActsGeometryIdMap::const_iterator
18  geoid_iter = detector_element_to_geoid.find( makeDetectorElementKey(measurement.type(), measurement.identifierHash()) );
19  return (geoid_iter != detector_element_to_geoid.end())
20  ? tracking_geometry.findSurface( DetectorElementToActsGeometryIdMap::getValue(*geoid_iter) )
21  : nullptr;
22  }
23 
24  inline Acts::GeometryIdentifier getSurfaceGeometryIdOfMeasurement(
25  const DetectorElementToActsGeometryIdMap &detector_element_to_geoid,
26  const xAOD::UncalibratedMeasurement &measurement)
27  {
28  DetectorElementToActsGeometryIdMap::const_iterator
29  geoid_iter = detector_element_to_geoid.find( makeDetectorElementKey(measurement.type(), measurement.identifierHash()) );
30  return geoid_iter != detector_element_to_geoid.end()
32  : Acts::GeometryIdentifier{};
33  }
34 }
35 
36 #endif
xAOD::UncalibratedMeasurement_v1::identifierHash
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
UncalibratedMeasurement.h
ActsTrk::getSurfaceGeometryIdOfMeasurement
Acts::GeometryIdentifier getSurfaceGeometryIdOfMeasurement(const DetectorElementToActsGeometryIdMap &detector_element_to_geoid, const xAOD::UncalibratedMeasurement &measurement)
Definition: SurfaceOfMeasurementUtil.h:24
ActsTrk::DetectorElementToActsGeometryIdMap
Definition: DetectorElementToActsGeometryIdMap.h:31
ActsTrk::getSurfaceOfMeasurement
const Acts::Surface * getSurfaceOfMeasurement(const Acts::TrackingGeometry &tracking_geometry, const DetectorElementToActsGeometryIdMap &detector_element_to_geoid, const xAOD::UncalibratedMeasurement &measurement)
Definition: SurfaceOfMeasurementUtil.h:13
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
ActsTrk::makeDetectorElementKey
DetectorElementKey makeDetectorElementKey(xAOD::UncalibMeasType meas_type, unsigned int identifier_hash)
Definition: DetectorElementToActsGeometryIdMap.h:23
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:49
ActsTrk::DetectorElementToActsGeometryIdMap::getValue
static const Acts::GeometryIdentifier & getValue(const value_type &element)
Definition: DetectorElementToActsGeometryIdMap.h:36
DetectorElementToActsGeometryIdMap.h