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"
53
54// Tools
58#include "Acts/Surfaces/PerigeeSurface.hpp"
59
60
61namespace ActsTrk {
62
64
65public:
66 using AthReentrantAlgorithm::AthReentrantAlgorithm;
67 virtual ~HGTDTrackExtensionAlg() = default;
68 virtual StatusCode initialize() override;
69 virtual StatusCode execute(const EventContext&) const override;
70 using CKFOptions = Acts::CombinatorialKalmanFilterOptions<detail::RecoTrackContainer>;
71
72private:
73 xAOD::TrackParticle* CKFTrackExtension(const Acts::BoundTrackParameters* parameters);
75 const Acts::Logger &logger() const { return *m_logger; }
76
77 // Properties
78 SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerName{this, "TrackParticleContainerName", "", "Name of the TrackParticle container"};
79 SG::ReadHandleKey<xAOD::HGTDClusterContainer> m_HGTDClusterContainerName{this, "HGTDClusterContainerName", "", "the HGTD clusters"};
80
81 // WriteDecorHandleKeys for decorating tracks
82 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_numHGTDHitsKey{this, "numHGTDHits", m_trackParticleContainerName, "numHGTDHits", "Number of HGTD hits on the track extension"};
83
84 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerHasExtensionKey { this, "HGTD_has_extension", m_trackParticleContainerName, "HGTD_has_extension", "Decoration for layer extension" };
85 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerExtensionChi2Key { this, "HGTD_extension_chi2", m_trackParticleContainerName, "HGTD_extension_chi2", "Decoration for chi2 of extension" };
86 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterRawTimeKey { this, "HGTD_cluster_raw_time", m_trackParticleContainerName, "HGTD_cluster_raw_time", "Decoration for raw time of cluster" };
87 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterTimeKey { this, "HGTD_cluster_time", m_trackParticleContainerName, "HGTD_cluster_time", "Decoration for cluster time" };
88 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_extrapXKey { this, "HGTD_extrap_x", m_trackParticleContainerName, "HGTD_extrap_x", "Decoration for extrapolated X coordinate" };
89 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_extrapYKey { this, "HGTD_extrap_y", m_trackParticleContainerName, "HGTD_extrap_y", "Decoration for extrapolated Y coordinate" };
90
91
93
94
95 Gaudi::Property<float> m_minEtaAcceptance {this, "MinEtaAcceptance", 2.38, "Minimum eta to consider a track for extension"};
96 Gaudi::Property<float> m_maxEtaAcceptance {this, "MaxEtaAcceptance", 4.00, "Maximum eta to consider a track for extension"};
97
98 // Tool Handles
99 ToolHandle<GenericMonitoringTool>
100 m_monTool{this, "MonTool", "", "Monitoring tool"};
101 PublicToolHandle<ActsTrk::ITrackingGeometryTool>
102 m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
103 ToolHandle<ActsTrk::IExtrapolationTool>
104 m_extrapolationTool{this, "ExtrapolationTool", ""};
105
106 ToolHandle<ActsTrk::IPixelOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
107 m_pixelCalibTool{this, "PixelCalibrator", "", "Opt. pixel measurement calibrator"};
108 ToolHandle<ActsTrk::IStripOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
109 m_stripCalibTool{this, "StripCalibrator", "", "Opt. strip measurement calibrator"};
110 ToolHandle<ActsTrk::IHGTDOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
111 m_hgtdCalibTool{this, "HGTDCalibrator", "", "Opt. HGTD measurement calibrator"};
112
113 ToolHandle<ActsTrk::TrackStatePrinterTool>
114 m_trackStatePrinter{this, "TrackStatePrinter", "", "optional track state printer"};
115
117
118 //HGTD
119 SG::ReadHandleKey<xAOD::UncalibratedMeasurementContainer> m_uncalibratedMeasurementContainerKey_HGTD{this, "UncalibratedMeasurementContainerKey_HGTD", "", "input cluster collections for HGTD"};
120 // Removed DetectorElementToActsGeometryIdMap - modern approach uses surface accessor
121
122 // logging instance
123 std::unique_ptr<const Acts::Logger> m_logger;
124
125 std::unique_ptr<detail::CKF_config> m_trackFinder;
126
127 StatusCode collectMeasurements(const EventContext& context,
128 detail::TrackFindingMeasurements& measurements) const;
129
133 std::vector<bool> hasClusterVec = {false, false, false, false};
134 std::vector<float> chi2Vec = {0.0, 0.0, 0.0, 0.0};
135 std::vector<float> rawTimeVec = {0.0, 0.0, 0.0, 0.0};
136 std::vector<float> timeVec = {0.0, 0.0, 0.0, 0.0};
137 float extrapX = 0.0;
138 float extrapY = 0.0;
139 float extrapZ = 0.0;
140 int numHGTDHits = 0;
141 };
142
144 const EventContext& ctx,
145 const xAOD::TrackParticle* trackParticle,
146 const detail::RecoTrackContainer::TrackProxy& trackProxy) const;
147
148 std::pair<float, float> correctTOF(
149 const xAOD::TrackParticle* trackParticle,
150 const xAOD::HGTDCluster* cluster,
151 float measuredTime,
152 float measuredTimeErr,
153 const Acts::TrackingGeometry* trackingGeometry,
154 const Acts::GeometryContext& geoContext) const;
155
156 const xAOD::HGTDCluster* getHGTDClusterFromState(const EventContext& ctx, const ActsTrk::detail::RecoConstTrackStateContainerProxy& state) const;
157
158 Acts::CalibrationContext m_calibrationContext;
159
160 std::size_t getHGTDLayerIndex(const Acts::GeometryIdentifier& geoID) const;
161 bool isHGTDSurface(const Acts::GeometryIdentifier& geoID) const;
162 bool getExtrapolationPosition(const EventContext& ctx,
163 const detail::RecoTrackContainer::TrackProxy& track,
164 float& x, float& y, float& z) const;
165
166};
167} // namespace ActsTrk
168
169
170#endif // HGTDTRACKEXTENSIONALG_H
171
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
Gaudi::Property< float > m_maxEtaAcceptance
const xAOD::HGTDCluster * getHGTDClusterFromState(const EventContext &ctx, const ActsTrk::detail::RecoConstTrackStateContainerProxy &state) const
ToolHandle< ActsTrk::IPixelOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool
std::unique_ptr< detail::CKF_config > m_trackFinder
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
ToolHandle< ActsTrk::IStripOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool
ToolHandle< ActsTrk::IHGTDOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_HGTDClusterContainerName
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.