ATLAS Offline Software
ATLASSourceLinkSurfaceAccessor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  */
4 #ifndef ATLASSOURCELINKSURFACEACCESSOR_H
5 #define ATLASSOURCELINKSURFACEACCESSOR_H
6 
7 #include "ATLASSourceLink.h"
10 
11 
12 namespace Acts {
13  class TrackingGeometry;
14  class Surface;
15 }
16 
17 namespace ActsTrk {
18 class IActsToTrkConverterTool;
19 
22 
23  const Acts::Surface* operator()(const Acts::SourceLink& sourceLink) const;
24 };
25 
27  const Acts::TrackingGeometry *m_actsTrackingGeometry = nullptr;
29 public:
30  ATLASUncalibSourceLinkSurfaceAccessor(const Acts::TrackingGeometry &actsTrackingGeometry,
31  const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap)
32  : m_actsTrackingGeometry(&actsTrackingGeometry),
33  m_detectorElementToGeometryIdMap(&detectorElementToGeometryIdMap)
34  {}
35  const Acts::Surface* operator()(const Acts::SourceLink& sourceLink) const;
36 };
37 }
38 
40 
41 namespace ActsTrk {
42 // surface accessor implementation for ATLASUncalibSourceLink i.e. xAOD::UncalibratedMeasurement
43 inline const Acts::Surface* ATLASUncalibSourceLinkSurfaceAccessor::operator()(const Acts::SourceLink& sourceLink) const {
44  const auto atlas_uncalib_source_link = sourceLink.get<ATLASUncalibSourceLink>();
45  const xAOD::UncalibratedMeasurement &uncalibMeas = getUncalibratedMeasurement(atlas_uncalib_source_link);
47  uncalibMeas );
48 
49 }
50 
51 // surface accessor implementation for ATLASSourceLink i.e. Trk::MeasurementBase
52 inline const Acts::Surface* ATLASSourceLinkSurfaceAccessor::operator()(const Acts::SourceLink& sourceLink) const {
53  const auto atlas_source_link = sourceLink.get<ATLASSourceLink>();
54  return &this->m_converterTool->trkSurfaceToActsSurface( atlas_source_link->associatedSurface() );
55 }
56 }
57 #endif
ActsTrk::DetectorElementToActsGeometryIdMap
Definition: DetectorElementToActsGeometryIdMap.h:31
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
ActsTrk::ATLASSourceLinkSurfaceAccessor::operator()
const Acts::Surface * operator()(const Acts::SourceLink &sourceLink) const
Definition: ATLASSourceLinkSurfaceAccessor.h:52
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
ActsTrk::IActsToTrkConverterTool::trkSurfaceToActsSurface
virtual const Acts::Surface & trkSurfaceToActsSurface(const Trk::Surface &atlasSurface) const =0
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
Acts
Definition: ChamberAssembleTool.h:18
ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor::ATLASUncalibSourceLinkSurfaceAccessor
ATLASUncalibSourceLinkSurfaceAccessor(const Acts::TrackingGeometry &actsTrackingGeometry, const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap)
Definition: ATLASSourceLinkSurfaceAccessor.h:30
ActsTrk::ATLASSourceLinkSurfaceAccessor::m_converterTool
const ActsTrk::IActsToTrkConverterTool * m_converterTool
Definition: ATLASSourceLinkSurfaceAccessor.h:21
ActsTrk::IActsToTrkConverterTool
Definition: IActsToTrkConverterTool.h:43
ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor::operator()
const Acts::Surface * operator()(const Acts::SourceLink &sourceLink) const
Definition: ATLASSourceLinkSurfaceAccessor.h:43
Trk::MeasurementBase
Definition: MeasurementBase.h:58
ActsTrk::getUncalibratedMeasurement
const xAOD::UncalibratedMeasurement & getUncalibratedMeasurement(const ATLASUncalibSourceLink &source_link)
Definition: ATLASSourceLink.h:26
SurfaceOfMeasurementUtil.h
ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor::m_detectorElementToGeometryIdMap
const DetectorElementToActsGeometryIdMap * m_detectorElementToGeometryIdMap
Definition: ATLASSourceLinkSurfaceAccessor.h:28
ActsTrk::ATLASSourceLinkSurfaceAccessor
Definition: ATLASSourceLinkSurfaceAccessor.h:20
IActsToTrkConverterTool.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:54
ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor
Definition: ATLASSourceLinkSurfaceAccessor.h:26
ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor::m_actsTrackingGeometry
const Acts::TrackingGeometry * m_actsTrackingGeometry
Definition: ATLASSourceLinkSurfaceAccessor.h:27
DetectorElementToActsGeometryIdMap.h