CMS 3D CMS Logo

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