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)
 
 ~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)
 
virtual ~ProcessBase ()=default
 

Protected Attributes

unsigned int iSector_
 
unsigned int iSeed_
 
unsigned int layerdisk1_
 
unsigned int layerdisk2_
 
double phimax_
 
double phimin_
 
int TCIndex_
 
TrackletParametersMemorytrackletpars_
 
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
 
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojlayers_
 
- Protected Attributes inherited from trklet::ProcessBase
Globalsglobals_
 
std::string name_
 
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 
)

Definition at line 17 of file TrackletCalculatorBase.cc.

18  : ProcessBase(name, settings, global) {}

◆ ~TrackletCalculatorBase()

trklet::TrackletCalculatorBase::~TrackletCalculatorBase ( )
overridedefault

Member Function Documentation

◆ addDiskProj()

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

Definition at line 210 of file TrackletCalculatorBase.cc.

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

References funct::abs(), addProjectionDisk(), trklet::Projection::fpgaphiproj(), trklet::Projection::fpgarzproj(), LEDCalibrationChannels::iphi, trklet::Settings::krprojshiftdisk(), trklet::N_LAYER, trklet::Settings::nallstubs(), trklet::FPGAWord::nbits(), trklet::Tracklet::proj(), 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 229 of file TrackletCalculatorBase.cc.

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

References funct::abs(), addProjection(), cms::cuda::assert(), trklet::FPGAWord::atExtreme(), trklet::Projection::fpgaphiproj(), trklet::Projection::fpgarzproj(), LEDCalibrationChannels::iphi, trklet::Settings::kz(), phase1PixelTopology::layer, trklet::Settings::nallstubs(), trklet::FPGAWord::nbits(), trklet::Tracklet::proj(), 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 254 of file TrackletCalculatorBase.cc.

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

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 269 of file TrackletCalculatorBase.cc.

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

References funct::abs(), trklet::TrackletProjectionsMemory::addProj(), cms::cuda::assert(), trklet::ProcessBase::getName(), LEDCalibrationChannels::iphi, iSeed_, trklet::L3L4, 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 330 of file TrackletCalculatorBase.cc.

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

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::Projection::init(), inSector(), 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(), trklet::Stub::layerdisk(), 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, phimax_, phimin_, trklet::Settings::projlayers(), trklet::L1TStub::r(), trklet::Stub::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::FPGAWord::value(), trklet::Settings::writeMonitorData(), trklet::L1TStub::z(), trklet::Stub::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 756 of file TrackletCalculatorBase.cc.

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

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::Projection::init(), inSector(), 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, phimax_, phimin_, trklet::Settings::projdisks(), trklet::L1TStub::r(), trklet::Stub::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::FPGAWord::value(), trklet::Settings::writeMonitorData(), trklet::L1TStub::z(), trklet::Stub::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 174 of file TrackletCalculatorBase.cc.

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

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 190 of file TrackletCalculatorBase.cc.

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

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 20 of file TrackletCalculatorBase.cc.

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

References funct::cos(), exactproj(), exactprojdisk(), mps_fire::i, iSeed_, trklet::N_DISK, trklet::N_LAYER, 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 73 of file TrackletCalculatorBase.cc.

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

References funct::cos(), exactproj(), exactprojdisk(), mps_fire::i, iSeed_, trklet::N_DISK, 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 126 of file TrackletCalculatorBase.cc.

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

References funct::cos(), exactproj(), exactprojdisk(), mps_fire::i, 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 288 of file TrackletCalculatorBase.cc.

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

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 305 of file TrackletCalculatorBase.cc.

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

References trklet::Settings::debugTracklet(), trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, trklet::Globals::ITC_L1L2(), trklet::VarBase::K(), runTheMatrix::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 1107 of file TrackletCalculatorBase.cc.

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

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::Projection::init(), inSector(), 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, trklet::Stub::layerdisk(), 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, phimax_, phimin_, trklet::L1TStub::r(), trklet::Stub::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::FPGAWord::value(), trklet::Settings::writeMonitorData(), trklet::L1TStub::z(), trklet::Stub::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

◆ iSector_

unsigned int trklet::TrackletCalculatorBase::iSector_
protected

◆ iSeed_

unsigned int trklet::TrackletCalculatorBase::iSeed_
protected

◆ layerdisk1_

unsigned int trklet::TrackletCalculatorBase::layerdisk1_
protected

◆ layerdisk2_

unsigned int trklet::TrackletCalculatorBase::layerdisk2_
protected

◆ phimax_

double trklet::TrackletCalculatorBase::phimax_
protected

◆ phimin_

double trklet::TrackletCalculatorBase::phimin_
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::ProcessBase::ProcessBase
ProcessBase(std::string name, Settings const &settings, Globals *global)
Definition: ProcessBase.cc:14
trklet::N_PSLAYER
constexpr unsigned int N_PSLAYER
Definition: Settings.h:23
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:296
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:126
trklet::IMATH_TrackletCalculator::rD_0_final
VarAdjustK rD_0_final
Definition: IMATH_TrackletCalculator.h:374
trklet::Settings::rmindiskvm
double rmindiskvm() const
Definition: Settings.h:315
mps_fire.i
i
Definition: mps_fire.py:428
trklet::Globals::ITC_L2L3
IMATH_TrackletCalculator * ITC_L2L3()
Definition: Globals.h:49
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:269
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:137
trklet::IMATH_TrackletCalculator::z1
VarDef z1
Definition: IMATH_TrackletCalculator.h:157
trklet::Settings::krprojshiftdisk
double krprojshiftdisk() const
Definition: Settings.h:400
trklet::IMATH_TrackletCalculatorOverlap::zproj1
VarDef zproj1
Definition: IMATH_TrackletCalculatorOverlap.h:161
trklet::TrackletParametersMemory::addTracklet
void addTracklet(Tracklet *tracklet)
Definition: TrackletParametersMemory.h:23
trklet::Stub::phi
const FPGAWord & phi() const
Definition: Stub.h:62
trklet::Settings::krinvpars
double krinvpars() const
Definition: Settings.h:384
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::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:295
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:57
trklet::IMATH_TrackletCalculatorOverlap::rD_3_final
VarAdjustK rD_3_final
Definition: IMATH_TrackletCalculatorOverlap.h:343
trklet::TrackletCalculatorBase::phimin_
double phimin_
Definition: TrackletCalculatorBase.h:135
trklet::IMATH_TrackletCalculatorOverlap::rD_1_final
VarAdjustK rD_1_final
Definition: IMATH_TrackletCalculatorOverlap.h:341
trklet::Tracklet::getISeed
int getISeed() const
Definition: Tracklet.cc:798
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:254
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:164
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:22
trklet::IMATH_TrackletCalculatorDisk::rD_0_final
VarAdjustK rD_0_final
Definition: IMATH_TrackletCalculatorDisk.h:324
trklet::ProcessBase::settings_
Settings const & settings_
Definition: ProcessBase.h:40
compare.hists
hists
Definition: compare.py:318
trklet::Stub::phiapprox
double phiapprox(double phimin, double) const
Definition: Stub.cc:177
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::L3L4
Definition: Settings.h:49
trklet::Globals::ITC_B1B2
IMATH_TrackletCalculatorDisk * ITC_B1B2()
Definition: Globals.h:55
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:140
trklet::Stub::r
const FPGAWord & r() const
Definition: Stub.h:60
trklet::Settings::bookHistos
bool bookHistos() const
Definition: Settings.h:207
trklet::Tracklet::tpseed
int tpseed()
Definition: Tracklet.cc:107
trklet::Settings::nrbitsstub
unsigned int nrbitsstub(unsigned int layerdisk) const
Definition: Settings.h:84
trklet::HistBase
Definition: HistBase.h:16
trklet::Tracklet
Definition: Tracklet.h:27
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
trklet::Projection::fpgaphiproj
const FPGAWord & fpgaphiproj() const
Definition: Projection.h:39
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
trklet::Projection
Definition: Projection.h:10
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
trklet::Globals::ITC_L1F1
IMATH_TrackletCalculatorOverlap * ITC_L1F1()
Definition: Globals.h:58
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:61
trklet::Tracklet::proj
Projection & proj(int layerdisk)
Definition: Tracklet.h:87
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::Settings::projdisks
unsigned int projdisks(unsigned int iSeed, unsigned int i) const
Definition: Settings.h:156
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
trklet::Stub::disk
const FPGAWord & disk() const
Definition: Stub.h:68
trklet::Stub::z
const FPGAWord & z() const
Definition: Stub.h:61
trklet::L1TStub::isPSmodule
unsigned int isPSmodule() const
Definition: L1TStub.h:94
trklet::Tracklet::validProj
bool validProj(int layerdisk) const
Definition: Tracklet.h:82
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::Projection::init
void init(Settings const &settings, unsigned int layerdisk, int iphiproj, int irzproj, int iphider, int irzder, double phiproj, double rzproj, double phiprojder, double rzprojder, double phiprojapprox, double rzprojapprox, double phiprojderapprox, double rzprojderapprox, bool isPSseed)
Definition: Projection.cc:11
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:54
trklet::IMATH_TrackletCalculatorDisk::zproj2
VarDef zproj2
Definition: IMATH_TrackletCalculatorDisk.h:157
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:174
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:21
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:114
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:167
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:210
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
runTheMatrix.keep
keep
Definition: runTheMatrix.py:345
trklet::TrackletCalculatorBase::addLayerProj
bool addLayerProj(Tracklet *tracklet, int layer)
Definition: TrackletCalculatorBase.cc:229
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::Stub::layerdisk
unsigned int layerdisk() const
Definition: Stub.cc:185
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:185
trklet::TrackletCalculatorBase::iSector_
unsigned int iSector_
Definition: TrackletCalculatorBase.h:134
trklet::IMATH_TrackletCalculatorOverlap::phiD_2_final
VarAdjustK phiD_2_final
Definition: IMATH_TrackletCalculatorOverlap.h:305
trklet::Settings::rmaxdisk
double rmaxdisk() const
Definition: Settings.h:125
trklet::IMATH_TrackletCalculatorOverlap::zproj2
VarDef zproj2
Definition: IMATH_TrackletCalculatorOverlap.h:162
trklet::Tracklet::setTrackletIndex
void setTrackletIndex(unsigned int index)
Definition: Tracklet.cc:793
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:20
trklet::FPGAWord::atExtreme
bool atExtreme() const
Definition: FPGAWord.cc:79
trklet::Settings::kphi0pars
double kphi0pars() const
Definition: Settings.h:388
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:49
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:48
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:155
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:82
trklet::TrackletCalculatorBase::phimax_
double phimax_
Definition: TrackletCalculatorBase.h:135
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:144
trklet::TrackletCalculatorBase::trackletprojdisks_
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
Definition: TrackletCalculatorBase.h:141
trklet::IMATH_TrackletCalculator::phi2
VarDef phi2
Definition: IMATH_TrackletCalculator.h:162
trklet::Settings::nphibitsstub
unsigned int nphibitsstub(unsigned int layerdisk) const
Definition: Settings.h:83
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::Projection::fpgarzproj
const FPGAWord & fpgarzproj() const
Definition: Projection.h:44
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:53
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:126
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:51
trklet::Globals::ITC_B3B4
IMATH_TrackletCalculatorDisk * ITC_B3B4()
Definition: Globals.h:56
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:109
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:235
trklet::TrackletParametersMemory::nTracklets
unsigned int nTracklets() const
Definition: TrackletParametersMemory.h:25
trklet::Tracklet::setTCIndex
void setTCIndex(int index)
Definition: Tracklet.h:208
trklet::IMATH_TrackletCalculator::zproj3
VarDef zproj3
Definition: IMATH_TrackletCalculator.h:172
trklet::Globals::ITC_L1B1
IMATH_TrackletCalculatorOverlap * ITC_L1B1()
Definition: Globals.h:59
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:234
Exception
Definition: hltDiff.cc:245
trklet::TrackletCalculatorBase::inSector
bool inSector(int iphi0, int irinv, double phi0approx, double rinvapprox)
Definition: TrackletCalculatorBase.cc:305
trklet::ProcessBase::getName
std::string const & getName() const
Definition: ProcessBase.h:22
trklet::IMATH_TrackletCalculator::r2
VarDef r2
Definition: IMATH_TrackletCalculator.h:156
trklet::Settings::kz
double kz() const
Definition: Settings.h:302
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:107
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::Settings::debugTracklet
bool debugTracklet() const
Definition: Settings.h:182
trklet::IMATH_TrackletCalculator::rproj3
VarDef rproj3
Definition: IMATH_TrackletCalculator.h:167
trklet::Settings::rcrit
double rcrit() const
Definition: Settings.h:288
trklet::Globals::ITC_L3L4
IMATH_TrackletCalculator * ITC_L3L4()
Definition: Globals.h:50
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:190
trklet::L1TStub::sigmaz
double sigmaz() const
Definition: L1TStub.h:72
trklet::L1TStub::r
double r() const
Definition: L1TStub.h:58
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:60
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:67
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:73
trklet::Globals::histograms
HistBase *& histograms()
Definition: Globals.h:38
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:41
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::Stub::zapprox
double zapprox() const
Definition: Stub.cc:158
trklet::IMATH_TrackletCalculatorOverlap::phi2
VarDef phi2
Definition: IMATH_TrackletCalculatorOverlap.h:154
trklet::L1TStub::phi
double phi() const
Definition: L1TStub.h:63
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:288
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:124