CMS 3D CMS Logo

buildtestMPlex.cc
Go to the documentation of this file.
7 
8 #include <memory>
9 
10 namespace mkfit {
11 
12  inline bool sortByHitsChi2(const std::pair<Track, TrackState> &cand1, const std::pair<Track, TrackState> &cand2) {
13  if (cand1.first.nFoundHits() == cand2.first.nFoundHits())
14  return cand1.first.chi2() < cand2.first.chi2();
15 
16  return cand1.first.nFoundHits() > cand2.first.nFoundHits();
17  }
18 
19  inline bool sortByPhi(const Hit &hit1, const Hit &hit2) {
20  return std::atan2(hit1.y(), hit1.x()) < std::atan2(hit2.y(), hit2.x());
21  }
22 
23  inline bool sortByEta(const Hit &hit1, const Hit &hit2) { return hit1.eta() < hit2.eta(); }
24 
25  inline bool sortTracksByEta(const Track &track1, const Track &track2) { return track1.momEta() < track2.momEta(); }
26 
27  inline bool sortTracksByPhi(const Track &track1, const Track &track2) { return track1.momPhi() < track2.momPhi(); }
28 
30  const std::vector<std::vector<Track>> &m_track_candidates;
31 
32  sortTracksByPhiStruct(std::vector<std::vector<Track>> *track_candidates) : m_track_candidates(*track_candidates) {}
33 
34  bool operator()(const std::pair<int, int> &track1, const std::pair<int, int> &track2) {
35  return m_track_candidates[track1.first][track1.second].posPhi() <
36  m_track_candidates[track2.first][track2.second].posPhi();
37  }
38  };
39 
40  // within a layer with a "reasonable" geometry, ordering by Z is the same as eta
41  inline bool sortByZ(const Hit &hit1, const Hit &hit2) { return hit1.z() < hit2.z(); }
42 
43  //==============================================================================
44  // NaN and Silly track parameter check
45  //==============================================================================
46 
47  namespace {
48 
49  int check_nan_n_silly(TrackVec &tracks, const char *prefix) {
50  int count = 0;
51  for (auto &t : tracks) {
52  if (t.hasSillyValues(Const::nan_n_silly_print_bad_cands_bkfit, false, prefix)) {
53  ++count;
54  }
55  }
56  return count;
57  }
58 
59  void check_nan_n_silly_candidates(Event &ev) {
60  // MIMI -- nan_n_silly_per_layer_count is in MkBuilder, could be in MkJob.
61  // if (Const::nan_n_silly_check_cands_every_layer)
62  // {
63  // int sc = (int) ev.nan_n_silly_per_layer_count_;
64  // if (sc > 0)
65  // printf("Nan'n'Silly: Number of silly candidates over all layers = %d\n", sc);
66  // }
68  int sc = check_nan_n_silly(ev.candidateTracks_, "Pre-bkfit silly check");
69  if (sc > 0)
70  printf("Nan'n'Silly: Number of silly pre-bkfit candidates = %d\n", sc);
71  }
72  }
73 
74  void check_nan_n_silly_bkfit(Event &ev) {
76  int sc = check_nan_n_silly(ev.fitTracks_, "Post-bkfit silly check");
77  if (sc > 0)
78  printf("Nan'n'Silly: Number of silly post-bkfit candidates = %d\n", sc);
79  }
80  }
81 
82  } // namespace
83 
84  //==============================================================================
85  // runBuildTestPlexDumbCMSSW
86  //==============================================================================
87 
89  const IterationConfig &itconf = Config::ItrInfo[0];
90 
91  MkJob job({Config::TrkInfo, itconf, eoh, eoh.refBeamSpot()});
92 
93  builder.begin_event(&job, &ev, __func__);
94 
97  }
98 
99  builder.end_event();
100  }
101 
102  //==============================================================================
103  // runBuildTestPlexBestHit
104  //==============================================================================
105 
106  double runBuildingTestPlexBestHit(Event &ev, const EventOfHits &eoh, MkBuilder &builder) {
107  const IterationConfig &itconf = Config::ItrInfo[0];
108 
109  const bool validation_on = (Config::sim_val || Config::quality_val);
110 
111  TrackVec seeds1;
112  if (validation_on) {
113  unsigned int algorithms[] = {4}; //only initialStep
114 
115  for (auto const &s : ev.seedTracks_) {
116  //keep seeds form the first iteration for processing
117  if (std::find(algorithms, algorithms + 1, s.algoint()) != algorithms + 1)
118  seeds1.push_back(s);
119  }
120  ev.seedTracks_.swap(seeds1); //necessary for the validation - PrepareSeeds
121  ev.relabel_bad_seedtracks(); //necessary for the validation - PrepareSeeds
122  }
123 
124  IterationMaskIfc mask_ifc;
125 
126  // To disable hit-masks, pass nullptr in place of &mask_ifc to MkJob ctor
127  // and optionally comment out ev.fill_hitmask_bool_vectors() call.
128 
129  ev.fill_hitmask_bool_vectors(itconf.m_track_algorithm, mask_ifc.m_mask_vector);
130 
131  MkJob job({Config::TrkInfo, itconf, eoh, eoh.refBeamSpot(), &mask_ifc});
132 
133  builder.begin_event(&job, &ev, __func__);
134 
135  bool seeds_sorted = false;
136  // CCCC builder.PrepareSeeds();
137 
138  // EventOfCandidates event_of_cands;
139  builder.find_tracks_load_seeds_BH(ev.seedTracks_, seeds_sorted);
140 
141 #ifdef USE_VTUNE_PAUSE
142  __SSC_MARK(0x111); // use this to resume Intel SDE at the same point
143  __itt_resume();
144 #endif
145 
146  double time = dtime();
147 
148  builder.findTracksBestHit();
149 
150  time = dtime() - time;
151 
152 #ifdef USE_VTUNE_PAUSE
153  __itt_pause();
154  __SSC_MARK(0x222); // use this to pause Intel SDE at the same point
155 #endif
156 
157  // Hack, get the tracks out.
158  ev.candidateTracks_ = builder.ref_tracks();
159 
160  // For best hit, the candidateTracks_ vector is the direct input to the backward fit so only need to do clean_duplicates once
162  //Mark tracks as duplicates; if within CMSSW, remove duplicate tracks before backward fit
163  // CCCC if (Config::removeDuplicates) {
164  // CCCC StdSeq::clean_duplicates(ev.candidateTracks_);
165  // CCCC }
166  }
167 
168  job.switch_to_backward();
169 
170  // now do backwards fit... do we want to time this section?
171  if (Config::backwardFit) {
172  builder.backwardFitBH();
173  ev.fitTracks_ = builder.ref_tracks();
174  }
175 
176  if (Config::quality_val) {
177  StdSeq::Quality qval;
178  qval.quality_val(&ev);
179  } else if (Config::sim_val || Config::cmssw_val) {
181  }
182 
183  builder.end_event();
184 
185  // ev.print_tracks(ev.candidateTracks_, true);
186 
187  if (validation_on) {
188  ev.seedTracks_.swap(seeds1);
189  }
190 
191  return time;
192  }
193 
194  //==============================================================================
195  // runBuildTestPlex Combinatorial: Standard
196  //==============================================================================
197 
198  double runBuildingTestPlexStandard(Event &ev, const EventOfHits &eoh, MkBuilder &builder) {
199  const IterationConfig &itconf = Config::ItrInfo[0];
200 
201  const bool validation_on = (Config::sim_val || Config::quality_val);
202 
203  TrackVec seeds1;
204  if (validation_on) {
205  unsigned int algorithms[] = {4}; //only initialStep
206 
207  for (auto const &s : ev.seedTracks_) {
208  //keep seeds form the first iteration for processing
209  if (std::find(algorithms, algorithms + 1, s.algoint()) != algorithms + 1)
210  seeds1.push_back(s);
211  }
212  ev.seedTracks_.swap(seeds1); //necessary for the validation - PrepareSeeds
213  ev.relabel_bad_seedtracks(); //necessary for the validation - PrepareSeeds
214  }
215 
216  IterationMaskIfc mask_ifc;
217 
218  // To disable hit-masks, pass nullptr in place of &mask_ifc to MkJob ctor
219  // and optionally comment out ev.fill_hitmask_bool_vectors() call.
220 
221  ev.fill_hitmask_bool_vectors(itconf.m_track_algorithm, mask_ifc.m_mask_vector);
222 
223  MkJob job({Config::TrkInfo, itconf, eoh, eoh.refBeamSpot(), &mask_ifc});
224 
225  builder.begin_event(&job, &ev, __func__);
226 
227  bool seeds_sorted = false;
228  // CCCC builder.PrepareSeeds();
229  ev.setCurrentSeedTracks(ev.seedTracks_);
230 
231  builder.find_tracks_load_seeds(ev.seedTracks_, seeds_sorted);
232 
233 #ifdef USE_VTUNE_PAUSE
234  __SSC_MARK(0x111); // use this to resume Intel SDE at the same point
235  __itt_resume();
236 #endif
237 
238  double time = dtime();
239 
240  builder.findTracksStandard();
241 
242  time = dtime() - time;
243 
244 #ifdef USE_VTUNE_PAUSE
245  __itt_pause();
246  __SSC_MARK(0x222); // use this to pause Intel SDE at the same point
247 #endif
248 
249  check_nan_n_silly_candidates(ev);
250 
251  // first store candidate tracks
252  ev.candidateTracks_.clear();
253  builder.export_best_comb_cands(ev.candidateTracks_);
254 
255  job.switch_to_backward();
256 
257  // now do backwards fit... do we want to time this section?
258  if (Config::backwardFit) {
259  // Using the TrackVec version until we home in on THE backward fit etc.
260  // builder.backwardFit();
261  builder.select_best_comb_cands();
262  builder.backwardFitBH();
263  ev.fitTracks_ = builder.ref_tracks();
264 
265  check_nan_n_silly_bkfit(ev);
266  }
267 
268  // CCCC StdSeq::handle_duplicates(&ev);
269 
270  if (Config::quality_val) {
271  StdSeq::Quality qval;
272  qval.quality_val(&ev);
273  } else if (Config::sim_val || Config::cmssw_val) {
275  }
276 
277  ev.resetCurrentSeedTracks();
278 
279  builder.end_event();
280 
281  // ev.print_tracks(ev.candidateTracks_, true);
282 
283  if (validation_on) {
284  ev.seedTracks_.swap(seeds1);
285  }
286 
287  return time;
288  }
289 
290  //==============================================================================
291  // runBuildTestPlex Combinatorial: CloneEngine
292  //==============================================================================
293 
295  const IterationConfig &itconf = Config::ItrInfo[0];
296 
297  const bool validation_on = (Config::sim_val || Config::quality_val);
298 
299  TrackVec seeds1;
300  if (validation_on) {
301  unsigned int algorithms[] = {4}; //only initialStep
302 
303  for (auto const &s : ev.seedTracks_) {
304  //keep seeds form the first iteration for processing
305  if (std::find(algorithms, algorithms + 1, s.algoint()) != algorithms + 1)
306  seeds1.push_back(s);
307  }
308  ev.seedTracks_.swap(seeds1); //necessary for the validation - PrepareSeeds
309  ev.relabel_bad_seedtracks(); //necessary for the validation - PrepareSeeds
310  }
311 
312  IterationMaskIfc mask_ifc;
313 
314  // To disable hit-masks, pass nullptr in place of &mask_ifc to MkJob ctor
315  // and optionally comment out ev.fill_hitmask_bool_vectors() call.
316 
317  ev.fill_hitmask_bool_vectors(itconf.m_track_algorithm, mask_ifc.m_mask_vector);
318 
319  MkJob job({Config::TrkInfo, itconf, eoh, eoh.refBeamSpot(), &mask_ifc});
320 
321  builder.begin_event(&job, &ev, __func__);
322 
323  bool seeds_sorted = false;
324  // CCCC builder.PrepareSeeds();
325  ev.setCurrentSeedTracks(ev.seedTracks_);
326 
327  builder.find_tracks_load_seeds(ev.seedTracks_, seeds_sorted);
328 
329 #ifdef USE_VTUNE_PAUSE
330  __SSC_MARK(0x111); // use this to resume Intel SDE at the same point
331  __itt_resume();
332 #endif
333 
334  double time = dtime();
335 
336  builder.findTracksCloneEngine();
337 
338  time = dtime() - time;
339 
340 #ifdef USE_VTUNE_PAUSE
341  __itt_pause();
342  __SSC_MARK(0x222); // use this to pause Intel SDE at the same point
343 #endif
344 
345  check_nan_n_silly_candidates(ev);
346 
347  // first store candidate tracks - needed for BH backward fit and root_validation
348  ev.candidateTracks_.clear();
349  builder.export_best_comb_cands(ev.candidateTracks_);
350 
351  job.switch_to_backward();
352 
353  // now do backwards fit... do we want to time this section?
354  if (Config::backwardFit) {
355  // a) TrackVec version:
356  builder.select_best_comb_cands();
357  builder.backwardFitBH();
358  ev.fitTracks_ = builder.ref_tracks();
359 
360  // b) Version that runs on CombCand / TrackCand
361  // builder.backwardFit();
362  // builder.quality_store_tracks(ev.fitTracks_);
363 
364  check_nan_n_silly_bkfit(ev);
365  }
366 
367  // CCCC StdSeq::handle_duplicates(&ev);
368 
369  // validation section
370  if (Config::quality_val) {
371  StdSeq::Quality qval;
372  qval.quality_val(&ev);
373  } else if (Config::sim_val || Config::cmssw_val) {
375  }
376 
377  ev.resetCurrentSeedTracks();
378 
379  builder.end_event();
380 
381  // ev.print_tracks(ev.candidateTracks_, true);
382 
383  if (validation_on) {
384  ev.seedTracks_.swap(seeds1);
385  }
386 
387  return time;
388  }
389 
390  //==============================================================================
391  // runBtpCe_MultiIter
392  //
393  // Prototype for running multiple iterations, sequentially, using the same builder.
394  // For cmmsw seeds
395  //
396  // There is, in general, a mess in how tracks are processed, marked, or copied out
397  // in various validation scenarios and export flags.
398  //
399  // In particular, MkBuilder::PrepareSeeds does a lot of things to whole / complete
400  // event,seedTracks_ -- probably this would need to be split into common / and
401  // per-iteration part.
402  // - MkBuilder::prep_*** functions also mostly do not belong there (prep_sim is called from
403  // PrepareSeeds() for cmssw seeds).
404  //
405  // At this point we need to think about what should happen to Event before all the iterations and
406  // after all the iterations ... from the Validation perspective.
407  // And if we care about doing too muich work for seeds that will never get processed.
408  //==============================================================================
409 
410  namespace {
411  constexpr unsigned int algorithms[] = {4, 22, 23, 5, 24, 7, 8, 9, 10, 6}; //9 iterations
412  }
413 
414  std::vector<double> runBtpCe_MultiIter(Event &ev, const EventOfHits &eoh, MkBuilder &builder, int n) {
415  std::vector<double> timevec;
416  if (n <= 0)
417  return timevec;
418  timevec.resize(n + 1, 0.0);
419 
420  const bool validation_on = (Config::sim_val || Config::quality_val);
421 
422  TrackVec seeds_used;
423  TrackVec seeds1;
424 
425  if (validation_on) {
426  for (auto const &s : ev.seedTracks_) {
427  //keep seeds form the first n iterations for processing
428  if (std::find(algorithms, algorithms + n, s.algoint()) != algorithms + n)
429  seeds1.push_back(s);
430  }
431  ev.seedTracks_.swap(seeds1); //necessary for the validation - PrepareSeeds
432  ev.relabel_bad_seedtracks(); //necessary for the validation - PrepareSeeds
433  }
434 
435  IterationMaskIfc mask_ifc;
436  TrackVec seeds;
437  TrackVec tmp_tvec;
438 
439  for (int it = 0; it <= n - 1; ++it) {
440  const IterationConfig &itconf = Config::ItrInfo[it];
441 
442  // To disable hit-masks, pass nullptr in place of &mask_ifc to MkJob ctor
443  // and optionally comment out ev.fill_hitmask_bool_vectors() call.
444 
445  ev.fill_hitmask_bool_vectors(itconf.m_track_algorithm, mask_ifc.m_mask_vector);
446 
447  MkJob job({Config::TrkInfo, itconf, eoh, eoh.refBeamSpot(), &mask_ifc});
448 
449  builder.begin_event(&job, &ev, __func__);
450 
451  { // We could partition seeds once, store beg, end for each iteration in a map or vector.
452  seeds.clear();
453  int nc = 0;
454  for (auto &s : ev.seedTracks_) {
455  if (s.algoint() == itconf.m_track_algorithm) {
456  if (itconf.m_requires_seed_hit_sorting) {
457  s.sortHitsByLayer();
458  }
459  seeds.push_back(s);
460  ++nc;
461  } else if (nc > 0)
462  break;
463  }
464  }
465 
466  bool do_seed_clean = bool(itconf.m_seed_cleaner);
467 
468  if (do_seed_clean)
469  itconf.m_seed_cleaner(seeds, itconf, eoh.refBeamSpot());
470 
471  builder.seed_post_cleaning(seeds);
472 
473  // Add protection in case no seeds are found for iteration
474  if (seeds.size() <= 0)
475  continue;
476  ev.setCurrentSeedTracks(seeds);
477 
478  builder.find_tracks_load_seeds(seeds, do_seed_clean);
479 
480  double time = dtime();
481 
482  builder.findTracksCloneEngine();
483 
484  timevec[it] = dtime() - time;
485  timevec[n] += timevec[it];
486 
487  // Print min and max size of hots vectors of CombCands.
488  // builder.find_min_max_hots_size();
489 
490  if (validation_on)
491  seeds_used.insert(seeds_used.end(), seeds.begin(), seeds.end()); //cleaned seeds need to be stored somehow
492 
493  // Pre backward-fit filtering.
494  // Note -- slightly different logic than run_OneIteration as we always do nan filters for
495  // export for validation.
496  filter_candidates_func pre_filter;
497  if (itconf.m_pre_bkfit_filter)
498  pre_filter = [&](const TrackCand &tc, const MkJob &jb) -> bool {
499  return itconf.m_pre_bkfit_filter(tc, jb) && StdSeq::qfilter_nan_n_silly<TrackCand>(tc, jb);
500  };
501  else
502  pre_filter = StdSeq::qfilter_nan_n_silly<TrackCand>;
503  // pre_filter is always at least doing nan_n_silly filter.
504  builder.filter_comb_cands(pre_filter, true);
505 
506  builder.select_best_comb_cands();
507 
508  {
509  builder.export_tracks(tmp_tvec);
510  if (itconf.m_duplicate_cleaner)
511  itconf.m_duplicate_cleaner(builder.ref_tracks_nc(), itconf);
512  ev.candidateTracks_.reserve(ev.candidateTracks_.size() + tmp_tvec.size());
513  for (auto &&t : tmp_tvec)
514  ev.candidateTracks_.emplace_back(std::move(t));
515  tmp_tvec.clear();
516  }
517 
518  job.switch_to_backward();
519 
520  // now do backwards fit... do we want to time this section?
521  if (Config::backwardFit) {
522  // a) TrackVec version:
523  // builder.backwardFitBH();
524 
525  // b) Version that runs on CombCand / TrackCand
526  const bool do_backward_search = Config::backwardSearch && itconf.m_backward_search;
527 
528  // We copy seed-hits into Candidates ... now we have to remove them so backward fit stops
529  // before reaching seeding region. Ideally, we wouldn't add them in the first place but
530  // if we want to export full tracks above we need to hold on to them (alternatively, we could
531  // have a pointer to seed track in CombCandidate and copy them from there).
532  if (do_backward_search)
534 
535  builder.backwardFit();
536 
537  if (do_backward_search) {
538  builder.beginBkwSearch();
540  }
541 
542  // Post backward-fit filtering.
543  // Note -- slightly different logic than run_OneIteration as we export both pre and post
544  // backward-fit tracks.
545  filter_candidates_func post_filter;
546  if (itconf.m_post_bkfit_filter)
547  post_filter = [&](const TrackCand &tc, const MkJob &jb) -> bool {
548  return itconf.m_post_bkfit_filter(tc, jb) && StdSeq::qfilter_nan_n_silly<TrackCand>(tc, jb);
549  };
550  else
551  post_filter = StdSeq::qfilter_nan_n_silly<TrackCand>;
552  // post_filter is always at least doing nan_n_silly filter.
553  builder.filter_comb_cands(post_filter, true);
554 
555  if (do_backward_search)
556  builder.endBkwSearch();
557 
558  builder.select_best_comb_cands(true); // true -> clear m_tracks as they were already filled once above
559 
560  if (itconf.m_duplicate_cleaner)
561  itconf.m_duplicate_cleaner(builder.ref_tracks_nc(), itconf);
562 
563  builder.export_tracks(ev.fitTracks_);
564  }
565  ev.resetCurrentSeedTracks();
566 
567  builder.end_event();
568  }
569 
570  // MIMI - Fake back event pointer for final processing (that should be done elsewhere)
571  MkJob job({Config::TrkInfo, Config::ItrInfo[0], eoh, eoh.refBeamSpot()});
572  builder.begin_event(&job, &ev, __func__);
573 
574  if (validation_on) {
576  //swap for the cleaned seeds
577  ev.seedTracks_.swap(seeds_used);
578  }
579 
580  check_nan_n_silly_candidates(ev);
581 
583  check_nan_n_silly_bkfit(ev);
584 
585  // validation section
586  if (Config::quality_val) {
587  StdSeq::Quality qval;
588  qval.quality_val(&ev);
589  } else if (Config::sim_val || Config::cmssw_val) {
591  }
592 
593  // ev.print_tracks(ev.candidateTracks_, true);
594 
595  // MIMI Unfake.
596  builder.end_event();
597 
598  // In CMSSW runOneIter we now release memory for comb-cands:
599  builder.release_memory();
600 
601  return timevec;
602  }
603 
604 } // end namespace mkfit
float x() const
Definition: Hit.h:162
void export_tracks(TrackVec &out_vec)
Definition: MkBuilder.cc:408
void findTracksBestHit(SteeringParams::IterationType_e iteration_dir=SteeringParams::IT_FwdSearch)
Definition: MkBuilder.cc:466
const BeamSpot & refBeamSpot() const
constexpr bool nan_n_silly_check_cands_post_bkfit
Definition: Config.h:29
constexpr bool nan_n_silly_print_bad_cands_bkfit
Definition: Config.h:30
double runBuildingTestPlexStandard(Event &ev, const EventOfHits &eoh, MkBuilder &builder)
constexpr bool nan_n_silly_check_cands_pre_bkfit
Definition: Config.h:28
void compactifyHitStorageForBestCand(bool remove_seed_hits, int backward_fit_min_hits)
Definition: MkBuilder.h:63
bool sortTracksByPhi(const Track &track1, const Track &track2)
void root_val(Event *event)
void findTracksCloneEngine(SteeringParams::IterationType_e iteration_dir=SteeringParams::IT_FwdSearch)
Definition: MkBuilder.cc:948
void begin_event(MkJob *job, Event *ev, const char *build_type)
Definition: MkBuilder.cc:206
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
bool sortByHitsChi2(const std::pair< Track, TrackState > &cand1, const std::pair< Track, TrackState > &cand2)
clean_seeds_func m_seed_cleaner
void backwardFitBH()
Definition: MkBuilder.cc:1239
void prep_simtracks(Event *event)
float momEta() const
Definition: Track.h:161
void find_tracks_load_seeds_BH(const TrackVec &in_seeds, const bool seeds_sorted)
Definition: MkBuilder.cc:451
void findTracksStandard(SteeringParams::IterationType_e iteration_dir=SteeringParams::IT_FwdSearch)
Definition: MkBuilder.cc:758
std::function< filter_candidates_cf > filter_candidates_func
Definition: FunctionTypes.h:28
const std::vector< std::vector< Track > > & m_track_candidates
void find_tracks_load_seeds(const TrackVec &in_seeds, const bool seeds_sorted)
Definition: MkBuilder.cc:621
sortTracksByPhiStruct(std::vector< std::vector< Track >> *track_candidates)
void release_memory()
Definition: MkBuilder.cc:234
float eta() const
Definition: Hit.h:169
TrackVec & ref_tracks_nc()
Definition: MkBuilder.h:72
TrackerInfo TrkInfo
void seed_post_cleaning(TrackVec &tv)
Definition: MkBuilder.cc:419
void select_best_comb_cands(bool clear_m_tracks=false, bool remove_missing_hits=false)
Definition: MkBuilder.cc:390
void runBuildingTestPlexDumbCMSSW(Event &ev, const EventOfHits &eoh, MkBuilder &builder)
IterationsInfo ItrInfo
int filter_comb_cands(filter_candidates_func filter, bool attempt_all_cands)
Definition: MkBuilder.cc:313
const TrackVec & ref_tracks() const
Definition: MkBuilder.h:71
filter_candidates_func m_post_bkfit_filter
float y() const
Definition: Hit.h:163
bool sortByZ(const Hit &hit1, const Hit &hit2)
std::vector< Track > TrackVec
double runBuildingTestPlexCloneEngine(Event &ev, const EventOfHits &eoh, MkBuilder &builder)
clean_duplicates_func m_duplicate_cleaner
void beginBkwSearch()
Definition: MkBuilder.h:67
double dtime()
std::vector< double > runBtpCe_MultiIter(Event &ev, const EventOfHits &eoh, MkBuilder &builder, int n)
void export_best_comb_cands(TrackVec &out_vec, bool remove_missing_hits=false)
Definition: MkBuilder.cc:396
bool operator()(const std::pair< int, int > &track1, const std::pair< int, int > &track2)
float z() const
Definition: Hit.h:164
void endBkwSearch()
Definition: MkBuilder.h:68
void root_val_dumb_cmssw(Event *event)
void quality_val(Event *event)
bool sortTracksByEta(const Track &track1, const Track &track2)
std::vector< std::vector< bool > > m_mask_vector
bool sortByPhi(const Hit &hit1, const Hit &hit2)
filter_candidates_func m_pre_bkfit_filter
float momPhi() const
Definition: Track.h:160
def move(src, dest)
Definition: eostools.py:511
double runBuildingTestPlexBestHit(Event &ev, const EventOfHits &eoh, MkBuilder &builder)
bool sortByEta(const Hit &hit1, const Hit &hit2)
MPlex< T, D1, D2, N > atan2(const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)
Definition: Matriplex.h:648