CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1MuDTAssignmentUnit Class Reference

#include <L1MuDTAssignmentUnit.h>

Inheritance diagram for L1MuDTAssignmentUnit:
L1AbstractProcessor

Public Member Functions

 L1MuDTAssignmentUnit (L1MuDTSectorProcessor &sp, int id)
 constructor More...
 
void PhiAU (const edm::EventSetup &c)
 assign phi More...
 
void PtAU (const edm::EventSetup &c)
 assign pt and charge More...
 
void QuaAU ()
 assign quality More...
 
void reset () override
 reset Assignment Unit More...
 
void run (const edm::EventSetup &c) override
 run Assignment Unit More...
 
void setPrecision ()
 set precision of phi and phib More...
 
 ~L1MuDTAssignmentUnit () override
 destructor More...
 
- Public Member Functions inherited from L1AbstractProcessor
virtual void run ()
 run processor logic More...
 
virtual void run ()
 run processor logic More...
 
virtual ~L1AbstractProcessor ()
 destructor More...
 
virtual ~L1AbstractProcessor ()
 destructor More...
 

Private Member Functions

int convertSector (int)
 convert sector Id to 8 bit code (= sector center) More...
 
int getCharge (PtAssMethod)
 determine charge More...
 
int getPtAddress (PtAssMethod, int bendcharge=0) const
 calculate bend angle More...
 
PtAssMethod getPtMethod () const
 determine pt assignment method More...
 
const L1MuDTTrackSegPhigetTSphi (int station) const
 get track segment from a given station More...
 
int phiDiff (int stat1, int stat2) const
 build difference of two phi values More...
 
void TSR ()
 Track Segment Router. More...
 

Private Attributes

L1MuDTAddressArray m_addArray
 
int m_id
 
PtAssMethod m_ptAssMethod
 
L1MuDTSectorProcessorm_sp
 
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
 
unsigned short nbit_phi
 
unsigned short nbit_phib
 
edm::ESHandle< L1MuDTPhiLutthePhiLUTs
 phi-assignment look-up tables More...
 
edm::ESHandle< L1MuDTPtaLutthePtaLUTs
 pt-assignment look-up tables More...
 

Detailed Description

Assignment Unit:

assigns pt, charge, phi and quality to a muon candidate found by the Track Assembler

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 50 of file L1MuDTAssignmentUnit.h.

Constructor & Destructor Documentation

◆ L1MuDTAssignmentUnit()

L1MuDTAssignmentUnit::L1MuDTAssignmentUnit ( L1MuDTSectorProcessor sp,
int  id 
)

constructor

Definition at line 57 of file L1MuDTAssignmentUnit.cc.

58  : m_sp(sp), m_id(id), m_addArray(), m_TSphi(), m_ptAssMethod(NODEF), nbit_phi(12), nbit_phib(10) {
59  m_TSphi.reserve(4); // a track candidate can consist of max 4 TS
60  reset();
61 
62  setPrecision();
63 }

References m_TSphi, reset(), and setPrecision().

◆ ~L1MuDTAssignmentUnit()

L1MuDTAssignmentUnit::~L1MuDTAssignmentUnit ( )
override

destructor

Definition at line 69 of file L1MuDTAssignmentUnit.cc.

69 {}

Member Function Documentation

◆ convertSector()

int L1MuDTAssignmentUnit::convertSector ( int  sector)
private

convert sector Id to 8 bit code (= sector center)

Definition at line 327 of file L1MuDTAssignmentUnit.cc.

327  {
328  // assert( sector >=0 && sector < 12 );
329  const int sectorvalues[12] = {0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132};
330 
331  return sectorvalues[sector];
332 }

Referenced by PhiAU().

◆ getCharge()

int L1MuDTAssignmentUnit::getCharge ( PtAssMethod  method)
private

determine charge

Definition at line 337 of file L1MuDTAssignmentUnit.cc.

337  {
338  int chargesign = 0;
339  switch (method) {
340  case PT12L: {
341  chargesign = -1;
342  break;
343  }
344  case PT12H: {
345  chargesign = -1;
346  break;
347  }
348  case PT13L: {
349  chargesign = -1;
350  break;
351  }
352  case PT13H: {
353  chargesign = -1;
354  break;
355  }
356  case PT14L: {
357  chargesign = -1;
358  break;
359  }
360  case PT14H: {
361  chargesign = -1;
362  break;
363  }
364  case PT23L: {
365  chargesign = -1;
366  break;
367  }
368  case PT23H: {
369  chargesign = -1;
370  break;
371  }
372  case PT24L: {
373  chargesign = -1;
374  break;
375  }
376  case PT24H: {
377  chargesign = -1;
378  break;
379  }
380  case PT34L: {
381  chargesign = 1;
382  break;
383  }
384  case PT34H: {
385  chargesign = 1;
386  break;
387  }
388  case PT12LO: {
389  chargesign = -1;
390  break;
391  }
392  case PT12HO: {
393  chargesign = -1;
394  break;
395  }
396  case PT13LO: {
397  chargesign = -1;
398  break;
399  }
400  case PT13HO: {
401  chargesign = -1;
402  break;
403  }
404  case PT14LO: {
405  chargesign = -1;
406  break;
407  }
408  case PT14HO: {
409  chargesign = -1;
410  break;
411  }
412  case PT23LO: {
413  chargesign = -1;
414  break;
415  }
416  case PT23HO: {
417  chargesign = -1;
418  break;
419  }
420  case PT24LO: {
421  chargesign = -1;
422  break;
423  }
424  case PT24HO: {
425  chargesign = -1;
426  break;
427  }
428  case PT34LO: {
429  chargesign = 1;
430  break;
431  }
432  case PT34HO: {
433  chargesign = 1;
434  break;
435  }
436  case PT15LO: {
437  chargesign = -1;
438  break;
439  }
440  case PT15HO: {
441  chargesign = -1;
442  break;
443  }
444  case PT25LO: {
445  chargesign = -1;
446  break;
447  }
448  case PT25HO: {
449  chargesign = -1;
450  break;
451  }
452  case NODEF: {
453  chargesign = 0;
454  // cerr << "AssignmentUnit::getCharge : undefined PtAssMethod!"
455  // << endl;
456  break;
457  }
458  }
459 
460  return chargesign;
461 }

References AlcaSiPixelAliHarvester0T_cff::method, NODEF, PT12H, PT12HO, PT12L, PT12LO, PT13H, PT13HO, PT13L, PT13LO, PT14H, PT14HO, PT14L, PT14LO, PT15HO, PT15LO, PT23H, PT23HO, PT23L, PT23LO, PT24H, PT24HO, PT24L, PT24LO, PT25HO, PT25LO, PT34H, PT34HO, PT34L, and PT34LO.

Referenced by PtAU().

◆ getPtAddress()

int L1MuDTAssignmentUnit::getPtAddress ( PtAssMethod  method,
int  bendcharge = 0 
) const
private

calculate bend angle

Definition at line 586 of file L1MuDTAssignmentUnit.cc.

586  {
587  // calculate bend angle as difference of two azimuthal positions
588 
589  int bendangle = 0;
590  switch (method) {
591  case PT12L: {
592  bendangle = phiDiff(1, 2);
593  break;
594  }
595  case PT12H: {
596  bendangle = phiDiff(1, 2);
597  break;
598  }
599  case PT13L: {
600  bendangle = phiDiff(1, 3);
601  break;
602  }
603  case PT13H: {
604  bendangle = phiDiff(1, 3);
605  break;
606  }
607  case PT14L: {
608  bendangle = phiDiff(1, 4);
609  break;
610  }
611  case PT14H: {
612  bendangle = phiDiff(1, 4);
613  break;
614  }
615  case PT23L: {
616  bendangle = phiDiff(2, 3);
617  break;
618  }
619  case PT23H: {
620  bendangle = phiDiff(2, 3);
621  break;
622  }
623  case PT24L: {
624  bendangle = phiDiff(2, 4);
625  break;
626  }
627  case PT24H: {
628  bendangle = phiDiff(2, 4);
629  break;
630  }
631  case PT34L: {
632  bendangle = phiDiff(4, 3);
633  break;
634  }
635  case PT34H: {
636  bendangle = phiDiff(4, 3);
637  break;
638  }
639  case PT12LO: {
640  bendangle = phiDiff(1, 2);
641  break;
642  }
643  case PT12HO: {
644  bendangle = phiDiff(1, 2);
645  break;
646  }
647  case PT13LO: {
648  bendangle = phiDiff(1, 3);
649  break;
650  }
651  case PT13HO: {
652  bendangle = phiDiff(1, 3);
653  break;
654  }
655  case PT14LO: {
656  bendangle = phiDiff(1, 4);
657  break;
658  }
659  case PT14HO: {
660  bendangle = phiDiff(1, 4);
661  break;
662  }
663  case PT23LO: {
664  bendangle = phiDiff(2, 3);
665  break;
666  }
667  case PT23HO: {
668  bendangle = phiDiff(2, 3);
669  break;
670  }
671  case PT24LO: {
672  bendangle = phiDiff(2, 4);
673  break;
674  }
675  case PT24HO: {
676  bendangle = phiDiff(2, 4);
677  break;
678  }
679  case PT34LO: {
680  bendangle = phiDiff(4, 3);
681  break;
682  }
683  case PT34HO: {
684  bendangle = phiDiff(4, 3);
685  break;
686  }
687  case PT15LO: {
688  bendangle = phiDiff(1, 3);
689  break;
690  }
691  case PT15HO: {
692  bendangle = phiDiff(1, 3);
693  break;
694  }
695  case PT25LO: {
696  bendangle = phiDiff(2, 3);
697  break;
698  }
699  case PT25HO: {
700  bendangle = phiDiff(2, 3);
701  break;
702  }
703  case NODEF: {
704  bendangle = 0;
705  // cerr << "AssignmentUnit::getPtAddress : undefined PtAssMethod" << endl;
706  break;
707  }
708  }
709 
710  int signo = 1;
711  bendangle = (bendangle + 8192) % 4096;
712  if (bendangle > 2047)
713  bendangle -= 4096;
714  if (bendangle < 0)
715  signo = -1;
716 
717  if (bendcharge)
718  return signo;
719 
720  bendangle = (bendangle + 2048) % 1024;
721  if (bendangle > 511)
722  bendangle -= 1024;
723 
724  return bendangle;
725 }

References AlcaSiPixelAliHarvester0T_cff::method, NODEF, phiDiff(), PT12H, PT12HO, PT12L, PT12LO, PT13H, PT13HO, PT13L, PT13LO, PT14H, PT14HO, PT14L, PT14LO, PT15HO, PT15LO, PT23H, PT23HO, PT23L, PT23LO, PT24H, PT24HO, PT24L, PT24LO, PT25HO, PT25LO, PT34H, PT34HO, PT34L, and PT34LO.

