ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsCalibration
ActsCalibrators
src
xAODUncalibMeasSurfAcc.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
ActsCalibrators/xAODUncalibMeasSurfAcc.h
"
5
#include "
ActsCalibrators/xAODUncalibMeasCalibrator.h
"
6
#include "
ActsGeometry/DetectorElementToActsGeometryIdMap.h
"
7
#include "
ActsGeometry/SurfaceOfMeasurementUtil.h
"
8
#include "
xAODAuxiliaryMeasurement/AuxiliaryMeasurement.h
"
9
#include "
xAODMuonPrepData/UtilFunctions.h
"
10
11
namespace
ActsTrk::detail
{
12
xAODUncalibMeasSurfAcc::xAODUncalibMeasSurfAcc
(
const
ActsTrk::ITrackingGeometrySvc
* trackGeoSvc):
13
m_actsTrackingGeometry
{trackGeoSvc->trackingGeometry().
get
()},
14
m_detectorElementToGeometryIdMap
{trackGeoSvc->surfaceIdMap()}{}
15
16
const
Acts::Surface*
xAODUncalibMeasSurfAcc::operator()
(
const
Acts::SourceLink& sourceLink)
const
{
17
return
get
(
xAODUncalibMeasCalibrator::unpack
(sourceLink));
18
}
19
const
Acts::Surface*
xAODUncalibMeasSurfAcc::get
(
const
xAOD::UncalibratedMeasurement
* meas)
const
{
20
switch
(meas->
type
()) {
21
using
enum
xAOD::UncalibMeasType
;
23
case
PixelClusterType:
24
case
StripClusterType:
25
case
HGTDClusterType:{
26
assert(
m_detectorElementToGeometryIdMap
);
27
assert(
m_actsTrackingGeometry
);
28
const
auto
geoKey =
makeDetectorElementKey
(meas->
type
(), meas->
identifierHash
());
29
const
auto
geoid_iter =
m_detectorElementToGeometryIdMap
->find(geoKey);
30
if
(geoid_iter ==
m_detectorElementToGeometryIdMap
->end()) {
31
return
nullptr
;
32
}
33
return
m_actsTrackingGeometry
->findSurface(
DetectorElementToActsGeometryIdMap::getValue
(*geoid_iter));
34
}
36
case
MdtDriftCircleType:
37
case
RpcStripType:
38
case
TgcStripType:
39
case
sTgcStripType:
40
case
MMClusterType:{
41
return
&
xAOD::muonSurface
(meas);
42
break
;
43
}
case
Other
: {
44
const
auto
* pMeas =
static_cast<
const
xAOD::AuxiliaryMeasurement
*
>
(meas);
45
return
pMeas->surface().get();
46
}
47
48
default
:
49
break
;
50
51
}
52
#ifndef NDEBUG
53
throw
std::domain_error(
"xAODUncalibMeasSurfAcc() - Cannot decode surface type"
);
54
#endif
55
return
nullptr
;
56
}
57
}
AuxiliaryMeasurement.h
DetectorElementToActsGeometryIdMap.h
OfflineHitType::Other
@ Other
Definition
FPGATrackSimTypes.h:31
UtilFunctions.h
SurfaceOfMeasurementUtil.h
ActsTrk::ITrackingGeometrySvc
Interface class for the ATLAS service providing the ActsTrackingGeometry.
Definition
Acts/ActsGeometryInterfaces/ActsGeometryInterfaces/ITrackingGeometrySvc.h:31
ActsTrk::detail::xAODUncalibMeasCalibrator::unpack
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
Definition
xAODUncalibMeasCalibrator.cxx:9
ActsTrk::detail::xAODUncalibMeasSurfAcc::get
const Acts::Surface * get(const xAOD::UncalibratedMeasurement *meas) const
Operator.
Definition
xAODUncalibMeasSurfAcc.cxx:19
ActsTrk::detail::xAODUncalibMeasSurfAcc::m_detectorElementToGeometryIdMap
const DetectorElementToActsGeometryIdMap * m_detectorElementToGeometryIdMap
Definition
xAODUncalibMeasSurfAcc.h:37
ActsTrk::detail::xAODUncalibMeasSurfAcc::m_actsTrackingGeometry
const Acts::TrackingGeometry * m_actsTrackingGeometry
Definition
xAODUncalibMeasSurfAcc.h:36
ActsTrk::detail::xAODUncalibMeasSurfAcc::operator()
const Acts::Surface * operator()(const Acts::SourceLink &sourceLink) const
Operator called by the Acts API to fetch the surface.
Definition
xAODUncalibMeasSurfAcc.cxx:16
ActsTrk::detail::xAODUncalibMeasSurfAcc::xAODUncalibMeasSurfAcc
xAODUncalibMeasSurfAcc()=default
Empty default constructor -> conversion will crash for ID measurements.
xAOD::UncalibratedMeasurement_v1::identifierHash
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
ActsTrk::detail
Hash functions to pack the source link into unordered_maps / unordered_sets.
Definition
MeasurementCalibratorBase.h:31
ActsTrk::makeDetectorElementKey
DetectorElementKey makeDetectorElementKey(xAOD::UncalibMeasType meas_type, unsigned int identifier_hash)
Definition
DetectorElementToActsGeometryIdMap.h:16
xAOD::AuxiliaryMeasurement
AuxiliaryMeasurement_v1 AuxiliaryMeasurement
Definition
AuxiliaryMeasurement.h:10
xAOD::UncalibratedMeasurement
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
Definition
UncalibratedMeasurementFwd.h:13
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition
MeasurementDefs.h:24
xAOD::muonSurface
const Acts::Surface & muonSurface(const UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
Definition
MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:56
ActsTrk::DetectorElementToActsGeometryIdMap::getValue
static const Acts::GeometryIdentifier & getValue(const value_type &element)
Definition
DetectorElementToActsGeometryIdMap.h:29
xAODUncalibMeasCalibrator.h
xAODUncalibMeasSurfAcc.h
Generated on
for ATLAS Offline Software by
1.17.0