CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
trklet::TrackletCalculatorBase Class Reference

#include <TrackletCalculatorBase.h>

Inheritance diagram for trklet::TrackletCalculatorBase:
trklet::ProcessBase trklet::TrackletCalculator trklet::TrackletProcessor

Public Member Functions

void addDiskProj (Tracklet *tracklet, int disk)
 
bool addLayerProj (Tracklet *tracklet, int layer)
 
void addProjection (int layer, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
 
void addProjectionDisk (int disk, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
 
bool barrelSeeding (const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
 
bool diskSeeding (const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
 
void exactproj (double rproj, double rinv, double phi0, double t, double z0, double &phiproj, double &zproj, double &phider, double &zder)
 
void exactprojdisk (double zproj, double rinv, double phi0, double t, double z0, double &phiproj, double &rproj, double &phider, double &rder)
 
void exacttracklet (double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiproj[N_LAYER - 2], double zproj[N_LAYER - 2], double phider[N_LAYER - 2], double zder[N_LAYER - 2], double phiprojdisk[N_DISK], double rprojdisk[N_DISK], double phiderdisk[N_DISK], double rderdisk[N_DISK])
 
void exacttrackletdisk (double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiprojLayer[N_PSLAYER], double zprojLayer[N_PSLAYER], double phiderLayer[N_PSLAYER], double zderLayer[N_PSLAYER], double phiproj[N_DISK - 2], double rproj[N_DISK - 2], double phider[N_DISK - 2], double rder[N_DISK - 2])
 
void exacttrackletOverlap (double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiprojLayer[N_PSLAYER], double zprojLayer[N_PSLAYER], double phiderLayer[N_PSLAYER], double zderLayer[N_PSLAYER], double phiproj[N_DISK - 2], double rproj[N_DISK - 2], double phider[N_DISK - 2], double rder[N_DISK - 2])
 
bool goodTrackPars (bool goodrinv, bool goodz0)
 
bool inSector (int iphi0, int irinv, double phi0approx, double rinvapprox)
 
bool overlapSeeding (const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
 
 TrackletCalculatorBase (std::string name, Settings const &settings, Globals *global, unsigned int iSector)
 
 ~TrackletCalculatorBase () override=default
 
- Public Member Functions inherited from trklet::ProcessBase
virtual void addInput (MemoryBase *memory, std::string input)=0
 
virtual void addOutput (MemoryBase *memory, std::string output)=0
 
unsigned int getISeed (const std::string &name)
 
std::string const & getName () const
 
unsigned int initLayerDisk (unsigned int pos)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk, int &layerdisk)
 
void initLayerDisksandISeed (unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
 
unsigned int nbits (unsigned int power)
 
 ProcessBase (std::string name, Settings const &settings, Globals *global, unsigned int iSector)
 
virtual ~ProcessBase ()=default
 

Protected Attributes

unsigned int iSeed_
 
unsigned int layerdisk1_
 
unsigned int layerdisk2_
 
int TCIndex_
 
TrackletParametersMemorytrackletpars_
 
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
 
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojlayers_
 
- Protected Attributes inherited from trklet::ProcessBase
Globalsglobals_
 
unsigned int iSector_
 
std::string name_
 
double phimax_
 
double phimin_
 
Settings const & settings_
 

Detailed Description

Definition at line 18 of file TrackletCalculatorBase.h.

Constructor & Destructor Documentation

◆ TrackletCalculatorBase()

TrackletCalculatorBase::TrackletCalculatorBase ( std::string  name,
Settings const &  settings,
Globals global,
unsigned int  iSector 
)

Definition at line 17 of file TrackletCalculatorBase.cc.

21  : ProcessBase(name, settings, global, iSector) {}

◆ ~TrackletCalculatorBase()

trklet::TrackletCalculatorBase::~TrackletCalculatorBase ( )
overridedefault

Member Function Documentation

◆ addDiskProj()

void TrackletCalculatorBase::addDiskProj ( Tracklet tracklet,
int  disk 
)

Definition at line 213 of file TrackletCalculatorBase.cc.

213  {
214  FPGAWord fpgar = tracklet->fpgarprojdisk(disk);
215 
216  if (fpgar.value() * settings_.krprojshiftdisk() < settings_.rmindiskvm())
217  return;
218  if (fpgar.value() * settings_.krprojshiftdisk() > settings_.rmaxdisk())
219  return;
220 
221  FPGAWord fpgaphi = tracklet->fpgaphiprojdisk(disk);
222 
223  int iphivmRaw = fpgaphi.value() >> (fpgaphi.nbits() - 5);
224 
225  int iphi = iphivmRaw / (32 / settings_.nallstubs(abs(disk) + N_DISK));
226 
227  addProjectionDisk(disk, iphi, trackletprojdisks_[abs(disk) - 1][iphi], tracklet);
228 }

References funct::abs(), addProjectionDisk(), trklet::Tracklet::fpgaphiprojdisk(), trklet::Tracklet::fpgarprojdisk(), LEDCalibrationChannels::iphi, trklet::Settings::krprojshiftdisk(), trklet::N_DISK, trklet::Settings::nallstubs(), trklet::FPGAWord::nbits(), trklet::Settings::rmaxdisk(), trklet::Settings::rmindiskvm(), trklet::ProcessBase::settings_, trackletprojdisks_, and trklet::FPGAWord::value().

Referenced by barrelSeeding(), diskSeeding(), and overlapSeeding().

◆ addLayerProj()

bool TrackletCalculatorBase::addLayerProj ( Tracklet tracklet,
int  layer 
)

Definition at line 230 of file TrackletCalculatorBase.cc.

230  {
231  assert(layer > 0);
232 
233  FPGAWord fpgaz = tracklet->fpgazproj(layer);
234  FPGAWord fpgaphi = tracklet->fpgaphiproj(layer);
235 
236  if (fpgaphi.atExtreme())
237  edm::LogProblem("Tracklet") << "at extreme! " << fpgaphi.value();
238 
239  assert(!fpgaphi.atExtreme());
240 
241  if (fpgaz.atExtreme())
242  return false;
243 
244  if (std::abs(fpgaz.value() * settings_.kz()) > settings_.zlength())
245  return false;
246 
247  int iphivmRaw = fpgaphi.value() >> (fpgaphi.nbits() - 5);
248  int iphi = iphivmRaw / (32 / settings_.nallstubs(layer - 1));
249 
251 
252  return true;
253 }

References funct::abs(), addProjection(), cms::cuda::assert(), trklet::FPGAWord::atExtreme(), trklet::Tracklet::fpgaphiproj(), trklet::Tracklet::fpgazproj(), LEDCalibrationChannels::iphi, trklet::Settings::kz(), phase1PixelTopology::layer, trklet::Settings::nallstubs(), trklet::FPGAWord::nbits(), trklet::ProcessBase::settings_, trackletprojlayers_, trklet::FPGAWord::value(), and trklet::Settings::zlength().

Referenced by barrelSeeding(), diskSeeding(), and overlapSeeding().

◆ addProjection()

void TrackletCalculatorBase::addProjection ( int  layer,
int  iphi,
TrackletProjectionsMemory trackletprojs,
Tracklet tracklet 
)

Definition at line 255 of file TrackletCalculatorBase.cc.

258  {
259  if (trackletprojs == nullptr) {
260  if (settings_.warnNoMem()) {
261  edm::LogVerbatim("Tracklet") << "No projection memory exists in " << getName() << " for layer = " << layer
262  << " iphi = " << iphi + 1;
263  }
264  return;
265  }
266  assert(trackletprojs != nullptr);
267  trackletprojs->addProj(tracklet);
268 }

References trklet::TrackletProjectionsMemory::addProj(), cms::cuda::assert(), trklet::ProcessBase::getName(), LEDCalibrationChannels::iphi, phase1PixelTopology::layer, trklet::ProcessBase::settings_, and trklet::Settings::warnNoMem().

Referenced by addLayerProj().

◆ addProjectionDisk()

void TrackletCalculatorBase::addProjectionDisk ( int  disk,
int  iphi,
TrackletProjectionsMemory trackletprojs,
Tracklet tracklet 
)

Definition at line 270 of file TrackletCalculatorBase.cc.

273  {
274  if (iSeed_ == 2 && abs(disk) == 4)
275  return; //L3L4 projections to D3 are not used. Should be in configuration
276  if (trackletprojs == nullptr) {
277  if (iSeed_ == 2 && abs(disk) == 3)
278  return; //L3L4 projections to D3 are not used.
279  if (settings_.warnNoMem()) {
280  edm::LogVerbatim("Tracklet") << "No projection memory exists in " << getName() << " for disk = " << abs(disk)
281  << " iphi = " << iphi + 1;
282  }
283  return;
284  }
285  assert(trackletprojs != nullptr);
286  trackletprojs->addProj(tracklet);
287 }

References funct::abs(), trklet::TrackletProjectionsMemory::addProj(), cms::cuda::assert(), trklet::ProcessBase::getName(), LEDCalibrationChannels::iphi, iSeed_, trklet::ProcessBase::settings_, and trklet::Settings::warnNoMem().

Referenced by addDiskProj().

◆ barrelSeeding()

bool TrackletCalculatorBase::barrelSeeding ( const Stub innerFPGAStub,
const L1TStub innerStub,
const Stub outerFPGAStub,
const L1TStub outerStub 
)

Definition at line 331 of file TrackletCalculatorBase.cc.

334  {
335  if (settings_.debugTracklet()) {
336  edm::LogVerbatim("Tracklet") << "TrackletCalculator " << getName()
337  << " trying stub pair in layer (inner outer): " << innerFPGAStub->layer().value()
338  << " " << outerFPGAStub->layer().value();
339  }
340 
341  assert(outerFPGAStub->isBarrel());
342  assert(layerdisk1_ == (unsigned int)innerFPGAStub->layer().value());
344 
345  double r1 = innerStub->r();
346  double z1 = innerStub->z();
347  double phi1 = innerStub->phi();
348 
349  double r2 = outerStub->r();
350  double z2 = outerStub->z();
351  double phi2 = outerStub->phi();
352 
353  double rinv, phi0, t, z0;
354 
355  double phiproj[N_LAYER - 2], zproj[N_LAYER - 2], phider[N_LAYER - 2], zder[N_LAYER - 2];
356  double phiprojdisk[N_DISK], rprojdisk[N_DISK], phiderdisk[N_DISK], rderdisk[N_DISK];
357 
359  z1,
360  phi1,
361  r2,
362  z2,
363  phi2,
364  outerStub->sigmaz(),
365  rinv,
366  phi0,
367  t,
368  z0,
369  phiproj,
370  zproj,
371  phider,
372  zder,
373  phiprojdisk,
374  rprojdisk,
375  phiderdisk,
376  rderdisk);
377 
378  if (settings_.useapprox()) {
379  phi1 = innerFPGAStub->phiapprox(phimin_, phimax_);
380  z1 = innerFPGAStub->zapprox();
381  r1 = innerFPGAStub->rapprox();
382 
383  phi2 = outerFPGAStub->phiapprox(phimin_, phimax_);
384  z2 = outerFPGAStub->zapprox();
385  r2 = outerFPGAStub->rapprox();
386  }
387 
388  double rinvapprox, phi0approx, tapprox, z0approx;
389  double phiprojapprox[N_LAYER - 2], zprojapprox[N_LAYER - 2];
390  double phiprojdiskapprox[N_DISK], rprojdiskapprox[N_DISK];
391 
393  if (iSeed_ == 0)
394  ITC = globals_->ITC_L1L2();
395  else if (iSeed_ == 1)
396  ITC = globals_->ITC_L2L3();
397  else if (iSeed_ == 2)
398  ITC = globals_->ITC_L3L4();
399  else
400  ITC = globals_->ITC_L5L6();
401 
404  ITC->z1.set_fval(z1);
405  ITC->z2.set_fval(z2);
406  double sphi1 = angle0to2pi::make0To2pi(phi1 - phimin_);
407  double sphi2 = angle0to2pi::make0To2pi(phi2 - phimin_);
408 
409  ITC->phi1.set_fval(sphi1);
410  ITC->phi2.set_fval(sphi2);
411 
416 
417  ITC->zproj0.set_fval(t > 0 ? settings_.zmean(0) : -settings_.zmean(0));
418  ITC->zproj1.set_fval(t > 0 ? settings_.zmean(1) : -settings_.zmean(1));
419  ITC->zproj2.set_fval(t > 0 ? settings_.zmean(2) : -settings_.zmean(2));
420  ITC->zproj3.set_fval(t > 0 ? settings_.zmean(3) : -settings_.zmean(3));
421  ITC->zproj4.set_fval(t > 0 ? settings_.zmean(4) : -settings_.zmean(4));
422 
423  ITC->rinv_final.calculate();
424  ITC->phi0_final.calculate();
425  ITC->t_final.calculate();
426  ITC->z0_final.calculate();
427 
428  ITC->phiL_0_final.calculate();
429  ITC->phiL_1_final.calculate();
430  ITC->phiL_2_final.calculate();
431  ITC->phiL_3_final.calculate();
432 
433  ITC->zL_0_final.calculate();
434  ITC->zL_1_final.calculate();
435  ITC->zL_2_final.calculate();
436  ITC->zL_3_final.calculate();
437 
438  ITC->phiD_0_final.calculate();
439  ITC->phiD_1_final.calculate();
440  ITC->phiD_2_final.calculate();
441  ITC->phiD_3_final.calculate();
442  ITC->phiD_4_final.calculate();
443 
444  ITC->rD_0_final.calculate();
445  ITC->rD_1_final.calculate();
446  ITC->rD_2_final.calculate();
447  ITC->rD_3_final.calculate();
448  ITC->rD_4_final.calculate();
449 
450  ITC->der_phiL_final.calculate();
451  ITC->der_zL_final.calculate();
452  ITC->der_phiD_final.calculate();
453  ITC->der_rD_final.calculate();
454 
455  //store the approximate results
456  rinvapprox = ITC->rinv_final.fval();
457  phi0approx = ITC->phi0_final.fval();
458  tapprox = ITC->t_final.fval();
459  z0approx = ITC->z0_final.fval();
460 
461  phiprojapprox[0] = ITC->phiL_0_final.fval();
462  phiprojapprox[1] = ITC->phiL_1_final.fval();
463  phiprojapprox[2] = ITC->phiL_2_final.fval();
464  phiprojapprox[3] = ITC->phiL_3_final.fval();
465 
466  zprojapprox[0] = ITC->zL_0_final.fval();
467  zprojapprox[1] = ITC->zL_1_final.fval();
468  zprojapprox[2] = ITC->zL_2_final.fval();
469  zprojapprox[3] = ITC->zL_3_final.fval();
470 
471  phiprojdiskapprox[0] = ITC->phiD_0_final.fval();
472  phiprojdiskapprox[1] = ITC->phiD_1_final.fval();
473  phiprojdiskapprox[2] = ITC->phiD_2_final.fval();
474  phiprojdiskapprox[3] = ITC->phiD_3_final.fval();
475  phiprojdiskapprox[4] = ITC->phiD_4_final.fval();
476 
477  rprojdiskapprox[0] = ITC->rD_0_final.fval();
478  rprojdiskapprox[1] = ITC->rD_1_final.fval();
479  rprojdiskapprox[2] = ITC->rD_2_final.fval();
480  rprojdiskapprox[3] = ITC->rD_3_final.fval();
481  rprojdiskapprox[4] = ITC->rD_4_final.fval();
482 
483  //now binary
484 
485  int irinv, iphi0, it, iz0;
486  LayerProjection layerprojs[N_LAYER - 2];
487  DiskProjection diskprojs[N_DISK];
488 
489  int iphiproj[N_LAYER - 2], izproj[N_LAYER - 2];
490  int iphiprojdisk[N_DISK], irprojdisk[N_DISK];
491 
492  int ir1 = innerFPGAStub->r().value();
493  int iphi1 = innerFPGAStub->phi().value();
494  int iz1 = innerFPGAStub->z().value();
495 
496  int ir2 = outerFPGAStub->r().value();
497  int iphi2 = outerFPGAStub->phi().value();
498  int iz2 = outerFPGAStub->z().value();
499 
502  ir1 <<= (8 - settings_.nrbitsstub(layerdisk1_));
503  ir2 <<= (8 - settings_.nrbitsstub(layerdisk2_));
504 
507 
508  ITC->r1.set_ival(ir1);
509  ITC->r2.set_ival(ir2);
510  ITC->z1.set_ival(iz1);
511  ITC->z2.set_ival(iz2);
512  ITC->phi1.set_ival(iphi1);
513  ITC->phi2.set_ival(iphi2);
514 
515  ITC->rinv_final.calculate();
516  ITC->phi0_final.calculate();
517  ITC->t_final.calculate();
518  ITC->z0_final.calculate();
519 
520  ITC->phiL_0_final.calculate();
521  ITC->phiL_1_final.calculate();
522  ITC->phiL_2_final.calculate();
523  ITC->phiL_3_final.calculate();
524 
525  ITC->zL_0_final.calculate();
526  ITC->zL_1_final.calculate();
527  ITC->zL_2_final.calculate();
528  ITC->zL_3_final.calculate();
529 
530  ITC->phiD_0_final.calculate();
531  ITC->phiD_1_final.calculate();
532  ITC->phiD_2_final.calculate();
533  ITC->phiD_3_final.calculate();
534  ITC->phiD_4_final.calculate();
535 
536  ITC->rD_0_final.calculate();
537  ITC->rD_1_final.calculate();
538  ITC->rD_2_final.calculate();
539  ITC->rD_3_final.calculate();
540  ITC->rD_4_final.calculate();
541 
542  ITC->der_phiL_final.calculate();
543  ITC->der_zL_final.calculate();
544  ITC->der_phiD_final.calculate();
545  ITC->der_rD_final.calculate();
546 
547  //store the binary results
548  irinv = ITC->rinv_final.ival();
549  iphi0 = ITC->phi0_final.ival();
550  it = ITC->t_final.ival();
551  iz0 = ITC->z0_final.ival();
552 
553  iphiproj[0] = ITC->phiL_0_final.ival();
554  iphiproj[1] = ITC->phiL_1_final.ival();
555  iphiproj[2] = ITC->phiL_2_final.ival();
556  iphiproj[3] = ITC->phiL_3_final.ival();
557 
558  izproj[0] = ITC->zL_0_final.ival();
559  izproj[1] = ITC->zL_1_final.ival();
560  izproj[2] = ITC->zL_2_final.ival();
561  izproj[3] = ITC->zL_3_final.ival();
562 
564  return false;
565  }
566 
567  if (!inSector(iphi0, irinv, phi0approx, rinvapprox))
568  return false;
569 
570  for (unsigned int i = 0; i < N_LAYER - 2; ++i) {
571  //reject projection if z is out of range
572  if (izproj[i] < -(1 << (settings_.nzbitsstub(0) - 1)))
573  continue;
574  if (izproj[i] >= (1 << (settings_.nzbitsstub(0) - 1)))
575  continue;
576 
577  //reject projection if phi is out of range
578  if (iphiproj[i] >= (1 << settings_.nphibitsstub(5)) - 1)
579  continue;
580  if (iphiproj[i] <= 0)
581  continue;
582 
583  //Adjust bits for r and z projection depending on layer
584  if (settings_.projlayers(iSeed_, i) <= 3) { //TODO clean up logic
586  } else {
587  izproj[i] >>= (settings_.nzbitsstub(0) - settings_.nzbitsstub(5));
588  }
589 
590  layerprojs[i].init(settings_,
593  iphiproj[i],
594  izproj[i],
595  ITC->der_phiL_final.ival(),
596  ITC->der_zL_final.ival(),
597  phiproj[i],
598  zproj[i],
599  phider[i],
600  zder[i],
601  phiprojapprox[i],
602  zprojapprox[i],
603  ITC->der_phiL_final.fval(),
604  ITC->der_zL_final.fval(),
605  !(iSeed_ == 1 || iSeed_ == 2));
606  }
607 
608  iphiprojdisk[0] = ITC->phiD_0_final.ival();
609  iphiprojdisk[1] = ITC->phiD_1_final.ival();
610  iphiprojdisk[2] = ITC->phiD_2_final.ival();
611  iphiprojdisk[3] = ITC->phiD_3_final.ival();
612  iphiprojdisk[4] = ITC->phiD_4_final.ival();
613 
614  irprojdisk[0] = ITC->rD_0_final.ival();
615  irprojdisk[1] = ITC->rD_1_final.ival();
616  irprojdisk[2] = ITC->rD_2_final.ival();
617  irprojdisk[3] = ITC->rD_3_final.ival();
618  irprojdisk[4] = ITC->rD_4_final.ival();
619 
620  if (std::abs(it * ITC->t_final.K()) > 1.0) {
621  for (unsigned int i = 0; i < N_DISK; ++i) {
622  if (iphiprojdisk[i] <= 0)
623  continue;
624  if (iphiprojdisk[i] >= (1 << settings_.nphibitsstub(0)) - 1)
625  continue;
626 
627  if (irprojdisk[i] < settings_.rmindisk() / ITC->rD_0_final.K() ||
628  irprojdisk[i] > settings_.rmaxdisk() / ITC->rD_0_final.K())
629  continue;
630 
631  diskprojs[i].init(settings_,
632  i + 1,
633  settings_.zmean(i),
634  iphiprojdisk[i],
635  irprojdisk[i],
636  ITC->der_phiD_final.ival(),
637  ITC->der_rD_final.ival(),
638  phiprojdisk[i],
639  rprojdisk[i],
640  phiderdisk[i],
641  rderdisk[i],
642  phiprojdiskapprox[i],
643  rprojdiskapprox[i],
644  ITC->der_phiD_final.fval(),
645  ITC->der_rD_final.fval());
646  }
647  }
648 
649  if (settings_.writeMonitorData("TPars")) {
650  globals_->ofstream("trackletpars.txt")
651  << "Trackpars " << layerdisk1_ + 1 << " " << rinv << " " << rinvapprox << " " << ITC->rinv_final.fval()
652  << " " << phi0 << " " << phi0approx << " " << ITC->phi0_final.fval() << " " << t << " " << tapprox << " "
653  << ITC->t_final.fval() << " " << z0 << " " << z0approx << " " << ITC->z0_final.fval() << endl;
654  }
655 
656  Tracklet* tracklet = new Tracklet(settings_,
657  innerStub,
658  nullptr,
659  outerStub,
660  innerFPGAStub,
661  nullptr,
662  outerFPGAStub,
663  rinv,
664  phi0,
665  0.0,
666  z0,
667  t,
668  rinvapprox,
669  phi0approx,
670  0.0,
671  z0approx,
672  tapprox,
673  irinv,
674  iphi0,
675  0,
676  iz0,
677  it,
678  layerprojs,
679  diskprojs,
680  false);
681 
682  if (settings_.debugTracklet()) {
683  edm::LogVerbatim("Tracklet") << "TrackletCalculator " << getName() << " Found tracklet for seed = " << iSeed_ << " "
684  << iSector_ << " phi0 = " << phi0;
685  }
686 
688  tracklet->setTCIndex(TCIndex_);
689 
690  if (settings_.writeMonitorData("Seeds")) {
691  ofstream fout("seeds.txt", ofstream::app);
692  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << tracklet->getISeed() << endl;
693  fout.close();
694  }
695  trackletpars_->addTracklet(tracklet);
696 
697  if (settings_.bookHistos()) {
699  int tp = tracklet->tpseed();
700  hists->fillTrackletParams(settings_,
701  globals_,
702  iSeed_,
703  iSector_,
704  rinvapprox,
705  irinv * ITC->rinv_final.K(),
706  phi0approx,
707  iphi0 * ITC->phi0_final.K(),
708  asinh(tapprox),
709  asinh(it * ITC->t_final.K()),
710  z0approx,
711  iz0 * ITC->z0_final.K(),
712  tp);
713  }
714 
715  bool addL3 = false;
716  bool addL4 = false;
717  bool addL5 = false;
718  bool addL6 = false;
719  for (unsigned int j = 0; j < N_LAYER - 2; j++) {
720  int lproj = settings_.projlayers(iSeed_, j);
721  bool added = false;
722  if (tracklet->validProj(lproj)) {
723  added = addLayerProj(tracklet, lproj);
724  if (added && lproj == 3)
725  addL3 = true;
726  if (added && lproj == 4)
727  addL4 = true;
728  if (added && lproj == 5)
729  addL5 = true;
730  if (added && lproj == 6)
731  addL6 = true;
732  }
733  }
734 
735  for (unsigned int j = 0; j < N_DISK - 1; j++) { //no projections to 5th disk!!
736  int disk = j + 1;
737  if (disk == 4 && addL3)
738  continue;
739  if (disk == 3 && addL4)
740  continue;
741  if (disk == 2 && addL5)
742  continue;
743  if (disk == 1 && addL6)
744  continue;
745  if (it < 0)
746  disk = -disk;
747  if (tracklet->validProjDisk(abs(disk))) {
748  addDiskProj(tracklet, disk);
749  }
750  }
751 
752  return true;
753 }

References funct::abs(), addDiskProj(), addLayerProj(), trklet::TrackletParametersMemory::addTracklet(), cms::cuda::assert(), trklet::Settings::bookHistos(), trklet::VarBase::calculate(), trklet::Settings::debugTracklet(), trklet::IMATH_TrackletCalculator::der_phiD_final, trklet::IMATH_TrackletCalculator::der_phiL_final, trklet::IMATH_TrackletCalculator::der_rD_final, trklet::IMATH_TrackletCalculator::der_zL_final, exacttracklet(), groupFilesInBlocks::fout, trklet::VarBase::fval(), trklet::Tracklet::getISeed(), trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, goodTrackPars(), trklet::Globals::histograms(), compare::hists, mps_fire::i, trklet::LayerProjection::init(), trklet::DiskProjection::init(), inSector(), trklet::Stub::isBarrel(), trklet::ProcessBase::iSector_, iSeed_, trklet::Globals::ITC_L1L2(), trklet::Globals::ITC_L2L3(), trklet::Globals::ITC_L3L4(), trklet::Globals::ITC_L5L6(), trklet::VarBase::ival(), dqmiolumiharvest::j, trklet::VarBase::K(), trklet::Stub::layer(), layerdisk1_, layerdisk2_, trklet::VarBase::local_passes(), angle0to2pi::make0To2pi(), trklet::N_DISK, trklet::N_LAYER, trklet::ProcessBase::name_, trklet::Settings::nphibitsstub(), trklet::Settings::nrbitsstub(), trklet::TrackletParametersMemory::nTracklets(), trklet::Settings::nzbitsstub(), trklet::Globals::ofstream(), trklet::Stub::phi(), trklet::L1TStub::phi(), trklet::IMATH_TrackletCalculator::phi0_final, trklet::IMATH_TrackletCalculator::phi1, trklet::IMATH_TrackletCalculator::phi2, trklet::Stub::phiapprox(), trklet::IMATH_TrackletCalculator::phiD_0_final, trklet::IMATH_TrackletCalculator::phiD_1_final, trklet::IMATH_TrackletCalculator::phiD_2_final, trklet::IMATH_TrackletCalculator::phiD_3_final, trklet::IMATH_TrackletCalculator::phiD_4_final, trklet::IMATH_TrackletCalculator::phiL_0_final, trklet::IMATH_TrackletCalculator::phiL_1_final, trklet::IMATH_TrackletCalculator::phiL_2_final, trklet::IMATH_TrackletCalculator::phiL_3_final, trklet::ProcessBase::phimax_, trklet::ProcessBase::phimin_, trklet::Settings::projlayers(), trklet::Stub::r(), trklet::L1TStub::r(), diffTwoXMLs::r1, trklet::IMATH_TrackletCalculator::r1, diffTwoXMLs::r2, trklet::IMATH_TrackletCalculator::r2, trklet::Stub::rapprox(), trklet::IMATH_TrackletCalculator::rD_0_final, trklet::IMATH_TrackletCalculator::rD_1_final, trklet::IMATH_TrackletCalculator::rD_2_final, trklet::IMATH_TrackletCalculator::rD_3_final, trklet::IMATH_TrackletCalculator::rD_4_final, trklet::rinv(), trklet::IMATH_TrackletCalculator::rinv_final, trklet::Settings::rmaxdisk(), trklet::Settings::rmean(), trklet::Settings::rmindisk(), trklet::IMATH_TrackletCalculator::rproj0, trklet::IMATH_TrackletCalculator::rproj1, trklet::IMATH_TrackletCalculator::rproj2, trklet::IMATH_TrackletCalculator::rproj3, trklet::VarDef::set_fval(), trklet::VarDef::set_ival(), trklet::Tracklet::setTCIndex(), trklet::ProcessBase::settings_, trklet::Tracklet::setTrackletIndex(), trklet::L1TStub::sigmaz(), submitPVValidationJobs::t, trklet::IMATH_TrackletCalculator::t_final, TCIndex_, cmsswSequenceInfo::tp, trklet::Tracklet::tpseed(), trackletpars_, trklet::Settings::useapprox(), trklet::Tracklet::validProj(), trklet::Tracklet::validProjDisk(), trklet::FPGAWord::value(), trklet::Settings::writeMonitorData(), trklet::Stub::z(), trklet::L1TStub::z(), HLTMuonOfflineAnalyzer_cfi::z0, trklet::IMATH_TrackletCalculator::z0_final, trklet::IMATH_TrackletCalculator::z1, testProducerWithPsetDescEmpty_cfi::z2, trklet::IMATH_TrackletCalculator::z2, trklet::Stub::zapprox(), trklet::IMATH_TrackletCalculator::zL_0_final, trklet::IMATH_TrackletCalculator::zL_1_final, trklet::IMATH_TrackletCalculator::zL_2_final, trklet::IMATH_TrackletCalculator::zL_3_final, trklet::Settings::zmean(), trklet::IMATH_TrackletCalculator::zproj0, trklet::IMATH_TrackletCalculator::zproj1, trklet::IMATH_TrackletCalculator::zproj2, trklet::IMATH_TrackletCalculator::zproj3, and trklet::IMATH_TrackletCalculator::zproj4.

Referenced by trklet::TrackletCalculator::execute(), and trklet::TrackletProcessor::execute().

◆ diskSeeding()

bool TrackletCalculatorBase::diskSeeding ( const Stub innerFPGAStub,
const L1TStub innerStub,
const Stub outerFPGAStub,
const L1TStub outerStub 
)

Definition at line 755 of file TrackletCalculatorBase.cc.

758  {
759  if (settings_.debugTracklet()) {
760  edm::LogVerbatim("Tracklet") << "TrackletCalculator::execute calculate disk seeds";
761  }
762 
763  int sign = 1;
764  if (innerFPGAStub->disk().value() < 0)
765  sign = -1;
766 
767  int disk = innerFPGAStub->disk().value();
768  assert(abs(disk) == 1 || abs(disk) == 3);
769 
770  assert(innerStub->isPSmodule());
771  assert(outerStub->isPSmodule());
772 
773  double r1 = innerStub->r();
774  double z1 = innerStub->z();
775  double phi1 = innerStub->phi();
776 
777  double r2 = outerStub->r();
778  double z2 = outerStub->z();
779  double phi2 = outerStub->phi();
780 
781  if (r2 < r1 + 2.0) {
782  return false; //Protection... Should be handled cleaner to avoid problem with floating point calculation
783  }
784 
785  double rinv, phi0, t, z0;
786 
787  double phiproj[N_PSLAYER], zproj[N_PSLAYER], phider[N_PSLAYER], zder[N_PSLAYER];
788  double phiprojdisk[N_DISK - 2], rprojdisk[N_DISK - 2], phiderdisk[N_DISK - 2], rderdisk[N_DISK - 2];
789 
791  z1,
792  phi1,
793  r2,
794  z2,
795  phi2,
796  outerStub->sigmaz(),
797  rinv,
798  phi0,
799  t,
800  z0,
801  phiproj,
802  zproj,
803  phider,
804  zder,
805  phiprojdisk,
806  rprojdisk,
807  phiderdisk,
808  rderdisk);
809 
810  //Truncates floating point positions to integer representation precision
811  if (settings_.useapprox()) {
812  phi1 = innerFPGAStub->phiapprox(phimin_, phimax_);
813  z1 = innerFPGAStub->zapprox();
814  r1 = innerFPGAStub->rapprox();
815 
816  phi2 = outerFPGAStub->phiapprox(phimin_, phimax_);
817  z2 = outerFPGAStub->zapprox();
818  r2 = outerFPGAStub->rapprox();
819  }
820 
821  double rinvapprox, phi0approx, tapprox, z0approx;
822  double phiprojapprox[N_PSLAYER], zprojapprox[N_PSLAYER];
823  double phiprojdiskapprox[N_DISK - 2], rprojdiskapprox[N_DISK - 2];
824 
826  if (disk == 1)
827  ITC = globals_->ITC_F1F2();
828  else if (disk == 3)
829  ITC = globals_->ITC_F3F4();
830  else if (disk == -1)
831  ITC = globals_->ITC_B1B2();
832  else
833  ITC = globals_->ITC_B3B4();
834 
835  ITC->r1.set_fval(r1);
836  ITC->r2.set_fval(r2);
837  int signt = t > 0 ? 1 : -1;
838  ITC->z1.set_fval(z1 - signt * settings_.zmean(layerdisk1_ - N_LAYER));
839  ITC->z2.set_fval(z2 - signt * settings_.zmean(layerdisk2_ - N_LAYER));
840  double sphi1 = angle0to2pi::make0To2pi(phi1 - phimin_);
841  double sphi2 = angle0to2pi::make0To2pi(phi2 - phimin_);
842  ITC->phi1.set_fval(sphi1);
843  ITC->phi2.set_fval(sphi2);
844 
845  ITC->rproj0.set_fval(settings_.rmean(0));
846  ITC->rproj1.set_fval(settings_.rmean(1));
847  ITC->rproj2.set_fval(settings_.rmean(2));
848 
849  ITC->zproj0.set_fval(signt * settings_.zmean(settings_.projdisks(iSeed_, 0) - 1));
850  ITC->zproj1.set_fval(signt * settings_.zmean(settings_.projdisks(iSeed_, 1) - 1));
851  ITC->zproj2.set_fval(signt * settings_.zmean(settings_.projdisks(iSeed_, 2) - 1));
852 
853  ITC->rinv_final.calculate();
854  ITC->phi0_final.calculate();
855  ITC->t_final.calculate();
856  ITC->z0_final.calculate();
857 
858  ITC->phiL_0_final.calculate();
859  ITC->phiL_1_final.calculate();
860  ITC->phiL_2_final.calculate();
861 
862  ITC->zL_0_final.calculate();
863  ITC->zL_1_final.calculate();
864  ITC->zL_2_final.calculate();
865 
866  ITC->phiD_0_final.calculate();
867  ITC->phiD_1_final.calculate();
868  ITC->phiD_2_final.calculate();
869 
870  ITC->rD_0_final.calculate();
871  ITC->rD_1_final.calculate();
872  ITC->rD_2_final.calculate();
873 
874  ITC->der_phiL_final.calculate();
875  ITC->der_zL_final.calculate();
876  ITC->der_phiD_final.calculate();
877  ITC->der_rD_final.calculate();
878 
879  //store the approximate results
880  rinvapprox = ITC->rinv_final.fval();
881  phi0approx = ITC->phi0_final.fval();
882  tapprox = ITC->t_final.fval();
883  z0approx = ITC->z0_final.fval();
884 
885  phiprojapprox[0] = ITC->phiL_0_final.fval();
886  phiprojapprox[1] = ITC->phiL_1_final.fval();
887  phiprojapprox[2] = ITC->phiL_2_final.fval();
888 
889  zprojapprox[0] = ITC->zL_0_final.fval();
890  zprojapprox[1] = ITC->zL_1_final.fval();
891  zprojapprox[2] = ITC->zL_2_final.fval();
892 
893  phiprojdiskapprox[0] = ITC->phiD_0_final.fval();
894  phiprojdiskapprox[1] = ITC->phiD_1_final.fval();
895  phiprojdiskapprox[2] = ITC->phiD_2_final.fval();
896 
897  rprojdiskapprox[0] = ITC->rD_0_final.fval();
898  rprojdiskapprox[1] = ITC->rD_1_final.fval();
899  rprojdiskapprox[2] = ITC->rD_2_final.fval();
900 
901  //now binary
902 
903  int irinv, iphi0, it, iz0;
904  int iphiproj[N_PSLAYER], izproj[N_PSLAYER];
905 
906  int iphiprojdisk[N_DISK - 2], irprojdisk[N_DISK - 2];
907 
908  int ir1 = innerFPGAStub->r().value();
909  int iphi1 = innerFPGAStub->phi().value();
910  int iz1 = innerFPGAStub->z().value();
911 
912  int ir2 = outerFPGAStub->r().value();
913  int iphi2 = outerFPGAStub->phi().value();
914  int iz2 = outerFPGAStub->z().value();
915 
916  //To get same precission as for layers.
917  iphi1 <<= (settings_.nphibitsstub(5) - settings_.nphibitsstub(0));
918  iphi2 <<= (settings_.nphibitsstub(5) - settings_.nphibitsstub(0));
919 
920  ITC->r1.set_ival(ir1);
921  ITC->r2.set_ival(ir2);
922  ITC->z1.set_ival(iz1);
923  ITC->z2.set_ival(iz2);
924  ITC->phi1.set_ival(iphi1);
925  ITC->phi2.set_ival(iphi2);
926 
927  ITC->rinv_final.calculate();
928  ITC->phi0_final.calculate();
929  ITC->t_final.calculate();
930  ITC->z0_final.calculate();
931 
932  ITC->phiL_0_final.calculate();
933  ITC->phiL_1_final.calculate();
934  ITC->phiL_2_final.calculate();
935 
936  ITC->zL_0_final.calculate();
937  ITC->zL_1_final.calculate();
938  ITC->zL_2_final.calculate();
939 
940  ITC->phiD_0_final.calculate();
941  ITC->phiD_1_final.calculate();
942  ITC->phiD_2_final.calculate();
943 
944  ITC->rD_0_final.calculate();
945  ITC->rD_1_final.calculate();
946  ITC->rD_2_final.calculate();
947 
948  ITC->der_phiL_final.calculate();
949  ITC->der_zL_final.calculate();
950  ITC->der_phiD_final.calculate();
951  ITC->der_rD_final.calculate();
952 
953  //store the binary results
954  irinv = ITC->rinv_final.ival();
955  iphi0 = ITC->phi0_final.ival();
956  it = ITC->t_final.ival();
957  iz0 = ITC->z0_final.ival();
958 
959  iphiproj[0] = ITC->phiL_0_final.ival();
960  iphiproj[1] = ITC->phiL_1_final.ival();
961  iphiproj[2] = ITC->phiL_2_final.ival();
962 
963  izproj[0] = ITC->zL_0_final.ival();
964  izproj[1] = ITC->zL_1_final.ival();
965  izproj[2] = ITC->zL_2_final.ival();
966 
968  return false;
969 
970  if (!inSector(iphi0, irinv, phi0approx, rinvapprox))
971  return false;
972 
973  LayerProjection layerprojs[N_LAYER - 2];
974  DiskProjection diskprojs[N_DISK - 2];
975 
976  for (unsigned int i = 0; i < N_DISK - 2; ++i) {
977  //Check is outside z range
978  if (izproj[i] < -(1 << (settings_.nzbitsstub(0) - 1)))
979  continue;
980  if (izproj[i] >= (1 << (settings_.nzbitsstub(0) - 1)))
981  continue;
982 
983  //Check if outside phi range
984  if (iphiproj[i] >= (1 << settings_.nphibitsstub(5)) - 1)
985  continue;
986  if (iphiproj[i] <= 0)
987  continue;
988 
989  //shift bits - allways in PS modules for disk seeding
990  iphiproj[i] >>= (settings_.nphibitsstub(5) - settings_.nphibitsstub(0));
991 
992  layerprojs[i].init(settings_,
993  i + 1,
994  settings_.rmean(i),
995  iphiproj[i],
996  izproj[i],
997  ITC->der_phiL_final.ival(),
998  ITC->der_zL_final.ival(),
999  phiproj[i],
1000  zproj[i],
1001  phider[i],
1002  zder[i],
1003  phiprojapprox[i],
1004  zprojapprox[i],
1005  ITC->der_phiL_final.fval(),
1006  ITC->der_zL_final.fval(),
1007  true);
1008  }
1009 
1010  iphiprojdisk[0] = ITC->phiD_0_final.ival();
1011  iphiprojdisk[1] = ITC->phiD_1_final.ival();
1012  iphiprojdisk[2] = ITC->phiD_2_final.ival();
1013 
1014  irprojdisk[0] = ITC->rD_0_final.ival();
1015  irprojdisk[1] = ITC->rD_1_final.ival();
1016  irprojdisk[2] = ITC->rD_2_final.ival();
1017 
1018  for (unsigned int i = 0; i < N_DISK - 2; ++i) {
1019  //check that phi projection in range
1020  if (iphiprojdisk[i] <= 0)
1021  continue;
1022  if (iphiprojdisk[i] >= (1 << settings_.nphibitsstub(0)) - 1)
1023  continue;
1024 
1025  //check that r projection in range
1026  if (irprojdisk[i] <= 0 || irprojdisk[i] > settings_.rmaxdisk() / ITC->rD_0_final.K())
1027  continue;
1028 
1029  diskprojs[i].init(settings_,
1030  i + 1,
1032  iphiprojdisk[i],
1033  irprojdisk[i],
1034  ITC->der_phiD_final.ival(),
1035  ITC->der_rD_final.ival(),
1036  phiprojdisk[i],
1037  rprojdisk[i],
1038  phiderdisk[i],
1039  rderdisk[i],
1040  phiprojdiskapprox[i],
1041  rprojdiskapprox[i],
1042  ITC->der_phiD_final.fval(),
1043  ITC->der_rD_final.fval());
1044  }
1045 
1046  if (settings_.writeMonitorData("TPars")) {
1047  globals_->ofstream("trackletparsdisk.txt")
1048  << "Trackpars " << layerdisk1_ - 5 << " " << rinv << " " << rinvapprox << " "
1049  << ITC->rinv_final.fval() << " " << phi0 << " " << phi0approx << " " << ITC->phi0_final.fval() << " " << t
1050  << " " << tapprox << " " << ITC->t_final.fval() << " " << z0 << " " << z0approx << " " << ITC->z0_final.fval()
1051  << endl;
1052  }
1053 
1054  Tracklet* tracklet = new Tracklet(settings_,
1055  innerStub,
1056  nullptr,
1057  outerStub,
1058  innerFPGAStub,
1059  nullptr,
1060  outerFPGAStub,
1061  rinv,
1062  phi0,
1063  0.0,
1064  z0,
1065  t,
1066  rinvapprox,
1067  phi0approx,
1068  0.0,
1069  z0approx,
1070  tapprox,
1071  irinv,
1072  iphi0,
1073  0,
1074  iz0,
1075  it,
1076  layerprojs,
1077  diskprojs,
1078  true);
1079 
1080  if (settings_.debugTracklet()) {
1081  edm::LogVerbatim("Tracklet") << "Found tracklet for disk seed = " << iSeed_ << " " << tracklet << " " << iSector_;
1082  }
1083 
1085  tracklet->setTCIndex(TCIndex_);
1086 
1087  if (settings_.writeMonitorData("Seeds")) {
1088  ofstream fout("seeds.txt", ofstream::app);
1089  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << tracklet->getISeed() << endl;
1090  fout.close();
1091  }
1092  trackletpars_->addTracklet(tracklet);
1093 
1094  if (tracklet->validProj(1)) {
1095  addLayerProj(tracklet, 1);
1096  }
1097 
1098  if (tracklet->validProj(2)) {
1099  addLayerProj(tracklet, 2);
1100  }
1101 
1102  for (unsigned int j = 0; j < N_DISK - 2; j++) {
1103  if (tracklet->validProjDisk(sign * settings_.projdisks(iSeed_, j))) {
1104  addDiskProj(tracklet, sign * settings_.projdisks(iSeed_, j));
1105  }
1106  }
1107 
1108  return true;
1109 }

References funct::abs(), addDiskProj(), addLayerProj(), trklet::TrackletParametersMemory::addTracklet(), cms::cuda::assert(), trklet::VarBase::calculate(), trklet::Settings::debugTracklet(), trklet::IMATH_TrackletCalculatorDisk::der_phiD_final, trklet::IMATH_TrackletCalculatorDisk::der_phiL_final, trklet::IMATH_TrackletCalculatorDisk::der_rD_final, trklet::IMATH_TrackletCalculatorDisk::der_zL_final, trklet::Stub::disk(), exacttrackletdisk(), groupFilesInBlocks::fout, trklet::VarBase::fval(), trklet::Tracklet::getISeed(), trklet::ProcessBase::globals_, goodTrackPars(), mps_fire::i, trklet::LayerProjection::init(), trklet::DiskProjection::init(), inSector(), trklet::ProcessBase::iSector_, iSeed_, trklet::L1TStub::isPSmodule(), trklet::Globals::ITC_B1B2(), trklet::Globals::ITC_B3B4(), trklet::Globals::ITC_F1F2(), trklet::Globals::ITC_F3F4(), trklet::VarBase::ival(), dqmiolumiharvest::j, trklet::VarBase::K(), layerdisk1_, layerdisk2_, trklet::VarBase::local_passes(), angle0to2pi::make0To2pi(), trklet::N_DISK, trklet::N_LAYER, trklet::N_PSLAYER, trklet::ProcessBase::name_, trklet::Settings::nphibitsstub(), trklet::TrackletParametersMemory::nTracklets(), trklet::Settings::nzbitsstub(), trklet::Globals::ofstream(), trklet::Stub::phi(), trklet::L1TStub::phi(), trklet::IMATH_TrackletCalculatorDisk::phi0_final, trklet::IMATH_TrackletCalculatorDisk::phi1, trklet::IMATH_TrackletCalculatorDisk::phi2, trklet::Stub::phiapprox(), trklet::IMATH_TrackletCalculatorDisk::phiD_0_final, trklet::IMATH_TrackletCalculatorDisk::phiD_1_final, trklet::IMATH_TrackletCalculatorDisk::phiD_2_final, trklet::IMATH_TrackletCalculatorDisk::phiL_0_final, trklet::IMATH_TrackletCalculatorDisk::phiL_1_final, trklet::IMATH_TrackletCalculatorDisk::phiL_2_final, trklet::ProcessBase::phimax_, trklet::ProcessBase::phimin_, trklet::Settings::projdisks(), trklet::Stub::r(), trklet::L1TStub::r(), diffTwoXMLs::r1, trklet::IMATH_TrackletCalculatorDisk::r1, diffTwoXMLs::r2, trklet::IMATH_TrackletCalculatorDisk::r2, trklet::Stub::rapprox(), trklet::IMATH_TrackletCalculatorDisk::rD_0_final, trklet::IMATH_TrackletCalculatorDisk::rD_1_final, trklet::IMATH_TrackletCalculatorDisk::rD_2_final, trklet::rinv(), trklet::IMATH_TrackletCalculatorDisk::rinv_final, trklet::Settings::rmaxdisk(), trklet::Settings::rmean(), trklet::IMATH_TrackletCalculatorDisk::rproj0, trklet::IMATH_TrackletCalculatorDisk::rproj1, trklet::IMATH_TrackletCalculatorDisk::rproj2, trklet::VarDef::set_fval(), trklet::VarDef::set_ival(), trklet::Tracklet::setTCIndex(), trklet::ProcessBase::settings_, trklet::Tracklet::setTrackletIndex(), trklet::L1TStub::sigmaz(), Validation_hcalonly_cfi::sign, submitPVValidationJobs::t, trklet::IMATH_TrackletCalculatorDisk::t_final, TCIndex_, trackletpars_, trklet::Settings::useapprox(), trklet::Tracklet::validProj(), trklet::Tracklet::validProjDisk(), trklet::FPGAWord::value(), trklet::Settings::writeMonitorData(), trklet::Stub::z(), trklet::L1TStub::z(), HLTMuonOfflineAnalyzer_cfi::z0, trklet::IMATH_TrackletCalculatorDisk::z0_final, trklet::IMATH_TrackletCalculatorDisk::z1, testProducerWithPsetDescEmpty_cfi::z2, trklet::IMATH_TrackletCalculatorDisk::z2, trklet::Stub::zapprox(), trklet::IMATH_TrackletCalculatorDisk::zL_0_final, trklet::IMATH_TrackletCalculatorDisk::zL_1_final, trklet::IMATH_TrackletCalculatorDisk::zL_2_final, trklet::Settings::zmean(), trklet::IMATH_TrackletCalculatorDisk::zproj0, trklet::IMATH_TrackletCalculatorDisk::zproj1, and trklet::IMATH_TrackletCalculatorDisk::zproj2.

Referenced by trklet::TrackletCalculator::execute(), and trklet::TrackletProcessor::execute().

◆ exactproj()

void TrackletCalculatorBase::exactproj ( double  rproj,
double  rinv,
double  phi0,
double  t,
double  z0,
double &  phiproj,
double &  zproj,
double &  phider,
double &  zder 
)

Definition at line 177 of file TrackletCalculatorBase.cc.

185  {
186  phiproj = phi0 - asin(0.5 * rproj * rinv);
187  zproj = z0 + (2 * t / rinv) * asin(0.5 * rproj * rinv);
188 
189  phider = -0.5 * rinv / sqrt(1 - pow(0.5 * rproj * rinv, 2));
190  zder = t / sqrt(1 - pow(0.5 * rproj * rinv, 2));
191 }

References funct::pow(), trklet::rinv(), mathSSE::sqrt(), submitPVValidationJobs::t, and HLTMuonOfflineAnalyzer_cfi::z0.

Referenced by exacttracklet(), exacttrackletdisk(), and exacttrackletOverlap().

◆ exactprojdisk()

void TrackletCalculatorBase::exactprojdisk ( double  zproj,
double  rinv,
double  phi0,
double  t,
double  z0,
double &  phiproj,
double &  rproj,
double &  phider,
double &  rder 
)

Definition at line 193 of file TrackletCalculatorBase.cc.

201  {
202  if (t < 0)
203  zproj = -zproj;
204 
205  double tmp = rinv * (zproj - z0) / (2.0 * t);
206  rproj = (2.0 / rinv) * sin(tmp);
207  phiproj = phi0 - tmp;
208 
209  phider = -rinv / (2 * t);
210  rder = cos(tmp) / t;
211 }

References funct::cos(), trklet::rinv(), funct::sin(), submitPVValidationJobs::t, createJobs::tmp, and HLTMuonOfflineAnalyzer_cfi::z0.

Referenced by exacttracklet(), exacttrackletdisk(), and exacttrackletOverlap().

◆ exacttracklet()

void TrackletCalculatorBase::exacttracklet ( double  r1,
double  z1,
double  phi1,
double  r2,
double  z2,
double  phi2,
double  ,
double &  rinv,
double &  phi0,
double &  t,
double &  z0,
double  phiproj[N_LAYER - 2],
double  zproj[N_LAYER - 2],
double  phider[N_LAYER - 2],
double  zder[N_LAYER - 2],
double  phiprojdisk[N_DISK],
double  rprojdisk[N_DISK],
double  phiderdisk[N_DISK],
double  rderdisk[N_DISK] 
)

Definition at line 23 of file TrackletCalculatorBase.cc.

41  {
42  double deltaphi = reco::reduceRange(phi1 - phi2);
43 
44  double dist = sqrt(r2 * r2 + r1 * r1 - 2 * r1 * r2 * cos(deltaphi));
45 
46  rinv = 2 * sin(deltaphi) / dist;
47 
48  double phi1tmp = phi1 - phimin_;
49 
50  phi0 = reco::reduceRange(phi1tmp + asin(0.5 * r1 * rinv));
51 
52  double rhopsi1 = 2 * asin(0.5 * r1 * rinv) / rinv;
53  double rhopsi2 = 2 * asin(0.5 * r2 * rinv) / rinv;
54 
55  t = (z1 - z2) / (rhopsi1 - rhopsi2);
56 
57  z0 = z1 - t * rhopsi1;
58 
59  for (unsigned int i = 0; i < N_LAYER - 2; i++) {
61  rinv,
62  phi0,
63  t,
64  z0,
65  phiproj[i],
66  zproj[i],
67  phider[i],
68  zder[i]);
69  }
70 
71  for (unsigned int i = 0; i < N_DISK; i++) {
72  exactprojdisk(settings_.zmean(i), rinv, phi0, t, z0, phiprojdisk[i], rprojdisk[i], phiderdisk[i], rderdisk[i]);
73  }
74 }

References funct::cos(), exactproj(), exactprojdisk(), mps_fire::i, iSeed_, trklet::N_DISK, trklet::N_LAYER, trklet::ProcessBase::phimin_, trklet::Settings::projlayers(), diffTwoXMLs::r1, diffTwoXMLs::r2, reco::reduceRange(), trklet::rinv(), trklet::Settings::rmean(), trklet::ProcessBase::settings_, funct::sin(), mathSSE::sqrt(), submitPVValidationJobs::t, HLTMuonOfflineAnalyzer_cfi::z0, testProducerWithPsetDescEmpty_cfi::z2, and trklet::Settings::zmean().

Referenced by barrelSeeding().

◆ exacttrackletdisk()

void TrackletCalculatorBase::exacttrackletdisk ( double  r1,
double  z1,
double  phi1,
double  r2,
double  z2,
double  phi2,
double  ,
double &  rinv,
double &  phi0,
double &  t,
double &  z0,
double  phiprojLayer[N_PSLAYER],
double  zprojLayer[N_PSLAYER],
double  phiderLayer[N_PSLAYER],
double  zderLayer[N_PSLAYER],
double  phiproj[N_DISK - 2],
double  rproj[N_DISK - 2],
double  phider[N_DISK - 2],
double  rder[N_DISK - 2] 
)

Definition at line 76 of file TrackletCalculatorBase.cc.

94  {
95  double deltaphi = reco::reduceRange(phi1 - phi2);
96 
97  double dist = sqrt(r2 * r2 + r1 * r1 - 2 * r1 * r2 * cos(deltaphi));
98 
99  rinv = 2 * sin(deltaphi) / dist;
100 
101  double phi1tmp = phi1 - phimin_;
102 
103  phi0 = reco::reduceRange(phi1tmp + asin(0.5 * r1 * rinv));
104 
105  double rhopsi1 = 2 * asin(0.5 * r1 * rinv) / rinv;
106  double rhopsi2 = 2 * asin(0.5 * r2 * rinv) / rinv;
107 
108  t = (z1 - z2) / (rhopsi1 - rhopsi2);
109 
110  z0 = z1 - t * rhopsi1;
111 
112  for (unsigned int i = 0; i < N_DISK - 2; i++) {
114  rinv,
115  phi0,
116  t,
117  z0,
118  phiproj[i],
119  rproj[i],
120  phider[i],
121  rder[i]);
122  }
123 
124  for (unsigned int i = 0; i < N_DISK - 2; i++) {
125  exactproj(settings_.rmean(i), rinv, phi0, t, z0, phiprojLayer[i], zprojLayer[i], phiderLayer[i], zderLayer[i]);
126  }
127 }

