ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::HGTDTrackExtensionAlg Class Reference

#include <HGTDTrackExtensionAlg.h>

Inheritance diagram for ActsTrk::HGTDTrackExtensionAlg:
Collaboration diagram for ActsTrk::HGTDTrackExtensionAlg:

Classes

struct  TrackExtensionData
 Data structure to hold HGTD track extension results Contains information about hits, timing, and extrapolation for each HGTD layer. More...

Public Types

using ExpectedLayerPattern = std::array<unsigned int, 4>

Public Member Functions

virtual ~HGTDTrackExtensionAlg ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
 TrackFindingBaseAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Types

enum  EStat : std::size_t {
  kNTotalSeeds , kNoTrackParam , kNUsedSeeds , kNoTrack ,
  kNDuplicateSeeds , kNNoEstimatedParams , kNOutputTracks , kNSeedRefitFailure ,
  kNRejectedRefinedSeeds , kNSelectedTracks , kNStoppedTracksMaxHoles , kMultipleBranches ,
  kNoSecond , kNStoppedTracksMinPt , kNStoppedTracksMaxEta , kNTotalSharedHits ,
  kNForcedSeedMeasurements , kNResolvedTracks , kNStat
}
using TrackFinderOptions = Acts::CombinatorialKalmanFilterOptions<detail::RecoTrackContainer>
using EventStats = std::vector<std::array<unsigned int, kNStat>>
using TrkProxy = detail::RecoTrackContainer::TrackProxy
using BranchStopperResult = Acts::CombinatorialKalmanFilterBranchStopperResult

Protected Member Functions

CKF_pimpltrackFinder ()
const CKF_pimpltrackFinder () const
StatusCode initializeMeasurementSelector ()
std::unique_ptr< ActsTrk::IMeasurementSelectorsetMeasurementSelector (const EventContext &ctx, const detail::TrackFindingMeasurements &measurements, TrackFinderOptions &options) const
 Setup and attach measurement selector to KF options.
TrackFindingDefaultOptions getDefaultOptions (const EventContext &ctx, const DetectorContextHolder &detContext, const detail::TrackFindingMeasurements &measurements, const Acts::PerigeeSurface *pSurface) const
 Get CKF options for first and second pass + pointer to MeasurementSelector.
template<class HandleArrayKeyType, class ContainerType>
StatusCode getContainersFromKeys (const EventContext &ctx, HandleArrayKeyType &handleKeyArray, std::vector< const ContainerType * > &outputContainers, std::size_t &sum) const
 Take the array of handle keys and for each key retrieve containers, then append them to the output vector.
const Acts::TrackSelector::Config & getCuts (double eta) const
 Retrieves track selector configuration for given eta value.
template<class MeasurementSource>
std::variant< std::unique_ptr< Acts::BoundTrackParameters >, TrackFindingBaseAlg::EStatdoRefit (const MeasurementSource &measurement, const Acts::BoundTrackParameters &initialParameters, const DetectorContextHolder &detContext, const bool paramsAtOutermostSurface) const
 Perform Kalman Filter fit and update given initialParameters.
std::vector< typename detail::RecoTrackContainer::TrackProxy > doTwoWayTrackFinding (const detail::RecoTrackStateContainerProxy &firstMeasurement, const TrkProxy &trackProxy, detail::RecoTrackContainer &tracksContainerTemp, const TrackFinderOptions &options) const
 Perform two-way track finding.
BranchStopperResult stopBranch (const detail::RecoTrackContainer::TrackProxy &track, const detail::RecoTrackContainer::TrackStateProxy &trackState, const Acts::TrackSelector::EtaBinnedConfig &trackSelectorCfg, const Acts::GeometryContext &tgContext, const detail::MeasurementIndex &measurementIndex, const std::size_t typeIndex, EventStats::value_type &event_stat_category_i) const
 Branch stopper.
void checkCounts (const detail::RecoTrackContainer::TrackProxy &track) const
std::array< bool, 3 > selectCounts (const detail::RecoTrackContainer::TrackProxy &track, double eta) const
bool selectCountsFinal (const detail::RecoTrackContainer::TrackProxy &track) const
const Acts::Logger & logger () const
 Private access to the logger.
void initStatTables ()
void copyStats (const EventStats &event_stat) const
void printStatTables () const
std::size_t nSeedCollections () const
std::size_t seedCollectionStride () const
std::size_t getStatCategory (std::size_t seed_collection, float eta) const
std::size_t computeStatSum (std::size_t seed_collection, EStat counter_i, const EventStats &stat) const
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Static Protected Member Functions

static xAOD::UncalibMeasType measurementType (const detail::RecoTrackContainer::TrackStateProxy &trackState)
static void addCountsAndProperties (detail::RecoTrackContainer &tracksContainer, bool add_counts)
static void initCounts (const detail::RecoTrackContainer::TrackProxy &track)
static void updateCounts (const detail::RecoTrackContainer::TrackProxy &track, Acts::ConstTrackStateTypeMap typeFlags, xAOD::UncalibMeasType detType)

Protected Attributes

