ATLAS Offline Software
AnalogueClusteringToolImpl.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSTRACKRECONSTRUCTION_ANALOGUECLUSTERINGTOOL_IMPL_H
6 #define ACTSTRACKRECONSTRUCTION_ANALOGUECLUSTERINGTOOL_IMPL_H
7 
14 
17 
18 namespace ActsTrk::detail {
19 
20  template <typename calib_data_t, typename traj_t>
22  : public extends<AthAlgTool, IOnTrackCalibratorTool<traj_t>> {
23  public:
24  using base_class = typename extends<AthAlgTool, IOnTrackCalibratorTool<traj_t>>::base_class;
28 
29  AnalogueClusteringToolImpl(const std::string& type,
30  const std::string& name,
31  const IInterface* parent);
32 
33  virtual StatusCode initialize() override;
34 
35  std::pair<Pos, Cov> calibrate(const Acts::GeometryContext&,
36  const Acts::CalibrationContext&,
37  const xAOD::PixelCluster&,
38  const TrackStateProxy&) const;
39 
40  std::pair<Pos, Cov> calibrate(const Acts::GeometryContext&,
41  const Acts::CalibrationContext&,
42  const xAOD::PixelCluster&,
43  const Acts::BoundTrackParameters&) const;
44 
45  virtual void connect(OnTrackCalibrator<traj_t>& calibrator) const override;
46 
47  virtual void connectPixelCalibrator(IOnBoundStateCalibratorTool::PixelCalibrator& calibrator) const override;
48 
49  virtual bool calibrateAfterMeasurementSelection() const override;
50 
51  private:
52 
53  using error_data_t = typename std::remove_pointer_t<decltype(std::declval<calib_data_t>().getClusterErrorData())>;
54 
56 
57  std::pair<typename AnalogueClusteringToolImpl<calib_data_t, traj_t>::Pos,
59  calibrate(const Acts::GeometryContext& gctx,
60  const Acts::CalibrationContext& cctx,
61  const xAOD::PixelCluster& cluster,
62  const InDetDD::SiDetectorElement& detElement,
63  const std::pair<float, float>& angles) const;
64 
65  std::pair<float, float>
67  const Acts::Vector3& direction) const;
68 
69 
70  std::pair<float, float> getCentroid(const std::vector<Identifier>& rdos,
71  const InDetDD::SiDetectorElement& element) const;
72 
73  const error_data_t* getErrorData() const;
74 
75  std::pair<std::optional<float>, std::optional<float>>
76  getCorrectedPosition(const std::vector<Identifier>& rdos,
77  const error_data_t& errorData,
78  const InDetDD::SiDetectorElement& element,
79  const std::pair<float, float>& angles,
80  const xAOD::PixelCluster& cluster) const;
81 
82  std::pair<std::optional<float>, std::optional<float>>
83  getCorrectedError(const error_data_t& errorData,
84  const InDetDD::SiDetectorElement& element,
85  const std::pair<float, float>& angles,
86  const xAOD::PixelCluster& cluster) const;
87 
89  "Key of SiDetectorElementCollection for Pixel"
90  };
91 
92  SG::ReadCondHandleKey<calib_data_t> m_clusterErrorKey {this, "PixelOfflineCalibData", "ITkPixelOfflineCalibData",
93  "Calibration data for pixel clusters"
94  };
95 
96  ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool {this, "PixelLorentzAngleTool", "",
97  "Tool to retreive Lorentz angle"
98  };
99 
100  // in micrometers
101  Gaudi::Property<int> m_thickness {this, "PixelThickness", 250};
102  Gaudi::Property<bool> m_postCalibration{this, "CalibrateAfterMeasurementSelection", false};
103 
104  const PixelID* m_pixelid {nullptr};
105  };
106 
107 } // namespace ActsTrk::detail
108 
110 
111 #endif
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
ITkPixelOfflineCalibData.h
ActsTrk::detail::AnalogueClusteringToolImpl::getCentroid
std::pair< float, float > getCentroid(const std::vector< Identifier > &rdos, const InDetDD::SiDetectorElement &element) const
ActsTrk::detail::AnalogueClusteringToolImpl::AnalogueClusteringToolImpl
AnalogueClusteringToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
ActsTrk::detail::AnalogueClusteringToolImpl< ITk::PixelOfflineCalibData, detail::RecoTrackStateContainer >::error_data_t
typename std::remove_pointer_t< decltype(std::declval< ITk::PixelOfflineCalibData >().getClusterErrorData())> error_data_t
Definition: AnalogueClusteringToolImpl.h:53
ActsTrk::detail::AnalogueClusteringToolImpl::connectPixelCalibrator
virtual void connectPixelCalibrator(IOnBoundStateCalibratorTool::PixelCalibrator &calibrator) const override
IOnTrackCalibratorTool.h
ActsTrk::detail::AnalogueClusteringToolImpl< ITk::PixelOfflineCalibData, detail::RecoTrackStateContainer >::base_class
typename extends< AthAlgTool, IOnTrackCalibratorTool< detail::RecoTrackStateContainer > >::base_class base_class
Definition: AnalogueClusteringToolImpl.h:24
ISiLorentzAngleTool.h
ActsTrk::detail::AnalogueClusteringToolImpl::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition: AnalogueClusteringToolImpl.h:96
ActsTrk::IOnBoundStateCalibratorTool::PixelCalibrator
Acts::Delegate< std::pair< PixelPos, PixelCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::PixelCluster &, const Acts::BoundTrackParameters &)> PixelCalibrator
Definition: IOnBoundStateCalibratorTool.h:31
ActsTrk::detail::AnalogueClusteringToolImpl::calibrate
std::pair< Pos, Cov > calibrate(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::PixelCluster &, const TrackStateProxy &) const
ActsTrk::detail::AnalogueClusteringToolImpl::m_clusterErrorKey
SG::ReadCondHandleKey< calib_data_t > m_clusterErrorKey
Definition: AnalogueClusteringToolImpl.h:92
ActsTrk::detail::AnalogueClusteringToolImpl::calibrate
std::pair< typename AnalogueClusteringToolImpl< calib_data_t, traj_t >::Pos, typename AnalogueClusteringToolImpl< calib_data_t, traj_t >::Cov > calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const xAOD::PixelCluster &cluster, const InDetDD::SiDetectorElement &detElement, const std::pair< float, float > &angles) const
AnalogueClusteringToolImpl.icc
OnTrackCalibrator.h
ActsTrk::detail::AnalogueClusteringToolImpl< ITk::PixelOfflineCalibData, detail::RecoTrackStateContainer >::Cov
typename OnTrackCalibrator< detail::RecoTrackStateContainer >::PixelCov Cov
Definition: AnalogueClusteringToolImpl.h:26
ActsTrk::detail::AnalogueClusteringToolImpl::getCorrectedPosition
std::pair< std::optional< float >, std::optional< float > > getCorrectedPosition(const std::vector< Identifier > &rdos, const error_data_t &errorData, const InDetDD::SiDetectorElement &element, const std::pair< float, float > &angles, const xAOD::PixelCluster &cluster) const
ActsTrk::detail::AnalogueClusteringToolImpl
Definition: AnalogueClusteringToolImpl.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
ActsTrk::detail::AnalogueClusteringToolImpl::m_pixelid
const PixelID * m_pixelid
Definition: AnalogueClusteringToolImpl.h:104
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ActsTrk::detail::AnalogueClusteringToolImpl::getDetectorElement
const InDetDD::SiDetectorElement & getDetectorElement(xAOD::DetectorIDHashType id) const
ActsTrk::detail::AnalogueClusteringToolImpl::calibrateAfterMeasurementSelection
virtual bool calibrateAfterMeasurementSelection() const override
ActsTrk::detail::OnTrackCalibrator::TrackStateProxy
typename Acts::MultiTrajectory< traj_t >::TrackStateProxy TrackStateProxy
Definition: OnTrackCalibrator.h:21
ActsTrk::detail::AnalogueClusteringToolImpl::m_thickness
Gaudi::Property< int > m_thickness
Definition: AnalogueClusteringToolImpl.h:101
ReadCondHandleKey.h
ActsTrk::detail::AnalogueClusteringToolImpl::anglesOfIncidence
std::pair< float, float > anglesOfIncidence(const InDetDD::SiDetectorElement &element, const Acts::Vector3 &direction) const
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::DetectorIDHashType
unsigned int DetectorIDHashType
@ detector ID element hash
Definition: MeasurementDefs.h:42
ActsTrk::detail::AnalogueClusteringToolImpl::connect
virtual void connect(OnTrackCalibrator< traj_t > &calibrator) const override
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
ActsTrk::detail::AnalogueClusteringToolImpl::initialize
virtual StatusCode initialize() override
SiDetectorElementCollection.h
ActsTrk::detail::AnalogueClusteringToolImpl< ITk::PixelOfflineCalibData, detail::RecoTrackStateContainer >::TrackStateProxy
typename OnTrackCalibrator< detail::RecoTrackStateContainer >::TrackStateProxy TrackStateProxy
Definition: AnalogueClusteringToolImpl.h:27
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
ActsTrk::detail::OnTrackCalibrator::PixelCov
xAOD::MeasMatrix< 2 > PixelCov
Definition: OnTrackCalibrator.h:24
ActsTrk::detail::AnalogueClusteringToolImpl::m_postCalibration
Gaudi::Property< bool > m_postCalibration
Definition: AnalogueClusteringToolImpl.h:102
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
ActsTrk::detail::AnalogueClusteringToolImpl< ITk::PixelOfflineCalibData, detail::RecoTrackStateContainer >::Pos
typename OnTrackCalibrator< detail::RecoTrackStateContainer >::PixelPos Pos
Definition: AnalogueClusteringToolImpl.h:25
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ActsTrk::detail::AnalogueClusteringToolImpl::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: AnalogueClusteringToolImpl.h:88
ActsTrk::detail::OnTrackCalibrator
Definition: IOnTrackCalibratorTool.h:14
ActsTrk::detail
Definition: Decoration.h:15
ActsTrk::detail::AnalogueClusteringToolImpl::getErrorData
const error_data_t * getErrorData() const
ActsTrk::detail::AnalogueClusteringToolImpl::getCorrectedError
std::pair< std::optional< float >, std::optional< float > > getCorrectedError(const error_data_t &errorData, const InDetDD::SiDetectorElement &element, const std::pair< float, float > &angles, const xAOD::PixelCluster &cluster) const
PixelID
Definition: PixelID.h:67
ActsTrk::detail::AnalogueClusteringToolImpl::calibrate
std::pair< Pos, Cov > calibrate(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::PixelCluster &, const Acts::BoundTrackParameters &) const
ActsTrk::detail::OnTrackCalibrator::PixelPos
xAOD::MeasVector< 2 > PixelPos
Definition: OnTrackCalibrator.h:23