CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
mkfit::IterationConfig Class Reference

#include <IterationConfig.h>

Public Member Functions

void cloneLayerSteerCore (const IterationConfig &o)
 
 IterationConfig ()
 
IterationLayerConfiglayer (int i)
 
bool merge_seed_hits_during_cleaning () const
 
void set_dupl_params (float sharedFrac, float drthCentral, float drthObarrel, float drthForward)
 
void set_iteration_index_and_track_algorithm (int idx, int trk_alg)
 
void set_num_regions_layers (int nreg, int nlay)
 
void set_seed_cleaning_params (float pt_thr, float dzmax_bh, float drmax_bh, float dzmax_bl, float drmax_bl, float dzmax_eh, float drmax_eh, float dzmax_el, float drmax_el)
 
void setupStandardFunctionsFromNames ()
 
SteeringParamssteering_params (int region)
 

Static Public Member Functions

static filter_candidates_func get_candidate_filter (const std::string &name)
 
static clean_duplicates_func get_duplicate_cleaner (const std::string &name)
 
static clean_seeds_func get_seed_cleaner (const std::string &name)
 
static partition_seeds_func get_seed_partitioner (const std::string &name)
 
static track_score_func get_track_scorer (const std::string &name)
 
static void register_candidate_filter (const std::string &name, filter_candidates_func func)
 
static void register_duplicate_cleaner (const std::string &name, clean_duplicates_func func)
 
static void register_seed_cleaner (const std::string &name, clean_seeds_func func)
 
static void register_seed_partitioner (const std::string &name, partition_seeds_func func)
 
static void register_track_scorer (const std::string &name, track_score_func func)
 

Public Attributes

float dc_drth_central = 0.001
 
float dc_drth_forward = 0.001
 
float dc_drth_obarrel = 0.001
 
float dc_fracSharedHits = 0.19
 
bool m_backward_drop_seed_hits = false
 
int m_backward_fit_min_hits = -1
 
IterationParams m_backward_params
 
bool m_backward_search = false
 
track_score_func m_default_track_scorer
 
std::string m_default_track_scorer_name = "default"
 
clean_duplicates_func m_duplicate_cleaner
 
std::string m_duplicate_cleaner_name
 
int m_iteration_index = -1
 
std::vector< IterationLayerConfigm_layer_configs
 
int m_n_regions = -1
 
IterationParams m_params
 
filter_candidates_func m_post_bkfit_filter
 
std::string m_post_bkfit_filter_name
 
filter_candidates_func m_pre_bkfit_filter
 
std::string m_pre_bkfit_filter_name
 
std::vector< int > m_region_order
 
bool m_requires_seed_hit_sorting = false
 
clean_seeds_func m_seed_cleaner
 
std::string m_seed_cleaner_name
 
partition_seeds_func m_seed_partitioner
 
std::string m_seed_partitioner_name
 
std::vector< SteeringParamsm_steering_params
 
int m_track_algorithm = -1
 
float sc_drmax_bh = 0.010
 
float sc_drmax_bl = 0.010
 
float sc_drmax_eh = 0.020
 
float sc_drmax_el = 0.030
 
float sc_dzmax_bh = 0.005
 
float sc_dzmax_bl = 0.005
 
float sc_dzmax_eh = 0.020
 
float sc_dzmax_el = 0.030
 
float sc_ptthr_hpt = 2.0
 

Detailed Description

Definition at line 122 of file IterationConfig.h.

Constructor & Destructor Documentation

◆ IterationConfig()

mkfit::IterationConfig::IterationConfig ( )
inline

Definition at line 181 of file IterationConfig.h.

181 {}

Member Function Documentation

◆ cloneLayerSteerCore()

void mkfit::IterationConfig::cloneLayerSteerCore ( const IterationConfig o)
inline

Definition at line 194 of file IterationConfig.h.

References m_default_track_scorer_name, m_duplicate_cleaner_name, m_layer_configs, m_n_regions, m_post_bkfit_filter_name, m_pre_bkfit_filter_name, m_region_order, m_seed_cleaner_name, m_seed_partitioner_name, m_steering_params, and EcalTangentSkim_cfg::o.

