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 detail::TrackFindingMeasurements &measurements, TrackFinderOptions &options) const
 Setup and attach measurement selector to KF options.
TrackFindingDefaultOptions getDefaultOptions (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"}
ToolHandle< ActsTrk::IActsToTrkConverterToolm_ATLASConverterTool {this, "ATLASConverterTool", ""}
ToolHandle< ActsTrk::IFitterToolm_fitterTool {this, "FitterTool", "", "Fitter Tool for Seeds"}
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool {this, "PixelCalibrator", "", "Opt. pixel measurement calibrator"}
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool {this, "StripCalibrator", "", "Opt. strip measurement calibrator"}
ToolHandle< ActsTrk::IOnTrackCalibratorTool< 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< 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 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 274 of file TrackFindingBaseAlg.h.

◆ EventStats

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

Definition at line 179 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 54 of file TrackFindingBaseAlg.h.

◆ TrkProxy

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

Definition at line 249 of file TrackFindingBaseAlg.h.

Member Enumeration Documentation

◆ DestinyType

Enumerator
UNKNOWN 
SUCCEED 
DUPLICATE 
FAILURE 

Definition at line 191 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 157 of file TrackFindingBaseAlg.h.

158 {
162 kNoTrack,
170 kNoSecond,
176 kNStat
177 };

Constructor & Destructor Documentation

◆ TrackFindingAlg()

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

Definition at line 73 of file TrackFindingAlg.cxx.

74 : 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 385 of file TrackFindingBaseAlg.cxx.

386 {
387 tracksContainer.addColumn<unsigned int>("nPixelHits");
388 tracksContainer.addColumn<unsigned int>("nStripHits");
389 tracksContainer.addColumn<unsigned int>("nHgtdHits");
390 tracksContainer.addColumn<unsigned int>("nPixelHoles");
391 tracksContainer.addColumn<unsigned int>("nStripHoles");
392 tracksContainer.addColumn<unsigned int>("nHgtdHoles");
393 tracksContainer.addColumn<unsigned int>("nPixelOutliers");
394 tracksContainer.addColumn<unsigned int>("nStripOutliers");
395 tracksContainer.addColumn<unsigned int>("nHgtdOutliers");
396 }

◆ 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 939 of file TrackFindingAlg.cxx.

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

64{
65 return 0;
66}

◆ checkCounts()

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

Definition at line 441 of file TrackFindingBaseAlg.cxx.

441 {
442 // This check will fail if there are other types (HGTD, MS?) of hits, holes, or outliers.
443 // The check can be removed when it is no longer appropriate.
444 if (track.nMeasurements() != s_branchState.nPixelHits(track) + s_branchState.nStripHits(track) + s_branchState.nHgtdHits(track))
445 ATH_MSG_WARNING("mismatched hit count: total (" << track.nMeasurements()
446 << ") != pixel (" << s_branchState.nPixelHits(track)
447 << ") + strip (" << s_branchState.nStripHits(track)
448 << ") + hgtd (" << s_branchState.nHgtdHits(track)
449 << ")");
450 if (track.nHoles() != s_branchState.nPixelHoles(track) + s_branchState.nStripHoles(track) + s_branchState.nHgtdHoles(track))
451 ATH_MSG_WARNING("mismatched hole count: total (" << track.nHoles()
452 << ") < pixel (" << s_branchState.nPixelHoles(track)
453 << ") + strip (" << s_branchState.nStripHoles(track)
454 << ") + hgtd (" << s_branchState.nHgtdHoles(track)
455 << ")");
456 if (track.nOutliers() != s_branchState.nPixelOutliers(track) + s_branchState.nStripOutliers(track) + s_branchState.nHgtdOutliers(track))
457 ATH_MSG_WARNING("mismatched outlier count: total (" << track.nOutliers()
458 << ") != pixel (" << s_branchState.nPixelOutliers(track)
459 << ") + strip (" << s_branchState.nStripOutliers(track)
460 << ") + hgtd (" << s_branchState.nHgtdOutliers(track)
461 << ")");
462 };
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 750 of file TrackFindingBaseAlg.cxx.

750 {
751 std::size_t out = 0u;
752 for (std::size_t category_i = seed_collection * seedCollectionStride();
753 category_i < (seed_collection + 1) * seedCollectionStride();
754 ++category_i)
755 {
756 assert(category_i < stat.size());
757 out += stat[category_i][counter_i];
758 }
759 return out;
760 }
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 537 of file TrackFindingBaseAlg.cxx.

537 {
538 std::lock_guard<std::mutex> lock(m_mutex);
539 std::size_t category_i = 0;
540 for (const std::array<unsigned int, kNStat> &src_stat : event_stat)
541 {
542 std::array<std::size_t, kNStat> &dest_stat = m_stat[category_i++];
543 for (std::size_t i = 0; i < src_stat.size(); ++i)
544 {
545 assert(i < dest_stat.size());
546 dest_stat[i] += src_stat[i];
547 }
548 }
549 }

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

241 {
242 if (not m_doTwoWay) return {};
243
244 // Create initial parameters for the propagation
245 Acts::BoundTrackParameters secondInitialParameters = trackProxy.createParametersFromState(detail::RecoConstTrackStateContainerProxy{firstMeasurement});
246 if (!secondInitialParameters.referenceSurface().insideBounds(secondInitialParameters.localPosition())) { // #3751
247 return {};
248 }
249
250 auto rootBranch = tracksContainerTemp.makeTrack();
251 rootBranch.copyFromWithoutStates(trackProxy); // #3534
252
253 // perform track finding
254 auto secondResult =
255 trackFinder().ckf.findTracks(secondInitialParameters, options, tracksContainerTemp, rootBranch);
256 if (not secondResult.ok()) {
257 return {};
258 }
259 return secondResult.value();
260 }
Gaudi::Property< bool > m_doTwoWay
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 153 of file TrackFindingAlg.cxx.

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

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
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 875 of file TrackFindingAlg.cxx.

881 {
882
883 Acts::PropagatorOptions<detail::Stepper::Options, detail::Navigator::Options,
884 Acts::ActorList<Acts::MaterialInteractor, Collector>>
885 options(detContext.geometry, detContext.magField);
886
887 auto findResult = findTrackStateForExtrapolation(
888 options.geoContext, track, referenceSurface, strategy, logger());
889
890 if (!findResult.ok()) {
891 ATH_MSG_WARNING("Failed to find track state for extrapolation");
892 return findResult.error();
893 }
894
895 auto &[trackState, distance] = *findResult;
896
897 options.direction = Acts::Direction::fromScalarZeroAsPositive(distance);
898
899 Acts::BoundTrackParameters parameters = track.createParametersFromState(trackState);
900 ATH_MSG_VERBOSE("Extrapolating track to reference surface at distance "
901 << distance << " with direction " << options.direction
902 << " with starting parameters " << parameters);
903
904 auto state = propagator.makeState<decltype(options), Acts::ForcedSurfaceReached>(referenceSurface, options);
905 ExpectedLayerPattern*& collectorResult = state.get<TrackFindingAlg::ExpectedLayerPattern*>();
906 collectorResult = &expectedLayerPattern;
907
908 auto initRes = propagator.initialize(state, parameters);
909 if(!initRes.ok()) {
910 ATH_MSG_WARNING("Failed to initialize propagation state: " << initRes.error().message());
911 return initRes.error();
912 }
913
914
915 auto propagateOnlyResult =
916 propagator.propagate(state);
917
918 if (!propagateOnlyResult.ok()) {
919 ATH_MSG_WARNING("Failed to extrapolate track: " << propagateOnlyResult.error().message());
920 return propagateOnlyResult.error();
921 }
922
923 auto propagateResult = propagator.makeResult(
924 std::move(state), propagateOnlyResult, options, true, &referenceSurface);
925
926 if (!propagateResult.ok()) {
927 ATH_MSG_WARNING("Failed to extrapolate track: " << propagateResult.error().message());
928 return propagateResult.error();
929 }
930
931 track.setReferenceSurface(referenceSurface.getSharedPtr());
932 track.parameters() = propagateResult->endParameters.value().parameters();
933 track.covariance() =
934 propagateResult->endParameters.value().covariance().value();
935
936 return Acts::Result<void>::success();
937 }
#define ATH_MSG_VERBOSE(x)
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 146 of file TrackFindingAlg.cxx.

146 {
148 return StatusCode::SUCCESS;
149 }
virtual StatusCode finalize() override

◆ findTracks()

StatusCode ActsTrk::TrackFindingAlg::findTracks ( 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 434 of file TrackFindingAlg.cxx.

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

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

◆ getDefaultOptions()

TrackFindingBaseAlg::TrackFindingDefaultOptions ActsTrk::TrackFindingBaseAlg::getDefaultOptions ( 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 202 of file TrackFindingBaseAlg.cxx.

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

◆ getSeedCategory()

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

Definition at line 819 of file TrackFindingAlg.cxx.

822 {
823 const xAOD::SpacePoint* sp = useTopSp ? seed.sp().back() : seed.sp().front();
824 const xAOD::SpacePoint::ConstVectorMap pos = sp->globalPosition();
825 double etaSeed = std::atanh(pos[2] / pos.norm());
826 return getStatCategory(typeIndex, etaSeed);
827 }
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 741 of file TrackFindingBaseAlg.cxx.

741 {
742 std::vector<float>::const_iterator bin_iter = std::upper_bound(m_statEtaBins.begin(),
743 m_statEtaBins.end(),
744 m_useAbsEtaForStat ? std::abs(eta) : eta);
745 std::size_t category_i = seed_collection * seedCollectionStride() + static_cast<std::size_t>(bin_iter - m_statEtaBins.begin());
746 assert(category_i < m_stat.size());
747 return category_i;
748 }

◆ initCounts()

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

Definition at line 398 of file TrackFindingBaseAlg.cxx.

399 {
400 s_branchState.nPixelHits(track) = 0;
401 s_branchState.nStripHits(track) = 0;
402 s_branchState.nHgtdHits(track) = 0;
403 s_branchState.nPixelHoles(track) = 0;
404 s_branchState.nStripHoles(track) = 0;
405 s_branchState.nHgtdHoles(track) = 0;
406 s_branchState.nPixelOutliers(track) = 0;
407 s_branchState.nStripOutliers(track) = 0;
408 s_branchState.nHgtdOutliers(track) = 0;
409 }

◆ initialize()

StatusCode ActsTrk::TrackFindingAlg::initialize ( )
overridevirtual

Reimplemented from ActsTrk::TrackFindingBaseAlg.

Definition at line 78 of file TrackFindingAlg.cxx.

79 {
80 ATH_MSG_INFO("Initializing " << name() << " ... ");
81
94
96 ATH_CHECK(m_seedContainerKeys.initialize());
97 ATH_CHECK(m_detEleCollKeys.initialize());
100 ATH_CHECK(m_detElStatus.initialize());
101 ATH_CHECK(m_beamSpotKey.initialize());
102
103 m_storeDestinies = not m_seedDestiny.empty();
105
106 if (m_seedContainerKeys.size() != m_detEleCollKeys.size())
107 {
108 ATH_MSG_FATAL("There are " << m_detEleCollKeys.size() << " DetectorElementsKeys, but " << m_seedContainerKeys.size() << " SeedContainerKeys");
109 return StatusCode::FAILURE;
110 }
111
112 if (m_detEleCollKeys.size() != m_seedLabels.size())
113 {
114 ATH_MSG_FATAL("There are " << m_seedLabels.size() << " SeedLabels, but " << m_detEleCollKeys.size() << " DetectorElementsKeys");
115 return StatusCode::FAILURE;
116 }
117
118 if (m_useTopSpRZboundary.size() != 2)
119 {
120 ATH_MSG_FATAL("useTopSpRZboundary must have 2 elements, but has " << m_useTopSpRZboundary.size());
121 return StatusCode::FAILURE;
122 }
123
124 if (m_ambiStrategy != 0u /* OUTSIDE_TF */) m_showResolvedStats = true;
125 if (m_ambiStrategy == 1u /* END_OF_TF */) {
126 Acts::GreedyAmbiguityResolution::Config cfg;
127 cfg.maximumSharedHits = m_maximumSharedHits;
128 cfg.maximumIterations = m_maximumIterations;
129 cfg.nMeasurementsMin = m_nMeasurementsMin;
130
131 m_ambi.emplace(std::move(cfg), makeActsAthenaLogger(this, "Acts"));
132 }
133
134 if (m_storeDestinies) {
135 if (m_seedDestiny.size() != m_seedContainerKeys.size()) {
136 ATH_MSG_ERROR("There are " << m_seedDestiny.size() << " seed destiny collections, but " << m_seedContainerKeys.size() << " seed collections");
137 return StatusCode::FAILURE;
138 }
139 }
140
141 return StatusCode::SUCCESS;
142 }
#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 490 of file TrackFindingBaseAlg.cxx.

490 {
491 std::vector<std::pair<float, float> > &chi2CutOffOutlier = m_measurementSelectorConfig.m_chi2CutOffOutlier;
492 chi2CutOffOutlier .reserve( m_chi2CutOff.size() );
493 if (!m_chi2OutlierCutOff.empty()) {
494 if (m_chi2CutOff.size() != m_chi2OutlierCutOff.size()) {
495 ATH_MSG_ERROR("Outlier chi2 cut off provided but number of elements does not agree with"
496 " chi2 cut off for measurements which however is required: "
497 << m_chi2CutOff.size() << " != " << m_chi2OutlierCutOff.size());
498 return StatusCode::FAILURE;
499 }
500 }
501 unsigned int idx=0;
502 for (const auto &elm : m_chi2CutOff) {
503 chi2CutOffOutlier.push_back( std::make_pair(static_cast<float>(elm),
504 idx < m_chi2OutlierCutOff.size()
505 ? static_cast<float>(m_chi2OutlierCutOff[idx])
506 : std::numeric_limits<float>::max()) );
507 ++idx;
508 }
509 if (m_etaBins.size() > 2) {
510 std::vector<float> &etaBinsf = m_measurementSelectorConfig.m_etaBins;
511 etaBinsf.assign(m_etaBins.begin() + 1, m_etaBins.end() - 1);
512 }
513
514 return /*m_measurementSelector ?*/ StatusCode::SUCCESS /*: StatusCode::FAILURE*/;
515 }
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 519 of file TrackFindingBaseAlg.cxx.

519 {
520 if (!m_statEtaBins.empty())
521 {
523 float last_eta = m_statEtaBins[0];
524 for (float eta : m_statEtaBins)
525 {
526 if (eta < last_eta)
527 {
528 ATH_MSG_FATAL("Eta bins for statistics counter not in ascending order.");
529 }
530 last_eta = eta;
531 }
532 }
533 m_stat.resize(nSeedCollections() * seedCollectionStride());
534 }

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

322 {
323 return *m_logger;
324 }
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 262 of file TrackFindingBaseAlg.cxx.

262 {
263 if (trackState.hasReferenceSurface()) {
264 if (const auto *actsDetElem = dynamic_cast<const IDetectorElementBase *>(trackState.referenceSurface().surfacePlacement())) {
265 switch (actsDetElem->detectorType()) {
272 default:
273 break;
274 }
275 }
276 }
278 }
@ 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 334 of file TrackFindingBaseAlg.h.

334 {
335 return m_seedLabels.size();
336 }

◆ 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 829 of file TrackFindingAlg.cxx.

837 {
838 if (not m_trackStatePrinter.isSet()) return;
839
840 if (nPrinted == 0) {
841 ATH_MSG_INFO("CKF results for " << seeds.size() << ' ' << seedType << " seeds:");
842 }
843 ++nPrinted;
844 m_trackStatePrinter->printSeed(detContext.geometry, seeds[iseed], seedParameters, measurementIndex, iseed, isKF);
845 }

◆ printStatTables()

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

Definition at line 552 of file TrackFindingBaseAlg.cxx.

552 {
553 if (msgLvl(MSG::INFO))
554 {
555 std::vector<std::string> stat_labels =
557 {
558 std::make_pair(kNTotalSeeds, "Input seeds"),
559 std::make_pair(kNoTrackParam, "No track parameters"),
560 std::make_pair(kNUsedSeeds, "Used seeds"),
561 std::make_pair(kNoTrack, "Cannot find track"),
562 std::make_pair(kNDuplicateSeeds, "Duplicate seeds"),
563 std::make_pair(kNNoEstimatedParams, "Initial param estimation failed"),
564 std::make_pair(kNRejectedRefinedSeeds, "Rejected refined parameters"),
565 std::make_pair(kNOutputTracks, "CKF tracks"),
566 std::make_pair(kNSelectedTracks, "selected tracks"),
567 std::make_pair(kNResolvedTracks, "resolved tracks"),
568 std::make_pair(kNStoppedTracksMaxHoles, "Stopped tracks reaching max holes"),
569 std::make_pair(kMultipleBranches, "Seeds with more than one branch"),
570 std::make_pair(kNoSecond, "Tracks failing second CKF"),
571 std::make_pair(kNStoppedTracksMinPt, "Stopped tracks below pT cut"),
572 std::make_pair(kNStoppedTracksMaxEta, "Stopped tracks above max eta"),
573 std::make_pair(kNTotalSharedHits, "Total shared hits"),
574 std::make_pair(kNForcedSeedMeasurements, "Total forced measurements")
575 });
576 assert(stat_labels.size() == kNStat);
577 std::vector<std::string> categories;
578 categories.reserve(m_seedLabels.size() + 1);
579 categories.insert(categories.end(), m_seedLabels.begin(), m_seedLabels.end());
580 categories.push_back("ALL");
581
582 std::vector<std::string> eta_labels;
583 eta_labels.reserve(m_statEtaBins.size() + 2);
584 for (std::size_t eta_bin_i = 0; eta_bin_i < m_statEtaBins.size() + 2; ++eta_bin_i)
585 {
586 eta_labels.push_back(TableUtils::makeEtaBinLabel(m_statEtaBins, eta_bin_i, m_useAbsEtaForStat));
587 }
588
589 // vector used as 3D array stat[ eta_bin ][ stat_i ][ seed_type]
590 // stat_i = [0, kNStat)
591 // eta_bin = [0, m_statEtaBins.size()+2 ); eta_bin == m_statEtaBinsSize()+1 means sum of all etaBins
592 // seed_type = [0, nSeedCollections()+1) seed_type == nSeedCollections() means sum of all seed collections
593 std::vector<std::size_t> stat =
595 m_statEtaBins.size() + 1,
596 m_stat);
597
598 // the extra columns and rows for the projections are addeded internally:
599 std::size_t stat_stride =
601 m_statEtaBins.size() + 1,
602 kNStat);
603 std::size_t eta_stride =
605 m_statEtaBins.size() + 1,
606 kNStat);
607 std::stringstream table_out;
608
609 if (m_dumpAllStatEtaBins.value())
610 {
611 // dump for each counter a table with one row per eta bin
612 std::size_t max_label_width = TableUtils::maxLabelWidth(stat_labels) + TableUtils::maxLabelWidth(eta_labels);
613 for (std::size_t stat_i = 0; stat_i < kNStat; ++stat_i)
614 {
615 std::size_t dest_idx_offset = stat_i * stat_stride;
616 table_out << makeTable(stat, dest_idx_offset, eta_stride,
617 eta_labels,
618 categories)
619 .columnWidth(10)
620 // only dump the footer for the last eta bin i.e. total
621 .dumpHeader(stat_i == 0)
622 .dumpFooter(stat_i + 1 == kNStat)
623 .separateLastRow(true) // separate the sum of all eta bins
624 .minLabelWidth(max_label_width)
625 .labelPrefix(stat_labels.at(stat_i));
626 }
627 }
628 else
629 {
630 // dump one table with one row per counter showing the total eta range
631 for (std::size_t eta_bin_i = (m_dumpAllStatEtaBins.value() ? 0 : m_statEtaBins.size() + 1);
632 eta_bin_i < m_statEtaBins.size() + 2;
633 ++eta_bin_i)
634 {
635 std::size_t dest_idx_offset = eta_bin_i * eta_stride;
636 table_out << makeTable(stat, dest_idx_offset, stat_stride,
637 stat_labels,
638 categories,
639 eta_labels.at(eta_bin_i))
640 .columnWidth(10)
641 // only dump the footer for the last eta bin i.e. total
642 .dumpFooter(!m_dumpAllStatEtaBins.value() || eta_bin_i == m_statEtaBins.size() + 1);
643 }
644 }
645 ATH_MSG_INFO("statistics:\n"
646 << table_out.str());
647 table_out.str("");
648
649 // define retios first element numerator, second element denominator
650 // each element contains a vector of counter and a multiplier e.g. +- 1
651 // ratios are computed as (sum_i stat[stat_i] * multiplier_i ) / (sum_j stat[stat_j] * multiplier_j )
652 auto [ratio_labels, ratio_def] =
654 std::vector<TableUtils::SummandDefinition>{
658 // no track counted as used but want to include it as failed
660 }, // failed seeds i.e. seeds which are not duplicates but did not produce a track
661 std::vector<TableUtils::SummandDefinition>{TableUtils::defineSummand(kNTotalSeeds, 1)}),
663 TableUtils::defineSimpleRatio("Rejected refined params / seeds", kNRejectedRefinedSeeds, kNTotalSeeds),
665 TableUtils::defineSimpleRatio("selected tracks / used seeds", kNSelectedTracks, kNUsedSeeds),
667 TableUtils::defineSimpleRatio("resolved tracks / used seeds", kNResolvedTracks, kNUsedSeeds),
668 TableUtils::defineSimpleRatio("branched tracks / used seeds", kMultipleBranches, kNUsedSeeds),
669 TableUtils::defineSimpleRatio("no 2nd CKF / CKF tracks", kNoSecond, kNOutputTracks),
671 TableUtils::defineSimpleRatio("forced measurements / used seeds", kNForcedSeedMeasurements, kNUsedSeeds)});
672
673 std::vector<float> ratio = TableUtils::computeRatios(ratio_def,
674 nSeedCollections() + 1,
675 m_statEtaBins.size() + 2,
676 stat);
677
678 // the extra columns and rows for the projections are _not_ added internally
679 std::size_t ratio_stride = TableUtils::ratioStride(nSeedCollections() + 1,
680 m_statEtaBins.size() + 2,
681 ratio_def);
682 std::size_t ratio_eta_stride = TableUtils::subCategoryStride(nSeedCollections() + 1,
683 m_statEtaBins.size() + 2,
684 ratio_def);
685
686 std::size_t max_label_width = TableUtils::maxLabelWidth(ratio_labels) + TableUtils::maxLabelWidth(eta_labels);
687 if (m_dumpAllStatEtaBins.value())
688 {
689 // show for each ratio a table with one row per eta bin
690 for (std::size_t ratio_i = 0; ratio_i < ratio_labels.size(); ++ratio_i)
691 {
692 table_out << makeTable(ratio,
693 ratio_i * ratio_stride,
694 ratio_eta_stride,
695 eta_labels,
696 categories)
697 .columnWidth(10)
698 // only dump the footer for the last eta bin i.e. total
699 .dumpHeader(ratio_i == 0)
700 .dumpFooter(ratio_i + 1 == ratio_labels.size())
701 .separateLastRow(true) // separate the sum of las
702 .minLabelWidth(max_label_width)
703 .labelPrefix(ratio_labels.at(ratio_i));
704 }
705 }
706 else
707 {
708 // dump one table with one row per ratio showing the total eta range
709 table_out << makeTable(ratio,
710 (m_statEtaBins.size() + 1) * ratio_eta_stride + 0 * ratio_stride,
711 ratio_stride,
712 ratio_labels,
713 categories)
714 .columnWidth(10)
715 // only dump the footer for the last eta bin i.e. total
716 .minLabelWidth(max_label_width)
717 .dumpFooter(false);
718
719 // also dump a table for final tracks over used seeds (ratio_i==6 or 4) showing one row per eta bin
720 eta_labels.erase(eta_labels.end() - 1); // drop last line of table which shows again all eta bins summed.
721 std::size_t ratio_i = m_showResolvedStats ? 6 : 4;
722 table_out << makeTable(ratio,
723 ratio_i * ratio_stride,
724 ratio_eta_stride,
725 eta_labels,
726 categories)
727 .columnWidth(10)
728 .dumpHeader(false)
729 // only dump the footer for the last eta bin i.e. total
730 .dumpFooter(!m_dumpAllStatEtaBins.value() || ratio_i + 1 == ratio_labels.size())
731 .separateLastRow(false)
732 .minLabelWidth(max_label_width)
733 .labelPrefix(ratio_labels.at(ratio_i));
734 }
735
736 ATH_MSG_INFO("Ratios:\n"
737 << table_out.str());
738 }
739 }
TableUtils::StatTable< T > makeTable(const std::array< T, N > &counter, const std::array< std::string, N > &label)
Definition TableUtils.h:523
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:448
SummandDefinition defineSummand(T counter_idx, int multiplier)
Definition TableUtils.h:402
std::size_t maxLabelWidth(const T_Collection &col)
Definition TableUtils.h:290
RatioDefinition defineSimpleRatio(T numerator, T denominator)
Definition TableUtils.h:384
std::vector< std::string > makeLabelVector(T_index n_entries, std::initializer_list< std::pair< T_index, T_string > > a_list)
Definition TableUtils.h:275
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:304
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:309
std::string makeEtaBinLabel(const std::vector< float > &eta_bins, std::size_t eta_bin_i, bool abs_eta=false)
Definition TableUtils.h:514
std::tuple< std::string, RatioDefinition > makeRatioDefinition(std::string &&name, std::vector< SummandDefinition > &&numerator, std::vector< SummandDefinition > &&denominator)
Definition TableUtils.h:438
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:473
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:322

