CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
mkfit::EventOfCombCandidates Class Reference

#include <TrackStructures.h>

Public Member Functions

void beginBkwSearch ()
 
CombCandidatecand (int i)
 
bool cands_in_backward_rep () const
 
void compactifyHitStorageForBestCand (bool remove_seed_hits, int backward_fit_min_hits)
 
void endBkwSearch ()
 
 EventOfCombCandidates (int size=0)
 
void insertSeed (const Track &seed, int seed_idx, const track_score_func &score_func, int region, int pos)
 
const CombCandidateoperator[] (int i) const
 
CombCandidateoperator[] (int i)
 
const std::vector< CombCandidate > & refCandidates () const
 
std::vector< CombCandidate > & refCandidates_nc ()
 
void releaseMemory ()
 
void reset (int new_capacity, int max_cands_per_seed, int expected_num_hots=128)
 
void resizeAfterFiltering (int n_removed)
 
int size () const
 

Private Attributes

std::vector< CombCandidatem_candidates
 
bool m_cands_in_backward_rep = false
 
int m_capacity = 0
 
CcPool< TrackCandm_cc_pool
 
int m_n_seeds_inserted = 0
 
int m_size = 0
 

Detailed Description

Definition at line 589 of file TrackStructures.h.

Constructor & Destructor Documentation

◆ EventOfCombCandidates()

mkfit::EventOfCombCandidates::EventOfCombCandidates ( int  size = 0)
inline

Definition at line 591 of file TrackStructures.h.

591 : m_cc_pool(), m_candidates() {}
std::vector< CombCandidate > m_candidates
CcPool< TrackCand > m_cc_pool

Member Function Documentation

◆ beginBkwSearch()

void mkfit::EventOfCombCandidates::beginBkwSearch ( )
inline

Definition at line 642 of file TrackStructures.h.

References mps_fire::i, m_candidates, m_cands_in_backward_rep, and m_size.

Referenced by mkfit::MkBuilder::beginBkwSearch().

642  {
643  for (int i = 0; i < m_size; ++i)
646  }
std::vector< CombCandidate > m_candidates

◆ cand()

CombCandidate& mkfit::EventOfCombCandidates::cand ( int  i)
inline

Definition at line 657 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

Referenced by mkfit::CandCloner::combCandWithOriginalIndex(), and mkfit::CandCloner::processSeedRange().

657 { return m_candidates[i]; }
std::vector< CombCandidate > m_candidates

◆ cands_in_backward_rep()

bool mkfit::EventOfCombCandidates::cands_in_backward_rep ( ) const
inline

Definition at line 659 of file TrackStructures.h.

References m_cands_in_backward_rep.

Referenced by mkfit::MkBuilder::filter_comb_cands().

◆ compactifyHitStorageForBestCand()

void mkfit::EventOfCombCandidates::compactifyHitStorageForBestCand ( bool  remove_seed_hits,
int  backward_fit_min_hits 
)
inline

Definition at line 637 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

Referenced by mkfit::MkBuilder::compactifyHitStorageForBestCand().

637  {
638  for (int i = 0; i < m_size; ++i)
639  m_candidates[i].compactifyHitStorageForBestCand(remove_seed_hits, backward_fit_min_hits);
640  }
std::vector< CombCandidate > m_candidates
void compactifyHitStorageForBestCand(bool remove_seed_hits, int backward_fit_min_hits)

◆ endBkwSearch()

void mkfit::EventOfCombCandidates::endBkwSearch ( )
inline

Definition at line 647 of file TrackStructures.h.

References m_cands_in_backward_rep.

Referenced by mkfit::MkBuilder::endBkwSearch().

647  {
648  // There is no CombCand::endBkwSearch(), setup correctly in CombCand::reset().
649  m_cands_in_backward_rep = false;
650  }

◆ insertSeed()

void mkfit::EventOfCombCandidates::insertSeed ( const Track seed,
int  seed_idx,
const track_score_func score_func,
int  region,
int  pos 
)
inline

◆ operator[]() [1/2]

const CombCandidate& mkfit::EventOfCombCandidates::operator[] ( int  i) const
inline

Definition at line 655 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

655 { return m_candidates[i]; }
std::vector< CombCandidate > m_candidates

◆ operator[]() [2/2]

CombCandidate& mkfit::EventOfCombCandidates::operator[] ( int  i)
inline

Definition at line 656 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

656 { return m_candidates[i]; }
std::vector< CombCandidate > m_candidates

◆ refCandidates()

const std::vector<CombCandidate>& mkfit::EventOfCombCandidates::refCandidates ( ) const
inline

Definition at line 662 of file TrackStructures.h.

References m_candidates.

Referenced by mkfit::MkBuilder::find_tracks_in_layers(), and mkfit::MkBuilder::findTracksStandard().

662 { return m_candidates; }
std::vector< CombCandidate > m_candidates

◆ refCandidates_nc()

std::vector<CombCandidate>& mkfit::EventOfCombCandidates::refCandidates_nc ( )
inline

Definition at line 663 of file TrackStructures.h.

References m_candidates.

Referenced by mkfit::MkBuilder::find_tracks_in_layers().

663 { return m_candidates; }
std::vector< CombCandidate > m_candidates

◆ releaseMemory()

void mkfit::EventOfCombCandidates::releaseMemory ( )
inline

Definition at line 593 of file TrackStructures.h.

References m_candidates, m_capacity, m_cc_pool, m_n_seeds_inserted, m_size, and createJobs::tmp.

Referenced by mkfit::MkBuilder::release_memory().

593  {
594  { // Get all the destructors called before nuking CcPool.
595  std::vector<CombCandidate> tmp;
596  m_candidates.swap(tmp);
597  }
598  m_capacity = 0;
599  m_size = 0;
600  m_n_seeds_inserted = 0;
601  m_cc_pool.release();
602  }
std::vector< CombCandidate > m_candidates
CcPool< TrackCand > m_cc_pool
tmp
align.sh
Definition: createJobs.py:716

◆ reset()

void mkfit::EventOfCombCandidates::reset ( int  new_capacity,
int  max_cands_per_seed,
int  expected_num_hots = 128 
)
inline

Definition at line 604 of file TrackStructures.h.

References m_candidates, m_capacity, m_cc_pool, m_n_seeds_inserted, m_size, alignCSCRings::s, and createJobs::tmp.

Referenced by mkfit::MkBuilder::find_tracks_load_seeds().

604  {
605  m_cc_pool.reset(new_capacity * max_cands_per_seed);
606  if (new_capacity > m_capacity) {
607  CcAlloc<TrackCand> alloc(&m_cc_pool);
608  std::vector<CombCandidate> tmp(new_capacity, alloc);
609  m_candidates.swap(tmp);
610  m_capacity = new_capacity;
611  }
612  for (int s = 0; s < new_capacity; ++s) {
613  m_candidates[s].reset(max_cands_per_seed, expected_num_hots);
614  }
615  for (int s = new_capacity; s < m_capacity; ++s) {
616  m_candidates[s].reset(0, 0);
617  }
618 
619  m_size = new_capacity;
620  m_n_seeds_inserted = 0;
621  }
std::vector< CombCandidate > m_candidates
CcPool< TrackCand > m_cc_pool
tmp
align.sh
Definition: createJobs.py:716

◆ resizeAfterFiltering()

void mkfit::EventOfCombCandidates::resizeAfterFiltering ( int  n_removed)
inline

Definition at line 623 of file TrackStructures.h.

References cms::cuda::assert(), m_n_seeds_inserted, and m_size.

Referenced by mkfit::MkBuilder::filter_comb_cands().

623  {
624  assert(n_removed <= m_size);
625  m_size -= n_removed;
626  m_n_seeds_inserted -= n_removed;
627  }
assert(be >=bs)

◆ size()

int mkfit::EventOfCombCandidates::size ( void  ) const
inline

Member Data Documentation

◆ m_candidates

std::vector<CombCandidate> mkfit::EventOfCombCandidates::m_candidates
private

◆ m_cands_in_backward_rep

bool mkfit::EventOfCombCandidates::m_cands_in_backward_rep = false
private

Definition at line 673 of file TrackStructures.h.

Referenced by beginBkwSearch(), cands_in_backward_rep(), and endBkwSearch().

◆ m_capacity

int mkfit::EventOfCombCandidates::m_capacity = 0
private

Definition at line 670 of file TrackStructures.h.

Referenced by releaseMemory(), and reset().

◆ m_cc_pool

CcPool<TrackCand> mkfit::EventOfCombCandidates::m_cc_pool
private

Definition at line 666 of file TrackStructures.h.

Referenced by releaseMemory(), and reset().

◆ m_n_seeds_inserted

int mkfit::EventOfCombCandidates::m_n_seeds_inserted = 0
private

Definition at line 672 of file TrackStructures.h.

Referenced by insertSeed(), releaseMemory(), reset(), and resizeAfterFiltering().

◆ m_size

int mkfit::EventOfCombCandidates::m_size = 0
private