194  {
195  // Clone common settings for an iteration.
196  // m_iteration_index, m_track_algorithm, cleaning and bkw-search flags,
197  // and IterationParams are not copied.
198  // Standard functions are also not copied, only their names so one should
199  // call setupStandardFunctionsFromNames() later on.
200 
201  m_n_regions = o.m_n_regions;
202  m_region_order = o.m_region_order;
203  m_steering_params = o.m_steering_params;
204  m_layer_configs = o.m_layer_configs;
205 
206  m_seed_cleaner_name = o.m_seed_cleaner_name;
207  m_seed_partitioner_name = o.m_seed_partitioner_name;
208  m_pre_bkfit_filter_name = o.m_pre_bkfit_filter_name;
209  m_post_bkfit_filter_name = o.m_post_bkfit_filter_name;
210  m_duplicate_cleaner_name = o.m_duplicate_cleaner_name;
211  m_default_track_scorer_name = o.m_default_track_scorer_name;
212  }
std::string m_pre_bkfit_filter_name
std::string m_seed_cleaner_name
std::string m_seed_partitioner_name
std::vector< int > m_region_order
std::vector< IterationLayerConfig > m_layer_configs
std::string m_default_track_scorer_name
std::string m_post_bkfit_filter_name
std::vector< SteeringParams > m_steering_params
std::string m_duplicate_cleaner_name

◆ get_candidate_filter()

filter_candidates_func mkfit::IterationConfig::get_candidate_filter ( const std::string &  name)
static

Definition at line 174 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by setupStandardFunctionsFromNames().

174  {
175  GET_FC;
176  return resolve_func_name(fc.candidate_filters, name, __func__);
177  }
#define GET_FC

◆ get_duplicate_cleaner()

clean_duplicates_func mkfit::IterationConfig::get_duplicate_cleaner ( const std::string &  name)
static

Definition at line 178 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by setupStandardFunctionsFromNames().

178  {
179  GET_FC;
180  return resolve_func_name(fc.duplicate_cleaners, name, __func__);
181  }
#define GET_FC

◆ get_seed_cleaner()

clean_seeds_func mkfit::IterationConfig::get_seed_cleaner ( const std::string &  name)
static

Definition at line 166 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by setupStandardFunctionsFromNames().

166  {
167  GET_FC;
168  return resolve_func_name(fc.seed_cleaners, name, __func__);
169  }
#define GET_FC

◆ get_seed_partitioner()

partition_seeds_func mkfit::IterationConfig::get_seed_partitioner ( const std::string &  name)
static

Definition at line 170 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by mkfit::Shell::Compare(), and setupStandardFunctionsFromNames().

170  {
171  GET_FC;
172  return resolve_func_name(fc.seed_partitioners, name, __func__);
173  }
#define GET_FC

◆ get_track_scorer()

track_score_func mkfit::IterationConfig::get_track_scorer ( const std::string &  name)
static

Definition at line 182 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by mkfit::Event::print_tracks(), mkfit::StdSeq::score_tracks(), mkfit::TTreeValidation::setTrackScoresDumbCMSSW(), and setupStandardFunctionsFromNames().

182  {
183  GET_FC;
184  return resolve_func_name(fc.track_scorers, name, __func__);
185  }
#define GET_FC

◆ layer()

IterationLayerConfig& mkfit::IterationConfig::layer ( int  i)
inline

Definition at line 185 of file IterationConfig.h.

References mps_fire::i, and m_layer_configs.

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

185 { return m_layer_configs[i]; }
std::vector< IterationLayerConfig > m_layer_configs

◆ merge_seed_hits_during_cleaning()

bool mkfit::IterationConfig::merge_seed_hits_during_cleaning ( ) const
inline

◆ register_candidate_filter()

void mkfit::IterationConfig::register_candidate_filter ( const std::string &  name,
filter_candidates_func  func 
)
static

Definition at line 137 of file IterationConfig.cc.

References EcalMonitorTask_cff::func, GET_FC, and Skims_PA_cff::name.

137  {
138  GET_FC;
139  fc.candidate_filters.insert({name, func});
140  }
#define GET_FC

◆ register_duplicate_cleaner()

void mkfit::IterationConfig::register_duplicate_cleaner ( const std::string &  name,
clean_duplicates_func  func 
)
static

Definition at line 141 of file IterationConfig.cc.

References EcalMonitorTask_cff::func, GET_FC, and Skims_PA_cff::name.

141  {
142  GET_FC;
143  fc.duplicate_cleaners.insert({name, func});
144  }
#define GET_FC

◆ register_seed_cleaner()

void mkfit::IterationConfig::register_seed_cleaner ( const std::string &  name,
clean_seeds_func  func 
)
static

Definition at line 129 of file IterationConfig.cc.

References EcalMonitorTask_cff::func, GET_FC, and Skims_PA_cff::name.

129  {
130  GET_FC;
131  fc.seed_cleaners.insert({name, func});
132  }
#define GET_FC

◆ register_seed_partitioner()

void mkfit::IterationConfig::register_seed_partitioner ( const std::string &  name,
partition_seeds_func  func 
)
static

Definition at line 133 of file IterationConfig.cc.

References EcalMonitorTask_cff::func, GET_FC, and Skims_PA_cff::name.

133  {
134  GET_FC;
135  fc.seed_partitioners.insert({name, func});
136  }
#define GET_FC

◆ register_track_scorer()

void mkfit::IterationConfig::register_track_scorer ( const std::string &  name,
track_score_func  func 
)
static

Definition at line 145 of file IterationConfig.cc.

References EcalMonitorTask_cff::func, GET_FC, and Skims_PA_cff::name.

145  {
146  GET_FC;
147  fc.track_scorers.insert({name, func});
148  }
#define GET_FC

◆ set_dupl_params()

void mkfit::IterationConfig::set_dupl_params ( float  sharedFrac,
float  drthCentral,
float  drthObarrel,
float  drthForward 
)
inline

◆ set_iteration_index_and_track_algorithm()

void mkfit::IterationConfig::set_iteration_index_and_track_algorithm ( int  idx,
int  trk_alg 
)
inline

◆ set_num_regions_layers()

void mkfit::IterationConfig::set_num_regions_layers ( int  nreg,
int  nlay 
)
inline

Definition at line 246 of file IterationConfig.h.

References mps_fire::i, m_layer_configs, m_n_regions, m_region_order, and m_steering_params.

246  {
247  m_n_regions = nreg;
248  m_region_order.resize(nreg);
249  m_steering_params.resize(nreg);
250  for (int i = 0; i < nreg; ++i)
251  m_steering_params[i].m_region = i;
252  m_layer_configs.resize(nlay);
253  for (int i = 0; i < nlay; ++i)
254  m_layer_configs[i].m_layer = i;
255  }
std::vector< int > m_region_order
std::vector< IterationLayerConfig > m_layer_configs
std::vector< SteeringParams > m_steering_params

◆ set_seed_cleaning_params()

void mkfit::IterationConfig::set_seed_cleaning_params ( float  pt_thr,
float  dzmax_bh,
float  drmax_bh,
float  dzmax_bl,
float  drmax_bl,
float  dzmax_eh,
float  drmax_eh,
float  dzmax_el,
float  drmax_el 
)
inline

Definition at line 226 of file IterationConfig.h.

References sc_drmax_bh, sc_drmax_bl, sc_drmax_eh, sc_drmax_el, sc_dzmax_bh, sc_dzmax_bl, sc_dzmax_eh, sc_dzmax_el, and sc_ptthr_hpt.

234  {
235  sc_ptthr_hpt = pt_thr;
236  sc_drmax_bh = drmax_bh;
237  sc_dzmax_bh = dzmax_bh;
238  sc_drmax_eh = drmax_eh;
239  sc_dzmax_eh = dzmax_eh;
240  sc_drmax_bl = drmax_bl;
241  sc_dzmax_bl = dzmax_bl;
242  sc_drmax_el = drmax_el;
243  sc_dzmax_el = dzmax_el;
244  }

