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

#include <TrackFindingAlg.h>

Inheritance diagram for ActsTrk::TrackFindingAlg:
Collaboration diagram for ActsTrk::TrackFindingAlg:

Public Types

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

Public Member Functions

 TrackFindingAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TrackFindingAlg ()=default
virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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 , 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::unique_ptr< Acts::BoundTrackParameters > doRefit (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 addCounts (detail::RecoTrackContainer &tracksContainer)
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"}
ToolHandle< ActsTrk::IExtrapolationToolm_extrapolationTool {this, "ExtrapolationTool", ""}
PublicToolHandle< ActsTrk::ITrackingGeometryToolm_trackingGeometryTool {this, "TrackingGeometryTool", ""}
ToolHandle< ActsTrk::TrackStatePrinterToolm_trackStatePrinter {this, "TrackStatePrinter", "", "optional track state printer"}
PublicToolHandle< ActsTrk::IActsToTrkConverterToolm_ATLASConverterTool {this, "ATLASConverterTool", ""}
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}
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_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

enum  DestinyType : int { UNKNOWN =0 , SUCCEED , DUPLICATE , FAILURE }
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::size_t getSeedCategory (std::size_t typeIndex, const ActsTrk::Seed &seed, bool useTopSp) const
void printSeed (unsigned int iseed, const DetectorContextHolder &detContext, const ActsTrk::SeedContainer &seeds, const Acts::BoundTrackParameters &seedParameters, const detail::MeasurementIndex &measurementIndex, std::size_t &nPrinted, const char *seedType, bool isKF=false) const
StatusCode addTrack (const DetectorContextHolder &detContext, detail::RecoTrackContainerProxy &track, const Acts::Surface &pSurface, const Acts::TrackExtrapolationStrategy &extrapolationStrategy, detail::SharedHitCounter &sharedHits, detail::RecoTrackContainer &actsTracksContainer, const detail::MeasurementIndex &measurementIndex, const detail::RecoTrackContainer &tracksContainerTemp, detail::DuplicateSeedDetector &duplicateSeedDetector, std::vector< int > *destiny, EventStats &event_stat, std::size_t &ntracks, std::size_t iseed, std::size_t category_i, const char *seedType, std::optional< std::vector< unsigned int > > &trackCategories) const
StatusCode storeTrackCollectionToStoreGate (const EventContext &ctx, Acts::VectorTrackContainer &&originalTrackBackend, Acts::VectorMultiTrajectory &&originalTrackStateBackend) const
StatusCode propagateDetectorElementStatusToMeasurements (const ActsTrk::ActsVolumeIdToDetectorElementCollectionMap &volume_id_to_det_el_coll, const std::vector< const InDet::SiDetectorElementStatus * > &det_el_status_arr, detail::TrackFindingMeasurements &measurements) const
bool shouldReverseSearch (const ActsTrk::Seed &seed) const
Acts::Result< void > extrapolateTrackToReferenceSurface (const DetectorContextHolder &detContext, detail::RecoTrackContainerProxy &track, const Acts::Surface &referenceSurface, const detail::Extrapolator &propagator, Acts::TrackExtrapolationStrategy strategy, ExpectedLayerPattern &expectedLayerPattern) const
StatusCode findTracks (const EventContext &ctx, const DetectorContextHolder &detContext, const detail::TrackFindingMeasurements &measurements, const detail::MeasurementIndex &measurementIndex, detail::SharedHitCounter &sharedHits, detail::DuplicateSeedDetector &duplicateSeedDetector, const ActsTrk::SeedContainer &seeds, const InDetDD::SiDetectorElementCollection &detElements, detail::RecoTrackContainer &actsTracksContainer, std::size_t seedCollectionIndex, const char *seedType, EventStats &event_stat, std::vector< int > *destiny, const Acts::PerigeeSurface &pSurface, std::optional< std::vector< unsigned int > > &trackCategories) const
 invoke track finding procedure
void storeSeedInfo (const detail::RecoTrackContainer &tracksContainer, const detail::RecoTrackContainerProxy &track, detail::DuplicateSeedDetector &duplicateSeedDetector, const detail::MeasurementIndex &measurementIndex) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< ActsTrk::ITrackParamsEstimationToolm_paramEstimationTool {this, "TrackParamsEstimationTool", "", "Track Param Estimation from Seeds"}
SG::ReadHandleKeyArray< ActsTrk::SeedContainerm_seedContainerKeys {this, "SeedContainerKeys", {}, "Seed containers"}
SG::ReadCondHandleKeyArray< InDetDD::SiDetectorElementCollectionm_detEleCollKeys {this, "DetectorElementsKeys", {}, "Keys of input SiDetectorElementCollection"}
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainerm_uncalibratedMeasurementContainerKeys {this, "UncalibratedMeasurementContainerKeys", {}, "input cluster collections"}
SG::ReadCondHandleKey< ActsTrk::ActsVolumeIdToDetectorElementCollectionMapm_volumeIdToDetectorElementCollMapKey
SG::ReadHandleKeyArray< InDet::SiDetectorElementStatusm_detElStatus {this, "DetElStatus", {}, "Keys for detector element status conditions data."}
bool m_storeDestinies {false}
SG::WriteHandleKeyArray< std::vector< int > > m_seedDestiny {this, "SeedDestiny", {}}
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
Gaudi::Property< bool > m_skipDuplicateSeeds {this, "skipDuplicateSeeds", true, "skip duplicate seeds before calling CKF"}
Gaudi::Property< unsigned int > m_seedMeasOffset {this,"seedMeasOffset", 0, "Reduce the requirement on the space points on seed to mark a seed as duplicate, e.g seedMeasOffset=1, only N-1 measurements on seed are sufficient deduplicate the seed"}
Gaudi::Property< std::vector< bool > > m_refitSeeds {this, "refitSeeds", {}, "Run KalmanFitter on seeds before passing to CKF, specified separately for each seed collection"}
Gaudi::Property< std::vector< double > > m_useTopSpRZboundary {this, "useTopSpRZboundary", {350. * Acts::UnitConstants::mm, 1060. * Acts::UnitConstants::mm}, "R/Z boundary for using the top space point in the track parameter estimation"}
Gaudi::Property< bool > m_autoReverseSearch {this, "autoReverseSearch", false, "Whether to run the finding in seed parameter direction (false or not specified) or reverse direction (true), automatically determined by the param estimation tool"}
Gaudi::Property< bool > m_countSharedHits {this, "countSharedHits", true, "add shared hit flags to tracks"}
Gaudi::Property< bool > m_forceTrackOnSeed {this, "forceTrackOnSeed", true, "force track to use measurements from the seed"}
Gaudi::Property< unsigned int > m_maximumSharedHits {this, "MaximumSharedHits", 3u, "Maximum number of shared hits per track."}
Gaudi::Property< unsigned int > m_maximumIterations {this, "MaximumIterations", 10000u, "Maximum number of iterations to resolve ambiguities among all tracks."}
Gaudi::Property< unsigned int > m_nMeasurementsMin {this, "NMeasurementsMin", 7u, "Minimum number of measurements per track."}
Gaudi::Property< std::size_t > m_ambiStrategy {this, "ambiStrategy", 0, "0 - Do ambiguity resolution outside track finding; 1 - Do ambiguity in track finding using GreedyAmbiguitySolver tool; 2 - Do shared hit cut during track candidate selection"}
std::optional< Acts::GreedyAmbiguityResolution > m_ambi
Gaudi::Property< float > m_memorySafetyMargin {this, "MemorySafetyMargin", 1.2}
std::size_t m_nTrackReserve ATLAS_THREAD_SAFE {0ul}
std::size_t m_nTrackStateReserve ATLAS_THREAD_SAFE {0ul}
std::mutex m_mutex ATLAS_THREAD_SAFE {}
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 45 of file TrackFindingAlg.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::TrackFindingAlg::ExpectedLayerPattern = std::array<unsigned int, 4>

Definition at line 57 of file TrackFindingAlg.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 56 of file TrackFindingBaseAlg.h.

◆ TrkProxy

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

Definition at line 256 of file TrackFindingBaseAlg.h.

Member Enumeration Documentation

◆ DestinyType

Enumerator
UNKNOWN 
SUCCEED 
DUPLICATE 
FAILURE 

Definition at line 192 of file TrackFindingAlg.h.

◆ EStat

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

Definition at line 161 of file TrackFindingBaseAlg.h.

162 {
166 kNoTrack,
174 kNoSecond,
180 kNStat
181 };

Constructor & Destructor Documentation

◆ TrackFindingAlg()

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

Definition at line 63 of file TrackFindingAlg.cxx.

64 : TrackFindingBaseAlg(name, pSvcLocator) {}
TrackFindingBaseAlg(const std::string &name, ISvcLocator *pSvcLocator)

◆ ~TrackFindingAlg()

virtual ActsTrk::TrackFindingAlg::~TrackFindingAlg ( )
virtualdefault

Member Function Documentation

◆ addCounts()

void ActsTrk::TrackFindingBaseAlg::addCounts ( detail::RecoTrackContainer & tracksContainer)
staticprotectedinherited

Definition at line 409 of file TrackFindingBaseAlg.cxx.

410 {
411 tracksContainer.addColumn<unsigned int>("nPixelHits");
412 tracksContainer.addColumn<unsigned int>("nStripHits");
413 tracksContainer.addColumn<unsigned int>("nHgtdHits");
414 tracksContainer.addColumn<unsigned int>("nPixelHoles");
415 tracksContainer.addColumn<unsigned int>("nStripHoles");
416 tracksContainer.addColumn<unsigned int>("nHgtdHoles");
417 tracksContainer.addColumn<unsigned int>("nPixelOutliers");
418 tracksContainer.addColumn<unsigned int>("nStripOutliers");
419 tracksContainer.addColumn<unsigned int>("nHgtdOutliers");
420 }

◆ addTrack()

StatusCode ActsTrk::TrackFindingAlg::addTrack ( const DetectorContextHolder & detContext,
detail::RecoTrackContainerProxy & track,
const Acts::Surface & pSurface,
const Acts::TrackExtrapolationStrategy & extrapolationStrategy,
detail::SharedHitCounter & sharedHits,
detail::RecoTrackContainer & actsTracksContainer,
const detail::MeasurementIndex & measurementIndex,
const detail::RecoTrackContainer & tracksContainerTemp,
detail::DuplicateSeedDetector & duplicateSeedDetector,
std::vector< int > * destiny,
EventStats & event_stat,
std::size_t & ntracks,
std::size_t iseed,
std::size_t category_i,
const char * seedType,
std::optional< std::vector< unsigned int > > & trackCategories ) const
private

Definition at line 931 of file TrackFindingAlg.cxx.