struct ActsTrk::TrackFindingBaseAlg::MeasurementSelectorConfig m_measurementSelectorConfig
std::unique_ptr< CKF_pimplm_trackFinder
detail::xAODUncalibMeasSurfAcc m_unalibMeasSurfAcc {}
ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool"}
ServiceHandle< ActsTrk::ITrackingGeometrySvcm_trackingGeometrySvc {this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"}
ToolHandle< ActsTrk::TrackStatePrinterToolm_trackStatePrinter {this, "TrackStatePrinter", "", "optional track state printer"}
ToolHandle< ActsTrk::IFitterToolm_fitterTool {this, "FitterTool", "", "Fitter Tool for Seeds"}
ToolHandle< ActsTrk::IPixelOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool {this, "PixelCalibrator", "", "Opt. pixel measurement calibrator"}
ToolHandle< ActsTrk::IStripOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool {this, "StripCalibrator", "", "Opt. strip measurement calibrator"}
ToolHandle< ActsTrk::IHGTDOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool {this, "HGTDCalibrator", "", "Opt. HGTD measurement calibrator"}
SG::WriteHandleKey< ActsTrk::TrackContainerm_trackContainerKey {this, "ACTSTracksLocation", "", "Output track collection (ActsTrk variant)"}
ActsTrk::MutableTrackContainerHandlesHelper m_tracksBackendHandlesHelper {this}
ContextUtility m_ctxProvider {this}
 Utility to fetch the geometry, magnetic field and calibration context in the event.
Gaudi::Property< unsigned int > m_maxPropagationStep {this, "maxPropagationStep", 1000, "Maximum number of steps for one propagate call"}
Gaudi::Property< std::vector< double > > m_etaBins {this, "etaBins", {}, "bins in |eta| to specify variable selections"}
Gaudi::Property< std::vector< double > > m_chi2CutOff {this, "chi2CutOff", {}, "MeasurementSelector: maximum local chi2 contribution"}
Gaudi::Property< std::vector< double > > m_chi2OutlierCutOff {this, "chi2OutlierCutOff", {}, "MeasurementSelector: maximum local chi2 contribution for outlier"}
Gaudi::Property< std::vector< size_t > > m_numMeasurementsCutOff {this, "numMeasurementsCutOff", {}, "MeasurementSelector: maximum number of associated measurements on a single surface"}
Gaudi::Property< double > m_edgeHoleBorderWidth {this,"EdgeHoleBorderWidth", 0. ,"Width of the border of surfaces (mm) within which holes are not counted as holes."}
Gaudi::Property< std::vector< std::size_t > > m_ptMinMeasurements {this, "ptMinMeasurements", {}, "if specified for the given seed collection, applies ptMin cut in branch stopper once ptMinMinMeasurements have been encountered"}
Gaudi::Property< std::vector< std::size_t > > m_absEtaMaxMeasurements {this, "absEtaMaxMeasurements", {}, "if specified for the given seed collection, applies absEtaMax cut in branch stopper once absEtaMaxMeasurements have been encountered"}
Gaudi::Property< bool > m_doBranchStopper {this, "doBranchStopper", true, "use branch stopper"}
Gaudi::Property< bool > m_doTwoWay {this, "doTwoWay", true, "run CKF twice, first with forward propagation with smoothing, then with backward propagation"}
Gaudi::Property< bool > m_inflateCovarianceTwoWay {this, "inflateCovarianceTwoWay", false, "inflate covariance matrix at the beginning of two-way track finding"}
Gaudi::Property< double > m_twoWayinflateCovarianceFactor {this, "twoWayinflateCovarianceFactor", 1.0, "factor to multiply the initial covariance matrix at the beginning of two-way track finding"}
Gaudi::Property< double > m_branchStopperPtMinFactor {this, "branchStopperPtMinFactor", 1.0, "factor to multiply ptMin cut when used in the branch stopper"}
Gaudi::Property< double > m_seedRefitPtMinFactor {this, "seedRefitPtMinFactor", 1.0, "factor to multiply ptMin cut when used in the seed refit"}
Gaudi::Property< double > m_branchStopperAbsEtaMaxExtra {this, "branchStopperAbsEtaMaxExtra", 0.0, "increase absEtaMax cut when used in the branch stopper"}
Gaudi::Property< double > m_branchStopperMeasCutReduce {this, "branchStopperMeasCutReduce", 2, "how much to reduce the minMeas requirement for the branch stopper"}
Gaudi::Property< double > m_branchStopperAbsEtaMeasCut {this, "branchStopperAbsEtaMeasCut", 1.2, "the minimum |eta| to apply the reduction to the minMeas requirement for the branch stopper"}
Gaudi::Property< std::vector< double > > m_phiMin {this, "phiMin", {}, "TrackSelector: phiMin"}
Gaudi::Property< std::vector< double > > m_phiMax {this, "phiMax", {}, "TrackSelector: phiMax"}
Gaudi::Property< std::vector< double > > m_etaMin {this, "etaMin", {}, "TrackSelector: etaMin"}
Gaudi::Property< std::vector< double > > m_etaMax {this, "etaMax", {}, "TrackSelector: etaMax"}
Gaudi::Property< double > m_absEtaMin {this, "absEtaMin", 0.0, "TrackSelector: absEtaMin"}
Gaudi::Property< double > m_absEtaMax {this, "absEtaMax", std::numeric_limits<double>::max(), "TrackSelector: absEtaMax"}
Gaudi::Property< std::vector< double > > m_ptMin {this, "ptMin", {}, "TrackSelector: ptMin"}
Gaudi::Property< std::vector< double > > m_ptMax {this, "ptMax", {}, "TrackSelector: ptMax"}
Gaudi::Property< std::vector< double > > m_d0Min {this, "d0Min", {}, "TrackSelector: d0Min"}
Gaudi::Property< std::vector< double > > m_d0Max {this, "d0Max", {}, "TrackSelector: d0Max"}
Gaudi::Property< std::vector< double > > m_z0Min {this, "z0Min", {}, "TrackSelector: z0Min"}
Gaudi::Property< std::vector< double > > m_z0Max {this, "z0Max", {}, "TrackSelector: z0Max"}
Gaudi::Property< std::vector< std::size_t > > m_minMeasurements {this, "minMeasurements", {}, "TrackSelector: minMeasurements"}
Gaudi::Property< std::vector< std::size_t > > m_maxHoles {this, "maxHoles", {}, "TrackSelector: maxHoles"}
Gaudi::Property< std::vector< std::size_t > > m_maxOutliers {this, "maxOutliers", {}, "TrackSelector: maxOutliers"}
Gaudi::Property< std::vector< std::size_t > > m_maxSharedHits {this, "maxSharedHits", {}, "TrackSelector: maxSharedHits"}
Gaudi::Property< std::vector< double > > m_maxChi2 {this, "maxChi2", {}, "TrackSelector: maxChi2"}
Gaudi::Property< bool > m_addCounts {this, "addCounts", true, "keep separate pixel, strip and hgtd counts and apply the following cuts"}
Gaudi::Property< bool > m_checkCounts {this, "checkCounts", false, "check consistency among track state counts"}
Gaudi::Property< std::vector< std::size_t > > m_minPixelHits {this, "minPixelHits", {}, "minimum number of pixel hits"}
Gaudi::Property< std::vector< std::size_t > > m_minStripHits {this, "minStripHits", {}, "minimum number of strip hits"}
Gaudi::Property< std::vector< std::size_t > > m_minHgtdHits {this, "minHgtdHits", {}, "minimum number of hgtd hits"}
Gaudi::Property< std::vector< std::size_t > > m_maxPixelHoles {this, "maxPixelHoles", {}, "maximum number of pixel holes"}
Gaudi::Property< std::vector< std::size_t > > m_maxStripHoles {this, "maxStripHoles", {}, "maximum number of strip holes"}
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdHoles {this, "maxHgtdHoles", {}, "maximum number of hgtd holes"}
Gaudi::Property< std::vector< std::size_t > > m_maxPixelOutliers {this, "maxPixelOutliers", {}, "maximum number of pixel outliers"}
Gaudi::Property< std::vector< std::size_t > > m_maxStripOutliers {this, "maxStripOutliers", {}, "maximum number of strip outliers"}
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdOutliers {this, "maxHgtdOutliers", {}, "maximum number of hgtd outliers"}
Gaudi::Property< std::vector< std::uint32_t > > m_endOfWorldVolumeIds {this, "EndOfTheWorldVolumeIds", {}, ""}
Gaudi::Property< std::vector< float > > m_statEtaBins {this, "StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4}, "Gather statistics separately for these bins."}
Gaudi::Property< std::vector< std::string > > m_seedLabels {this, "SeedLabels", {}, "One label per seed key used in outputs"}
Gaudi::Property< bool > m_dumpAllStatEtaBins {this, "DumpEtaBinsForAll", false, "Dump eta bins of all statistics counter."}
std::unique_ptr< const Acts::Logger > m_logger
 logging instance
bool m_useAbsEtaForStat = false
bool m_showResolvedStats = false

Static Protected Attributes

static constexpr BranchState s_branchState {}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

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.
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
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, this function then extrapolates the track to the next valid surface
StatusCode collectMeasurements (const EventContext &context, detail::TrackFindingMeasurements &measurements) const
 Create and fills the TrackExtensionData with HGTD hits at the extension.
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.
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.
const xAOD::HGTDClustergetHGTDClusterFromState (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 extension decoration.
std::size_t getHGTDLayerIndex (const Acts::GeometryIdentifier &geoID) const
 returns the index of HGTD layer where surfaces lies.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::TrackParticleContainerm_trackParticleContainerName {this, "TrackParticleContainerName", "InDetTrackParticles", "Name of the TrackParticle container"}
SG::ReadHandleKey< xAOD::HGTDClusterContainerm_HGTDClusterContainerName {this, "HGTDClusterContainerName", "HGTD_Clusters", "Name of the HGTD_Cluster container"}
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainerm_uncalibratedMeasurementContainerKeys {this, "UncalibratedMeasurementContainerKeys", {}, "input cluster collections"}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainerm_actsTrackLinkKey {this, "ActsTrackLink", m_trackParticleContainerName, "actsTrack", "Link to Acts track"}
Gaudi::Property< float > m_minEtaAcceptance {this, "MinEtaAcceptance", 2.38, "Minimum eta to consider a track for extension"}
Gaudi::Property< float > m_maxEtaAcceptance {this, "MaxEtaAcceptance", 4.00, "Maximum eta to consider a track for extension"}
ActsTrk::detail::xAODUncalibMeasSurfAcc m_surfAcc {}
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_numHGTDHitsKey {this, "numHGTDHits", m_trackParticleContainerName, "numHGTDHits", "Number of HGTD hits on the track extension"}
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_layerHasExtensionKey { this, "HGTD_has_extension", m_trackParticleContainerName, "HGTD_has_extension", "Decoration for layer extension" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_layerExtensionChi2Key { this, "HGTD_extension_chi2", m_trackParticleContainerName, "HGTD_extension_chi2", "Decoration for chi2 of extension" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_layerClusterRawTimeKey { this, "HGTD_cluster_raw_time", m_trackParticleContainerName, "HGTD_cluster_raw_time", "Decoration for raw time of cluster" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_layerClusterTimeKey { this, "HGTD_cluster_time", m_trackParticleContainerName, "HGTD_cluster_time", "Decoration for cluster time" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_extrapXKey { this, "HGTD_extrap_x", m_trackParticleContainerName, "HGTD_extrap_x", "Decoration for extrapolated X coordinate" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_extrapYKey { this, "HGTD_extrap_y", m_trackParticleContainerName, "HGTD_extrap_y", "Decoration for extrapolated Y coordinate" }
SG::WriteDecorHandleKey< xAOD::TrackParticleContainerm_hgtdTrackLinkKey {this, "hgtdTrackLink", m_trackParticleContainerName, "hgtdTrackLink", "Link to Hgtd track"}
Gaudi::Property< float > m_memorySafetyMargin {this, "MemorySafetyMargin", 1.2}
std::atomic< std::size_t > m_nTrackReserve ATLAS_THREAD_SAFE {0ul}
std::atomic< std::size_t > m_nTrackStateReserve ATLAS_THREAD_SAFE {0ul}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 67 of file HGTDTrackExtensionAlg.h.

Member Typedef Documentation

◆ BranchStopperResult

using ActsTrk::TrackFindingBaseAlg::BranchStopperResult = Acts::CombinatorialKalmanFilterBranchStopperResult
protectedinherited

Definition at line 281 of file TrackFindingBaseAlg.h.

◆ EventStats

using ActsTrk::TrackFindingBaseAlg::EventStats = std::vector<std::array<unsigned int, kNStat>>
protectedinherited

Definition at line 183 of file TrackFindingBaseAlg.h.

◆ ExpectedLayerPattern

using ActsTrk::HGTDTrackExtensionAlg::ExpectedLayerPattern = std::array<unsigned int, 4>

Definition at line 75 of file HGTDTrackExtensionAlg.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TrackFinderOptions

using ActsTrk::TrackFindingBaseAlg::TrackFinderOptions = Acts::CombinatorialKalmanFilterOptions<detail::RecoTrackContainer>
protectedinherited

Definition at line 54 of file TrackFindingBaseAlg.h.

◆ TrkProxy

using ActsTrk::TrackFindingBaseAlg::TrkProxy = detail::RecoTrackContainer::TrackProxy
protectedinherited

Definition at line 256 of file TrackFindingBaseAlg.h.

Member Enumeration Documentation

◆ EStat

enum ActsTrk::TrackFindingBaseAlg::EStat : std::size_t
protectedinherited
Enumerator
kNTotalSeeds 
kNoTrackParam 
kNUsedSeeds 
kNoTrack 
kNDuplicateSeeds 
kNNoEstimatedParams 
kNOutputTracks 
kNSeedRefitFailure 
kNRejectedRefinedSeeds 
kNSelectedTracks 
kNStoppedTracksMaxHoles 
kMultipleBranches 
kNoSecond 
kNStoppedTracksMinPt 
kNStoppedTracksMaxEta 
kNTotalSharedHits 
kNForcedSeedMeasurements 
kNResolvedTracks 
kNStat 

Definition at line 160 of file TrackFindingBaseAlg.h.

161 {
165 kNoTrack,
174 kNoSecond,
180 kNStat
181 };

Constructor & Destructor Documentation

◆ ~HGTDTrackExtensionAlg()

virtual ActsTrk::HGTDTrackExtensionAlg::~HGTDTrackExtensionAlg ( )
virtualdefault

Member Function Documentation

◆ addCountsAndProperties()

void ActsTrk::TrackFindingBaseAlg::addCountsAndProperties ( detail::RecoTrackContainer & tracksContainer,
bool add_counts )
staticprotectedinherited

Definition at line 411 of file TrackFindingBaseAlg.cxx.

412 {
413 if (addCounts) {
414 tracksContainer.addColumn<unsigned int>("nPixelHits");
415 tracksContainer.addColumn<unsigned int>("nStripHits");
416 tracksContainer.addColumn<unsigned int>("nHgtdHits");
417 tracksContainer.addColumn<unsigned int>("nPixelHoles");
418 tracksContainer.addColumn<unsigned int>("nStripHoles");
419 tracksContainer.addColumn<unsigned int>("nHgtdHoles");
420 tracksContainer.addColumn<unsigned int>("nPixelOutliers");
421 tracksContainer.addColumn<unsigned int>("nStripOutliers");
422 tracksContainer.addColumn<unsigned int>("nHgtdOutliers");
423 }
425 }
static void addFitterTypeProperty(track_container_t &tracksContainer)
add fitter column to the track container

◆ addTrack()

bool ActsTrk::HGTDTrackExtensionAlg::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
private

add extension to track container if it passes the track selector criteria

Parameters
detContext- detector context
track- track to be added
refSurface- reference surface from ITk track, used by extrapolator
extrapolationStrategy- extrapolation direction
actsTracksContainer- output extensions container (after selection and aggregated of all event)
measurementIndex- helper with measurement indices
tracksContainerTemp- extensions found by CKF (before track selection)
Returns
true if track was accepted and added to container, false otherwise

Definition at line 840 of file HGTDTrackExtensionAlg.cxx.

846 {
847
848 std::array<unsigned int, 4> expectedLayerPattern{};
849
850 // if the the perigeeSurface was not hit (in particular the case for the inside-out pass,
851 // the track has no reference surface and the extrapolation to the perigee has not been done
852 // yet.
853 if (not track.hasReferenceSurface()) {
854 auto extrapolationResult =
855 extrapolateTrackToReferenceSurface(detContext, track,
856 refSurface,
857 trackFinder().extrapolator,
858 extrapolationStrategy,
859 expectedLayerPattern);
860 if (not extrapolationResult.ok()) {
861 ATH_MSG_WARNING("Extrapolation for "
862 << track.index()
863 << " failed with error " << extrapolationResult.error()
864 << " dropping track candidate.");
865 return false;
866 }
867 }
868
869 // Before trimming, inspect encountered surfaces from all track states
870 for(const auto ts : track.trackStatesReversed()) {
871 const auto* detElem = getActsDetectorElement(ts.referenceSurface());
872 if(detElem != nullptr) {
873 detail::addToExpectedLayerPattern(expectedLayerPattern, *detElem);
874 }
875 }
876 // Trim tracks
877 // - trimHoles
878 // - trimOutliers
879 // - trimMaterial
880 // - trimOtherNoneMeasurement
881 Acts::trimTrack(track, true, true, true, true);
882 Acts::calculateTrackQuantities(track);
883 if (m_addCounts) {
884 initCounts(track);
885 for (const auto trackState : track.trackStatesReversed()) {
886 updateCounts(track, trackState.typeFlags(), measurementType(trackState));
887 }
888 if (m_checkCounts) {
889 checkCounts(track);
890 }
891 }
892
893 if ( not trackFinder().trackSelector.isValidTrack(track)) {
894 ATH_MSG_WARNING("Track " << track.index() << " failed track selection");
895 if ( m_trackStatePrinter.isSet() ) {
896 m_trackStatePrinter->printTrack(detContext.geometry, tracksContainerTemp, track, measurementIndex, true);
897 }
898 return false;
899 }
900
901 auto actsDestProxy = actsTracksContainer.makeTrack();
902 actsDestProxy.copyFrom(track); // make sure we copy track states!
903 detail::ExpectedLayerPatternHelper::set(actsDestProxy, expectedLayerPattern);
904
905 ATH_MSG_DEBUG("Added Track " << track.index() << " into container");
906 return true;
907}
const ActsDetectorElement * getActsDetectorElement(const Acts::Surface &surf)
Attempts to retrieve the ActsDetectorElement associated to the passed ActsSurface.
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
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,...
static xAOD::UncalibMeasType measurementType(const detail::RecoTrackContainer::TrackStateProxy &trackState)
ToolHandle< ActsTrk::TrackStatePrinterTool > m_trackStatePrinter
void checkCounts(const detail::RecoTrackContainer::TrackProxy &track) const
static void initCounts(const detail::RecoTrackContainer::TrackProxy &track)
Gaudi::Property< bool > m_checkCounts
static void updateCounts(const detail::RecoTrackContainer::TrackProxy &track, Acts::ConstTrackStateTypeMap typeFlags, xAOD::UncalibMeasType detType)
Gaudi::Property< bool > m_addCounts
int ts
Definition globals.cxx:24
std::array< unsigned int, 4 > expectedLayerPattern(const EventContext &ctx, const ActsTrk::IExtrapolationTool &extrapolator, const Acts::BoundTrackParameters &perigee_parameters, double pathLimit)
Extrapolate from the perigee outwards and gather information which detector layers should have hits.
void addToExpectedLayerPattern(std::array< unsigned int, 4 > &pattern, const ActsDetectorElement &detElement)
static void set(track_proxy_t &track, std::array< unsigned int, 4 > values)

◆ checkCounts()

void ActsTrk::TrackFindingBaseAlg::checkCounts ( const detail::RecoTrackContainer::TrackProxy & track) const
protectedinherited

Definition at line 470 of file TrackFindingBaseAlg.cxx.

470 {
471 // This check will fail if there are other types (HGTD, MS?) of hits, holes, or outliers.
472 // The check can be removed when it is no longer appropriate.
473 if (track.nMeasurements() != s_branchState.nPixelHits(track) + s_branchState.nStripHits(track) + s_branchState.nHgtdHits(track))
474 ATH_MSG_WARNING("mismatched hit count: total (" << track.nMeasurements()
475 << ") != pixel (" << s_branchState.nPixelHits(track)
476 << ") + strip (" << s_branchState.nStripHits(track)
477 << ") + hgtd (" << s_branchState.nHgtdHits(track)
478 << ")");
479 if (track.nHoles() != s_branchState.nPixelHoles(track) + s_branchState.nStripHoles(track) + s_branchState.nHgtdHoles(track))
480 ATH_MSG_WARNING("mismatched hole count: total (" << track.nHoles()
481 << ") < pixel (" << s_branchState.nPixelHoles(track)
482 << ") + strip (" << s_branchState.nStripHoles(track)
483 << ") + hgtd (" << s_branchState.nHgtdHoles(track)
484 << ")");
485 if (track.nOutliers() != s_branchState.nPixelOutliers(track) + s_branchState.nStripOutliers(track) + s_branchState.nHgtdOutliers(track))
486 ATH_MSG_WARNING("mismatched outlier count: total (" << track.nOutliers()
487 << ") != pixel (" << s_branchState.nPixelOutliers(track)
488 << ") + strip (" << s_branchState.nStripOutliers(track)
489 << ") + hgtd (" << s_branchState.nHgtdOutliers(track)
490 << ")");
491 };
static constexpr BranchState s_branchState

◆ collectMeasurements()

StatusCode ActsTrk::HGTDTrackExtensionAlg::collectMeasurements ( const EventContext & context,
detail::TrackFindingMeasurements & measurements ) const
private

Create and fills the TrackExtensionData with HGTD hits at the extension.

The TrackExtensionData object will later be used to fill the TrackParticle decorations

Parameters
trackParticle- trackParticle associated with this hit
measurements- measurements to be used at the extension finding

◆ computeStatSum()

std::size_t ActsTrk::TrackFindingBaseAlg::computeStatSum ( std::size_t seed_collection,
EStat counter_i,
const EventStats & stat ) const
protectedinherited

Definition at line 780 of file TrackFindingBaseAlg.cxx.

780 {
781 std::size_t out = 0u;
782 for (std::size_t category_i = seed_collection * seedCollectionStride();
783 category_i < (seed_collection + 1) * seedCollectionStride();
784 ++category_i)
785 {
786 assert(category_i < stat.size());
787 out += stat[category_i][counter_i];
788 }
789 return out;
790 }
std::size_t seedCollectionStride() const
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77

◆ copyStats()

void ActsTrk::TrackFindingBaseAlg::copyStats ( const EventStats & event_stat) const
protectedinherited

Definition at line 566 of file TrackFindingBaseAlg.cxx.

566 {
567 std::lock_guard<std::mutex> lock(m_mutex);
568 std::size_t category_i = 0;
569 for (const std::array<unsigned int, kNStat> &src_stat : event_stat)
570 {
571 std::array<std::size_t, kNStat> &dest_stat = m_stat[category_i++];
572 for (std::size_t i = 0; i < src_stat.size(); ++i)
573 {
574 assert(i < dest_stat.size());
575 dest_stat[i] += src_stat[i];
576 }
577 }
578 }
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.

◆ correctTOF()

std::pair< float, float > ActsTrk::HGTDTrackExtensionAlg::correctTOF ( const xAOD::TrackParticle * trackParticle,
const xAOD::HGTDCluster * cluster,
float measuredTime,
float measuredTimeErr,
const Acts::TrackingGeometry * trackingGeometry,
const Acts::GeometryContext & geoContext ) const
private

subtracts the time of flight (TOF) from a measured hit time.

It uses an estimate of track particle vertex to calculate the lenght of the track up to this hit. The corrected measurement will be the one to be assigned as the time of the track

Parameters
trackParticle- trackParticle associated with this hit
cluster- HGTD cluster of the hit, used to access its surface and position
measuredTime- time measured (ns)
measuredTimeErr- resolution of time measured (ns)
trackingGeometry- detector geometry
geoContext- geometry context

Definition at line 672 of file HGTDTrackExtensionAlg.cxx.

678 {
679
680 ATH_MSG_DEBUG("Correcting input time: " << measuredTime);
681
682 if (!trackParticle || !cluster) {
683 ATH_MSG_WARNING("Null pointer provided to correctTOF");
684 return {measuredTime, measuredTimeErr}; // Return uncorrected values
685 }
686
687 // Get the surface for this HGTD cluster
688 const Acts::Surface* surface = nullptr;
689 try {
690 surface = m_surfAcc.get(cluster);
691 } catch (const std::exception& e) {
692 ATH_MSG_WARNING("Exception getting surface: " << e.what());
693 return {measuredTime, measuredTimeErr}; // Return uncorrected values
694 }
695
696 if (!surface) {
697 ATH_MSG_WARNING("Could not determine surface for HGTD cluster with id "
698 << cluster->identifier());
699 return {measuredTime, measuredTimeErr}; // Return uncorrected values
700 }
701
702 // Get the global position of the hit
703 Acts::Vector3 globalHitPos;
704 try {
705 // Try to get the cluster's local position
706 auto localPos = cluster->localPosition<3>();
707 // Transform to global coordinates
708 globalHitPos = surface->localToGlobal(
709 geoContext,
710 Acts::Vector2(localPos[0], localPos[1]),
711 Acts::Vector3::Zero());
712 } catch (const std::exception& e) {
713 ATH_MSG_WARNING("Failed to transform position: " << e.what());
714 // Fall back to surface center
715 globalHitPos = surface->center(geoContext);
716 }
717
718 // Get track origin (vertex position)
719 //option 1 - use beamspot
720 //Amg::Vector3D trackOrigin(trackParticle->vx(), trackParticle->vy(), trackParticle->vz());
721
722 //option 2 - use perigee - this is what is done in legacy code:
723 // https://gitlab.cern.ch/atlas/athena/-/blob/main/HighGranularityTimingDetector/HGTD_Reconstruction/HGTD_RecTools/src/StraightLineTOFcorrectionTool.cxx
724 // Get track origin from perigee parameters instead of vertex
725 // In ACTS, this is the d0 and z0 parameter with reference to the beamline
726
727 // Get the perigee position (the point of closest approach to the beamline)
728 double d0 = trackParticle->d0();
729 double z0 = trackParticle->z0();
730 double phi0 = trackParticle->phi0();
731
732 Amg::Vector3D trackOrigin(-d0 * std::sin(phi0), d0 * std::cos(phi0), z0);
733 ATH_MSG_DEBUG("Track perigee: d0=" << d0 << ", z0=" << z0 << ", phi0=" << phi0);
734 ATH_MSG_DEBUG("Track origin (perigee): (" << trackOrigin.x() << ", "
735 << trackOrigin.y() << ", " << trackOrigin.z() << ")");
736
737 // Calculate distance components
738 float dx = globalHitPos.x() - trackOrigin.x();
739 float dy = globalHitPos.y() - trackOrigin.y();
740 float dz = globalHitPos.z() - trackOrigin.z();
741
742 // Calculate distance and time of flight
743 float distance = std::sqrt(dx*dx + dy*dy + dz*dz);
744 float tof = distance / Gaudi::Units::c_light;
745
746 // Apply TOF correction
747 float correctedTime = measuredTime - tof;
748
749 ATH_MSG_DEBUG("Track origin: (" << trackOrigin.x() << ", "
750 << trackOrigin.y() << ", " << trackOrigin.z() << ")");
751 ATH_MSG_DEBUG("Hit position: (" << globalHitPos.x() << ", "
752 << globalHitPos.y() << ", " << globalHitPos.z() << ")");
753 ATH_MSG_DEBUG("Distance = " << distance << " mm, TOF = " << tof
754 << " ns, Corrected time = " << correctedTime);
755
756 return {correctedTime, measuredTimeErr};
757}
ActsTrk::detail::xAODUncalibMeasSurfAcc m_surfAcc
float z0() const
Returns the parameter.
float d0() const
Returns the parameter.
float phi0() const
Returns the parameter, which has range to .
DetectorIdentType identifier() const
Returns the full Identifier of the measurement.
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Eigen::Matrix< double, 3, 1 > Vector3D

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ doRefit()

template<class MeasurementSource>
std::variant< std::unique_ptr< Acts::BoundTrackParameters >, TrackFindingBaseAlg::EStat > ActsTrk::TrackFindingBaseAlg::doRefit ( const MeasurementSource & measurement,
const Acts::BoundTrackParameters & initialParameters,
const DetectorContextHolder & detContext,
const bool paramsAtOutermostSurface ) const
protectedinherited

Perform Kalman Filter fit and update given initialParameters.

Template Parameters
MeasurementSourceType of measurement source: ActsTrk::Seed or (in future) ActsTrk::ProtoTrack
Parameters
measurementMeasurement source for KF
initialParametersParameters to use in KF
detContextStruct holding geometry, magnetic field and calibration contexts
paramsAtOutermostSurfaceFlag for searching in reverse direction
Returns
Unique pointer to updated parameters

◆ doTwoWayTrackFinding()

std::vector< typename detail::RecoTrackContainer::TrackProxy > ActsTrk::TrackFindingBaseAlg::doTwoWayTrackFinding ( const detail::RecoTrackStateContainerProxy & firstMeasurement,
const TrkProxy & trackProxy,
detail::RecoTrackContainer & tracksContainerTemp,
const TrackFinderOptions & options ) const
protectedinherited

Perform two-way track finding.

Parameters
addTrackFunction or lambda which adds newly found track to container
trackProxyTrack proxy object
tracksContainerTempTrack proxy container
optionsFit options
tgContextGeometry context
reverseSearchFlag for searching in reverse direction
seedTypeSeed type (only used for warnings/debug printouts)
iseedSeed number (only used for warnings/debug printouts)
itrackTrack number (only used for warnings/debug printouts)
Returns
Number of found tracks

Definition at line 243 of file TrackFindingBaseAlg.cxx.

246 {
247 if (not m_doTwoWay) return {};
248
249 // Create initial parameters for the propagation
250 Acts::BoundTrackParameters secondInitialParameters = trackProxy.createParametersFromState(detail::RecoConstTrackStateContainerProxy{firstMeasurement});
251 if (!secondInitialParameters.referenceSurface().insideBounds(secondInitialParameters.localPosition())) { // #3751
252 return {};
253 }
254
255 // First, inflate the covariance matrix if configured
257 ATH_MSG_DEBUG("Inflating covariance matrix for second track finding with factor = " << m_twoWayinflateCovarianceFactor.value());
258 ATH_MSG_VERBOSE("Original parameters before inflation: \n" << secondInitialParameters);
259
260 auto inflatedCovariance = secondInitialParameters.covariance().value();
261 inflatedCovariance *= m_twoWayinflateCovarianceFactor;
262
263 const auto& origSurface = secondInitialParameters.referenceSurface();
264 auto surfacePtr = const_cast<Acts::Surface&>(origSurface).shared_from_this();
265
266 Acts::BoundTrackParameters newParams(
267 std::static_pointer_cast<const Acts::Surface>(std::move(surfacePtr)),
268 secondInitialParameters.parameters(),
269 std::make_optional(inflatedCovariance),
270 secondInitialParameters.particleHypothesis());
271 secondInitialParameters = std::move(newParams);
272
273 ATH_MSG_VERBOSE("Inflated covariance matrix : \n" << secondInitialParameters.covariance().value());
274 }
275
276 auto rootBranch = tracksContainerTemp.makeTrack();
277 rootBranch.copyFromWithoutStates(trackProxy); // #3534
278
279 // perform track finding
280 auto secondResult =
281 trackFinder().ckf.findTracks(secondInitialParameters, options, tracksContainerTemp, rootBranch);
282 if (not secondResult.ok()) {
283 return {};
284 }
285 return secondResult.value();
286 }
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< bool > m_doTwoWay
Gaudi::Property< double > m_twoWayinflateCovarianceFactor
Gaudi::Property< bool > m_inflateCovarianceTwoWay
RecoTrackStateContainer::ConstTrackStateProxy RecoConstTrackStateContainerProxy
const xAOD::UncalibratedMeasurement * firstMeasurement(const xAOD::MuonSegment &segment, const bool skipOutlier=true)
Retrieves the first measurement associated with the segment.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode ActsTrk::HGTDTrackExtensionAlg::execute ( const EventContext & ctx) const
overridevirtual

Reimplemented from ActsTrk::TrackFindingBaseAlg.

Definition at line 125 of file HGTDTrackExtensionAlg.cxx.

126{
127 ATH_MSG_DEBUG("Executing " << name() << "...");
128
129 auto timer = Monitored::Timer<std::chrono::milliseconds>("TIME_execute");
130 auto mon_nTracks = Monitored::Scalar<int>("nTracks");
131 auto mon = Monitored::Group(m_monTool, timer, mon_nTracks);
132
133 // ================================================== //
134 // ========= RETRIEVE TRACK PARTICLES =============== //
135 // ================================================== //
136
137 const xAOD::TrackParticleContainer* trackParticles{nullptr};
138 ATH_CHECK(SG::get(trackParticles, m_trackParticleContainerName, ctx));
139
140 ATH_MSG_DEBUG("Size of trackParticles collection " << trackParticles->size());
141
142 // Create WriteDecorHandles for all decorations
143 SG::WriteDecorHandle<xAOD::TrackParticleContainer, std::vector<char>> layerHasExtensionHandle(m_layerHasExtensionKey, ctx);
144 SG::WriteDecorHandle<xAOD::TrackParticleContainer, std::vector<float>> layerExtensionChi2Handle(m_layerExtensionChi2Key, ctx);
145 SG::WriteDecorHandle<xAOD::TrackParticleContainer, std::vector<float>> layerClusterRawTimeHandle(m_layerClusterRawTimeKey, ctx);
146 SG::WriteDecorHandle<xAOD::TrackParticleContainer, std::vector<float>> layerClusterTimeHandle(m_layerClusterTimeKey, ctx);
147 SG::WriteDecorHandle<xAOD::TrackParticleContainer, float> extrapXHandle(m_extrapXKey, ctx);
148 SG::WriteDecorHandle<xAOD::TrackParticleContainer, float> extrapYHandle(m_extrapYKey, ctx);
149 SG::WriteDecorHandle<xAOD::TrackParticleContainer, int> numHGTDHitsHandle(m_numHGTDHitsKey, ctx);
150 SG::WriteDecorHandle<xAOD::TrackParticleContainer, ElementLink<ActsTrk::TrackContainer>> hgtdTrackLink(m_hgtdTrackLinkKey, ctx);
151
152 // ================================================== //
153 // ============ RETRIEVE MEASUREMENTS =============== //
154 // ================================================== //
155 const xAOD::HGTDClusterContainer* hgtdClusters{nullptr};
156 ATH_CHECK(SG::get(hgtdClusters, m_HGTDClusterContainerName, ctx));
157
158
159 std::vector<const xAOD::UncalibratedMeasurementContainer *> uncalibratedMeasurementContainers;
160 std::size_t total_measurements = 0;
161 ATH_CHECK(getContainersFromKeys(ctx, m_uncalibratedMeasurementContainerKeys, uncalibratedMeasurementContainers, total_measurements));
162
163
164 detail::MeasurementIndex measurementIndex(uncalibratedMeasurementContainers.size());
165 for (std::size_t icontainer = 0; icontainer < uncalibratedMeasurementContainers.size(); ++icontainer) {
166 measurementIndex.addMeasurements(*uncalibratedMeasurementContainers[icontainer]);
167 }
168
169 detail::TrackFindingMeasurements measurements(uncalibratedMeasurementContainers.size());
170 for (std::size_t icontainer = 0; icontainer < uncalibratedMeasurementContainers.size(); ++icontainer) {
171 ATH_MSG_DEBUG("Create " << uncalibratedMeasurementContainers[icontainer]->size() <<
172 " source links from measurements in " << m_uncalibratedMeasurementContainerKeys[icontainer].key());
173 measurements.addMeasurements(icontainer,
174 *uncalibratedMeasurementContainers[icontainer],
175 *m_trackingGeometrySvc->surfaceIdMap(),
176 &measurementIndex);
177 }
178
179 ATH_MSG_DEBUG("measurement index size = " << measurementIndex.size());
180
181
182 if (m_trackStatePrinter.isSet()) {
183 m_trackStatePrinter->printMeasurements(ctx, uncalibratedMeasurementContainers, measurements.measurementOffsets());
184 }
185
186 // ================================================== //
187 // ===================== COMPUTATION ================ //
188 // ================================================== //
189
190 EventStats event_stat;
191 event_stat.resize(m_stat.size());
192
193 DetectorContextHolder detContext {
194 .geometry = m_ctxProvider.getGeometryContext(ctx),
195 .magField = m_ctxProvider.getMagneticFieldContext(ctx),
196 // CalibrationContext converter not implemented yet.
197 .calib = m_ctxProvider.getCalibrationContext(ctx)
198 };
199
200 Acts::VectorTrackContainer actsTrackBackend;
201 Acts::VectorMultiTrajectory actsTrackStateBackend;
202
203 auto atomicMax=[](std::size_t new_val, std::atomic<std::size_t> &dest) -> void {
204 std::size_t is_value;
205 do {
206 is_value = dest;
207 if (is_value>=new_val) return;
208 } while (!dest.compare_exchange_weak(is_value, new_val));
209 };
210 atomicMax(actsTrackBackend.size(), m_nTrackReserve);
211 atomicMax(actsTrackStateBackend.size(), m_nTrackStateReserve);
212
213 detail::RecoTrackContainer actsTracksContainer(actsTrackBackend,
214 actsTrackStateBackend);
215
216
217 addCountsAndProperties(actsTracksContainer, m_addCounts.value());
218
219 detail::ExpectedLayerPatternHelper::add(actsTracksContainer);
220
221 int extension_index{0};
222 // Loop over each track particle and decorate it with various information
223 std::unordered_map<uint32_t, uint32_t> extensions;
224 for (const xAOD::TrackParticle* trackParticle : *trackParticles) {
225 // Default to empty track data
226 TrackExtensionData trackData;
227
228 std::optional<ActsTrk::TrackContainer::ConstTrackProxy> optional_track = getActsTrack(*trackParticle);
229 if (!optional_track.has_value()) {
230 ATH_MSG_ERROR("No valid ACTS track associated with TrackParticle " << trackParticle->index());
231 return StatusCode::FAILURE;
232 }
233
234 const ActsTrk::TrackContainer::ConstTrackProxy& track = optional_track.value();
235
236 // Retrieve quantities for ACTS track
237 float trackEta = Acts::VectorHelpers::eta(track.momentum());
238
239 // Check eta coverage first
240 if (std::abs(trackEta) < m_minEtaAcceptance or std::abs(trackEta) > m_maxEtaAcceptance) {
241 ATH_MSG_DEBUG("!!!!! ------ Track eta " << trackEta
242 << " outside eta range [" << m_minEtaAcceptance.value() << ", " << m_maxEtaAcceptance.value()
243 << "], skipping extension ------ !!!!!");
244
245 // set default values
246 trackData.hasClusterVec = {false, false, false, false};
247 trackData.numHGTDHits = 0;
248 layerHasExtensionHandle(*trackParticle) = trackData.hasClusterVec;
249 layerExtensionChi2Handle(*trackParticle) = trackData.chi2Vec;
250 layerClusterRawTimeHandle(*trackParticle) = trackData.rawTimeVec;
251 layerClusterTimeHandle(*trackParticle) = trackData.timeVec;
252 extrapXHandle(*trackParticle) = trackData.extrapX;
253 extrapYHandle(*trackParticle) = trackData.extrapY;
254 numHGTDHitsHandle(*trackParticle) = trackData.numHGTDHits;
255
256 continue;
257 }
258
259 float trackpT = track.transverseMomentum();
260 float trackPhi = track.phi();
261 float trackNmeasurements = track.nMeasurements();
262
263 ATH_MSG_DEBUG("TrackParticle " << trackParticle->index() <<
264 " has ACTS track with eta: " << trackEta <<
265 ", phi: " << trackPhi <<
266 ", pT: " << trackpT <<
267 " and nMeasurements: " << trackNmeasurements);
268
269 // Parameters at last measurement state
270 const auto lastMeasurementState = Acts::findLastMeasurementState(track);
271 if (not lastMeasurementState.ok()) {
272 ATH_MSG_ERROR("Problem finding last measurement state for acts track");
273 return StatusCode::FAILURE;
274 }
275 const Acts::BoundTrackParameters lastMeasurementStateParameters = track.createParametersFromState(*lastMeasurementState);
276
277 // Parameters at reference state of track - not necessarily a measurement state!!!
278 const Acts::Surface& refSurface = track.referenceSurface();
279 const Acts::BoundTrackParameters parametersAtRefSurface(refSurface.getSharedPtr(),
280 track.parameters(),
281 track.covariance(),
282 track.particleHypothesis());
283
284 ATH_MSG_DEBUG("Initial track parameters for extension - lastMeasurementStateParameters:");
285 ATH_MSG_DEBUG(" - eta: " << -1 * log(tan(lastMeasurementStateParameters.theta() * 0.5)));
286 ATH_MSG_DEBUG(" - phi: " << lastMeasurementStateParameters.phi());
287 ATH_MSG_DEBUG(" - pT: " << std::abs(1./lastMeasurementStateParameters.qOverP() * std::sin(lastMeasurementStateParameters.theta())));
288 ATH_MSG_DEBUG(" - theta: " << lastMeasurementStateParameters.theta());
289 ATH_MSG_DEBUG(" - qOverP: " << lastMeasurementStateParameters.qOverP());
290 ATH_MSG_DEBUG(" - covariance exists: " << (lastMeasurementStateParameters.covariance().has_value() ? "yes" : "no"));
291
292
293 // ActsTrk::MutableTrackContainer tracksContainerTemp;
294 Acts::VectorTrackContainer trackBackend;
295 Acts::VectorMultiTrajectory trackStateBackend;
296 detail::RecoTrackContainer tracksContainerTemp(trackBackend, trackStateBackend);
297
298 addCountsAndProperties(tracksContainerTemp, m_addCounts.value());
299
300 detail::ExpectedLayerPatternHelper::add(tracksContainerTemp);
301
302 // Now use the *last measurement parameters* parameters for the CKF
303 if(findExtension(ctx,
304 detContext,
305 measurements,
306 measurementIndex,
307 lastMeasurementStateParameters,
308 tracksContainerTemp,
309 actsTracksContainer,
310 event_stat,
311 refSurface,
312 extension_index))
313 {
314 const detail::RecoTrackContainer::TrackProxy& trackProxy = tracksContainerTemp.at(extension_index);
315 trackData = processTrackExtension(ctx, trackParticle, trackProxy, hgtdClusters);
316 extensions.insert(std::make_pair(trackParticle->index(), actsTracksContainer.size() - 1));
317
318 }
319 else{
320 trackData.hasClusterVec = {false, false, false, false};
321 trackData.numHGTDHits = 0;
322 }
323 // Apply decorations from the track data
324 layerHasExtensionHandle(*trackParticle) = trackData.hasClusterVec;
325 layerExtensionChi2Handle(*trackParticle) = trackData.chi2Vec;
326 layerClusterRawTimeHandle(*trackParticle) = trackData.rawTimeVec;
327 layerClusterTimeHandle(*trackParticle) = trackData.timeVec;
328 extrapXHandle(*trackParticle) = trackData.extrapX;
329 extrapYHandle(*trackParticle) = trackData.extrapY;
330 numHGTDHitsHandle(*trackParticle) = trackData.numHGTDHits;
331 } // loop on tracks
332
333 // ================================================== //
334 // ===================== OUTPUTS ==================== //
335 // ================================================== //
336
337 ATH_MSG_DEBUG(" \\__ Found " << actsTracksContainer.size() << " extensions");
338
339 // update the reserve space
340 if (actsTrackBackend.size() > m_nTrackReserve) {
341 m_nTrackReserve = static_cast<std::size_t>( std::ceil(m_memorySafetyMargin * actsTrackBackend.size()) );
342 }
343 if (actsTrackStateBackend.size() > m_nTrackStateReserve) {
344 m_nTrackStateReserve = static_cast<std::size_t>( std::ceil(m_memorySafetyMargin * actsTrackStateBackend.size()) );
345 }
346
347 // convert to const
348 Acts::ConstVectorTrackContainer constTrackBackend( std::move(actsTrackBackend) );
349 Acts::ConstVectorMultiTrajectory constTrackStateBackend( std::move(actsTrackStateBackend) );
350 std::unique_ptr< ActsTrk::TrackContainer> constTracksContainer = std::make_unique< ActsTrk::TrackContainer >( std::move(constTrackBackend),
351 std::move(constTrackStateBackend) );
352
353 SG::WriteHandle<ActsTrk::TrackContainer> trackContainerHandle = SG::makeHandle(m_trackContainerKey, ctx);
354
355 ATH_MSG_DEBUG(" \\__ Tracks Container `" << m_trackContainerKey.key() << "` created ...");
356 ATH_CHECK(trackContainerHandle.record(std::move(constTracksContainer)));
357
358 const ActsTrk::TrackContainer *const_track_container_ptr = trackContainerHandle.cptr();
359
360 for ( const std::pair< const uint32_t,uint32_t> &ext : extensions) {
361
362 hgtdTrackLink(*trackParticles->at(ext.first))
363 = ElementLink<ActsTrk::TrackContainer>( *const_track_container_ptr,
364 ext.second );
365
366}
367
368 return StatusCode::SUCCESS;
369}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
size_t size() const
Number of registered mappings.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerName
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterRawTimeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_numHGTDHitsKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerExtensionChi2Key
Gaudi::Property< float > m_minEtaAcceptance
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerHasExtensionKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_extrapYKey
Gaudi::Property< float > m_maxEtaAcceptance
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
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_HGTDClusterContainerName
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_hgtdTrackLinkKey
Gaudi::Property< float > m_memorySafetyMargin
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.
SG::WriteHandleKey< ActsTrk::TrackContainer > m_trackContainerKey
ToolHandle< GenericMonitoringTool > m_monTool
StatusCode getContainersFromKeys(const EventContext &ctx, HandleArrayKeyType &handleKeyArray, std::vector< const ContainerType * > &outputContainers, std::size_t &sum) const
Take the array of handle keys and for each key retrieve containers, then append them to the output ve...
static void addCountsAndProperties(detail::RecoTrackContainer &tracksContainer, bool add_counts)
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
ContextUtility m_ctxProvider
Utility to fetch the geometry, magnetic field and calibration context in the event.
std::vector< std::array< unsigned int, kNStat > > EventStats
size_type size() const noexcept
Returns the number of elements in the collection.
const_pointer_type cptr() const
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Acts::TrackContainer< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory > RecoTrackContainer
std::optional< ActsTrk::TrackContainer::ConstTrackStateProxy > lastMeasurementState(const xAOD::TrackParticle &trkPart, const bool skipOutlier=true)
Returns the track state proxy corresponding to the last measurement on track.
std::optional< ActsTrk::TrackContainer::ConstTrackProxy > getActsTrack(const xAOD::TrackParticle &trkPart)
Return the proxy to the Acts track from which the track particle was made frome.
Definition Decoration.cxx:9
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
bool trackEta(const xAOD::TauJet &, const xAOD::TauTrack &track, float &out)
bool trackPhi(const xAOD::TauJet &, const xAOD::TauTrack &track, float &out)
timer(name, disabled=False)
HGTDClusterContainer_v1 HGTDClusterContainer
Define the version of the HGTD cluster container.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Data structure to hold HGTD track extension results Contains information about hits,...
static void add(track_container_t &trackContainer)

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ extrapolateTrackToReferenceSurface()

Acts::Result< void > ActsTrk::HGTDTrackExtensionAlg::extrapolateTrackToReferenceSurface ( const DetectorContextHolder & detContext,
detail::RecoTrackContainerProxy & track,
const Acts::Surface & referenceSurface,
const detail::Extrapolator & propagator,
Acts::TrackExtrapolationStrategy strategy,
ExpectedLayerPattern & expectedLayerPattern ) const
private

it can happen that the last hit of an extension doesn't have a surface associated with it, this function then extrapolates the track to the next valid surface

Parameters
detContext- detector context
track- track to be extrapolated
referenceSurface- perigee surface (beamspot)
propagator- propagator to be used for the extrapolation
strategy- extrapolation strategy (can define if it is outwards or inwards for example)
expectedLayerPattern- output of expected layer pattern

Definition at line 909 of file HGTDTrackExtensionAlg.cxx.

915 {
916
917 Acts::PropagatorOptions<detail::Stepper::Options, detail::Navigator::Options,
918 Acts::ActorList<Acts::MaterialInteractor, Collector>>
919 options(detContext.geometry, detContext.magField);
920
921 auto findResult = findTrackStateForExtrapolation(
922 options.geoContext, track, referenceSurface, strategy, logger());
923
924 if (!findResult.ok()) {
925 ATH_MSG_WARNING("Failed to find track state for extrapolation");
926 return findResult.error();
927 }
928
929 auto &[trackState, distance] = *findResult;
930
931 options.direction = Acts::Direction::fromScalarZeroAsPositive(distance);
932
933 Acts::BoundTrackParameters parameters = track.createParametersFromState(trackState);
934 ATH_MSG_VERBOSE("Extrapolating track to reference surface at distance "
935 << distance << " with direction " << options.direction
936 << " with starting parameters " << parameters);
937
938 auto state = propagator.makeState<decltype(options), Acts::ForcedSurfaceReached>(referenceSurface, options);
940 collectorResult = &expectedLayerPattern;
941
942 auto initRes = propagator.initialize(state, parameters);
943 if(!initRes.ok()) {
944 ATH_MSG_WARNING("Failed to initialize propagation state: " << initRes.error().message());
945 return initRes.error();
946 }
947
948 auto propagateOnlyResult =
949 propagator.propagate(state);
950
951 if (!propagateOnlyResult.ok()) {
952 ATH_MSG_WARNING("Failed to extrapolate track: " << propagateOnlyResult.error().message());
953 return propagateOnlyResult.error();
954 }
955
956 auto propagateResult = propagator.makeResult(
957 std::move(state), propagateOnlyResult, options, true, &referenceSurface);
958
959 if (!propagateResult.ok()) {
960 ATH_MSG_WARNING("Failed to extrapolate track: " << propagateResult.error().message());
961 return propagateResult.error();
962 }
963
964 track.setReferenceSurface(referenceSurface.getSharedPtr());
965 track.parameters() = propagateResult->endParameters.value().parameters();
966 track.covariance() = propagateResult->endParameters.value().covariance().value();
967
968 return Acts::Result<void>::success();
969}
std::array< unsigned int, 4 > ExpectedLayerPattern
const Acts::Logger & logger() const
Private access to the logger.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode ActsTrk::TrackFindingBaseAlg::finalize ( )
overridevirtualinherited

Reimplemented in ActsTrk::TrackFindingAlg.

Definition at line 179 of file TrackFindingBaseAlg.cxx.

179 {
181
182 return StatusCode::SUCCESS;
183 }

◆ findExtension()

bool ActsTrk::HGTDTrackExtensionAlg::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
private

invoke track finding procedure to extend ITk tracks to HGTD layers using CKF.

Extrapolation start with the last hit of ITk track.

Parameters
ctx- event context
detContext- detector context
measurements- measurements to be used at the extension finding
measurementIndex- helper with measurement indices
lastMeasurementStateParameters- State parameters of ITk track last Hit
tracksContainerTemp- extensions found by CKF (before track selection)
actsTracksContainer- output extensions container (after selection and aggregated of all event)
event_stat- stats, just for this event
refSurface- - reference surface from ITk track, used by extrapolator
extension_index- index of the found extension at the tracksContainerTemp
Returns
true if a valid extension was found, false otherwise

Definition at line 371 of file HGTDTrackExtensionAlg.cxx.

381 {
382
383 //Setting pSurface to nullptr
384 auto [options, secondOptions, measurementSelector] = getDefaultOptions(ctx, detContext, measurements, nullptr);
385
386
387 std::size_t category_i = 0;
388 const auto &trackSelectorCfg = trackFinder().trackSelector.config();
389 auto stopBranchProxy = [&](const detail::RecoTrackContainer::TrackProxy &track,
390 const detail::RecoTrackContainer::TrackStateProxy &trackState) -> BranchStopperResult {
391 return stopBranch(track, trackState, trackSelectorCfg, detContext.geometry, measurementIndex, 0, event_stat[category_i]);
392 };
393 options.extensions.branchStopper.connect(stopBranchProxy);
394
395 Acts::PropagatorOptions<detail::Stepper::Options, detail::Navigator::Options,
396 Acts::ActorList<Acts::MaterialInteractor>>
397 extrapolationOptions(detContext.geometry, detContext.magField);
398
399 Acts::TrackExtrapolationStrategy extrapolationStrategy =
400 Acts::TrackExtrapolationStrategy::first;
401
402 // Get the Acts tracks, given the initial parameters from last hit of itk track
403 Acts::Result<std::vector<TrkProxy> > result =
404 trackFinder().ckf.findTracks(initialParameters, options, tracksContainerTemp);
405
406 // Track finding result
407 if (not result.ok()) {
408 ATH_MSG_WARNING("Track finding failed with error" << result.error());
409 return false;
410 }
411
412 ATH_MSG_DEBUG("Built " << tracksContainerTemp.size() << " extensions from it");
413 auto &foundTracks = result.value();
414
415 // loop on the tracks we have just found
416 int best_track_index = -1;
417 float best_track_chi2 = 1000;
418 TrkProxy &best_track_proxy = foundTracks.at(0);
419
420 for (TrkProxy &firstTrack : foundTracks) {
421 if((firstTrack.chi2() > 0) and (firstTrack.chi2() < best_track_chi2)){
422 best_track_index = firstTrack.index();
423 best_track_chi2 = firstTrack.chi2();
424 best_track_proxy = firstTrack;
425 }
426 }
427
428 if(best_track_index == -1) return false;
429
430 ATH_MSG_DEBUG("Best extension index " << best_track_proxy.index() <<
431 " nMeas " << best_track_proxy.nMeasurements() <<
432 " chi2 " << best_track_proxy.chi2());
433
434 if(addTrack(detContext,
435 best_track_proxy,
436 refSurface,
437 extrapolationStrategy,
438 actsTracksContainer,
439 measurementIndex,
440 tracksContainerTemp)){
441
442 extension_index = best_track_index;
443 return true;
444 }
445 else {
446 ATH_MSG_DEBUG("Track failed selection, not adding it");
447 return false;
448 }
449
450}
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
detail::RecoTrackContainer::TrackProxy TrkProxy
BranchStopperResult stopBranch(const detail::RecoTrackContainer::TrackProxy &track, const detail::RecoTrackContainer::TrackStateProxy &trackState, const Acts::TrackSelector::EtaBinnedConfig &trackSelectorCfg, const Acts::GeometryContext &tgContext, const detail::MeasurementIndex &measurementIndex, const std::size_t typeIndex, EventStats::value_type &event_stat_category_i) const
Branch stopper.
TrackFindingDefaultOptions getDefaultOptions(const EventContext &ctx, const DetectorContextHolder &detContext, const detail::TrackFindingMeasurements &measurements, const Acts::PerigeeSurface *pSurface) const
Get CKF options for first and second pass + pointer to MeasurementSelector.
Acts::CombinatorialKalmanFilterBranchStopperResult BranchStopperResult

◆ getContainersFromKeys()

template<class HandleArrayKeyType, class ContainerType>
StatusCode ActsTrk::TrackFindingBaseAlg::getContainersFromKeys ( const EventContext & ctx,
HandleArrayKeyType & handleKeyArray,
std::vector< const ContainerType * > & outputContainers,
std::size_t & sum ) const
protectedinherited

Take the array of handle keys and for each key retrieve containers, then append them to the output vector.

Template Parameters
HandleArrayKeyTypeType of the list of handle keys
ContainerTypeType of the output container
Parameters
ctxEvent context
handleKeyArrayList of handle keys
outputContainersVector of output containers
sumNumber of total elements in all retrieved containers
Returns
Status code

◆ getCuts()

const Acts::TrackSelector::Config & ActsTrk::TrackFindingBaseAlg::getCuts ( double eta) const
protectedinherited

Retrieves track selector configuration for given eta value.

Parameters
etatrack candidate eta value

Definition at line 234 of file TrackFindingBaseAlg.cxx.

234 {
235 const auto &trackSelectorCfg = trackFinder().trackSelector.config();
236 // return the last bin for |eta|>=4 or nan
237 return (!(std::abs(eta) < trackSelectorCfg.absEtaEdges.back())) ? trackSelectorCfg.cutSets.back()
238 : (std::abs(eta) < trackSelectorCfg.absEtaEdges.front()) ? trackSelectorCfg.cutSets.front()
239 : trackSelectorCfg.getCuts(eta);
240 };
Scalar eta() const
pseudorapidity method

◆ getDefaultOptions()

TrackFindingBaseAlg::TrackFindingDefaultOptions ActsTrk::TrackFindingBaseAlg::getDefaultOptions ( const EventContext & ctx,
const DetectorContextHolder & detContext,
const detail::TrackFindingMeasurements & measurements,
const Acts::PerigeeSurface * pSurface ) const
protectedinherited

Get CKF options for first and second pass + pointer to MeasurementSelector.

Parameters
detContextObject holding detector-related context
measurements<easurements container used in MeasurementSelector
pSurfaceRaw pointer to perigee surface

Definition at line 206 of file TrackFindingBaseAlg.cxx.

210 {
211 Acts::PropagatorPlainOptions plainOptions{detContext.geometry, detContext.magField};
212 plainOptions.maxSteps = m_maxPropagationStep;
213 plainOptions.direction = Acts::Direction::Forward();
214 plainOptions.endOfWorldVolumeIds = m_endOfWorldVolumeIds;
215
216 // Set the CombinatorialKalmanFilter options
217 TrackFinderOptions options(detContext.geometry, detContext.magField, detContext.calib,
218 trackFinder().ckfExtensions, plainOptions, pSurface);
219
220 std::unique_ptr<ActsTrk::IMeasurementSelector> measurementSelector = setMeasurementSelector(ctx, measurements, options);
221
222 Acts::PropagatorPlainOptions plainSecondOptions{detContext.geometry, detContext.magField};
223 plainSecondOptions.maxSteps = m_maxPropagationStep;
224 plainSecondOptions.direction = plainOptions.direction.invert();
225
226 TrackFinderOptions secondOptions(detContext.geometry, detContext.magField, detContext.calib,
227 options.extensions, plainSecondOptions, pSurface);
228 secondOptions.targetSurface = pSurface;
229 secondOptions.skipPrePropagationUpdate = true;
230
231 return {std::move(options), std::move(secondOptions), std::move(measurementSelector)};
232 };
Gaudi::Property< unsigned int > m_maxPropagationStep
Gaudi::Property< std::vector< std::uint32_t > > m_endOfWorldVolumeIds
Acts::CombinatorialKalmanFilterOptions< detail::RecoTrackContainer > TrackFinderOptions
std::unique_ptr< ActsTrk::IMeasurementSelector > setMeasurementSelector(const EventContext &ctx, const detail::TrackFindingMeasurements &measurements, TrackFinderOptions &options) const
Setup and attach measurement selector to KF options.

◆ getHGTDClusterFromState()

const xAOD::HGTDCluster * ActsTrk::HGTDTrackExtensionAlg::getHGTDClusterFromState ( const EventContext & ctx,
const ActsTrk::detail::RecoConstTrackStateContainerProxy & state,
const xAOD::HGTDClusterContainer * hgtdClusters ) const
private

Get xAOD::HGTDCluster from track state, so it is possible to retrieve its raw time and position for extension decoration.

Parameters
ctx- event context
state- track state of HGTD hit

Definition at line 759 of file HGTDTrackExtensionAlg.cxx.

762 {
763
764 if (state.hasUncalibratedSourceLink()) {
765 auto uncalib_cluster = detail::xAODUncalibMeasCalibrator::unpack(state.getUncalibratedSourceLink());
766 assert( uncalib_cluster != nullptr);
767 xAOD::UncalibMeasType clusterType = uncalib_cluster->type();
768
769 if (clusterType == xAOD::UncalibMeasType::HGTDClusterType) {
770 ATH_MSG_DEBUG("Found HGTD cluster in source link");
771 auto hgtdCluster = static_cast<const xAOD::HGTDCluster *>(uncalib_cluster);
772 return hgtdCluster;
773 }
774 else {
775 ATH_MSG_DEBUG("Source link contains non-HGTD measurement type: " << static_cast<int>(clusterType));
776 }
777
778 // If we have a reference surface, try to match by position
779 if (state.hasReferenceSurface()) {
780 const auto& surface = state.referenceSurface();
781 Acts::GeometryIdentifier geoID = surface.geometryId();
782
783 const auto *acts_detector_element = getActsDetectorElement(surface);
784
785 // Check if this is an HGTD surface
786 if (acts_detector_element->detectorType() == DetectorType::Hgtd) {
787 ATH_MSG_DEBUG("This is an HGTD surface with ID: " << geoID.volume() << ":" << geoID.layer());
788
789 // Modern approach uses surface accessor instead of detector element map
790
791 // Get global position of the state surface
792 const Acts::GeometryContext& geoContext = m_ctxProvider.getGeometryContext(ctx);
793 Acts::Vector3 statePos = surface.center(geoContext);
794
795 // Find the closest cluster to this state position
796 const xAOD::HGTDCluster* closestCluster = nullptr;
797 double minDistance = 100.0; // Use a reasonable threshold (in mm)
798
799 for (const xAOD::HGTDCluster* cluster : *hgtdClusters) {
800 // Get the cluster's surface
801 const Acts::Surface* clusterSurface = m_surfAcc.get(cluster);
802
803 if (!clusterSurface) continue;
804
805 // Check if it's on the same surface by comparing geometry IDs
806 Acts::GeometryIdentifier clusterGeoID = clusterSurface->geometryId();
807 if (clusterGeoID.volume() == geoID.volume() && clusterGeoID.layer() == geoID.layer()) {
808 // Get cluster position
809 Acts::Vector3 clusterPos = clusterSurface->center(geoContext);
810
811 // Calculate 2D distance (x,y only, since z is fixed for a layer)
812 double dx = clusterPos.x() - statePos.x();
813 double dy = clusterPos.y() - statePos.y();
814 double distance = std::sqrt(dx*dx + dy*dy);
815
816 // Update closest if this is better
817 if (distance < minDistance) {
818 minDistance = distance;
819 closestCluster = cluster;
820 ATH_MSG_DEBUG("Found possible cluster match at distance " << distance << " mm");
821 }
822 }
823 }
824
825 if (closestCluster) {
826 ATH_MSG_DEBUG("Found closest cluster at distance " << minDistance << " mm");
827 return closestCluster;
828 } else {
829 ATH_MSG_DEBUG("No matching cluster found on this surface");
830 }
831 }
832 }
833 }
834 else {
835 ATH_MSG_DEBUG("State doesn't have uncalibrated source link");
836 }
837 return nullptr;
838}
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
UncalibMeasType
Define the type of the uncalibrated measurement.
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
Definition HGTDCluster.h:13

◆ getHGTDLayerIndex()

std::size_t ActsTrk::HGTDTrackExtensionAlg::getHGTDLayerIndex ( const Acts::GeometryIdentifier & geoID) const
private

returns the index of HGTD layer where surfaces lies.

This index is used at to locate where in the vectors of TrackExtensionData the hit information should be written Returns 99 if surface is outiside of HGTD.

Parameters
geoID- surface geometry id

Definition at line 639 of file HGTDTrackExtensionAlg.cxx.

639 {
640 // Get volume and layer ID
641 std::uint32_t volume = geoID.volume();
642 std::uint32_t layer = geoID.layer();
643
644 // Check if we're in the positive or negative endcap
645 bool isPositiveEndcap = (volume == 25);
646 bool isNegativeEndcap = (volume == 2);
647
648 // Different mapping for different sides to maintain consistent physical ordering
649 if (isPositiveEndcap) {
650 // Mapping for positive endcap
651 switch(layer) {
652 case 2: return 0; // First HGTD layer (closest to IP)
653 case 4: return 1; // Second HGTD layer
654 case 6: return 2; // Third HGTD layer
655 case 8: return 3; // Fourth HGTD layer (farthest from IP)
656 default: return 99; // Invalid layer
657 }
658 } else if (isNegativeEndcap) {
659 // Mapping for negative endcap - potentially different ordering
660 switch(layer) {
661 case 2: return 3;
662 case 4: return 2;
663 case 6: return 1;
664 case 8: return 0;
665 default: return 99; // Invalid layer
666 }
667 } else {
668 return 99; // Not an HGTD volume
669 }
670}
@ layer
Definition HitInfo.h:79

◆ getStatCategory()

std::size_t ActsTrk::TrackFindingBaseAlg::getStatCategory ( std::size_t seed_collection,
float eta ) const
protectedinherited

Definition at line 771 of file TrackFindingBaseAlg.cxx.

771 {
772 std::vector<float>::const_iterator bin_iter = std::upper_bound(m_statEtaBins.begin(),
773 m_statEtaBins.end(),
774 m_useAbsEtaForStat ? std::abs(eta) : eta);
775 std::size_t category_i = seed_collection * seedCollectionStride() + static_cast<std::size_t>(bin_iter - m_statEtaBins.begin());
776 assert(category_i < m_stat.size());
777 return category_i;
778 }
Gaudi::Property< std::vector< float > > m_statEtaBins

◆ initCounts()

void ActsTrk::TrackFindingBaseAlg::initCounts ( const detail::RecoTrackContainer::TrackProxy & track)
staticprotectedinherited

Definition at line 427 of file TrackFindingBaseAlg.cxx.

428 {
429 s_branchState.nPixelHits(track) = 0;
430 s_branchState.nStripHits(track) = 0;
431 s_branchState.nHgtdHits(track) = 0;
432 s_branchState.nPixelHoles(track) = 0;
433 s_branchState.nStripHoles(track) = 0;
434 s_branchState.nHgtdHoles(track) = 0;
435 s_branchState.nPixelOutliers(track) = 0;
436 s_branchState.nStripOutliers(track) = 0;
437 s_branchState.nHgtdOutliers(track) = 0;
438 }

◆ initialize()

StatusCode ActsTrk::HGTDTrackExtensionAlg::initialize ( )
overridevirtual

Reimplemented from ActsTrk::TrackFindingBaseAlg.

Definition at line 93 of file HGTDTrackExtensionAlg.cxx.

94{
95 ATH_MSG_DEBUG("Initializing " << name() << "...");
96
100
103 ATH_CHECK(m_actsTrackLinkKey.initialize());
104
106
107 // Initialize all WriteDecorHandleKeys
108 ATH_CHECK(m_layerHasExtensionKey.initialize());
111 ATH_CHECK(m_layerClusterTimeKey.initialize());
112 ATH_CHECK(m_extrapXKey.initialize());
113 ATH_CHECK(m_extrapYKey.initialize());
114 ATH_CHECK(m_numHGTDHitsKey.initialize());
115 ATH_CHECK(m_hgtdTrackLinkKey.initialize());
116
117 // Initialize surface accessor
118 m_surfAcc = ActsTrk::detail::xAODUncalibMeasSurfAcc{m_trackingGeometrySvc.get()};
119
120 return StatusCode::SUCCESS;
121}
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_actsTrackLinkKey
Gaudi::Property< double > m_absEtaMax
virtual StatusCode initialize() override
Gaudi::Property< double > m_absEtaMin

◆ initializeMeasurementSelector()

StatusCode ActsTrk::TrackFindingBaseAlg::initializeMeasurementSelector ( )
protectedinherited

Definition at line 519 of file TrackFindingBaseAlg.cxx.

519 {
520 std::vector<std::pair<float, float> > &chi2CutOffOutlier = m_measurementSelectorConfig.m_chi2CutOffOutlier;
521 chi2CutOffOutlier .reserve( m_chi2CutOff.size() );
522 if (!m_chi2OutlierCutOff.empty()) {
523 if (m_chi2CutOff.size() != m_chi2OutlierCutOff.size()) {
524 ATH_MSG_ERROR("Outlier chi2 cut off provided but number of elements does not agree with"
525 " chi2 cut off for measurements which however is required: "
526 << m_chi2CutOff.size() << " != " << m_chi2OutlierCutOff.size());
527 return StatusCode::FAILURE;
528 }
529 }
530 unsigned int idx=0;
531 for (const auto &elm : m_chi2CutOff) {
532 chi2CutOffOutlier.push_back( std::make_pair(static_cast<float>(elm),
533 idx < m_chi2OutlierCutOff.size()
534 ? static_cast<float>(m_chi2OutlierCutOff[idx])
535 : std::numeric_limits<float>::max()) );
536 ++idx;
537 }
538 if (m_etaBins.size() > 2) {
539 std::vector<float> &etaBinsf = m_measurementSelectorConfig.m_etaBins;
540 etaBinsf.assign(m_etaBins.begin() + 1, m_etaBins.end() - 1);
541 }
542
543 return /*m_measurementSelector ?*/ StatusCode::SUCCESS /*: StatusCode::FAILURE*/;
544 }
Gaudi::Property< std::vector< double > > m_etaBins
Gaudi::Property< std::vector< double > > m_chi2CutOff
struct ActsTrk::TrackFindingBaseAlg::MeasurementSelectorConfig m_measurementSelectorConfig
Gaudi::Property< std::vector< double > > m_chi2OutlierCutOff

◆ initStatTables()

void ActsTrk::TrackFindingBaseAlg::initStatTables ( )
protectedinherited

Definition at line 548 of file TrackFindingBaseAlg.cxx.

548 {
549 if (!m_statEtaBins.empty())
550 {
552 float last_eta = m_statEtaBins[0];
553 for (float eta : m_statEtaBins)
554 {
555 if (eta < last_eta)
556 {
557 ATH_MSG_FATAL("Eta bins for statistics counter not in ascending order.");
558 }
559 last_eta = eta;
560 }
561 }
562 m_stat.resize(nSeedCollections() * seedCollectionStride());
563 }
#define ATH_MSG_FATAL(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ logger()

const Acts::Logger & ActsTrk::TrackFindingBaseAlg::logger ( ) const
inlineprotectedinherited

Private access to the logger.

Definition at line 328 of file TrackFindingBaseAlg.h.

329 {
330 return *m_logger;
331 }
std::unique_ptr< const Acts::Logger > m_logger
logging instance

◆ measurementType()

xAOD::UncalibMeasType ActsTrk::TrackFindingBaseAlg::measurementType ( const detail::RecoTrackContainer::TrackStateProxy & trackState)
staticprotectedinherited

Definition at line 288 of file TrackFindingBaseAlg.cxx.

288 {
289 if (trackState.hasReferenceSurface()) {
290 if (const auto *actsDetElem = dynamic_cast<const ISurfacePlacement*>(trackState.referenceSurface().surfacePlacement())) {
291 switch (actsDetElem->detectorType()) {
298 default:
299 break;
300 }
301 }
302 }
304 }
@ Pixel
Inner detector legacy.

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ nSeedCollections()

std::size_t ActsTrk::TrackFindingBaseAlg::nSeedCollections ( ) const
inlineprotectedinherited

Definition at line 341 of file TrackFindingBaseAlg.h.

341 {
342 return m_seedLabels.size();
343 }
Gaudi::Property< std::vector< std::string > > m_seedLabels

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printStatTables()

void ActsTrk::TrackFindingBaseAlg::printStatTables ( ) const
protectedinherited

Definition at line 581 of file TrackFindingBaseAlg.cxx.

581 {
582 if (msgLvl(MSG::INFO))
583 {
584 std::vector<std::string> stat_labels =
586 {
587 std::make_pair(kNTotalSeeds, "Input seeds"),
588 std::make_pair(kNoTrackParam, "No track parameters"),
589 std::make_pair(kNUsedSeeds, "Used seeds"),
590 std::make_pair(kNoTrack, "Cannot find track"),
591 std::make_pair(kNDuplicateSeeds, "Duplicate seeds"),
592 std::make_pair(kNNoEstimatedParams, "Initial param estimation failed"),
593 std::make_pair(kNRejectedRefinedSeeds, "Rejected refined parameters"),
594 std::make_pair(kNSeedRefitFailure, "Seed refit Kalman fit failure"),
595 std::make_pair(kNOutputTracks, "CKF tracks"),
596 std::make_pair(kNSelectedTracks, "selected tracks"),
597 std::make_pair(kNResolvedTracks, "resolved tracks"),
598 std::make_pair(kNStoppedTracksMaxHoles, "Stopped tracks reaching max holes"),
599 std::make_pair(kMultipleBranches, "Seeds with more than one branch"),
600 std::make_pair(kNoSecond, "Tracks failing second CKF"),
601 std::make_pair(kNStoppedTracksMinPt, "Stopped tracks below pT cut"),
602 std::make_pair(kNStoppedTracksMaxEta, "Stopped tracks above max eta"),
603 std::make_pair(kNTotalSharedHits, "Total shared hits"),
604 std::make_pair(kNForcedSeedMeasurements, "Total forced measurements")
605 });
606 assert(stat_labels.size() == kNStat);
607 std::vector<std::string> categories;
608 categories.reserve(m_seedLabels.size() + 1);
609 categories.insert(categories.end(), m_seedLabels.begin(), m_seedLabels.end());
610 categories.push_back("ALL");
611
612 std::vector<std::string> eta_labels;
613 eta_labels.reserve(m_statEtaBins.size() + 2);
614 for (std::size_t eta_bin_i = 0; eta_bin_i < m_statEtaBins.size() + 2; ++eta_bin_i)
615 {
616 eta_labels.push_back(TableUtils::makeEtaBinLabel(m_statEtaBins, eta_bin_i, m_useAbsEtaForStat));
617 }
618
619 // vector used as 3D array stat[ eta_bin ][ stat_i ][ seed_type]
620 // stat_i = [0, kNStat)
621 // eta_bin = [0, m_statEtaBins.size()+2 ); eta_bin == m_statEtaBinsSize()+1 means sum of all etaBins
622 // seed_type = [0, nSeedCollections()+1) seed_type == nSeedCollections() means sum of all seed collections
623 std::vector<std::size_t> stat =
625 m_statEtaBins.size() + 1,
626 m_stat);
627
628 // the extra columns and rows for the projections are addeded internally:
629 std::size_t stat_stride =
631 m_statEtaBins.size() + 1,
632 kNStat);
633 std::size_t eta_stride =
635 m_statEtaBins.size() + 1,
636 kNStat);
637 std::stringstream table_out;
638
639 if (m_dumpAllStatEtaBins.value())
640 {
641 // dump for each counter a table with one row per eta bin
642 std::size_t max_label_width = TableUtils::maxLabelWidth(stat_labels) + TableUtils::maxLabelWidth(eta_labels);
643 for (std::size_t stat_i = 0; stat_i < kNStat; ++stat_i)
644 {
645 std::size_t dest_idx_offset = stat_i * stat_stride;
646 table_out << makeTable(stat, dest_idx_offset, eta_stride,
647 eta_labels,
648 categories)
649 .columnWidth(10)
650 // only dump the footer for the last eta bin i.e. total
651 .dumpHeader(stat_i == 0)
652 .dumpFooter(stat_i + 1 == kNStat)
653 .separateLastRow(true) // separate the sum of all eta bins
654 .minLabelWidth(max_label_width)
655 .labelPrefix(stat_labels.at(stat_i));
656 }
657 }
658 else
659 {
660 // dump one table with one row per counter showing the total eta range
661 for (std::size_t eta_bin_i = (m_dumpAllStatEtaBins.value() ? 0 : m_statEtaBins.size() + 1);
662 eta_bin_i < m_statEtaBins.size() + 2;
663 ++eta_bin_i)
664 {
665 std::size_t dest_idx_offset = eta_bin_i * eta_stride;
666 table_out << makeTable(stat, dest_idx_offset, stat_stride,
667 stat_labels,
668 categories,
669 eta_labels.at(eta_bin_i))
670 .columnWidth(10)
671 // only dump the footer for the last eta bin i.e. total
672 .dumpFooter(!m_dumpAllStatEtaBins.value() || eta_bin_i == m_statEtaBins.size() + 1);
673 }
674 }
675 ATH_MSG_INFO("statistics:\n"
676 << table_out.str());
677 table_out.str("");
678
679 // define retios first element numerator, second element denominator
680 // each element contains a vector of counter and a multiplier e.g. +- 1
681 // ratios are computed as (sum_i stat[stat_i] * multiplier_i ) / (sum_j stat[stat_j] * multiplier_j )
682 auto [ratio_labels, ratio_def] =
684 std::vector<TableUtils::SummandDefinition>{
688 // no track counted as used but want to include it as failed
690 }, // failed seeds i.e. seeds which are not duplicates but did not produce a track
691 std::vector<TableUtils::SummandDefinition>{TableUtils::defineSummand(kNTotalSeeds, 1)}),
693 TableUtils::defineSimpleRatio("Rejected refined params / seeds", kNRejectedRefinedSeeds, kNTotalSeeds),
695 TableUtils::defineSimpleRatio("selected tracks / used seeds", kNSelectedTracks, kNUsedSeeds),
697 TableUtils::defineSimpleRatio("resolved tracks / used seeds", kNResolvedTracks, kNUsedSeeds),
698 TableUtils::defineSimpleRatio("branched tracks / used seeds", kMultipleBranches, kNUsedSeeds),
699 TableUtils::defineSimpleRatio("no 2nd CKF / CKF tracks", kNoSecond, kNOutputTracks),
701 TableUtils::defineSimpleRatio("forced measurements / used seeds", kNForcedSeedMeasurements, kNUsedSeeds)});
702
703 std::vector<float> ratio = TableUtils::computeRatios(ratio_def,
704 nSeedCollections() + 1,
705 m_statEtaBins.size() + 2,
706 stat);
707
708 // the extra columns and rows for the projections are _not_ added internally
709 std::size_t ratio_stride = TableUtils::ratioStride(nSeedCollections() + 1,
710 m_statEtaBins.size() + 2,
711 ratio_def);
712 std::size_t ratio_eta_stride = TableUtils::subCategoryStride(nSeedCollections() + 1,
713 m_statEtaBins.size() + 2,
714 ratio_def);
715
716 std::size_t max_label_width = TableUtils::maxLabelWidth(ratio_labels) + TableUtils::maxLabelWidth(eta_labels);
717 if (m_dumpAllStatEtaBins.value())
718 {
719 // show for each ratio a table with one row per eta bin
720 for (std::size_t ratio_i = 0; ratio_i < ratio_labels.size(); ++ratio_i)
721 {
722 table_out << makeTable(ratio,
723 ratio_i * ratio_stride,
724 ratio_eta_stride,
725 eta_labels,
726 categories)
727 .columnWidth(10)
728 // only dump the footer for the last eta bin i.e. total
729 .dumpHeader(ratio_i == 0)
730 .dumpFooter(ratio_i + 1 == ratio_labels.size())
731 .separateLastRow(true) // separate the sum of las
732 .minLabelWidth(max_label_width)
733 .labelPrefix(ratio_labels.at(ratio_i));
734 }
735 }
736 else
737 {
738 // dump one table with one row per ratio showing the total eta range
739 table_out << makeTable(ratio,
740 (m_statEtaBins.size() + 1) * ratio_eta_stride + 0 * ratio_stride,
741 ratio_stride,
742 ratio_labels,
743 categories)
744 .columnWidth(10)
745 // only dump the footer for the last eta bin i.e. total
746 .minLabelWidth(max_label_width)
747 .dumpFooter(false);
748
749 // also dump a table for final tracks over used seeds (ratio_i==6 or 4) showing one row per eta bin
750 eta_labels.erase(eta_labels.end() - 1); // drop last line of table which shows again all eta bins summed.
751 std::size_t ratio_i = m_showResolvedStats ? 6 : 4;
752 table_out << makeTable(ratio,
753 ratio_i * ratio_stride,
754 ratio_eta_stride,
755 eta_labels,
756 categories)
757 .columnWidth(10)
758 .dumpHeader(false)
759 // only dump the footer for the last eta bin i.e. total
760 .dumpFooter(!m_dumpAllStatEtaBins.value() || ratio_i + 1 == ratio_labels.size())
761 .separateLastRow(false)
762 .minLabelWidth(max_label_width)
763 .labelPrefix(ratio_labels.at(ratio_i));
764 }
765
766 ATH_MSG_INFO("Ratios:\n"
767 << table_out.str());
768 }
769 }
#define ATH_MSG_INFO(x)
TableUtils::StatTable< T > makeTable(const std::array< T, N > &counter, const std::array< std::string, N > &label)
Definition TableUtils.h:543
Gaudi::Property< bool > m_dumpAllStatEtaBins
bool msgLvl(const MSG::Level lvl) const
std::tuple< std::vector< std::string >, std::vector< RatioDefinition > > splitRatioDefinitionsAndLabels(std::initializer_list< std::tuple< std::string, RatioDefinition > > a_ratio_list)
Definition TableUtils.h:468
SummandDefinition defineSummand(T counter_idx, int multiplier)
Definition TableUtils.h:422
std::size_t maxLabelWidth(const T_Collection &col)
Definition TableUtils.h:310
RatioDefinition defineSimpleRatio(T numerator, T denominator)
Definition TableUtils.h:404
std::vector< std::string > makeLabelVector(T_index n_entries, std::initializer_list< std::pair< T_index, T_string > > a_list)
Definition TableUtils.h:295
constexpr std::size_t subCategoryStride(const std::size_t categories, const std::size_t sub_categories, const std::size_t n_counter)
Definition TableUtils.h:324
constexpr std::size_t counterStride(const std::size_t categories, const std::size_t sub_categories, const std::size_t n_counter)
Definition TableUtils.h:329
std::string makeEtaBinLabel(const std::vector< float > &eta_bins, std::size_t eta_bin_i, bool abs_eta=false)
Definition TableUtils.h:534
std::tuple< std::string, RatioDefinition > makeRatioDefinition(std::string &&name, std::vector< SummandDefinition > &&numerator, std::vector< SummandDefinition > &&denominator)
Definition TableUtils.h:458
std::vector< float > computeRatios(const std::vector< RatioDefinition > &ratio_def, const std::size_t categories, const std::size_t sub_categories, const std::vector< std::size_t > &counter)
constexpr std::size_t ratioStride(const std::size_t categories, const std::size_t sub_categories, const std::vector< RatioDefinition > &ratio_def)
Definition TableUtils.h:493
std::vector< T_Output > createCounterArrayWithProjections(const std::size_t categories, const std::size_t sub_categories, const std::vector< std::array< T_Input, N > > &input_counts)
Definition TableUtils.h:342