Referenced by PtAU().

◆ getPtMethod()

PtAssMethod L1MuDTAssignmentUnit::getPtMethod ( ) const
private

determine pt assignment method

Definition at line 466 of file L1MuDTAssignmentUnit.cc.

466  {
467  // determine which pt-assignment method should be used as a function
468  // of the track class and
469  // of the phib values of the track segments making up this track candidate.
470 
471  // get bitmap of track candidate
472  const bitset<4> s = m_sp.TA()->trackBitMap(m_id);
473 
474  int method = -1;
475 
476  if (s.test(0) && s.test(3))
477  method = 2; // stations 1 and 4
478  if (s.test(0) && s.test(2))
479  method = 1; // stations 1 and 3
480  if (s.test(0) && s.test(1))
481  method = 0; // stations 1 and 2
482  if (!s.test(0) && s.test(1) && s.test(3))
483  method = 4; // stations 2 and 4
484  if (!s.test(0) && s.test(1) && s.test(2))
485  method = 3; // stations 2 and 3
486  if (!s.test(0) && !s.test(1) && s.test(2) && s.test(3))
487  method = 5; // stations 3 and 4
488 
489  if (m_sp.ovl()) {
490  int adr = m_addArray.station(3);
491  bool s5 = (adr == 15) ? false : ((adr / 2) % 2 == 1);
492  if (s.test(0) && s.test(3))
493  method = 8; // stations 1 and 4
494  if (s.test(0) && s.test(2) && s5)
495  method = 12; // stations 1 and 5
496  if (s.test(0) && s.test(2) && !s5)
497  method = 7; // stations 1 and 3
498  if (s.test(0) && s.test(1))
499  method = 6; // stations 1 and 2
500  if (!s.test(0) && s.test(1) && s.test(3))
501  method = 10; // stations 2 and 4
502  if (!s.test(0) && s.test(1) && s.test(2) && s5)
503  method = 13; // stations 2 and 5
504  if (!s.test(0) && s.test(1) && s.test(2) && !s5)
505  method = 9; // stations 2 and 3
506  if (!s.test(0) && !s.test(1) && s.test(2) && s.test(3))
507  method = 11; // stations 3 and 4
508  }
509 
511 
512  // phib values of track segments from stations 1, 2 and 4
513  int phib1 = (getTSphi(1) != nullptr) ? getTSphi(1)->phib() : 0;
514  int phib2 = (getTSphi(2) != nullptr) ? getTSphi(2)->phib() : 0;
515  int phib4 = (getTSphi(4) != nullptr) ? getTSphi(4)->phib() : 0;
516 
517  PtAssMethod pam = NODEF;
518 
519  switch (method) {
520  case 0: {
521  pam = (abs(phib1) < threshold) ? PT12H : PT12L;
522  break;
523  }
524  case 1: {
525  pam = (abs(phib1) < threshold) ? PT13H : PT13L;
526  break;
527  }
528  case 2: {
529  pam = (abs(phib1) < threshold) ? PT14H : PT14L;
530  break;
531  }
532  case 3: {
533  pam = (abs(phib2) < threshold) ? PT23H : PT23L;
534  break;
535  }
536  case 4: {
537  pam = (abs(phib2) < threshold) ? PT24H : PT24L;
538  break;
539  }
540  case 5: {
541  pam = (abs(phib4) < threshold) ? PT34H : PT34L;
542  break;
543  }
544  case 6: {
545  pam = (abs(phib1) < threshold) ? PT12HO : PT12LO;
546  break;
547  }
548  case 7: {
549  pam = (abs(phib1) < threshold) ? PT13HO : PT13LO;
550  break;
551  }
552  case 8: {
553  pam = (abs(phib1) < threshold) ? PT14HO : PT14LO;
554  break;
555  }
556  case 9: {
557  pam = (abs(phib2) < threshold) ? PT23HO : PT23LO;
558  break;
559  }
560  case 10: {
561  pam = (abs(phib2) < threshold) ? PT24HO : PT24LO;
562  break;
563  }
564  case 11: {
565  pam = (abs(phib4) < threshold) ? PT34HO : PT34LO;
566  break;
567  }
568  case 12: {
569  pam = (abs(phib1) < threshold) ? PT15HO : PT15LO;
570  break;
571  }
572  case 13: {
573  pam = (abs(phib2) < threshold) ? PT25HO : PT25LO;
574  break;
575  }
576  default:;
577  //cout << "L1MuDTAssignmentUnit : Error in PT ass method evaluation" << endl;
578  }
579 
580  return pam;
581 }

References funct::abs(), L1MuDTPtaLut::getPtLutThreshold(), getTSphi(), m_addArray, m_id, m_sp, AlcaSiPixelAliHarvester0T_cff::method, NODEF, L1MuDTSectorProcessor::ovl(), L1MuDTTrackSegPhi::phib(), PT12H, PT12HO, PT12L, PT12LO, PT13H, PT13HO, PT13L, PT13LO, PT14H, PT14HO, PT14L, PT14LO, PT15HO, PT15LO, PT23H, PT23HO, PT23L, PT23LO, PT24H, PT24HO, PT24L, PT24LO, PT25HO, PT25LO, PT34H, PT34HO, PT34L, PT34LO, alignCSCRings::s, L1MuDTAddressArray::station(), L1MuDTSectorProcessor::TA(), thePtaLUTs, remoteMonitoring_LED_IterMethod_cfg::threshold, and L1MuDTTrackAssembler::trackBitMap().