947 {
948
949 std::array<unsigned int, 4> expectedLayerPattern{};
950
951 // if the the perigeeSurface was not hit (in particular the case for the inside-out pass,
952 // the track has no reference surface and the extrapolation to the perigee has not been done
953 // yet.
954 if (not track.hasReferenceSurface()) {
955 auto extrapolationResult =
956 extrapolateTrackToReferenceSurface(detContext, track,
957 pSurface,
958 trackFinder().extrapolator,
959 extrapolationStrategy,
960 expectedLayerPattern);
961
962 if (not extrapolationResult.ok()) {
963 ATH_MSG_WARNING("Extrapolation for seed "
964 << iseed << " and " << track.index()
965 << " failed with error " << extrapolationResult.error()
966 << " dropping track candidate.");
967 if (m_storeDestinies) destiny->at(iseed) = DestinyType::FAILURE;
968 return StatusCode::SUCCESS;
969 }
970 }
971
972 // Before trimming, inspect encountered surfaces from all track states
973 for(const auto ts : track.trackStatesReversed()) {
974 const auto& surface = ts.referenceSurface();
975 if(surface.surfacePlacement() != nullptr) {
976 const auto* detElem = dynamic_cast<const ActsDetectorElement*>(surface.surfacePlacement());
977 if(detElem != nullptr) {
978 detail::addToExpectedLayerPattern(expectedLayerPattern, *detElem);
979 }
980 }
981 }
982
983 // Trim tracks
984 // - trimHoles
985 // - trimOutliers
986 // - trimMaterial
987 // - trimOtherNoneMeasurement
988 Acts::trimTrack(track, true, true, true, true);
989 Acts::calculateTrackQuantities(track);
990 if (m_addCounts) {
991 initCounts(track);
992 for (const auto trackState : track.trackStatesReversed()) {
993 updateCounts(track, trackState.typeFlags(), measurementType(trackState));
994 }
995 if (m_checkCounts) {
996 checkCounts(track);
997 }
998 }
999
1000 ++ntracks;
1001 ++event_stat[category_i][kNOutputTracks];
1002
1003 if ( not trackFinder().trackSelector.isValidTrack(track) or
1004 not selectCountsFinal(track)) {
1005 ATH_MSG_DEBUG("Track " << ntracks << " from " << seedType << " seed " << iseed << " failed track selection");
1006 if ( m_trackStatePrinter.isSet() ) {
1007 m_trackStatePrinter->printTrack(detContext.geometry, tracksContainerTemp, track, measurementIndex, true);
1008 }
1009 return StatusCode::SUCCESS;
1010 }
1011
1012 ++event_stat[category_i][kNSelectedTracks];
1013
1014 // Fill the track infos into the duplicate seed detector
1016 storeSeedInfo(tracksContainerTemp, track, duplicateSeedDetector, measurementIndex);
1017 }
1018
1019 auto actsDestProxy = actsTracksContainer.makeTrack();
1020 actsDestProxy.copyFrom(track); // make sure we copy track states!
1021
1022 detail::ExpectedLayerPatternHelper::set(actsDestProxy, expectedLayerPattern);
1023
1024 auto setTrackCategory = [&]() {
1025 if (!trackCategories) return;
1026 if (!(actsDestProxy.index() < trackCategories->size())) trackCategories->resize(actsDestProxy.index()+1);
1027 trackCategories->at(actsDestProxy.index()) = category_i;
1028 };
1029
1030 if (not m_countSharedHits) {
1031 return StatusCode::SUCCESS;
1032 }
1033
1034 auto [nShared, nBadTrackMeasurements] = sharedHits.computeSharedHits(actsDestProxy, actsTracksContainer, measurementIndex);
1035
1036 if (nBadTrackMeasurements > 0) {
1037 ATH_MSG_ERROR("computeSharedHits: " << nBadTrackMeasurements << " track measurements not found in input for " << seedType << " seed " << iseed << " track");
1038 }
1039
1040 ATH_MSG_DEBUG("found " << actsDestProxy.nSharedHits() << " shared hits in " << seedType << " seed " << iseed << " track");
1041
1042 event_stat[category_i][kNTotalSharedHits] += nShared;
1043
1044 if (m_ambiStrategy == 2u) { // run the ambiguity during track selection
1045
1046 if (actsDestProxy.nSharedHits() <= m_maximumSharedHits) {
1047 setTrackCategory();
1048 ++event_stat[category_i][kNResolvedTracks];
1049 }
1050 else { // track fails the shared hit selection
1051
1052 ATH_MSG_DEBUG("found " << actsDestProxy.nSharedHits() << " shared hits in " << seedType << " seed " << iseed << " track");
1053 // Reset the original track shared hits by running coumputeSharedHits
1054 // with removeSharedHits flag to true
1055 // nSharedRemoved contains the total shared hits that will be removed
1056 auto [nSharedRemoved, nRemoveBadTrackMeasurements] = sharedHits.computeSharedHits(actsDestProxy, actsTracksContainer, measurementIndex, true);
1057
1058 ATH_MSG_DEBUG("Removed " << nSharedRemoved << " shared hits in " << seedType << " seed " << iseed << " track and the matching track");
1059
1060 if (nRemoveBadTrackMeasurements > 0) {
1061 ATH_MSG_ERROR("computeSharedHits with remove flag ON: " << nRemoveBadTrackMeasurements <<
1062 " track measurements not found in input for " << seedType << " seed " << iseed << " track");
1063 }
1064
1065 if (actsDestProxy.nSharedHits() != 0) {
1066 ATH_MSG_ERROR("computeSharedHits with remove flag ON returned " <<
1067 actsDestProxy.nSharedHits()<< " while expecting 0 for" <<
1068 seedType << " seed " << iseed << " track");
1069 }
1070
1071 // Remove the track from the container
1072 actsTracksContainer.removeTrack(actsDestProxy.index());
1073 ATH_MSG_DEBUG("Track " << ntracks << " from " << seedType << " seed " << iseed << " failed shared hit selection");
1074 }
1075 }
1076 else {
1077 // run ambi later
1078 setTrackCategory();
1079 if (m_trackStatePrinter.isSet()) {
1080 m_trackStatePrinter->printTrack(detContext.geometry, actsTracksContainer, actsDestProxy, measurementIndex);
1081 }
1082 }
1083
1084 return StatusCode::SUCCESS;
1085 }
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Property< bool > m_countSharedHits
Gaudi::Property< unsigned int > m_maximumSharedHits
void storeSeedInfo(const detail::RecoTrackContainer &tracksContainer, const detail::RecoTrackContainerProxy &track, detail::DuplicateSeedDetector &duplicateSeedDetector, const detail::MeasurementIndex &measurementIndex) const
Acts::Result< void > extrapolateTrackToReferenceSurface(const DetectorContextHolder &detContext, detail::RecoTrackContainerProxy &track, const Acts::Surface &referenceSurface, const detail::Extrapolator &propagator, Acts::TrackExtrapolationStrategy strategy, ExpectedLayerPattern &expectedLayerPattern) const
Gaudi::Property< bool > m_skipDuplicateSeeds
Gaudi::Property< std::size_t > m_ambiStrategy
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
bool selectCountsFinal(const detail::RecoTrackContainer::TrackProxy &track) const
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)

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

62{
63 return 0;
64}

◆ checkCounts()

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

Definition at line 465 of file TrackFindingBaseAlg.cxx.

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

◆ computeStatSum()

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

Definition at line 774 of file TrackFindingBaseAlg.cxx.

774 {
775 std::size_t out = 0u;
776 for (std::size_t category_i = seed_collection * seedCollectionStride();
777 category_i < (seed_collection + 1) * seedCollectionStride();
778 ++category_i)
779 {
780 assert(category_i < stat.size());
781 out += stat[category_i][counter_i];
782 }
783 return out;
784 }
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 561 of file TrackFindingBaseAlg.cxx.

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

◆ 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::unique_ptr< Acts::BoundTrackParameters > 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 241 of file TrackFindingBaseAlg.cxx.

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

◆ 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::TrackFindingAlg::execute ( const EventContext & ctx) const
overridevirtual

Reimplemented from ActsTrk::TrackFindingBaseAlg.

Definition at line 143 of file TrackFindingAlg.cxx.