◆ processTrackExtension()

HGTDTrackExtensionAlg::TrackExtensionData ActsTrk::HGTDTrackExtensionAlg::processTrackExtension ( const EventContext & ctx,
const xAOD::TrackParticle * trackParticle,
const detail::RecoTrackContainer::TrackProxy & trackProxy,
const xAOD::HGTDClusterContainer * hgtdClusters ) const
private

Create and fills the TrackExtensionData with HGTD hits at the extension.

The TrackExtensionData object will later be used to fill the TrackParticle decorations

Parameters
trackParticle- trackParticle associated with this hit
cluster- HGTD cluster of the hit, used to access its surface and position
measuredTime- time measured (ns)
measuredTimeErr- resolution of time measured (ns)
trackingGeometry- detector geometry
geoContext- geometry context

Definition at line 452 of file HGTDTrackExtensionAlg.cxx.

456 {
457
459
460 // Modern approach uses surface accessor instead of detector element map
461
462 // Apply track smoothing before trying to access chi2 values
463 Acts::GeometryContext geoContext = m_ctxProvider.getGeometryContext(ctx);
464 const Acts::TrackingGeometry* acts_tracking_geometry = m_trackingGeometrySvc->trackingGeometry().get();
465
466
467 // Count measurements, holes, and HGTD hits specifically
468 std::size_t nMeasurements = 0;
469 std::size_t nHoles = 0;
470 std::size_t nOutliers = 0;
471 std::size_t nHGTDHits = 0;
472
473 std::vector<char> hasHitInLayer = {false, false, false, false};
474 std::vector<float> chi2PerLayer = {-1.0, -1.0, -1.0, -1.0};
475 std::vector<float> timePerLayer = {-1.0, -1.0, -1.0, -1.0};
476 std::vector<float> rawTimePerLayer = {-1.0, -1.0, -1.0, -1.0};
477
478 // Extrapolated position - get the position at the first HGTD surface encountered
479 float extrapX = 0.0;
480 float extrapY = 0.0;
481 float extrapZ = 0.0;
482 bool foundExtrapolation = false;
483
484 for (auto state : trackProxy.trackStatesReversed()) {
485 auto flags = state.typeFlags();
486 if (flags.isHole()) {
487 nHoles++;
488 } else if (flags.isOutlier()) {
489 nOutliers++;
490 } else if (flags.isMeasurement()) {
492
493 // Check if this is an HGTD hit
494 const auto& surface = state.referenceSurface();
495 Acts::GeometryIdentifier geoID = surface.geometryId();
496 std::size_t layerIndex = getHGTDLayerIndex(geoID);
497
498 // Check if measurement is at a valid HGTD layer
499 if (layerIndex != 99) {
500
501 const auto& calibrated = state.template calibrated<3>(); //x,y,time
502 const auto& predicted = state.predicted(); //6D
503 const auto& calibCov = state.template calibratedCovariance<3>(); // Full 3D covariance
504
505 Eigen::Vector2d residual2d;
506 residual2d(0) = calibrated(0) - predicted(Acts::eBoundLoc0);
507 residual2d(1) = calibrated(1) - predicted(Acts::eBoundLoc1);
508
509 // Extract the top-left 2x2 from the 3x3 measurement covariance
510 AmgSymMatrix(2) cov_2d{calibCov.template block<2,2>(0,0)};
511
512 // Get the predicted covariance for residual calculation
513 const auto& predictedCov = state.predictedCovariance();
514 AmgSymMatrix(2) predicted_cov_2d{predictedCov.template block<2,2>(0,0)};
515
516 // Total residual covariance is measurement + predicted covariances
517 AmgSymMatrix(2) residual_cov = cov_2d + predicted_cov_2d;
518
519 double chi2=0.0;
520 double ndf = 2.0;
521 if (residual_cov.determinant() != 0) {
522 chi2 = residual2d.transpose() * residual_cov.inverse() * residual2d;
523 }
524 else{
525 chi2=-99.9;
526 }
527
528 if (layerIndex < 4) {
529 nHGTDHits++;
530 hasHitInLayer[layerIndex] = true;
531 chi2PerLayer[layerIndex] =chi2/ndf; //state.chi2();
532
533 // Get the measured time from the calibrated 3D measurement (local x, y, time)
534 float rawTime = 0.0f;
535 float calibratedTime = 0.0f;
536
537 if (state.hasCalibrated()) {
538 // Extract time from calibrated data
539 try {
540 const auto& calibrated = state.template calibrated<3>();
541 calibratedTime = ActsTrk::timeToAthena(calibrated(2));
542 ATH_MSG_DEBUG("Got time from calibrated<3>: " << calibratedTime);
543 } catch (const std::exception& e) {
544 ATH_MSG_WARNING("Failed to extract time from calibrated<3>: " << e.what());
545 }
546 }
547
548 // Extract raw time from HGTD clusters
549 const xAOD::HGTDCluster* cluster = getHGTDClusterFromState(ctx, state, hgtdClusters);
550
551 if (cluster) {
552 rawTime = cluster->time();
553 ATH_MSG_DEBUG("Got raw time from cluster: " << rawTime);
554 } else {
555 ATH_MSG_WARNING("Could not get cluster from state");
556 }
557
558 // Store the raw time
559 rawTimePerLayer[layerIndex] = calibratedTime;
560 if (cluster) {
561 auto [correctedTime, timeErr] = correctTOF(
562 trackParticle,
563 cluster,
564 calibratedTime,
565 0.0, // time error set to zero for now!
566 acts_tracking_geometry,
567 geoContext);
568 timePerLayer[layerIndex] = correctedTime;
569 ATH_MSG_DEBUG("Applied TOF correction: " << calibratedTime << " -> " << correctedTime);
570 } else {
571 // No cluster or time, use raw time
572 timePerLayer[layerIndex] = calibratedTime;
573 ATH_MSG_DEBUG("No cluster found for TOF correction, using calibrated time: " << calibratedTime);
574 }
575 }
576 else {
577 ATH_MSG_DEBUG("State does not have calibrated data");
578 }
579
580 // For extrapolation: use the first HGTD hit's surface position.
581 if (!foundExtrapolation) {
582 foundExtrapolation = true;
583 if (state.hasPredicted()) {
584 // Get the local predicted position
585 const auto& predicted = state.predicted();
586 Acts::Vector2 localPos(predicted[Acts::eBoundLoc0], predicted[Acts::eBoundLoc1]);
587
588 // Transform to global coordinates
589 Acts::Vector3 globalPos = surface.localToGlobal(
590 geoContext,
591 localPos,
592 Acts::Vector3::Zero());
593
594 extrapX = globalPos.x();
595 extrapY = globalPos.y();
596 extrapZ = globalPos.z();
597
598 ATH_MSG_DEBUG("Extrapolated position (predicted) at HGTD: x=" << extrapX
599 << ", y=" << extrapY << ", z=" << extrapZ);
600 } else {
601 // Fallback to surface center
602 Acts::Vector3 globalPos = surface.center(geoContext);
603 extrapX = globalPos.x();
604 extrapY = globalPos.y();
605 extrapZ = globalPos.z();
606
607 ATH_MSG_DEBUG("Extrapolated position (surface center) at HGTD: x=" << extrapX
608 << ", y=" << extrapY << ", z=" << extrapZ);
609 }
610 }
611 ATH_MSG_DEBUG("Found HGTD hit on layer " << layerIndex
612 << ", chi2=" << chi2PerLayer[layerIndex]
613 << ", time=" << timePerLayer[layerIndex]);
614 }
615 }
616 }
617
618 ATH_MSG_DEBUG("Extension Statistics: "
619 << " nMeasurements=" << nMeasurements
620 << " nHGTDHits=" << nHGTDHits
621 << " nHoles=" << nHoles
622 << " nOutliers=" << nOutliers
623 << " extrapolation found: " << (foundExtrapolation ? "yes" : "no"));
624
625
626 // Fill the data structure with results
627 data.hasClusterVec = std::move(hasHitInLayer);
628 data.chi2Vec = std::move(chi2PerLayer);
629 data.timeVec = std::move(timePerLayer);
630 data.rawTimeVec = std::move(rawTimePerLayer);
631 data.extrapX = extrapX;
632 data.extrapY = extrapY;
633 data.extrapZ = extrapZ;
634 data.numHGTDHits = nHGTDHits;
635
636 return data;
637}
#define AmgSymMatrix(dim)
if(pathvar)
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...
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.
float time() const
Return the measured time in ns.
double chi2(TH1 *h0, TH1 *h1)
constexpr double timeToAthena(T actsT)
Converts a time unit from Acts to Athena units.
float timeErr(const V &v)
std::size_t nMeasurements(const xAOD::MuonSegment &segment)
Returns the number of associated Uncalibrated measurements.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ seedCollectionStride()

