14#include "Acts/Surfaces/PerigeeSurface.hpp"
15#include "Acts/TrackFitting/GsfMixtureReduction.hpp"
19#include <boost/math/distributions/chi_squared.hpp>
108 if(trackingGeometry->geometryVersion() == Acts::TrackingGeometry::GeometryVersion::Gen3) {
112 case Acts::toUnderlying(
ITkExit):
120 ATH_MSG_ERROR(
"Invalid configuration "<<m_envelopeConstraint);
121 return StatusCode::FAILURE;
127 std::vector<double> absEtaEdges;
128 if (m_etaBins.size() <= 2)
130 absEtaEdges.reserve(2ul);
131 absEtaEdges.push_back(0.0);
132 absEtaEdges.push_back(std::numeric_limits<double>::infinity());
136 absEtaEdges.reserve(m_etaBins.size());
137 absEtaEdges.push_back(m_absEtaMin);
138 absEtaEdges.insert(absEtaEdges.end(), m_etaBins.begin() + 1, m_etaBins.end() - 1);
139 absEtaEdges.push_back(m_absEtaMax);
142 auto setCut = [](
auto &cfgVal,
const auto &
cuts,
size_t ind) ->
void
149 Acts::TrackSelector::EtaBinnedConfig trackSelectorCfg{std::move(absEtaEdges)};
150 if (m_etaBins.size() <= 2)
152 assert(trackSelectorCfg.cutSets.size() == 1);
153 trackSelectorCfg.cutSets[0].absEtaMin = m_absEtaMin;
154 trackSelectorCfg.cutSets[0].absEtaMax = m_absEtaMax;
157 for (
auto &cfg : trackSelectorCfg.cutSets)
159 setCut(
cfg.phiMin, m_phiMin, cutIndex);
160 setCut(
cfg.phiMax, m_phiMax, cutIndex);
161 setCut(
cfg.etaMin, m_etaMin, cutIndex);
162 setCut(
cfg.etaMax, m_etaMax, cutIndex);
163 setCut(
cfg.ptMin, m_ptMin, cutIndex);
164 setCut(
cfg.ptMax, m_ptMax, cutIndex);
165 setCut(
cfg.loc0Min, m_d0Min, cutIndex);
166 setCut(
cfg.loc0Max, m_d0Max, cutIndex);
167 setCut(
cfg.loc1Min, m_z0Min, cutIndex);
168 setCut(
cfg.loc1Max, m_z0Max, cutIndex);
169 setCut(
cfg.minMeasurements, m_minMeasurements, cutIndex);
170 setCut(
cfg.maxHoles, m_maxHoles, cutIndex);
171 setCut(
cfg.maxOutliers, m_maxOutliers, cutIndex);
172 setCut(
cfg.maxHolesAndOutliers, m_maxHolesAndOutliers, cutIndex);
173 setCut(
cfg.maxSharedHits, m_maxSharedHits, cutIndex);
174 setCut(
cfg.maxChi2, m_maxChi2, cutIndex);
181 ATH_CHECK(initializeMeasurementSelector());
183 m_trackFinder = getTrackFindingFunction(trackingGeometry, trackSelectorCfg);
186 m_bremTrackFinder = getBremTrackFindingFunction(trackingGeometry, trackSelectorCfg);
191 return StatusCode::SUCCESS;
195 ATH_MSG_FATAL(
"execute() method from the base class was called! Implement proper execute() method in the derived class!");
197 return StatusCode::FAILURE;
203 return StatusCode::SUCCESS;
207 const EventContext &ctx,
222 measurementSelector->connect(&options.extensions.createTrackStates);
224 return measurementSelector;
228 Acts::TrackSelector::EtaBinnedConfig trackSelectorCfg)
230 auto magneticField = std::make_unique<ATLASMagneticFieldWrapper>();
233 detail::Navigator::Config config(trackingGeometry);
234 config.resolvePassive =
false;
235 config.resolveMaterial =
true;
236 config.resolveSensitive =
true;
244 std::move(extrapolator),
245 Acts::TrackSelector{trackSelectorCfg}
251 return std::make_unique<CKF_pimpl>(std::move(ckfConfig));
255 Acts::TrackSelector::EtaBinnedConfig trackSelectorCfg)
257 auto magneticField = std::make_unique<ATLASMagneticFieldWrapper>();
258 auto bremMagneticField = std::make_unique<ATLASMagneticFieldWrapper>();
261 detail::Navigator::Config bremConfig{trackingGeometry};
262 bremConfig.resolvePassive =
false;
263 bremConfig.resolveMaterial =
true;
264 bremConfig.resolveSensitive =
true;
269 detail::Navigator::Config config(trackingGeometry);
270 config.resolvePassive =
false;
271 config.resolveMaterial =
true;
272 config.resolveSensitive =
true;
280 std::move(extrapolator),
281 Acts::TrackSelector{trackSelectorCfg}
287 return std::make_unique<bremCKF_pimpl>(std::move(bremCkfConfig));
292 const EventContext &ctx,
295 const Acts::PerigeeSurface* pSurface)
const {
296 Acts::PropagatorPlainOptions plainOptions{detContext.
geometry, detContext.
magField};
298 plainOptions.direction = Acts::Direction::Forward();
306 std::unique_ptr<ActsTrk::IMeasurementSelector> measurementSelector =
setMeasurementSelector(ctx, measurements, options);
308 Acts::PropagatorPlainOptions plainSecondOptions{detContext.
geometry, detContext.
magField};
310 plainSecondOptions.direction = plainOptions.direction.invert();
314 options.extensions, plainSecondOptions);
315 secondOptions.targetSurface = pSurface;
316 secondOptions.skipPrePropagationUpdate =
true;
319 return {std::move(options), std::move(secondOptions), std::move(measurementSelector)};
323 const EventContext &ctx,
326 const Acts::PerigeeSurface* pSurface)
const {
327 Acts::PropagatorPlainOptions plainOptions{detContext.
geometry, detContext.
magField};
329 plainOptions.direction = Acts::Direction::Forward();
340 options.extensions.mixtureReducer.connect<&Acts::reduceMixtureWithKLDistance>();
341 options.betheHeitlerApprox = std::make_shared<Acts::PolynomialBetheHeitlerApprox>(Acts::makeDefaultBetheHeitlerApprox());
343 std::unique_ptr<ActsTrk::IMeasurementSelector> measurementSelector =
setMeasurementSelector(ctx, measurements, options);
345 Acts::PropagatorPlainOptions plainSecondOptions{detContext.
geometry, detContext.
magField};
347 plainSecondOptions.direction = plainOptions.direction.invert();
351 options.extensions, plainSecondOptions, pSurface);
352 secondOptions.targetSurface = pSurface;
353 secondOptions.skipPrePropagationUpdate =
true;
359 secondOptions.betheHeitlerApprox = std::make_shared<Acts::PolynomialBetheHeitlerApprox>(Acts::makeDefaultBetheHeitlerApprox());
362 options.mergeMethod = Acts::ComponentMergeMethod::eMaxWeight;
363 secondOptions.mergeMethod = Acts::ComponentMergeMethod::eMaxWeight;
366 options.mergeMethod = Acts::ComponentMergeMethod::eMean;
367 secondOptions.mergeMethod = Acts::ComponentMergeMethod::eMean;
370 throw std::runtime_error(
"Unknown option for GSF component merge method: " +
m_bremMergeMethod.value());
373 return {std::move(options), std::move(secondOptions), std::move(measurementSelector)};
377 const auto &trackSelectorCfg =
trackFinder().trackSelector.config();
379 return (!(std::abs(
eta) < trackSelectorCfg.absEtaEdges.back())) ? trackSelectorCfg.cutSets.back()
380 : (std::abs(
eta) < trackSelectorCfg.absEtaEdges.front()) ? trackSelectorCfg.cutSets.front()
381 : trackSelectorCfg.getCuts(
eta);
387 detail::RecoTrackContainer::TrackProxy &rootBranch)
const
389 return trackFinder().ckf.findTracks(seedParameters, options, tracksContainerTemp, rootBranch);
395 detail::RecoTrackContainer::TrackProxy &rootBranch)
const
397 const Acts::BoundTrackParameters elTrackParameters = seedParameters.withParticleHypothesis(Acts::ParticleHypothesis::electron());
398 return bremTrackFinder().ckf.findTracks(elTrackParameters, options, tracksContainerTemp, rootBranch);
403 ATH_MSG_VERBOSE(
"Original parameters before inflation: \n" << secondInitialParameters);
405 auto inflatedCovariance = secondInitialParameters.covariance().value();
408 const auto& origSurface = secondInitialParameters.referenceSurface();
409 auto surfacePtr =
const_cast<Acts::Surface&
>(origSurface).shared_from_this();
411 Acts::BoundTrackParameters newParams(
412 std::static_pointer_cast<const Acts::Surface>(std::move(surfacePtr)),
413 secondInitialParameters.parameters(),
414 std::make_optional(inflatedCovariance),
415 secondInitialParameters.particleHypothesis());
416 secondInitialParameters = std::move(newParams);
418 ATH_MSG_VERBOSE(
"Inflated covariance matrix : \n" << secondInitialParameters.covariance().value());
421 if (trackState.hasReferenceSurface()) {
422 if (
const auto *actsDetElem =
dynamic_cast<const ISurfacePlacement*
>(trackState.referenceSurface().surfacePlacement())) {
423 switch (actsDetElem->detectorType()) {
439 const detail::RecoTrackContainer::TrackProxy &track,
440 const detail::RecoTrackContainer::TrackStateProxy &trackState,
441 const Acts::TrackSelector::EtaBinnedConfig &trackSelectorCfg,
442 const Acts::GeometryContext &tgContext,
444 const std::size_t typeIndex,
445 EventStats::value_type &event_stat_category_i)
const {
456 measurementIndex,
true);
460 return BranchStopperResult::Continue;
463 const auto ¶meters = trackState.hasFiltered() ? trackState.filtered()
464 : trackState.predicted();
465 double eta = -std::log(std::tan(0.5 * parameters[Acts::eBoundTheta]));
470 double pT = std::sin(parameters[Acts::eBoundTheta]) /
471 parameters[Acts::eBoundQOverP];
475 << pT <<
" after " << track.nMeasurements()
477 return BranchStopperResult::StopAndDrop;
483 !(std::abs(
eta) < trackSelectorCfg.absEtaEdges.back() +
487 <<
eta <<
" after " << track.nMeasurements()
489 return BranchStopperResult::StopAndDrop;
495 bool enoughMeasurements = (track.nMeasurements() >= minMeasurementsBranchStop);
496 bool tooManyHoles = (track.nHoles() > cutSet.maxHoles);
497 bool tooManyOutliers = (track.nOutliers() > cutSet.maxOutliers);
498 bool tooManyHolesAndOutliers = (track.nHoles() + track.nOutliers() > cutSet.maxHolesAndOutliers);
501 auto [enoughMeasurementsPS, tooManyHolesPS, tooManyOutliersPS] =
503 enoughMeasurements = enoughMeasurements && enoughMeasurementsPS;
504 tooManyHoles = tooManyHoles || tooManyHolesPS;
505 tooManyOutliers = tooManyOutliers || tooManyOutliersPS;
508 if (!(tooManyHoles || tooManyOutliers || tooManyHolesAndOutliers)) {
509 return BranchStopperResult::Continue;
512 if (!enoughMeasurements) {
518 << (enoughMeasurements ?
"keep" :
"drop")
519 <<
" branch with nHoles=" << track.nHoles() <<
" ("
523 <<
" hgtd), nOutliers=" << track.nOutliers() <<
" ("
527 <<
"), nMeasurements=" << track.nMeasurements() <<
" ("
533 << (enoughMeasurements ?
"keep" :
"drop")
534 <<
" branch with nHoles=" << track.nHoles()
535 <<
", nOutliers=" << track.nOutliers()
536 <<
", nMeasurements=" << track.nMeasurements());
539 return enoughMeasurements ? BranchStopperResult::StopAndKeep
540 : BranchStopperResult::StopAndDrop;
547 tracksContainer.addColumn<
unsigned int>(
"nPixelHits");
548 tracksContainer.addColumn<
unsigned int>(
"nStripHits");
549 tracksContainer.addColumn<
unsigned int>(
"nHgtdHits");
550 tracksContainer.addColumn<
unsigned int>(
"nPixelHoles");
551 tracksContainer.addColumn<
unsigned int>(
"nStripHoles");
552 tracksContainer.addColumn<
unsigned int>(
"nHgtdHoles");
553 tracksContainer.addColumn<
unsigned int>(
"nPixelOutliers");
554 tracksContainer.addColumn<
unsigned int>(
"nStripOutliers");
555 tracksContainer.addColumn<
unsigned int>(
"nHgtdOutliers");
574 const detail::RecoTrackContainer::TrackProxy &track,
577 if (typeFlags.isHole()) {
579 }
else if (typeFlags.isOutlier()) {
581 }
else if (typeFlags.isMeasurement()) {
585 if (typeFlags.isHole()) {
587 }
else if (typeFlags.isOutlier()) {
589 }
else if (typeFlags.isMeasurement()) {
593 if (typeFlags.isHole()) {
595 }
else if (typeFlags.isOutlier()) {
597 }
else if (typeFlags.isMeasurement()) {
607 ATH_MSG_WARNING(
"mismatched hit count: total (" << track.nMeasurements()
619 ATH_MSG_WARNING(
"mismatched outlier count: total (" << track.nOutliers()
627 bool enoughMeasurements =
true, tooManyHoles =
false, tooManyOutliers =
false;
629 std::size_t etaBin = (std::abs(
eta) < trackSelectorCfg.absEtaEdges.front()) ? 0
630 : (std::abs(
eta) >= trackSelectorCfg.absEtaEdges.back()) ? trackSelectorCfg.absEtaEdges.size() - 1
631 : trackSelectorCfg.binIndex(
eta);
632 auto cutMin = [etaBin](std::size_t val,
const std::vector<std::size_t> &cutSet) {
633 return !cutSet.empty() && (val < (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
635 auto cutMax = [etaBin](std::size_t val,
const std::vector<std::size_t> &cutSet) {
636 return !cutSet.empty() && (val > (etaBin < cutSet.size() ? cutSet[etaBin] : cutSet.back()));
649 return {enoughMeasurements, tooManyHoles, tooManyOutliers};
657 chi2CutOffOutlier.reserve( cutOff.size() );
658 if (!outlierCutOff.empty()) {
659 if (cutOff.size() != outlierCutOff.size()) {
660 ATH_MSG_ERROR(
"Outlier chi2 cut off provided but number of elements does not agree with"
661 " chi2 cut off for measurements which however is required: "
662 << cutOff.size() <<
" != " << outlierCutOff.size());
663 return StatusCode::FAILURE;
669 auto chi2Cut = [](
double cut, std::size_t dim) ->
float {
670 const double pValue = std::erfc(cut / std::numbers::sqrt2);
671 return static_cast<float>(boost::math::quantile(
672 boost::math::complement(boost::math::chi_squared_distribution<double>(dim), pValue)));
674 for (std::size_t idx = 0; idx < cutOff.size(); ++idx) {
675 std::array<std::pair<float, float>, 4> cuts{};
676 for (std::size_t dim = 1; dim < cuts.size(); ++dim) {
677 cuts[dim] = std::make_pair(chi2Cut(cutOff[idx], dim),
678 idx < outlierCutOff.size()
679 ? chi2Cut(outlierCutOff[idx], dim)
680 : std::numeric_limits<float>::max());
683 chi2CutOffOutlier.push_back(cuts);
684 ATH_MSG_DEBUG(
"Measurement selector eta bin " << idx <<
": chi2 cuts for "
685 << cutOff[idx] <<
" / "
686 << (idx < outlierCutOff.size() ? outlierCutOff[idx] : std::numeric_limits<double>::infinity())
687 <<
" sigma: 1D " << cuts[1].first <<
" / " << cuts[1].second
688 <<
", 2D " << cuts[2].first <<
" / " << cuts[2].second
689 <<
", 3D " << cuts[3].first <<
" / " << cuts[3].second);
696 return StatusCode::SUCCESS ;
710 ATH_MSG_FATAL(
"Eta bins for statistics counter not in ascending order.");
720 std::lock_guard<std::mutex>
lock(m_mutex);
721 std::size_t category_i = 0;
722 for (
const std::array<unsigned int, kNStat> &src_stat : event_stat)
724 std::array<std::size_t, kNStat> &dest_stat = m_stat[category_i++];
725 for (std::size_t i = 0; i < src_stat.size(); ++i)
727 assert(i < dest_stat.size());
728 dest_stat[i] += src_stat[i];
737 std::vector<std::string> stat_labels =
743 std::make_pair(
kNoTrack,
"Cannot find track"),
753 std::make_pair(
kNoSecond,
"Tracks failing second CKF"),
759 assert(stat_labels.size() ==
kNStat);
760 std::vector<std::string> categories;
763 categories.push_back(
"ALL");
765 std::vector<std::string> eta_labels;
767 for (std::size_t eta_bin_i = 0; eta_bin_i <
m_statEtaBins.size() + 2; ++eta_bin_i)
776 std::vector<std::size_t> stat =
782 std::size_t stat_stride =
786 std::size_t eta_stride =
790 std::stringstream table_out;
796 for (std::size_t stat_i = 0; stat_i <
kNStat; ++stat_i)
798 std::size_t dest_idx_offset = stat_i * stat_stride;
799 table_out <<
makeTable(stat, dest_idx_offset, eta_stride,
804 .dumpHeader(stat_i == 0)
805 .dumpFooter(stat_i + 1 ==
kNStat)
806 .separateLastRow(
true)
807 .minLabelWidth(max_label_width)
808 .labelPrefix(stat_labels.at(stat_i));
818 std::size_t dest_idx_offset = eta_bin_i * eta_stride;
819 table_out <<
makeTable(stat, dest_idx_offset, stat_stride,
822 eta_labels.at(eta_bin_i))
835 auto [ratio_labels, ratio_def] =
837 std::vector<TableUtils::SummandDefinition>{
873 for (std::size_t ratio_i = 0; ratio_i < ratio_labels.size(); ++ratio_i)
876 ratio_i * ratio_stride,
882 .dumpHeader(ratio_i == 0)
883 .dumpFooter(ratio_i + 1 == ratio_labels.size())
884 .separateLastRow(
true)
885 .minLabelWidth(max_label_width)
886 .labelPrefix(ratio_labels.at(ratio_i));
893 (
m_statEtaBins.size() + 1) * ratio_eta_stride + 0 * ratio_stride,
899 .minLabelWidth(max_label_width)
903 eta_labels.erase(eta_labels.end() - 1);
906 ratio_i * ratio_stride,
914 .separateLastRow(
false)
915 .minLabelWidth(max_label_width)
916 .labelPrefix(ratio_labels.at(ratio_i));
925 std::vector<float>::const_iterator bin_iter = std::upper_bound(
m_statEtaBins.begin(),
929 assert(category_i < m_stat.size());
934 std::size_t out = 0u;
939 assert(category_i < stat.size());
940 out += stat[category_i][counter_i];
947 double eta = -std::log(std::tan(0.5 * track.theta()));
948 auto [enoughMeasurementsPS, tooManyHolesPS, tooManyOutliersPS] =
selectCounts(track,
eta);
949 return enoughMeasurementsPS && !tooManyHolesPS && !tooManyOutliersPS;
953 const std::optional<Acts::BoundTrackParameters> &boundParams,
const ROIPhiRZContainer &caloClusterROIs
957 double phi = boundParams->phi();
958 double eta = Acts::AngleHelpers::etaFromTheta(boundParams->theta());
959 const Acts::Vector3 pos = boundParams->position(geoCtx);
960 double radius = pos.perp();
961 double z = boundParams->position(geoCtx).z();
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_INFO(x,...)
#define ATH_MSG_FATAL(x,...)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
TableUtils::StatTable< T > makeTable(const std::array< T, N > &counter, const std::array< std::string, N > &label)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Extension of the interface of the Acts::SurfacePlacementBase for ATLAS.
Gaudi::Property< std::vector< std::size_t > > m_maxStripHoles
const Acts::Logger & bremLogger() const
Gaudi::Property< double > m_branchStopperAbsEtaMeasCut
Gaudi::Property< std::vector< float > > m_statEtaBins
Gaudi::Property< double > m_seedPtMinFactor
Gaudi::Property< double > m_branchStopperPtMinFactor
Gaudi::Property< std::vector< std::size_t > > m_maxOutliers
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdHoles
std::unique_ptr< const Acts::Logger > m_logger
logging instance
void printStatTables() const
Gaudi::Property< std::vector< double > > m_etaBins
Gaudi::Property< bool > m_doTwoWay
Gaudi::Property< bool > m_dumpAllStatEtaBins
Gaudi::Property< std::vector< size_t > > m_numMeasurementsCutOff
Gaudi::Property< std::vector< std::size_t > > m_maxSharedHits
Gaudi::Property< unsigned int > m_maxPropagationStep
static xAOD::UncalibMeasType measurementType(const detail::RecoTrackContainer::TrackStateProxy &trackState)
ToolHandle< ActsTrk::TrackStatePrinterTool > m_trackStatePrinter
Gaudi::Property< double > m_edgeHoleBorderWidth
Gaudi::Property< std::vector< double > > m_etaMax
Gaudi::Property< std::vector< double > > m_ptMin
std::unique_ptr< bremCKF_pimpl > m_bremTrackFinder
Gaudi::Property< std::vector< std::size_t > > m_minPixelHits
Gaudi::Property< std::vector< std::size_t > > m_maxStripOutliers
SG::WriteHandleKey< ActsTrk::TrackContainer > m_trackContainerKey
Gaudi::Property< std::vector< double > > m_chi2CutOffSigma
Gaudi::Property< std::vector< double > > m_ptMax
void inflateCovarianceTwoWay(Acts::BoundTrackParameters &secondInitialParameters) const
Gaudi::Property< std::vector< std::size_t > > m_maxPixelHoles
static constexpr BranchState s_branchState
void copyStats(const EventStats &event_stat) const
Gaudi::Property< std::vector< double > > m_phiMin
std::unique_ptr< CKF_pimpl > getTrackFindingFunction(std::shared_ptr< const Acts::TrackingGeometry >, Acts::TrackSelector::EtaBinnedConfig)
Gaudi::Property< double > m_branchStopperMeasCutReduce
ToolHandle< ActsTrk::IPixelOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_pixelCalibTool
Gaudi::Property< std::vector< std::uint32_t > > m_endOfWorldVolumeIds
CKF_pimpl & trackFinder()
Gaudi::Property< std::vector< std::size_t > > m_minStripHits
ActsTrk::MutableTrackContainerHandlesHelper m_tracksBackendHandlesHelper
std::size_t getStatCategory(std::size_t seed_collection, float eta) const
std::size_t seedCollectionStride() const
Gaudi::Property< double > m_branchStopperAbsEtaMaxExtra
std::unique_ptr< const Acts::Logger > m_bremLogger
ToolHandle< GenericMonitoringTool > m_monTool
Gaudi::Property< std::vector< std::size_t > > m_absEtaMaxMeasurements
Gaudi::Property< double > m_phiWidthROI
TrackFindingBaseAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::vector< double > > m_etaMin
Gaudi::Property< bool > m_recordMaterialStates
Gaudi::Property< std::vector< double > > m_d0Min
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::string > m_bremMergeMethod
Gaudi::Property< double > m_bremWeightCutoff
@ kNStoppedTracksMaxHoles
@ kNForcedSeedMeasurements
Gaudi::Property< std::vector< std::size_t > > m_maxHgtdOutliers
Gaudi::Property< std::vector< double > > m_z0Max
Gaudi::Property< double > m_absEtaMax
std::size_t computeStatSum(std::size_t seed_collection, EStat counter_i, const EventStats &stat) const
virtual StatusCode initialize() override
Gaudi::Property< std::vector< double > > m_z0Min
void checkCounts(const detail::RecoTrackContainer::TrackProxy &track) const
Gaudi::Property< bool > m_doBranchStopper
static void addCountsAndProperties(detail::RecoTrackContainer &tracksContainer, bool add_counts)
Gaudi::Property< std::vector< std::size_t > > m_minMeasurements
Gaudi::Property< std::vector< double > > m_maxChi2
Gaudi::Property< double > m_absEtaMin
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.
Gaudi::Property< std::size_t > m_bremMaxComponents
static void initCounts(const detail::RecoTrackContainer::TrackProxy &track)
Gaudi::Property< std::vector< std::size_t > > m_maxPixelOutliers
const Acts::TrackSelector::Config & getCuts(double eta) const
Retrieves track selector configuration for given eta value.
Gaudi::Property< bool > m_checkCounts
Gaudi::Property< std::vector< std::size_t > > m_maxHoles
bremCKF_pimpl & bremTrackFinder()
ToolHandle< ActsTrk::IStripOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_stripCalibTool
std::array< bool, 3 > selectCounts(const detail::RecoTrackContainer::TrackProxy &track, double eta) const
std::unique_ptr< bremCKF_pimpl > getBremTrackFindingFunction(std::shared_ptr< const Acts::TrackingGeometry >, Acts::TrackSelector::EtaBinnedConfig)
Gaudi::Property< std::vector< std::size_t > > m_maxHolesAndOutliers
std::unique_ptr< CKF_pimpl > m_trackFinder
Gaudi::Property< std::vector< double > > m_chi2OutlierCutOffSigma
bool hasMatchingCaloROI(const Acts::GeometryContext &geoCtx, const std::optional< Acts::BoundTrackParameters > &boundParams, const ROIPhiRZContainer &caloClusterROIs) const
Acts::BremCombinatorialKalmanFilterOptions< detail::RecoTrackContainer > BremTrackFinderOptions
StatusCode initializeMeasurementSelector()
TrackFindingBremOptions getBremOptions(const EventContext &ctx, const DetectorContextHolder &detContext, const detail::TrackFindingMeasurements &measurements, const Acts::PerigeeSurface *pSurface) const
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
TrackFindingDefaultOptions getDefaultOptions(const EventContext &ctx, const DetectorContextHolder &detContext, const detail::TrackFindingMeasurements &measurements, const Acts::PerigeeSurface *pSurface) const
Get CKF options for first and second pass + pointer to MeasurementSelector.
Acts::CombinatorialKalmanFilterOptions< detail::RecoTrackContainer > TrackFinderOptions
virtual StatusCode finalize() override
ContextUtility m_ctxProvider
Utility to fetch the geometry, magnetic field and calibration context in the event.
std::vector< std::array< unsigned int, kNStat > > EventStats
ToolHandle< ActsTrk::IHGTDOnTrackCalibratorTool< detail::RecoTrackStateContainer > > m_hgtdCalibTool
Gaudi::Property< bool > m_doBremRecovery
Gaudi::Property< double > m_twoWayinflateCovarianceFactor
std::size_t nSeedCollections() const
static void updateCounts(const detail::RecoTrackContainer::TrackProxy &track, Acts::ConstTrackStateTypeMap typeFlags, xAOD::UncalibMeasType detType)
Gaudi::Property< bool > m_addCounts
Gaudi::Property< std::vector< std::size_t > > m_minHgtdHits
struct ActsTrk::TrackFindingBaseAlg::MeasurementSelectorConfig m_measurementSelectorConfig
Gaudi::Property< double > m_etaWidthROI
Acts::Result< std::vector< TrkProxy > > findTracksCKF(const Acts::BoundTrackParameters &seedParameters, const TrackFinderOptions &options, detail::RecoTrackContainer &tracksContainerTemp, detail::RecoTrackContainer::TrackProxy &rootBranch) const
Gaudi::Property< std::vector< double > > m_phiMax
Gaudi::Property< std::vector< std::size_t > > m_ptMinMeasurements
Gaudi::Property< std::vector< double > > m_d0Max
Acts::CombinatorialKalmanFilterBranchStopperResult BranchStopperResult
std::unique_ptr< ActsTrk::IMeasurementSelector > setMeasurementSelector(const EventContext &ctx, const detail::TrackFindingMeasurements &measurements, TrackFinderOptions &options) const
Setup and attach measurement selector to KF options.
Gaudi::Property< std::uint32_t > m_envelopeConstraint
Stop the propagation as soon as the envelope is left (Gen3 only).
bool selectCountsFinal(const detail::RecoTrackContainer::TrackProxy &track) const
Gaudi::Property< std::vector< std::string > > m_seedLabels
const MeasurementRangeList & measurementRanges() const
bool msgLvl(const MSG::Level lvl) const
An algorithm that can be simultaneously executed in multiple threads.
container for phi sorted ROIs defined by phi, r and z.
bool hasMatchingROI(float phi, double eta, double r, double z, float roi_phi_width, double roi_eta_width) const
Test whether there is a matching ROI for the given phi and r,z corrected eta.
static Root::TMsgLogger logger("iLumiCalc")
Acts::Result< void > gainMatrixUpdate(const Acts::GeometryContext &gctx, typename trajectory_t::TrackStateProxy trackState, const Acts::Logger &logger)
Acts::Propagator< BremStepper, Navigator > BremPropagator
Acts::Propagator< Stepper, Navigator > Propagator
Acts::SympyStepper Stepper
Adapted from Acts Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithmFunction....
Acts::CombinatorialKalmanFilter< BremPropagator, RecoTrackContainer > BremCKF
Acts::Navigator Navigator
std::unique_ptr< ActsTrk::IMeasurementSelector > getMeasurementSelector(const EventContext &ctx, const ActsTrk::IPixelOnTrackCalibratorTool< detail::RecoTrackStateContainer > *pixelOnTrackCalibratorTool, const ActsTrk::IStripOnTrackCalibratorTool< detail::RecoTrackStateContainer > *stripOnTrackCalibratorTool, const ActsTrk::IHGTDOnTrackCalibratorTool< detail::RecoTrackStateContainer > *hgtdOnTrackCalibratorTool, const ActsTrk::detail::MeasurementRangeList &measurementRanges, const std::vector< float > &etaBinsf, const std::vector< std::array< std::pair< float, float >, 4 > > &chi2CutOffOutlier, const std::vector< size_t > &numMeasurementsCutOff, double edge_hole_border_width)
Acts::TrackContainer< Acts::VectorTrackContainer, Acts::VectorMultiTrajectory > RecoTrackContainer
Acts::MultiStepperLoop< Stepper > BremStepper
Acts::CombinatorialKalmanFilter< Propagator, RecoTrackContainer > CKF
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
std::string prefixFromTrackContainerName(const std::string &tracks)
Parse TrackContainer name to get the prefix for backends The name has to contain XYZTracks,...
@ Pixel
Inner detector legacy.
SystemEnvelope
Define an enumeration to retrieve the envelope tracking volume from.
This class is not to needed in AthSimulation.
std::tuple< std::vector< std::string >, std::vector< RatioDefinition > > splitRatioDefinitionsAndLabels(std::initializer_list< std::tuple< std::string, RatioDefinition > > a_ratio_list)
SummandDefinition defineSummand(T counter_idx, int multiplier)
std::size_t maxLabelWidth(const T_Collection &col)
RatioDefinition defineSimpleRatio(T numerator, T denominator)
std::vector< std::string > makeLabelVector(T_index n_entries, std::initializer_list< std::pair< T_index, T_string > > a_list)
constexpr std::size_t subCategoryStride(const std::size_t categories, const std::size_t sub_categories, const std::size_t n_counter)
constexpr std::size_t counterStride(const std::size_t categories, const std::size_t sub_categories, const std::size_t n_counter)
std::string makeEtaBinLabel(const std::vector< float > &eta_bins, std::size_t eta_bin_i, bool abs_eta=false)
std::tuple< std::string, RatioDefinition > makeRatioDefinition(std::string &&name, std::vector< SummandDefinition > &&numerator, std::vector< SummandDefinition > &&denominator)
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)
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)
@ GaussianSumFilter
Tracks from Gaussian Sum Filter.
UncalibMeasType
Define the type of the uncalibrated measurement.
static void addFitterTypeProperty(track_container_t &tracksContainer)
add fitter column to the track container
static xAOD::TrackFitter fitterType(const consttrackproxy_t &trackProxy)
get fitter type of a track
Acts::GeometryContext geometry
Acts::MagneticFieldContext magField
Acts::CalibrationContext calib