19 const auto& model_reduced_sites =
model.reduced_sites_;
24 std::vector<reduced_track_t> reduced_tracks;
28 auto& rtrk = reduced_tracks.emplace_back();
29 auto& rtrk_valid = rtrk.valid;
32 rtrk_valid =
track.valid;
35 for (
const auto& model_rsite : model_reduced_sites) {
38 int model_rsite_id =
static_cast<int>(model_rsite.id);
40 auto& rsite_seg = rtrk.site_segs[model_rsite_id];
41 auto& rsite_bit = rtrk.site_mask[model_rsite_id];
48 for (
const auto& model_rs_ts : model_rsite.trk_sites) {
49 int trk_site_id =
static_cast<int>(model_rs_ts);
51 const auto& trk_site_seg =
track.site_segs[trk_site_id];
52 const auto& trk_site_bit =
track.site_mask[trk_site_id];
54 if (trk_site_bit == 0) {
62 rsite_seg = trk_site_seg;
73 for (
unsigned int i_rtrk = 0; i_rtrk < reduced_tracks.size(); ++i_rtrk) {
75 auto& trk_i =
tracks[i_rtrk];
76 const auto& rtrk_i = reduced_tracks[i_rtrk];
78 if (rtrk_i.valid == 1) {
79 for (
unsigned int j_rtrk = (i_rtrk + 1); j_rtrk < reduced_tracks.size();
82 auto& rtrk_j = reduced_tracks[j_rtrk];
85 if (rtrk_j.valid == 0)
90 const auto& rtrk_site_mask_ik = rtrk_i.site_mask[k_rsite];
91 const auto& rtrk_site_mask_jk = rtrk_j.site_mask[k_rsite];
94 if (!(rtrk_site_mask_ik & rtrk_site_mask_jk))
98 const auto& rtrk_seg_id_ik = rtrk_i.site_segs[k_rsite];
99 const auto& rtrk_seg_id_jk = rtrk_j.site_segs[k_rsite];
102 if (rtrk_seg_id_ik != rtrk_seg_id_jk)
112 trk_i.valid = rtrk_i.valid;
118 <<
" zone " << trk_i.zone <<
" col " << trk_i.col <<
" pat " << trk_i.pattern
119 <<
" qual " << trk_i.quality <<
" phi " << trk_i.phi <<
" theta " << trk_i.theta
120 <<
" valid " << trk_i.valid << std::endl;
void apply(std::vector< track_t > &) const
const EMTFContext & context_
Log< level::Info, false > LogInfo
constexpr int kNumTrackSitesRM
DuplicateRemovalLayer(const EMTFContext &)
EMTFConfiguration config_