CMS 3D CMS Logo

Tracklet.cc
Go to the documentation of this file.
5 
8 
9 #include <memory>
10 
11 #include <sstream>
12 
13 using namespace std;
14 using namespace trklet;
15 
16 Tracklet::Tracklet(Settings const& settings,
17  const L1TStub* innerStub,
18  const L1TStub* middleStub,
19  const L1TStub* outerStub,
20  const Stub* innerFPGAStub,
21  const Stub* middleFPGAStub,
22  const Stub* outerFPGAStub,
23  double rinv,
24  double phi0,
25  double d0,
26  double z0,
27  double t,
28  double rinvapprox,
29  double phi0approx,
30  double d0approx,
31  double z0approx,
32  double tapprox,
33  int irinv,
34  int iphi0,
35  int id0,
36  int iz0,
37  int it,
38  LayerProjection layerprojs[N_PROJ],
39  DiskProjection diskprojs[N_PROJ],
40  bool disk,
41  bool overlap)
42  : settings_(settings) {
43  overlap_ = overlap;
44  disk_ = disk;
45  assert(!(disk && overlap));
46  barrel_ = (!disk) && (!overlap);
47  triplet_ = false;
48 
49  trackletIndex_ = -1;
50  TCIndex_ = -1;
51 
53 
54  if (barrel_ && middleStub == nullptr)
56 
63 
64  trackpars_.init(rinv, phi0, d0, t, z0);
65 
67 
68  fpgapars_.rinv().set(irinv, settings_.nbitsrinv(), false, __LINE__, __FILE__);
69  fpgapars_.phi0().set(iphi0, settings_.nbitsphi0(), false, __LINE__, __FILE__);
70  fpgapars_.d0().set(id0, settings_.nbitsd0(), false, __LINE__, __FILE__);
71  fpgapars_.z0().set(iz0, settings_.nbitsz0(), false, __LINE__, __FILE__);
72  fpgapars_.t().set(it, settings_.nbitst(), false, __LINE__, __FILE__);
73 
74  fpgatrack_ = nullptr;
75 
76  if (innerStub_)
78  if (middleStub_)
80  if (outerStub_)
82 
84 
85  triplet_ = (seedIndex_ >= 8);
86 
87  //fill projection layers
88  for (unsigned int i = 0; i < N_LAYER - 2; i++) {
89  projlayer_[i] = settings.projlayers(seedIndex_, i);
90  }
91 
92  //fill projection disks
93  for (unsigned int i = 0; i < N_DISK; i++) {
94  projdisk_[i] = settings.projdisks(seedIndex_, i);
95  }
96 
97  //Handle projections to the layers
98  for (unsigned int i = 0; i < N_LAYER - 2; i++) {
99  if (projlayer_[i] == 0)
100  continue;
101  if (!layerprojs[i].valid())
102  continue;
103 
104  layerproj_[projlayer_[i] - 1] = layerprojs[i];
105  }
106  //Now handle projections to the disks
107  for (unsigned int i = 0; i < N_DISK; i++) {
108  if (projdisk_[i] == 0)
109  continue;
110  if (!diskprojs[i].valid())
111  continue;
112 
113  diskproj_[projdisk_[i] - 1] = diskprojs[i];
114  }
115 
116  ichisqrphifit_.set(-1, 8, false);
117  ichisqrzfit_.set(-1, 8, false);
118 }
119 
121  set<int> tpset;
122 
123  set<int> tpsetstubinner;
124  set<int> tpsetstubouter;
125 
126  vector<int> tps = innerStub_->tps();
127  for (auto tp : tps) {
128  if (tp != 0) {
129  tpsetstubinner.insert(tp);
130  tpset.insert(abs(tp));
131  }
132  }
133 
134  tps = outerStub_->tps();
135  for (auto tp : tps) {
136  if (tp != 0) {
137  tpsetstubouter.insert(tp);
138  tpset.insert(abs(tp));
139  }
140  }
141 
142  for (auto& tp : tpset) {
143  if (tpsetstubinner.find(tp) != tpsetstubinner.end() && tpsetstubinner.find(-tp) != tpsetstubinner.end() &&
144  tpsetstubouter.find(tp) != tpsetstubouter.end() && tpsetstubouter.find(-tp) != tpsetstubouter.end()) {
145  return tp;
146  }
147  }
148  return 0;
149 }
150 
152  set<int> tpset;
153  set<int> tpsetstub;
154  set<int> tpsetstubinner;
155  set<int> tpsetstubouter;
156 
157  vector<int> tps = stub->tps();
158  for (auto tp : tps) {
159  if (tp != 0) {
160  tpsetstub.insert(tp);
161  tpset.insert(abs(tp));
162  }
163  }
164  tps = innerStub_->tps();
165  for (auto tp : tps) {
166  if (tp != 0) {
167  tpsetstubinner.insert(tp);
168  tpset.insert(abs(tp));
169  }
170  }
171  tps = outerStub_->tps();
172  for (auto tp : tps) {
173  if (tp != 0) {
174  tpsetstubouter.insert(tp);
175  tpset.insert(abs(tp));
176  }
177  }
178 
179  for (auto tp : tpset) {
180  if (tpsetstub.find(tp) != tpsetstub.end() && tpsetstub.find(-tp) != tpsetstub.end() &&
181  tpsetstubinner.find(tp) != tpsetstubinner.end() && tpsetstubinner.find(-tp) != tpsetstubinner.end() &&
182  tpsetstubouter.find(tp) != tpsetstubouter.end() && tpsetstubouter.find(-tp) != tpsetstubouter.end()) {
183  return true;
184  }
185  }
186 
187  return false;
188 }
189 
193  if (middleFPGAStub_) {
195  }
197 
198  return str;
199 }
200 
202  if (settings_.writeoutReal()) {
203  std::string oss = std::to_string(fpgapars_.rinv().value() * settings_.krinvpars()) + " " +
204  std::to_string(fpgapars_.phi0().value() * settings_.kphi0pars()) + " " +
205  std::to_string(fpgapars_.d0().value() * settings_.kd0pars()) + " " +
206  std::to_string(fpgapars_.z0().value() * settings_.kz()) + " " +
207  std::to_string(fpgapars_.t().value() * settings_.ktpars());
208  return oss;
209  } else {
211  if (middleFPGAStub_) {
212  str += middleFPGAStub_->stubindex().str() + "|";
213  }
214  str += outerFPGAStub_->stubindex().str() + "|" + fpgapars_.rinv().str() + "|" + fpgapars_.phi0().str() + "|";
215  if (middleFPGAStub_)
216  str += fpgapars_.d0().str() + "|";
217  str += fpgapars_.z0().str() + "|" + fpgapars_.t().str();
218  return str;
219  }
220 }
221 
222 std::string Tracklet::vmstrlayer(int layer, unsigned int allstubindex) {
223  FPGAWord index;
224  if (allstubindex >= (1 << 7)) {
225  edm::LogPrint("Tracklet") << "Warning projection number too large!";
226  index.set((1 << 7) - 1, 7, true, __LINE__, __FILE__);
227  } else {
228  index.set(allstubindex, 7, true, __LINE__, __FILE__);
229  }
230 
231  // This is a shortcut.
232  //int irinvvm=16+(fpgarinv().value()>>(fpgarinv().nbits()-5));
233  // rinv is not directly available in the TrackletProjection.
234  // can be inferred from phi derivative: rinv = - phider * 2
235  int tmp_irinv = layerproj_[layer - 1].fpgaphiprojder().value() * (-2);
236  int nbits_irinv = layerproj_[layer - 1].fpgaphiprojder().nbits() + 1;
237 
238  // irinv in VMProjection:
239  // top 5 bits of rinv and shifted to be positive
240  int irinvvm = 16 + (tmp_irinv >> (nbits_irinv - 5));
241 
242  if (settings_.extended() && (irinvvm > 31)) { //TODO - displaced tracking should protect against this
243  edm::LogPrint("Tracklet") << "Warning irinvvm too large:" << irinvvm;
244  irinvvm = 31;
245  }
246 
247  assert(irinvvm >= 0);
248  assert(irinvvm < 32);
249  FPGAWord tmp;
250  tmp.set(irinvvm, 5, true, __LINE__, __FILE__);
251  std::string oss = index.str() + "|" + layerproj_[layer - 1].fpgazbin1projvm().str() + "|" +
252  layerproj_[layer - 1].fpgazbin2projvm().str() + "|" + layerproj_[layer - 1].fpgafinezvm().str() +
253  "|" + tmp.str() + "|" + std::to_string(PSseed());
254  return oss;
255 }
256 
257 std::string Tracklet::vmstrdisk(int disk, unsigned int allstubindex) {
258  FPGAWord index;
259  if (allstubindex >= (1 << 7)) {
260  edm::LogPrint("Tracklet") << "Warning projection number too large!";
261  index.set((1 << 7) - 1, 7, true, __LINE__, __FILE__);
262  } else {
263  index.set(allstubindex, 7, true, __LINE__, __FILE__);
264  }
265  std::string oss = index.str() + "|" + diskproj_[disk - 1].fpgarbin1projvm().str() + "|" +
266  diskproj_[disk - 1].fpgarbin2projvm().str() + "|" + diskproj_[disk - 1].fpgafinervm().str() + "|" +
267  diskproj_[disk - 1].getBendIndex().str();
268  return oss;
269 }
270 
272  assert(layer > 0 && layer <= N_LAYER);
273  FPGAWord tmp;
274  if (trackletIndex_ < 0 || trackletIndex_ > (int)settings_.ntrackletmax()) {
275  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " trackletIndex_ = " << trackletIndex_;
276  }
277  tmp.set(trackletIndex_, settings_.nbitstrackletindex(), true, __LINE__, __FILE__);
278  FPGAWord tcid;
279  if (settings_.extended()) {
280  tcid.set(TCIndex_, 8, true, __LINE__, __FILE__);
281  } else {
282  tcid.set(TCIndex_, 7, true, __LINE__, __FILE__);
283  }
284 
285  std::string oss = tcid.str() + "|" + tmp.str() + "|" + layerproj_[layer - 1].fpgaphiproj().str() + "|" +
286  layerproj_[layer - 1].fpgazproj().str() + "|" + layerproj_[layer - 1].fpgaphiprojder().str() + "|" +
287  layerproj_[layer - 1].fpgazprojder().str();
288  return oss;
289 }
290 
292  assert(abs(disk) <= N_DISK);
293  FPGAWord tmp;
294  if (trackletIndex_ < 0 || trackletIndex_ > (int)settings_.ntrackletmax()) {
295  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " trackletIndex_ = " << trackletIndex_;
296  }
297  tmp.set(trackletIndex_, settings_.nbitstrackletindex(), true, __LINE__, __FILE__);
298  FPGAWord tcid;
299  if (settings_.extended()) {
300  tcid.set(TCIndex_, 8, true, __LINE__, __FILE__);
301  } else {
302  tcid.set(TCIndex_, 7, true, __LINE__, __FILE__);
303  }
304  std::string oss = tcid.str() + "|" + tmp.str() + "|" + diskproj_[abs(disk) - 1].fpgaphiproj().str() + "|" +
305  diskproj_[abs(disk) - 1].fpgarproj().str() + "|" + diskproj_[abs(disk) - 1].fpgaphiprojder().str() +
306  "|" + diskproj_[abs(disk) - 1].fpgarprojder().str();
307  return oss;
308 }
309 
311  int ideltaphi,
312  int ideltaz,
313  double dphi,
314  double dz,
315  double dphiapprox,
316  double dzapprox,
317  int stubid,
318  double rstub,
319  const trklet::Stub* stubptr) {
320  assert(layer > 0 && layer <= N_LAYER);
321  layerresid_[layer - 1].init(
322  settings_, layer, ideltaphi, ideltaz, stubid, dphi, dz, dphiapprox, dzapprox, rstub, stubptr);
323 }
324 
326  int ideltaphi,
327  int ideltar,
328  double dphi,
329  double dr,
330  double dphiapprox,
331  double drapprox,
332  double alpha,
333  int stubid,
334  double zstub,
335  const trklet::Stub* stubptr) {
336  assert(abs(disk) <= N_DISK);
338  disk,
339  ideltaphi,
340  ideltar,
341  stubid,
342  dphi,
343  dr,
344  dphiapprox,
345  drapprox,
346  zstub,
347  alpha,
348  stubptr->alphanew(),
349  stubptr);
350 }
351 
353  int nmatches = 0;
354 
355  for (const auto& ilayerresid : layerresid_) {
356  if (ilayerresid.valid()) {
357  nmatches++;
358  }
359  }
360 
361  return nmatches;
362 }
363 
365  int nmatches = 0;
366 
367  for (const auto& idiskresid : diskresid_) {
368  if (idiskresid.valid()) {
369  nmatches++;
370  }
371  }
372  return nmatches;
373 }
374 
376  assert(layer > 0 && layer <= N_LAYER);
377 
378  FPGAWord tmp;
379  if (trackletIndex_ < 0 || trackletIndex_ > (int)settings_.ntrackletmax()) {
380  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " trackletIndex_ = " << trackletIndex_;
381  }
382  tmp.set(trackletIndex_, settings_.nbitstrackletindex(), true, __LINE__, __FILE__);
383  FPGAWord tcid;
384  if (settings_.extended()) {
385  tcid.set(TCIndex_, 8, true, __LINE__, __FILE__);
386  } else {
387  tcid.set(TCIndex_, 7, true, __LINE__, __FILE__);
388  }
389  std::string oss = tcid.str() + "|" + tmp.str() + "|" + layerresid_[layer - 1].fpgastubid().str() + "|" +
390  layerresid_[layer - 1].fpgaphiresid().str() + "|" + layerresid_[layer - 1].fpgazresid().str();
391  return oss;
392 }
393 
395  assert(disk > 0 && disk <= N_DISK);
396 
397  FPGAWord tmp;
398  if (trackletIndex_ < 0 || trackletIndex_ > (int)settings_.ntrackletmax()) {
399  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " trackletIndex_ = " << trackletIndex_;
400  }
401  tmp.set(trackletIndex_, settings_.nbitstrackletindex(), true, __LINE__, __FILE__);
402  FPGAWord tcid;
403  if (settings_.extended()) {
404  tcid.set(TCIndex_, 8, true, __LINE__, __FILE__);
405  } else {
406  tcid.set(TCIndex_, 7, true, __LINE__, __FILE__);
407  }
408  std::string oss = tcid.str() + "|" + tmp.str() + "|" + diskresid_[disk - 1].fpgastubid().str() + "|" +
409  diskresid_[disk - 1].fpgaphiresid().str() + "|" + diskresid_[disk - 1].fpgarresid().str();
410  return oss;
411 }
412 
413 std::vector<const L1TStub*> Tracklet::getL1Stubs() {
414  std::vector<const L1TStub*> tmp;
415 
416  if (innerStub_)
417  tmp.push_back(innerStub_);
418  if (middleStub_)
419  tmp.push_back(middleStub_);
420  if (outerStub_)
421  tmp.push_back(outerStub_);
422 
423  for (const auto& ilayerresid : layerresid_) {
424  if (ilayerresid.valid())
425  tmp.push_back(ilayerresid.stubptr()->l1tstub());
426  }
427 
428  for (const auto& idiskresid : diskresid_) {
429  if (idiskresid.valid())
430  tmp.push_back(idiskresid.stubptr()->l1tstub());
431  }
432 
433  return tmp;
434 }
435 
436 std::map<int, int> Tracklet::getStubIDs() {
437  std::map<int, int> stubIDs;
438 
439  // For future reference, *resid_[i] uses i as the absolute stub index. (0-5 for barrel, 0-4 for disk)
440  // On the other hand, proj*_[i] uses i almost like *resid_[i], except the *seeding* layer indices are removed entirely.
441  // E.g. An L3L4 track has 0=L1, 1=L2, 2=L4, 3=L5 for the barrels (for proj*_[i])
442 
443  if (innerFPGAStub_)
445  if (middleFPGAStub_)
447  if (outerFPGAStub_)
449 
450  if (barrel_) {
451  for (int i = 0; i < N_LAYER; i++) {
452  //check barrel
453  if (layerresid_[i].valid()) {
454  // two extra bits to indicate if the matched stub is local or from neighbor
455  int location = 1; // local
457 
458  stubIDs[1 + i] = layerresid_[i].fpgastubid().value() + location;
459  }
460 
461  //check disk
462  if (i >= N_DISK)
463  continue; //i=[0..4] for disks
464  if (diskresid_[i].valid()) {
465  if (i == 3 && layerresid_[0].valid() && innerFPGAStub_->layer().value() == 1)
466  continue; // Don't add D4 if track has L1 stub
467  // two extra bits to indicate if the matched stub is local or from neighbor
468  int location = 1; // local
470 
471  if (itfit().value() < 0) {
472  stubIDs[-11 - i] = diskresid_[i].fpgastubid().value() + location;
473  } else {
474  stubIDs[11 + i] = diskresid_[i].fpgastubid().value() + location;
475  }
476  }
477  }
478 
479  //get stubs making up tracklet
480  if (innerFPGAStub_)
481  stubIDs[innerFPGAStub_->layer().value() + 1] = innerFPGAStub_->phiregionaddress() + (1 << 10);
482  if (middleFPGAStub_)
483  stubIDs[middleFPGAStub_->layer().value() + 1] = middleFPGAStub_->phiregionaddress() + (1 << 10);
484  if (outerFPGAStub_)
485  stubIDs[outerFPGAStub_->layer().value() + 1] = outerFPGAStub_->phiregionaddress() + (1 << 10);
486 
487  } else if (disk_) {
488  for (int i = 0; i < N_DISK; i++) {
489  //check barrel
490  if (layerresid_[i].valid()) {
491  // two extra bits to indicate if the matched stub is local or from neighbor
492  int location = 1; // local
494 
495  stubIDs[1 + i] = layerresid_[i].fpgastubid().value() + location;
496  }
497 
498  //check disks
499  if (i == 4 && layerresid_[1].valid())
500  continue; // Don't add D5 if track has L2 stub
501  if (diskresid_[i].valid()) {
502  // two extra bits to indicate if the matched stub is local or from neighbor
503  int location = 1; // local
505 
506  if (innerStub_->disk() < 0) {
507  stubIDs[-11 - i] = diskresid_[i].fpgastubid().value() + location;
508  } else {
509  stubIDs[11 + i] = diskresid_[i].fpgastubid().value() + location;
510  }
511  }
512  }
513 
514  //get stubs making up tracklet
515  if (innerFPGAStub_->disk().value() < 0) { //negative side runs 6-10
516  if (innerFPGAStub_)
517  stubIDs[innerFPGAStub_->disk().value() - 10] = innerFPGAStub_->phiregionaddress() + (1 << 10);
518  if (middleFPGAStub_)
519  stubIDs[middleFPGAStub_->disk().value() - 10] = middleFPGAStub_->phiregionaddress() + (1 << 10);
520  if (outerFPGAStub_)
521  stubIDs[outerFPGAStub_->disk().value() - 10] = outerFPGAStub_->phiregionaddress() + (1 << 10);
522  } else { // positive side runs 11-15]
523  if (innerFPGAStub_)
524  stubIDs[innerFPGAStub_->disk().value() + 10] = innerFPGAStub_->phiregionaddress() + (1 << 10);
525  if (middleFPGAStub_)
526  stubIDs[middleFPGAStub_->disk().value() + 10] = middleFPGAStub_->phiregionaddress() + (1 << 10);
527  if (outerFPGAStub_)
528  stubIDs[outerFPGAStub_->disk().value() + 10] = outerFPGAStub_->phiregionaddress() + (1 << 10);
529  }
530 
531  } else if (overlap_) {
532  for (int i = 0; i < N_DISK; i++) {
533  //check barrel
534  if (layerresid_[i].valid()) {
535  // two extra bits to indicate if the matched stub is local or from neighbor
536  int location = 1; // local
538 
539  stubIDs[1 + i] = layerresid_[i].fpgastubid().value() + location;
540  }
541 
542  //check disks
543  if (diskresid_[i].valid()) {
544  // two extra bits to indicate if the matched stub is local or from neighbor
545  int location = 1; // local
547 
548  if (innerStub_->disk() < 0) { // if negative overlap
549  if (innerFPGAStub_->layer().value() != 2 || !layerresid_[0].valid() ||
550  i != 3) { // Don't add D4 if this is an L3L2 track with an L1 stub
551  stubIDs[-11 - i] = diskresid_[i].fpgastubid().value() + location;
552  }
553  } else {
554  if (innerFPGAStub_->layer().value() != 2 || !layerresid_[0].valid() || i != 3) {
555  stubIDs[11 + i] = diskresid_[i].fpgastubid().value() + location;
556  }
557  }
558  }
559  }
560 
561  //get stubs making up tracklet
562 
563  if (innerFPGAStub_->layer().value() == 2) { // L3L2 track
564  if (innerFPGAStub_)
565  stubIDs[innerFPGAStub_->layer().value() + 1] = innerFPGAStub_->phiregionaddress() + (1 << 10);
566  if (middleFPGAStub_)
567  stubIDs[middleFPGAStub_->layer().value() + 1] = middleFPGAStub_->phiregionaddress() + (1 << 10);
568  if (outerFPGAStub_)
569  stubIDs[outerFPGAStub_->layer().value() + 1] = outerFPGAStub_->phiregionaddress() + (1 << 10);
570  } else if (innerFPGAStub_->disk().value() < 0) { //negative side runs -11 - -15
571  if (innerFPGAStub_)
572  stubIDs[innerFPGAStub_->disk().value() - 10] = innerFPGAStub_->phiregionaddress() + (1 << 10);
573  if (middleFPGAStub_)
574  stubIDs[middleFPGAStub_->layer().value() + 1] = middleFPGAStub_->phiregionaddress() + (1 << 10);
575  if (outerFPGAStub_)
576  stubIDs[outerFPGAStub_->layer().value() + 1] = outerFPGAStub_->phiregionaddress() + (1 << 10);
577  } else { // positive side runs 11-15]
578  if (innerFPGAStub_)
579  stubIDs[innerFPGAStub_->disk().value() + 10] = innerFPGAStub_->phiregionaddress() + (1 << 10);
580  if (middleFPGAStub_)
581  stubIDs[middleFPGAStub_->layer().value() + 1] = middleFPGAStub_->phiregionaddress() + (1 << 10);
582  if (outerFPGAStub_)
583  stubIDs[outerFPGAStub_->layer().value() + 1] = outerFPGAStub_->phiregionaddress() + (1 << 10);
584  }
585  }
586 
587  return stubIDs;
588 }
589 
590 void Tracklet::setFitPars(double rinvfit,
591  double phi0fit,
592  double d0fit,
593  double tfit,
594  double z0fit,
595  double chisqrphifit,
596  double chisqrzfit,
597  double rinvfitexact,
598  double phi0fitexact,
599  double d0fitexact,
600  double tfitexact,
601  double z0fitexact,
602  double chisqrphifitexact,
603  double chisqrzfitexact,
604  int irinvfit,
605  int iphi0fit,
606  int id0fit,
607  int itfit,
608  int iz0fit,
609  int ichisqrphifit,
610  int ichisqrzfit,
611  int hitpattern,
612  const vector<const L1TStub*>& l1stubs) {
614  chisqrphifit_ = chisqrphifit;
615  chisqrzfit_ = chisqrzfit;
616 
618  chisqrphifitexact_ = chisqrphifitexact;
619  chisqrzfitexact_ = chisqrzfitexact;
620 
621  if (irinvfit > (1 << 14))
622  irinvfit = (1 << 14);
623  if (irinvfit <= -(1 << 14))
624  irinvfit = -(1 << 14) + 1;
625  fpgafitpars_.rinv().set(irinvfit, 15, false, __LINE__, __FILE__);
626  fpgafitpars_.phi0().set(iphi0fit, 19, false, __LINE__, __FILE__);
627  fpgafitpars_.d0().set(id0fit, 19, false, __LINE__, __FILE__);
628  fpgafitpars_.t().set(itfit, 14, false, __LINE__, __FILE__);
629 
630  if (iz0fit >= (1 << (settings_.nbitsz0() - 1))) {
631  iz0fit = (1 << (settings_.nbitsz0() - 1)) - 1;
632  }
633 
634  if (iz0fit <= -(1 << (settings_.nbitsz0() - 1))) {
635  iz0fit = 1 - (1 << (settings_.nbitsz0() - 1));
636  }
637 
638  fpgafitpars_.z0().set(iz0fit, settings_.nbitsz0(), false, __LINE__, __FILE__);
639  ichisqrphifit_.set(ichisqrphifit, 8, true, __LINE__, __FILE__);
640  ichisqrzfit_.set(ichisqrzfit, 8, true, __LINE__, __FILE__);
641 
642  hitpattern_ = hitpattern;
643 
644  fpgatrack_ = std::make_unique<Track>(makeTrack(l1stubs));
645 }
646 
648  string stubid0 = "111111111";
649  string stubid1 = "111111111";
650  string stubid2 = "111111111";
651  string stubid3 = "111111111";
652 
653  if (isBarrel()) {
654  if (layer() == 1) {
655  if (layerresid_[2].valid()) {
656  stubid0 = layerresid_[2].fpgastubid().str();
657  }
658  if (layerresid_[3].valid()) {
659  stubid1 = layerresid_[3].fpgastubid().str();
660  }
661  if (layerresid_[4].valid()) {
662  stubid2 = layerresid_[4].fpgastubid().str();
663  }
664  if (layerresid_[5].valid()) {
665  stubid3 = layerresid_[5].fpgastubid().str();
666  }
667  if (diskresid_[0].valid()) {
668  stubid3 = diskresid_[0].fpgastubid().str();
669  }
670  if (diskresid_[1].valid()) {
671  stubid2 = diskresid_[1].fpgastubid().str();
672  }
673  if (diskresid_[2].valid()) {
674  stubid1 = diskresid_[2].fpgastubid().str();
675  }
676  if (diskresid_[3].valid()) {
677  stubid0 = diskresid_[3].fpgastubid().str();
678  }
679  }
680 
681  if (layer() == 3) {
682  if (layerresid_[0].valid()) {
683  stubid0 = layerresid_[0].fpgastubid().str();
684  }
685  if (layerresid_[1].valid()) {
686  stubid1 = layerresid_[1].fpgastubid().str();
687  }
688  if (layerresid_[4].valid()) {
689  stubid2 = layerresid_[4].fpgastubid().str();
690  }
691  if (layerresid_[5].valid()) {
692  stubid3 = layerresid_[5].fpgastubid().str();
693  }
694  if (diskresid_[0].valid()) {
695  stubid3 = diskresid_[0].fpgastubid().str();
696  }
697  if (diskresid_[1].valid()) {
698  stubid2 = diskresid_[1].fpgastubid().str();
699  }
700  }
701 
702  if (layer() == 5) {
703  if (layerresid_[0].valid()) {
704  stubid0 = layerresid_[0].fpgastubid().str();
705  }
706  if (layerresid_[1].valid()) {
707  stubid1 = layerresid_[1].fpgastubid().str();
708  }
709  if (layerresid_[2].valid()) {
710  stubid2 = layerresid_[2].fpgastubid().str();
711  }
712  if (layerresid_[3].valid()) {
713  stubid3 = layerresid_[3].fpgastubid().str();
714  }
715  }
716  }
717 
718  if (isDisk()) {
719  if (disk() == 1) {
720  if (layerresid_[0].valid()) {
721  stubid0 = layerresid_[0].fpgastubid().str();
722  }
723  if (diskresid_[2].valid()) {
724  stubid1 = diskresid_[2].fpgastubid().str();
725  }
726  if (diskresid_[3].valid()) {
727  stubid2 = diskresid_[3].fpgastubid().str();
728  }
729  if (diskresid_[4].valid()) {
730  stubid3 = diskresid_[4].fpgastubid().str();
731  } else if (layerresid_[1].valid()) {
732  stubid3 = layerresid_[1].fpgastubid().str();
733  }
734  }
735 
736  if (disk() == 3) {
737  if (layerresid_[0].valid()) {
738  stubid0 = layerresid_[0].fpgastubid().str();
739  }
740  if (diskresid_[0].valid()) {
741  stubid1 = diskresid_[0].fpgastubid().str();
742  }
743  if (diskresid_[1].valid()) {
744  stubid2 = diskresid_[1].fpgastubid().str();
745  }
746  if (diskresid_[4].valid()) {
747  stubid3 = diskresid_[4].fpgastubid().str();
748  } else if (layerresid_[1].valid()) {
749  stubid3 = layerresid_[1].fpgastubid().str();
750  }
751  }
752  }
753 
754  if (isOverlap()) {
755  if (layer() == 1) {
756  if (diskresid_[1].valid()) {
757  stubid0 = diskresid_[1].fpgastubid().str();
758  }
759  if (diskresid_[2].valid()) {
760  stubid1 = diskresid_[2].fpgastubid().str();
761  }
762  if (diskresid_[3].valid()) {
763  stubid2 = diskresid_[3].fpgastubid().str();
764  }
765  if (diskresid_[4].valid()) {
766  stubid3 = diskresid_[4].fpgastubid().str();
767  }
768  }
769  }
770 
771  std::string oss;
772  // real Q print out for fitted tracks
773  if (settings_.writeoutReal()) {
774  oss = std::to_string((fpgafitpars_.rinv().value()) * settings_.krinvpars()) + " " +
775  std::to_string((fpgafitpars_.phi0().value()) * settings_.kphi0pars()) + " " +
776  std::to_string((fpgafitpars_.d0().value()) * settings_.kd0pars()) + " " +
777  std::to_string((fpgafitpars_.t().value()) * settings_.ktpars()) + " " +
778  std::to_string((fpgafitpars_.z0().value()) * settings_.kz()) + " " + innerFPGAStub_->phiregionaddressstr() +
779  " ";
780  }
781  //Binary print out
782  if (!settings_.writeoutReal()) {
783  oss = fpgafitpars_.rinv().str() + "|" + fpgafitpars_.phi0().str() + "|" + fpgafitpars_.d0().str() + "|" +
784  fpgafitpars_.t().str() + "|" + fpgafitpars_.z0().str() + "|" + innerFPGAStub_->phiregionaddressstr() + "|";
785  }
786  if (middleFPGAStub_) {
787  oss += middleFPGAStub_->phiregionaddressstr() + " ";
788  }
789  oss += outerFPGAStub_->phiregionaddressstr() + " " + stubid0 + "|" + stubid1 + "|" + stubid2 + "|" + stubid3;
790 
791  return oss;
792 }
793 
794 Track Tracklet::makeTrack(const vector<const L1TStub*>& l1stubs) {
795  assert(fit());
796 
797  TrackPars<int> ipars(fpgafitpars_.rinv().value(),
798  fpgafitpars_.phi0().value(),
799  fpgafitpars_.d0().value(),
800  fpgafitpars_.t().value(),
801  fpgafitpars_.z0().value());
802 
803  Track tmpTrack(
804  ipars,
808  chisqrzfit_,
809  hitpattern_,
810  getStubIDs(),
811  (l1stubs.empty()) ? getL1Stubs() : l1stubs, // If fitter produced no stub list, take it from original tracklet.
812  getISeed());
813 
814  return tmpTrack;
815 }
816 
817 int Tracklet::layer() const {
818  int l1 = (innerFPGAStub_ && innerFPGAStub_->isBarrel()) ? innerStub_->layer() + 1 : 999,
819  l2 = (middleFPGAStub_ && middleFPGAStub_->isBarrel()) ? middleStub_->layer() + 1 : 999,
820  l3 = (outerFPGAStub_ && outerFPGAStub_->isBarrel()) ? outerStub_->layer() + 1 : 999, l = min(min(l1, l2), l3);
821  return (l < 999 ? l : 0);
822 }
823 
824 int Tracklet::disk() const {
825  int d1 = (innerFPGAStub_ && innerFPGAStub_->isDisk()) ? innerStub_->disk() : 999,
826  d2 = (middleFPGAStub_ && middleFPGAStub_->isDisk()) ? middleStub_->disk() : 999,
827  d3 = (outerFPGAStub_ && outerFPGAStub_->isDisk()) ? outerStub_->disk() : 999, d = 999;
828  if (abs(d1) < min(abs(d2), abs(d3)))
829  d = d1;
830  if (abs(d2) < min(abs(d1), abs(d3)))
831  d = d2;
832  if (abs(d3) < min(abs(d1), abs(d2)))
833  d = d3;
834  return (d < 999 ? d : 0);
835 }
836 
837 int Tracklet::disk2() const {
838  if (innerStub_->disk() > 0) {
839  return innerStub_->disk() + 1;
840  }
841  return innerStub_->disk() - 1;
842 }
843 
844 void Tracklet::setTrackletIndex(unsigned int index) {
847 }
848 
849 int Tracklet::getISeed() const {
850  int iSeed = TCIndex_ >> 4;
851  assert(iSeed >= 0 && iSeed <= (int)N_SEED);
852  return iSeed;
853 }
854 
855 int Tracklet::getITC() const {
856  int iSeed = getISeed(), iTC = TCIndex_ - (iSeed << 4);
857  assert(iTC >= 0 && iTC <= 14);
858  return iTC;
859 }
860 
861 unsigned int Tracklet::calcSeedIndex() const {
862  int seedindex = -1;
863  int seedlayer = layer();
864  int seeddisk = disk();
865 
866  if (seedlayer == 1 && seeddisk == 0)
867  seedindex = 0; //L1L2
868  if (seedlayer == 3 && seeddisk == 0)
869  seedindex = 2; //L3L4
870  if (seedlayer == 5 && seeddisk == 0)
871  seedindex = 3; //L5L6
872  if (seedlayer == 0 && abs(seeddisk) == 1)
873  seedindex = 4; //D1D2
874  if (seedlayer == 0 && abs(seeddisk) == 3)
875  seedindex = 5; //D3D4
876  if (seedlayer == 1 && abs(seeddisk) == 1)
877  seedindex = 6; //L1D1
878  if (seedlayer == 2 && abs(seeddisk) == 1)
879  seedindex = 7; //L2D1
880  if (seedlayer == 2 && abs(seeddisk) == 0)
881  seedindex = 1; //L2L3
882  if (middleFPGAStub_ && seedlayer == 2 && seeddisk == 0)
883  seedindex = 8; // L3L4L2
884  if (middleFPGAStub_ && seedlayer == 4 && seeddisk == 0)
885  seedindex = 9; // L5L6L4
886  assert(innerFPGAStub_ != nullptr);
887  assert(outerFPGAStub_ != nullptr);
888  if (middleFPGAStub_ && seedlayer == 2 && abs(seeddisk) == 1) {
889  int l1 = (innerFPGAStub_ && innerFPGAStub_->isBarrel()) ? innerStub_->layer() + 1 : 999,
890  l2 = (middleFPGAStub_ && middleFPGAStub_->isBarrel()) ? middleStub_->layer() + 1 : 999,
891  l3 = (outerFPGAStub_ && outerFPGAStub_->isBarrel()) ? outerStub_->layer() + 1 : 999;
892  if (l1 + l2 + l3 < 1998) { // If two stubs are layer stubs
893  seedindex = 10; // L2L3D1
894  } else {
895  seedindex = 11; // D1D2L2
896  }
897  }
898 
899  if (seedindex < 0) {
900  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " seedlayer abs(seeddisk) : " << seedlayer
901  << " " << abs(seeddisk);
902  }
903 
904  return seedindex;
905 }
Settings.h
trklet::LayerProjection::fpgafinezvm
const FPGAWord & fpgafinezvm() const
Definition: LayerProjection.h:80
trklet::Tracklet::fullmatchstr
std::string fullmatchstr(int layer)
Definition: Tracklet.cc:375
trklet::Tracklet::addressstr
std::string addressstr()
Definition: Tracklet.cc:190
trklet::Tracklet::stubtruthmatch
bool stubtruthmatch(const L1TStub *stub)
Definition: Tracklet.cc:151
trklet::L1TStub::tps
std::vector< int > tps() const
Definition: L1TStub.h:78
trklet::Tracklet::chisqrphifitexact_
double chisqrphifitexact_
Definition: Tracklet.h:551
mps_fire.i
i
Definition: mps_fire.py:428
trklet::Settings::ntrackletmax
unsigned int ntrackletmax() const
Definition: Settings.h:297
trklet::Tracklet::diskproj_
DiskProjection diskproj_[N_DISK]
Definition: Tracklet.h:559
trklet::Tracklet::PSseed
unsigned int PSseed() const
Definition: Tracklet.h:505
MessageLogger.h
trklet::Tracklet::z0approx
double z0approx() const
Definition: Tracklet.h:419
trklet::Stub::phiregionaddressstr
std::string phiregionaddressstr() const
Definition: Stub.cc:182
trklet::Tracklet::settings_
Settings const & settings_
Definition: Tracklet.h:564
trklet::FPGAWord::str
std::string str() const
Definition: FPGAWord.cc:54
trklet::Tracklet::phi0fitexact
double phi0fitexact() const
Definition: Tracklet.h:435
trklet::Tracklet::fitpars_
TrackPars< double > fitpars_
Definition: Tracklet.h:546
trklet::DiskProjection::getBendIndex
const FPGAWord & getBendIndex() const
Definition: DiskProjection.h:133
trklet::Settings::ktpars
double ktpars() const
Definition: Settings.h:355
trklet::Tracklet::nMatchesDisk
int nMatchesDisk()
Definition: Tracklet.cc:364
trklet::L1TStub::layer
unsigned int layer() const
Definition: L1TStub.h:44
trklet::Settings::krinvpars
double krinvpars() const
Definition: Settings.h:350
trklet::Tracklet::chisqrzfitexact_
double chisqrzfitexact_
Definition: Tracklet.h:552
trklet::Tracklet::trackletIndex_
int trackletIndex_
Definition: Tracklet.h:528
trklet::Tracklet::ichisqrphifit_
FPGAWord ichisqrphifit_
Definition: Tracklet.h:543
trklet::Tracklet::getITC
int getITC() const
Definition: Tracklet.cc:855
trklet::Tracklet::phi0
double phi0() const
Definition: Tracklet.h:410
trklet::Tracklet::overlap_
bool overlap_
Definition: Tracklet.h:517
min
T min(T a, T b)
Definition: MathUtil.h:58
trklet::DiskProjection::fpgarprojder
const FPGAWord & fpgarprojder() const
Definition: DiskProjection.h:61
trklet::Tracklet::innerStub_
const L1TStub * innerStub_
Definition: Tracklet.h:524
trklet::Tracklet::d0approx
double d0approx() const
Definition: Tracklet.h:417
trklet::LayerResidual::init
void init(Settings const &settings, int layer, int iphiresid, int izresid, int istubid, double phiresid, double zresid, double phiresidapprox, double zresidapprox, double rstub, const Stub *stubptr)
Definition: LayerResidual.cc:7
trklet::Tracklet::diskresid_
DiskResidual diskresid_[N_DISK]
Definition: Tracklet.h:562
trklet::Tracklet::middleFPGAStub_
const Stub * middleFPGAStub_
Definition: Tracklet.h:521
trklet::Tracklet::trackpars_
TrackPars< double > trackpars_
Definition: Tracklet.h:534
trklet::Tracklet::layerproj_
LayerProjection layerproj_[N_LAYER]
Definition: Tracklet.h:558
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
trklet::Settings
Definition: Settings.h:31
trklet::LayerResidual::fpgaphiresid
const FPGAWord & fpgaphiresid() const
Definition: LayerResidual.h:33
trklet::L1TStub
Definition: L1TStub.h:12
trklet::Tracklet::getISeed
int getISeed() const
Definition: Tracklet.cc:849
trklet::Tracklet::addMatch
void addMatch(int layer, int ideltaphi, int ideltaz, double dphi, double dz, double dphiapprox, double dzapprox, int stubid, double rstub, const trklet::Stub *stubptr)
Definition: Tracklet.cc:310
trklet::Tracklet::layerresid_
LayerResidual layerresid_[N_LAYER]
Definition: Tracklet.h:561
cms::cuda::assert
assert(be >=bs)
trklet::FPGAWord::set
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
Definition: FPGAWord.cc:14
trklet::Tracklet::TCIndex_
int TCIndex_
Definition: Tracklet.h:529
alpha
float alpha
Definition: AMPTWrapper.h:105
trklet::DiskProjection::fpgafinervm
const FPGAWord & fpgafinervm() const
Definition: DiskProjection.h:91
trklet::Settings::nbitst
int nbitst() const
Definition: Settings.h:302
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:20
trklet::Tracklet::d0fitexact
double d0fitexact() const
Definition: Tracklet.h:436
trklet::DiskProjection::fpgarbin2projvm
const FPGAWord & fpgarbin2projvm() const
Definition: DiskProjection.h:86
trklet::Tracklet::itfit
const FPGAWord & itfit() const
Definition: Tracklet.h:443
trklet::Tracklet::tfit
double tfit() const
Definition: Tracklet.h:430
trklet::Tracklet::fit
bool fit() const
Definition: Tracklet.h:482
trklet::Tracklet::rinvapprox
double rinvapprox() const
Definition: Tracklet.h:415
trklet::Tracklet::z0fitexact
double z0fitexact() const
Definition: Tracklet.h:438
trklet::FPGAWord::nbits
int nbits() const
Definition: FPGAWord.h:25
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
trklet::Tracklet::vmstrdisk
std::string vmstrdisk(int disk, unsigned int allstubindex)
Definition: Tracklet.cc:257
trklet::Tracklet::irinvfit
const FPGAWord & irinvfit() const
Definition: Tracklet.h:440
trklet::Stub::isBarrel
bool isBarrel() const
Definition: Stub.h:60
trklet::LayerProjection
Definition: LayerProjection.h:10
trklet::Tracklet::tpseed
int tpseed()
Definition: Tracklet.cc:120
trklet::Tracklet::triplet_
bool triplet_
Definition: Tracklet.h:518
trklet::Tracklet::isDisk
int isDisk() const
Definition: Tracklet.h:490
trklet::DiskProjection::fpgaphiproj
const FPGAWord & fpgaphiproj() const
Definition: DiskProjection.h:46
trklet::Tracklet::outerFPGAStub_
const Stub * outerFPGAStub_
Definition: Tracklet.h:522
trklet::Settings::nbitstrackletindex
unsigned int nbitstrackletindex() const
Definition: Settings.h:248
trklet::Tracklet::addMatchDisk
void addMatchDisk(int disk, int ideltaphi, int ideltar, double dphi, double dr, double dphiapprox, double drapprox, double alpha, int stubid, double zstub, const trklet::Stub *stubptr)
Definition: Tracklet.cc:325
trklet::Tracklet::fpgatrack_
std::unique_ptr< Track > fpgatrack_
Definition: Tracklet.h:556
trklet::Tracklet::middleFPGAStub
const Stub * middleFPGAStub()
Definition: Tracklet.h:69
trklet::Tracklet::barrel_
bool barrel_
Definition: Tracklet.h:515
trklet::Settings::projdisks
unsigned int projdisks(unsigned int iSeed, unsigned int i) const
Definition: Settings.h:135
trklet::Stub::disk
const FPGAWord & disk() const
Definition: Stub.h:57
trklet::Tracklet::trackletprojstr
std::string trackletprojstr(int layer) const
Definition: Tracklet.cc:271
trklet::LayerProjection::fpgaphiproj
const FPGAWord & fpgaphiproj() const
Definition: LayerProjection.h:45
trklet::Stub
Definition: Stub.h:16
trklet::Tracklet::middleStub
const L1TStub * middleStub()
Definition: Tracklet.h:68
trklet::Track
Definition: Track.h:18
trklet::Tracklet::isOverlap
bool isOverlap() const
Definition: Tracklet.h:489
trklet::Tracklet::stubptr
const trklet::Stub * stubptr(int layer) const
Definition: Tracklet.h:370
trklet::DiskResidual::fpgastubid
const FPGAWord & fpgastubid() const
Definition: DiskResidual.h:45
trklet::Tracklet::innerStub
const L1TStub * innerStub()
Definition: Tracklet.h:65
trklet::DiskProjection::fpgaphiprojder
const FPGAWord & fpgaphiprojder() const
Definition: DiskProjection.h:56
trklet::Tracklet::trackletprojstrD
std::string trackletprojstrD(int disk) const
Definition: Tracklet.cc:291
trklet::DiskResidual::init
void init(Settings const &settings, int disk, int iphiresid, int irresid, int istubid, double phiresid, double rresid, double phiresidapprox, double rresidapprox, double zstub, double alpha, FPGAWord ialpha, const Stub *stubptr)
Definition: DiskResidual.cc:7
trklet::Tracklet::phi0approx
double phi0approx() const
Definition: Tracklet.h:416
trklet::DiskProjection
Definition: DiskProjection.h:12
trklet::Tracklet::hitpattern_
int hitpattern_
Definition: Tracklet.h:554
str
#define str(s)
Definition: TestProcessor.cc:52
trklet::Tracklet::fullmatchdiskstr
std::string fullmatchdiskstr(int disk)
Definition: Tracklet.cc:394
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
trklet::Tracklet::nMatches
int nMatches()
Definition: Tracklet.cc:352
trklet::Tracklet::projdisk_
int projdisk_[N_DISK]
Definition: Tracklet.h:539
trklet::LayerProjection::fpgazproj
const FPGAWord & fpgazproj() const
Definition: LayerProjection.h:50
trklet::Settings::nbitsd0
unsigned int nbitsd0() const
Definition: Settings.h:275
trklet::Stub::isDisk
bool isDisk() const
Definition: Stub.h:61
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
trklet::Settings::kd0pars
double kd0pars() const
Definition: Settings.h:357
trklet::Tracklet::d0fit
double d0fit() const
Definition: Tracklet.h:429
trklet::Tracklet::calcSeedIndex
unsigned int calcSeedIndex() const
Definition: Tracklet.cc:861
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
trklet::FPGAWord
Definition: FPGAWord.h:9
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::LayerProjection::fpgaphiprojder
const FPGAWord & fpgaphiprojder() const
Definition: LayerProjection.h:55
trklet::N_SEED
constexpr unsigned int N_SEED
Definition: Settings.h:22
trklet::Tracklet::setTrackletIndex
void setTrackletIndex(unsigned int index)
Definition: Tracklet.cc:844
trklet::LayerResidual::valid
bool valid() const
Definition: LayerResidual.h:31
trklet::Settings::kphi0pars
double kphi0pars() const
Definition: Settings.h:354
trklet::Stub::alphanew
const FPGAWord & alphanew() const
Definition: Stub.h:53
trklet::rinv
double rinv(double phi1, double phi2, double r1, double r2)
Definition: Util.h:173
trklet::Tracklet::phi0fit
double phi0fit() const
Definition: Tracklet.h:428
trklet::Tracklet::iphi0fit
const FPGAWord & iphi0fit() const
Definition: Tracklet.h:441
trklet::Settings::extended
bool extended() const
Definition: Settings.h:225
trklet::Settings::projlayers
unsigned int projlayers(unsigned int iSeed, unsigned int i) const
Definition: Settings.h:134
trklet::Tracklet::outerStub_
const L1TStub * outerStub_
Definition: Tracklet.h:526
trklet::N_PROJ
constexpr unsigned int N_PROJ
Definition: Settings.h:776
trklet::Tracklet::trackletparstr
std::string trackletparstr()
Definition: Tracklet.cc:201
trklet::Tracklet::rinvfitexact
double rinvfitexact() const
Definition: Tracklet.h:434
trklet::DiskProjection::fpgarproj
const FPGAWord & fpgarproj() const
Definition: DiskProjection.h:51
trklet::Tracklet::tapprox
double tapprox() const
Definition: Tracklet.h:418
trklet::Tracklet::getStubIDs
std::map< int, int > getStubIDs()
Definition: Tracklet.cc:436
trklet::Tracklet::innerFPGAStub_
const Stub * innerFPGAStub_
Definition: Tracklet.h:520
trklet::L1TStub::disk
int disk() const
Definition: L1TStub.h:45
trklet::Tracklet::outerStub
const L1TStub * outerStub()
Definition: Tracklet.h:71
muon::overlap
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
Definition: MuonSelectors.cc:791
trklet::Settings::nbitsrinv
int nbitsrinv() const
Definition: Settings.h:300
trklet::Tracklet::rstub
double rstub(int layer)
Definition: Tracklet.h:199
trklet::DiskResidual::fpgaphiresid
const FPGAWord & fpgaphiresid() const
Definition: DiskResidual.h:35
trklet::TrackPars< int >
trklet::TrackPars::init
void init(T rinv, T phi0, T d0, T t, T z0)
Definition: TrackPars.h:21
trklet::Tracklet::id0fit
const FPGAWord & id0fit() const
Definition: Tracklet.h:442
trklet
Definition: AllProjectionsMemory.h:9
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
trklet::Tracklet::isBarrel
bool isBarrel() const
Definition: Tracklet.h:488
trklet::Tracklet::fpgafitpars_
TrackPars< FPGAWord > fpgafitpars_
Definition: Tracklet.h:542
trklet::Tracklet::tfitexact
double tfitexact() const
Definition: Tracklet.h:437
trklet::LayerResidual::fpgastubid
const FPGAWord & fpgastubid() const
Definition: LayerResidual.h:43
trklet::Tracklet::rinvfit
double rinvfit() const
Definition: Tracklet.h:427
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
trklet::Tracklet::innerFPGAStub
const Stub * innerFPGAStub()
Definition: Tracklet.h:66
trklet::Settings::nbitsz0
int nbitsz0() const
Definition: Settings.h:303
trklet::Tracklet::z0
double z0() const
Definition: Tracklet.h:413
trklet::Tracklet::rinv
double rinv() const
Definition: Tracklet.h:409
trklet::DiskResidual::fpgarresid
const FPGAWord & fpgarresid() const
Definition: DiskResidual.h:40
trklet::Stub::phiregionaddress
unsigned int phiregionaddress() const
Definition: Stub.cc:177
trklet::Tracklet::d0
double d0() const
Definition: Tracklet.h:411
std
Definition: JetResolutionObject.h:76
trklet::Settings::nbitsphi0
int nbitsphi0() const
Definition: Settings.h:301
trklet::Tracklet::chisqrphifit_
double chisqrphifit_
Definition: Tracklet.h:547
trklet::Tracklet::disk2
int disk2() const
Definition: Tracklet.cc:837
Track.h
PVValHelper::dz
Definition: PVValidationHelpers.h:51
trklet::Tracklet::makeTrack
Track makeTrack(const std::vector< const L1TStub * > &l1stubs)
Definition: Tracklet.cc:794
relativeConstraints.value
value
Definition: relativeConstraints.py:53
trklet::LayerProjection::fpgazprojder
const FPGAWord & fpgazprojder() const
Definition: LayerProjection.h:60
trklet::Tracklet::fpgapars_
TrackPars< FPGAWord > fpgapars_
Definition: Tracklet.h:532
trklet::Tracklet::outerFPGAStub
const Stub * outerFPGAStub()
Definition: Tracklet.h:72
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
Exception
Definition: hltDiff.cc:245
trklet::Tracklet::setFitPars
void setFitPars(double rinvfit, double phi0fit, double d0fit, double tfit, double z0fit, double chisqrphifit, double chisqrzfit, double rinvfitexact, double phi0fitexact, double d0fitexact, double tfitexact, double z0fitexact, double chisqrphifitexact, double chisqrzfitexact, int irinvfit, int iphi0fit, int id0fit, int itfit, int iz0fit, int ichisqrphifit, int ichisqrzfit, int hitpattern, const std::vector< const L1TStub * > &l1stubs=std::vector< const L1TStub * >())
Definition: Tracklet.cc:590
trklet::Settings::kz
double kz() const
Definition: Settings.h:270
trklet::Stub::stubindex
const FPGAWord & stubindex() const
Definition: Stub.h:55
trklet::Tracklet::chisqrzfit_
double chisqrzfit_
Definition: Tracklet.h:548
trklet::Tracklet::trackfitstr
std::string trackfitstr()
Definition: Tracklet.cc:647
trklet::LayerProjection::fpgazbin2projvm
const FPGAWord & fpgazbin2projvm() const
Definition: LayerProjection.h:75
Exception.h
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
trklet::Tracklet::disk
int disk() const
Definition: Tracklet.cc:824
EcalCondDBWriter_cfi.location
location
Definition: EcalCondDBWriter_cfi.py:63
ztail.d
d
Definition: ztail.py:151
trklet::Tracklet::z0fit
double z0fit() const
Definition: Tracklet.h:431
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
trklet::LayerResidual::fpgazresid
const FPGAWord & fpgazresid() const
Definition: LayerResidual.h:38
trklet::Tracklet::ichisqrzfit_
FPGAWord ichisqrzfit_
Definition: Tracklet.h:544
trklet::Stub::layer
const FPGAWord & layer() const
Definition: Stub.h:56
trklet::DiskProjection::fpgarbin1projvm
const FPGAWord & fpgarbin1projvm() const
Definition: DiskProjection.h:81
trklet::Tracklet::t
double t() const
Definition: Tracklet.h:412
trklet::Tracklet::trackparsapprox_
TrackPars< double > trackparsapprox_
Definition: Tracklet.h:535
trklet::Tracklet::seedIndex_
unsigned int seedIndex_
Definition: Tracklet.h:512
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
trklet::Tracklet::middleStub_
const L1TStub * middleStub_
Definition: Tracklet.h:525
trklet::Tracklet::getL1Stubs
std::vector< const L1TStub * > getL1Stubs()
Definition: Tracklet.cc:413
d0
static constexpr float d0
Definition: L1EGammaCrystalsEmulatorProducer.cc:85
trklet::Tracklet::disk_
bool disk_
Definition: Tracklet.h:516
trklet::Tracklet::fitparsexact_
TrackPars< double > fitparsexact_
Definition: Tracklet.h:550
Stub.h
trklet::LayerProjection::fpgazbin1projvm
const FPGAWord & fpgazbin1projvm() const
Definition: LayerProjection.h:70
d1
static constexpr float d1
Definition: L1EGammaCrystalsEmulatorProducer.cc:85
Tracklet.h
trklet::Settings::writeoutReal
bool writeoutReal() const
Definition: Settings.h:182
trklet::Tracklet::layer
int layer() const
Definition: Tracklet.cc:817
trklet::Tracklet::vmstrlayer
std::string vmstrlayer(int layer, unsigned int allstubindex)
Definition: Tracklet.cc:222
trklet::Tracklet::projlayer_
int projlayer_[N_LAYER - 2]
Definition: Tracklet.h:538
trklet::Tracklet::iz0fit
const FPGAWord & iz0fit() const
Definition: Tracklet.h:444