Referenced by PtAU().

◆ getTSphi()

const L1MuDTTrackSegPhi * L1MuDTAssignmentUnit::getTSphi ( int  station) const
private

get track segment from a given station

Definition at line 311 of file L1MuDTAssignmentUnit.cc.

311  {
312  vector<const L1MuDTTrackSegPhi*>::const_iterator iter;
313  for (iter = m_TSphi.begin(); iter != m_TSphi.end(); iter++) {
314  int stat = (*iter)->station();
315  if (station == stat) {
316  return (*iter);
317  break;
318  }
319  }
320 
321  return nullptr;
322 }

References m_TSphi, hgcalPlots::stat, and relativeConstraints::station.

Referenced by getPtMethod(), PhiAU(), and phiDiff().

◆ PhiAU()

void L1MuDTAssignmentUnit::PhiAU ( const edm::EventSetup c)

assign phi

Definition at line 133 of file L1MuDTAssignmentUnit.cc.

133  {
134  // calculate phi at station 2 using 8 bits (precision = 2.5 degrees)
135 
137 
138  int sh_phi = 12 - m_sp.tf().config()->getNbitsPhiPhi();
139  int sh_phib = 10 - m_sp.tf().config()->getNbitsPhiPhib();
140 
141  const L1MuDTTrackSegPhi* second = getTSphi(2); // track segment at station 2
142  const L1MuDTTrackSegPhi* first = getTSphi(1); // track segment at station 1
143  const L1MuDTTrackSegPhi* forth = getTSphi(4); // track segment at station 4
144 
145  int phi2 = 0; // phi-value at station 2
146  int sector = 0;
147 
148  if (second) {
149  phi2 = second->phi() >> sh_phi;
150  sector = second->sector();
151  } else if (second == nullptr && first) {
152  phi2 = first->phi() >> sh_phi;
153  sector = first->sector();
154  } else if (second == nullptr && forth) {
155  phi2 = forth->phi() >> sh_phi;
156  sector = forth->sector();
157  }
158 
159  int sector0 = m_sp.id().sector();
160 
161  // convert sector difference to values in the range -6 to +5
162 
163  int sectordiff = (sector - sector0) % 12;
164  if (sectordiff >= 6)
165  sectordiff -= 12;
166  if (sectordiff < -6)
167  sectordiff += 12;
168 
169  // assert( abs(sectordiff) <= 1 );
170 
171  // get sector center in 8 bit coding
172  int sector_8 = convertSector(sector0);
173 
174  // convert phi to 2.5 degree precision
175  int phi_precision = 4096 >> sh_phi;
176  const double k = 57.2958 / 2.5 / static_cast<float>(phi_precision);
177  double phi_f = static_cast<double>(phi2);
178  int phi_8 = static_cast<int>(floor(phi_f * k));
179 
180  if (second == nullptr && first) {
181  int bend_angle = (first->phib() >> sh_phib) << sh_phib;
182  phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(0, bend_angle);
183  } else if (second == nullptr && forth) {
184  int bend_angle = (forth->phib() >> sh_phib) << sh_phib;
185  phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(1, bend_angle);
186  }
187 
188  phi_8 += sectordiff * 12;
189 
190  if (phi_8 > 15)
191  phi_8 = 15;
192  if (phi_8 < -16)
193  phi_8 = -16;
194 
195  int phi = (sector_8 + phi_8 + 144) % 144;
196  phi_8 = (phi_8 + 32) % 32;
197 
198  m_sp.track(m_id)->setPhi(phi);
199  m_sp.tracK(m_id)->setPhi(phi_8);
200 }

References HltBtagPostValidation_cff::c, L1MuDTTrackFinder::config(), convertSector(), dqmdumpme::first, get, L1MuDTPhiLut::getDeltaPhi(), L1MuDTTFConfig::getNbitsPhiPhi(), L1MuDTTFConfig::getNbitsPhiPhib(), getTSphi(), L1MuDTSectorProcessor::id(), dqmdumpme::k, m_id, m_sp, phi, L1MuDTTrackSegPhi::phi(), L1MuDTTrackSegPhi::phib(), edm::second(), L1MuDTSecProcId::sector(), L1MuDTTrackSegPhi::sector(), L1MuDTTrack::setPhi(), L1MuDTSectorProcessor::tf(), thePhiLUTs, L1MuDTSectorProcessor::track(), and L1MuDTSectorProcessor::tracK().

Referenced by run().

◆ phiDiff()

int L1MuDTAssignmentUnit::phiDiff ( int  stat1,
int  stat2 
) const
private

build difference of two phi values

Definition at line 730 of file L1MuDTAssignmentUnit.cc.

730  {
731  // calculate bit shift
732 
733  int sh_phi = 12 - nbit_phi;
734 
735  // get 2 phi values and add offset (30 degrees ) for adjacent sector
736  int sector1 = getTSphi(stat1)->sector();
737  int sector2 = getTSphi(stat2)->sector();
738  int phi1 = getTSphi(stat1)->phi() >> sh_phi;
739  int phi2 = getTSphi(stat2)->phi() >> sh_phi;
740 
741  // convert sector difference to values in the range -6 to +5
742 
743  int sectordiff = (sector2 - sector1) % 12;
744  if (sectordiff >= 6)
745  sectordiff -= 12;
746  if (sectordiff < -6)
747  sectordiff += 12;
748 
749  // assert( abs(sectordiff) <= 1 );
750 
751  int offset = (2144 >> sh_phi) * sectordiff;
752  int bendangle = (phi2 - phi1 + offset) << sh_phi;
753 
754  return bendangle;
755 }

References getTSphi(), nbit_phi, hltrates_dqm_sourceclient-live_cfg::offset, L1MuDTTrackSegPhi::phi(), L1MuDTTrackSegPhi::sector(), hgcalTopologyTester_cfi::sector1, and hgcalTopologyTester_cfi::sector2.

Referenced by getPtAddress().

◆ PtAU()

void L1MuDTAssignmentUnit::PtAU ( const edm::EventSetup c)

assign pt and charge

Definition at line 205 of file L1MuDTAssignmentUnit.cc.

205  {
207 
208  // get pt-assignment method as function of track class and TS phib values
210 
211  // get input address for look-up table
212  int bend_angle = getPtAddress(m_ptAssMethod);
213  int bend_carga = getPtAddress(m_ptAssMethod, 1);
214 
215  // retrieve pt value from look-up table
216  int lut_idx = m_ptAssMethod;
217  int pt = thePtaLUTs->getPt(lut_idx, bend_angle);
218 
219  m_sp.track(m_id)->setPt(pt);
220  m_sp.tracK(m_id)->setPt(pt);
221 
222  // assign charge
223  int chsign = getCharge(m_ptAssMethod);
224  int charge = (bend_carga >= 0) ? chsign : -1 * chsign;
227 }

References HltBtagPostValidation_cff::c, ALCARECOTkAlJpsiMuMu_cff::charge, get, getCharge(), L1MuDTPtaLut::getPt(), getPtAddress(), getPtMethod(), m_id, m_ptAssMethod, m_sp, DiDispStaMuonMonitor_cfi::pt, L1MuDTTrack::setCharge(), L1MuDTTrack::setPt(), thePtaLUTs, L1MuDTSectorProcessor::track(), and L1MuDTSectorProcessor::tracK().

Referenced by run().

◆ QuaAU()

void L1MuDTAssignmentUnit::QuaAU ( )

assign quality

Definition at line 232 of file L1MuDTAssignmentUnit.cc.

232  {
233  unsigned int quality = 0;
234 
235  const TrackClass tc = m_sp.TA()->trackClass(m_id);
236 
237  switch (tc) {
238  case T1234: {
239  quality = 7;
240  break;
241  }
242  case T123: {
243  quality = 6;
244  break;
245  }
246  case T124: {
247  quality = 6;
248  break;
249  }
250  case T134: {
251  quality = 5;
252  break;
253  }
254  case T234: {
255  quality = 4;
256  break;
257  }
258  case T12: {
259  quality = 3;
260  break;
261  }
262  case T13: {
263  quality = 3;
264  break;
265  }
266  case T14: {
267  quality = 3;
268  break;
269  }
270  case T23: {
271  quality = 2;
272  break;
273  }
274  case T24: {
275  quality = 2;
276  break;
277  }
278  case T34: {
279  quality = 1;
280  break;
281  }
282  default: {
283  quality = 0;
284  break;
285  }
286  }
287 
290 }

References m_id, m_sp, qcdUeDQM_cfi::quality, L1MuDTTrack::setQuality(), T12, T123, T1234, T124, T13, T134, T14, T23, T234, T24, T34, L1MuDTSectorProcessor::TA(), L1MuDTSectorProcessor::track(), L1MuDTSectorProcessor::tracK(), and L1MuDTTrackAssembler::trackClass().

Referenced by run().

◆ reset()

void L1MuDTAssignmentUnit::reset ( void  )
overridevirtual

reset Assignment Unit

Implements L1AbstractProcessor.

Definition at line 124 of file L1MuDTAssignmentUnit.cc.

124  {
125  m_addArray.reset();
126  m_TSphi.clear();
128 }

References m_addArray, m_ptAssMethod, m_TSphi, NODEF, and L1MuDTAddressArray::reset().

Referenced by L1MuDTAssignmentUnit().

◆ run()

void L1MuDTAssignmentUnit::run ( const edm::EventSetup c)
overridevirtual

run Assignment Unit

Reimplemented from L1AbstractProcessor.

Definition at line 78 of file L1MuDTAssignmentUnit.cc.

78  {
79  // enable track candidate
80  m_sp.track(m_id)->enable();
81  m_sp.tracK(m_id)->enable();
82 
83  // set track class
84  TrackClass tc = m_sp.TA()->trackClass(m_id);
85  m_sp.track(m_id)->setTC(tc);
86  m_sp.tracK(m_id)->setTC(tc);
87 
88  // get relative addresses of matching track segments
92 
93  // get track segments (track segment router)
94  TSR();
97 
98  // set bunch-crossing (use first track segment)
99  vector<const L1MuDTTrackSegPhi*>::const_iterator iter = m_TSphi.begin();
100  int bx = (*iter)->bx();
101  m_sp.track(m_id)->setBx(bx);
102  m_sp.tracK(m_id)->setBx(bx);
103 
104  // assign phi
105  PhiAU(c);
106 
107  // assign pt and charge
108  PtAU(c);
109 
110  // assign quality
111  QuaAU();
112 
113  // special hack for overlap region
114  // for ( iter = m_TSphi.begin(); iter != m_TSphi.end(); iter++ ) {
115  // int wheel = abs((*iter)->wheel());
116  // if ( wheel == 3 && (*iter)->etaFlag() ) m_sp.track(m_id)->disable();
117  // if ( wheel == 3 && (*iter)->etaFlag() ) m_sp.tracK(m_id)->disable();
118  // }
119 }