◆ setupStandardFunctionsFromNames()

void mkfit::IterationConfig::setupStandardFunctionsFromNames ( )

Definition at line 191 of file IterationConfig.cc.

References dprintf, get_candidate_filter(), get_duplicate_cleaner(), get_seed_cleaner(), get_seed_partitioner(), get_track_scorer(), m_default_track_scorer, m_default_track_scorer_name, m_duplicate_cleaner, m_duplicate_cleaner_name, m_post_bkfit_filter, m_post_bkfit_filter_name, m_pre_bkfit_filter, m_pre_bkfit_filter_name, m_seed_cleaner, m_seed_cleaner_name, m_seed_partitioner, m_seed_partitioner_name, and m_steering_params.

191  {
193  dprintf(" Set seed_cleaner for '%s' %s\n", m_seed_cleaner_name.c_str(), m_seed_cleaner ? "SET" : "NOT SET");
194 
196  dprintf(
197  " Set seed_partitioner for '%s' %s\n", m_seed_partitioner_name.c_str(), m_seed_partitioner ? "SET" : "NOT SET");
198 
200  dprintf(
201  " Set pre_bkfit_filter for '%s' %s\n", m_pre_bkfit_filter_name.c_str(), m_pre_bkfit_filter ? "SET" : "NOT SET");
202 
204  dprintf(" Set post_bkfit_filter for '%s' %s\n",
205  m_post_bkfit_filter_name.c_str(),
206  m_post_bkfit_filter ? "SET" : "NOT SET");
207 
209  dprintf(" Set duplicate_cleaner for '%s' %s\n",
210  m_duplicate_cleaner_name.c_str(),
211  m_duplicate_cleaner ? "SET" : "NOT SET");
212 
214  for (auto &sp : m_steering_params) {
215  sp.m_track_scorer =
216  sp.m_track_scorer_name.empty() ? m_default_track_scorer : get_track_scorer(sp.m_track_scorer_name);
217  }
218  }
std::string m_pre_bkfit_filter_name
std::string m_seed_cleaner_name
std::string m_seed_partitioner_name
clean_seeds_func m_seed_cleaner
static filter_candidates_func get_candidate_filter(const std::string &name)
static partition_seeds_func get_seed_partitioner(const std::string &name)
std::string m_default_track_scorer_name
partition_seeds_func m_seed_partitioner
std::string m_post_bkfit_filter_name
filter_candidates_func m_post_bkfit_filter
static track_score_func get_track_scorer(const std::string &name)
static clean_duplicates_func get_duplicate_cleaner(const std::string &name)
clean_duplicates_func m_duplicate_cleaner
track_score_func m_default_track_scorer
static clean_seeds_func get_seed_cleaner(const std::string &name)
filter_candidates_func m_pre_bkfit_filter
std::vector< SteeringParams > m_steering_params
std::string m_duplicate_cleaner_name
#define dprintf(...)
Definition: Debug.h:98

◆ steering_params()

SteeringParams& mkfit::IterationConfig::steering_params ( int  region)
inline

Definition at line 186 of file IterationConfig.h.

References m_steering_params, and nano_mu_digi_cff::region.

186 { return m_steering_params[region]; }
std::vector< SteeringParams > m_steering_params

Member Data Documentation

◆ dc_drth_central

float mkfit::IterationConfig::dc_drth_central = 0.001

◆ dc_drth_forward

float mkfit::IterationConfig::dc_drth_forward = 0.001

◆ dc_drth_obarrel

float mkfit::IterationConfig::dc_drth_obarrel = 0.001

◆ dc_fracSharedHits

float mkfit::IterationConfig::dc_fracSharedHits = 0.19

◆ m_backward_drop_seed_hits

bool mkfit::IterationConfig::m_backward_drop_seed_hits = false

◆ m_backward_fit_min_hits

int mkfit::IterationConfig::m_backward_fit_min_hits = -1

◆ m_backward_params

IterationParams mkfit::IterationConfig::m_backward_params

◆ m_backward_search

