13#ifndef HGTDTRACKEXTENSIONALG_H
14#define HGTDTRACKEXTENSIONALG_H
20#include "GaudiKernel/ToolHandle.h"
21#include "GaudiKernel/EventContext.h"
51#include "Acts/TrackFinding/TrackStateCreator.hpp"
52#include "Acts/EventData/TrackContainer.hpp"
59#include "Acts/Surfaces/PerigeeSurface.hpp"
65using DefaultTrackStateCreator = Acts::TrackStateCreator<ActsTrk::detail::UncalibSourceLinkAccessor::Iterator,detail::RecoTrackContainer>;
73 virtual StatusCode
execute(
const EventContext &ctx)
const override;
88 Gaudi::Property<float>
m_minEtaAcceptance {
this,
"MinEtaAcceptance", 2.38,
"Minimum eta to consider a track for extension"};
89 Gaudi::Property<float>
m_maxEtaAcceptance {
this,
"MaxEtaAcceptance", 4.00,
"Maximum eta to consider a track for extension"};
110 std::vector<float>
chi2Vec = {0.0, 0.0, 0.0, 0.0};
112 std::vector<float>
timeVec = {0.0, 0.0, 0.0, 0.0};
143 const EventContext &ctx,
144 const DetectorContextHolder& detContext,
147 const Acts::BoundTrackParameters lastMeasurementStateParameters,
151 const Acts::Surface& refSurface,
152 int& extension_index)
const;
168 const DetectorContextHolder& detContext,
170 const Acts::Surface& refSurface,
171 const Acts::TrackExtrapolationStrategy& extrapolationStrategy,
189 const DetectorContextHolder& detContext,
191 const Acts::Surface &referenceSurface,
193 Acts::TrackExtrapolationStrategy strategy,
204 const EventContext& context,
220 const EventContext& ctx,
222 const detail::RecoTrackContainer::TrackProxy& trackProxy,
241 float measuredTimeErr,
242 const Acts::TrackingGeometry* trackingGeometry,
243 const Acts::GeometryContext& geoContext)
const;
254 const EventContext& ctx,
267 const Acts::GeometryIdentifier& geoID)
const;
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.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerName
StatusCode collectMeasurements(const EventContext &context, detail::TrackFindingMeasurements &measurements) const
Create and fills the TrackExtensionData with HGTD hits at the extension.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterRawTimeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_numHGTDHitsKey
virtual StatusCode execute(const EventContext &ctx) const override
std::atomic< std::size_t > m_nTrackReserve ATLAS_THREAD_SAFE
const xAOD::HGTDCluster * getHGTDClusterFromState(const EventContext &ctx, const ActsTrk::detail::RecoConstTrackStateContainerProxy &state, const xAOD::HGTDClusterContainer *hgtdClusters) const
Get xAOD::HGTDCluster from track state, so it is possible to retrieve its raw time and position for e...
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerExtensionChi2Key
Gaudi::Property< float > m_minEtaAcceptance
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerHasExtensionKey
bool addTrack(const DetectorContextHolder &detContext, detail::RecoTrackContainerProxy &track, const Acts::Surface &refSurface, const Acts::TrackExtrapolationStrategy &extrapolationStrategy, detail::RecoTrackContainer &actsTracksContainer, const detail::MeasurementIndex &measurementIndex, const detail::RecoTrackContainer &tracksContainerTemp) const
add extension to track container if it passes the track selector criteria
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_extrapYKey
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
subtracts the time of flight (TOF) from a measured hit time.
std::size_t getHGTDLayerIndex(const Acts::GeometryIdentifier &geoID) const
returns the index of HGTD layer where surfaces lies.
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_actsTrackLinkKey
virtual ~HGTDTrackExtensionAlg()=default
virtual StatusCode initialize() override
Gaudi::Property< float > m_maxEtaAcceptance
TrackFindingBaseAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_uncalibratedMeasurementContainerKeys
bool findExtension(const EventContext &ctx, const DetectorContextHolder &detContext, const detail::TrackFindingMeasurements &measurements, const detail::MeasurementIndex &measurementIndex, const Acts::BoundTrackParameters lastMeasurementStateParameters, detail::RecoTrackContainer &tracksContainerTemp, detail::RecoTrackContainer &actsTracksContainer, EventStats &event_stat, const Acts::Surface &refSurface, int &extension_index) const
invoke track finding procedure to extend ITk tracks to HGTD layers using CKF.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTimeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_extrapXKey
Acts::Result< void > extrapolateTrackToReferenceSurface(const DetectorContextHolder &detContext, detail::RecoTrackContainerProxy &track, const Acts::Surface &referenceSurface, const detail::Extrapolator &propagator, Acts::TrackExtrapolationStrategy strategy, ExpectedLayerPattern &expectedLayerPattern) const
it can happen that the last hit of an extension doesn't have a surface associated with it,...
ActsTrk::detail::xAODUncalibMeasSurfAcc m_surfAcc
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_HGTDClusterContainerName
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_hgtdTrackLinkKey
Gaudi::Property< float > m_memorySafetyMargin
std::array< unsigned int, 4 > ExpectedLayerPattern
TrackExtensionData processTrackExtension(const EventContext &ctx, const xAOD::TrackParticle *trackParticle, const detail::RecoTrackContainer::TrackProxy &trackProxy, const xAOD::HGTDClusterContainer *hgtdClusters) const
Create and fills the TrackExtensionData with HGTD hits at the extension.
TrackFindingBaseAlg(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< std::array< unsigned int, kNStat > > EventStats
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
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.
GenUncalibSourceLinkAccessor< MeasurementRangeList > UncalibSourceLinkAccessor
Acts::TrackContainer< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory > RecoTrackContainer
RecoTrackStateContainer::ConstTrackStateProxy RecoConstTrackStateContainerProxy
RecoTrackContainer::TrackProxy RecoTrackContainerProxy
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
detail::UncalibSourceLinkAccessor AtlUncalibSourceLinkAccessor
Acts::TrackStateCreator< ActsTrk::detail::UncalibSourceLinkAccessor::Iterator, detail::RecoTrackContainer > DefaultTrackStateCreator
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
HGTDClusterContainer_v1 HGTDClusterContainer
Define the version of the HGTD cluster container.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
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.
float extrapY
Extrapolated Y position at HGTD.
float extrapX
Extrapolated X position at HGTD.
std::vector< float > rawTimeVec
Raw measured time per HGTD layer.
int numHGTDHits
Total number of HGTD hits on extended track.
float extrapZ
Extrapolated Z position at HGTD.
std::vector< char > hasClusterVec
Whether extension has cluster in each HGTD layer.