Belle II Software development
track_maker_t Struct Reference

Classes

struct  internal
 

Public Member Functions

template<typename T >
int operator() (const T &e)
 
template<typename T >
void update_track (int Track_ID, const T &e)
 

Public Attributes

double y_cutoff = 0
 
int m_number_of_tracks = 4
 
std::map< int, internalm_storage
 

Detailed Description

Definition at line 58 of file klm_trig_linear_fit.cc.

Member Function Documentation

◆ operator()()

int operator() ( const T &  e)
inline

Definition at line 70 of file klm_trig_linear_fit.cc.

71 {
72 for (int j = 0; j < m_number_of_tracks; ++j) {
73
74 auto& track = m_storage[get_index(e, j)];
75 if (
76 std::abs(track.last_y - e.y_pos) < y_cutoff
77 ||
78 track.nDigits == 0
79 ) {
80 update_track(j, e);
81 return j;
82 }
83 }
84
85 const auto last_track = m_number_of_tracks - 1;
86 update_track(last_track, e);
87 return last_track;
88
89 }

◆ update_track()

void update_track ( int  Track_ID,
const T &  e 
)
inline

Definition at line 92 of file klm_trig_linear_fit.cc.

93 {
94 auto& track = m_storage[get_index(e, Track_ID)];
95 track.last_y = e.y_pos;
96 track.last_x = e.x_pos;
97 track.nDigits++;
98 }

Member Data Documentation

◆ m_number_of_tracks

int m_number_of_tracks = 4

Definition at line 60 of file klm_trig_linear_fit.cc.

◆ m_storage

std::map< int, internal > m_storage

Definition at line 66 of file klm_trig_linear_fit.cc.

◆ y_cutoff

double y_cutoff = 0

Definition at line 59 of file klm_trig_linear_fit.cc.


The documentation for this struct was generated from the following file: