ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::ScoreBasedAmbiguityResolution Class Reference

Generic implementation of the score based ambiguity resolution. More...

#include <Acts/AmbiguityResolution/ScoreBasedAmbiguityResolution.hpp>

Classes

struct  Config
 Configuration struct : contains the configuration for the ambiguity resolution. More...
struct  DetectorConfig
 Detector configuration struct : contains the configuration for each detector. More...
struct  Optionals
 Optionals struct: contains the optional cuts, weights and score to be applied. More...
struct  TrackFeatures
 TrackFeatures struct : contains the features that are counted for each track. More...

Public Types

enum class  TrackStateTypes : std::uint8_t {
  UnsharedHit , SharedHit , RejectedHit , Outlier ,
  OtherTrackStateType
}
 Enumeration of track state types for ambiguity resolution. More...

Public Member Functions

 ScoreBasedAmbiguityResolution (const Config &cfg, std::unique_ptr< const Logger > logger=getDefaultLogger("ScoreBasedAmbiguityResolution", Logging::INFO))
 Constructor with configuration and optional logger.
template<TrackContainerFrontend track_container_t>
std::vector< double > ambiguityScore (const track_container_t &tracks, const std::vector< std::vector< TrackFeatures > > &trackFeaturesVectors, const Optionals< typename track_container_t::ConstTrackProxy > &optionals={}) const
 Compute the score of each track based on the ambiguity function.
template<TrackContainerFrontend track_container_t>
std::vector< std::vector< TrackFeatures > > computeInitialState (const track_container_t &tracks) const
 Compute the initial state of the tracks.
bool etaBasedCuts (const DetectorConfig &detector, const TrackFeatures &trackFeatures, const double &eta) const
 Rejects Tracks based on eta dependent cuts.
template<TrackProxyConcept track_proxy_t>
bool getCleanedOutTracks (const track_proxy_t &track, const double &trackScore, const std::vector< std::size_t > &measurementsPerTrack, const std::map< std::size_t, std::size_t > &nTracksPerMeasurement, const std::vector< std::function< void(const track_proxy_t &, const typename track_proxy_t::ConstTrackStateProxy &, TrackStateTypes &)> > &optionalHitSelections={}) const
 Remove hits that are not good enough for each track and removes tracks that have a score below a certain threshold or not enough hits.
template<TrackContainerFrontend track_container_t>
std::vector< double > simpleScore (const track_container_t &tracks, const std::vector< std::vector< TrackFeatures > > &trackFeaturesVectors, const Optionals< typename track_container_t::ConstTrackProxy > &optionals={}) const
 Compute the score of each track.
template<TrackContainerFrontend track_container_t, typename source_link_hash_t, typename source_link_equality_t>
std::vector< int > solveAmbiguity (const track_container_t &tracks, source_link_hash_t sourceLinkHash, source_link_equality_t sourceLinkEquality, const Optionals< typename track_container_t::ConstTrackProxy > &optionals={}) const
 Remove tracks that are bad based on cuts and weighted scores.

Detailed Description

Generic implementation of the score based ambiguity resolution.

The alhorithm is based on the following steps: 1) Compute the initial state of the tracks 2) Compute the score of each track 3) Removes hits that are not good enough for each track 4) Remove tracks that have a score below a certain threshold or not have enough hits 5) Remove tracks that are not good enough based on cuts Contains method for data preparations

Member Enumeration Documentation

◆ TrackStateTypes

enum class Acts::ScoreBasedAmbiguityResolution::TrackStateTypes : std::uint8_t
strong

Enumeration of track state types for ambiguity resolution.

Enumerator
UnsharedHit 
SharedHit 
RejectedHit 
Outlier 
OtherTrackStateType 

Constructor & Destructor Documentation

◆ ScoreBasedAmbiguityResolution()

Acts::ScoreBasedAmbiguityResolution::ScoreBasedAmbiguityResolution ( const Config & cfg,
std::unique_ptr< const Logger > logger = getDefaultLogger("ScoreBasedAmbiguityResolution", Logging::INFO) )
explicit

