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)
 
void compactifyHitStorageForBestCand (bool remove_seed_hits, int backward_fit_min_hits)
 
void endBkwSearch ()
 
 EventOfCombCandidates (int size=0)
 
void insertSeed (const Track &seed, 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
 
int m_capacity = 0
 
CcPool< TrackCandm_cc_pool
 
int m_n_seeds_inserted = 0
 
int m_size = 0
 

Detailed Description

Definition at line 573 of file TrackStructures.h.

Constructor & Destructor Documentation

◆ EventOfCombCandidates()

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

Definition at line 575 of file TrackStructures.h.

575 : 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 626 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

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

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

◆ cand()

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

Definition at line 640 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

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

◆ compactifyHitStorageForBestCand()

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

Definition at line 621 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

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

621  {
622  for (int i = 0; i < m_size; ++i)
623  m_candidates[i].compactifyHitStorageForBestCand(remove_seed_hits, backward_fit_min_hits);
624  }
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 630 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

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

630  {
631  for (int i = 0; i < m_size; ++i)
633  }
std::vector< CombCandidate > m_candidates

◆ insertSeed()

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

◆ operator[]() [1/2]

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

Definition at line 638 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ operator[]() [2/2]

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

Definition at line 639 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ refCandidates()

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

Definition at line 643 of file TrackStructures.h.

References m_candidates.

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

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

◆ refCandidates_nc()

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

Definition at line 644 of file TrackStructures.h.

References m_candidates.

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

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

◆ releaseMemory()

void mkfit::EventOfCombCandidates::releaseMemory ( )
inline

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

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

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

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

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

607  {
608  assert(n_removed <= m_size);
609  m_size -= n_removed;
610  m_n_seeds_inserted -= n_removed;
611  }
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_capacity

int mkfit::EventOfCombCandidates::m_capacity = 0
private

Definition at line 651 of file TrackStructures.h.

Referenced by releaseMemory(), and reset().

◆ m_cc_pool

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

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

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

◆ m_size

int mkfit::EventOfCombCandidates::m_size = 0
private