144 {
145 ATH_MSG_DEBUG("Executing " << name() << " ... ");
146
147 auto timer = Monitored::Timer<std::chrono::milliseconds>("TIME_execute");
148 auto mon_nTracks = Monitored::Scalar<int>("nTracks");
149 auto mon = Monitored::Group(m_monTool, timer, mon_nTracks);
150
151 // ================================================== //
152 // ===================== INPUTS ===================== //
153 // ================================================== //
154
155 // SEED TRIPLETS
156 std::vector<const ActsTrk::SeedContainer *> seedContainers;
157 std::size_t total_seeds = 0;
158 ATH_CHECK(getContainersFromKeys(ctx, m_seedContainerKeys, seedContainers, total_seeds));
159
160 // DESTINIES
161 std::vector< std::unique_ptr< std::vector<int> > > destinies {};
162 if (m_storeDestinies) {
163 destinies.reserve( seedContainers.size() );
164 for (std::size_t i(0); i<seedContainers.size(); ++i) {
165 destinies.push_back( std::make_unique< std::vector<int> >( seedContainers.at(i)->size(), DestinyType::UNKNOWN) );
166 }
167 }
168
169 // MEASUREMENTS
170 std::vector<const xAOD::UncalibratedMeasurementContainer *> uncalibratedMeasurementContainers;
171 std::size_t total_measurements = 0;
172 ATH_CHECK(getContainersFromKeys(ctx, m_uncalibratedMeasurementContainerKeys, uncalibratedMeasurementContainers, total_measurements));
173
174 // map detector element status to volume ids
175 SG::ReadCondHandle<ActsTrk::ActsVolumeIdToDetectorElementCollectionMap>
176 volumeIdToDetectorElementCollMap(m_volumeIdToDetectorElementCollMapKey,ctx);
177 ATH_CHECK(volumeIdToDetectorElementCollMap.isValid());
178 std::vector< const InDet::SiDetectorElementStatus *> det_el_status_arr;
179 const std::vector<const InDetDD::SiDetectorElementCollection*> &det_el_collections =volumeIdToDetectorElementCollMap->collections();
180 det_el_status_arr.resize( det_el_collections.size(), nullptr);
181 for (const SG::ReadHandleKey<InDet::SiDetectorElementStatus> &det_el_status_key : m_detElStatus) {
182 SG::ReadHandle<InDet::SiDetectorElementStatus> det_el_status(det_el_status_key,ctx);
183 ATH_CHECK( det_el_status.isValid());
184 const std::vector<const InDetDD::SiDetectorElementCollection*>::const_iterator
185 det_el_col_iter = std::find(det_el_collections.begin(),
186 det_el_collections.end(),
187 &det_el_status->getDetectorElements());
188 det_el_status_arr.at(det_el_col_iter - det_el_collections.begin()) = det_el_status.cptr();
189 }
190
191 detail::MeasurementIndex measurementIndex(uncalibratedMeasurementContainers.size());
192 for (std::size_t icontainer = 0; icontainer < uncalibratedMeasurementContainers.size(); ++icontainer) {
193 measurementIndex.addMeasurements(*uncalibratedMeasurementContainers[icontainer]);
194 }
195
196 detail::TrackFindingMeasurements measurements(uncalibratedMeasurementContainers.size());
197 for (std::size_t icontainer = 0; icontainer < uncalibratedMeasurementContainers.size(); ++icontainer) {
198 ATH_MSG_DEBUG("Create " << uncalibratedMeasurementContainers[icontainer]->size() << " source links from measurements in " << m_uncalibratedMeasurementContainerKeys[icontainer].key());
199 measurements.addMeasurements(icontainer,
200 *uncalibratedMeasurementContainers[icontainer],
201 *m_trackingGeometryTool->surfaceIdMap(),
202 m_forceTrackOnSeed ? &measurementIndex : nullptr);
203 }
204
205 ATH_MSG_DEBUG("measurement index size = " << measurementIndex.size());
206
207 ATH_CHECK( propagateDetectorElementStatusToMeasurements(*(volumeIdToDetectorElementCollMap.cptr()), det_el_status_arr, measurements) );
208
209 if (m_trackStatePrinter.isSet()) {
210 m_trackStatePrinter->printMeasurements(ctx, uncalibratedMeasurementContainers, measurements.measurementOffsets());
211 }
212
213 detail::DuplicateSeedDetector duplicateSeedDetector(total_seeds,
214 m_seedMeasOffset.value(),
216 for (std::size_t icontainer = 0; icontainer < seedContainers.size(); ++icontainer)
217 {
218 duplicateSeedDetector.addSeeds(icontainer, *seedContainers[icontainer], measurementIndex,
219 m_paramEstimationTool->spacePointIndicesFun(),
220 [this,icontainer](const ActsTrk::Seed& seed) -> bool {
221 const bool reverseSearch = m_autoReverseSearch && shouldReverseSearch(seed);
222 const bool refitSeeds = icontainer < m_refitSeeds.size() && m_refitSeeds[icontainer];
223 const bool useTopSp = reverseSearch && !refitSeeds;
224 return useTopSp;
225 });
226 }
227
228 // Get Beam pos and make pSurface
229 SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle = SG::makeHandle( m_beamSpotKey, ctx );
230 ATH_CHECK( beamSpotHandle.isValid() );
231 const InDet::BeamSpotData* beamSpotData = beamSpotHandle.cptr();
232
233 // Beam Spot Position
234 Acts::Vector3 beamPos( beamSpotData->beamPos().x() * Acts::UnitConstants::mm,
235 beamSpotData->beamPos().y() * Acts::UnitConstants::mm,
236 0 );
237
238 // Construct a perigee surface as the target surface
239 std::shared_ptr<Acts::PerigeeSurface> pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(beamPos);
240
241 // ================================================== //
242 // ===================== CONDS ====================== //
243 // ================================================== //
244
245 std::vector<const InDetDD::SiDetectorElementCollection*> detElementsCollections;
246 std::size_t total_detElems = 0;
247 ATH_CHECK(getContainersFromKeys(ctx, m_detEleCollKeys, detElementsCollections, total_detElems));
248
249 // ================================================== //
250 // ===================== COMPUTATION ================ //
251 // ================================================== //
252 Acts::VectorTrackContainer actsTrackBackend;
253 Acts::VectorMultiTrajectory actsTrackStateBackend;
254 {
255 std::lock_guard<std::mutex> lock( m_mutex );
256 actsTrackBackend.reserve(m_nTrackReserve);
257 actsTrackStateBackend.reserve(m_nTrackStateReserve);
258 }
259 detail::RecoTrackContainer actsTracksContainer(actsTrackBackend,
260 actsTrackStateBackend);
261
262 if (m_addCounts) {
263 addCounts(actsTracksContainer);
264 }
265
266 detail::ExpectedLayerPatternHelper::add(actsTracksContainer);
267
268 EventStats event_stat;
269 event_stat.resize(m_stat.size());
270
271 DetectorContextHolder detContext {
272 .geometry = m_trackingGeometryTool->getGeometryContext(ctx).context(),
273 .magField = m_extrapolationTool->getMagneticFieldContext(ctx),
274 // CalibrationContext converter not implemented yet.
275 .calib = getCalibrationContext(ctx)
276 };
277
278 detail::SharedHitCounter sharedHits;
279 std::optional<std::vector<unsigned int>> trackCategories;
280 if (m_ambi) trackCategories.emplace(); // only needed if m_ambiStrategy == END_OF_TF
281
282 // Perform the track finding for all initial parameters.
283 for (std::size_t icontainer = 0; icontainer < seedContainers.size(); ++icontainer)
284 {
286 detContext,
287 measurements,
288 measurementIndex,
289 sharedHits,
290 duplicateSeedDetector,
291 *seedContainers.at(icontainer),
292 *detElementsCollections.at(icontainer),
293 actsTracksContainer,
294 icontainer,
295 icontainer < m_seedLabels.size() ? m_seedLabels[icontainer].c_str() : m_seedContainerKeys[icontainer].key().c_str(),
296 event_stat,
297 m_storeDestinies ? destinies.at(icontainer).get() : nullptr,
298 *pSurface.get(),
299 trackCategories));
300 }
301
302 ATH_MSG_DEBUG(" \\__ Created " << actsTracksContainer.size() << " tracks");
303
304 mon_nTracks = actsTracksContainer.size();
305
306
307 // ================================================== //
308 // ===================== OUTPUTS ==================== //
309 // ================================================== //
310
311 // Save the seed destinies
312 if (m_storeDestinies) {
313 for (std::size_t i(0); i<destinies.size(); ++i) {
314 const SG::WriteHandleKey< std::vector<int> >& writeKey = m_seedDestiny.at(i);
315 // make the handle and record
316 SG::WriteHandle< std::vector<int> > destinyHandle = SG::makeHandle( writeKey, ctx );
317 ATH_CHECK( destinyHandle.record( std::move( destinies.at(i) ) ) );
318 }
319 }
320
321 {
322 std::lock_guard<std::mutex> lock( m_mutex );
323 // update the reserve space
324 if (actsTrackBackend.size() > m_nTrackReserve) {
325 m_nTrackReserve = static_cast<std::size_t>( std::ceil(m_memorySafetyMargin * actsTrackBackend.size()) );
326 }
327 if (actsTrackStateBackend.size() > m_nTrackStateReserve) {
328 m_nTrackStateReserve = static_cast<std::size_t>( std::ceil(m_memorySafetyMargin * actsTrackStateBackend.size()) );
329 }
330 }
331
332 // handle the ambiguity
333 // we potentially need to short list the track candidates and make some copies
334 if (not m_ambi) {
335 copyStats(event_stat);
336 // no need to shortlist anything. just use the actsTracksContainer
337 ATH_MSG_DEBUG(" \\__ Created " << actsTracksContainer.size() << " resolved tracks");
339 std::move(actsTrackBackend),
340 std::move(actsTrackStateBackend) ) );
341 return StatusCode::SUCCESS;
342 }
343
344 // we have asked for the ambi
345 // we start by shortlisting the container
346 Acts::VectorTrackContainer resolvedTrackBackend;
347 Acts::VectorMultiTrajectory resolvedTrackStateBackend;
348 resolvedTrackBackend.reserve( actsTrackBackend.size() );
349 resolvedTrackStateBackend.reserve( actsTrackStateBackend.size() );
350 detail::RecoTrackContainer resolvedTracksContainer(resolvedTrackBackend, resolvedTrackStateBackend);
351 detail::ExpectedLayerPatternHelper::add(resolvedTracksContainer);
352
353 if (m_addCounts) {
354 addCounts(resolvedTracksContainer);
355 }
356
357 // Start ambiguity resolution
358 Acts::GreedyAmbiguityResolution::State state;
359 m_ambi->computeInitialState(actsTracksContainer, state, &detail::sourceLinkHash,
361 m_ambi->resolve(state);
362
363 // Copy the resolved tracks into the output container
364 // We need a different sharedHits counter here because it saves the track index
365 // and since I ran the resolving the track indices changed.
366 detail::SharedHitCounter sharedHits_forFinalAmbi;
367
368 // shotlist
369 for (auto iTrack : state.selectedTracks) {
370 int actsTrackIndex = state.trackTips.at(iTrack);
371 auto destProxy = resolvedTracksContainer.makeTrack();
372 destProxy.copyFrom(actsTracksContainer.getTrack(actsTrackIndex));
373
374 unsigned int category_i = trackCategories->at(actsTrackIndex);
375 ++event_stat[category_i][kNResolvedTracks];
376
377 if (m_countSharedHits) {
378 auto [nShared, nBadTrackMeasurements] = sharedHits_forFinalAmbi.computeSharedHits(destProxy, resolvedTracksContainer, measurementIndex);
379 if (nBadTrackMeasurements > 0)
380 ATH_MSG_ERROR("computeSharedHits: " << nBadTrackMeasurements << " track measurements not found in input track");
381 }
382 } // loop on tracks
383
384 ATH_MSG_DEBUG(" \\__ Created " << resolvedTracksContainer.size() << " resolved tracks");
385 copyStats(event_stat);
386
388 std::move(resolvedTrackBackend),
389 std::move(resolvedTrackStateBackend)) );
390
391 return StatusCode::SUCCESS;
392 }
#define ATH_CHECK
Evaluate an expression and check for errors.
size_t size() const
Number of registered mappings.
SG::WriteHandleKeyArray< std::vector< int > > m_seedDestiny
Gaudi::Property< float > m_memorySafetyMargin
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_uncalibratedMeasurementContainerKeys
SG::ReadHandleKeyArray< ActsTrk::SeedContainer > m_seedContainerKeys
SG::ReadCondHandleKey< ActsTrk::ActsVolumeIdToDetectorElementCollectionMap > m_volumeIdToDetectorElementCollMapKey
SG::ReadCondHandleKeyArray< InDetDD::SiDetectorElementCollection > m_detEleCollKeys
std::optional< Acts::GreedyAmbiguityResolution > m_ambi
StatusCode propagateDetectorElementStatusToMeasurements(const ActsTrk::ActsVolumeIdToDetectorElementCollectionMap &volume_id_to_det_el_coll, const std::vector< const InDet::SiDetectorElementStatus * > &det_el_status_arr, detail::TrackFindingMeasurements &measurements) const
ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool
Gaudi::Property< unsigned int > m_seedMeasOffset
StatusCode findTracks(const EventContext &ctx, const DetectorContextHolder &detContext, const detail::TrackFindingMeasurements &measurements, const detail::MeasurementIndex &measurementIndex, detail::SharedHitCounter &sharedHits, detail::DuplicateSeedDetector &duplicateSeedDetector, const ActsTrk::SeedContainer &seeds, const InDetDD::SiDetectorElementCollection &detElements, detail::RecoTrackContainer &actsTracksContainer, std::size_t seedCollectionIndex, const char *seedType, EventStats &event_stat, std::vector< int > *destiny, const Acts::PerigeeSurface &pSurface, std::optional< std::vector< unsigned int > > &trackCategories) const
invoke track finding procedure
StatusCode storeTrackCollectionToStoreGate(const EventContext &ctx, Acts::VectorTrackContainer &&originalTrackBackend, Acts::VectorMultiTrajectory &&originalTrackStateBackend) const
Gaudi::Property< bool > m_forceTrackOnSeed
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
SG::ReadHandleKeyArray< InDet::SiDetectorElementStatus > m_detElStatus
void copyStats(const EventStats &event_stat) const
ToolHandle< GenericMonitoringTool > m_monTool
static void addCounts(detail::RecoTrackContainer &tracksContainer)
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
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...
std::vector< std::array< unsigned int, kNStat > > EventStats
Gaudi::Property< std::vector< std::string > > m_seedLabels
const Amg::Vector3D & beamPos() const noexcept
const_pointer_type cptr()
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
bool sourceLinkEquality(const Acts::SourceLink &a, const Acts::SourceLink &b)
Returns whether two source links are equal.
std::size_t sourceLinkHash(const Acts::SourceLink &sl)
Calculates the source link hash which is evaluated to be the identifier of the underlying sourcelink.
Acts::TrackContainer< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory > RecoTrackContainer
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx)
The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLink...
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
timer(name, disabled=False)
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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