References funct::cos(), exactproj(), exactprojdisk(), mps_fire::i, iSeed_, trklet::N_DISK, trklet::ProcessBase::phimin_, trklet::Settings::projdisks(), diffTwoXMLs::r1, diffTwoXMLs::r2, reco::reduceRange(), trklet::rinv(), trklet::Settings::rmean(), trklet::ProcessBase::settings_, funct::sin(), mathSSE::sqrt(), submitPVValidationJobs::t, HLTMuonOfflineAnalyzer_cfi::z0, testProducerWithPsetDescEmpty_cfi::z2, and trklet::Settings::zmean().

Referenced by diskSeeding().

◆ exacttrackletOverlap()

void TrackletCalculatorBase::exacttrackletOverlap ( double  r1,
double  z1,
double  phi1,
double  r2,
double  z2,
double  phi2,
double  ,
double &  rinv,
double &  phi0,
double &  t,
double &  z0,
double  phiprojLayer[N_PSLAYER],
double  zprojLayer[N_PSLAYER],
double  phiderLayer[N_PSLAYER],
double  zderLayer[N_PSLAYER],
double  phiproj[N_DISK - 2],
double  rproj[N_DISK - 2],
double  phider[N_DISK - 2],
double  rder[N_DISK - 2] 
)

Definition at line 129 of file TrackletCalculatorBase.cc.