bool mkfit::IterationConfig::m_backward_search = false

◆ m_default_track_scorer

track_score_func mkfit::IterationConfig::m_default_track_scorer

Definition at line 170 of file IterationConfig.h.

Referenced by setupStandardFunctionsFromNames().

◆ m_default_track_scorer_name

std::string mkfit::IterationConfig::m_default_track_scorer_name = "default"

Definition at line 177 of file IterationConfig.h.

Referenced by cloneLayerSteerCore(), and setupStandardFunctionsFromNames().

◆ m_duplicate_cleaner

clean_duplicates_func mkfit::IterationConfig::m_duplicate_cleaner

◆ m_duplicate_cleaner_name

std::string mkfit::IterationConfig::m_duplicate_cleaner_name

Definition at line 176 of file IterationConfig.h.

Referenced by cloneLayerSteerCore(), and setupStandardFunctionsFromNames().

◆ m_iteration_index

int mkfit::IterationConfig::m_iteration_index = -1

◆ m_layer_configs

std::vector<IterationLayerConfig> mkfit::IterationConfig::m_layer_configs

◆ m_n_regions

int mkfit::IterationConfig::m_n_regions = -1

◆ m_params

IterationParams mkfit::IterationConfig::m_params

◆ m_post_bkfit_filter

filter_candidates_func mkfit::IterationConfig::m_post_bkfit_filter

◆ m_post_bkfit_filter_name

std::string mkfit::IterationConfig::m_post_bkfit_filter_name

Definition at line 175 of file IterationConfig.h.

Referenced by cloneLayerSteerCore(), and setupStandardFunctionsFromNames().

◆ m_pre_bkfit_filter

filter_candidates_func mkfit::IterationConfig::m_pre_bkfit_filter

◆ m_pre_bkfit_filter_name

std::string mkfit::IterationConfig::m_pre_bkfit_filter_name

Definition at line 175 of file IterationConfig.h.

Referenced by cloneLayerSteerCore(), and setupStandardFunctionsFromNames().

◆ m_region_order

std::vector<int> mkfit::IterationConfig::m_region_order

◆ m_requires_seed_hit_sorting

bool mkfit::IterationConfig::m_requires_seed_hit_sorting = false

◆ m_seed_cleaner

clean_seeds_func mkfit::IterationConfig::m_seed_cleaner

◆ m_seed_cleaner_name

std::string mkfit::IterationConfig::m_seed_cleaner_name

Definition at line 173 of file IterationConfig.h.

Referenced by cloneLayerSteerCore(), and setupStandardFunctionsFromNames().

◆ m_seed_partitioner

partition_seeds_func mkfit::IterationConfig::m_seed_partitioner

◆ m_seed_partitioner_name

std::string mkfit::IterationConfig::m_seed_partitioner_name

Definition at line 174 of file IterationConfig.h.

Referenced by cloneLayerSteerCore(), and setupStandardFunctionsFromNames().

◆ m_steering_params

std::vector<SteeringParams> mkfit::IterationConfig::m_steering_params

◆ m_track_algorithm

int mkfit::IterationConfig::m_track_algorithm = -1

◆ sc_drmax_bh

float mkfit::IterationConfig::sc_drmax_bh = 0.010

◆ sc_drmax_bl

float mkfit::IterationConfig::sc_drmax_bl = 0.010

◆ sc_drmax_eh

float mkfit::IterationConfig::sc_drmax_eh = 0.020

◆ sc_drmax_el

float mkfit::IterationConfig::sc_drmax_el = 0.030

◆ sc_dzmax_bh

float mkfit::IterationConfig::sc_dzmax_bh = 0.005

◆ sc_dzmax_bl

float mkfit::IterationConfig::sc_dzmax_bl = 0.005

◆ sc_dzmax_eh

float mkfit::IterationConfig::sc_dzmax_eh = 0.020

◆ sc_dzmax_el

float mkfit::IterationConfig::sc_dzmax_el = 0.030

◆ sc_ptthr_hpt

float mkfit::IterationConfig::sc_ptthr_hpt = 2.0