CMS 3D CMS Logo

MkStdSeqs.cc
Go to the documentation of this file.
2 
5 
7 
8 #include "oneapi/tbb/parallel_for.h"
9 
10 namespace mkfit {
11 
12  namespace StdSeq {
13 
14  //=========================================================================
15  // Hit processing
16  //=========================================================================
17 
18  void loadDeads(EventOfHits &eoh, const std::vector<DeadVec> &deadvectors) {
19  for (size_t il = 0; il < deadvectors.size(); il++) {
20  eoh.suckInDeads(int(il), deadvectors[il]);
21  }
22  }
23 
24  // Loading hits in CMSSW from two "large multi-layer vectors".
25  // orig_hitvectors[0] - pixels,
26  // orig_hitvectors[1] - strips.
27 
28  void cmssw_LoadHits_Begin(EventOfHits &eoh, const std::vector<const HitVec *> &orig_hitvectors) {
29  eoh.reset();
30  for (int i = 0; i < eoh.nLayers(); ++i) {
31  auto &&l = eoh[i];
32  l.beginRegistrationOfHits(*orig_hitvectors[l.is_pixel() ? 0 : 1]);
33  }
34  }
35 
36  // Loop with LayerOfHits::registerHit(int idx) - it takes Hit out of original HitVec to
37  // extract phi, r/z, and calculate qphifines
38  //
39  // Something like what is done in MkFitInputConverter::convertHits
40  //
41  // Problem is I don't know layers for each large-vector;
42  // Also, layer is calculated for each detset when looping over the HitCollection
43 
45  for (int i = 0; i < eoh.nLayers(); ++i) {
46  auto &&l = eoh[i];
47  l.endRegistrationOfHits(false);
48  }
49  }
50 
51  //=========================================================================
52  // Hit-index mapping / remapping
53  //=========================================================================
54 
56  for (auto &&track : seeds) {
57  for (int i = 0; i < track.nTotalHits(); ++i) {
58  const int hitidx = track.getHitIdx(i);
59  const int hitlyr = track.getHitLyr(i);
60  if (hitidx >= 0) {
61  const auto &loh = eoh[hitlyr];
62  track.setHitIdx(i, loh.getHitIndexFromOriginal(hitidx));
63  }
64  }
65  }
66  }
67 
68  void cmssw_ReMap_TrackHitIndices(const EventOfHits &eoh, TrackVec &out_tracks) {
69  for (auto &&track : out_tracks) {
70  for (int i = 0; i < track.nTotalHits(); ++i) {
71  const int hitidx = track.getHitIdx(i);
72  const int hitlyr = track.getHitLyr(i);
73  if (hitidx >= 0) {
74  const auto &loh = eoh[hitlyr];
75  track.setHitIdx(i, loh.getOriginalHitIndex(hitidx));
76  }
77  }
78  }
79  }
80 
81  //=========================================================================
82  // Seed cleaning (multi-iter)
83  //=========================================================================
84  int clean_cms_seedtracks_iter(TrackVec *seed_ptr, const IterationConfig &itrcfg, const BeamSpot &bspot) {
86 
87  const float etamax_brl = Config::c_etamax_brl;
88  const float dpt_common = Config::c_dpt_common;
89 
90  const float dzmax_bh = itrcfg.m_params.c_dzmax_bh;
91  const float drmax_bh = itrcfg.m_params.c_drmax_bh;
92  const float dzmax_eh = itrcfg.m_params.c_dzmax_eh;
93  const float drmax_eh = itrcfg.m_params.c_drmax_eh;
94  const float dzmax_bl = itrcfg.m_params.c_dzmax_bl;
95  const float drmax_bl = itrcfg.m_params.c_drmax_bl;
96  const float dzmax_el = itrcfg.m_params.c_dzmax_el;
97  const float drmax_el = itrcfg.m_params.c_drmax_el;
98 
99  const float ptmin_hpt = itrcfg.m_params.c_ptthr_hpt;
100 
101  const float dzmax2_inv_bh = 1.f / (dzmax_bh * dzmax_bh);
102  const float drmax2_inv_bh = 1.f / (drmax_bh * drmax_bh);
103  const float dzmax2_inv_eh = 1.f / (dzmax_eh * dzmax_eh);
104  const float drmax2_inv_eh = 1.f / (drmax_eh * drmax_eh);
105  const float dzmax2_inv_bl = 1.f / (dzmax_bl * dzmax_bl);
106  const float drmax2_inv_bl = 1.f / (drmax_bl * drmax_bl);
107  const float dzmax2_inv_el = 1.f / (dzmax_el * dzmax_el);
108  const float drmax2_inv_el = 1.f / (drmax_el * drmax_el);
109 
110  // Merge hits from overlapping seeds?
111  // For now always true, we require extra hits after seed,
112  // except for lowPtQuadStep, where we only merge hits for seeds at low pT and large pseudo-rapidity
113  const bool merge_hits = true; // itrcfg.merge_seed_hits_during_cleaning();
114  const float ptmax_merge_lowPtQuad = 0.2;
115  const float etamin_merge_lowPtQuad = 1.5;
116 
117  if (seed_ptr == nullptr)
118  return 0;
119  TrackVec &seeds = *seed_ptr;
120 
121  const int ns = seeds.size();
122 #ifdef DEBUG
123  std::cout << "before seed cleaning " << seeds.size() << std::endl;
124 #endif
125  TrackVec cleanSeedTracks;
126  cleanSeedTracks.reserve(ns);
127  std::vector<bool> writetrack(ns, true);
128 
129  const float invR1GeV = 1.f / Config::track1GeVradius;
130 
131  std::vector<int> nHits(ns);
132  std::vector<int> charge(ns);
133  std::vector<float> oldPhi(ns);
134  std::vector<float> pos2(ns);
135  std::vector<float> eta(ns);
136  std::vector<float> ctheta(ns);
137  std::vector<float> invptq(ns);
138  std::vector<float> pt(ns);
139  std::vector<float> x(ns);
140  std::vector<float> y(ns);
141  std::vector<float> z(ns);
142  std::vector<float> d0(ns);
143  int i1, i2; //for the sorting
144 
146  axis<float, unsigned short, 8, 8> ax_eta(-3.0, 3.0, 30u);
148 
149  phi_eta_binnor.begin_registration(ns);
150 
151  for (int ts = 0; ts < ns; ts++) {
152  const Track &tk = seeds[ts];
153  nHits[ts] = tk.nFoundHits();
154  charge[ts] = tk.charge();
155  oldPhi[ts] = tk.momPhi();
156  pos2[ts] = std::pow(tk.x(), 2) + std::pow(tk.y(), 2);
157  eta[ts] = tk.momEta();
158  ctheta[ts] = 1.f / std::tan(tk.theta());
159  invptq[ts] = tk.charge() * tk.invpT();
160  pt[ts] = tk.pT();
161  x[ts] = tk.x();
162  y[ts] = tk.y();
163  z[ts] = tk.z();
164  d0[ts] = tk.d0BeamSpot(bspot.x, bspot.y);
165 
166  phi_eta_binnor.register_entry_safe(oldPhi[ts], eta[ts]);
167  // If one is sure values are *within* axis ranges: b.register_entry(oldPhi[ts], eta[ts]);
168  }
169 
170  phi_eta_binnor.finalize_registration();
171 
172  for (int sorted_ts = 0; sorted_ts < ns; sorted_ts++) {
173  int ts = phi_eta_binnor.m_ranks[sorted_ts];
174 
175  if (not writetrack[ts])
176  continue; // Note: this speed up prevents transitive masking (possibly marginal gain).
177 
178  const float oldPhi1 = oldPhi[ts];
179  const float pos2_first = pos2[ts];
180  const float eta1 = eta[ts];
181  const float pt1 = pt[ts];
182  const float invptq_first = invptq[ts];
183 
184  // To study some more details -- need EventOfHits for this
185  int n_ovlp_hits_added = 0;
186 
187  auto phi_rng = ax_phi.from_R_rdr_to_N_bins(oldPhi[ts], 0.08f);
188  auto eta_rng = ax_eta.from_R_rdr_to_N_bins(eta[ts], .1f);
189 
190  for (auto i_phi = phi_rng.begin; i_phi != phi_rng.end; i_phi = ax_phi.next_N_bin(i_phi)) {
191  for (auto i_eta = eta_rng.begin; i_eta != eta_rng.end; i_eta = ax_eta.next_N_bin(i_eta)) {
192  const auto cbin = phi_eta_binnor.get_content(i_phi, i_eta);
193  for (auto i = cbin.first; i < cbin.end(); ++i) {
194  int tss = phi_eta_binnor.m_ranks[i];
195 
196  if (not writetrack[ts])
197  continue;
198  if (not writetrack[tss])
199  continue;
200  if (tss == ts)
201  continue;
202 
203  const float pt2 = pt[tss];
204 
205  // Always require charge consistency. If different charge is assigned, do not remove seed-track
206  if (charge[tss] != charge[ts])
207  continue;
208 
209  const float thisDPt = std::abs(pt2 - pt1);
210  // Require pT consistency between seeds. If dpT is large, do not remove seed-track.
211  if (thisDPt > dpt_common * pt1)
212  continue;
213 
214  const float eta2 = eta[tss];
215  const float deta2 = std::pow(eta1 - eta2, 2);
216 
217  const float oldPhi2 = oldPhi[tss];
218 
219  const float pos2_second = pos2[tss];
220  const float thisDXYSign05 = pos2_second > pos2_first ? -0.5f : 0.5f;
221 
222  const float thisDXY = thisDXYSign05 * sqrt(std::pow(x[ts] - x[tss], 2) + std::pow(y[ts] - y[tss], 2));
223 
224  const float invptq_second = invptq[tss];
225 
226  const float newPhi1 = oldPhi1 - thisDXY * invR1GeV * invptq_first;
227  const float newPhi2 = oldPhi2 + thisDXY * invR1GeV * invptq_second;
228 
229  const float dphi = cdist(std::abs(newPhi1 - newPhi2));
230 
231  const float dr2 = deta2 + dphi * dphi;
232 
233  const float thisDZ = z[ts] - z[tss] - thisDXY * (ctheta[ts] + ctheta[tss]);
234  const float dz2 = thisDZ * thisDZ;
235 
236  // Reject tracks within dR-dz elliptical window.
237  // Adaptive thresholds, based on observation that duplicates are more abundant at large pseudo-rapidity and low track pT
238  bool overlapping = false;
239  if (std::abs(eta1) < etamax_brl) {
240  if (pt1 > ptmin_hpt) {
241  if (dz2 * dzmax2_inv_bh + dr2 * drmax2_inv_bh < 1.0f)
242  overlapping = true;
243  } else {
244  if (dz2 * dzmax2_inv_bl + dr2 * drmax2_inv_bl < 1.0f)
245  overlapping = true;
246  }
247  } else {
248  if (pt1 > ptmin_hpt) {
249  if (dz2 * dzmax2_inv_eh + dr2 * drmax2_inv_eh < 1.0f)
250  overlapping = true;
251  } else {
252  if (dz2 * dzmax2_inv_el + dr2 * drmax2_inv_el < 1.0f)
253  overlapping = true;
254  }
255  }
256 
257  if (overlapping) {
258  //Mark tss as a duplicate
259  i1 = ts;
260  i2 = tss;
261  if (d0[tss] > d0[ts])
262  writetrack[tss] = false;
263  else {
264  writetrack[ts] = false;
265  i2 = ts;
266  i1 = tss;
267  }
268  // Add hits from tk2 to the seed we are keeping.
269  // NOTE: We have a limit in Track::Status for the number of seed hits.
270  // There is a check at entry and after adding of a new hit.
271  Track &tk = seeds[i1];
272  if (merge_hits && tk.nTotalHits() < Track::Status::kMaxSeedHits &&
274  (pt1 < ptmax_merge_lowPtQuad && std::abs(eta1) > etamin_merge_lowPtQuad))) {
275  const Track &tk2 = seeds[i2];
276  //We are not actually fitting to the extra hits; use chi2 of 0
277  float fakeChi2 = 0.0;
278 
279  for (int j = 0; j < tk2.nTotalHits(); ++j) {
280  int hitidx = tk2.getHitIdx(j);
281  int hitlyr = tk2.getHitLyr(j);
282  if (hitidx >= 0) {
283  bool unique = true;
284  for (int i = 0; i < tk.nTotalHits(); ++i) {
285  if ((hitidx == tk.getHitIdx(i)) && (hitlyr == tk.getHitLyr(i))) {
286  unique = false;
287  break;
288  }
289  }
290  if (unique) {
291  tk.addHitIdx(tk2.getHitIdx(j), tk2.getHitLyr(j), fakeChi2);
292  ++n_ovlp_hits_added;
294  break;
295  }
296  }
297  }
298  }
299  if (n_ovlp_hits_added > 0)
300  tk.sortHitsByLayer();
301  }
302  } //end of inner loop over tss
303  } //eta bin
304  } //phi bin
305 
306  if (writetrack[ts]) {
307  cleanSeedTracks.emplace_back(seeds[ts]);
308  }
309  }
310 
311  seeds.swap(cleanSeedTracks);
312 
313 #ifdef DEBUG
314  {
315  const int ns2 = seeds.size();
316  printf("Number of CMS seeds before %d --> after %d cleaning\n", ns, ns2);
317 
318  for (int it = 0; it < ns2; it++) {
319  const Track &ss = seeds[it];
320  printf(" %3i q=%+i pT=%7.3f eta=% 7.3f nHits=%i label=% i\n",
321  it,
322  ss.charge(),
323  ss.pT(),
324  ss.momEta(),
325  ss.nFoundHits(),
326  ss.label());
327  }
328  }
329 #endif
330 
331 #ifdef DEBUG
332  std::cout << "AFTER seed cleaning " << seeds.size() << std::endl;
333 #endif
334 
335  return seeds.size();
336  }
337 
338  //=========================================================================
339  // Duplicate cleaning
340  //=========================================================================
341 
343  const auto ntracks = tracks.size();
344  float eta1, phi1, pt1, deta, dphi, dr2;
345 
346  if (ntracks == 0) {
347  return;
348  }
349  for (auto itrack = 0U; itrack < ntracks - 1; itrack++) {
350  auto &track = tracks[itrack];
352  auto const algo = track.algorithm();
354  continue;
355  eta1 = track.momEta();
356  phi1 = track.momPhi();
357  pt1 = track.pT();
358  for (auto jtrack = itrack + 1; jtrack < ntracks; jtrack++) {
359  auto &track2 = tracks[jtrack];
360  if (track.label() == track2.label())
361  continue;
362  if (track.algoint() != track2.algoint())
363  continue;
364 
365  deta = std::abs(track2.momEta() - eta1);
366  if (deta > Config::maxdEta)
367  continue;
368 
369  dphi = std::abs(squashPhiMinimal(phi1 - track2.momPhi()));
370  if (dphi > Config::maxdPhi)
371  continue;
372 
373  float maxdR = Config::maxdR;
374  float maxdRSquared = maxdR * maxdR;
375  if (std::abs(eta1) > 2.5f)
376  maxdRSquared *= 16.0f;
377  else if (std::abs(eta1) > 1.44f)
378  maxdRSquared *= 9.0f;
379  dr2 = dphi * dphi + deta * deta;
380  if (dr2 < maxdRSquared) {
381  //Keep track with best score
382  if (track.score() > track2.score())
383  track2.setDuplicateValue(true);
384  else
385  track.setDuplicateValue(true);
386  continue;
387  } else {
388  if (pt1 == 0)
389  continue;
390  if (track2.pT() == 0)
391  continue;
392 
393  if (std::abs((1 / track2.pT()) - (1 / pt1)) < Config::maxdPt) {
395  float numHitsShared = 0;
396  for (int ihit2 = 0; ihit2 < track2.nTotalHits(); ihit2++) {
397  const int hitidx2 = track2.getHitIdx(ihit2);
398  const int hitlyr2 = track2.getHitLyr(ihit2);
399  if (hitidx2 >= 0) {
400  auto const it = std::find_if(track.beginHitsOnTrack(),
401  track.endHitsOnTrack(),
402  [&hitidx2, &hitlyr2](const HitOnTrack &element) {
403  return (element.index == hitidx2 && element.layer == hitlyr2);
404  });
405  if (it != track.endHitsOnTrack())
406  numHitsShared++;
407  }
408  }
409 
410  float fracHitsShared = numHitsShared / std::min(track.nFoundHits(), track2.nFoundHits());
411  //Only remove one of the tracks if they share at least X% of the hits (denominator is the shorter track)
412  if (fracHitsShared < Config::minFracHitsShared)
413  continue;
414  }
415  //Keep track with best score
416  if (track.score() > track2.score())
417  track2.setDuplicateValue(true);
418  else
419  track.setDuplicateValue(true);
420  } //end of if dPt
421  } //end of else
422  } //end of loop over track2
423  } //end of loop over track1
424  }
425 
427  tracks.erase(std::remove_if(tracks.begin(), tracks.end(), [](auto track) { return track.getDuplicateValue(); }),
428  tracks.end());
429  }
430 
431  //=========================================================================
432  // SHARED HITS DUPLICATE CLEANING
433  //=========================================================================
434 
436  const auto ntracks = tracks.size();
437 
438  std::vector<float> ctheta(ntracks);
439  std::multimap<int, int> hitMap;
440 
441  for (auto itrack = 0U; itrack < ntracks; itrack++) {
442  auto &trk = tracks[itrack];
443  ctheta[itrack] = 1.f / std::tan(trk.theta());
444  for (int i = 0; i < trk.nTotalHits(); ++i) {
445  if (trk.getHitIdx(i) < 0)
446  continue;
447  int a = trk.getHitLyr(i);
448  int b = trk.getHitIdx(i);
449  hitMap.insert(std::make_pair(b * 1000 + a, i > 0 ? itrack : -itrack)); //negative for first hit in trk
450  }
451  }
452 
453  for (auto itrack = 0U; itrack < ntracks; itrack++) {
454  auto &trk = tracks[itrack];
455  auto phi1 = trk.momPhi();
456  auto ctheta1 = ctheta[itrack];
457 
458  std::map<int, int> sharingMap;
459  for (int i = 0; i < trk.nTotalHits(); ++i) {
460  if (trk.getHitIdx(i) < 0)
461  continue;
462  int a = trk.getHitLyr(i);
463  int b = trk.getHitIdx(i);
464  auto range = hitMap.equal_range(b * 1000 + a);
465  for (auto it = range.first; it != range.second; ++it) {
466  if (std::abs(it->second) >= (int)itrack)
467  continue; // don't check your own hits (==) nor sym. checks (>)
468  if (i == 0 && it->second < 0)
469  continue; // shared first - first is not counted
470  sharingMap[std::abs(it->second)]++;
471  }
472  }
473 
474  for (const auto &elem : sharingMap) {
475  auto &track2 = tracks[elem.first];
476 
477  // broad dctheta-dphi compatibility checks; keep mostly to preserve consistency with old results
478  auto dctheta = std::abs(ctheta[elem.first] - ctheta1);
479  if (dctheta > 1.)
480  continue;
481 
482  auto dphi = std::abs(squashPhiMinimal(phi1 - track2.momPhi()));
483  if (dphi > 1.)
484  continue;
485 
486  if (elem.second >= std::min(trk.nFoundHits(), track2.nFoundHits()) * fraction) {
487  if (trk.score() > track2.score())
488  track2.setDuplicateValue(true);
489  else
490  trk.setDuplicateValue(true);
491  }
492  } // end sharing hits loop
493  } // end trk loop
494 
495  tracks.erase(std::remove_if(tracks.begin(), tracks.end(), [](auto track) { return track.getDuplicateValue(); }),
496  tracks.end());
497  }
498 
500  const float fraction,
501  const float drth_central,
502  const float drth_obarrel,
503  const float drth_forward) {
504  const auto ntracks = tracks.size();
505 
506  std::vector<float> ctheta(ntracks);
507  for (auto itrack = 0U; itrack < ntracks; itrack++) {
508  auto &trk = tracks[itrack];
509  ctheta[itrack] = 1.f / std::tan(trk.theta());
510  }
511 
512  float phi1, invpt1, dctheta, ctheta1, dphi, dr2;
513  for (auto itrack = 0U; itrack < ntracks; itrack++) {
514  auto &trk = tracks[itrack];
515  phi1 = trk.momPhi();
516  invpt1 = trk.invpT();
517  ctheta1 = ctheta[itrack];
518  for (auto jtrack = itrack + 1; jtrack < ntracks; jtrack++) {
519  auto &track2 = tracks[jtrack];
520  if (trk.label() == track2.label())
521  continue;
522 
523  dctheta = std::abs(ctheta[jtrack] - ctheta1);
524 
525  if (dctheta > Config::maxdcth)
526  continue;
527 
528  dphi = std::abs(squashPhiMinimal(phi1 - track2.momPhi()));
529 
530  if (dphi > Config::maxdphi)
531  continue;
532 
533  float maxdRSquared = drth_central * drth_central;
534  if (std::abs(ctheta1) > Config::maxcth_fw)
535  maxdRSquared = drth_forward * drth_forward;
536  else if (std::abs(ctheta1) > Config::maxcth_ob)
537  maxdRSquared = drth_obarrel * drth_obarrel;
538  dr2 = dphi * dphi + dctheta * dctheta;
539  if (dr2 < maxdRSquared) {
540  //Keep track with best score
541  if (trk.score() > track2.score())
542  track2.setDuplicateValue(true);
543  else
544  trk.setDuplicateValue(true);
545  continue;
546  }
547 
548  if (std::abs(track2.invpT() - invpt1) > Config::maxd1pt)
549  continue;
550 
551  auto sharedCount = 0;
552  auto sharedFirst = 0;
553  const auto minFoundHits = std::min(trk.nFoundHits(), track2.nFoundHits());
554 
555  for (int i = 0; i < trk.nTotalHits(); ++i) {
556  if (trk.getHitIdx(i) < 0)
557  continue;
558  const int a = trk.getHitLyr(i);
559  const int b = trk.getHitIdx(i);
560  for (int j = 0; j < track2.nTotalHits(); ++j) {
561  if (track2.getHitIdx(j) < 0)
562  continue;
563  const int c = track2.getHitLyr(j);
564  const int d = track2.getHitIdx(j);
565 
566  //this is to count once shared matched hits (may be done more properly...)
567  if (a == c && b == d)
568  sharedCount += 1;
569  if (j == 0 && i == 0 && a == c && b == d)
570  sharedFirst += 1;
571 
572  if ((sharedCount - sharedFirst) >= ((minFoundHits - sharedFirst) * fraction))
573  continue;
574  }
575  if ((sharedCount - sharedFirst) >= ((minFoundHits - sharedFirst) * fraction))
576  continue;
577  }
578 
579  //selection here - 11percent fraction of shared hits to label a duplicate
580  if ((sharedCount - sharedFirst) >= ((minFoundHits - sharedFirst) * fraction)) {
581  if (trk.score() > track2.score())
582  track2.setDuplicateValue(true);
583  else
584  trk.setDuplicateValue(true);
585  }
586  }
587  } //end loop one over tracks
588 
589  //removal here
590  tracks.erase(std::remove_if(tracks.begin(), tracks.end(), [](auto track) { return track.getDuplicateValue(); }),
591  tracks.end());
592  }
593 
594  //=========================================================================
595  //
596  //=========================================================================
597 
599 #ifdef DEBUG
600  std::cout << " find_and_remove_duplicates: input track size " << tracks.size() << std::endl;
601 #endif
602  if (itconf.m_requires_quality_filter && !(itconf.m_requires_dupclean_tight)) {
604  } else if (itconf.m_requires_dupclean_tight) {
606  itconf.m_params.fracSharedHits,
607  itconf.m_params.drth_central,
608  itconf.m_params.drth_obarrel,
609  itconf.m_params.drth_forward);
610  } else {
613  }
614 
615 #ifdef DEBUG
616  std::cout << " find_and_remove_duplicates: output track size " << tracks.size() << std::endl;
617  for (auto const &tk : tracks) {
618  std::cout << tk.parameters() << std::endl;
619  }
620 #endif
621  }
622 
623  } // namespace StdSeq
624 } // namespace mkfit
void find_and_remove_duplicates(TrackVec &tracks, const IterationConfig &itconf)
Definition: MkStdSeqs.cc:598
int getHitIdx(int posHitIdx) const
Definition: Track.h:455
float d0BeamSpot(const float x_bs, const float y_bs, bool linearize=false) const
Definition: Track.cc:190
IterationParams m_params
float squashPhiMinimal(float phi)
Definition: Hit.h:26
int getHitLyr(int posHitIdx) const
Definition: Track.h:456
const float maxdPt
Definition: Config.cc:31
const float maxdphi
Definition: Config.cc:38
const float maxd1pt
Definition: Config.cc:37
int charge() const
Definition: Track.h:183
void cmssw_Map_TrackHitIndices(const EventOfHits &eoh, TrackVec &seeds)
Definition: MkStdSeqs.cc:55
void find_duplicates(TrackVec &tracks)
Definition: MkStdSeqs.cc:342
const float maxdcth
Definition: Config.cc:39
I_pair from_R_rdr_to_N_bins(R r, R dr) const
Definition: binnor.h:73
float pT() const
Definition: Track.h:169
constexpr float c_dpt_common
Definition: Config.h:128
void cmssw_LoadHits_End(EventOfHits &eoh)
Definition: MkStdSeqs.cc:44
void find_duplicates_sharedhits_pixelseed(TrackVec &tracks, const float fraction, const float drth_central, const float drth_obarrel, const float drth_forward)
Definition: MkStdSeqs.cc:499
C_pair get_content(B_pair n_bin) const
Definition: binnor.h:240
const float maxdR
Definition: Config.cc:34
static constexpr int kMaxSeedHits
Definition: Track.h:203
int nLayers() const
I next_N_bin(I bin) const
Definition: binnor.h:113
float invpT() const
Definition: Track.h:170
void cmssw_LoadHits_Begin(EventOfHits &eoh, const std::vector< const HitVec *> &orig_hitvectors)
Definition: MkStdSeqs.cc:28
void finalize_registration()
Definition: binnor.h:289
axis_base< R, I, M, N >::I_pair from_R_rdr_to_N_bins(R r, R dr) const
Definition: binnor.h:110
const float maxcth_fw
Definition: Config.cc:41
float theta() const
Definition: Track.h:174
int nFoundHits() const
Definition: Track.h:516
void find_duplicates_sharedhits(TrackVec &tracks, const float fraction)
Definition: MkStdSeqs.cc:435
float momEta() const
Definition: Track.h:173
void remove_duplicates(TrackVec &tracks)
Definition: MkStdSeqs.cc:426
float y() const
Definition: Track.h:159
const float maxcth_ob
Definition: Config.cc:40
std::vector< C > m_ranks
Definition: binnor.h:211
void sortHitsByLayer()
Definition: Track.cc:266
float x
Definition: Hit.h:283
constexpr float c_etamax_brl
Definition: Config.h:127
void cmssw_ReMap_TrackHitIndices(const EventOfHits &eoh, TrackVec &out_tracks)
Definition: MkStdSeqs.cc:68
const float maxdEta
Definition: Config.cc:33
constexpr float PI
Definition: Config.h:42
float y
Definition: Hit.h:283
const float maxdPhi
Definition: Config.cc:32
T sqrt(T t)
Definition: SSEVec.h:19
def unique(seq, keepstr=True)
Definition: tier0.py:24
void register_entry_safe(typename A1::real_t r1, typename A2::real_t r2)
Definition: binnor.h:282
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void loadDeads(EventOfHits &eoh, const std::vector< DeadVec > &deadvectors)
Definition: MkStdSeqs.cc:18
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
void addHitIdx(int hitIdx, int hitLyr, float chi2)
Definition: Track.h:442
float cdist(float a)
Definition: Config.h:67
d
Definition: ztail.py:151
void begin_registration(C n_items)
Definition: binnor.h:264
std::vector< Track > TrackVec
static constexpr float d0
auto const & tracks
cannot be loose
float z() const
Definition: Track.h:160
constexpr float track1GeVradius
Definition: Config.h:126
double b
Definition: hdecay.h:118
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
int nTotalHits() const
Definition: Track.h:517
double a
Definition: hdecay.h:119
float x
TrackAlgorithm
track algorithm; copy from TrackBase.h to keep in standalone builds
Definition: Track.h:275
float x() const
Definition: Track.h:158
const bool useHitsForDuplicates
Definition: Config.h:142
float momPhi() const
Definition: Track.h:172
I next_N_bin(I bin) const
Definition: binnor.h:74
void suckInDeads(int layer, const DeadVec &deadv)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
Definition: fakeMenu.h:6
int clean_cms_seedtracks_iter(TrackVec *seed_ptr, const IterationConfig &itrcfg, const BeamSpot &bspot)
Definition: MkStdSeqs.cc:84
const float minFracHitsShared
Definition: Config.cc:35