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 124 of file IterationConfig.h.

Constructor & Destructor Documentation

◆ IterationConfig()

mkfit::IterationConfig::IterationConfig ( )
inline

Definition at line 183 of file IterationConfig.h.

183 {}

Member Function Documentation

◆ cloneLayerSteerCore()

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

Definition at line 196 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.

196  {
197  // Clone common settings for an iteration.
198  // m_iteration_index, m_track_algorithm, cleaning and bkw-search flags,
199  // and IterationParams are not copied.
200  // Standard functions are also not copied, only their names so one should
201  // call setupStandardFunctionsFromNames() later on.
202 
203  m_n_regions = o.m_n_regions;
204  m_region_order = o.m_region_order;
205  m_steering_params = o.m_steering_params;
206  m_layer_configs = o.m_layer_configs;
207 
208  m_seed_cleaner_name = o.m_seed_cleaner_name;
209  m_seed_partitioner_name = o.m_seed_partitioner_name;
210  m_pre_bkfit_filter_name = o.m_pre_bkfit_filter_name;
211  m_post_bkfit_filter_name = o.m_post_bkfit_filter_name;
212  m_duplicate_cleaner_name = o.m_duplicate_cleaner_name;
213  m_default_track_scorer_name = o.m_default_track_scorer_name;
214  }
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 176 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by setupStandardFunctionsFromNames().

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

◆ get_duplicate_cleaner()

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

Definition at line 180 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by setupStandardFunctionsFromNames().

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

◆ get_seed_cleaner()

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

Definition at line 168 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

Referenced by setupStandardFunctionsFromNames().

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

◆ get_seed_partitioner()

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

Definition at line 172 of file IterationConfig.cc.

References GET_FC, and Skims_PA_cff::name.

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

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

◆ get_track_scorer()

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

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

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

◆ layer()

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

Definition at line 187 of file IterationConfig.h.

References mps_fire::i, and m_layer_configs.

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

187 { 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 139 of file IterationConfig.cc.

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

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

◆ register_duplicate_cleaner()

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

Definition at line 143 of file IterationConfig.cc.

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

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

◆ register_seed_cleaner()

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

Definition at line 131 of file IterationConfig.cc.

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

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

◆ register_seed_partitioner()

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

Definition at line 135 of file IterationConfig.cc.

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

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

◆ register_track_scorer()

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

Definition at line 147 of file IterationConfig.cc.

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

147  {
148  GET_FC;
149  fc.track_scorers.insert({name, func});
150  }
#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 248 of file IterationConfig.h.

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

248  {
249  m_n_regions = nreg;
250  m_region_order.resize(nreg);
251  m_steering_params.resize(nreg);
252  for (int i = 0; i < nreg; ++i)
253  m_steering_params[i].m_region = i;
254  m_layer_configs.resize(nlay);
255  for (int i = 0; i < nlay; ++i)
256  m_layer_configs[i].m_layer = i;
257  }
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 228 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.

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

◆ setupStandardFunctionsFromNames()

void mkfit::IterationConfig::setupStandardFunctionsFromNames ( )

Definition at line 193 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.

193  {
195  dprintf(" Set seed_cleaner for '%s' %s\n", m_seed_cleaner_name.c_str(), m_seed_cleaner ? "SET" : "NOT SET");
196 
198  dprintf(
199  " Set seed_partitioner for '%s' %s\n", m_seed_partitioner_name.c_str(), m_seed_partitioner ? "SET" : "NOT SET");
200 
202  dprintf(
203  " Set pre_bkfit_filter for '%s' %s\n", m_pre_bkfit_filter_name.c_str(), m_pre_bkfit_filter ? "SET" : "NOT SET");
204 
206  dprintf(" Set post_bkfit_filter for '%s' %s\n",
207  m_post_bkfit_filter_name.c_str(),
208  m_post_bkfit_filter ? "SET" : "NOT SET");
209 
211  dprintf(" Set duplicate_cleaner for '%s' %s\n",
212  m_duplicate_cleaner_name.c_str(),
213  m_duplicate_cleaner ? "SET" : "NOT SET");
214 
216  for (auto &sp : m_steering_params) {
217  sp.m_track_scorer =
218  sp.m_track_scorer_name.empty() ? m_default_track_scorer : get_track_scorer(sp.m_track_scorer_name);
219  }
220  }
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 188 of file IterationConfig.h.

References m_steering_params, and nano_mu_digi_cff::region.

188 { 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 172 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 179 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 178 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 177 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 177 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 175 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 176 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