References L1MuDTTrackAssembler::address(), l1GtPatternGenerator_cfi::bx, HltBtagPostValidation_cff::c, L1MuDTTrack::enable(), m_addArray, m_id, m_sp, m_TSphi, PhiAU(), PtAU(), QuaAU(), L1MuDTTrack::setAddresses(), L1MuRegionalCand::setBx(), L1MuDTTrack::setTC(), L1MuDTTrack::setTSphi(), L1MuDTSectorProcessor::TA(), L1MuDTSectorProcessor::track(), L1MuDTSectorProcessor::tracK(), L1MuDTTrackAssembler::trackClass(), and TSR().

◆ setPrecision()

void L1MuDTAssignmentUnit::setPrecision ( )

◆ TSR()

void L1MuDTAssignmentUnit::TSR ( )
private

Track Segment Router.

Definition at line 295 of file L1MuDTAssignmentUnit.cc.

295  {
296  // get the track segments from the data buffer
297  const L1MuDTTrackSegPhi* ts = nullptr;
298  for (int stat = 1; stat <= 4; stat++) {
299  int adr = m_addArray.station(stat);
300  if (adr != 15) {
301  ts = m_sp.data()->getTSphi(stat, adr);
302  if (ts != nullptr)
303  m_TSphi.push_back(ts);
304  }
305  }
306 }

References L1MuDTSectorProcessor::data(), L1MuDTDataBuffer::getTSphi(), m_addArray, m_sp, m_TSphi, hgcalPlots::stat, and L1MuDTAddressArray::station().

Referenced by run().

Member Data Documentation

◆ m_addArray

L1MuDTAddressArray L1MuDTAssignmentUnit::m_addArray
private

Definition at line 102 of file L1MuDTAssignmentUnit.h.

Referenced by getPtMethod(), reset(), run(), and TSR().

◆ m_id

int L1MuDTAssignmentUnit::m_id
private

Definition at line 100 of file L1MuDTAssignmentUnit.h.

Referenced by getPtMethod(), PhiAU(), PtAU(), QuaAU(), and run().

◆ m_ptAssMethod

PtAssMethod L1MuDTAssignmentUnit::m_ptAssMethod
private

Definition at line 104 of file L1MuDTAssignmentUnit.h.

Referenced by PtAU(), and reset().

◆ m_sp

L1MuDTSectorProcessor& L1MuDTAssignmentUnit::m_sp
private

Definition at line 99 of file L1MuDTAssignmentUnit.h.

Referenced by getPtMethod(), PhiAU(), PtAU(), QuaAU(), run(), setPrecision(), and TSR().

◆ m_TSphi

std::vector<const L1MuDTTrackSegPhi*> L1MuDTAssignmentUnit::m_TSphi
private

Definition at line 103 of file L1MuDTAssignmentUnit.h.

Referenced by getTSphi(), L1MuDTAssignmentUnit(), reset(), run(), and TSR().

◆ nbit_phi

unsigned short L1MuDTAssignmentUnit::nbit_phi
private

of bits used for pt-assignment

Definition at line 108 of file L1MuDTAssignmentUnit.h.

Referenced by phiDiff(), and setPrecision().

◆ nbit_phib

unsigned short L1MuDTAssignmentUnit::nbit_phib
private

of bits used for pt-assignment

Definition at line 109 of file L1MuDTAssignmentUnit.h.

Referenced by setPrecision().

◆ thePhiLUTs

edm::ESHandle<L1MuDTPhiLut> L1MuDTAssignmentUnit::thePhiLUTs
private

phi-assignment look-up tables

Definition at line 106 of file L1MuDTAssignmentUnit.h.

Referenced by PhiAU().

◆ thePtaLUTs

edm::ESHandle<L1MuDTPtaLut> L1MuDTAssignmentUnit::thePtaLUTs
private

pt-assignment look-up tables

Definition at line 107 of file L1MuDTAssignmentUnit.h.

Referenced by getPtMethod(), and PtAU().