◆ 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 762 of file TrackFindingAlg.cxx.

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

337 {
338 return m_statEtaBins.size() + 1;
339 }

◆ selectCounts()

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

Definition at line 464 of file TrackFindingBaseAlg.cxx.

464 {
465 bool enoughMeasurements = true, tooManyHoles = false, tooManyOutliers = false;
466 const auto &trackSelectorCfg = trackFinder().trackSelector.config();
467 std::size_t etaBin = (std::abs(eta) < trackSelectorCfg.absEtaEdges.front()) ? 0
468 : (std::abs(eta) >= trackSelectorCfg.absEtaEdges.back()) ? trackSelectorCfg.absEtaEdges.size() - 1
469 : trackSelectorCfg.binIndex(eta);
470 auto cutMin = [etaBin](std::size_t val, const std::vector<std::size_t> &cutSet) {
471 return !cutSet.empty() && (val < (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
472 };
473 auto cutMax = [etaBin](std::size_t val, const std::vector<std::size_t> &cutSet) {
474 return !cutSet.empty() && (val > (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
475 };
476
477 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nPixelHits(track), m_minPixelHits);
478 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nStripHits(track), m_minStripHits);
479 enoughMeasurements = enoughMeasurements && !cutMin(s_branchState.nHgtdHits(track), m_minHgtdHits);
480 tooManyHoles = tooManyHoles || cutMax(s_branchState.nPixelHoles(track), m_maxPixelHoles);
481 tooManyHoles = tooManyHoles || cutMax(s_branchState.nStripHoles(track), m_maxStripHoles);
482 tooManyHoles = tooManyHoles || cutMax(s_branchState.nHgtdHoles(track), m_maxHgtdHoles);
483 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nPixelOutliers(track), m_maxPixelOutliers);
484 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nStripOutliers(track), m_maxStripOutliers);
485 tooManyOutliers = tooManyOutliers || cutMax(s_branchState.nHgtdOutliers(track), m_maxHgtdOutliers);
486
487 return {enoughMeasurements, tooManyHoles, tooManyOutliers};
488 }
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
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 762 of file TrackFindingBaseAlg.cxx.