88{
89 // If we didn't find any symlinks to add, just return the collection
90 // from the base class. Otherwise, return the extended collection.
91 if (!m_extendedExtraObjects.empty()) {
93 }
95}
An algorithm that can be simultaneously executed in multiple threads.

◆ extrapolateTrackToReferenceSurface()

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

Definition at line 867 of file TrackFindingAlg.cxx.

873 {
874
875 Acts::PropagatorOptions<detail::Stepper::Options, detail::Navigator::Options,
876 Acts::ActorList<Acts::MaterialInteractor, Collector>>
877 options(detContext.geometry, detContext.magField);
878
879 auto findResult = findTrackStateForExtrapolation(
880 options.geoContext, track, referenceSurface, strategy, logger());
881
882 if (!findResult.ok()) {
883 ATH_MSG_WARNING("Failed to find track state for extrapolation");
884 return findResult.error();
885 }
886
887 auto &[trackState, distance] = *findResult;
888
889 options.direction = Acts::Direction::fromScalarZeroAsPositive(distance);
890
891 Acts::BoundTrackParameters parameters = track.createParametersFromState(trackState);
892 ATH_MSG_VERBOSE("Extrapolating track to reference surface at distance "
893 << distance << " with direction " << options.direction
894 << " with starting parameters " << parameters);
895
896 auto state = propagator.makeState<decltype(options), Acts::ForcedSurfaceReached>(referenceSurface, options);
897 ExpectedLayerPattern*& collectorResult = state.get<TrackFindingAlg::ExpectedLayerPattern*>();
898 collectorResult = &expectedLayerPattern;
899
900 auto initRes = propagator.initialize(state, parameters);
901 if(!initRes.ok()) {
902 ATH_MSG_WARNING("Failed to initialize propagation state: " << initRes.error().message());
903 return initRes.error();
904 }
905
906
907 auto propagateOnlyResult =
908 propagator.propagate(state);
909
910 if (!propagateOnlyResult.ok()) {
911 ATH_MSG_WARNING("Failed to extrapolate track: " << propagateOnlyResult.error().message());
912 return propagateOnlyResult.error();
913 }
914
915 auto propagateResult = propagator.makeResult(
916 std::move(state), propagateOnlyResult, options, true, &referenceSurface);
917
918 if (!propagateResult.ok()) {
919 ATH_MSG_WARNING("Failed to extrapolate track: " << propagateResult.error().message());
920 return propagateResult.error();
921 }
922
923 track.setReferenceSurface(referenceSurface.getSharedPtr());
924 track.parameters() = propagateResult->endParameters.value().parameters();
925 track.covariance() =
926 propagateResult->endParameters.value().covariance().value();
927
928 return Acts::Result<void>::success();
929 }
std::array< unsigned int, 4 > ExpectedLayerPattern
const Acts::Logger & logger() const
Private access to the logger.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ finalize()

StatusCode ActsTrk::TrackFindingAlg::finalize ( )
overridevirtual

Reimplemented from ActsTrk::TrackFindingBaseAlg.

Definition at line 136 of file TrackFindingAlg.cxx.

136 {
138 return StatusCode::SUCCESS;
139 }
virtual StatusCode finalize() override

◆ findTracks()

StatusCode ActsTrk::TrackFindingAlg::findTracks ( const EventContext & ctx,
const DetectorContextHolder & detContext,
const detail::TrackFindingMeasurements & measurements,
const detail::MeasurementIndex & measurementIndex,
detail::SharedHitCounter & sharedHits,
detail::DuplicateSeedDetector & duplicateSeedDetector,
const ActsTrk::SeedContainer & seeds,
const InDetDD::SiDetectorElementCollection & detElements,
detail::RecoTrackContainer & actsTracksContainer,
std::size_t seedCollectionIndex,
const char * seedType,
EventStats & event_stat,
std::vector< int > * destiny,
const Acts::PerigeeSurface & pSurface,
std::optional< std::vector< unsigned int > > & trackCategories ) const
private

invoke track finding procedure

Parameters
ctx- event context
detectorElementToGeoId- map Trk detector element to Acts Geometry id
measurements- measurements container used in MeasurementSelector
sharedHits- measurements container used for shared hit counting
duplicateSeedDetector- duplicate seed detector
seeds- spacepoint triplet seeds
detElements- Trk detector elements
actsTracksContainer- output tracks
seedCollectionIndex- index of this collection of seeds
seedType- name of type of seeds (strip or pixel) - only used for messages
event_stat- stats, just for this event

Definition at line 425 of file TrackFindingAlg.cxx.