L1MuDTTrackAssembler::trackClass
TrackClass trackClass(int id) const
return Track Class of found track
Definition: L1MuDTTrackAssembler.h:67
L1MuDTTrack::setPhi
void setPhi(int phi)
set phi-code of muon candidate
Definition: L1MuDTTrack.h:137
PT12HO
Definition: L1MuDTAssParam.h:37
L1MuDTAssignmentUnit::thePhiLUTs
edm::ESHandle< L1MuDTPhiLut > thePhiLUTs
phi-assignment look-up tables
Definition: L1MuDTAssignmentUnit.h:106
L1MuDTTrack::setPt
void setPt(int pt)
set pt-code of muon candidate
Definition: L1MuDTTrack.h:146
L1MuDTAssignmentUnit::m_addArray
L1MuDTAddressArray m_addArray
Definition: L1MuDTAssignmentUnit.h:102
L1MuDTSectorProcessor::ovl
bool ovl() const
is it an overlap region Sector Processor?
Definition: L1MuDTSectorProcessor.h:83
L1MuDTTFConfig::getNbitsPhiPhi
int getNbitsPhiPhi() const
Definition: L1MuDTTFConfig.h:71
PT14HO
Definition: L1MuDTAssParam.h:41
T14
Definition: L1MuBMTrackAssParam.h:21
L1MuDTTrack::setTC
void setTC(TrackClass tc)
set track-class of muon candidate
Definition: L1MuDTTrack.h:134
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
relativeConstraints.station
station
Definition: relativeConstraints.py:67
PT24HO
Definition: L1MuDTAssParam.h:45
hgcalTopologyTester_cfi.sector1
sector1
Definition: hgcalTopologyTester_cfi.py:9
L1MuDTAddressArray::station
unsigned short station(int stat) const
get address of a given station [1-4]
Definition: L1MuDTAddressArray.h:80
AlcaSiPixelAliHarvester0T_cff.method
method
Definition: AlcaSiPixelAliHarvester0T_cff.py:41
T123
Definition: L1MuBMTrackAssParam.h:21
L1MuDTTrack::setAddresses
void setAddresses(const L1MuDTAddressArray &addr)
set relative addresses of muon candidate
Definition: L1MuDTTrack.h:158
L1MuDTTFConfig::getNbitsPhiPhib
int getNbitsPhiPhib() const
Definition: L1MuDTTFConfig.h:72
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
PT14H
Definition: L1MuDTAssParam.h:29
L1MuDTAssignmentUnit::getPtAddress
int getPtAddress(PtAssMethod, int bendcharge=0) const
calculate bend angle
Definition: L1MuDTAssignmentUnit.cc:586
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
T12
Definition: L1MuBMTrackAssParam.h:21
L1MuDTTrackSegPhi::phib
int phib() const
return phib
Definition: L1MuDTTrackSegPhi.h:95
L1MuDTTFConfig::getNbitsPtaPhib
int getNbitsPtaPhib() const
Definition: L1MuDTTFConfig.h:70
T134
Definition: L1MuBMTrackAssParam.h:21
L1MuDTAssignmentUnit::nbit_phi
unsigned short nbit_phi
Definition: L1MuDTAssignmentUnit.h:108
L1MuDTSectorProcessor::track
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
Definition: L1MuDTSectorProcessor.h:99
dqmdumpme.first
first
Definition: dqmdumpme.py:55
L1MuDTSectorProcessor::tf
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
Definition: L1MuDTSectorProcessor.h:77
PT34LO
Definition: L1MuDTAssParam.h:46
L1MuDTTrack::enable
void enable()
enable muon candidate
Definition: L1MuDTTrack.h:122
L1MuDTTFConfig::getNbitsPtaPhi
int getNbitsPtaPhi() const
Definition: L1MuDTTFConfig.h:69
L1MuDTTrackAssembler::address
int address(int id, int stat) const
get address of a single station of selected track candidate
Definition: L1MuDTTrackAssembler.h:76
PT15HO
Definition: L1MuDTAssParam.h:49
L1MuRegionalCand::setBx
void setBx(int bx)
Set Bunch Crossing.
Definition: L1MuRegionalCand.h:117
L1MuDTAssignmentUnit::getCharge
int getCharge(PtAssMethod)
determine charge
Definition: L1MuDTAssignmentUnit.cc:337
L1MuDTSectorProcessor::id
const L1MuDTSecProcId & id() const
return Sector Processor identifier
Definition: L1MuDTSectorProcessor.h:74
PT24L
Definition: L1MuDTAssParam.h:32
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1MuDTAssignmentUnit::PhiAU
void PhiAU(const edm::EventSetup &c)
assign phi
Definition: L1MuDTAssignmentUnit.cc:133
PT23LO
Definition: L1MuDTAssParam.h:42
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
PT23H
Definition: L1MuDTAssParam.h:31
T234
Definition: L1MuBMTrackAssParam.h:21
L1MuDTAssignmentUnit::setPrecision
void setPrecision()
set precision of phi and phib
Definition: L1MuDTAssignmentUnit.cc:761
L1MuDTAddressArray::reset
void reset()
reset address array
Definition: L1MuDTAddressArray.cc:100
L1MuDTTrack::setQuality
void setQuality(unsigned int quality)
set quality of muon candidate
Definition: L1MuDTTrack.h:155
L1MuDTPtaLut::getPtLutThreshold
int getPtLutThreshold(int pta_ind) const
get pt-assignment LUT threshold
Definition: L1MuDTPtaLut.cc:347
NODEF
Definition: L1MuDTAssParam.h:52
L1MuDTTrack::setTSphi
void setTSphi(const std::vector< const L1MuDTTrackSegPhi * > &tsList)
set phi track segments used to form the muon candidate
Definition: L1MuDTTrack.cc:145
L1MuDTSectorProcessor::data
const L1MuDTDataBuffer * data() const
return pointer to Data Buffer
Definition: L1MuDTSectorProcessor.h:86
L1MuDTAssignmentUnit::QuaAU
void QuaAU()
assign quality
Definition: L1MuDTAssignmentUnit.cc:232
PT23HO
Definition: L1MuDTAssParam.h:43
dqmdumpme.k
k
Definition: dqmdumpme.py:60
L1MuDTAssignmentUnit::m_sp
L1MuDTSectorProcessor & m_sp
Definition: L1MuDTAssignmentUnit.h:99
PtAssMethod
PtAssMethod
Definition: L1MuDTAssParam.h:23
L1MuDTAssignmentUnit::getPtMethod
PtAssMethod getPtMethod() const
determine pt assignment method
Definition: L1MuDTAssignmentUnit.cc:466
L1MuDTAssignmentUnit::reset
void reset() override
reset Assignment Unit
Definition: L1MuDTAssignmentUnit.cc:124
T13
Definition: L1MuBMTrackAssParam.h:21
PT12L
Definition: L1MuDTAssParam.h:24
L1MuDTTrackSegPhi::phi
int phi() const
return phi
Definition: L1MuDTTrackSegPhi.h:92
T34
Definition: L1MuBMTrackAssParam.h:21
L1MuDTPtaLut::getPt
int getPt(int pta_ind, int address) const
get pt-value for a given address
Definition: L1MuDTPtaLut.cc:334
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuDTSecProcId::sector
int sector() const
return sector number
Definition: L1MuDTSecProcId.h:58
PT12LO
Definition: L1MuDTAssParam.h:36
TrackClass
TrackClass
Definition: L1MuBMTrackAssParam.h:21
PT13LO
Definition: L1MuDTAssParam.h:38
PT24LO
Definition: L1MuDTAssParam.h:44
L1MuDTAssignmentUnit::thePtaLUTs
edm::ESHandle< L1MuDTPtaLut > thePtaLUTs
pt-assignment look-up tables
Definition: L1MuDTAssignmentUnit.h:107
L1MuDTTrackSegPhi::sector
int sector() const
return sector
Definition: L1MuDTTrackSegPhi.h:83
PT34L
Definition: L1MuDTAssParam.h:34
L1MuDTTrackAssembler::trackBitMap
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
Definition: L1MuDTTrackAssembler.h:70
T124
Definition: L1MuBMTrackAssParam.h:21
PT13HO
Definition: L1MuDTAssParam.h:39
L1MuDTAssignmentUnit::m_TSphi
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
Definition: L1MuDTAssignmentUnit.h:103
PT34HO
Definition: L1MuDTAssParam.h:47
PT13H
Definition: L1MuDTAssParam.h:27
T1234
Definition: L1MuBMTrackAssParam.h:21
L1MuDTAssignmentUnit::phiDiff
int phiDiff(int stat1, int stat2) const
build difference of two phi values
Definition: L1MuDTAssignmentUnit.cc:730
L1MuDTAssignmentUnit::m_ptAssMethod
PtAssMethod m_ptAssMethod
Definition: L1MuDTAssignmentUnit.h:104
L1MuDTTrackFinder::config
static L1MuDTTFConfig * config()
return configuration
Definition: L1MuDTTrackFinder.h:102
L1MuDTAssignmentUnit::TSR
void TSR()
Track Segment Router.
Definition: L1MuDTAssignmentUnit.cc:295
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
PT13L
Definition: L1MuDTAssParam.h:26
get
#define get
L1MuDTPhiLutRcd
Definition: L1MuDTPhiLutRcd.h:12
DDAxes::phi
hgcalTopologyTester_cfi.sector2
sector2
Definition: hgcalTopologyTester_cfi.py:10
L1MuDTAssignmentUnit::convertSector
int convertSector(int)
convert sector Id to 8 bit code (= sector center)
Definition: L1MuDTAssignmentUnit.cc:327
PT23L
Definition: L1MuDTAssParam.h:30
L1MuDTPhiLut::getDeltaPhi
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
Definition: L1MuDTPhiLut.cc:220
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
L1MuDTPtaLutRcd
Definition: L1MuDTPtaLutRcd.h:12
T24
Definition: L1MuBMTrackAssParam.h:21
L1MuDTAssignmentUnit::m_id
int m_id
Definition: L1MuDTAssignmentUnit.h:100
PT12H
Definition: L1MuDTAssParam.h:25
PT34H
Definition: L1MuDTAssParam.h:35
L1MuDTAssignmentUnit::nbit_phib
unsigned short nbit_phib
Definition: L1MuDTAssignmentUnit.h:109
PT25LO
Definition: L1MuDTAssParam.h:50
T23
Definition: L1MuBMTrackAssParam.h:21
PT15LO
Definition: L1MuDTAssParam.h:48
L1MuDTAssignmentUnit::PtAU
void PtAU(const edm::EventSetup &c)
assign pt and charge
Definition: L1MuDTAssignmentUnit.cc:205
L1MuDTTrackSegPhi
Definition: L1MuDTTrackSegPhi.h:36
L1MuDTDataBuffer::getTSphi
const TSPhivector & getTSphi() const
get all track segments from the buffer
Definition: L1MuDTDataBuffer.h:56
PT25HO
Definition: L1MuDTAssParam.h:51
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PT24H
Definition: L1MuDTAssParam.h:33
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
L1MuDTTrack::setCharge
void setCharge(int charge)
set charge of muon candidate
Definition: L1MuDTTrack.h:149
L1MuDTSectorProcessor::TA
const L1MuDTTrackAssembler * TA() const
return pointer to Track Assembler
Definition: L1MuDTSectorProcessor.h:93
L1MuDTAssignmentUnit::getTSphi
const L1MuDTTrackSegPhi * getTSphi(int station) const
get track segment from a given station
Definition: L1MuDTAssignmentUnit.cc:311
PT14L
Definition: L1MuDTAssParam.h:28
L1MuDTSectorProcessor::tracK
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
Definition: L1MuDTSectorProcessor.h:102
PT14LO
Definition: L1MuDTAssParam.h:40