ATLAS Offline Software
Loading...
Searching...
No Matches
HGTDTrackExtensionAlg.h
Go to the documentation of this file.
1
11
12#ifndef HGTDTRACKEXTENSIONALG_H
13#define HGTDTRACKEXTENSIONALG_H
14
15// Base Class
17
18// Gaudi
19#include "GaudiKernel/ToolHandle.h"
20#include "GaudiKernel/EventContext.h"
21
22// Athena
29
30// STL
31#include <memory>
32#include <string>
33
34// Handle Keys
44
45// Acts
46#include "Acts/EventData/TrackContainer.hpp"
51
52// Tools
56#include "Acts/Surfaces/PerigeeSurface.hpp"
57
58
59namespace ActsTrk {
60
62
63public:
64 using AthReentrantAlgorithm::AthReentrantAlgorithm;
65 virtual ~HGTDTrackExtensionAlg() = default;
66 virtual StatusCode initialize() override;
67 virtual StatusCode execute(const EventContext&) const override;
68 using CKFOptions = Acts::CombinatorialKalmanFilterOptions<detail::RecoTrackContainer>;
69
70private:
71 xAOD::TrackParticle* CKFTrackExtension(const Acts::BoundTrackParameters* parameters);
73 const Acts::Logger &logger() const { return *m_logger; }
74
75 // Properties
76 SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerName{this, "TrackParticleContainerName", "", "Name of the TrackParticle container"};
77 SG::ReadHandleKey<xAOD::HGTDClusterContainer> m_HGTDClusterContainerName{this, "HGTDClusterContainerName", "", "the HGTD clusters"};
78
79 // WriteDecorHandleKeys for decorating tracks
80 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_numHGTDHitsKey{this, "numHGTDHits", m_trackParticleContainerName, "numHGTDHits", "Number of HGTD hits on the track extension"};
81
82 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerHasExtensionKey { this, "HGTD_has_extension", m_trackParticleContainerName, "HGTD_has_extension", "Decoration for layer extension" };
83 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerExtensionChi2Key { this, "HGTD_extension_chi2", m_trackParticleContainerName, "HGTD_extension_chi2", "Decoration for chi2 of extension" };
84 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterRawTimeKey { this, "HGTD_cluster_raw_time", m_trackParticleContainerName, "HGTD_cluster_raw_time", "Decoration for raw time of cluster" };
85 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterTimeKey { this, "HGTD_cluster_time", m_trackParticleContainerName, "HGTD_cluster_time", "Decoration for cluster time" };
86 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_extrapXKey { this, "HGTD_extrap_x", m_trackParticleContainerName, "HGTD_extrap_x", "Decoration for extrapolated X coordinate" };
87 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_extrapYKey { this, "HGTD_extrap_y", m_trackParticleContainerName, "HGTD_extrap_y", "Decoration for extrapolated Y coordinate" };
88
89
91
92
93 Gaudi::Property<float> m_minEtaAcceptance {this, "MinEtaAcceptance", 2.38, "Minimum eta to consider a track for extension"};
94 Gaudi::Property<float> m_maxEtaAcceptance {this, "MaxEtaAcceptance", 4.00, "Maximum eta to consider a track for extension"};
95
96 // Tool Handles
97 ToolHandle<GenericMonitoringTool>
98 m_monTool{this, "MonTool", "", "Monitoring tool"};
99 PublicToolHandle<ActsTrk::ITrackingGeometryTool>
100 m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
101 ToolHandle<ActsTrk::IExtrapolationTool>
102 m_extrapolationTool{this, "ExtrapolationTool", ""};
103
104 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
105 m_pixelCalibTool{this, "PixelCalibrator", "", "Opt. pixel measurement calibrator"};
106 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
107 m_stripCalibTool{this, "StripCalibrator", "", "Opt. strip measurement calibrator"};
108 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
109 m_hgtdCalibTool{this, "HGTDCalibrator", "", "Opt. HGTD measurement calibrator"};
110
111 ToolHandle<ActsTrk::TrackStatePrinterTool>
112 m_trackStatePrinter{this, "TrackStatePrinter", "", "optional track state printer"};
113
115
116 //HGTD
117 SG::ReadHandleKey<xAOD::UncalibratedMeasurementContainer> m_uncalibratedMeasurementContainerKey_HGTD{this, "UncalibratedMeasurementContainerKey_HGTD", "", "input cluster collections for HGTD"};
118 // Removed DetectorElementToActsGeometryIdMap - modern approach uses surface accessor
119
120 // logging instance
121 std::unique_ptr<const Acts::Logger> m_logger;
122
123 std::unique_ptr<detail::CKF_config> m_trackFinder;
124
125 StatusCode collectMeasurements(const EventContext& context,
126 detail::TrackFindingMeasurements& measurements) const;
127
131 std::vector<bool> hasClusterVec = {false, false, false, false};
132 std::vector<float> chi2Vec = {0.0, 0.0, 0.0, 0.0};
133 std::vector<float> rawTimeVec = {0.0, 0.0, 0.0, 0.0};
134 std::vector<float> timeVec = {0.0, 0.0, 0.0, 0.0};
135 float extrapX = 0.0;
136 float extrapY = 0.0;
137 float extrapZ = 0.0;
138 int numHGTDHits = 0;
139 };
140
142 const EventContext& ctx,
143 const xAOD::TrackParticle* trackParticle,
144 const detail::RecoTrackContainer::TrackProxy& trackProxy) const;
145
146 std::pair<float, float> correctTOF(
147 const xAOD::TrackParticle* trackParticle,
148 const xAOD::HGTDCluster* cluster,
149 float measuredTime,
150 float measuredTimeErr,
151 const Acts::TrackingGeometry* trackingGeometry,
152 const Acts::GeometryContext& geoContext) const;
153
155
156 Acts::CalibrationContext m_calibrationContext;
157
158 std::size_t getHGTDLayerIndex(const Acts::GeometryIdentifier& geoID) const;
159 bool isHGTDSurface(const Acts::GeometryIdentifier& geoID) const;
160 bool getExtrapolationPosition(const EventContext& ctx,
161 const detail::RecoTrackContainer::TrackProxy& track,
162 float& x, float& y, float& z) const;
163
164};
165} // namespace ActsTrk
166
167
168#endif // HGTDTRACKEXTENSIONALG_H
169
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
#define y
#define x
#define z
bool isHGTDSurface(const Acts::GeometryIdentifier &geoID) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerName
StatusCode collectMeasurements(const EventContext &context, detail::TrackFindingMeasurements &measurements) const
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterRawTimeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_numHGTDHitsKey
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
SG::ReadHandleKey< xAOD::UncalibratedMeasurementContainer > m_uncalibratedMeasurementContainerKey_HGTD
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerExtensionChi2Key
bool getExtrapolationPosition(const EventContext &ctx, const detail::RecoTrackContainer::TrackProxy &track, float &x, float &y, float &z) const
Gaudi::Property< float > m_minEtaAcceptance
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerHasExtensionKey
Acts::CombinatorialKalmanFilterOptions< detail::RecoTrackContainer > CKFOptions
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_extrapYKey
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Acts::CalibrationContext m_calibrationContext
const Acts::Logger & logger() const
Private access to the logger.
std::pair< float, float > correctTOF(const xAOD::TrackParticle *trackParticle, const xAOD::HGTDCluster *cluster, float measuredTime, float measuredTimeErr, const Acts::TrackingGeometry *trackingGeometry, const Acts::GeometryContext &geoContext) const
std::size_t getHGTDLayerIndex(const Acts::GeometryIdentifier &geoID) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_actsTrackLinkKey
virtual ~HGTDTrackExtensionAlg()=default
virtual StatusCode initialize() override
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool
Gaudi::Property< float > m_maxEtaAcceptance
std::unique_ptr< detail::CKF_config > m_trackFinder
const xAOD::HGTDCluster * getHGTDClusterFromState(const ActsTrk::detail::RecoConstTrackStateContainerProxy &state) const
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTimeKey
std::unique_ptr< const Acts::Logger > m_logger
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_extrapXKey
ActsTrk::detail::xAODUncalibMeasSurfAcc m_surfAcc
ToolHandle< GenericMonitoringTool > m_monTool
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_HGTDClusterContainerName
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool
virtual StatusCode execute(const EventContext &) const override
ToolHandle< ActsTrk::TrackStatePrinterTool > m_trackStatePrinter
TrackExtensionData processTrackExtension(const EventContext &ctx, const xAOD::TrackParticle *trackParticle, const detail::RecoTrackContainer::TrackProxy &trackProxy) const
xAOD::TrackParticle * CKFTrackExtension(const Acts::BoundTrackParameters *parameters)
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
RecoTrackStateContainer::ConstTrackStateProxy RecoConstTrackStateContainerProxy
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
TrackParticle_v1 TrackParticle
Reference the current persistent version:
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
Definition HGTDCluster.h:13
Data structure to hold HGTD track extension results Contains information about hits,...
std::vector< float > chi2Vec
Chi2 contribution per HGTD layer.
std::vector< bool > hasClusterVec
Whether track has cluster in each HGTD layer.
std::vector< float > timeVec
TOF-corrected time per HGTD layer.
std::vector< float > rawTimeVec
Raw measured time per HGTD layer.
int numHGTDHits
Total number of HGTD hits on extended track.