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, 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 586 of file TrackStructures.h.

Constructor & Destructor Documentation

◆ EventOfCombCandidates()

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

Definition at line 588 of file TrackStructures.h.

588 : 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 639 of file TrackStructures.h.

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

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

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

◆ cand()

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

Definition at line 654 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

654 { 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 656 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 634 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

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

634  {
635  for (int i = 0; i < m_size; ++i)
636  m_candidates[i].compactifyHitStorageForBestCand(remove_seed_hits, backward_fit_min_hits);
637  }
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 644 of file TrackStructures.h.

References m_cands_in_backward_rep.

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

644  {
645  // There is no CombCand::endBkwSearch(), setup correctly in CombCand::reset().
646  m_cands_in_backward_rep = false;
647  }

◆ insertSeed()

void mkfit::EventOfCombCandidates::insertSeed ( const Track seed,
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 652 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ operator[]() [2/2]

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

Definition at line 653 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ refCandidates()

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

Definition at line 659 of file TrackStructures.h.

References m_candidates.

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

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

◆ refCandidates_nc()

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

Definition at line 660 of file TrackStructures.h.

References m_candidates.

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

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

◆ releaseMemory()

void mkfit::EventOfCombCandidates::releaseMemory ( )
inline

Definition at line 590 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().

590  {
591  { // Get all the destructors called before nuking CcPool.
592  std::vector<CombCandidate> tmp;
593  m_candidates.swap(tmp);
594  }
595  m_capacity = 0;
596  m_size = 0;
597  m_n_seeds_inserted = 0;
598  m_cc_pool.release();
599  }
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 601 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().

601  {
602  m_cc_pool.reset(new_capacity * max_cands_per_seed);
603  if (new_capacity > m_capacity) {
604  CcAlloc<TrackCand> alloc(&m_cc_pool);
605  std::vector<CombCandidate> tmp(new_capacity, alloc);
606  m_candidates.swap(tmp);
607  m_capacity = new_capacity;
608  }
609  for (int s = 0; s < new_capacity; ++s) {
610  m_candidates[s].reset(max_cands_per_seed, expected_num_hots);
611  }
612  for (int s = new_capacity; s < m_capacity; ++s) {
613  m_candidates[s].reset(0, 0);
614  }
615 
616  m_size = new_capacity;
617  m_n_seeds_inserted = 0;
618  }
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 620 of file TrackStructures.h.

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

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

620  {
621  assert(n_removed <= m_size);
622  m_size -= n_removed;
623  m_n_seeds_inserted -= n_removed;
624  }
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 670 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 667 of file TrackStructures.h.

Referenced by releaseMemory(), and reset().

◆ m_cc_pool

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

Definition at line 663 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 669 of file TrackStructures.h.

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

◆ m_size

int mkfit::EventOfCombCandidates::m_size = 0
private