440 {
441 ATH_MSG_DEBUG(name() << "::" << __FUNCTION__);
442
443 auto [options, secondOptions, measurementSelector] = getDefaultOptions(ctx, detContext, measurements, &pSurface);
444
445 // ActsTrk::MutableTrackContainer tracksContainerTemp;
446 Acts::VectorTrackContainer trackBackend;
447 Acts::VectorMultiTrajectory trackStateBackend;
448 detail::RecoTrackContainer tracksContainerTemp(trackBackend, trackStateBackend);
449
450 if (m_addCounts) {
451 addCounts(tracksContainerTemp);
452 }
453
454 detail::ExpectedLayerPatternHelper::add(tracksContainerTemp);
455
456 std::size_t category_i = 0;
457 const auto &trackSelectorCfg = trackFinder().trackSelector.config();
458 auto stopBranchProxy = [&](const detail::RecoTrackContainer::TrackProxy &track,
459 const detail::RecoTrackContainer::TrackStateProxy &trackState) -> BranchStopperResult {
460 return stopBranch(track, trackState, trackSelectorCfg, detContext.geometry, measurementIndex, typeIndex, event_stat[category_i]);
461 };
462 options.extensions.branchStopper.connect(stopBranchProxy);
463
464 Acts::PropagatorOptions<detail::Stepper::Options, detail::Navigator::Options,
465 Acts::ActorList<Acts::MaterialInteractor>>
466 extrapolationOptions(detContext.geometry, detContext.magField);
467
468 Acts::TrackExtrapolationStrategy extrapolationStrategy =
469 Acts::TrackExtrapolationStrategy::first;
470
471 // Perform the track finding for all initial parameters
472 ATH_MSG_DEBUG("Invoke track finding with " << seeds.size() << ' ' << seedType << " seeds.");
473
474
475 std::size_t nPrinted = 0;
476
477 // Function for Estimate Track Parameters
478 auto retrieveSurfaceFunction =
479 [this, &detElements] (const ActsTrk::Seed& seed, bool useTopSp) -> const Acts::Surface& {
480 const xAOD::SpacePoint* sp = useTopSp ? seed.sp().back() : seed.sp().front();
481 const InDetDD::SiDetectorElement* element = detElements.getDetectorElement(useTopSp ? sp->elementIdList().back()
482 : sp->elementIdList().front());
483 const Trk::Surface& atlas_surface = element->surface();
484 return *m_ATLASConverterTool->trkSurfaceToActsSurface(atlas_surface);
485 };
486
487
488
489 // Loop over the track finding results for all initial parameters
490 for (unsigned int iseed = 0; iseed < seeds.size(); ++iseed)
491 {
492 // Get the seed
493 const ActsTrk::Seed seed = seeds[iseed];
494
495 category_i = typeIndex * (m_statEtaBins.size() + 1);
496 tracksContainerTemp.clear();
497
498 const bool reverseSearch = m_autoReverseSearch && shouldReverseSearch(seed);
499 const bool refitSeeds = typeIndex < m_refitSeeds.size() && m_refitSeeds[typeIndex];
500 const bool useTopSp = reverseSearch && !refitSeeds;
501
502 // Check if the seed is a duplicate seed
503 const bool isDupSeed = duplicateSeedDetector.isDuplicate(typeIndex, iseed);
504
505 if (isDupSeed) {
506 ATH_MSG_DEBUG("skip " << seedType << " seed " << iseed << " - already found");
507 category_i = getSeedCategory(typeIndex, seed, useTopSp);
508 ++event_stat[category_i][kNTotalSeeds];
509 ++event_stat[category_i][kNDuplicateSeeds];
510 if (m_storeDestinies) destiny->at(iseed) = DestinyType::DUPLICATE;
511 if (!m_trackStatePrinter.isSet()) continue; // delay continue to estimate track parms for TrackStatePrinter?
512 }
513
514 // Set the option accordingly - we change the direction and the target surface accordingly
515 options.propagatorPlainOptions.direction = reverseSearch ? Acts::Direction::Backward() : Acts::Direction::Forward();
516 secondOptions.propagatorPlainOptions.direction = options.propagatorPlainOptions.direction.invert();
517 options.targetSurface = reverseSearch ? &pSurface : nullptr;
518 secondOptions.targetSurface = reverseSearch ? nullptr : &pSurface;
519 // TODO since the second pass is strictly an extension we should have a separate branch stopper which never drops and always extrapolates to the target surface
520
521 // Get first estimate of parameters from the seed
522 std::optional<Acts::BoundTrackParameters> optTrackParams =
523 m_paramEstimationTool->estimateTrackParameters(seed,
524 useTopSp,
525 detContext.geometry,
526 detContext.magField,
527 retrieveSurfaceFunction);
528
529 if (!optTrackParams) {
530 ATH_MSG_DEBUG("Failed to estimate track parameters for seed " << iseed);
531 if (!isDupSeed) {
532 category_i = getSeedCategory(typeIndex, seed, useTopSp);
533 ++event_stat[category_i][kNTotalSeeds];
534 ++event_stat[category_i][kNNoEstimatedParams];
535 if (m_storeDestinies) destiny->at(iseed) = DestinyType::FAILURE;
536 }
537 continue;
538 }
539
540 Acts::BoundTrackParameters *initialParameters = &(*optTrackParams);
541 printSeed(iseed, detContext, seeds, *initialParameters, measurementIndex, nPrinted, seedType);
542 if (isDupSeed) continue; // skip now if not done before
543
544 double etaInitial = -std::log(std::tan(0.5 * initialParameters->theta()));
545 category_i = getStatCategory(typeIndex, etaInitial);
546 ++event_stat[category_i][kNTotalSeeds]; // also updated for duplicate seeds
547 ++event_stat[category_i][kNUsedSeeds];
548
549 // Optional refit track parameters to get more refined value
550 std::unique_ptr<Acts::BoundTrackParameters> refitSeedParameters;
551 if (refitSeeds) {
552 refitSeedParameters = doRefit(seed, *initialParameters, detContext, reverseSearch);
553 if (refitSeedParameters.get() == nullptr) {
554 ++event_stat[category_i][kNRejectedRefinedSeeds];
555 if (m_storeDestinies) destiny->at(iseed) = DestinyType::FAILURE;
556 continue;
557 }
558 if (refitSeedParameters.get() != initialParameters) {
559 initialParameters = refitSeedParameters.get();
560 printSeed(iseed, detContext, seeds, *initialParameters, measurementIndex, nPrinted, seedType, true);
561 }
562 }
563
564 auto measurementRangesForced =
565 m_forceTrackOnSeed ? measurements.createMeasurementRangesForced(seed, measurementIndex)
566 : std::unique_ptr<ActsTrk::detail::MeasurementRangeListFlat>();
567 measurementSelector->setMeasurementRangesForced(measurementRangesForced.get());
568 if (measurementRangesForced)
569 event_stat[category_i][kNForcedSeedMeasurements] += measurementRangesForced->size();
570
571 // Get the Acts tracks, given this seed
572 Acts::Result<std::vector<TrkProxy> > result =
573 trackFinder().ckf.findTracks(*initialParameters, options, tracksContainerTemp);
574
575 // The result for this seed
576 if (not result.ok()) {
577 ATH_MSG_WARNING("Track finding failed for " << seedType << " seed " << iseed << " with error" << result.error());
578 if (m_storeDestinies) destiny->at(iseed) = DestinyType::FAILURE;
579 continue;
580 }
581 auto &tracksForSeed = result.value();
582
583
584
585 std::size_t ntracks = 0ul;
586
587 // loop on the tracks we have just found from the seed
588 std::size_t nfirst = 0;
589 for (TrkProxy &firstTrack : tracksForSeed) {
590 // smoothing
591 auto smoothingResult = Acts::smoothTrack(detContext.geometry, firstTrack, logger(), Acts::MbfSmoother());
592 if (!smoothingResult.ok()) {
593 ATH_MSG_DEBUG("Smoothing for seed "
594 << iseed << " and first track " << firstTrack.index()
595 << " failed with error " << smoothingResult.error());
596 continue;
597 }
598
599 // if no two way, just add the track and move on
600 if (not m_doTwoWay) {
601 // add the track to the collection
602 ATH_CHECK( addTrack(detContext,
603 firstTrack,
604 pSurface,
605 extrapolationStrategy,
606 sharedHits,
607 actsTracksContainer,
608 measurementIndex,
609 tracksContainerTemp,
610 duplicateSeedDetector,
611 destiny,
612 event_stat,
613 ntracks,
614 iseed,
615 category_i,
616 seedType,
617 trackCategories) );
618 ++nfirst;
619 continue;
620 }
621
622 // TWO WAY STARTS HERE
623 // We need the first measurement of the track
624 std::optional<detail::RecoTrackStateContainerProxy> firstMeas = getFirstMeasurementFromTrack(firstTrack);
625 // we are supposed to find a measurement
626 if (not firstMeas.has_value()) {
627 ATH_MSG_ERROR("Could not retrieve first measurement from track proxy. Is it ill-formed?");
628 return StatusCode::FAILURE;
629 }
630 detail::RecoTrackStateContainerProxy& firstMeasurement = firstMeas.value();
631
632 // Get the tracks from the second track finding
633 std::vector<typename detail::RecoTrackContainer::TrackProxy> secondTracksForSeed =
634 doTwoWayTrackFinding(firstMeasurement,
635 firstTrack,
636 tracksContainerTemp,
637 secondOptions);
638
639 if ( secondTracksForSeed.empty() ) {
640 ATH_MSG_DEBUG("No viable result from second track finding for " << seedType << " seed " << iseed << " track " << nfirst);
641 ++event_stat[category_i][kNoSecond];
642 ATH_CHECK( addTrack(detContext,
643 firstTrack,
644 pSurface,
645 extrapolationStrategy,
646 sharedHits,
647 actsTracksContainer,
648 measurementIndex,
649 tracksContainerTemp,
650 duplicateSeedDetector,
651 destiny,
652 event_stat,
653 ntracks,
654 iseed,
655 category_i,
656 seedType,
657 trackCategories) );
658 }
659
660 // need to add tracks here
661 // do the stiching
662 // store the original previous state to restore it later
663 auto originalFirstMeasurementPrevious = firstMeasurement.previous();
664 for (auto &secondTrack : secondTracksForSeed) {
665 secondTrack.reverseTrackStates(true);
666
667 firstMeasurement.previous() = secondTrack.outermostTrackState().index();
668 secondTrack.tipIndex() = firstTrack.tipIndex();
669
670 if (reverseSearch) {
671 // smooth the full track
672 auto secondSmoothingResult = Acts::smoothTrack(detContext.geometry,
673 secondTrack,
674 logger());
675 if ( not secondSmoothingResult.ok() ) {
676 continue;
677 }
678 secondTrack.reverseTrackStates(true);
679 }
680
681 // Add track to collection
682 ATH_CHECK( addTrack(detContext,
683 secondTrack,
684 pSurface,
685 extrapolationStrategy,
686 sharedHits,
687 actsTracksContainer,
688 measurementIndex,
689 tracksContainerTemp,
690 duplicateSeedDetector,
691 destiny,
692 event_stat,
693 ntracks,
694 iseed,
695 category_i,
696 seedType,
697 trackCategories) );
698 } // loop on tracks
699
700 // finish the stiching
701 // restore the original previous state for the first track
702 firstMeasurement.previous() = originalFirstMeasurementPrevious;
703
704 nfirst++;
705 } // loop on tracks from seed
706
707 if (m_storeDestinies) {
708 if (ntracks == 0) {
709 destiny->at(iseed) = DestinyType::FAILURE;
710 } else {
711 destiny->at(iseed) = DestinyType::SUCCEED;
712 }
713 }
714
715 if (ntracks == 0) {
716 ATH_MSG_DEBUG("Track finding found no track candidates for " << seedType << " seed " << iseed);
717 ++event_stat[category_i][kNoTrack];
718 } else if (ntracks >= 2) {
719 ++event_stat[category_i][kMultipleBranches];
720 }
721
722 if (m_trackStatePrinter.isSet())
723 std::cout << std::flush;
724 } // loop on seeds
725
726 ATH_MSG_DEBUG("Completed " << seedType << " track finding with " << computeStatSum(typeIndex, kNOutputTracks, event_stat) << " track candidates.");
727
728 return StatusCode::SUCCESS;
729 }
static Double_t sp
if(pathvar)
std::size_t getSeedCategory(std::size_t typeIndex, const ActsTrk::Seed &seed, bool useTopSp) const
void printSeed(unsigned int iseed, const DetectorContextHolder &detContext, const ActsTrk::SeedContainer &seeds, const Acts::BoundTrackParameters &seedParameters, const detail::MeasurementIndex &measurementIndex, std::size_t &nPrinted, const char *seedType, bool isKF=false) const
Gaudi::Property< std::vector< bool > > m_refitSeeds
Gaudi::Property< bool > m_autoReverseSearch
StatusCode addTrack(const DetectorContextHolder &detContext, detail::RecoTrackContainerProxy &track, const Acts::Surface &pSurface, const Acts::TrackExtrapolationStrategy &extrapolationStrategy, detail::SharedHitCounter &sharedHits, detail::RecoTrackContainer &actsTracksContainer, const detail::MeasurementIndex &measurementIndex, const detail::RecoTrackContainer &tracksContainerTemp, detail::DuplicateSeedDetector &duplicateSeedDetector, std::vector< int > *destiny, EventStats &event_stat, std::size_t &ntracks, std::size_t iseed, std::size_t category_i, const char *seedType, std::optional< std::vector< unsigned int > > &trackCategories) const
bool shouldReverseSearch(const ActsTrk::Seed &seed) const
Gaudi::Property< std::vector< float > > m_statEtaBins
detail::RecoTrackContainer::TrackProxy TrkProxy
std::size_t getStatCategory(std::size_t seed_collection, float eta) const
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.
std::size_t computeStatSum(std::size_t seed_collection, EStat counter_i, const EventStats &stat) const
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.
std::unique_ptr< Acts::BoundTrackParameters > doRefit(const MeasurementSource &measurement, const Acts::BoundTrackParameters &initialParameters, const DetectorContextHolder &detContext, const bool paramsAtOutermostSurface) const
Perform Kalman Filter fit and update given initialParameters.
PublicToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
Acts::CombinatorialKalmanFilterBranchStopperResult BranchStopperResult
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Trk::Surface & surface()
Element Surface.
RecoTrackStateContainer::TrackStateProxy RecoTrackStateContainerProxy
unsigned long ul
std::size_t size() const noexcept

◆ 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 232 of file TrackFindingBaseAlg.cxx.

232 {
233 const auto &trackSelectorCfg = trackFinder().trackSelector.config();
234 // return the last bin for |eta|>=4 or nan
235 return (!(std::abs(eta) < trackSelectorCfg.absEtaEdges.back())) ? trackSelectorCfg.cutSets.back()
236 : (std::abs(eta) < trackSelectorCfg.absEtaEdges.front()) ? trackSelectorCfg.cutSets.front()
237 : trackSelectorCfg.getCuts(eta);
238 };
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 204 of file TrackFindingBaseAlg.cxx.

208 {
209 Acts::PropagatorPlainOptions plainOptions{detContext.geometry, detContext.magField};
210 plainOptions.maxSteps = m_maxPropagationStep;
211 plainOptions.direction = Acts::Direction::Forward();
212 plainOptions.endOfWorldVolumeIds = m_endOfWorldVolumeIds;
213
214 // Set the CombinatorialKalmanFilter options
215 TrackFinderOptions options(detContext.geometry, detContext.magField, detContext.calib,
216 trackFinder().ckfExtensions, plainOptions, pSurface);
217
218 std::unique_ptr<ActsTrk::IMeasurementSelector> measurementSelector = setMeasurementSelector(ctx, measurements, options);
219
220 Acts::PropagatorPlainOptions plainSecondOptions{detContext.geometry, detContext.magField};
221 plainSecondOptions.maxSteps = m_maxPropagationStep;
222 plainSecondOptions.direction = plainOptions.direction.invert();
223
224 TrackFinderOptions secondOptions(detContext.geometry, detContext.magField, detContext.calib,
225 options.extensions, plainSecondOptions, pSurface);
226 secondOptions.targetSurface = pSurface;
227 secondOptions.skipPrePropagationUpdate = true;
228
229 return {std::move(options), std::move(secondOptions), std::move(measurementSelector)};
230 };
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.

◆ getSeedCategory()

std::size_t ActsTrk::TrackFindingAlg::getSeedCategory ( std::size_t typeIndex,
const ActsTrk::Seed & seed,
bool useTopSp ) const
private

Definition at line 811 of file TrackFindingAlg.cxx.

814 {
815 const xAOD::SpacePoint* sp = useTopSp ? seed.sp().back() : seed.sp().front();
816 const xAOD::SpacePoint::ConstVectorMap pos = sp->globalPosition();
817 double etaSeed = std::atanh(pos[2] / pos.norm());
818 return getStatCategory(typeIndex, etaSeed);
819 }
Eigen::Map< const Eigen::Matrix< float, 3, 1 > > ConstVectorMap

◆ getStatCategory()

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

Definition at line 765 of file TrackFindingBaseAlg.cxx.

765 {
766 std::vector<float>::const_iterator bin_iter = std::upper_bound(m_statEtaBins.begin(),
767 m_statEtaBins.end(),
768 m_useAbsEtaForStat ? std::abs(eta) : eta);
769 std::size_t category_i = seed_collection * seedCollectionStride() + static_cast<std::size_t>(bin_iter - m_statEtaBins.begin());
770 assert(category_i < m_stat.size());
771 return category_i;
772 }

◆ initCounts()

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

Definition at line 422 of file TrackFindingBaseAlg.cxx.

423 {
424 s_branchState.nPixelHits(track) = 0;
425 s_branchState.nStripHits(track) = 0;
426 s_branchState.nHgtdHits(track) = 0;
427 s_branchState.nPixelHoles(track) = 0;
428 s_branchState.nStripHoles(track) = 0;
429 s_branchState.nHgtdHoles(track) = 0;
430 s_branchState.nPixelOutliers(track) = 0;
431 s_branchState.nStripOutliers(track) = 0;
432 s_branchState.nHgtdOutliers(track) = 0;
433 }

◆ initialize()

StatusCode ActsTrk::TrackFindingAlg::initialize ( )
overridevirtual

Reimplemented from ActsTrk::TrackFindingBaseAlg.

Definition at line 68 of file TrackFindingAlg.cxx.

69 {
70 ATH_MSG_INFO("Initializing " << name() << " ... ");
71
84
86 ATH_CHECK(m_seedContainerKeys.initialize());
87 ATH_CHECK(m_detEleCollKeys.initialize());
90 ATH_CHECK(m_detElStatus.initialize());
91 ATH_CHECK(m_beamSpotKey.initialize());
92
93 m_storeDestinies = not m_seedDestiny.empty();
95
96 if (m_seedContainerKeys.size() != m_detEleCollKeys.size())
97 {
98 ATH_MSG_FATAL("There are " << m_detEleCollKeys.size() << " DetectorElementsKeys, but " << m_seedContainerKeys.size() << " SeedContainerKeys");
99 return StatusCode::FAILURE;
100 }
101
102 if (m_detEleCollKeys.size() != m_seedLabels.size())
103 {
104 ATH_MSG_FATAL("There are " << m_seedLabels.size() << " SeedLabels, but " << m_detEleCollKeys.size() << " DetectorElementsKeys");
105 return StatusCode::FAILURE;
106 }
107
108 if (m_useTopSpRZboundary.size() != 2)
109 {
110 ATH_MSG_FATAL("useTopSpRZboundary must have 2 elements, but has " << m_useTopSpRZboundary.size());
111 return StatusCode::FAILURE;
112 }
113
114 if (m_ambiStrategy != 0u /* OUTSIDE_TF */) m_showResolvedStats = true;
115 if (m_ambiStrategy == 1u /* END_OF_TF */) {
116 Acts::GreedyAmbiguityResolution::Config cfg;
117 cfg.maximumSharedHits = m_maximumSharedHits;
118 cfg.maximumIterations = m_maximumIterations;
119 cfg.nMeasurementsMin = m_nMeasurementsMin;
120
121 m_ambi.emplace(std::move(cfg), makeActsAthenaLogger(this, "Acts"));
122 }
123
124 if (m_storeDestinies) {
125 if (m_seedDestiny.size() != m_seedContainerKeys.size()) {
126 ATH_MSG_ERROR("There are " << m_seedDestiny.size() << " seed destiny collections, but " << m_seedContainerKeys.size() << " seed collections");
127 return StatusCode::FAILURE;
128 }
129 }
130
131 return StatusCode::SUCCESS;
132 }
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Gaudi::Property< unsigned int > m_nMeasurementsMin
Gaudi::Property< std::vector< double > > m_useTopSpRZboundary
Gaudi::Property< unsigned int > m_maximumIterations
Gaudi::Property< bool > m_dumpAllStatEtaBins
virtual StatusCode initialize() override

◆ initializeMeasurementSelector()

StatusCode ActsTrk::TrackFindingBaseAlg::initializeMeasurementSelector ( )
protectedinherited

Definition at line 514 of file TrackFindingBaseAlg.cxx.

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

543 {
544 if (!m_statEtaBins.empty())
545 {
547 float last_eta = m_statEtaBins[0];
548 for (float eta : m_statEtaBins)
549 {
550 if (eta < last_eta)
551 {
552 ATH_MSG_FATAL("Eta bins for statistics counter not in ascending order.");
553 }
554 last_eta = eta;
555 }
556 }
557 m_stat.resize(nSeedCollections() * seedCollectionStride());
558 }

◆ 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()

◆ 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 286 of file TrackFindingBaseAlg.cxx.

286 {
287 if (trackState.hasReferenceSurface()) {
288 if (const auto *actsDetElem = dynamic_cast<const IDetectorElementBase *>(trackState.referenceSurface().surfacePlacement())) {
289 switch (actsDetElem->detectorType()) {
296 default:
297 break;
298 }
299 }
300 }
302 }
@ 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 }

◆ 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.

◆ printSeed()

void ActsTrk::TrackFindingAlg::printSeed ( unsigned int iseed,
const DetectorContextHolder & detContext,
const ActsTrk::SeedContainer & seeds,
const Acts::BoundTrackParameters & seedParameters,
const detail::MeasurementIndex & measurementIndex,
std::size_t & nPrinted,
const char * seedType,
bool isKF = false ) const
private

Definition at line 821 of file TrackFindingAlg.cxx.

829 {
830 if (not m_trackStatePrinter.isSet()) return;
831
832 if (nPrinted == 0) {
833 ATH_MSG_INFO("CKF results for " << seeds.size() << ' ' << seedType << " seeds:");
834 }
835 ++nPrinted;
836 m_trackStatePrinter->printSeed(detContext.geometry, seeds[iseed], seedParameters, measurementIndex, iseed, isKF);
837 }

◆ printStatTables()

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

Definition at line 576 of file TrackFindingBaseAlg.cxx.

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

◆ propagateDetectorElementStatusToMeasurements()

StatusCode ActsTrk::TrackFindingAlg::propagateDetectorElementStatusToMeasurements ( const ActsTrk::ActsVolumeIdToDetectorElementCollectionMap & volume_id_to_det_el_coll,
const std::vector< const InDet::SiDetectorElementStatus * > & det_el_status_arr,
detail::TrackFindingMeasurements & measurements ) const
private

Definition at line 754 of file TrackFindingAlg.cxx.

756 {
757 const Acts::TrackingGeometry *
758 acts_tracking_geometry = m_trackingGeometryTool->trackingGeometry().get();
759 ATH_CHECK(acts_tracking_geometry != nullptr);
760
761 using Counter = struct { unsigned int n_volumes, n_volumes_with_status, n_missing_detector_elements, n_detector_elements, n_disabled_detector_elements;};
762 Counter counter {0u,0u,0u,0u,0u};
763 acts_tracking_geometry->visitVolumes([&counter,
764 &volume_id_to_det_el_coll,
765 &det_el_status_arr,
766 &measurements,
767 this](const Acts::TrackingVolume *volume_ptr) {
768 ++counter.n_volumes;
769 if (!volume_ptr) return;
770
771 const InDet::SiDetectorElementStatus*
772 det_el_status = det_el_status_arr.at(volume_id_to_det_el_coll.collecionMap().at(volume_ptr->geometryId().volume()));
773 if (det_el_status) {
774 ++counter.n_volumes_with_status;
775 volume_ptr->visitSurfaces([&counter, det_el_status, &measurements,this](const Acts::Surface *surface_ptr) {
776 if (!surface_ptr) return;
777 const Acts::Surface &surface = *surface_ptr;
778 const Acts::SurfacePlacementBase* detector_element = surface.surfacePlacement();
779 if (detector_element) {
780 ++counter.n_detector_elements;
781 const ActsDetectorElement *acts_detector_element = static_cast<const ActsDetectorElement*>(detector_element);
782 if (!det_el_status->isGood( acts_detector_element->identifyHash() )) {
783 ActsTrk::detail::MeasurementRange old_range = measurements.markSurfaceInsensitive(surface_ptr->geometryId());
784 if (!old_range.empty()) {
785 auto geoid_to_string = [](const Acts::GeometryIdentifier &id) -> std::string {
786 std::stringstream amsg;
787 amsg << id;
788 return amsg.str();
789 };
790 std::string a_msg ( geoid_to_string(surface_ptr->geometryId()));
791 ATH_MSG_WARNING("Reject " << (old_range.elementEndIndex() - old_range.elementBeginIndex())
792 << " measurements because surface " << a_msg);
793 }
794 ++counter.n_disabled_detector_elements;
795 }
796 }
797 }, true /*only sensitive surfaces*/);
798 }
799 else {
800 ++counter.n_missing_detector_elements;
801 }
802 });
803 ATH_MSG_DEBUG("Volumes with detector element status " << counter.n_volumes_with_status << " / " << counter.n_volumes
804 << " disabled detector elements " << counter.n_disabled_detector_elements
805 << " / " << counter.n_detector_elements
806 << " missing detector elements "
807 << counter.n_missing_detector_elements);
808 return StatusCode::SUCCESS;
809 }
IdentifierHash identifyHash() const
Identifier hash.
bool isGood(IdentifierHash hash) const

◆ 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 488 of file TrackFindingBaseAlg.cxx.