Constructor with configuration and optional logger.

Parameters
cfgConfiguration object for the ambiguity resolution
loggerLogger instance for output, defaults to INFO level

Member Function Documentation

◆ ambiguityScore()

template<TrackContainerFrontend track_container_t>
std::vector< double > Acts::ScoreBasedAmbiguityResolution::ambiguityScore ( const track_container_t & tracks,
const std::vector< std::vector< TrackFeatures > > & trackFeaturesVectors,
const Optionals< typename track_container_t::ConstTrackProxy > & optionals = {} ) const

Compute the score of each track based on the ambiguity function.

Parameters
tracksis the input track container
trackFeaturesVectorsis the trackFeatures map from detector ID to trackFeatures
optionalsis the user defined optional cuts to be applied.
Returns
a vector of scores for each track

◆ computeInitialState()

template<TrackContainerFrontend track_container_t>
std::vector< std::vector< TrackFeatures > > Acts::ScoreBasedAmbiguityResolution::computeInitialState ( const track_container_t & tracks) const

Compute the initial state of the tracks.

Parameters
tracksis the input track container
Returns
trackFeaturesVectors is the trackFeatures map from detector ID to trackFeatures

◆ etaBasedCuts()

bool Acts::ScoreBasedAmbiguityResolution::etaBasedCuts ( const DetectorConfig & detector,
const TrackFeatures & trackFeatures,
const double & eta ) const

Rejects Tracks based on eta dependent cuts.

Parameters
detectoris the detector configuration object
trackFeaturesis the trackFeatures object for a specific detector
etais the eta of the track
Returns
true if the track is rejected, false otherwise

◆ getCleanedOutTracks()

template<TrackProxyConcept track_proxy_t>
bool Acts::ScoreBasedAmbiguityResolution::getCleanedOutTracks ( const track_proxy_t & track,
const double & trackScore,
const std::vector< std::size_t > & measurementsPerTrack,
const std::map< std::size_t, std::size_t > & nTracksPerMeasurement,
const std::vector< std::function< void(const track_proxy_t &, const typename track_proxy_t::ConstTrackStateProxy &, TrackStateTypes &)> > & optionalHitSelections = {} ) const

Remove hits that are not good enough for each track and removes tracks that have a score below a certain threshold or not enough hits.

Remove tracks that are not good enough based on cuts

Parameters
trackis the input track
trackScoreis the score of each track
measurementsPerTrackis the list of measurements for each track
nTracksPerMeasurementis the number of tracks per measurement
optionalHitSelectionsis the optional hit selections to be applied
Returns
a vector of IDs of the tracks we want to keep

◆ simpleScore()

template<TrackContainerFrontend track_container_t>
std::vector< double > Acts::ScoreBasedAmbiguityResolution::simpleScore ( const track_container_t & tracks,
const std::vector< std::vector< TrackFeatures > > & trackFeaturesVectors,
const Optionals< typename track_container_t::ConstTrackProxy > & optionals = {} ) const

Compute the score of each track.

Parameters
tracksis the input track container
trackFeaturesVectorsis the trackFeatures map from detector ID to trackFeatures
optionalsis the user defined optional cuts to be applied.
Returns
a vector of scores for each track

◆ solveAmbiguity()

template<TrackContainerFrontend track_container_t, typename source_link_hash_t, typename source_link_equality_t>
std::vector< int > Acts::ScoreBasedAmbiguityResolution::solveAmbiguity ( const track_container_t & tracks,
source_link_hash_t sourceLinkHash,
source_link_equality_t sourceLinkEquality,
const Optionals< typename track_container_t::ConstTrackProxy > & optionals = {} ) const

Remove tracks that are bad based on cuts and weighted scores.

Remove tracks that are not good enough

Parameters
tracksis the input track container
sourceLinkHashis the source links
sourceLinkEqualityis the equality function for the source links
optionalsare the optional cuts and score modifiers to be applied
Returns
a vector of IDs of the tracks we want to keep