CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Public Attributes
mkfit::SteeringParams Class Reference

#include <SteeringParams.h>

Classes

class  iterator
 

Public Types

enum  IterationType_e { IT_FwdSearch, IT_BkwFit, IT_BkwSearch }
 

Public Member Functions

void append_plan (int layer)
 
void fill_plan (int first, int last)
 
bool has_bksearch_plan () const
 
iterator make_iterator (IterationType_e type) const
 
void reserve_plan (int n)
 
void set_iterator_limits (int fwd_search_pu, int bkw_fit_last, int bkw_search_pu=-1)
 
 SteeringParams ()
 

Public Attributes

int m_bkw_fit_last = 0
 
int m_bkw_search_pickup = -1
 
int m_fwd_search_pickup = 0
 
std::vector< LayerControlm_layer_plan
 
int m_region
 

Detailed Description

Definition at line 34 of file SteeringParams.h.

Member Enumeration Documentation

◆ IterationType_e

Constructor & Destructor Documentation

◆ SteeringParams()

mkfit::SteeringParams::SteeringParams ( )
inline

Definition at line 106 of file SteeringParams.h.

106 {}

Member Function Documentation

◆ append_plan()

void mkfit::SteeringParams::append_plan ( int  layer)
inline

Definition at line 110 of file SteeringParams.h.

References phase1PixelTopology::layer, and m_layer_plan.

Referenced by fill_plan().

110 { m_layer_plan.emplace_back(LayerControl(layer)); }
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< LayerControl > m_layer_plan

◆ fill_plan()

void mkfit::SteeringParams::fill_plan ( int  first,
int  last 
)
inline

Definition at line 112 of file SteeringParams.h.

References append_plan(), first, mps_fire::i, and dqmdumpme::last.

112  {
113  for (int i = first; i <= last; ++i)
114  append_plan(i);
115  }
void append_plan(int layer)

◆ has_bksearch_plan()

bool mkfit::SteeringParams::has_bksearch_plan ( ) const
inline

Definition at line 123 of file SteeringParams.h.

References m_bkw_search_pickup.

123 { return m_bkw_search_pickup != -1; }

◆ make_iterator()

iterator mkfit::SteeringParams::make_iterator ( IterationType_e  type) const
inline

Definition at line 125 of file SteeringParams.h.

References mkfit::SteeringParams::iterator::is_valid(), IT_BkwFit, IT_BkwSearch, IT_FwdSearch, m_bkw_fit_last, m_bkw_search_pickup, mkfit::SteeringParams::iterator::m_cur_index, mkfit::SteeringParams::iterator::m_end_index, m_fwd_search_pickup, and m_layer_plan.

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

125  {
126  iterator it(*this, type);
127 
128  if (type == IT_FwdSearch) {
129  it.m_cur_index = m_fwd_search_pickup;
130  it.m_end_index = m_layer_plan.size();
131  } else if (type == IT_BkwFit) {
132  it.m_cur_index = m_layer_plan.size() - 1;
133  it.m_end_index = m_bkw_fit_last - 1;
134  } else if (type == IT_BkwSearch) {
135  it.m_cur_index = m_bkw_search_pickup;
136  it.m_end_index = -1;
137  } else
138  throw std::invalid_argument("unknown iteration type");
139 
140  if (!it.is_valid())
141  throw std::runtime_error("invalid iterator constructed");
142 
143  return it;
144  }
std::vector< LayerControl > m_layer_plan

◆ reserve_plan()

void mkfit::SteeringParams::reserve_plan ( int  n)
inline

Definition at line 108 of file SteeringParams.h.

References m_layer_plan, and dqmiodumpmetadata::n.

108 { m_layer_plan.reserve(n); }
std::vector< LayerControl > m_layer_plan

◆ set_iterator_limits()

void mkfit::SteeringParams::set_iterator_limits ( int  fwd_search_pu,
int  bkw_fit_last,
int  bkw_search_pu = -1 
)
inline

Definition at line 117 of file SteeringParams.h.

References m_bkw_fit_last, m_bkw_search_pickup, and m_fwd_search_pickup.

117  {
118  m_fwd_search_pickup = fwd_search_pu;
119  m_bkw_fit_last = bkw_fit_last;
120  m_bkw_search_pickup = bkw_search_pu;
121  }

Member Data Documentation

◆ m_bkw_fit_last

int mkfit::SteeringParams::m_bkw_fit_last = 0

Definition at line 101 of file SteeringParams.h.

Referenced by make_iterator(), and set_iterator_limits().

◆ m_bkw_search_pickup

int mkfit::SteeringParams::m_bkw_search_pickup = -1

◆ m_fwd_search_pickup

int mkfit::SteeringParams::m_fwd_search_pickup = 0

◆ m_layer_plan

std::vector<LayerControl> mkfit::SteeringParams::m_layer_plan

◆ m_region

int mkfit::SteeringParams::m_region

Definition at line 98 of file SteeringParams.h.

Referenced by mkfit::SteeringParams::iterator::region().