15 dprintf(
"TrackCand::exportTrack label=%5d, total_hits=%2d, overlaps=%2d -- n_seed_hits=%d,prod_type=%d\n",
31 if (remove_missing_hits) {
33 res.setHitIdxAtPos(--good_hits_pos, hot_node.
m_hot);
37 dprintf(
" nh=%2d, ch=%d, idx=%d lyr=%d prev_idx=%d\n",
59 m_seed_algo =
seed.algoint();
60 m_seed_label =
seed.label();
64 cand.setNSeedHits(
seed.nTotalHits());
67 dprintf(
"Importing pt=%f eta=%f, lastCcIndex=%d\n",
cand.pT(),
cand.momEta(),
cand.lastCcIndex());
70 dprintf(
" hit idx=%d lyr=%d\n",
hp->index,
hp->layer);
71 cand.addHitIdx(
hp->index,
hp->layer, 0.0f);
96 while (ci->score() > best_short->
score())
105 printf(
"FindTracksStd -- Replacing best cand (%f) with short one (%f) in final sorting\n",
107 best_short->
score());
114 }
else if (best_short) {
147 if (remove_seed_hits && tc.
nFoundHits() <= backward_fit_min_hits) {
148 remove_seed_hits =
false;
152 int stash_end =
m_hots.size();
153 int stash_pos = stash_end;
157 if (remove_seed_hits) {
166 while (n_hits_to_pick > 0) {
180 while (stash_pos != stash_end &&
m_hots[stash_pos].m_hot.index < 0)
182 while (stash_pos != stash_end) {
196 while (stash_pos != stash_end) {
241 int last_idx = -1, prev_idx;
243 prev_idx =
m_hots[curr_idx].m_prev_idx;
245 m_hots[curr_idx].m_prev_idx = last_idx;
249 }
while (prev_idx != -1);
int nInsideMinusOneHits() const
float getScoreCand(const track_score_func &score_func, const Track &cand1, bool penalizeTailMissHits=false, bool inFindCandidates=false)
void addHitIdx(int hitIdx, int hitLyr, float chi2)
void mergeCandsAndBestShortOne(const IterationParams ¶ms, const track_score_func &score_func, bool update_score, bool sort_cands)
Track exportTrack(bool remove_missing_hits=false) const
CombCandidate * m_comb_candidate
const HoTNode & hot_node(int i) const
TrackCand m_best_short_cand
short int m_nInsideMinusOneHits_before_bkwsearch
int nTailMinusOneHits() const
void setLastCcIndex(int i)
void setNInsideMinusOneHits(int n)
ProdType prodType() const
void setNFoundHits(int n)
short int m_nTailMinusOneHits_before_bkwsearch
void setNTailMinusOneHits(int n)
std::function< track_score_cf > track_score_func
void setNMissingHits(int n)
CombCandidate * combCandidate() const
void compactifyHitStorageForBestCand(bool remove_seed_hits, int backward_fit_min_hits)
void repackCandPostBkwSearch(int i)
bool sortByScoreTrackCand(const TrackCand &cand1, const TrackCand &cand2)
short int m_lastHitIdx_before_bkwsearch
trk_cand_vec_type m_trk_cands
std::vector< HoTNode > m_hots
void importSeed(const Track &seed, const track_score_func &score_func, int region)