488 {
489 bool enoughMeasurements = true, tooManyHoles = false, tooManyOutliers = false;
490 const auto &trackSelectorCfg = trackFinder().trackSelector.config();
491 std::size_t etaBin = (std::abs(eta) < trackSelectorCfg.absEtaEdges.front()) ? 0
492 : (std::abs(eta) >= trackSelectorCfg.absEtaEdges.back()) ? trackSelectorCfg.absEtaEdges.size() - 1
493 : trackSelectorCfg.binIndex(eta);
494 auto cutMin = [etaBin](std::size_t val, const std::vector<std::size_t> &cutSet) {
495 return !cutSet.empty() && (val < (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
496 };
497 auto cutMax = [etaBin](std::size_t val, const std::vector<std::size_t> &cutSet) {
498 return !cutSet.empty() && (val > (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
499 };
500
501 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nPixelHits(track), m_minPixelHits);
502 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nStripHits(track), m_minStripHits);
503 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nHgtdHits(track), m_minHgtdHits);
504 tooManyHoles = tooManyHoles || cutMax(s_branchState.nPixelHoles(track), m_maxPixelHoles);
505 tooManyHoles = tooManyHoles || cutMax(s_branchState.nStripHoles(track), m_maxStripHoles);
506 tooManyHoles = tooManyHoles || cutMax(s_branchState.nHgtdHoles(track), m_maxHgtdHoles);
507 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nPixelOutliers(track), m_maxPixelOutliers);
508 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nStripOutliers(track), m_maxStripOutliers);
509 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nHgtdOutliers(track), m_maxHgtdOutliers);
510
511 return {enoughMeasurements, tooManyHoles, tooManyOutliers};
512 }
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 786 of file TrackFindingBaseAlg.cxx.

786 {
787 if (not m_addCounts) return true;
788 double eta = -std::log(std::tan(0.5 * track.theta()));
789 auto [enoughMeasurementsPS, tooManyHolesPS, tooManyOutliersPS] = selectCounts(track, eta);
790 return enoughMeasurementsPS && !tooManyHolesPS && !tooManyOutliersPS;
791 }
std::array< bool, 3 > selectCounts(const detail::RecoTrackContainer::TrackProxy &track, double eta) const

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ 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 183 of file TrackFindingBaseAlg.cxx.

186 {
187
188 std::unique_ptr<ActsTrk::IMeasurementSelector> measurementSelector = ActsTrk::detail::getMeasurementSelector(
189 ctx,
190 m_pixelCalibTool.isEnabled() ? &(*m_pixelCalibTool) : nullptr,
191 m_stripCalibTool.isEnabled() ? &(*m_stripCalibTool) : nullptr,
192 m_hgtdCalibTool.isEnabled() ? &(*m_hgtdCalibTool) : nullptr,
193 measurements.measurementRanges(),
195 m_measurementSelectorConfig.m_chi2CutOffOutlier,
197 m_edgeHoleBorderWidth.value());
198
199 measurementSelector->connect(&options.extensions.createTrackStates);
200
201 return measurementSelector;
202 }
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::IPixelOnBoundStateCalibratorTool *pixelOnTrackCalibratorTool, const ActsTrk::IStripOnBoundStateCalibratorTool *stripOnTrackCalibratorTool, const ActsTrk::IHGTDOnBoundStateCalibratorTool *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)

◆ shouldReverseSearch()

bool ActsTrk::TrackFindingAlg::shouldReverseSearch ( const ActsTrk::Seed & seed) const
private

Definition at line 410 of file TrackFindingAlg.cxx.

410 {
411 const xAOD::SpacePoint* bottom_sp = seed.sp().front();
412
413 const double r = bottom_sp->radius();
414 const double z = std::abs(bottom_sp->z());
415
416 const double rBoundary = m_useTopSpRZboundary.value()[0];
417 const double zBoundary = m_useTopSpRZboundary.value()[1];
418
419 return r > rBoundary || z > zBoundary;
420 }
#define z
float z() const
float radius() const
int r
Definition globals.cxx:22

◆ 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 304 of file TrackFindingBaseAlg.cxx.

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

◆ storeSeedInfo()

void ActsTrk::TrackFindingAlg::storeSeedInfo ( const detail::RecoTrackContainer & tracksContainer,
const detail::RecoTrackContainerProxy & track,
detail::DuplicateSeedDetector & duplicateSeedDetector,
const detail::MeasurementIndex & measurementIndex ) const
private

Definition at line 732 of file TrackFindingAlg.cxx.

735 {
736
737 const auto lastMeasurementIndex = track.tipIndex();
738 duplicateSeedDetector.newTrajectory();
739
740 tracksContainer.trackStateContainer().visitBackwards(
741 lastMeasurementIndex,
742 [&duplicateSeedDetector,&measurementIndex](const detail::RecoTrackStateContainer::ConstTrackStateProxy &state) -> void
743 {
744 // Check there is a source link
745 if (not state.hasUncalibratedSourceLink())
746 return;
747
748 // Fill the duplicate selector
749 auto sl = detail::xAODUncalibMeasCalibrator::unpack(state.getUncalibratedSourceLink());;
750 duplicateSeedDetector.addMeasurement(sl, measurementIndex);
751 }); // end visitBackwards
752 }
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.

◆ storeTrackCollectionToStoreGate()

StatusCode ActsTrk::TrackFindingAlg::storeTrackCollectionToStoreGate ( const EventContext & ctx,
Acts::VectorTrackContainer && originalTrackBackend,
Acts::VectorMultiTrajectory && originalTrackStateBackend ) const
private

Definition at line 394 of file TrackFindingAlg.cxx.

397 {
398 // convert to const
399 Acts::ConstVectorTrackContainer constTrackBackend( std::move(originalTrackBackend) );
400 Acts::ConstVectorMultiTrajectory constTrackStateBackend( std::move(originalTrackStateBackend) );
401 std::unique_ptr< ActsTrk::TrackContainer> constTracksContainer = std::make_unique< ActsTrk::TrackContainer >( std::move(constTrackBackend),
402 std::move(constTrackStateBackend) );
403
404 SG::WriteHandle<ActsTrk::TrackContainer> trackContainerHandle = SG::makeHandle(m_trackContainerKey, ctx);
405 ATH_MSG_DEBUG(" \\__ Tracks Container `" << m_trackContainerKey.key() << "` created ...");
406 ATH_CHECK(trackContainerHandle.record(std::move(constTracksContainer)));
407 return StatusCode::SUCCESS;
408 }
SG::WriteHandleKey< ActsTrk::TrackContainer > m_trackContainerKey

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

75{
76 return BaseAlg::sysExecute (ctx);
77}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

105 {
107
108 if (sc.isFailure()) {
109 return sc;
110 }
111
112 ServiceHandle<ICondSvc> cs("CondSvc",name());
113 for (auto h : outputHandles()) {
114 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
115 // do this inside the loop so we don't create the CondSvc until needed
116 if ( cs.retrieve().isFailure() ) {
117 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
118 return StatusCode::SUCCESS;
119 }
120 if (cs->regHandle(this,*h).isFailure()) {
122 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
123 << " with CondSvc");
124 }
125 }
126 }
127 return sc;
128}
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 19 of file TrackFindingBaseAlg.cxx.

19{ 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 20 of file TrackFindingBaseAlg.cxx.

20{ return *m_trackFinder; }

◆ updateCounts()

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

Definition at line 435 of file TrackFindingBaseAlg.cxx.

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

◆ 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/3]

std::mutex m_mutex ActsTrk::TrackFindingAlg::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 197 of file TrackFindingAlg.h.

197{};

◆ ATLAS_THREAD_SAFE [2/3]

std::size_t m_nTrackStateReserve ActsTrk::TrackFindingAlg::ATLAS_THREAD_SAFE {0ul}
mutableprivate

Definition at line 196 of file TrackFindingAlg.h.

196{0ul};

◆ ATLAS_THREAD_SAFE [3/3]

std::size_t m_nTrackReserve ActsTrk::TrackFindingAlg::ATLAS_THREAD_SAFE {0ul}
mutableprivate

Definition at line 195 of file TrackFindingAlg.h.

195{0ul};

◆ m_absEtaMax

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

Definition at line 128 of file TrackFindingBaseAlg.h.

