 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ACTSTRACKRECONSTRUCTION_TRACKFINDINGBASEALG_H
6 #define ACTSTRACKRECONSTRUCTION_TRACKFINDINGBASEALG_H
12 #include "GaudiKernel/ToolHandle.h"
23 #include "Acts/EventData/ProxyAccessor.hpp"
40 class TrackFindingMeasurements;
41 class SharedHitCounter;
87 ToolHandle<GenericMonitoringTool>
m_monTool{
this,
"MonTool",
"",
"Monitoring tool"};
90 ToolHandle<ActsTrk::TrackStatePrinterTool>
m_trackStatePrinter{
this,
"TrackStatePrinter",
"",
"optional track state printer"};
92 ToolHandle<ActsTrk::IFitterTool>
m_fitterTool{
this,
"FitterTool",
"",
"Fitter Tool for Seeds"};
93 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
m_pixelCalibTool{
this,
"PixelCalibrator",
"",
"Opt. pixel measurement calibrator"};
94 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
m_stripCalibTool{
this,
"StripCalibrator",
"",
"Opt. strip measurement calibrator"};
95 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
m_hgtdCalibTool{
this,
"HGTDCalibrator",
"",
"Opt. HGTD measurement calibrator"};
101 Gaudi::Property<unsigned int>
m_maxPropagationStep{
this,
"maxPropagationStep", 1000,
"Maximum number of steps for one propagate call"};
102 Gaudi::Property<std::vector<double>>
m_etaBins{
this,
"etaBins", {},
"bins in |eta| to specify variable selections"};
104 Gaudi::Property<std::vector<double>>
m_chi2CutOff{
this,
"chi2CutOff", {},
"MeasurementSelector: maximum local chi2 contribution"};
105 Gaudi::Property<std::vector<double>>
m_chi2OutlierCutOff{
this,
"chi2OutlierCutOff", {},
"MeasurementSelector: maximum local chi2 contribution for outlier"};
106 Gaudi::Property<std::vector<size_t>>
m_numMeasurementsCutOff{
this,
"numMeasurementsCutOff", {},
"MeasurementSelector: maximum number of associated measurements on a single surface"};
107 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"};
108 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"};
110 Gaudi::Property<bool>
m_doTwoWay{
this,
"doTwoWay",
true,
"run CKF twice, first with forward propagation with smoothing, then with backward propagation"};
111 Gaudi::Property<double>
m_branchStopperPtMinFactor{
this,
"branchStopperPtMinFactor", 1.0,
"factor to multiply ptMin cut when used in the branch stopper"};
113 Gaudi::Property<double>
m_branchStopperMeasCutReduce{
this,
"branchStopperMeasCutReduce", 2,
"how much to reduce the minMeas requirement for the branch stopper"};
114 Gaudi::Property<double>
m_branchStopperAbsEtaMeasCut{
this,
"branchStopperAbsEtaMeasCut", 1.2,
"the minimum |eta| to apply the reduction to the minMeas requirement for the branch stopper"};
118 Gaudi::Property<std::vector<double>>
m_phiMin{
this,
"phiMin", {},
"TrackSelector: phiMin"};
119 Gaudi::Property<std::vector<double>>
m_phiMax{
this,
"phiMax", {},
"TrackSelector: phiMax"};
120 Gaudi::Property<std::vector<double>>
m_etaMin{
this,
"etaMin", {},
"TrackSelector: etaMin"};
121 Gaudi::Property<std::vector<double>>
m_etaMax{
this,
"etaMax", {},
"TrackSelector: etaMax"};
122 Gaudi::Property<double>
m_absEtaMin{
this,
"absEtaMin", 0.0,
"TrackSelector: absEtaMin"};
124 Gaudi::Property<std::vector<double>>
m_ptMin{
this,
"ptMin", {},
"TrackSelector: ptMin"};
125 Gaudi::Property<std::vector<double>>
m_ptMax{
this,
"ptMax", {},
"TrackSelector: ptMax"};
126 Gaudi::Property<std::vector<double>>
m_d0Min{
this,
"d0Min", {},
"TrackSelector: d0Min"};
127 Gaudi::Property<std::vector<double>>
m_d0Max{
this,
"d0Max", {},
"TrackSelector: d0Max"};
128 Gaudi::Property<std::vector<double>>
m_z0Min{
this,
"z0Min", {},
"TrackSelector: z0Min"};
129 Gaudi::Property<std::vector<double>>
m_z0Max{
this,
"z0Max", {},
"TrackSelector: z0Max"};
131 Gaudi::Property<std::vector<std::size_t>>
m_minMeasurements{
this,
"minMeasurements", {},
"TrackSelector: minMeasurements"};
132 Gaudi::Property<std::vector<std::size_t>>
m_maxHoles{
this,
"maxHoles", {},
"TrackSelector: maxHoles"};
133 Gaudi::Property<std::vector<std::size_t>>
m_maxOutliers{
this,
"maxOutliers", {},
"TrackSelector: maxOutliers"};
134 Gaudi::Property<std::vector<std::size_t>>
m_maxSharedHits{
this,
"maxSharedHits", {},
"TrackSelector: maxSharedHits"};
135 Gaudi::Property<std::vector<double>>
m_maxChi2{
this,
"maxChi2", {},
"TrackSelector: maxChi2"};
137 Gaudi::Property<bool>
m_addCounts{
this,
"addCounts",
true,
"keep separate pixel, strip and hgtd counts and apply the following cuts"};
138 Gaudi::Property<bool>
m_checkCounts{
this,
"checkCounts",
false,
"check consistency among track state counts"};
139 Gaudi::Property<std::vector<std::size_t>>
m_minPixelHits{
this,
"minPixelHits", {},
"minimum number of pixel hits"};
140 Gaudi::Property<std::vector<std::size_t>>
m_minStripHits{
this,
"minStripHits", {},
"minimum number of strip hits"};
141 Gaudi::Property<std::vector<std::size_t>>
m_minHgtdHits{
this,
"minHgtdHits", {},
"minimum number of hgtd hits"};
142 Gaudi::Property<std::vector<std::size_t>>
m_maxPixelHoles{
this,
"maxPixelHoles", {},
"maximum number of pixel holes"};
143 Gaudi::Property<std::vector<std::size_t>>
m_maxStripHoles{
this,
"maxStripHoles", {},
"maximum number of strip holes"};
144 Gaudi::Property<std::vector<std::size_t>>
m_maxHgtdHoles{
this,
"maxHgtdHoles", {},
"maximum number of hgtd holes"};
145 Gaudi::Property<std::vector<std::size_t>>
m_maxPixelOutliers{
this,
"maxPixelOutliers", {},
"maximum number of pixel outliers"};
146 Gaudi::Property<std::vector<std::size_t>>
m_maxStripOutliers{
this,
"maxStripOutliers", {},
"maximum number of strip outliers"};
147 Gaudi::Property<std::vector<std::size_t>>
m_maxHgtdOutliers{
this,
"maxHgtdOutliers", {},
"maximum number of hgtd outliers"};
152 Gaudi::Property<std::vector<float>>
m_statEtaBins{
this,
"StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4},
"Gather statistics separately for these bins."};
153 Gaudi::Property<std::vector<std::string>>
m_seedLabels{
this,
"SeedLabels", {},
"One label per seed key used in outputs"};
154 Gaudi::Property<bool>
m_dumpAllStatEtaBins{
this,
"DumpEtaBinsForAll",
false,
"Dump eta bins of all statistics counter."};
177 using EventStats = std::vector<std::array<unsigned int, kNStat>>;
202 const Acts::PerigeeSurface* pSurface)
const;
215 template <
class HandleArrayKeyType,
class ContainerType>
217 const EventContext &ctx,
218 HandleArrayKeyType &handleKeyArray,
220 std::size_t &
sum)
const;
227 const Acts::TrackSelector::Config &
getCuts(
double eta)
const;
240 template <
class MeasurementSource>
241 std::unique_ptr<Acts::BoundTrackParameters>
doRefit(
242 const MeasurementSource &measurement,
243 const Acts::BoundTrackParameters &initialParameters,
245 const bool paramsAtOutermostSurface)
const;
247 using TrkProxy = Acts::TrackProxy<Acts::VectorTrackContainer, Acts::VectorMultiTrajectory, Acts::detail::RefHolder, false>;
264 std::vector<typename detail::RecoTrackContainer::TrackProxy>
287 const detail::RecoTrackContainer::TrackProxy &
track,
288 const detail::RecoTrackContainer::TrackStateProxy &trackState,
289 const Acts::TrackSelector::EtaBinnedConfig &trackSelectorCfg,
290 const Acts::GeometryContext &tgContext,
292 const std::size_t typeIndex,
293 EventStats::value_type &event_stat_category_i)
const;
296 static constexpr Acts::ProxyAccessor<unsigned int>
nPixelHits{
"nPixelHits"};
297 static constexpr Acts::ProxyAccessor<unsigned int>
nStripHits{
"nStripHits"};
298 static constexpr Acts::ProxyAccessor<unsigned int>
nHgtdHits{
"nHgtdHits"};
299 static constexpr Acts::ProxyAccessor<unsigned int>
nPixelHoles{
"nPixelHoles"};
300 static constexpr Acts::ProxyAccessor<unsigned int>
nStripHoles{
"nStripHoles"};
301 static constexpr Acts::ProxyAccessor<unsigned int>
nHgtdHoles{
"nHgtdHoles"};
302 static constexpr Acts::ProxyAccessor<unsigned int>
nPixelOutliers{
"nPixelOutliers"};
303 static constexpr Acts::ProxyAccessor<unsigned int>
nStripOutliers{
"nStripOutliers"};
304 static constexpr Acts::ProxyAccessor<unsigned int>
nHgtdOutliers{
"nHgtdOutliers"};
309 static void initCounts(
const detail::RecoTrackContainer::TrackProxy &
track);
311 Acts::ConstTrackStateType typeFlags,
313 void checkCounts(
const detail::RecoTrackContainer::TrackProxy &
track)
const;
314 std::array<bool, 3>
selectCounts(
const detail::RecoTrackContainer::TrackProxy &
track,
double eta)
const;
RecoTrackStateContainer::TrackStateProxy RecoTrackStateContainerProxy
SG::WriteHandleKey< ActsTrk::TrackContainer > m_trackContainerKey
static constexpr Acts::ProxyAccessor< unsigned int > nPixelOutliers
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.
Gaudi::Property< std::vector< double > > m_d0Min
Gaudi::Property< bool > m_doBranchStopper
Gaudi::Property< double > m_absEtaMax
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool
Gaudi::Property< std::vector< std::size_t > > m_maxStripHoles
Acts::TrackProxy< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory, Acts::detail::RefHolder, false > TrkProxy
Gaudi::Property< std::vector< double > > m_z0Max
static constexpr BranchState s_branchState
detail::xAODUncalibMeasSurfAcc m_unalibMeasSurfAcc
Acts::CombinatorialKalmanFilterOptions< detail::RecoTrackContainer > TrackFinderOptions
TrackFinderOptions options
static void updateCounts(const detail::RecoTrackContainer::TrackProxy &track, Acts::ConstTrackStateType typeFlags, xAOD::UncalibMeasType detType)
ActsTrk::MutableTrackContainerHandlesHelper m_tracksBackendHandlesHelper
Gaudi::Property< std::vector< double > > m_phiMax
Gaudi::Property< std::vector< double > > m_etaMin
Scalar eta() const
pseudorapidity method
Gaudi::Property< bool > m_addCounts
Gaudi::Property< std::vector< std::size_t > > m_maxHoles
virtual StatusCode initialize() override
virtual StatusCode finalize() override
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdHoles
Gaudi::Property< std::vector< std::size_t > > m_minHgtdHits
std::vector< std::array< unsigned int, kNStat > > EventStats
std::unique_ptr< ActsTrk::IMeasurementSelector > measurementSelector
Gaudi::Property< std::vector< std::size_t > > m_maxPixelHoles
static void addCounts(detail::RecoTrackContainer &tracksContainer)
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.
Gaudi::Property< bool > m_dumpAllStatEtaBins
static constexpr Acts::ProxyAccessor< unsigned int > nHgtdHits
Gaudi::Property< std::vector< double > > m_maxChi2
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Gaudi::Property< std::vector< std::size_t > > m_absEtaMaxMeasurements
Acts::CombinatorialKalmanFilterBranchStopperResult BranchStopperResult
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool
void printStatTables() const
std::size_t computeStatSum(std::size_t seed_collection, EStat counter_i, const EventStats &stat) const
Acts::MagneticFieldContext magField
static constexpr Acts::ProxyAccessor< unsigned int > nPixelHits
Gaudi::Property< double > m_branchStopperAbsEtaMaxExtra
Gaudi::Property< std::vector< double > > m_chi2OutlierCutOff
ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
Acts::TrackContainer< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory > RecoTrackContainer
Gaudi::Property< std::vector< std::size_t > > m_maxOutliers
static constexpr Acts::ProxyAccessor< unsigned int > nStripHoles
CKF_pimpl & trackFinder()
Gaudi::Property< std::vector< double > > m_etaMax
std::vector< std::pair< float, float > > m_chi2CutOffOutlier
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< std::vector< std::uint32_t > > m_endOfWorldVolumeIds
std::size_t getStatCategory(std::size_t seed_collection, float eta) const
void checkCounts(const detail::RecoTrackContainer::TrackProxy &track) const
Gaudi::Property< std::vector< std::size_t > > m_maxSharedHits
Gaudi::Property< double > m_branchStopperPtMinFactor
std::unique_ptr< ActsTrk::IMeasurementSelector > setMeasurementSelector(const detail::TrackFindingMeasurements &measurements, TrackFinderOptions &options) const
Setup and attach measurement selector to KF options.
Gaudi::Property< std::vector< double > > m_phiMin
Gaudi::Property< std::vector< std::size_t > > m_minMeasurements
Gaudi::Property< std::vector< double > > m_chi2CutOff
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...
Acts::CalibrationContext calib
Gaudi::Property< double > m_branchStopperMeasCutReduce
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.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::size_t seedCollectionStride() const
Gaudi::Property< std::vector< std::string > > m_seedLabels
Gaudi::Property< std::vector< std::size_t > > m_maxPixelOutliers
ToolHandle< GenericMonitoringTool > m_monTool
Gaudi::Property< std::vector< double > > m_d0Max
TrackFinderOptions secondOptions
static constexpr Acts::ProxyAccessor< unsigned int > nStripOutliers
static xAOD::UncalibMeasType measurementType(const detail::RecoTrackContainer::TrackStateProxy &trackState)
std::mutex m_mutex ATLAS_THREAD_SAFE
Gaudi::Property< double > m_branchStopperAbsEtaMeasCut
std::array< bool, 3 > selectCounts(const detail::RecoTrackContainer::TrackProxy &track, double eta) const
Gaudi::Property< unsigned int > m_maxPropagationStep
Acts::GeometryContext geometry
Gaudi::Property< std::vector< size_t > > m_numMeasurementsCutOff
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool
Gaudi::Property< std::vector< std::size_t > > m_minStripHits
@ kNStoppedTracksMaxHoles
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::vector< double > > m_etaBins
bool selectCountsFinal(const detail::RecoTrackContainer::TrackProxy &track) const
TrackFindingBaseAlg(const std::string &name, ISvcLocator *pSvcLocator)
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.
const Acts::TrackSelector::Config & getCuts(double eta) const
Retrieves track selector configuration for given eta value.
StatusCode initializeMeasurementSelector()
@ kNForcedSeedMeasurements
Gaudi::Property< std::vector< std::size_t > > m_minPixelHits
Gaudi::Property< bool > m_checkCounts
static constexpr Acts::ProxyAccessor< unsigned int > nStripHits
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
static constexpr Acts::ProxyAccessor< unsigned int > nPixelHoles
std::size_t nSeedCollections() const
Gaudi::Property< std::vector< double > > m_ptMin
Gaudi::Property< std::vector< double > > m_ptMax
Gaudi::Property< double > m_absEtaMin
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Gaudi::Property< std::vector< std::size_t > > m_ptMinMeasurements
ToolHandle< ActsTrk::TrackStatePrinterTool > m_trackStatePrinter
void copyStats(const EventStats &event_stat) const
static constexpr Acts::ProxyAccessor< unsigned int > nHgtdHoles
struct ActsTrk::TrackFindingBaseAlg::MeasurementSelectorConfig m_measurementSelectorConfig
static constexpr Acts::ProxyAccessor< unsigned int > nHgtdOutliers
UncalibMeasType
Define the type of the uncalibrated measurement.
std::vector< float > m_etaBins
Gaudi::Property< std::vector< float > > m_statEtaBins
Gaudi::Property< std::vector< std::size_t > > m_maxStripOutliers
static void initCounts(const detail::RecoTrackContainer::TrackProxy &track)
ToolHandle< ActsTrk::IFitterTool > m_fitterTool
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdOutliers
std::unique_ptr< CKF_pimpl > m_trackFinder
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
Gaudi::Property< std::vector< double > > m_z0Min
const Acts::Logger & logger() const
Private access to the logger.
Gaudi::Property< bool > m_doTwoWay