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