762 {
763 if (not m_addCounts) return true;
764 double eta = -std::log(std::tan(0.5 * track.theta()));
765 auto [enoughMeasurementsPS, tooManyHolesPS, tooManyOutliersPS] = selectCounts(track, eta);
766 return enoughMeasurementsPS && !tooManyHolesPS && !tooManyOutliersPS;
767 }
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 detail::TrackFindingMeasurements & measurements,
TrackFinderOptions & options ) const
nodiscardprotectedinherited

Setup and attach measurement selector to KF options.

Parameters
measurementsmeasurements container used in MeasurementSelector
optionsKalman filter options
Returns
unique_ptr to MeasurementSelector

Definition at line 183 of file TrackFindingBaseAlg.cxx.

185 {
186
187 std::unique_ptr<ActsTrk::IMeasurementSelector> measurementSelector = ActsTrk::detail::getMeasurementSelector(
188 m_pixelCalibTool.isEnabled() ? &(*m_pixelCalibTool) : nullptr,
189 m_stripCalibTool.isEnabled() ? &(*m_stripCalibTool) : nullptr,
190 m_hgtdCalibTool.isEnabled() ? &(*m_hgtdCalibTool) : nullptr,
191 measurements.measurementRanges(),
193 m_measurementSelectorConfig.m_chi2CutOffOutlier,
195 m_edgeHoleBorderWidth.value());
196
197 measurementSelector->connect(&options.extensions.createTrackStates);
198
199 return measurementSelector;
200 }
Gaudi::Property< std::vector< size_t > > m_numMeasurementsCutOff
Gaudi::Property< double > m_edgeHoleBorderWidth
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool
std::unique_ptr< ActsTrk::IMeasurementSelector > getMeasurementSelector(const ActsTrk::IOnBoundStateCalibratorTool *pixelOnTrackCalibratorTool, const ActsTrk::IOnBoundStateCalibratorTool *stripOnTrackCalibratorTool, const ActsTrk::IOnBoundStateCalibratorTool *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 419 of file TrackFindingAlg.cxx.

419 {
420 const xAOD::SpacePoint* bottom_sp = seed.sp().front();
421
422 const double r = bottom_sp->radius();
423 const double z = std::abs(bottom_sp->z());
424
425 const double rBoundary = m_useTopSpRZboundary.value()[0];
426 const double zBoundary = m_useTopSpRZboundary.value()[1];
427
428 return r > rBoundary || z > zBoundary;
429 }
#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 280 of file TrackFindingBaseAlg.cxx.

287 {
288 if (m_addCounts) {
289 updateCounts(track, trackState.typeFlags(),
290 measurementType(trackState));
291 if (m_checkCounts) {
292 checkCounts(track);
293 }
294 }
295
296 if (m_trackStatePrinter.isSet()) {
297 m_trackStatePrinter->printTrackState(tgContext, trackState,
298 measurementIndex, true);
299 }
300
301 if (!m_doBranchStopper) {
302 return BranchStopperResult::Continue;
303 }
304
305 const auto &parameters = trackState.hasFiltered() ? trackState.filtered()
306 : trackState.predicted();
307 double eta = -std::log(std::tan(0.5 * parameters[Acts::eBoundTheta]));
308 const auto &cutSet = getCuts(eta);
309
310 if (typeIndex < m_ptMinMeasurements.size() &&
311 !(track.nMeasurements() < m_ptMinMeasurements[typeIndex])) {
312 double pT = std::sin(parameters[Acts::eBoundTheta]) /
313 parameters[Acts::eBoundQOverP];
314 if (std::abs(pT) < cutSet.ptMin * m_branchStopperPtMinFactor) {
315 ++event_stat_category_i[kNStoppedTracksMinPt];
316 ATH_MSG_DEBUG("CkfBranchStopper: drop branch with q*pT="
317 << pT << " after " << track.nMeasurements()
318 << " measurements");
319 return BranchStopperResult::StopAndDrop;
320 }
321 }
322
323 if (typeIndex < m_absEtaMaxMeasurements.size() &&
324 !(track.nMeasurements() < m_absEtaMaxMeasurements[typeIndex]) &&
325 !(std::abs(eta) < trackSelectorCfg.absEtaEdges.back() +
327 ++event_stat_category_i[kNStoppedTracksMaxEta];
328 ATH_MSG_DEBUG("CkfBranchStopper: drop branch with eta="
329 << eta << " after " << track.nMeasurements()
330 << " measurements");
331 return BranchStopperResult::StopAndDrop;
332 }
333
334
335 // In the pixel endcap regions relax the requirement for minMeasurements before cutting the branch off
336 auto minMeasurementsBranchStop = std::abs(eta) > m_branchStopperAbsEtaMeasCut ? cutSet.minMeasurements - m_branchStopperMeasCutReduce : cutSet.minMeasurements;
337 bool enoughMeasurements = (track.nMeasurements() >= minMeasurementsBranchStop);
338 bool tooManyHoles = (track.nHoles() > cutSet.maxHoles);
339 bool tooManyOutliers = (track.nOutliers() > cutSet.maxOutliers);
340
341 if (m_addCounts) {
342 auto [enoughMeasurementsPS, tooManyHolesPS, tooManyOutliersPS] =
343 selectCounts(track, eta);
344 enoughMeasurements = enoughMeasurements && enoughMeasurementsPS;
345 tooManyHoles = tooManyHoles || tooManyHolesPS;
346 tooManyOutliers = tooManyOutliers || tooManyOutliersPS;
347 }
348
349 if (!(tooManyHoles || tooManyOutliers)) {
350 return BranchStopperResult::Continue;
351 }
352
353 if (!enoughMeasurements) {
354 ++event_stat_category_i[kNStoppedTracksMaxHoles];
355 }
356
357 if (m_addCounts) {
358 ATH_MSG_DEBUG("CkfBranchStopper: stop and "
359 << (enoughMeasurements ? "keep" : "drop")
360 << " branch with nHoles=" << track.nHoles() << " ("
361 << s_branchState.nPixelHoles(track) << " pixel+"
362 << s_branchState.nStripHoles(track) << " strip+"
363 << s_branchState.nHgtdHoles(track)
364 << " hgtd), nOutliers=" << track.nOutliers() << " ("
365 << s_branchState.nPixelOutliers(track) << "+"
366 << s_branchState.nStripOutliers(track) << "+"
367 << s_branchState.nHgtdOutliers(track)
368 << "), nMeasurements=" << track.nMeasurements() << " ("
369 << s_branchState.nPixelHits(track) << "+"
370 << s_branchState.nStripHits(track) << "+"
371 << s_branchState.nHgtdHits(track) << ")");
372 } else {
373 ATH_MSG_DEBUG("CkfBranchStopper: stop and "
374 << (enoughMeasurements ? "keep" : "drop")
375 << " branch with nHoles=" << track.nHoles()
376 << ", nOutliers=" << track.nOutliers()
377 << ", nMeasurements=" << track.nMeasurements());
378 }
379
380 return enoughMeasurements ? BranchStopperResult::StopAndKeep
381 : BranchStopperResult::StopAndDrop;
382 }
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 740 of file TrackFindingAlg.cxx.

743 {
744
745 const auto lastMeasurementIndex = track.tipIndex();
746 duplicateSeedDetector.newTrajectory();
747
748 tracksContainer.trackStateContainer().visitBackwards(
749 lastMeasurementIndex,
750 [&duplicateSeedDetector,&measurementIndex](const detail::RecoTrackStateContainer::ConstTrackStateProxy &state) -> void
751 {
752 // Check there is a source link
753 if (not state.hasUncalibratedSourceLink())
754 return;
755
756 // Fill the duplicate selector
757 auto sl = state.getUncalibratedSourceLink().template get<ATLASUncalibSourceLink>();
758 duplicateSeedDetector.addMeasurement(sl, measurementIndex);
759 }); // end visitBackwards
760 }
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130

◆ storeTrackCollectionToStoreGate()

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

Definition at line 403 of file TrackFindingAlg.cxx.

406 {
407 // convert to const
408 Acts::ConstVectorTrackContainer constTrackBackend( std::move(originalTrackBackend) );
409 Acts::ConstVectorMultiTrajectory constTrackStateBackend( std::move(originalTrackStateBackend) );
410 std::unique_ptr< ActsTrk::TrackContainer> constTracksContainer = std::make_unique< ActsTrk::TrackContainer >( std::move(constTrackBackend),
411 std::move(constTrackStateBackend) );
412
413 SG::WriteHandle<ActsTrk::TrackContainer> trackContainerHandle = SG::makeHandle(m_trackContainerKey, ctx);
414 ATH_MSG_DEBUG(" \\__ Tracks Container `" << m_trackContainerKey.key() << "` created ...");
415 ATH_CHECK(trackContainerHandle.record(std::move(constTracksContainer)));
416 return StatusCode::SUCCESS;
417 }
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.

77{
78 return BaseAlg::sysExecute (ctx);
79}

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

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

413 {
415 if (typeFlags.isHole()) {
416 s_branchState.nPixelHoles(track)++;
417 } else if (typeFlags.isOutlier()) {
418 s_branchState.nPixelOutliers(track)++;
419 } else if (typeFlags.isMeasurement()) {
420 s_branchState.nPixelHits(track)++;
421 }
422 } else if (detType == xAOD::UncalibMeasType::StripClusterType) {
423 if (typeFlags.isHole()) {
424 s_branchState.nStripHoles(track)++;
425 } else if (typeFlags.isOutlier()) {
426 s_branchState.nStripOutliers(track)++;
427 } else if (typeFlags.isMeasurement()) {
428 s_branchState.nStripHits(track)++;
429 }
430 } else if (detType == xAOD::UncalibMeasType::HGTDClusterType) {
431 if (typeFlags.isHole()) {
432 s_branchState.nHgtdHoles(track)++;
433 } else if (typeFlags.isOutlier()) {
434 s_branchState.nHgtdOutliers(track)++;
435 } else if (typeFlags.isMeasurement()) {
436 s_branchState.nHgtdHits(track)++;
437 }
438 }
439 }

◆ 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::size_t m_nTrackReserve ActsTrk::TrackFindingAlg::ATLAS_THREAD_SAFE {0ul}
mutableprivate

Definition at line 194 of file TrackFindingAlg.h.

194{0ul};

◆ ATLAS_THREAD_SAFE [2/3]

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

Definition at line 195 of file TrackFindingAlg.h.

195{0ul};

◆ ATLAS_THREAD_SAFE [3/3]

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

Definition at line 196 of file TrackFindingAlg.h.

196{};

◆ m_absEtaMax

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

Definition at line 124 of file TrackFindingBaseAlg.h.

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

◆ m_absEtaMaxMeasurements

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

Definition at line 109 of file TrackFindingBaseAlg.h.

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

◆ m_absEtaMin

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

Definition at line 123 of file TrackFindingBaseAlg.h.

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

138{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

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

Definition at line 91 of file TrackFindingBaseAlg.h.

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

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

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

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

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

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

◆ m_chi2CutOff

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

Definition at line 104 of file TrackFindingBaseAlg.h.

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

◆ m_chi2OutlierCutOff

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

Definition at line 105 of file TrackFindingBaseAlg.h.

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

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

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

◆ m_d0Min

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

Definition at line 127 of file TrackFindingBaseAlg.h.

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

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

◆ m_doTwoWay

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

Definition at line 111 of file TrackFindingBaseAlg.h.

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

◆ m_dumpAllStatEtaBins

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

Definition at line 155 of file TrackFindingBaseAlg.h.

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

◆ m_edgeHoleBorderWidth

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

Definition at line 107 of file TrackFindingBaseAlg.h.

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

◆ m_endOfWorldVolumeIds

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

Definition at line 150 of file TrackFindingBaseAlg.h.

150{this, "EndOfTheWorldVolumeIds", {}, ""};

◆ m_etaBins

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

Definition at line 102 of file TrackFindingBaseAlg.h.

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

◆ m_etaMax

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

Definition at line 122 of file TrackFindingBaseAlg.h.

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

◆ m_etaMin

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

Definition at line 121 of file TrackFindingBaseAlg.h.

121{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 88 of file TrackFindingBaseAlg.h.

88{this, "ExtrapolationTool", ""};

◆ m_fitterTool

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

Definition at line 92 of file TrackFindingBaseAlg.h.

92{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::IOnTrackCalibratorTool<detail::RecoTrackStateContainer> > ActsTrk::TrackFindingBaseAlg::m_hgtdCalibTool {this, "HGTDCalibrator", "", "Opt. HGTD measurement calibrator"}
protectedinherited

Definition at line 95 of file TrackFindingBaseAlg.h.

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

◆ m_logger

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

logging instance

Definition at line 327 of file TrackFindingBaseAlg.h.

◆ m_maxChi2

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

Definition at line 136 of file TrackFindingBaseAlg.h.

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

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

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

133{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 134 of file TrackFindingBaseAlg.h.

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

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

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

◆ m_maxPropagationStep

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

Definition at line 101 of file TrackFindingBaseAlg.h.

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

◆ m_maxSharedHits

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

Definition at line 135 of file TrackFindingBaseAlg.h.

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

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

147{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 193 of file TrackFindingAlg.h.

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

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

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

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

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

◆ m_monTool

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

Definition at line 87 of file TrackFindingBaseAlg.h.

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

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

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

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

◆ m_phiMin

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

Definition at line 119 of file TrackFindingBaseAlg.h.

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

◆ m_pixelCalibTool

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

Definition at line 93 of file TrackFindingBaseAlg.h.

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

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

◆ m_ptMin

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

Definition at line 125 of file TrackFindingBaseAlg.h.

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

◆ m_ptMinMeasurements

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

Definition at line 108 of file TrackFindingBaseAlg.h.

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

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

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

153{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::IOnTrackCalibratorTool<detail::RecoTrackStateContainer> > ActsTrk::TrackFindingBaseAlg::m_stripCalibTool {this, "StripCalibrator", "", "Opt. strip measurement calibrator"}
protectedinherited

Definition at line 94 of file TrackFindingBaseAlg.h.

94{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 97 of file TrackFindingBaseAlg.h.

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

◆ m_trackFinder

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

Definition at line 81 of file TrackFindingBaseAlg.h.

◆ m_trackingGeometryTool

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

Definition at line 89 of file TrackFindingBaseAlg.h.

89{this, "TrackingGeometryTool", ""};

◆ m_tracksBackendHandlesHelper

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

Definition at line 98 of file TrackFindingBaseAlg.h.

98{this};

◆ m_trackStatePrinter

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

Definition at line 90 of file TrackFindingBaseAlg.h.

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

◆ m_unalibMeasSurfAcc

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

Definition at line 83 of file TrackFindingBaseAlg.h.

83{};

◆ m_uncalibratedMeasurementContainerKeys

SG::ReadHandleKeyArray<xAOD::UncalibratedMeasurementContainer> ActsTrk::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 343 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 130 of file TrackFindingBaseAlg.h.

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

◆ m_z0Min

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

Definition at line 129 of file TrackFindingBaseAlg.h.

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

◆ s_branchState

BranchState ActsTrk::TrackFindingBaseAlg::s_branchState {}
staticconstexprprotectedinherited

Definition at line 308 of file TrackFindingBaseAlg.h.

308{};

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