std::size_t ActsTrk::TrackFindingBaseAlg::seedCollectionStride ( ) const
inlineprotectedinherited

Definition at line 344 of file TrackFindingBaseAlg.h.

344 {
345 return m_statEtaBins.size() + 1;
346 }

◆ selectCounts()

std::array< bool, 3 > ActsTrk::TrackFindingBaseAlg::selectCounts ( const detail::RecoTrackContainer::TrackProxy & track,
double eta ) const
protectedinherited

Definition at line 493 of file TrackFindingBaseAlg.cxx.

493 {
494 bool enoughMeasurements = true, tooManyHoles = false, tooManyOutliers = false;
495 const auto &trackSelectorCfg = trackFinder().trackSelector.config();
496 std::size_t etaBin = (std::abs(eta) < trackSelectorCfg.absEtaEdges.front()) ? 0
497 : (std::abs(eta) >= trackSelectorCfg.absEtaEdges.back()) ? trackSelectorCfg.absEtaEdges.size() - 1
498 : trackSelectorCfg.binIndex(eta);
499 auto cutMin = [etaBin](std::size_t val, const std::vector<std::size_t> &cutSet) {
500 return !cutSet.empty() && (val < (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
501 };
502 auto cutMax = [etaBin](std::size_t val, const std::vector<std::size_t> &cutSet) {
503 return !cutSet.empty() && (val > (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
504 };
505
506 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nPixelHits(track), m_minPixelHits);
507 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nStripHits(track), m_minStripHits);
508 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nHgtdHits(track), m_minHgtdHits);
509 tooManyHoles = tooManyHoles || cutMax(s_branchState.nPixelHoles(track), m_maxPixelHoles);
510 tooManyHoles = tooManyHoles || cutMax(s_branchState.nStripHoles(track), m_maxStripHoles);
511 tooManyHoles = tooManyHoles || cutMax(s_branchState.nHgtdHoles(track), m_maxHgtdHoles);
512 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nPixelOutliers(track), m_maxPixelOutliers);
513 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nStripOutliers(track), m_maxStripOutliers);
514 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nHgtdOutliers(track), m_maxHgtdOutliers);
515
516 return {enoughMeasurements, tooManyHoles, tooManyOutliers};
517 }
Gaudi::Property< std::vector< std::size_t > > m_maxStripHoles
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdHoles
Gaudi::Property< std::vector< std::size_t > > m_minPixelHits
Gaudi::Property< std::vector< std::size_t > > m_maxStripOutliers
Gaudi::Property< std::vector< std::size_t > > m_maxPixelHoles
Gaudi::Property< std::vector< std::size_t > > m_minStripHits
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdOutliers
Gaudi::Property< std::vector< std::size_t > > m_maxPixelOutliers
Gaudi::Property< std::vector< std::size_t > > m_minHgtdHits
return m_collEvts back().back().max_entries
unsigned int binIndex(const T &val, const std::vector< T > &partitions)
general utility function to return bin index given a value and the upper endpoints of each bin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin

◆ selectCountsFinal()

bool ActsTrk::TrackFindingBaseAlg::selectCountsFinal ( const detail::RecoTrackContainer::TrackProxy & track) const
protectedinherited

Definition at line 792 of file TrackFindingBaseAlg.cxx.

792 {
793 if (not m_addCounts) return true;
794 double eta = -std::log(std::tan(0.5 * track.theta()));
795 auto [enoughMeasurementsPS, tooManyHolesPS, tooManyOutliersPS] = selectCounts(track, eta);
796 return enoughMeasurementsPS && !tooManyHolesPS && !tooManyOutliersPS;
797 }
std::array< bool, 3 > selectCounts(const detail::RecoTrackContainer::TrackProxy &track, double eta) const

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ setMeasurementSelector()

std::unique_ptr< ActsTrk::IMeasurementSelector > ActsTrk::TrackFindingBaseAlg::setMeasurementSelector ( const EventContext & ctx,
const detail::TrackFindingMeasurements & measurements,
TrackFinderOptions & options ) const
nodiscardprotectedinherited

Setup and attach measurement selector to KF options.

Parameters
ctxthe current event context
measurementsmeasurements container used in MeasurementSelector
optionsKalman filter options
Returns
unique_ptr to MeasurementSelector

Definition at line 185 of file TrackFindingBaseAlg.cxx.