128{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 111 of file TrackFindingBaseAlg.h.

111{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 127 of file TrackFindingBaseAlg.h.

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

◆ 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 142 of file TrackFindingBaseAlg.h.

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

◆ m_ambi

std::optional<Acts::GreedyAmbiguityResolution> ActsTrk::TrackFindingAlg::m_ambi
private

Definition at line 141 of file TrackFindingAlg.h.

◆ m_ambiStrategy

Gaudi::Property<std::size_t> ActsTrk::TrackFindingAlg::m_ambiStrategy {this, "ambiStrategy", 0, "0 - Do ambiguity resolution outside track finding; 1 - Do ambiguity in track finding using GreedyAmbiguitySolver tool; 2 - Do shared hit cut during track candidate selection"}
private

Definition at line 132 of file TrackFindingAlg.h.

132{this, "ambiStrategy", 0, "0 - Do ambiguity resolution outside track finding; 1 - Do ambiguity in track finding using GreedyAmbiguitySolver tool; 2 - Do shared hit cut during track candidate selection"};

◆ m_ATLASConverterTool

PublicToolHandle<ActsTrk::IActsToTrkConverterTool> ActsTrk::TrackFindingBaseAlg::m_ATLASConverterTool {this, "ATLASConverterTool", ""}
protectedinherited

Definition at line 93 of file TrackFindingBaseAlg.h.

93{this, "ATLASConverterTool", ""};

◆ m_autoReverseSearch

Gaudi::Property<bool> ActsTrk::TrackFindingAlg::m_autoReverseSearch {this, "autoReverseSearch", false, "Whether to run the finding in seed parameter direction (false or not specified) or reverse direction (true), automatically determined by the param estimation tool"}
private

Definition at line 120 of file TrackFindingAlg.h.

120{this, "autoReverseSearch", false, "Whether to run the finding in seed parameter direction (false or not specified) or reverse direction (true), automatically determined by the param estimation tool"};

◆ m_beamSpotKey

SG::ReadCondHandleKey< InDet::BeamSpotData > ActsTrk::TrackFindingAlg::m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
private

Definition at line 113 of file TrackFindingAlg.h.

113{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};

◆ 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 117 of file TrackFindingBaseAlg.h.

117{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 119 of file TrackFindingBaseAlg.h.

119{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 118 of file TrackFindingBaseAlg.h.

118{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 116 of file TrackFindingBaseAlg.h.

116{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 143 of file TrackFindingBaseAlg.h.

143{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 106 of file TrackFindingBaseAlg.h.

106{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 107 of file TrackFindingBaseAlg.h.

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

◆ m_countSharedHits

Gaudi::Property<bool> ActsTrk::TrackFindingAlg::m_countSharedHits {this, "countSharedHits", true, "add shared hit flags to tracks"}
private

Definition at line 121 of file TrackFindingAlg.h.

121{this, "countSharedHits", true, "add shared hit flags to tracks"};

◆ m_d0Max

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

Definition at line 132 of file TrackFindingBaseAlg.h.

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

◆ m_d0Min

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

Definition at line 131 of file TrackFindingBaseAlg.h.

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

◆ m_detEleCollKeys

SG::ReadCondHandleKeyArray<InDetDD::SiDetectorElementCollection> ActsTrk::TrackFindingAlg::m_detEleCollKeys {this, "DetectorElementsKeys", {}, "Keys of input SiDetectorElementCollection"}
private

Definition at line 101 of file TrackFindingAlg.h.

101{this, "DetectorElementsKeys", {}, "Keys of input SiDetectorElementCollection"};

◆ m_detElStatus

SG::ReadHandleKeyArray<InDet::SiDetectorElementStatus> ActsTrk::TrackFindingAlg::m_detElStatus {this, "DetElStatus", {}, "Keys for detector element status conditions data."}
private

Definition at line 108 of file TrackFindingAlg.h.

109{this, "DetElStatus", {}, "Keys for detector element status conditions data."};

◆ 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 112 of file TrackFindingBaseAlg.h.

112{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 113 of file TrackFindingBaseAlg.h.

113{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 159 of file TrackFindingBaseAlg.h.

159{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 109 of file TrackFindingBaseAlg.h.

109{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 154 of file TrackFindingBaseAlg.h.

154{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 104 of file TrackFindingBaseAlg.h.

104{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 126 of file TrackFindingBaseAlg.h.

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

◆ m_etaMin

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

Definition at line 125 of file TrackFindingBaseAlg.h.

125{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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_extrapolationTool

ToolHandle<ActsTrk::IExtrapolationTool> ActsTrk::TrackFindingBaseAlg::m_extrapolationTool {this, "ExtrapolationTool", ""}
protectedinherited

Definition at line 90 of file TrackFindingBaseAlg.h.

90{this, "ExtrapolationTool", ""};

◆ m_fitterTool

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

Definition at line 94 of file TrackFindingBaseAlg.h.

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

◆ m_forceTrackOnSeed

Gaudi::Property<bool> ActsTrk::TrackFindingAlg::m_forceTrackOnSeed {this, "forceTrackOnSeed", true, "force track to use measurements from the seed"}
private

Definition at line 122 of file TrackFindingAlg.h.

122{this, "forceTrackOnSeed", true, "force track to use measurements from the seed"};

◆ m_hgtdCalibTool

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

Definition at line 97 of file TrackFindingBaseAlg.h.

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

◆ 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 114 of file TrackFindingBaseAlg.h.

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

◆ 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 140 of file TrackFindingBaseAlg.h.

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

◆ m_maxHgtdHoles

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

Definition at line 149 of file TrackFindingBaseAlg.h.

149{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 152 of file TrackFindingBaseAlg.h.

152{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 137 of file TrackFindingBaseAlg.h.

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

◆ m_maximumIterations

Gaudi::Property<unsigned int> ActsTrk::TrackFindingAlg::m_maximumIterations {this, "MaximumIterations", 10000u, "Maximum number of iterations to resolve ambiguities among all tracks."}
private

Definition at line 128 of file TrackFindingAlg.h.

129{this, "MaximumIterations", 10000u, "Maximum number of iterations to resolve ambiguities among all tracks."};

◆ m_maximumSharedHits

Gaudi::Property<unsigned int> ActsTrk::TrackFindingAlg::m_maximumSharedHits {this, "MaximumSharedHits", 3u, "Maximum number of shared hits per track."}
private

Definition at line 126 of file TrackFindingAlg.h.

127{this, "MaximumSharedHits", 3u, "Maximum number of shared hits per track."};

◆ m_maxOutliers

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

Definition at line 138 of file TrackFindingBaseAlg.h.

138{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 147 of file TrackFindingBaseAlg.h.

147{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 150 of file TrackFindingBaseAlg.h.

150{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 103 of file TrackFindingBaseAlg.h.

103{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 139 of file TrackFindingBaseAlg.h.

139{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 148 of file TrackFindingBaseAlg.h.

148{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 151 of file TrackFindingBaseAlg.h.

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

◆ m_measurementSelectorConfig

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

◆ m_memorySafetyMargin

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

Definition at line 194 of file TrackFindingAlg.h.

194{this, "MemorySafetyMargin", 1.2};

◆ m_minHgtdHits

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

Definition at line 146 of file TrackFindingBaseAlg.h.

146{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 136 of file TrackFindingBaseAlg.h.

136{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 144 of file TrackFindingBaseAlg.h.

144{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 145 of file TrackFindingBaseAlg.h.

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

◆ m_monTool

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

Definition at line 89 of file TrackFindingBaseAlg.h.

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

◆ m_nMeasurementsMin

Gaudi::Property<unsigned int> ActsTrk::TrackFindingAlg::m_nMeasurementsMin {this, "NMeasurementsMin", 7u, "Minimum number of measurements per track."}
private

Definition at line 130 of file TrackFindingAlg.h.

131{this, "NMeasurementsMin", 7u, "Minimum number of measurements per track."};

◆ 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 108 of file TrackFindingBaseAlg.h.

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

◆ m_paramEstimationTool

ToolHandle<ActsTrk::ITrackParamsEstimationTool > ActsTrk::TrackFindingAlg::m_paramEstimationTool {this, "TrackParamsEstimationTool", "", "Track Param Estimation from Seeds"}
private

Definition at line 96 of file TrackFindingAlg.h.

96{this, "TrackParamsEstimationTool", "", "Track Param Estimation from Seeds"};

◆ m_phiMax

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

Definition at line 124 of file TrackFindingBaseAlg.h.

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

◆ m_phiMin

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

Definition at line 123 of file TrackFindingBaseAlg.h.

123{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 95 of file TrackFindingBaseAlg.h.

95{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 130 of file TrackFindingBaseAlg.h.

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

◆ m_ptMin

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

Definition at line 129 of file TrackFindingBaseAlg.h.

129{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 110 of file TrackFindingBaseAlg.h.

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

◆ m_refitSeeds

Gaudi::Property<std::vector<bool> > ActsTrk::TrackFindingAlg::m_refitSeeds {this, "refitSeeds", {}, "Run KalmanFitter on seeds before passing to CKF, specified separately for each seed collection"}
private

Definition at line 118 of file TrackFindingAlg.h.

118{this, "refitSeeds", {}, "Run KalmanFitter on seeds before passing to CKF, specified separately for each seed collection"};

◆ m_seedContainerKeys

SG::ReadHandleKeyArray<ActsTrk::SeedContainer> ActsTrk::TrackFindingAlg::m_seedContainerKeys {this, "SeedContainerKeys", {}, "Seed containers"}
private

Definition at line 100 of file TrackFindingAlg.h.

100{this, "SeedContainerKeys", {}, "Seed containers"};

◆ m_seedDestiny

SG::WriteHandleKeyArray< std::vector<int> > ActsTrk::TrackFindingAlg::m_seedDestiny {this, "SeedDestiny", {}}
private

Definition at line 112 of file TrackFindingAlg.h.

112{this, "SeedDestiny", {}};

◆ 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 158 of file TrackFindingBaseAlg.h.

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

◆ m_seedMeasOffset

Gaudi::Property<unsigned int> ActsTrk::TrackFindingAlg::m_seedMeasOffset {this,"seedMeasOffset", 0, "Reduce the requirement on the space points on seed to mark a seed as duplicate, e.g seedMeasOffset=1, only N-1 measurements on seed are sufficient deduplicate the seed"}
private

Definition at line 117 of file TrackFindingAlg.h.

117{this,"seedMeasOffset", 0, "Reduce the requirement on the space points on seed to mark a seed as duplicate, e.g seedMeasOffset=1, only N-1 measurements on seed are sufficient deduplicate the seed"};

◆ m_showResolvedStats

bool ActsTrk::TrackFindingBaseAlg::m_showResolvedStats = false
protectedinherited

Definition at line 351 of file TrackFindingBaseAlg.h.

◆ m_skipDuplicateSeeds

Gaudi::Property<bool> ActsTrk::TrackFindingAlg::m_skipDuplicateSeeds {this, "skipDuplicateSeeds", true, "skip duplicate seeds before calling CKF"}
private

Definition at line 116 of file TrackFindingAlg.h.

116{this, "skipDuplicateSeeds", true, "skip duplicate seeds before calling CKF"};

◆ 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 157 of file TrackFindingBaseAlg.h.

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

◆ m_storeDestinies

bool ActsTrk::TrackFindingAlg::m_storeDestinies {false}
private

Definition at line 111 of file TrackFindingAlg.h.

111{false};

◆ m_stripCalibTool

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

Definition at line 96 of file TrackFindingBaseAlg.h.

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

◆ m_trackContainerKey

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

Definition at line 99 of file TrackFindingBaseAlg.h.

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

◆ m_trackFinder

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

Definition at line 83 of file TrackFindingBaseAlg.h.

◆ m_trackingGeometryTool

PublicToolHandle<ActsTrk::ITrackingGeometryTool> ActsTrk::TrackFindingBaseAlg::m_trackingGeometryTool {this, "TrackingGeometryTool", ""}
protectedinherited

Definition at line 91 of file TrackFindingBaseAlg.h.

91{this, "TrackingGeometryTool", ""};

◆ m_tracksBackendHandlesHelper

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

Definition at line 100 of file TrackFindingBaseAlg.h.

100{this};

◆ m_trackStatePrinter

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

Definition at line 92 of file TrackFindingBaseAlg.h.

92{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 115 of file TrackFindingBaseAlg.h.

115{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 85 of file TrackFindingBaseAlg.h.

85{};

◆ m_uncalibratedMeasurementContainerKeys

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

Definition at line 103 of file TrackFindingAlg.h.

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

◆ m_useAbsEtaForStat

bool ActsTrk::TrackFindingBaseAlg::m_useAbsEtaForStat = false
protectedinherited

Definition at line 350 of file TrackFindingBaseAlg.h.

◆ m_useTopSpRZboundary

Gaudi::Property<std::vector<double> > ActsTrk::TrackFindingAlg::m_useTopSpRZboundary {this, "useTopSpRZboundary", {350. * Acts::UnitConstants::mm, 1060. * Acts::UnitConstants::mm}, "R/Z boundary for using the top space point in the track parameter estimation"}
private

Definition at line 119 of file TrackFindingAlg.h.

119{this, "useTopSpRZboundary", {350. * Acts::UnitConstants::mm, 1060. * Acts::UnitConstants::mm}, "R/Z boundary for using the top space point in the track parameter estimation"};

◆ 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_volumeIdToDetectorElementCollMapKey

SG::ReadCondHandleKey<ActsTrk::ActsVolumeIdToDetectorElementCollectionMap> ActsTrk::TrackFindingAlg::m_volumeIdToDetectorElementCollMapKey
private
Initial value:
{this, "ActsVolumeIdToDetectorElementCollectionMapKey", "ActsVolumeIdToDetectorElementCollectionMap",
"Map which associates Acts geometry volume IDs to detector element collections."}

Definition at line 104 of file TrackFindingAlg.h.

105 {this, "ActsVolumeIdToDetectorElementCollectionMapKey", "ActsVolumeIdToDetectorElementCollectionMap",
106 "Map which associates Acts geometry volume IDs to detector element collections."};

◆ m_z0Max

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

Definition at line 134 of file TrackFindingBaseAlg.h.

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

◆ m_z0Min

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

Definition at line 133 of file TrackFindingBaseAlg.h.

133{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: