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

Constructor & Destructor Documentation

◆ EventOfCombCandidates()

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

Definition at line 571 of file TrackStructures.h.

571 : 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 622 of file TrackStructures.h.

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

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

622  {
623  for (int i = 0; i < m_size; ++i)
626  }
std::vector< CombCandidate > m_candidates

◆ cand()

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

Definition at line 637 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

637 { 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 639 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 617 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

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

617  {
618  for (int i = 0; i < m_size; ++i)
619  m_candidates[i].compactifyHitStorageForBestCand(remove_seed_hits, backward_fit_min_hits);
620  }
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 627 of file TrackStructures.h.

References m_cands_in_backward_rep.

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

627  {
628  // There is no CombCand::endBkwSearch(), setup correctly in CombCand::reset().
629  m_cands_in_backward_rep = false;
630  }

◆ 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 635 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ operator[]() [2/2]

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

Definition at line 636 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ refCandidates()

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

Definition at line 642 of file TrackStructures.h.

References m_candidates.

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

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

◆ refCandidates_nc()

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

Definition at line 643 of file TrackStructures.h.

References m_candidates.

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

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

◆ releaseMemory()

void mkfit::EventOfCombCandidates::releaseMemory ( )
inline

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

573  {
574  { // Get all the destructors called before nuking CcPool.
575  std::vector<CombCandidate> tmp;
576  m_candidates.swap(tmp);
577  }
578  m_capacity = 0;
579  m_size = 0;
580  m_n_seeds_inserted = 0;
581  m_cc_pool.release();
582  }
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 584 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().

584  {
585  m_cc_pool.reset(new_capacity * max_cands_per_seed);
586  if (new_capacity > m_capacity) {
587  CcAlloc<TrackCand> alloc(&m_cc_pool);
588  std::vector<CombCandidate> tmp(new_capacity, alloc);
589  m_candidates.swap(tmp);
590  m_capacity = new_capacity;
591  }
592  for (int s = 0; s < new_capacity; ++s) {
593  m_candidates[s].reset(max_cands_per_seed, expected_num_hots);
594  }
595  for (int s = new_capacity; s < m_capacity; ++s) {
596  m_candidates[s].reset(0, 0);
597  }
598 
599  m_size = new_capacity;
600  m_n_seeds_inserted = 0;
601  }
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 603 of file TrackStructures.h.

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

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

603  {
604  assert(n_removed <= m_size);
605  m_size -= n_removed;
606  m_n_seeds_inserted -= n_removed;
607  }
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 653 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 650 of file TrackStructures.h.

Referenced by releaseMemory(), and reset().

◆ m_cc_pool

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

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

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

◆ m_size

int mkfit::EventOfCombCandidates::m_size = 0
private