188 {
189
190 std::unique_ptr<ActsTrk::IMeasurementSelector> measurementSelector = ActsTrk::detail::getMeasurementSelector(
191 ctx,
192 m_pixelCalibTool.isEnabled() ? &(*m_pixelCalibTool) : nullptr,
193 m_stripCalibTool.isEnabled() ? &(*m_stripCalibTool) : nullptr,
194 m_hgtdCalibTool.isEnabled() ? &(*m_hgtdCalibTool) : nullptr,
195 measurements.measurementRanges(),
197 m_measurementSelectorConfig.m_chi2CutOffOutlier,
199 m_edgeHoleBorderWidth.value());
200
201 measurementSelector->connect(&options.extensions.createTrackStates);
202
203 return measurementSelector;
204 }
Gaudi::Property< std::vector< size_t > > m_numMeasurementsCutOff
Gaudi::Property< double > m_edgeHoleBorderWidth
ToolHandle< ActsTrk::IPixelOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool
ToolHandle< ActsTrk::IStripOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool
ToolHandle< ActsTrk::IHGTDOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool
std::unique_ptr< ActsTrk::IMeasurementSelector > getMeasurementSelector(const EventContext &ctx, const ActsTrk::IPixelOnTrackCalibratorTool< detail::RecoTrackStateContainer > *pixelOnTrackCalibratorTool, const ActsTrk::IStripOnTrackCalibratorTool< detail::RecoTrackStateContainer > *stripOnTrackCalibratorTool, const ActsTrk::IHGTDOnTrackCalibratorTool< detail::RecoTrackStateContainer > *hgtdOnTrackCalibratorTool, const ActsTrk::detail::MeasurementRangeList &measurementRanges, const std::vector< float > &etaBinsf, const std::vector< std::pair< float, float > > &chi2CutOffOutlier, const std::vector< size_t > &numMeasurementsCutOff, double edge_hole_border_width)

◆ stopBranch()

TrackFindingBaseAlg::BranchStopperResult ActsTrk::TrackFindingBaseAlg::stopBranch ( const detail::RecoTrackContainer::TrackProxy & track,
const detail::RecoTrackContainer::TrackStateProxy & trackState,
const Acts::TrackSelector::EtaBinnedConfig & trackSelectorCfg,
const Acts::GeometryContext & tgContext,
const detail::MeasurementIndex & measurementIndex,
const std::size_t typeIndex,
EventStats::value_type & event_stat_category_i ) const
protectedinherited

Branch stopper.

Parameters
trackTrack proxy object
trackStateTrack state proxy object
trackSelectorCfgTrack selector configuration
tgContextGeometry context
measurementIndexMeasurement index
typeIndexType index
event_stat_category_iEvent statistics for current category
Returns
BranchStopperResult

Definition at line 306 of file TrackFindingBaseAlg.cxx.

313 {
314 if (m_addCounts) {
315 updateCounts(track, trackState.typeFlags(),
316 measurementType(trackState));
317 if (m_checkCounts) {
318 checkCounts(track);
319 }
320 }
321
322 if (m_trackStatePrinter.isSet()) {
323 m_trackStatePrinter->printTrackState(tgContext, trackState,
324 measurementIndex, true);
325 }
326
327 if (!m_doBranchStopper) {
328 return BranchStopperResult::Continue;
329 }
330
331 const auto &parameters = trackState.hasFiltered() ? trackState.filtered()
332 : trackState.predicted();
333 double eta = -std::log(std::tan(0.5 * parameters[Acts::eBoundTheta]));
334 const auto &cutSet = getCuts(eta);
335
336 if (typeIndex < m_ptMinMeasurements.size() &&
337 !(track.nMeasurements() < m_ptMinMeasurements[typeIndex])) {
338 double pT = std::sin(parameters[Acts::eBoundTheta]) /
339 parameters[Acts::eBoundQOverP];
340 if (std::abs(pT) < cutSet.ptMin * m_branchStopperPtMinFactor) {
341 ++event_stat_category_i[kNStoppedTracksMinPt];
342 ATH_MSG_DEBUG("CkfBranchStopper: drop branch with q*pT="
343 << pT << " after " << track.nMeasurements()
344 << " measurements");
345 return BranchStopperResult::StopAndDrop;
346 }
347 }
348
349 if (typeIndex < m_absEtaMaxMeasurements.size() &&
350 !(track.nMeasurements() < m_absEtaMaxMeasurements[typeIndex]) &&
351 !(std::abs(eta) < trackSelectorCfg.absEtaEdges.back() +
353 ++event_stat_category_i[kNStoppedTracksMaxEta];
354 ATH_MSG_DEBUG("CkfBranchStopper: drop branch with eta="
355 << eta << " after " << track.nMeasurements()
356 << " measurements");
357 return BranchStopperResult::StopAndDrop;
358 }
359
360
361 // In the pixel endcap regions relax the requirement for minMeasurements before cutting the branch off
362 auto minMeasurementsBranchStop = std::abs(eta) > m_branchStopperAbsEtaMeasCut ? cutSet.minMeasurements - m_branchStopperMeasCutReduce : cutSet.minMeasurements;
363 bool enoughMeasurements = (track.nMeasurements() >= minMeasurementsBranchStop);
364 bool tooManyHoles = (track.nHoles() > cutSet.maxHoles);
365 bool tooManyOutliers = (track.nOutliers() > cutSet.maxOutliers);
366
367 if (m_addCounts) {
368 auto [enoughMeasurementsPS, tooManyHolesPS, tooManyOutliersPS] =
369 selectCounts(track, eta);
370 enoughMeasurements = enoughMeasurements && enoughMeasurementsPS;
371 tooManyHoles = tooManyHoles || tooManyHolesPS;
372 tooManyOutliers = tooManyOutliers || tooManyOutliersPS;
373 }
374
375 if (!(tooManyHoles || tooManyOutliers)) {
376 return BranchStopperResult::Continue;
377 }
378
379 if (!enoughMeasurements) {
380 ++event_stat_category_i[kNStoppedTracksMaxHoles];
381 }
382
383 if (m_addCounts) {
384 ATH_MSG_DEBUG("CkfBranchStopper: stop and "
385 << (enoughMeasurements ? "keep" : "drop")
386 << " branch with nHoles=" << track.nHoles() << " ("
387 << s_branchState.nPixelHoles(track) << " pixel+"
388 << s_branchState.nStripHoles(track) << " strip+"
389 << s_branchState.nHgtdHoles(track)
390 << " hgtd), nOutliers=" << track.nOutliers() << " ("
391 << s_branchState.nPixelOutliers(track) << "+"
392 << s_branchState.nStripOutliers(track) << "+"
393 << s_branchState.nHgtdOutliers(track)
394 << "), nMeasurements=" << track.nMeasurements() << " ("
395 << s_branchState.nPixelHits(track) << "+"
396 << s_branchState.nStripHits(track) << "+"
397 << s_branchState.nHgtdHits(track) << ")");
398 } else {
399 ATH_MSG_DEBUG("CkfBranchStopper: stop and "
400 << (enoughMeasurements ? "keep" : "drop")
401 << " branch with nHoles=" << track.nHoles()
402 << ", nOutliers=" << track.nOutliers()
403 << ", nMeasurements=" << track.nMeasurements());
404 }
405
406 return enoughMeasurements ? BranchStopperResult::StopAndKeep
407 : BranchStopperResult::StopAndDrop;
408 }
Gaudi::Property< double > m_branchStopperAbsEtaMeasCut
Gaudi::Property< double > m_branchStopperPtMinFactor
Gaudi::Property< double > m_branchStopperMeasCutReduce
Gaudi::Property< double > m_branchStopperAbsEtaMaxExtra
Gaudi::Property< std::vector< std::size_t > > m_absEtaMaxMeasurements
Gaudi::Property< bool > m_doBranchStopper
const Acts::TrackSelector::Config & getCuts(double eta) const
Retrieves track selector configuration for given eta value.
Gaudi::Property< std::vector< std::size_t > > m_ptMinMeasurements

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ trackFinder() [1/2]

TrackFindingBaseAlg::CKF_pimpl & ActsTrk::TrackFindingBaseAlg::trackFinder ( )
protectedinherited

Definition at line 21 of file TrackFindingBaseAlg.cxx.

21{ return *m_trackFinder; }
std::unique_ptr< CKF_pimpl > m_trackFinder

◆ trackFinder() [2/2]

const TrackFindingBaseAlg::CKF_pimpl & ActsTrk::TrackFindingBaseAlg::trackFinder ( ) const
protectedinherited

Definition at line 22 of file TrackFindingBaseAlg.cxx.

22{ return *m_trackFinder; }

◆ TrackFindingBaseAlg()

ActsTrk::TrackFindingBaseAlg::TrackFindingBaseAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 46 of file TrackFindingBaseAlg.cxx.

24: AthReentrantAlgorithm(name, pSvcLocator) {}

◆ updateCounts()

void ActsTrk::TrackFindingBaseAlg::updateCounts ( const detail::RecoTrackContainer::TrackProxy & track,
Acts::ConstTrackStateTypeMap typeFlags,
xAOD::UncalibMeasType detType )
staticprotectedinherited

Definition at line 440 of file TrackFindingBaseAlg.cxx.

442 {
444 if (typeFlags.isHole()) {
445 s_branchState.nPixelHoles(track)++;
446 } else if (typeFlags.isOutlier()) {
447 s_branchState.nPixelOutliers(track)++;
448 } else if (typeFlags.isMeasurement()) {
449 s_branchState.nPixelHits(track)++;
450 }
451 } else if (detType == xAOD::UncalibMeasType::StripClusterType) {
452 if (typeFlags.isHole()) {
453 s_branchState.nStripHoles(track)++;
454 } else if (typeFlags.isOutlier()) {
455 s_branchState.nStripOutliers(track)++;
456 } else if (typeFlags.isMeasurement()) {
457 s_branchState.nStripHits(track)++;
458 }
459 } else if (detType == xAOD::UncalibMeasType::HGTDClusterType) {
460 if (typeFlags.isHole()) {
461 s_branchState.nHgtdHoles(track)++;
462 } else if (typeFlags.isOutlier()) {
463 s_branchState.nHgtdOutliers(track)++;
464 } else if (typeFlags.isMeasurement()) {
465 s_branchState.nHgtdHits(track)++;
466 }
467 }
468 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

std::atomic<std::size_t> m_nTrackStateReserve ActsTrk::HGTDTrackExtensionAlg::ATLAS_THREAD_SAFE {0ul}
mutableprivate

Definition at line 123 of file HGTDTrackExtensionAlg.h.

123{0ul};
unsigned long ul

◆ ATLAS_THREAD_SAFE [2/2]

std::atomic<std::size_t> m_nTrackReserve ActsTrk::HGTDTrackExtensionAlg::ATLAS_THREAD_SAFE {0ul}
mutableprivate

Definition at line 122 of file HGTDTrackExtensionAlg.h.

122{0ul};

◆ m_absEtaMax

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_absEtaMax {this, "absEtaMax", std::numeric_limits<double>::max(), "TrackSelector: absEtaMax"}
protectedinherited

Definition at line 127 of file TrackFindingBaseAlg.h.

127{this, "absEtaMax", std::numeric_limits<double>::max(), "TrackSelector: absEtaMax"};

◆ m_absEtaMaxMeasurements

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_absEtaMaxMeasurements {this, "absEtaMaxMeasurements", {}, "if specified for the given seed collection, applies absEtaMax cut in branch stopper once absEtaMaxMeasurements have been encountered"}
protectedinherited

Definition at line 109 of file TrackFindingBaseAlg.h.

109{this, "absEtaMaxMeasurements", {}, "if specified for the given seed collection, applies absEtaMax cut in branch stopper once absEtaMaxMeasurements have been encountered"};

◆ m_absEtaMin

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_absEtaMin {this, "absEtaMin", 0.0, "TrackSelector: absEtaMin"}
protectedinherited

Definition at line 126 of file TrackFindingBaseAlg.h.

126{this, "absEtaMin", 0.0, "TrackSelector: absEtaMin"};

◆ m_actsTrackLinkKey

SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_actsTrackLinkKey {this, "ActsTrackLink", m_trackParticleContainerName, "actsTrack", "Link to Acts track"}
private

Definition at line 85 of file HGTDTrackExtensionAlg.h.

85{this, "ActsTrackLink", m_trackParticleContainerName, "actsTrack", "Link to Acts track"};

◆ m_addCounts

Gaudi::Property<bool> ActsTrk::TrackFindingBaseAlg::m_addCounts {this, "addCounts", true, "keep separate pixel, strip and hgtd counts and apply the following cuts"}
protectedinherited

Definition at line 141 of file TrackFindingBaseAlg.h.

141{this, "addCounts", true, "keep separate pixel, strip and hgtd counts and apply the following cuts"};

◆ m_branchStopperAbsEtaMaxExtra

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_branchStopperAbsEtaMaxExtra {this, "branchStopperAbsEtaMaxExtra", 0.0, "increase absEtaMax cut when used in the branch stopper"}
protectedinherited

Definition at line 116 of file TrackFindingBaseAlg.h.

116{this, "branchStopperAbsEtaMaxExtra", 0.0, "increase absEtaMax cut when used in the branch stopper"};

◆ m_branchStopperAbsEtaMeasCut

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_branchStopperAbsEtaMeasCut {this, "branchStopperAbsEtaMeasCut", 1.2, "the minimum |eta| to apply the reduction to the minMeas requirement for the branch stopper"}
protectedinherited

Definition at line 118 of file TrackFindingBaseAlg.h.

118{this, "branchStopperAbsEtaMeasCut", 1.2, "the minimum |eta| to apply the reduction to the minMeas requirement for the branch stopper"};

◆ m_branchStopperMeasCutReduce

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_branchStopperMeasCutReduce {this, "branchStopperMeasCutReduce", 2, "how much to reduce the minMeas requirement for the branch stopper"}
protectedinherited

Definition at line 117 of file TrackFindingBaseAlg.h.

117{this, "branchStopperMeasCutReduce", 2, "how much to reduce the minMeas requirement for the branch stopper"};

◆ m_branchStopperPtMinFactor

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_branchStopperPtMinFactor {this, "branchStopperPtMinFactor", 1.0, "factor to multiply ptMin cut when used in the branch stopper"}
protectedinherited

Definition at line 114 of file TrackFindingBaseAlg.h.

114{this, "branchStopperPtMinFactor", 1.0, "factor to multiply ptMin cut when used in the branch stopper"};

◆ m_checkCounts

Gaudi::Property<bool> ActsTrk::TrackFindingBaseAlg::m_checkCounts {this, "checkCounts", false, "check consistency among track state counts"}
protectedinherited

Definition at line 142 of file TrackFindingBaseAlg.h.

142{this, "checkCounts", false, "check consistency among track state counts"};

◆ m_chi2CutOff

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_chi2CutOff {this, "chi2CutOff", {}, "MeasurementSelector: maximum local chi2 contribution"}
protectedinherited

Definition at line 104 of file TrackFindingBaseAlg.h.

104{this, "chi2CutOff", {}, "MeasurementSelector: maximum local chi2 contribution"};

◆ m_chi2OutlierCutOff

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_chi2OutlierCutOff {this, "chi2OutlierCutOff", {}, "MeasurementSelector: maximum local chi2 contribution for outlier"}
protectedinherited

Definition at line 105 of file TrackFindingBaseAlg.h.

105{this, "chi2OutlierCutOff", {}, "MeasurementSelector: maximum local chi2 contribution for outlier"};

◆ m_ctxProvider

ContextUtility ActsTrk::TrackFindingBaseAlg::m_ctxProvider {this}
protectedinherited

Utility to fetch the geometry, magnetic field and calibration context in the event.

Definition at line 99 of file TrackFindingBaseAlg.h.

99{this};

◆ m_d0Max

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_d0Max {this, "d0Max", {}, "TrackSelector: d0Max"}
protectedinherited

Definition at line 131 of file TrackFindingBaseAlg.h.

131{this, "d0Max", {}, "TrackSelector: d0Max"};

◆ m_d0Min

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_d0Min {this, "d0Min", {}, "TrackSelector: d0Min"}
protectedinherited

Definition at line 130 of file TrackFindingBaseAlg.h.

130{this, "d0Min", {}, "TrackSelector: d0Min"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doBranchStopper

Gaudi::Property<bool> ActsTrk::TrackFindingBaseAlg::m_doBranchStopper {this, "doBranchStopper", true, "use branch stopper"}
protectedinherited

Definition at line 110 of file TrackFindingBaseAlg.h.

110{this, "doBranchStopper", true, "use branch stopper"};

◆ m_doTwoWay

Gaudi::Property<bool> ActsTrk::TrackFindingBaseAlg::m_doTwoWay {this, "doTwoWay", true, "run CKF twice, first with forward propagation with smoothing, then with backward propagation"}
protectedinherited

Definition at line 111 of file TrackFindingBaseAlg.h.

111{this, "doTwoWay", true, "run CKF twice, first with forward propagation with smoothing, then with backward propagation"};

◆ m_dumpAllStatEtaBins

Gaudi::Property<bool> ActsTrk::TrackFindingBaseAlg::m_dumpAllStatEtaBins {this, "DumpEtaBinsForAll", false, "Dump eta bins of all statistics counter."}
protectedinherited

Definition at line 158 of file TrackFindingBaseAlg.h.

158{this, "DumpEtaBinsForAll", false, "Dump eta bins of all statistics counter."};

◆ m_edgeHoleBorderWidth

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_edgeHoleBorderWidth {this,"EdgeHoleBorderWidth", 0. ,"Width of the border of surfaces (mm) within which holes are not counted as holes."}
protectedinherited

Definition at line 107 of file TrackFindingBaseAlg.h.

107{this,"EdgeHoleBorderWidth", 0. ,"Width of the border of surfaces (mm) within which holes are not counted as holes."};

◆ m_endOfWorldVolumeIds

Gaudi::Property<std::vector<std::uint32_t> > ActsTrk::TrackFindingBaseAlg::m_endOfWorldVolumeIds {this, "EndOfTheWorldVolumeIds", {}, ""}
protectedinherited

Definition at line 153 of file TrackFindingBaseAlg.h.

153{this, "EndOfTheWorldVolumeIds", {}, ""};

◆ m_etaBins

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_etaBins {this, "etaBins", {}, "bins in |eta| to specify variable selections"}
protectedinherited

Definition at line 102 of file TrackFindingBaseAlg.h.

102{this, "etaBins", {}, "bins in |eta| to specify variable selections"};

◆ m_etaMax

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_etaMax {this, "etaMax", {}, "TrackSelector: etaMax"}
protectedinherited

Definition at line 125 of file TrackFindingBaseAlg.h.

125{this, "etaMax", {}, "TrackSelector: etaMax"};

◆ m_etaMin

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_etaMin {this, "etaMin", {}, "TrackSelector: etaMin"}
protectedinherited

Definition at line 124 of file TrackFindingBaseAlg.h.

124{this, "etaMin", {}, "TrackSelector: etaMin"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_extrapXKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_extrapXKey { this, "HGTD_extrap_x", m_trackParticleContainerName, "HGTD_extrap_x", "Decoration for extrapolated X coordinate" }
private

Definition at line 101 of file HGTDTrackExtensionAlg.h.

101{ this, "HGTD_extrap_x", m_trackParticleContainerName, "HGTD_extrap_x", "Decoration for extrapolated X coordinate" };

◆ m_extrapYKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_extrapYKey { this, "HGTD_extrap_y", m_trackParticleContainerName, "HGTD_extrap_y", "Decoration for extrapolated Y coordinate" }
private

Definition at line 102 of file HGTDTrackExtensionAlg.h.

102{ this, "HGTD_extrap_y", m_trackParticleContainerName, "HGTD_extrap_y", "Decoration for extrapolated Y coordinate" };

◆ m_fitterTool

ToolHandle<ActsTrk::IFitterTool> ActsTrk::TrackFindingBaseAlg::m_fitterTool {this, "FitterTool", "", "Fitter Tool for Seeds"}
protectedinherited

Definition at line 90 of file TrackFindingBaseAlg.h.

90{this, "FitterTool", "", "Fitter Tool for Seeds"};

◆ m_hgtdCalibTool

ToolHandle<ActsTrk::IHGTDOnTrackCalibratorTool<detail::RecoTrackStateContainer> > ActsTrk::TrackFindingBaseAlg::m_hgtdCalibTool {this, "HGTDCalibrator", "", "Opt. HGTD measurement calibrator"}
protectedinherited

Definition at line 93 of file TrackFindingBaseAlg.h.

93{this, "HGTDCalibrator", "", "Opt. HGTD measurement calibrator"};

◆ m_HGTDClusterContainerName

SG::ReadHandleKey<xAOD::HGTDClusterContainer> ActsTrk::HGTDTrackExtensionAlg::m_HGTDClusterContainerName {this, "HGTDClusterContainerName", "HGTD_Clusters", "Name of the HGTD_Cluster container"}
private

Definition at line 80 of file HGTDTrackExtensionAlg.h.

80{this, "HGTDClusterContainerName", "HGTD_Clusters", "Name of the HGTD_Cluster container"};

◆ m_hgtdTrackLinkKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_hgtdTrackLinkKey {this, "hgtdTrackLink", m_trackParticleContainerName, "hgtdTrackLink", "Link to Hgtd track"}
private

Definition at line 103 of file HGTDTrackExtensionAlg.h.

103{this, "hgtdTrackLink", m_trackParticleContainerName, "hgtdTrackLink", "Link to Hgtd track"};

◆ m_inflateCovarianceTwoWay

Gaudi::Property<bool> ActsTrk::TrackFindingBaseAlg::m_inflateCovarianceTwoWay {this, "inflateCovarianceTwoWay", false, "inflate covariance matrix at the beginning of two-way track finding"}
protectedinherited

Definition at line 112 of file TrackFindingBaseAlg.h.

112{this, "inflateCovarianceTwoWay", false, "inflate covariance matrix at the beginning of two-way track finding"};

◆ m_layerClusterRawTimeKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_layerClusterRawTimeKey { this, "HGTD_cluster_raw_time", m_trackParticleContainerName, "HGTD_cluster_raw_time", "Decoration for raw time of cluster" }
private

Definition at line 99 of file HGTDTrackExtensionAlg.h.

99{ this, "HGTD_cluster_raw_time", m_trackParticleContainerName, "HGTD_cluster_raw_time", "Decoration for raw time of cluster" };

◆ m_layerClusterTimeKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_layerClusterTimeKey { this, "HGTD_cluster_time", m_trackParticleContainerName, "HGTD_cluster_time", "Decoration for cluster time" }
private

Definition at line 100 of file HGTDTrackExtensionAlg.h.

100{ this, "HGTD_cluster_time", m_trackParticleContainerName, "HGTD_cluster_time", "Decoration for cluster time" };

◆ m_layerExtensionChi2Key

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_layerExtensionChi2Key { this, "HGTD_extension_chi2", m_trackParticleContainerName, "HGTD_extension_chi2", "Decoration for chi2 of extension" }
private

Definition at line 98 of file HGTDTrackExtensionAlg.h.

98{ this, "HGTD_extension_chi2", m_trackParticleContainerName, "HGTD_extension_chi2", "Decoration for chi2 of extension" };

◆ m_layerHasExtensionKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_layerHasExtensionKey { this, "HGTD_has_extension", m_trackParticleContainerName, "HGTD_has_extension", "Decoration for layer extension" }
private

Definition at line 97 of file HGTDTrackExtensionAlg.h.

97{ this, "HGTD_has_extension", m_trackParticleContainerName, "HGTD_has_extension", "Decoration for layer extension" };

◆ m_logger

std::unique_ptr<const Acts::Logger> ActsTrk::TrackFindingBaseAlg::m_logger
protectedinherited

logging instance

Definition at line 334 of file TrackFindingBaseAlg.h.

◆ m_maxChi2

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_maxChi2 {this, "maxChi2", {}, "TrackSelector: maxChi2"}
protectedinherited

Definition at line 139 of file TrackFindingBaseAlg.h.

139{this, "maxChi2", {}, "TrackSelector: maxChi2"};

◆ m_maxEtaAcceptance

Gaudi::Property<float> ActsTrk::HGTDTrackExtensionAlg::m_maxEtaAcceptance {this, "MaxEtaAcceptance", 4.00, "Maximum eta to consider a track for extension"}
private

Definition at line 89 of file HGTDTrackExtensionAlg.h.

89{this, "MaxEtaAcceptance", 4.00, "Maximum eta to consider a track for extension"};

◆ m_maxHgtdHoles

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxHgtdHoles {this, "maxHgtdHoles", {}, "maximum number of hgtd holes"}
protectedinherited

Definition at line 148 of file TrackFindingBaseAlg.h.

148{this, "maxHgtdHoles", {}, "maximum number of hgtd holes"};

◆ m_maxHgtdOutliers

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxHgtdOutliers {this, "maxHgtdOutliers", {}, "maximum number of hgtd outliers"}
protectedinherited

Definition at line 151 of file TrackFindingBaseAlg.h.

151{this, "maxHgtdOutliers", {}, "maximum number of hgtd outliers"};

◆ m_maxHoles

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxHoles {this, "maxHoles", {}, "TrackSelector: maxHoles"}
protectedinherited

Definition at line 136 of file TrackFindingBaseAlg.h.

136{this, "maxHoles", {}, "TrackSelector: maxHoles"};

◆ m_maxOutliers

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxOutliers {this, "maxOutliers", {}, "TrackSelector: maxOutliers"}
protectedinherited

Definition at line 137 of file TrackFindingBaseAlg.h.

137{this, "maxOutliers", {}, "TrackSelector: maxOutliers"};

◆ m_maxPixelHoles

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxPixelHoles {this, "maxPixelHoles", {}, "maximum number of pixel holes"}
protectedinherited

Definition at line 146 of file TrackFindingBaseAlg.h.

146{this, "maxPixelHoles", {}, "maximum number of pixel holes"};

◆ m_maxPixelOutliers

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxPixelOutliers {this, "maxPixelOutliers", {}, "maximum number of pixel outliers"}
protectedinherited

Definition at line 149 of file TrackFindingBaseAlg.h.

149{this, "maxPixelOutliers", {}, "maximum number of pixel outliers"};

◆ m_maxPropagationStep

Gaudi::Property<unsigned int> ActsTrk::TrackFindingBaseAlg::m_maxPropagationStep {this, "maxPropagationStep", 1000, "Maximum number of steps for one propagate call"}
protectedinherited

Definition at line 101 of file TrackFindingBaseAlg.h.

101{this, "maxPropagationStep", 1000, "Maximum number of steps for one propagate call"};

◆ m_maxSharedHits

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxSharedHits {this, "maxSharedHits", {}, "TrackSelector: maxSharedHits"}
protectedinherited

Definition at line 138 of file TrackFindingBaseAlg.h.

138{this, "maxSharedHits", {}, "TrackSelector: maxSharedHits"};

◆ m_maxStripHoles

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxStripHoles {this, "maxStripHoles", {}, "maximum number of strip holes"}
protectedinherited

Definition at line 147 of file TrackFindingBaseAlg.h.

147{this, "maxStripHoles", {}, "maximum number of strip holes"};

◆ m_maxStripOutliers

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_maxStripOutliers {this, "maxStripOutliers", {}, "maximum number of strip outliers"}
protectedinherited

Definition at line 150 of file TrackFindingBaseAlg.h.

150{this, "maxStripOutliers", {}, "maximum number of strip outliers"};

◆ m_measurementSelectorConfig

struct ActsTrk::TrackFindingBaseAlg::MeasurementSelectorConfig ActsTrk::TrackFindingBaseAlg::m_measurementSelectorConfig
protectedinherited

◆ m_memorySafetyMargin

Gaudi::Property< float > ActsTrk::HGTDTrackExtensionAlg::m_memorySafetyMargin {this, "MemorySafetyMargin", 1.2}
private

Definition at line 121 of file HGTDTrackExtensionAlg.h.

121{this, "MemorySafetyMargin", 1.2};

◆ m_minEtaAcceptance

Gaudi::Property<float> ActsTrk::HGTDTrackExtensionAlg::m_minEtaAcceptance {this, "MinEtaAcceptance", 2.38, "Minimum eta to consider a track for extension"}
private

Definition at line 88 of file HGTDTrackExtensionAlg.h.

88{this, "MinEtaAcceptance", 2.38, "Minimum eta to consider a track for extension"};

◆ m_minHgtdHits

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_minHgtdHits {this, "minHgtdHits", {}, "minimum number of hgtd hits"}
protectedinherited

Definition at line 145 of file TrackFindingBaseAlg.h.

145{this, "minHgtdHits", {}, "minimum number of hgtd hits"};

◆ m_minMeasurements

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_minMeasurements {this, "minMeasurements", {}, "TrackSelector: minMeasurements"}
protectedinherited

Definition at line 135 of file TrackFindingBaseAlg.h.

135{this, "minMeasurements", {}, "TrackSelector: minMeasurements"};

◆ m_minPixelHits

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_minPixelHits {this, "minPixelHits", {}, "minimum number of pixel hits"}
protectedinherited

Definition at line 143 of file TrackFindingBaseAlg.h.

143{this, "minPixelHits", {}, "minimum number of pixel hits"};

◆ m_minStripHits

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_minStripHits {this, "minStripHits", {}, "minimum number of strip hits"}
protectedinherited

Definition at line 144 of file TrackFindingBaseAlg.h.

144{this, "minStripHits", {}, "minimum number of strip hits"};

◆ m_monTool

ToolHandle<GenericMonitoringTool> ActsTrk::TrackFindingBaseAlg::m_monTool {this, "MonTool", "", "Monitoring tool"}
protectedinherited

Definition at line 87 of file TrackFindingBaseAlg.h.

87{this, "MonTool", "", "Monitoring tool"};

◆ m_numHGTDHitsKey

SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_numHGTDHitsKey {this, "numHGTDHits", m_trackParticleContainerName, "numHGTDHits", "Number of HGTD hits on the track extension"}
private

Definition at line 96 of file HGTDTrackExtensionAlg.h.

96{this, "numHGTDHits", m_trackParticleContainerName, "numHGTDHits", "Number of HGTD hits on the track extension"};

◆ m_numMeasurementsCutOff

Gaudi::Property<std::vector<size_t> > ActsTrk::TrackFindingBaseAlg::m_numMeasurementsCutOff {this, "numMeasurementsCutOff", {}, "MeasurementSelector: maximum number of associated measurements on a single surface"}
protectedinherited

Definition at line 106 of file TrackFindingBaseAlg.h.

106{this, "numMeasurementsCutOff", {}, "MeasurementSelector: maximum number of associated measurements on a single surface"};

◆ m_phiMax

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_phiMax {this, "phiMax", {}, "TrackSelector: phiMax"}
protectedinherited

Definition at line 123 of file TrackFindingBaseAlg.h.

123{this, "phiMax", {}, "TrackSelector: phiMax"};

◆ m_phiMin

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_phiMin {this, "phiMin", {}, "TrackSelector: phiMin"}
protectedinherited

Definition at line 122 of file TrackFindingBaseAlg.h.

122{this, "phiMin", {}, "TrackSelector: phiMin"};

◆ m_pixelCalibTool

ToolHandle<ActsTrk::IPixelOnTrackCalibratorTool<detail::RecoTrackStateContainer> > ActsTrk::TrackFindingBaseAlg::m_pixelCalibTool {this, "PixelCalibrator", "", "Opt. pixel measurement calibrator"}
protectedinherited

Definition at line 91 of file TrackFindingBaseAlg.h.

91{this, "PixelCalibrator", "", "Opt. pixel measurement calibrator"};

◆ m_ptMax

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_ptMax {this, "ptMax", {}, "TrackSelector: ptMax"}
protectedinherited

Definition at line 129 of file TrackFindingBaseAlg.h.

129{this, "ptMax", {}, "TrackSelector: ptMax"};

◆ m_ptMin

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_ptMin {this, "ptMin", {}, "TrackSelector: ptMin"}
protectedinherited

Definition at line 128 of file TrackFindingBaseAlg.h.

128{this, "ptMin", {}, "TrackSelector: ptMin"};

◆ m_ptMinMeasurements

Gaudi::Property<std::vector<std::size_t> > ActsTrk::TrackFindingBaseAlg::m_ptMinMeasurements {this, "ptMinMeasurements", {}, "if specified for the given seed collection, applies ptMin cut in branch stopper once ptMinMinMeasurements have been encountered"}
protectedinherited

Definition at line 108 of file TrackFindingBaseAlg.h.

108{this, "ptMinMeasurements", {}, "if specified for the given seed collection, applies ptMin cut in branch stopper once ptMinMinMeasurements have been encountered"};

◆ m_seedLabels

Gaudi::Property<std::vector<std::string> > ActsTrk::TrackFindingBaseAlg::m_seedLabels {this, "SeedLabels", {}, "One label per seed key used in outputs"}
protectedinherited

Definition at line 157 of file TrackFindingBaseAlg.h.

157{this, "SeedLabels", {}, "One label per seed key used in outputs"};

◆ m_seedRefitPtMinFactor

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_seedRefitPtMinFactor {this, "seedRefitPtMinFactor", 1.0, "factor to multiply ptMin cut when used in the seed refit"}
protectedinherited

Definition at line 115 of file TrackFindingBaseAlg.h.

115{this, "seedRefitPtMinFactor", 1.0, "factor to multiply ptMin cut when used in the seed refit"};

◆ m_showResolvedStats

bool ActsTrk::TrackFindingBaseAlg::m_showResolvedStats = false
protectedinherited

Definition at line 351 of file TrackFindingBaseAlg.h.

◆ m_statEtaBins

Gaudi::Property<std::vector<float> > ActsTrk::TrackFindingBaseAlg::m_statEtaBins {this, "StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4}, "Gather statistics separately for these bins."}
protectedinherited

Definition at line 156 of file TrackFindingBaseAlg.h.

156{this, "StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4}, "Gather statistics separately for these bins."};

◆ m_stripCalibTool

ToolHandle<ActsTrk::IStripOnTrackCalibratorTool<detail::RecoTrackStateContainer> > ActsTrk::TrackFindingBaseAlg::m_stripCalibTool {this, "StripCalibrator", "", "Opt. strip measurement calibrator"}
protectedinherited

Definition at line 92 of file TrackFindingBaseAlg.h.

92{this, "StripCalibrator", "", "Opt. strip measurement calibrator"};

◆ m_surfAcc

ActsTrk::detail::xAODUncalibMeasSurfAcc ActsTrk::HGTDTrackExtensionAlg::m_surfAcc {}
private

Definition at line 92 of file HGTDTrackExtensionAlg.h.

92{};

◆ m_trackContainerKey

SG::WriteHandleKey<ActsTrk::TrackContainer> ActsTrk::TrackFindingBaseAlg::m_trackContainerKey {this, "ACTSTracksLocation", "", "Output track collection (ActsTrk variant)"}
protectedinherited

Definition at line 95 of file TrackFindingBaseAlg.h.

95{this, "ACTSTracksLocation", "", "Output track collection (ActsTrk variant)"};

◆ m_trackFinder

std::unique_ptr<CKF_pimpl> ActsTrk::TrackFindingBaseAlg::m_trackFinder
protectedinherited

Definition at line 81 of file TrackFindingBaseAlg.h.

◆ m_trackingGeometrySvc

ServiceHandle<ActsTrk::ITrackingGeometrySvc> ActsTrk::TrackFindingBaseAlg::m_trackingGeometrySvc {this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"}
protectedinherited

Definition at line 88 of file TrackFindingBaseAlg.h.

88{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};

◆ m_trackParticleContainerName

SG::ReadHandleKey<xAOD::TrackParticleContainer> ActsTrk::HGTDTrackExtensionAlg::m_trackParticleContainerName {this, "TrackParticleContainerName", "InDetTrackParticles", "Name of the TrackParticle container"}
private

Definition at line 79 of file HGTDTrackExtensionAlg.h.

79{this, "TrackParticleContainerName", "InDetTrackParticles", "Name of the TrackParticle container"};

◆ m_tracksBackendHandlesHelper

ActsTrk::MutableTrackContainerHandlesHelper ActsTrk::TrackFindingBaseAlg::m_tracksBackendHandlesHelper {this}
protectedinherited

Definition at line 96 of file TrackFindingBaseAlg.h.

96{this};

◆ m_trackStatePrinter

ToolHandle<ActsTrk::TrackStatePrinterTool> ActsTrk::TrackFindingBaseAlg::m_trackStatePrinter {this, "TrackStatePrinter", "", "optional track state printer"}
protectedinherited

Definition at line 89 of file TrackFindingBaseAlg.h.

89{this, "TrackStatePrinter", "", "optional track state printer"};

◆ m_twoWayinflateCovarianceFactor

Gaudi::Property<double> ActsTrk::TrackFindingBaseAlg::m_twoWayinflateCovarianceFactor {this, "twoWayinflateCovarianceFactor", 1.0, "factor to multiply the initial covariance matrix at the beginning of two-way track finding"}
protectedinherited

Definition at line 113 of file TrackFindingBaseAlg.h.

113{this, "twoWayinflateCovarianceFactor", 1.0, "factor to multiply the initial covariance matrix at the beginning of two-way track finding"};

◆ m_unalibMeasSurfAcc

detail::xAODUncalibMeasSurfAcc ActsTrk::TrackFindingBaseAlg::m_unalibMeasSurfAcc {}
protectedinherited

Definition at line 83 of file TrackFindingBaseAlg.h.

83{};

◆ m_uncalibratedMeasurementContainerKeys

SG::ReadHandleKeyArray<xAOD::UncalibratedMeasurementContainer> ActsTrk::HGTDTrackExtensionAlg::m_uncalibratedMeasurementContainerKeys {this, "UncalibratedMeasurementContainerKeys", {}, "input cluster collections"}
private

Definition at line 83 of file HGTDTrackExtensionAlg.h.

83{this, "UncalibratedMeasurementContainerKeys", {}, "input cluster collections"};

◆ m_useAbsEtaForStat

bool ActsTrk::TrackFindingBaseAlg::m_useAbsEtaForStat = false
protectedinherited

Definition at line 350 of file TrackFindingBaseAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_z0Max

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_z0Max {this, "z0Max", {}, "TrackSelector: z0Max"}
protectedinherited

Definition at line 133 of file TrackFindingBaseAlg.h.

133{this, "z0Max", {}, "TrackSelector: z0Max"};

◆ m_z0Min

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingBaseAlg::m_z0Min {this, "z0Min", {}, "TrackSelector: z0Min"}
protectedinherited

Definition at line 132 of file TrackFindingBaseAlg.h.

132{this, "z0Min", {}, "TrackSelector: z0Min"};

◆ s_branchState

BranchState ActsTrk::TrackFindingBaseAlg::s_branchState {}
staticconstexprprotectedinherited

Definition at line 315 of file TrackFindingBaseAlg.h.

315{};

The documentation for this class was generated from the following files: