Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ACTSTRACKRECONSTRUCTION_TRACKFINDINGALG_H
6 #define ACTSTRACKRECONSTRUCTION_TRACKFINDINGALG_H
12 #include "GaudiKernel/ToolHandle.h"
22 #include "Acts/EventData/VectorTrackContainer.hpp"
23 #include "Acts/EventData/TrackContainer.hpp"
24 #include "Acts/EventData/ProxyAccessor.hpp"
25 #include "Acts/TrackFinding/TrackStateCreator.hpp"
45 #include "GaudiKernel/EventContext.h"
68 using DefaultTrackStateCreator = Acts::TrackStateCreator<ActsTrk::detail::UncalibSourceLinkAccessor::Iterator,detail::RecoTrackContainer>;
71 class TrackFindingMeasurements;
72 class SharedHitCounter;
80 ISvcLocator *pSvcLocator);
91 ToolHandle<GenericMonitoringTool>
m_monTool{
this,
"MonTool",
"",
"Monitoring tool"};
94 ToolHandle<ActsTrk::TrackStatePrinterTool>
m_trackStatePrinter{
this,
"TrackStatePrinter",
"",
"optional track state printer"};
96 ToolHandle< ActsTrk::ITrackParamsEstimationTool >
m_paramEstimationTool{
this,
"TrackParamsEstimationTool",
"",
"Track Param Estimation from Seeds"};
97 ToolHandle<ActsTrk::IFitterTool>
m_fitterTool{
this,
"FitterTool",
"",
"Fitter Tool for Seeds"};
98 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
m_pixelCalibTool{
99 this,
"PixelCalibrator",
"",
"Opt. pixel measurement calibrator"};
100 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
m_stripCalibTool{
101 this,
"StripCalibrator",
"",
"Opt. strip measurement calibrator"};
102 ToolHandle<ActsTrk::IOnTrackCalibratorTool<detail::RecoTrackStateContainer>>
m_hgtdCalibTool{
103 this,
"HGTDCalibrator",
"",
"Opt. HGTD measurement calibrator"};
112 {
this,
"DetectorElementToActsGeometryIdMapKey",
"DetectorElementToActsGeometryIdMap",
113 "Map which associates detector elements to Acts Geometry IDs"};
115 {
this,
"ActsVolumeIdToDetectorElementCollectionMapKey",
"ActsVolumeIdToDetectorElementCollectionMap",
116 "Map which associates Acts geometry volume IDs to detector element collections."};
119 {
this,
"DetElStatus", {},
"Keys for detector element status conditions data."};
126 Gaudi::Property<unsigned int>
m_maxPropagationStep{
this,
"maxPropagationStep", 1000,
"Maximum number of steps for one propagate call"};
127 Gaudi::Property<bool>
m_skipDuplicateSeeds{
this,
"skipDuplicateSeeds",
true,
"skip duplicate seeds before calling CKF"};
128 Gaudi::Property<std::vector<bool>>
m_refitSeeds{
this,
"refitSeeds", {},
"Run KalmanFitter on seeds before passing to CKF, specified separately for each seed collection"};
129 Gaudi::Property<std::vector<double>>
m_etaBins{
this,
"etaBins", {},
"bins in |eta| to specify variable selections"};
131 Gaudi::Property<std::vector<double>>
m_chi2CutOff{
this,
"chi2CutOff", {},
"MeasurementSelector: maximum local chi2 contribution"};
132 Gaudi::Property<std::vector<double>>
m_chi2OutlierCutOff{
this,
"chi2OutlierCutOff", {},
"MeasurementSelector: maximum local chi2 contribution for outlier"};
133 Gaudi::Property<std::vector<size_t>>
m_numMeasurementsCutOff{
this,
"numMeasurementsCutOff", {},
"MeasurementSelector: maximum number of associated measurements on a single surface"};
134 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"};
135 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"};
137 Gaudi::Property<bool>
m_doTwoWay{
this,
"doTwoWay",
true,
"run CKF twice, first with forward propagation with smoothing, then with backward propagation"};
138 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"};
140 Gaudi::Property<double>
m_branchStopperPtMinFactor{
this,
"branchStopperPtMinFactor", 1.0,
"factor to multiply ptMin cut when used in the branch stopper"};
142 Gaudi::Property<bool>
m_countSharedHits{
this,
"countSharedHits",
true,
"add shared hit flags to tracks"};
146 Gaudi::Property<std::vector<double>>
m_phiMin{
this,
"phiMin", {},
"TrackSelector: phiMin"};
147 Gaudi::Property<std::vector<double>>
m_phiMax{
this,
"phiMax", {},
"TrackSelector: phiMax"};
148 Gaudi::Property<std::vector<double>>
m_etaMin{
this,
"etaMin", {},
"TrackSelector: etaMin"};
149 Gaudi::Property<std::vector<double>>
m_etaMax{
this,
"etaMax", {},
"TrackSelector: etaMax"};
150 Gaudi::Property<double>
m_absEtaMin{
this,
"absEtaMin", 0.0,
"TrackSelector: absEtaMin"};
152 Gaudi::Property<std::vector<double>>
m_ptMin{
this,
"ptMin", {},
"TrackSelector: ptMin"};
153 Gaudi::Property<std::vector<double>>
m_ptMax{
this,
"ptMax", {},
"TrackSelector: ptMax"};
154 Gaudi::Property<std::vector<double>>
m_d0Min{
this,
"d0Min", {},
"TrackSelector: d0Min"};
155 Gaudi::Property<std::vector<double>>
m_d0Max{
this,
"d0Max", {},
"TrackSelector: d0Max"};
156 Gaudi::Property<std::vector<double>>
m_z0Min{
this,
"z0Min", {},
"TrackSelector: z0Min"};
157 Gaudi::Property<std::vector<double>>
m_z0Max{
this,
"z0Max", {},
"TrackSelector: z0Max"};
159 Gaudi::Property<std::vector<std::size_t>>
m_minMeasurements{
this,
"minMeasurements", {},
"TrackSelector: minMeasurements"};
160 Gaudi::Property<std::vector<std::size_t>>
m_maxHoles{
this,
"maxHoles", {},
"TrackSelector: maxHoles"};
161 Gaudi::Property<std::vector<std::size_t>>
m_maxOutliers{
this,
"maxOutliers", {},
"TrackSelector: maxOutliers"};
162 Gaudi::Property<std::vector<std::size_t>>
m_maxSharedHits{
this,
"maxSharedHits", {},
"TrackSelector: maxSharedHits"};
163 Gaudi::Property<std::vector<double>>
m_maxChi2{
this,
"maxChi2", {},
"TrackSelector: maxChi2"};
165 Gaudi::Property<bool>
m_addPixelStripCounts{
this,
"addPixelStripCounts",
true,
"keep separate pixel and strip counts and apply the following cuts"};
166 Gaudi::Property<std::vector<std::size_t>>
m_minPixelHits{
this,
"minPixelHits", {},
"minimum number of pixel hits"};
167 Gaudi::Property<std::vector<std::size_t>>
m_minStripHits{
this,
"minStripHits", {},
"minimum number of strip hits"};
168 Gaudi::Property<std::vector<std::size_t>>
m_maxPixelHoles{
this,
"maxPixelHoles", {},
"maximum number of pixel holes"};
169 Gaudi::Property<std::vector<std::size_t>>
m_maxStripHoles{
this,
"maxStripHoles", {},
"maximum number of strip holes"};
170 Gaudi::Property<std::vector<std::size_t>>
m_maxPixelOutliers{
this,
"maxPixelOutliers", {},
"maximum number of pixel outliers"};
171 Gaudi::Property<std::vector<std::size_t>>
m_maxStripOutliers{
this,
"maxStripOutliers", {},
"maximum number of strip outliers"};
174 Gaudi::Property<std::vector<float>>
m_statEtaBins{
this,
"StatisticEtaBins", {-4, -2.6, -2, 0, 2., 2.6, 4},
"Gather statistics separately for these bins."};
175 Gaudi::Property<std::vector<std::string>>
m_seedLabels{
this,
"SeedLabels", {},
"One label per seed key used in outputs"};
176 Gaudi::Property<bool>
m_dumpAllStatEtaBins{
this,
"DumpEtaBinsForAll",
false,
"Dump eta bins of all statistics counter."};
205 using EventStats = std::vector<std::array<unsigned int, kNStat>>;
224 const std::vector< const InDet::SiDetectorElementStatus *> &det_el_status_arr,
240 template <
class HandleArrayKeyType,
class ContainerType>
242 const EventContext &ctx,
243 HandleArrayKeyType &handleKeyArray,
245 std::size_t &
sum)
const;
256 const Acts::PerigeeSurface* pSurface)
const;
273 const detail::RecoTrackContainer::TrackProxy &track,
274 const detail::RecoTrackContainer::TrackStateProxy &trackState,
275 const Acts::TrackSelector::EtaBinnedConfig &trackSelectorCfg,
276 const Acts::GeometryContext &tgContext,
278 const std::size_t typeIndex,
279 EventStats::value_type &event_stat_category_i)
const;
307 template <
class MeasurementSource>
308 std::unique_ptr<Acts::BoundTrackParameters>
doRefit(
309 const EventContext &ctx,
310 const MeasurementSource &measurement,
311 const Acts::BoundTrackParameters &initialParameters,
314 const bool paramsAtOutermostSurface)
const;
316 using TrkProxy = Acts::TrackProxy<Acts::VectorTrackContainer, Acts::VectorMultiTrajectory, Acts::detail::RefHolder, false>;
338 Acts::GeometryContext &tgContext,
339 const bool reverseSearch)
const;
366 std::size_t seedCollectionIndex,
367 const char *seedType,
381 const Acts::TrackSelector::Config &
getCuts (
double eta)
const;
395 static constexpr Acts::ProxyAccessor<unsigned int>
nPixelHits{
"nPixelHits"};
396 static constexpr Acts::ProxyAccessor<unsigned int>
nStripHits{
"nStripHits"};
397 static constexpr Acts::ProxyAccessor<unsigned int>
nPixelHoles{
"nPixelHoles"};
398 static constexpr Acts::ProxyAccessor<unsigned int>
nStripHoles{
"nStripHoles"};
399 static constexpr Acts::ProxyAccessor<unsigned int>
nPixelOutliers{
"nPixelOutliers"};
400 static constexpr Acts::ProxyAccessor<unsigned int>
nStripOutliers{
"nStripOutliers"};
407 Acts::ConstTrackStateType typeFlags,
410 const detail::RecoTrackContainer::TrackProxy &
other);
412 std::array<bool, 3>
selectPixelStripCounts(
const detail::RecoTrackContainer::TrackProxy &track,
double eta)
const;
427 std::size_t
getStatCategory(std::size_t seed_collection,
float eta)
const;
Gaudi::Property< std::vector< std::size_t > > m_maxPixelHoles
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool
std::vector< std::pair< float, float > > m_chi2CutOffOutlier
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
std::array< bool, 3 > selectPixelStripCounts(const detail::RecoTrackContainer::TrackProxy &track, double eta) const
Gaudi::Property< std::vector< std::size_t > > m_maxSharedHits
Gaudi::Property< std::vector< float > > m_statEtaBins
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Gaudi::Property< double > m_branchStopperAbsEtaMaxExtra
Acts::CombinatorialKalmanFilterOptions< detail::RecoTrackContainer > TrackFinderOptions
Acts::MagneticFieldContext magField
const Acts::Logger & logger() const
Private access to the logger.
std::unique_ptr< ActsTrk::IMeasurementSelector > measurementSelector
Gaudi::Property< double > m_absEtaMax
Gaudi::Property< std::vector< std::size_t > > m_maxStripHoles
static xAOD::UncalibMeasType measurementType(const detail::RecoTrackContainer::TrackStateProxy &trackState)
SG::ReadCondHandleKey< ActsTrk::DetectorElementToActsGeometryIdMap > m_detectorElementToGeometryIdMapKey
TrackFindingAlg(const std::string &name, ISvcLocator *pSvcLocator)
struct ActsTrk::TrackFindingAlg::MeasurementSelectorConfig m_measurementSelectorConfig
StatusCode findTracks(const EventContext &ctx, const ActsTrk::DetectorElementToActsGeometryIdMap &detectorElementToGeoId, const detail::TrackFindingMeasurements &measurements, const detail::MeasurementIndex &measurementIndex, detail::SharedHitCounter &sharedHits, detail::DuplicateSeedDetector &duplicateSeedDetector, const ActsTrk::SeedContainer &seeds, const InDetDD::SiDetectorElementCollection &detElements, ActsTrk::MutableTrackContainer &tracksContainer, std::size_t seedCollectionIndex, const char *seedType, EventStats &event_stat) const
invoke track finding procedure
static constexpr Acts::ProxyAccessor< unsigned int > nPixelOutliers
ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool
static void addPixelStripCounts(detail::RecoTrackContainer &tracksContainer)
Gaudi::Property< bool > m_autoReverseSearch
Gaudi::Property< std::vector< double > > m_phiMin
static void initPixelStripCounts(const detail::RecoTrackContainer::TrackProxy &track)
Gaudi::Property< std::vector< bool > > m_refitSeeds
CKF_pimpl & trackFinder()
Gaudi::Property< double > m_branchStopperPtMinFactor
static constexpr Acts::ProxyAccessor< unsigned int > nStripHoles
Gaudi::Property< std::vector< std::size_t > > m_maxOutliers
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
Acts::GeometryContext geometry
RecoTrackContainer::TrackProxy RecoTrackContainerProxy
static constexpr Acts::ProxyAccessor< unsigned int > nStripOutliers
SG::ReadHandleKeyArray< ActsTrk::SeedContainer > m_seedContainerKeys
Gaudi::Property< std::vector< std::size_t > > m_minPixelHits
Acts::TrackContainer< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory > RecoTrackContainer
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 EventContext &ctx, const MeasurementSource &measurement, const Acts::BoundTrackParameters &initialParameters, const DetectorContextHolder &detContext, const ActsTrk::DetectorElementToActsGeometryIdMap &detectorElementToGeoId, const bool paramsAtOutermostSurface) const
Perform Kalman Filter fit and update given initialParameters.
std::vector< float > m_etaBins
Gaudi::Property< std::vector< double > > m_z0Min
Gaudi::Property< unsigned int > m_maxPropagationStep
An algorithm that can be simultaneously executed in multiple threads.
std::size_t nSeedCollections() const
static constexpr Acts::ProxyAccessor< unsigned int > nPixelHoles
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_uncalibratedMeasurementContainerKeys
void copyStats(const EventStats &event_stat) const
Gaudi::Property< std::vector< double > > m_chi2OutlierCutOff
virtual StatusCode finalize() override
void printStatTables() const
GenUncalibSourceLinkAccessor< MeasurementRangeList > UncalibSourceLinkAccessor
std::mutex m_mutex ATLAS_THREAD_SAFE
static constexpr BranchState s_branchState
TrackFinderOptions secondOptions
std::size_t computeStatSum(std::size_t seed_collection, EStat counter_i, const EventStats &stat) const
Gaudi::Property< bool > m_addPixelStripCounts
Gaudi::Property< std::vector< std::string > > m_seedLabels
Gaudi::Property< bool > m_countSharedHits
Acts::CalibrationContext calib
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool
Accessor for the above source link container.
Gaudi::Property< std::vector< double > > m_d0Max
bool shouldReverseSearch(const ActsTrk::Seed &seed) const
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< double > > m_useTopSpRZboundary
Gaudi::Property< std::vector< double > > m_ptMin
void storeSeedInfo(const detail::RecoTrackContainer &tracksContainer, const detail::RecoTrackContainerProxy &track, detail::DuplicateSeedDetector &duplicateSeedDetector, const detail::MeasurementIndex &measurementIndex) const
SG::ReadCondHandleKeyArray< InDetDD::SiDetectorElementCollection > m_detEleCollKeys
StatusCode initializeMeasurementSelector()
TrackFinderOptions options
Acts::Seed< xAOD::SpacePoint, 3ul > Seed
Gaudi::Property< double > m_absEtaMin
Gaudi::Property< std::vector< std::size_t > > m_maxPixelOutliers
Gaudi::Property< std::vector< size_t > > m_numMeasurementsCutOff
ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
ToolHandle< GenericMonitoringTool > m_monTool
ToolHandle< ActsTrk::TrackStatePrinterTool > m_trackStatePrinter
virtual StatusCode initialize() override
void checkPixelStripCounts(const detail::RecoTrackContainer::TrackProxy &track) const
Property holding a SG store/key/clid from which a WriteHandle is made.
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.
std::unique_ptr< ActsTrk::IMeasurementSelector > setMeasurementSelector(const detail::TrackFindingMeasurements &measurements, TrackFinderOptions &options) const
Setup and attach measurement selector to KF options.
static constexpr Acts::ProxyAccessor< unsigned int > nPixelHits
Gaudi::Property< std::vector< double > > m_z0Max
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...
virtual ~TrackFindingAlg()
Gaudi::Property< std::vector< double > > m_chi2CutOff
SG::ReadCondHandleKey< ActsTrk::ActsVolumeIdToDetectorElementCollectionMap > m_volumeIdToDetectorElementCollMapKey
static void copyPixelStripCounts(const detail::RecoTrackContainer::TrackProxy &track, const detail::RecoTrackContainer::TrackProxy &other)
Gaudi::Property< bool > m_doBranchStopper
Gaudi::Property< std::vector< std::size_t > > m_maxStripOutliers
Gaudi::Property< bool > m_skipDuplicateSeeds
std::size_t getStatCategory(std::size_t seed_collection, float eta) const
static constexpr Acts::ProxyAccessor< unsigned int > nStripHits
Gaudi::Property< std::vector< std::size_t > > m_minStripHits
std::size_t doTwoWayTrackFinding(std::function< void(detail::RecoTrackContainerProxy &)> addTrack, TrkProxy &trackProxy, detail::RecoTrackContainer &tracksContainerTemp, const TrackFinderOptions &options, Acts::GeometryContext &tgContext, const bool reverseSearch) const
Perform two-way track finding.
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::vector< double > > m_etaMin
Gaudi::Property< std::vector< std::size_t > > m_minMeasurements
Gaudi::Property< std::vector< std::uint32_t > > m_endOfWorldVolumeIds
static void updatePixelStripCounts(const detail::RecoTrackContainer::TrackProxy &track, Acts::ConstTrackStateType typeFlags, xAOD::UncalibMeasType detType)
Gaudi::Property< std::vector< std::size_t > > m_ptMinMeasurements
std::unique_ptr< const Acts::Logger > m_logger
logging instance
const Acts::TrackSelector::Config & getCuts(double eta) const
Retrieves track selector configuration for given eta value.
ActsTrk::MutableTrackContainerHandlesHelper m_tracksBackendHandlesHelper
UncalibMeasType
Define the type of the uncalibrated measurement.
std::unique_ptr< CKF_pimpl > m_trackFinder
Gaudi::Property< bool > m_doTwoWay
Acts::TrackProxy< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory, Acts::detail::RefHolder, false > TrkProxy
std::vector< std::array< unsigned int, kNStat > > EventStats
SG::WriteHandleKey< ActsTrk::TrackContainer > m_trackContainerKey
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Gaudi::Property< std::vector< std::size_t > > m_absEtaMaxMeasurements
Gaudi::Property< std::vector< double > > m_etaBins
SG::ReadHandleKeyArray< InDet::SiDetectorElementStatus > m_detElStatus
Gaudi::Property< std::vector< double > > m_maxChi2
std::size_t seedCollectionStride() const
Gaudi::Property< std::vector< double > > m_ptMax
Gaudi::Property< std::vector< double > > m_phiMax
Gaudi::Property< bool > m_dumpAllStatEtaBins
Gaudi::Property< std::vector< double > > m_etaMax
Acts::TrackStateCreator< ActsTrk::detail::UncalibSourceLinkAccessor::Iterator, detail::RecoTrackContainer > DefaultTrackStateCreator
@ kNStoppedTracksMaxHoles
ToolHandle< ActsTrk::IFitterTool > m_fitterTool
ToolHandle< ActsTrk::IOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool
Gaudi::Property< std::vector< double > > m_d0Min
Gaudi::Property< std::vector< std::size_t > > m_maxHoles
Acts::CombinatorialKalmanFilterBranchStopperResult BranchStopperResult