147  {
148  double deltaphi = reco::reduceRange(phi1 - phi2);
149 
150  double dist = sqrt(r2 * r2 + r1 * r1 - 2 * r1 * r2 * cos(deltaphi));
151 
152  rinv = 2 * sin(deltaphi) / dist;
153 
154  if (r1 > r2)
155  rinv = -rinv;
156 
157  double phi1tmp = phi1 - phimin_;
158 
159  phi0 = reco::reduceRange(phi1tmp + asin(0.5 * r1 * rinv));
160 
161  double rhopsi1 = 2 * asin(0.5 * r1 * rinv) / rinv;
162  double rhopsi2 = 2 * asin(0.5 * r2 * rinv) / rinv;
163 
164  t = (z1 - z2) / (rhopsi1 - rhopsi2);
165 
166  z0 = z1 - t * rhopsi1;
167 
168  for (int i = 0; i < 4; i++) {
169  exactprojdisk(settings_.zmean(i + 1), rinv, phi0, t, z0, phiproj[i], rproj[i], phider[i], rder[i]);
170  }
171 
172  for (int i = 0; i < 1; i++) {
173  exactproj(settings_.rmean(i), rinv, phi0, t, z0, phiprojLayer[i], zprojLayer[i], phiderLayer[i], zderLayer[i]);
174  }
175 }

References funct::cos(), exactproj(), exactprojdisk(), mps_fire::i, trklet::ProcessBase::phimin_, diffTwoXMLs::r1, diffTwoXMLs::r2, reco::reduceRange(), trklet::rinv(), trklet::Settings::rmean(), trklet::ProcessBase::settings_, funct::sin(), mathSSE::sqrt(), submitPVValidationJobs::t, HLTMuonOfflineAnalyzer_cfi::z0, testProducerWithPsetDescEmpty_cfi::z2, and trklet::Settings::zmean().

Referenced by overlapSeeding().

◆ goodTrackPars()

bool TrackletCalculatorBase::goodTrackPars ( bool  goodrinv,
bool  goodz0 
)

Definition at line 289 of file TrackletCalculatorBase.cc.

289  {
290  bool success = true;
291  if (!goodrinv) {
292  if (settings_.debugTracklet()) {
293  edm::LogVerbatim("Tracklet") << getName() << " TrackletCalculatorBase irinv too large";
294  }
295  success = false;
296  }
297  if (!goodz0) {
298  if (settings_.debugTracklet()) {
299  edm::LogVerbatim("Tracklet") << getName() << " TrackletCalculatorBase z0 cut to large";
300  }
301  success = false;
302  }
303  return success;
304 }

References trklet::Settings::debugTracklet(), trklet::ProcessBase::getName(), trklet::ProcessBase::settings_, and summarizeEdmComparisonLogfiles::success.

Referenced by barrelSeeding(), diskSeeding(), and overlapSeeding().

◆ inSector()

bool TrackletCalculatorBase::inSector ( int  iphi0,
int  irinv,
double  phi0approx,
double  rinvapprox 
)

Definition at line 306 of file TrackletCalculatorBase.cc.

306  {
307  double phicritapprox = phi0approx - asin(0.5 * settings_.rcrit() * rinvapprox);
308 
309  int ifactor = 0.5 * settings_.rcrit() * settings_.krinvpars() / settings_.kphi0pars() * (1 << 8);
310  int iphicrit = iphi0 - (irinv >> 8) * ifactor;
311 
312  int iphicritmincut = settings_.phicritminmc() / globals_->ITC_L1L2()->phi0_final.K();
313  int iphicritmaxcut = settings_.phicritmaxmc() / globals_->ITC_L1L2()->phi0_final.K();
314 
315  bool keepapprox = (phicritapprox > settings_.phicritminmc()) && (phicritapprox < settings_.phicritmaxmc()),
316  keep = (iphicrit > iphicritmincut) && (iphicrit < iphicritmaxcut);
317  if (settings_.debugTracklet())
318  if (keepapprox && !keep)
319  edm::LogVerbatim("Tracklet") << getName()
320  << " Tracklet kept with exact phicrit cut but not approximate, phicritapprox: "
321  << phicritapprox;
322  if (settings_.usephicritapprox()) {
323  return keepapprox;
324  } else {
325  return keep;
326  }
327 
328  return true;
329 }

References trklet::Settings::debugTracklet(), trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, trklet::Globals::ITC_L1L2(), trklet::VarBase::K(), keep, trklet::Settings::kphi0pars(), trklet::Settings::krinvpars(), trklet::IMATH_TrackletCalculator::phi0_final, trklet::Settings::phicritmaxmc(), trklet::Settings::phicritminmc(), trklet::Settings::rcrit(), trklet::ProcessBase::settings_, and trklet::Settings::usephicritapprox().

Referenced by barrelSeeding(), diskSeeding(), and overlapSeeding().

◆ overlapSeeding()

bool TrackletCalculatorBase::overlapSeeding ( const Stub innerFPGAStub,
const L1TStub innerStub,
const Stub outerFPGAStub,
const L1TStub outerStub 
)

Definition at line 1111 of file TrackletCalculatorBase.cc.

1114  {
1115  //Deal with overlap stubs here
1116  assert(outerFPGAStub->isBarrel());
1117 
1118  assert(innerFPGAStub->isDisk());
1119 
1120  int disk = innerFPGAStub->disk().value();
1121 
1122  if (settings_.debugTracklet()) {
1123  edm::LogVerbatim("Tracklet") << "trying to make overlap tracklet for seed = " << iSeed_ << " " << getName();
1124  }
1125 
1126  double r1 = innerStub->r();
1127  double z1 = innerStub->z();
1128  double phi1 = innerStub->phi();
1129 
1130  double r2 = outerStub->r();
1131  double z2 = outerStub->z();
1132  double phi2 = outerStub->phi();
1133 
1134  //Protection for wrong radii. Could be handled cleaner to avoid problem with floating point calculation and with overflows in the integer calculation.
1135  if (r1 < r2 + 1.5) {
1136  return false;
1137  }
1138 
1139  double rinv, phi0, t, z0;
1140 
1141  double phiproj[N_PSLAYER], zproj[N_PSLAYER], phider[N_PSLAYER], zder[N_PSLAYER];
1142  double phiprojdisk[N_DISK - 1], rprojdisk[N_DISK - 1], phiderdisk[N_DISK - 1], rderdisk[N_DISK - 1];
1143 
1145  z1,
1146  phi1,
1147  r2,
1148  z2,
1149  phi2,
1150  outerStub->sigmaz(),
1151  rinv,
1152  phi0,
1153  t,
1154  z0,
1155  phiproj,
1156  zproj,
1157  phider,
1158  zder,
1159  phiprojdisk,
1160  rprojdisk,
1161  phiderdisk,
1162  rderdisk);
1163 
1164  //Truncates floating point positions to integer representation precision
1165  if (settings_.useapprox()) {
1166  phi1 = innerFPGAStub->phiapprox(phimin_, phimax_);
1167  z1 = innerFPGAStub->zapprox();
1168  r1 = innerFPGAStub->rapprox();
1169 
1170  phi2 = outerFPGAStub->phiapprox(phimin_, phimax_);
1171  z2 = outerFPGAStub->zapprox();
1172  r2 = outerFPGAStub->rapprox();
1173  }
1174 
1175  double rinvapprox, phi0approx, tapprox, z0approx;
1176  double phiprojapprox[N_PSLAYER], zprojapprox[N_PSLAYER];
1177  double phiprojdiskapprox[N_DISK - 1], rprojdiskapprox[N_DISK - 1];
1178 
1180  int ll = outerFPGAStub->layer().value() + 1;
1181  if (ll == 1 && disk == 1)
1182  ITC = globals_->ITC_L1F1();
1183  else if (ll == 2 && disk == 1)
1184  ITC = globals_->ITC_L2F1();
1185  else if (ll == 1 && disk == -1)
1186  ITC = globals_->ITC_L1B1();
1187  else if (ll == 2 && disk == -1)
1188  ITC = globals_->ITC_L2B1();
1189  else
1190  throw cms::Exception("LogicError") << __FILE__ << " " << __LINE__ << " Invalid seeding!";
1191 
1192  ITC->r1.set_fval(r2 - settings_.rmean(ll - 1));
1193  ITC->r2.set_fval(r1);
1194  int signt = t > 0 ? 1 : -1;
1195  ITC->z1.set_fval(z2);
1196  ITC->z2.set_fval(z1 - signt * settings_.zmean(layerdisk2_ - N_LAYER));
1197  double sphi1 = angle0to2pi::make0To2pi(phi1 - phimin_);
1198  double sphi2 = angle0to2pi::make0To2pi(phi2 - phimin_);
1199  ITC->phi1.set_fval(sphi2);
1200  ITC->phi2.set_fval(sphi1);
1201 
1202  ITC->rproj0.set_fval(settings_.rmean(0));
1203  ITC->rproj1.set_fval(settings_.rmean(1));
1204  ITC->rproj2.set_fval(settings_.rmean(2));
1205 
1206  ITC->zproj0.set_fval(signt * settings_.zmean(1));
1207  ITC->zproj1.set_fval(signt * settings_.zmean(2));
1208  ITC->zproj2.set_fval(signt * settings_.zmean(3));
1209  ITC->zproj3.set_fval(signt * settings_.zmean(4));
1210 
1211  ITC->rinv_final.calculate();
1212  ITC->phi0_final.calculate();
1213  ITC->t_final.calculate();
1214  ITC->z0_final.calculate();
1215 
1216  ITC->phiL_0_final.calculate();
1217  ITC->phiL_1_final.calculate();
1218  ITC->phiL_2_final.calculate();
1219 
1220  ITC->zL_0_final.calculate();
1221  ITC->zL_1_final.calculate();
1222  ITC->zL_2_final.calculate();
1223 
1224  ITC->phiD_0_final.calculate();
1225  ITC->phiD_1_final.calculate();
1226  ITC->phiD_2_final.calculate();
1227  ITC->phiD_3_final.calculate();
1228 
1229  ITC->rD_0_final.calculate();
1230  ITC->rD_1_final.calculate();
1231  ITC->rD_2_final.calculate();
1232  ITC->rD_3_final.calculate();
1233 
1234  ITC->der_phiL_final.calculate();
1235  ITC->der_zL_final.calculate();
1236  ITC->der_phiD_final.calculate();
1237  ITC->der_rD_final.calculate();
1238 
1239  //store the approximate results
1240  rinvapprox = ITC->rinv_final.fval();
1241  phi0approx = ITC->phi0_final.fval();
1242  tapprox = ITC->t_final.fval();
1243  z0approx = ITC->z0_final.fval();
1244 
1245  phiprojapprox[0] = ITC->phiL_0_final.fval();
1246  phiprojapprox[1] = ITC->phiL_1_final.fval();
1247  phiprojapprox[2] = ITC->phiL_2_final.fval();
1248 
1249  zprojapprox[0] = ITC->zL_0_final.fval();
1250  zprojapprox[1] = ITC->zL_1_final.fval();
1251  zprojapprox[2] = ITC->zL_2_final.fval();
1252 
1253  phiprojdiskapprox[0] = ITC->phiD_0_final.fval();
1254  phiprojdiskapprox[1] = ITC->phiD_1_final.fval();
1255  phiprojdiskapprox[2] = ITC->phiD_2_final.fval();
1256  phiprojdiskapprox[3] = ITC->phiD_3_final.fval();
1257 
1258  rprojdiskapprox[0] = ITC->rD_0_final.fval();
1259  rprojdiskapprox[1] = ITC->rD_1_final.fval();
1260  rprojdiskapprox[2] = ITC->rD_2_final.fval();
1261  rprojdiskapprox[3] = ITC->rD_3_final.fval();
1262 
1263  //now binary
1264 
1265  int irinv, iphi0, it, iz0;
1266  int iphiproj[N_LAYER - 2], izproj[N_LAYER - 2];
1267  int iphiprojdisk[N_DISK], irprojdisk[N_DISK];
1268 
1269  int ir2 = innerFPGAStub->r().value();
1270  int iphi2 = innerFPGAStub->phi().value();
1271  int iz2 = innerFPGAStub->z().value();
1272 
1273  int ir1 = outerFPGAStub->r().value();
1274  int iphi1 = outerFPGAStub->phi().value();
1275  int iz1 = outerFPGAStub->z().value();
1276 
1277  //To get global precission
1278  ir1 <<= (8 - settings_.nrbitsstub(ll - 1));
1279  iphi1 <<= (settings_.nphibitsstub(5) - settings_.nphibitsstub(0));
1280  iphi2 <<= (settings_.nphibitsstub(5) - settings_.nphibitsstub(0));
1281 
1282  ITC->r1.set_ival(ir1);
1283  ITC->r2.set_ival(ir2);
1284  ITC->z1.set_ival(iz1);
1285  ITC->z2.set_ival(iz2);
1286  ITC->phi1.set_ival(iphi1);
1287  ITC->phi2.set_ival(iphi2);
1288 
1289  ITC->rinv_final.calculate();
1290  ITC->phi0_final.calculate();
1291  ITC->t_final.calculate();
1292  ITC->z0_final.calculate();
1293 
1294  ITC->phiL_0_final.calculate();
1295  ITC->phiL_1_final.calculate();
1296  ITC->phiL_2_final.calculate();
1297 
1298  ITC->zL_0_final.calculate();
1299  ITC->zL_1_final.calculate();
1300  ITC->zL_2_final.calculate();
1301 
1302  ITC->phiD_0_final.calculate();
1303  ITC->phiD_1_final.calculate();
1304  ITC->phiD_2_final.calculate();
1305  ITC->phiD_3_final.calculate();
1306 
1307  ITC->rD_0_final.calculate();
1308  ITC->rD_1_final.calculate();
1309  ITC->rD_2_final.calculate();
1310  ITC->rD_3_final.calculate();
1311 
1312  ITC->der_phiL_final.calculate();
1313  ITC->der_zL_final.calculate();
1314  ITC->der_phiD_final.calculate();
1315  ITC->der_rD_final.calculate();
1316 
1317  //store the binary results
1318  irinv = ITC->rinv_final.ival();
1319  iphi0 = ITC->phi0_final.ival();
1320  it = ITC->t_final.ival();
1321  iz0 = ITC->z0_final.ival();
1322 
1323  iphiproj[0] = ITC->phiL_0_final.ival();
1324  iphiproj[1] = ITC->phiL_1_final.ival();
1325  iphiproj[2] = ITC->phiL_2_final.ival();
1326 
1327  izproj[0] = ITC->zL_0_final.ival();
1328  izproj[1] = ITC->zL_1_final.ival();
1329  izproj[2] = ITC->zL_2_final.ival();
1330 
1331  iphiprojdisk[0] = ITC->phiD_0_final.ival();
1332  iphiprojdisk[1] = ITC->phiD_1_final.ival();
1333  iphiprojdisk[2] = ITC->phiD_2_final.ival();
1334  iphiprojdisk[3] = ITC->phiD_3_final.ival();
1335 
1336  irprojdisk[0] = ITC->rD_0_final.ival();
1337  irprojdisk[1] = ITC->rD_1_final.ival();
1338  irprojdisk[2] = ITC->rD_2_final.ival();
1339  irprojdisk[3] = ITC->rD_3_final.ival();
1340 
1342  return false;
1343 
1344  if (!inSector(iphi0, irinv, phi0approx, rinvapprox))
1345  return false;
1346 
1347  LayerProjection layerprojs[N_LAYER - 2];
1348  DiskProjection diskprojs[N_DISK];
1349 
1350  for (unsigned int i = 0; i < N_DISK - 2; ++i) {
1351  //check that zproj is in range
1352  if (izproj[i] < -(1 << (settings_.nzbitsstub(0) - 1)))
1353  continue;
1354  if (izproj[i] >= (1 << (settings_.nzbitsstub(0) - 1)))
1355  continue;
1356 
1357  //check that phiproj is in range
1358  if (iphiproj[i] >= (1 << settings_.nphibitsstub(5)) - 1)
1359  continue;
1360  if (iphiproj[i] <= 0)
1361  continue;
1362 
1363  //adjust bits for PS modules (no 2S modules in overlap seeds)
1364  iphiproj[i] >>= (settings_.nphibitsstub(5) - settings_.nphibitsstub(0));
1365 
1366  layerprojs[i].init(settings_,
1367  i + 1,
1368  settings_.rmean(i),
1369  iphiproj[i],
1370  izproj[i],
1371  ITC->der_phiL_final.ival(),
1372  ITC->der_zL_final.ival(),
1373  phiproj[i],
1374  zproj[i],
1375  phider[i],
1376  zder[i],
1377  phiprojapprox[i],
1378  zprojapprox[i],
1379  ITC->der_phiL_final.fval(),
1380  ITC->der_zL_final.fval(),
1381  true);
1382  }
1383 
1384  for (int i = 0; i < 4; ++i) {
1385  //check that phi projection in range
1386  if (iphiprojdisk[i] <= 0)
1387  continue;
1388  if (iphiprojdisk[i] >= (1 << settings_.nphibitsstub(0)) - 1)
1389  continue;
1390 
1391  //check that r projection in range
1392  if (irprojdisk[i] <= 0 || irprojdisk[i] > settings_.rmaxdisk() / ITC->rD_0_final.K())
1393  continue;
1394 
1395  diskprojs[i].init(settings_,
1396  i + 1,
1397  settings_.zmean(i),
1398  iphiprojdisk[i],
1399  irprojdisk[i],
1400  ITC->der_phiD_final.ival(),
1401  ITC->der_rD_final.ival(),
1402  phiprojdisk[i],
1403  rprojdisk[i],
1404  phiderdisk[i],
1405  rderdisk[i],
1406  phiprojdiskapprox[i],
1407  rprojdiskapprox[i],
1408  ITC->der_phiD_final.fval(),
1409  ITC->der_rD_final.fval());
1410  }
1411 
1412  if (settings_.writeMonitorData("TPars")) {
1413  globals_->ofstream("trackletparsoverlap.txt")
1414  << "Trackpars " << layerdisk1_ - 5 << " " << rinv << " " << irinv << " " << ITC->rinv_final.fval() << " "
1415  << phi0 << " " << iphi0 << " " << ITC->phi0_final.fval() << " " << t << " " << it << " "
1416  << ITC->t_final.fval() << " " << z0 << " " << iz0 << " " << ITC->z0_final.fval() << endl;
1417  }
1418 
1419  Tracklet* tracklet = new Tracklet(settings_,
1420  innerStub,
1421  nullptr,
1422  outerStub,
1423  innerFPGAStub,
1424  nullptr,
1425  outerFPGAStub,
1426  rinv,
1427  phi0,
1428  0.0,
1429  z0,
1430  t,
1431  rinvapprox,
1432  phi0approx,
1433  0.0,
1434  z0approx,
1435  tapprox,
1436  irinv,
1437  iphi0,
1438  0,
1439  iz0,
1440  it,
1441  layerprojs,
1442  diskprojs,
1443  false,
1444  true);
1445 
1446  if (settings_.debugTracklet()) {
1447  edm::LogVerbatim("Tracklet") << "Found tracklet in overlap seed = " << iSeed_ << " " << tracklet << " " << iSector_;
1448  }
1449 
1451  tracklet->setTCIndex(TCIndex_);
1452 
1453  if (settings_.writeMonitorData("Seeds")) {
1454  ofstream fout("seeds.txt", ofstream::app);
1455  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << tracklet->getISeed() << endl;
1456  fout.close();
1457  }
1458  trackletpars_->addTracklet(tracklet);
1459 
1460  int layer = outerFPGAStub->layer().value() + 1;
1461 
1462  if (layer == 2) {
1463  if (tracklet->validProj(1)) {
1464  addLayerProj(tracklet, 1);
1465  }
1466  }
1467 
1468  for (unsigned int disk = 2; disk < 6; disk++) {
1469  if (layer == 2 && disk == 5)
1470  continue;
1471  if (tracklet->validProjDisk(disk)) {
1472  addDiskProj(tracklet, disk);
1473  }
1474  }
1475 
1476  return true;
1477 }

References addDiskProj(), addLayerProj(), trklet::TrackletParametersMemory::addTracklet(), cms::cuda::assert(), trklet::VarBase::calculate(), trklet::Settings::debugTracklet(), trklet::IMATH_TrackletCalculatorOverlap::der_phiD_final, trklet::IMATH_TrackletCalculatorOverlap::der_phiL_final, trklet::IMATH_TrackletCalculatorOverlap::der_rD_final, trklet::IMATH_TrackletCalculatorOverlap::der_zL_final, trklet::Stub::disk(), exacttrackletOverlap(), Exception, groupFilesInBlocks::fout, trklet::VarBase::fval(), trklet::Tracklet::getISeed(), trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, goodTrackPars(), mps_fire::i, trklet::LayerProjection::init(), trklet::DiskProjection::init(), inSector(), trklet::Stub::isBarrel(), trklet::Stub::isDisk(), trklet::ProcessBase::iSector_, iSeed_, trklet::Globals::ITC_L1B1(), trklet::Globals::ITC_L1F1(), trklet::Globals::ITC_L2B1(), trklet::Globals::ITC_L2F1(), trklet::VarBase::ival(), trklet::VarBase::K(), trklet::Stub::layer(), phase1PixelTopology::layer, layerdisk1_, layerdisk2_, trklet::VarBase::local_passes(), angle0to2pi::make0To2pi(), trklet::N_DISK, trklet::N_LAYER, trklet::N_PSLAYER, trklet::ProcessBase::name_, trklet::Settings::nphibitsstub(), trklet::Settings::nrbitsstub(), trklet::TrackletParametersMemory::nTracklets(), trklet::Settings::nzbitsstub(), trklet::Globals::ofstream(), trklet::Stub::phi(), trklet::L1TStub::phi(), trklet::IMATH_TrackletCalculatorOverlap::phi0_final, trklet::IMATH_TrackletCalculatorOverlap::phi1, trklet::IMATH_TrackletCalculatorOverlap::phi2, trklet::Stub::phiapprox(), trklet::IMATH_TrackletCalculatorOverlap::phiD_0_final, trklet::IMATH_TrackletCalculatorOverlap::phiD_1_final, trklet::IMATH_TrackletCalculatorOverlap::phiD_2_final, trklet::IMATH_TrackletCalculatorOverlap::phiD_3_final, trklet::IMATH_TrackletCalculatorOverlap::phiL_0_final, trklet::IMATH_TrackletCalculatorOverlap::phiL_1_final, trklet::IMATH_TrackletCalculatorOverlap::phiL_2_final, trklet::ProcessBase::phimax_, trklet::ProcessBase::phimin_, trklet::Stub::r(), trklet::L1TStub::r(), diffTwoXMLs::r1, trklet::IMATH_TrackletCalculatorOverlap::r1, diffTwoXMLs::r2, trklet::IMATH_TrackletCalculatorOverlap::r2, trklet::Stub::rapprox(), trklet::IMATH_TrackletCalculatorOverlap::rD_0_final, trklet::IMATH_TrackletCalculatorOverlap::rD_1_final, trklet::IMATH_TrackletCalculatorOverlap::rD_2_final, trklet::IMATH_TrackletCalculatorOverlap::rD_3_final, trklet::rinv(), trklet::IMATH_TrackletCalculatorOverlap::rinv_final, trklet::Settings::rmaxdisk(), trklet::Settings::rmean(), trklet::IMATH_TrackletCalculatorOverlap::rproj0, trklet::IMATH_TrackletCalculatorOverlap::rproj1, trklet::IMATH_TrackletCalculatorOverlap::rproj2, trklet::VarDef::set_fval(), trklet::VarDef::set_ival(), trklet::Tracklet::setTCIndex(), trklet::ProcessBase::settings_, trklet::Tracklet::setTrackletIndex(), trklet::L1TStub::sigmaz(), submitPVValidationJobs::t, trklet::IMATH_TrackletCalculatorOverlap::t_final, TCIndex_, trackletpars_, trklet::Settings::useapprox(), trklet::Tracklet::validProj(), trklet::Tracklet::validProjDisk(), trklet::FPGAWord::value(), trklet::Settings::writeMonitorData(), trklet::Stub::z(), trklet::L1TStub::z(), HLTMuonOfflineAnalyzer_cfi::z0, trklet::IMATH_TrackletCalculatorOverlap::z0_final, trklet::IMATH_TrackletCalculatorOverlap::z1, testProducerWithPsetDescEmpty_cfi::z2, trklet::IMATH_TrackletCalculatorOverlap::z2, trklet::Stub::zapprox(), trklet::IMATH_TrackletCalculatorOverlap::zL_0_final, trklet::IMATH_TrackletCalculatorOverlap::zL_1_final, trklet::IMATH_TrackletCalculatorOverlap::zL_2_final, trklet::Settings::zmean(), trklet::IMATH_TrackletCalculatorOverlap::zproj0, trklet::IMATH_TrackletCalculatorOverlap::zproj1, trklet::IMATH_TrackletCalculatorOverlap::zproj2, and trklet::IMATH_TrackletCalculatorOverlap::zproj3.

Referenced by trklet::TrackletCalculator::execute(), and trklet::TrackletProcessor::execute().

Member Data Documentation

◆ iSeed_

unsigned int trklet::TrackletCalculatorBase::iSeed_
protected

◆ layerdisk1_

unsigned int trklet::TrackletCalculatorBase::layerdisk1_
protected

◆ layerdisk2_

unsigned int trklet::TrackletCalculatorBase::layerdisk2_
protected

◆ TCIndex_

int trklet::TrackletCalculatorBase::TCIndex_
protected

◆ trackletpars_

TrackletParametersMemory* trklet::TrackletCalculatorBase::trackletpars_
protected

◆ trackletprojdisks_

std::vector<std::vector<TrackletProjectionsMemory*> > trklet::TrackletCalculatorBase::trackletprojdisks_
protected

◆ trackletprojlayers_

