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

Constructor & Destructor Documentation

◆ EventOfCombCandidates()

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

Definition at line 577 of file TrackStructures.h.

577 : 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 628 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

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

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

◆ cand()

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

Definition at line 642 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

642 { 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 623 of file TrackStructures.h.

References mps_fire::i, m_candidates, and m_size.

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

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

References mps_fire::i, m_candidates, and m_size.

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

632  {
633  for (int i = 0; i < m_size; ++i)
635  }
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 640 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ operator[]() [2/2]

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

Definition at line 641 of file TrackStructures.h.

References mps_fire::i, and m_candidates.

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

◆ refCandidates()

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

Definition at line 645 of file TrackStructures.h.

References m_candidates.

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

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

◆ refCandidates_nc()

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

Definition at line 646 of file TrackStructures.h.

References m_candidates.

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

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

◆ releaseMemory()

void mkfit::EventOfCombCandidates::releaseMemory ( )
inline

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

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

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

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

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

609  {
610  assert(n_removed <= m_size);
611  m_size -= n_removed;
612  m_n_seeds_inserted -= n_removed;
613  }
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 653 of file TrackStructures.h.

Referenced by releaseMemory(), and reset().

◆ m_cc_pool

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

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

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

◆ m_size

int mkfit::EventOfCombCandidates::m_size = 0
private