30 constexpr float kMaxFloat = std::numeric_limits<float>::max();
33 auto CheckValueLimits = [&](std::string_view name,
auto value,
auto min,
auto max) ->
bool {
34 if (value > max || value < min) {
35 LOG(info) <<
"cbm::algo::ca::Iteration: parameter " << name <<
" = " << value <<
" runs out of range " << min
44 res = CheckValueLimits(
"track_chi2_cut",
fTrackChi2Cut, 0.f, kMaxFloat) && res;
45 res = CheckValueLimits(
"triplet_chi2_cut",
fTripletChi2Cut, 0.f, kMaxFloat) && res;
47 res = CheckValueLimits(
"doublet_chi2_cut",
fDoubletChi2Cut, 0.f, kMaxFloat) && res;
48 res = CheckValueLimits(
"pick_gather",
fPickGather, 0.f, kMaxFloat) && res;
49 res = CheckValueLimits(
"triplet_link_chi2",
fTripletLinkChi2, 0.f, kMaxFloat) && res;
50 res = CheckValueLimits(
"max_qp",
fMaxQp, 0.001f, kMaxFloat) && res;
51 res = CheckValueLimits(
"max_slope_pv",
fMaxSlopePV, 0.f, kMaxFloat) && res;
52 res = CheckValueLimits(
"max_slope",
fMaxSlope, 0.f, kMaxFloat) && res;
53 res = CheckValueLimits(
"max_dz",
fMaxDZ, 0.f, kMaxFloat) && res;
54 res = CheckValueLimits(
"min_n_hits",
fMinNhits, 3, MaxNstations) && res;
55 res = CheckValueLimits(
"min_n_hits_sta_0",
fMinNhitsStation0, 3, MaxNstations) && res;
56 res = CheckValueLimits(
"first_station_index",
fFirstStationIndex, 0, MaxNstations) && res;
57 res = CheckValueLimits(
"target_pos_sigma_x",
fTargetPosSigmaX, 0.f, kMaxFloat) && res;
58 res = CheckValueLimits(
"target_pos_sigma_y",
fTargetPosSigmaY, 0.f, kMaxFloat) && res;
74 std::vector<Iteration> vIter{*
this};
82 std::stringstream msg;
83 msg << std::boolalpha;
85 auto PutRow = [&](
const std::string& name, std::function<void(
const Iteration&)> fn) {
86 msg << std::setw(40) << std::setfill(
' ') << name <<
' ';
87 for (
const auto& iter : vIterations) {
88 msg << std::setw(12) << std::setfill(
' ');
Compile-time constants definition for the CA tracking algorithm.
friend fscal max(fscal x, fscal y)
friend fscal min(fscal x, fscal y)
A set of parameters for the CA Track finder iteration.
float fTripletLinkChi2
Min value of dp^2/dp_error^2, for which two tiplets are neighbours.
float fDoubletChi2Cut
Doublet chi2 upper cut.
int GetMinNhits() const
Gets min n hits.
float GetTripletChi2Cut() const
Gets triplet chi2 upper cut.
int fFirstStationIndex
First station, used for tracking.
int fMinNhitsStation0
min n hits for tracks that start on station 0
float fMaxDZ
Correction for accounting overlaping and iff z [cm].
bool Check() const
Checks parameters consistency.
float fTargetPosSigmaY
Constraint on target position in Y direction [cm].
float fMaxSlope
Max slope (tx\ty) in 3D hit position of a triplet.
float GetMaxSlope() const
Gets max slope (tx\ty) in 3D hit position of a triplet.
float GetPickGather() const
Gets size of region [TODO: units??] to attach new hits to the created track.
float GetTrackChi2Cut() const
Gets track chi2 upper cut.
bool GetElectronFlag() const
flag check: electrons/positrons - true, heavy charged - false
float GetDoubletChi2Cut() const
Gets doublet chi2 upper cut.
float fTargetPosSigmaX
Constraint on target position in X direction [cm].
float GetTripletFinalChi2Cut() const
Gets triplet chi2 upper cut.
int GetMaxStationGap() const
Gets flag: true - triplets are also built with skipping <= GetMaxStationGap stations.
void SetTargetPosSigmaXY(float sigmaX, float sigmaY)
Sets sigma of target positions in XY plane.
std::string ToString(int indentLevel=0) const
String representation of the class contents.
static std::string ToTableFromVector(const Vector< Iteration > &vIterations)
Forms a string, representing a table of iterations from the vector of iterations.
int GetMinNhitsStation0() const
Gets min n hits for tracks that start on station 0.
float fMaxQp
Max considered q/p for tracks.
float fMaxSlopePV
Max slope (tx\ty) in primary vertex.
float GetTargetPosSigmaX() const
Gets sigma target position in X direction [cm].
bool GetTrackFromTripletsFlag() const
float fPickGather
Size of region to attach new hits to the created track.
float GetTripletLinkChi2() const
Gets min value of dp/dp_error, for which two tiplets are neighbours.
float GetMaxQp() const
Gets max considered q/p for tracks.
float GetMaxDZ() const
Gets correction for accounting overlaping and iff z.
float fTripletChi2Cut
Triplet chi2 upper cut.
bool GetPrimaryFlag() const
Checks flag: true - only primary tracks are searched, false - [all or only secondary?...
float fTrackChi2Cut
Track chi2 upper cut.
float fTripletFinalChi2Cut
Triplet chi2 upper cut.
const std::string & GetName() const
Gets the name of the iteration.
float GetTargetPosSigmaY() const
Gets sigma target position in Y direction [cm].
Iteration()=default
Default constructor.
int GetFirstStationIndex() const
Gets station index of the first station used in tracking.
bool GetExtendTracksFlag() const
Sets flag: true - extends track candidates with unused hits.
int fMinNhits
min n hits on the tracks
float GetMaxSlopePV() const
Gets max slope (tx\ty) in primary vertex.
constexpr int MaxNstations
Max number of stations, 2^6 = 64.