std::vector<std::vector<TrackletProjectionsMemory*> > trklet::TrackletCalculatorBase::trackletprojlayers_
protected
trklet::VarBase::fval
double fval() const
Definition: imath.h:212
trklet::N_PSLAYER
constexpr unsigned int N_PSLAYER
Definition: Settings.h:21
trklet::IMATH_TrackletCalculatorDisk::zproj0
VarDef zproj0
Definition: IMATH_TrackletCalculatorDisk.h:155
trklet::IMATH_TrackletCalculatorDisk::der_phiD_final
VarAdjustK der_phiD_final
Definition: IMATH_TrackletCalculatorDisk.h:299
trklet::Settings::phicritmaxmc
double phicritmaxmc() const
Definition: Settings.h:265
trklet::IMATH_TrackletCalculator::rproj1
VarDef rproj1
Definition: IMATH_TrackletCalculator.h:165
trklet::IMATH_TrackletCalculator::r1
VarDef r1
Definition: IMATH_TrackletCalculator.h:155
trklet::TrackletCalculatorBase::iSeed_
unsigned int iSeed_
Definition: TrackletCalculatorBase.h:128
trklet::Settings::rmindisk
double rmindisk() const
Definition: Settings.h:113
trklet::IMATH_TrackletCalculator::rD_0_final
VarAdjustK rD_0_final
Definition: IMATH_TrackletCalculator.h:374
trklet::Settings::rmindiskvm
double rmindiskvm() const
Definition: Settings.h:281
mps_fire.i
i
Definition: mps_fire.py:428
trklet::Globals::ITC_L2L3
IMATH_TrackletCalculator * ITC_L2L3()
Definition: Globals.h:53
trklet::IMATH_TrackletCalculator::rD_3_final
VarAdjustK rD_3_final
Definition: IMATH_TrackletCalculator.h:377
trklet::TrackletCalculatorBase::addProjectionDisk
void addProjectionDisk(int disk, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
Definition: TrackletCalculatorBase.cc:270
trklet::IMATH_TrackletCalculatorOverlap::zL_0_final
VarAdjustK zL_0_final
Definition: IMATH_TrackletCalculatorOverlap.h:271
trklet::IMATH_TrackletCalculatorOverlap::rD_0_final
VarAdjustK rD_0_final
Definition: IMATH_TrackletCalculatorOverlap.h:340
trklet::TrackletCalculatorBase::trackletpars_
TrackletParametersMemory * trackletpars_
Definition: TrackletCalculatorBase.h:134
trklet::IMATH_TrackletCalculator::z1
VarDef z1
Definition: IMATH_TrackletCalculator.h:157
trklet::Settings::krprojshiftdisk
double krprojshiftdisk() const
Definition: Settings.h:364
trklet::IMATH_TrackletCalculatorOverlap::zproj1
VarDef zproj1
Definition: IMATH_TrackletCalculatorOverlap.h:161
trklet::Tracklet::fpgaphiprojdisk
const FPGAWord & fpgaphiprojdisk(int disk) const
Definition: Tracklet.h:266
trklet::TrackletParametersMemory::addTracklet
void addTracklet(Tracklet *tracklet)
Definition: TrackletParametersMemory.h:23
trklet::Stub::phi
const FPGAWord & phi() const
Definition: Stub.h:51
trklet::Settings::krinvpars
double krinvpars() const
Definition: Settings.h:350
trklet::IMATH_TrackletCalculatorDisk::zL_0_final
VarAdjustK zL_0_final
Definition: IMATH_TrackletCalculatorDisk.h:265
trklet::IMATH_TrackletCalculatorOverlap::phiD_3_final
VarAdjustK phiD_3_final
Definition: IMATH_TrackletCalculatorOverlap.h:306
trklet::LayerProjection::init
void init(Settings const &settings, int projlayer, double rproj, int iphiproj, int izproj, int iphider, int izder, double phiproj, double zproj, double phiprojder, double zprojder, double phiprojapprox, double zprojapprox, double phiprojderapprox, double zprojderapprox, bool isPSseed=false)
Definition: LayerProjection.cc:9
trklet::IMATH_TrackletCalculatorDisk::t_final
VarAdjustK t_final
Definition: IMATH_TrackletCalculatorDisk.h:203
trklet::IMATH_TrackletCalculatorDisk::phi2
VarDef phi2
Definition: IMATH_TrackletCalculatorDisk.h:149
trklet::Settings::phicritminmc
double phicritminmc() const
Definition: Settings.h:264
trklet::IMATH_TrackletCalculatorOverlap::z1
VarDef z1
Definition: IMATH_TrackletCalculatorOverlap.h:150
trklet::VarBase::calculate
bool calculate(int debug_level)
Definition: imath_calculate.cc:6
trklet::IMATH_TrackletCalculator::zL_2_final
VarAdjustKR zL_2_final
Definition: IMATH_TrackletCalculator.h:295
trklet::L1TStub::z
double z() const
Definition: L1TStub.h:56
trklet::IMATH_TrackletCalculatorOverlap::rD_3_final
VarAdjustK rD_3_final
Definition: IMATH_TrackletCalculatorOverlap.h:343
trklet::IMATH_TrackletCalculatorOverlap::rD_1_final
VarAdjustK rD_1_final
Definition: IMATH_TrackletCalculatorOverlap.h:341
trklet::Tracklet::getISeed
int getISeed() const
Definition: Tracklet.cc:849
trklet::IMATH_TrackletCalculatorOverlap::der_zL_final
VarAdjustK der_zL_final
Definition: IMATH_TrackletCalculatorOverlap.h:275
trklet::IMATH_TrackletCalculatorDisk::phi1
VarDef phi1
Definition: IMATH_TrackletCalculatorDisk.h:148
trklet::IMATH_TrackletCalculator::zL_1_final
VarAdjustKR zL_1_final
Definition: IMATH_TrackletCalculator.h:294
cms::cuda::assert
assert(be >=bs)
trklet::TrackletCalculatorBase::addProjection
void addProjection(int layer, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
Definition: TrackletCalculatorBase.cc:255
trklet::IMATH_TrackletCalculator::phiD_0_final
VarAdjustK phiD_0_final
Definition: IMATH_TrackletCalculator.h:331
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
trklet::Settings::rmean
double rmean(unsigned int iLayer) const
Definition: Settings.h:143
trklet::IMATH_TrackletCalculatorDisk::rD_2_final
VarAdjustK rD_2_final
Definition: IMATH_TrackletCalculatorDisk.h:326
trklet::IMATH_TrackletCalculatorDisk
Definition: IMATH_TrackletCalculatorDisk.h:19
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:20
trklet::IMATH_TrackletCalculatorDisk::rD_0_final
VarAdjustK rD_0_final
Definition: IMATH_TrackletCalculatorDisk.h:324
trklet::ProcessBase::settings_
Settings const & settings_
Definition: ProcessBase.h:44
compare.hists
hists
Definition: compare.py:319
trklet::Stub::phiapprox
double phiapprox(double phimin, double) const
Definition: Stub.cc:242
trklet::IMATH_TrackletCalculatorDisk::z2
VarDef z2
Definition: IMATH_TrackletCalculatorDisk.h:146
trklet::FPGAWord::nbits
int nbits() const
Definition: FPGAWord.h:25
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
trklet::Globals::ITC_B1B2
IMATH_TrackletCalculatorDisk * ITC_B1B2()
Definition: Globals.h:59
trklet::IMATH_TrackletCalculatorDisk::phi0_final
VarAdjustK phi0_final
Definition: IMATH_TrackletCalculatorDisk.h:202
trklet::TrackletCalculatorBase::trackletprojlayers_
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojlayers_
Definition: TrackletCalculatorBase.h:137
trklet::Tracklet::validProj
bool validProj(int layer) const
Definition: Tracklet.h:89
trklet::Stub::isBarrel
bool isBarrel() const
Definition: Stub.h:60
trklet::Stub::r
const FPGAWord & r() const
Definition: Stub.h:49
trklet::LayerProjection
Definition: LayerProjection.h:10
trklet::Settings::bookHistos
bool bookHistos() const
Definition: Settings.h:184
trklet::Tracklet::tpseed
int tpseed()
Definition: Tracklet.cc:120
trklet::Settings::nrbitsstub
unsigned int nrbitsstub(unsigned int layerdisk) const
Definition: Settings.h:71
trklet::HistBase
Definition: HistBase.h:16
trklet::Tracklet
Definition: Tracklet.h:28
trklet::IMATH_TrackletCalculatorOverlap::rinv_final
VarAdjustK rinv_final
Definition: IMATH_TrackletCalculatorOverlap.h:206
trklet::IMATH_TrackletCalculator::rproj0
VarDef rproj0
Definition: IMATH_TrackletCalculator.h:164
trklet::IMATH_TrackletCalculatorOverlap::r1
VarDef r1
Definition: IMATH_TrackletCalculatorOverlap.h:148
trklet::IMATH_TrackletCalculatorDisk::r2
VarDef r2
Definition: IMATH_TrackletCalculatorDisk.h:144
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
trklet::Globals::ITC_L1F1
IMATH_TrackletCalculatorOverlap * ITC_L1F1()
Definition: Globals.h:62
trklet::IMATH_TrackletCalculator::phiL_0_final
VarAdjustK phiL_0_final
Definition: IMATH_TrackletCalculator.h:268
trklet::IMATH_TrackletCalculatorOverlap::phiD_1_final
VarAdjustK phiD_1_final
Definition: IMATH_TrackletCalculatorOverlap.h:304
trklet::Globals::ITC_L2B1
IMATH_TrackletCalculatorOverlap * ITC_L2B1()
Definition: Globals.h:65
trklet::IMATH_TrackletCalculatorDisk::der_rD_final
VarAdjustK der_rD_final
Definition: IMATH_TrackletCalculatorDisk.h:328
trklet::IMATH_TrackletCalculatorOverlap::phiD_0_final
VarAdjustK phiD_0_final
Definition: IMATH_TrackletCalculatorOverlap.h:303
trklet::IMATH_TrackletCalculatorOverlap::zL_2_final
VarAdjustK zL_2_final
Definition: IMATH_TrackletCalculatorOverlap.h:273
trklet::IMATH_TrackletCalculatorDisk::zL_1_final
VarAdjustK zL_1_final
Definition: IMATH_TrackletCalculatorDisk.h:266
trklet::VarDef::set_ival
void set_ival(int ival)
Definition: imath.h:501
trklet::Tracklet::fpgazproj
const FPGAWord & fpgazproj(int layer) const
Definition: Tracklet.h:99
trklet::Settings::projdisks
unsigned int projdisks(unsigned int iSeed, unsigned int i) const
Definition: Settings.h:135
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
trklet::Stub::disk
const FPGAWord & disk() const
Definition: Stub.h:57
trklet::Stub::z
const FPGAWord & z() const
Definition: Stub.h:50
trklet::L1TStub::isPSmodule
unsigned int isPSmodule() const
Definition: L1TStub.h:93
trklet::IMATH_TrackletCalculatorOverlap
Definition: IMATH_TrackletCalculatorOverlap.h:19
trklet::IMATH_TrackletCalculatorDisk::zproj1
VarDef zproj1
Definition: IMATH_TrackletCalculatorDisk.h:156
trklet::IMATH_TrackletCalculator::t_final
VarAdjustKR t_final
Definition: IMATH_TrackletCalculator.h:219
trklet::IMATH_TrackletCalculatorOverlap::phiL_1_final
VarAdjustK phiL_1_final
Definition: IMATH_TrackletCalculatorOverlap.h:251
trklet::IMATH_TrackletCalculatorOverlap::rproj1
VarDef rproj1
Definition: IMATH_TrackletCalculatorOverlap.h:157
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
trklet::IMATH_TrackletCalculator::zL_3_final
VarAdjustKR zL_3_final
Definition: IMATH_TrackletCalculator.h:296
trklet::Globals::ITC_F3F4
IMATH_TrackletCalculatorDisk * ITC_F3F4()
Definition: Globals.h:58
trklet::IMATH_TrackletCalculatorDisk::zproj2
VarDef zproj2
Definition: IMATH_TrackletCalculatorDisk.h:157
trklet::DiskProjection
Definition: DiskProjection.h:12
trklet::TrackletCalculatorBase::exactproj
void exactproj(double rproj, double rinv, double phi0, double t, double z0, double &phiproj, double &zproj, double &phider, double &zder)
Definition: TrackletCalculatorBase.cc:177
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
trklet::IMATH_TrackletCalculatorOverlap::der_phiL_final
VarAdjustK der_phiL_final
Definition: IMATH_TrackletCalculatorOverlap.h:254
trklet::IMATH_TrackletCalculator::z2
VarDef z2
Definition: IMATH_TrackletCalculator.h:158
trklet::Settings::zmean
double zmean(unsigned int iDisk) const
Definition: Settings.h:146
trklet::IMATH_TrackletCalculator::phiL_3_final
VarAdjustK phiL_3_final
Definition: IMATH_TrackletCalculator.h:271
trklet::IMATH_TrackletCalculatorOverlap::zL_1_final
VarAdjustK zL_1_final
Definition: IMATH_TrackletCalculatorOverlap.h:272
trklet::TrackletCalculatorBase::addDiskProj
void addDiskProj(Tracklet *tracklet, int disk)
Definition: TrackletCalculatorBase.cc:213
trklet::IMATH_TrackletCalculator::rD_1_final
VarAdjustK rD_1_final
Definition: IMATH_TrackletCalculator.h:375
trklet::IMATH_TrackletCalculator::der_phiD_final
VarAdjustK der_phiD_final
Definition: IMATH_TrackletCalculator.h:339
trklet::IMATH_TrackletCalculatorDisk::zL_2_final
VarAdjustK zL_2_final
Definition: IMATH_TrackletCalculatorDisk.h:267
trklet::IMATH_TrackletCalculatorOverlap::z0_final
VarAdjustK z0_final
Definition: IMATH_TrackletCalculatorOverlap.h:210
trklet::IMATH_TrackletCalculatorDisk::phiD_2_final
VarAdjustK phiD_2_final
Definition: IMATH_TrackletCalculatorDisk.h:295
trklet::TrackletCalculatorBase::addLayerProj
bool addLayerProj(Tracklet *tracklet, int layer)
Definition: TrackletCalculatorBase.cc:230
trklet::Stub::isDisk
bool isDisk() const
Definition: Stub.h:61
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
trklet::IMATH_TrackletCalculatorDisk::phiD_0_final
VarAdjustK phiD_0_final
Definition: IMATH_TrackletCalculatorDisk.h:293
trklet::IMATH_TrackletCalculatorDisk::der_zL_final
VarAdjustK der_zL_final
Definition: IMATH_TrackletCalculatorDisk.h:269
trklet::IMATH_TrackletCalculatorOverlap::zproj0
VarDef zproj0
Definition: IMATH_TrackletCalculatorOverlap.h:160
trklet::IMATH_TrackletCalculator::phiD_4_final
VarAdjustK phiD_4_final
Definition: IMATH_TrackletCalculator.h:335
trklet::VarBase::local_passes
bool local_passes() const
Definition: imath.cc:315
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
trklet::Settings::warnNoMem
bool warnNoMem() const
Definition: Settings.h:164
trklet::IMATH_TrackletCalculatorOverlap::phiD_2_final
VarAdjustK phiD_2_final
Definition: IMATH_TrackletCalculatorOverlap.h:305
trklet::Settings::rmaxdisk
double rmaxdisk() const
Definition: Settings.h:112
trklet::IMATH_TrackletCalculatorOverlap::zproj2
VarDef zproj2
Definition: IMATH_TrackletCalculatorOverlap.h:162
trklet::Tracklet::setTrackletIndex
void setTrackletIndex(unsigned int index)
Definition: Tracklet.cc:844
trklet::TrackletCalculatorBase::exacttracklet
void exacttracklet(double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiproj[N_LAYER - 2], double zproj[N_LAYER - 2], double phider[N_LAYER - 2], double zder[N_LAYER - 2], double phiprojdisk[N_DISK], double rprojdisk[N_DISK], double phiderdisk[N_DISK], double rderdisk[N_DISK])
Definition: TrackletCalculatorBase.cc:23
trklet::FPGAWord::atExtreme
bool atExtreme() const
Definition: FPGAWord.cc:79
trklet::Settings::kphi0pars
double kphi0pars() const
Definition: Settings.h:354
trklet::IMATH_TrackletCalculator::zL_0_final
VarAdjustKR zL_0_final
Definition: IMATH_TrackletCalculator.h:293
trklet::IMATH_TrackletCalculatorOverlap::z2
VarDef z2
Definition: IMATH_TrackletCalculatorOverlap.h:151
trklet::TrackletCalculatorBase::layerdisk1_
unsigned int layerdisk1_
Definition: TrackletCalculatorBase.h:129
trklet::rinv
double rinv(double phi1, double phi2, double r1, double r2)
Definition: Util.h:173
trklet::IMATH_TrackletCalculator::z0_final
VarAdjustKR z0_final
Definition: IMATH_TrackletCalculator.h:220
trklet::TrackletCalculatorBase::layerdisk2_
unsigned int layerdisk2_
Definition: TrackletCalculatorBase.h:130
trklet::IMATH_TrackletCalculator::zproj0
VarDef zproj0
Definition: IMATH_TrackletCalculator.h:169
trklet::VarBase::K
double K() const
Definition: imath.h:246
trklet::IMATH_TrackletCalculatorDisk::rproj0
VarDef rproj0
Definition: IMATH_TrackletCalculatorDisk.h:151
trklet::IMATH_TrackletCalculator::phi1
VarDef phi1
Definition: IMATH_TrackletCalculator.h:161
trklet::IMATH_TrackletCalculatorDisk::z0_final
VarAdjustK z0_final
Definition: IMATH_TrackletCalculatorDisk.h:204
trklet::IMATH_TrackletCalculatorOverlap::rproj2
VarDef rproj2
Definition: IMATH_TrackletCalculatorOverlap.h:158
trklet::IMATH_TrackletCalculatorDisk::phiD_1_final
VarAdjustK phiD_1_final
Definition: IMATH_TrackletCalculatorDisk.h:294
trklet::Globals::ITC_L1L2
IMATH_TrackletCalculator * ITC_L1L2()
Definition: Globals.h:52
trklet::IMATH_TrackletCalculatorOverlap::zproj3
VarDef zproj3
Definition: IMATH_TrackletCalculatorOverlap.h:163
trklet::Settings::projlayers
unsigned int projlayers(unsigned int iSeed, unsigned int i) const
Definition: Settings.h:134
trklet::IMATH_TrackletCalculatorDisk::rD_1_final
VarAdjustK rD_1_final
Definition: IMATH_TrackletCalculatorDisk.h:325
trklet::Settings::nzbitsstub
unsigned int nzbitsstub(unsigned int layerdisk) const
Definition: Settings.h:69
trklet::IMATH_TrackletCalculator::phiL_1_final
VarAdjustK phiL_1_final
Definition: IMATH_TrackletCalculator.h:269
trklet::IMATH_TrackletCalculator::phi0_final
VarAdjustK phi0_final
Definition: IMATH_TrackletCalculator.h:218
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
trklet::Stub::rapprox
double rapprox() const
Definition: Stub.cc:209
trklet::TrackletCalculatorBase::trackletprojdisks_
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
Definition: TrackletCalculatorBase.h:138
trklet::IMATH_TrackletCalculator::phi2
VarDef phi2
Definition: IMATH_TrackletCalculator.h:162
trklet::Settings::nphibitsstub
unsigned int nphibitsstub(unsigned int layerdisk) const
Definition: Settings.h:70
trklet::IMATH_TrackletCalculatorDisk::rinv_final
VarAdjustK rinv_final
Definition: IMATH_TrackletCalculatorDisk.h:200
trklet::IMATH_TrackletCalculator::phiD_3_final
VarAdjustK phiD_3_final
Definition: IMATH_TrackletCalculator.h:334
trklet::IMATH_TrackletCalculatorDisk::r1
VarDef r1
Definition: IMATH_TrackletCalculatorDisk.h:143
trklet::IMATH_TrackletCalculator::rD_4_final
VarAdjustK rD_4_final
Definition: IMATH_TrackletCalculator.h:378
trklet::IMATH_TrackletCalculator::rD_2_final
VarAdjustK rD_2_final
Definition: IMATH_TrackletCalculator.h:376
trklet::Globals::ITC_F1F2
IMATH_TrackletCalculatorDisk * ITC_F1F2()
Definition: Globals.h:57
trklet::IMATH_TrackletCalculatorOverlap::rD_2_final
VarAdjustK rD_2_final
Definition: IMATH_TrackletCalculatorOverlap.h:342
trklet::IMATH_TrackletCalculatorOverlap::phiL_2_final
VarAdjustK phiL_2_final
Definition: IMATH_TrackletCalculatorOverlap.h:252
trklet::IMATH_TrackletCalculatorDisk::der_phiL_final
VarAdjustK der_phiL_final
Definition: IMATH_TrackletCalculatorDisk.h:248
trklet::VarBase::ival
long int ival() const
Definition: imath.h:213
trklet::IMATH_TrackletCalculatorDisk::rproj2
VarDef rproj2
Definition: IMATH_TrackletCalculatorDisk.h:153
trklet::IMATH_TrackletCalculatorOverlap::r2
VarDef r2
Definition: IMATH_TrackletCalculatorOverlap.h:149
trklet::TrackletCalculatorBase::exacttrackletOverlap
void exacttrackletOverlap(double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiprojLayer[N_PSLAYER], double zprojLayer[N_PSLAYER], double phiderLayer[N_PSLAYER], double zderLayer[N_PSLAYER], double phiproj[N_DISK - 2], double rproj[N_DISK - 2], double phider[N_DISK - 2], double rder[N_DISK - 2])
Definition: TrackletCalculatorBase.cc:129
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
trklet::IMATH_TrackletCalculator::phiD_1_final
VarAdjustK phiD_1_final
Definition: IMATH_TrackletCalculator.h:332
trklet::Globals::ITC_L5L6
IMATH_TrackletCalculator * ITC_L5L6()
Definition: Globals.h:55
trklet::Globals::ITC_B3B4
IMATH_TrackletCalculatorDisk * ITC_B3B4()
Definition: Globals.h:60
trklet::IMATH_TrackletCalculator::zproj1
VarDef zproj1
Definition: IMATH_TrackletCalculator.h:170
angle0to2pi::make0To2pi
constexpr valType make0To2pi(valType angle)
Definition: deltaPhi.h:67
trklet::IMATH_TrackletCalculatorDisk::z1
VarDef z1
Definition: IMATH_TrackletCalculatorDisk.h:145
trklet::VarDef::set_fval
void set_fval(double fval)
Definition: imath.h:493
trklet::IMATH_TrackletCalculator::der_zL_final
VarAdjustK der_zL_final
Definition: IMATH_TrackletCalculator.h:298
trklet::IMATH_TrackletCalculator::rinv_final
VarAdjustK rinv_final
Definition: IMATH_TrackletCalculator.h:216
trklet::Settings::writeMonitorData
bool writeMonitorData(std::string module) const
Definition: Settings.h:96
trklet::TrackletCalculatorBase::TCIndex_
int TCIndex_
Definition: TrackletCalculatorBase.h:132
trklet::IMATH_TrackletCalculatorOverlap::rproj0
VarDef rproj0
Definition: IMATH_TrackletCalculatorOverlap.h:156
trklet::Settings::usephicritapprox
bool usephicritapprox() const
Definition: Settings.h:212
trklet::TrackletParametersMemory::nTracklets
unsigned int nTracklets() const
Definition: TrackletParametersMemory.h:25
trklet::Tracklet::setTCIndex
void setTCIndex(int index)
Definition: Tracklet.h:496
trklet::IMATH_TrackletCalculator::zproj3
VarDef zproj3
Definition: IMATH_TrackletCalculator.h:172
trklet::Globals::ITC_L1B1
IMATH_TrackletCalculatorOverlap * ITC_L1B1()
Definition: Globals.h:63
trklet::IMATH_TrackletCalculatorDisk::phiL_0_final
VarAdjustK phiL_0_final
Definition: IMATH_TrackletCalculatorDisk.h:244
trklet::Globals::ofstream
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
trklet::TrackletProjectionsMemory::addProj
void addProj(Tracklet *tracklet)
Definition: TrackletProjectionsMemory.cc:17
trklet::IMATH_TrackletCalculator::zproj2
VarDef zproj2
Definition: IMATH_TrackletCalculator.h:171
trklet::IMATH_TrackletCalculator::phiL_2_final
VarAdjustK phiL_2_final
Definition: IMATH_TrackletCalculator.h:270
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
trklet::IMATH_TrackletCalculator::zproj4
VarDef zproj4
Definition: IMATH_TrackletCalculator.h:173
trklet::Settings::useapprox
bool useapprox() const
Definition: Settings.h:211
Exception
Definition: hltDiff.cc:245
trklet::TrackletCalculatorBase::inSector
bool inSector(int iphi0, int irinv, double phi0approx, double rinvapprox)
Definition: TrackletCalculatorBase.cc:306
trklet::ProcessBase::getName
std::string const & getName() const
Definition: ProcessBase.h:22
trklet::IMATH_TrackletCalculator::r2
VarDef r2
Definition: IMATH_TrackletCalculator.h:156
trklet::Tracklet::fpgaphiproj
const FPGAWord & fpgaphiproj(int layer) const
Definition: Tracklet.h:104
trklet::Settings::kz
double kz() const
Definition: Settings.h:270
trklet::ProcessBase::name_
std::string name_
Definition: ProcessBase.h:38
trklet::IMATH_TrackletCalculatorOverlap::t_final
VarAdjustK t_final
Definition: IMATH_TrackletCalculatorOverlap.h:209
trklet::Settings::nallstubs
unsigned int nallstubs(unsigned int layerdisk) const
Definition: Settings.h:94
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::ProcessBase::iSector_
unsigned int iSector_
Definition: ProcessBase.h:39
trklet::Settings::debugTracklet
bool debugTracklet() const
Definition: Settings.h:161
trklet::IMATH_TrackletCalculator::rproj3
VarDef rproj3
Definition: IMATH_TrackletCalculator.h:167
trklet::Settings::rcrit
double rcrit() const
Definition: Settings.h:257
trklet::Globals::ITC_L3L4
IMATH_TrackletCalculator * ITC_L3L4()
Definition: Globals.h:54
trklet::IMATH_TrackletCalculator
Definition: IMATH_TrackletCalculator.h:20
trklet::IMATH_TrackletCalculatorOverlap::phi0_final
VarAdjustK phi0_final
Definition: IMATH_TrackletCalculatorOverlap.h:208
trklet::IMATH_TrackletCalculatorOverlap::phi1
VarDef phi1
Definition: IMATH_TrackletCalculatorOverlap.h:153
trklet::TrackletCalculatorBase::exactprojdisk
void exactprojdisk(double zproj, double rinv, double phi0, double t, double z0, double &phiproj, double &rproj, double &phider, double &rder)
Definition: TrackletCalculatorBase.cc:193
trklet::Tracklet::fpgarprojdisk
const FPGAWord & fpgarprojdisk(int disk) const
Definition: Tracklet.h:276
trklet::L1TStub::sigmaz
double sigmaz() const
Definition: L1TStub.h:71
trklet::L1TStub::r
double r() const
Definition: L1TStub.h:57
trklet::IMATH_TrackletCalculatorOverlap::phiL_0_final
VarAdjustK phiL_0_final
Definition: IMATH_TrackletCalculatorOverlap.h:250
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
trklet::Globals::ITC_L2F1
IMATH_TrackletCalculatorOverlap * ITC_L2F1()
Definition: Globals.h:64
trklet::ProcessBase::phimin_
double phimin_
Definition: ProcessBase.h:41
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trklet::IMATH_TrackletCalculator::rproj2
VarDef rproj2
Definition: IMATH_TrackletCalculator.h:166
trklet::IMATH_TrackletCalculator::phiD_2_final
VarAdjustK phiD_2_final
Definition: IMATH_TrackletCalculator.h:333
trklet::IMATH_TrackletCalculator::der_phiL_final
VarAdjustK der_phiL_final
Definition: IMATH_TrackletCalculator.h:273
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
trklet::Stub::layer
const FPGAWord & layer() const
Definition: Stub.h:56
trklet::Tracklet::validProjDisk
bool validProjDisk(int disk) const
Definition: Tracklet.h:206
trklet::TrackletCalculatorBase::exacttrackletdisk
void exacttrackletdisk(double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiprojLayer[N_PSLAYER], double zprojLayer[N_PSLAYER], double phiderLayer[N_PSLAYER], double zderLayer[N_PSLAYER], double phiproj[N_DISK - 2], double rproj[N_DISK - 2], double phider[N_DISK - 2], double rder[N_DISK - 2])
Definition: TrackletCalculatorBase.cc:76
trklet::Globals::histograms
HistBase *& histograms()
Definition: Globals.h:40
trklet::IMATH_TrackletCalculatorDisk::rproj1
VarDef rproj1
Definition: IMATH_TrackletCalculatorDisk.h:152
trklet::IMATH_TrackletCalculatorOverlap::der_rD_final
VarAdjustK der_rD_final
Definition: IMATH_TrackletCalculatorOverlap.h:345
trklet::ProcessBase::globals_
Globals * globals_
Definition: ProcessBase.h:45
trklet::ProcessBase::ProcessBase
ProcessBase(std::string name, Settings const &settings, Globals *global, unsigned int iSector)
Definition: ProcessBase.cc:14
trklet::IMATH_TrackletCalculatorDisk::phiL_1_final
VarAdjustK phiL_1_final
Definition: IMATH_TrackletCalculatorDisk.h:245
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::Log
Definition: MessageLogger.h:70
trklet::IMATH_TrackletCalculator::der_rD_final
VarAdjustK der_rD_final
Definition: IMATH_TrackletCalculator.h:380
trklet::ProcessBase::phimax_
double phimax_
Definition: ProcessBase.h:42
keep
const int keep
Definition: GenParticlePruner.cc:48
trklet::Stub::zapprox
double zapprox() const
Definition: Stub.cc:223
trklet::IMATH_TrackletCalculatorOverlap::phi2
VarDef phi2
Definition: IMATH_TrackletCalculatorOverlap.h:154
trklet::L1TStub::phi
double phi() const
Definition: L1TStub.h:62
trklet::IMATH_TrackletCalculatorOverlap::der_phiD_final
VarAdjustK der_phiD_final
Definition: IMATH_TrackletCalculatorOverlap.h:310
trklet::TrackletCalculatorBase::goodTrackPars
bool goodTrackPars(bool goodrinv, bool goodz0)
Definition: TrackletCalculatorBase.cc:289
trklet::IMATH_TrackletCalculatorDisk::phiL_2_final
VarAdjustK phiL_2_final
Definition: IMATH_TrackletCalculatorDisk.h:246
reco::reduceRange
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18
trklet::Settings::zlength
double zlength() const
Definition: Settings.h:111
trklet::DiskProjection::init
void init(Settings const &settings, int projdisk, double zproj, int iphiproj, int irproj, int iphider, int irder, double phiproj, double rproj, double phiprojder, double rprojder, double phiprojapprox, double rprojapprox, double phiprojderapprox, double rprojderapprox)
Definition: DiskProjection.cc:12