File TrackSelector.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Functions
-
inline std::ostream &operator<<(std::ostream &os, const TrackSelector::Config &cuts)
- Parameters
os – Output stream
cuts – Cuts to print
- Returns
Reference to the output stream
-
inline std::ostream &operator<<(std::ostream &os, const TrackSelector::EtaBinnedConfig &cfg)
- Parameters
os – Output stream
cfg – Configuration to print
- Returns
Reference to the output stream
-
class TrackSelector
- #include <Acts/TrackFinding/TrackSelector.hpp>
Class which performs filtering of tracks.
It accepts an input and an output track container and uses the built-in copy facility to copy tracks into the output container.
Public Functions
-
inline TrackSelector(const Config &config)
Constructor from a single cut config object.
- Parameters
config – is the configuration object
-
inline TrackSelector(const EtaBinnedConfig &config)
Constructor from a multi-eta.
- Parameters
config – is the configuration object
-
inline const EtaBinnedConfig &config() const
Get readonly access to the config parameters.
- Returns
the config object
-
template<typename track_proxy_t>
bool isValidTrack(const track_proxy_t &track) const Helper function to check if a track is valid.
- Template Parameters
track_proxy_t – is the type of the track proxy
- Parameters
track – is the track proxy
- Returns
true if the track is valid
-
template<typename input_tracks_t, typename output_tracks_t>
void selectTracks(const input_tracks_t &inputTracks, output_tracks_t &outputTracks) const Select tracks from an input container and copy them into an output container.
- Template Parameters
input_tracks_t – is the type of the input track container
output_tracks_t – is the type of the output track container
- Parameters
inputTracks – is the input track container
outputTracks – is the output track container
Private Static Attributes
-
static constexpr double inf = std::numeric_limits<double>::infinity()
-
struct Config
- #include <Acts/TrackFinding/TrackSelector.hpp>
Configuration of a set of cuts for a single eta bin Default construction yields a set of cuts that accepts everything.
Public Functions
-
inline Config &absEta(double min, double max)
Set the absolute eta acceptance range.
- Parameters
min – Minimum value
max – Maximum value
- Returns
Reference to this object
-
inline Config &eta(double min, double max)
Set the eta acceptance range.
- Parameters
min – Minimum value
max – Maximum value
- Returns
Reference to this object
-
inline Config &loc0(double min, double max)
Set loc0 acceptance range.
- Parameters
min – Minimum value
max – Maximum value
- Returns
Reference to this object
-
inline Config &loc1(double min, double max)
Set loc1 acceptance range.
- Parameters
min – Minimum value
max – Maximum value
- Returns
Reference to this object
-
inline Config &phi(double min, double max)
Set phi acceptance range.
- Parameters
min – Minimum value
max – Maximum value
- Returns
Reference to this object
-
inline Config &pt(double min, double max)
Set the pt acceptance range.
- Parameters
min – Minimum value
max – Maximum value
- Returns
Reference to this object
-
inline Config &time(double min, double max)
Set time acceptance range.
- Parameters
min – Minimum value
max – Maximum value
- Returns
Reference to this object
Public Members
-
double absEtaMax = inf
-
double absEtaMin = 0.0
-
double etaMax = inf
-
double etaMin = -inf
-
double loc0Max = inf
-
double loc0Min = -inf
-
double loc1Max = inf
-
double loc1Min = -inf
-
std::size_t minMeasurements = 0
-
double phiMax = inf
-
double phiMin = -inf
-
double ptMax = inf
-
double ptMin = 0.0
-
double timeMax = inf
-
double timeMin = -inf
Friends
-
friend std::ostream &operator<<(std::ostream &os, const Config &cuts)
Print this set of cuts to an output stream.
- Parameters
os – Output stream
cuts – Cuts to print
- Returns
Reference to the output stream
-
inline Config &absEta(double min, double max)
-
struct EtaBinnedConfig
- #include <Acts/TrackFinding/TrackSelector.hpp>
Main config object for the track selector.
Combines a set of cut configurations and corresponding eta bins
Public Functions
-
inline EtaBinnedConfig()
Construct an empty (accepts everything) configuration.
Results in a single cut set and one abs eta bin from 0 to infinity.
-
inline EtaBinnedConfig(Config cutSet)
Auto-converting constructor from a single cut configuration.
Results in a single absolute eta bin from 0 to infinity.
-
inline EtaBinnedConfig(double etaMin)
Constructor to create a config object that is not upper-bounded.
This is useful to use the “fluent” API to populate the configuration.
- Parameters
etaMin – Minimum eta bin edge
-
inline EtaBinnedConfig(std::vector<double> absEtaEdgesIn)
Constructor from a vector of eta bin edges.
This automatically initializes all the cuts to be the same for all eta and be essentially no-op.
- Parameters
absEtaEdgesIn – is the vector of eta bin edges
-
inline EtaBinnedConfig &addCuts(const std::function<void(Config&)> &callback = {})
Add a new eta bin with an upper bound of +infinity.
- Parameters
callback – Callback to configure the cuts for this eta bin
- Returns
Reference to this object
-
inline EtaBinnedConfig &addCuts(double etaMax, const std::function<void(Config&)> &callback = {})
Add a new eta bin with the given upper bound.
- Parameters
etaMax – Upper bound of the new eta bin
callback – Callback to configure the cuts for this eta bin
- Returns
Reference to this object
-
inline std::size_t binIndex(double eta) const
Get the index of the eta bin for a given eta.
- Parameters
eta – Eta value
- Returns
Index of the eta bin
-
inline const Config &getCuts(double eta) const
Get the cuts for a given eta.
- Parameters
eta – Eta value
- Returns
Cuts for the given eta
-
inline std::size_t nEtaBins() const
Get the number of eta bins.
- Returns
Number of eta bins
Public Members
-
std::vector<double> absEtaEdges = {}
Eta bin edges for varying cuts by eta.
-
std::vector<Config> cutSets = {}
Cut sets for each eta bin.
Friends
-
friend std::ostream &operator<<(std::ostream &os, const EtaBinnedConfig &cfg)
Print this configuration to an output stream.
- Parameters
os – Output stream
cfg – Configuration to print
- Returns
Reference to the output stream
-
inline EtaBinnedConfig()
-
inline TrackSelector(const Config &config)
-
inline std::ostream &operator<<(std::ostream &os, const TrackSelector::Config &cuts)