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
 

of bits used for pt-assignment

More...
 
unsigned short nbit_phib
 

of bits used for pt-assignment

More...
 
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 ( L1MuDTSectorProcessor sp,
int  id 
)

constructor

Definition at line 57 of file L1MuDTAssignmentUnit.cc.

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

57  :
58  m_sp(sp), m_id(id),
60  nbit_phi(12),nbit_phib(10)
61  {
62 
63  m_TSphi.reserve(4); // a track candidate can consist of max 4 TS
64  reset();
65 
66  setPrecision();
67 
68 }
unsigned short nbit_phib
of bits used for pt-assignment
L1MuDTAddressArray m_addArray
L1MuDTSectorProcessor & m_sp
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
unsigned short nbit_phi
of bits used for pt-assignment
void reset() override
reset Assignment Unit
void setPrecision()
set precision of phi and phib
L1MuDTAssignmentUnit::~L1MuDTAssignmentUnit ( )
override

destructor

Definition at line 75 of file L1MuDTAssignmentUnit.cc.

75 {}

Member Function Documentation

int L1MuDTAssignmentUnit::convertSector ( int  sector)
private

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

Definition at line 317 of file L1MuDTAssignmentUnit.cc.

Referenced by PhiAU().

317  {
318 
319  // assert( sector >=0 && sector < 12 );
320  const int sectorvalues[12] = { 0, 12, 24, 36, 48, 60, 72, 84,
321  96, 108, 120, 132 };
322 
323  return sectorvalues[sector];
324 
325 }
int L1MuDTAssignmentUnit::getCharge ( PtAssMethod  method)
private

determine charge

Definition at line 331 of file L1MuDTAssignmentUnit.cc.

References 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().

331  {
332 
333  int chargesign = 0;
334  switch ( method ) {
335  case PT12L : { chargesign = -1; break; }
336  case PT12H : { chargesign = -1; break; }
337  case PT13L : { chargesign = -1; break; }
338  case PT13H : { chargesign = -1; break; }
339  case PT14L : { chargesign = -1; break; }
340  case PT14H : { chargesign = -1; break; }
341  case PT23L : { chargesign = -1; break; }
342  case PT23H : { chargesign = -1; break; }
343  case PT24L : { chargesign = -1; break; }
344  case PT24H : { chargesign = -1; break; }
345  case PT34L : { chargesign = 1; break; }
346  case PT34H : { chargesign = 1; break; }
347  case PT12LO : { chargesign = -1; break; }
348  case PT12HO : { chargesign = -1; break; }
349  case PT13LO : { chargesign = -1; break; }
350  case PT13HO : { chargesign = -1; break; }
351  case PT14LO : { chargesign = -1; break; }
352  case PT14HO : { chargesign = -1; break; }
353  case PT23LO : { chargesign = -1; break; }
354  case PT23HO : { chargesign = -1; break; }
355  case PT24LO : { chargesign = -1; break; }
356  case PT24HO : { chargesign = -1; break; }
357  case PT34LO : { chargesign = 1; break; }
358  case PT34HO : { chargesign = 1; break; }
359  case PT15LO : { chargesign = -1; break; }
360  case PT15HO : { chargesign = -1; break; }
361  case PT25LO : { chargesign = -1; break; }
362  case PT25HO : { chargesign = -1; break; }
363  case NODEF : { chargesign = 0;
364  // cerr << "AssignmentUnit::getCharge : undefined PtAssMethod!"
365  // << endl;
366  break;
367  }
368  }
369 
370  return chargesign;
371 
372 }
int L1MuDTAssignmentUnit::getPtAddress ( PtAssMethod  method,
int  bendcharge = 0 
) const
private

calculate bend angle

Definition at line 445 of file L1MuDTAssignmentUnit.cc.

References 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().

445  {
446 
447  // calculate bend angle as difference of two azimuthal positions
448 
449  int bendangle = 0;
450  switch (method) {
451  case PT12L : { bendangle = phiDiff(1,2); break; }
452  case PT12H : { bendangle = phiDiff(1,2); break; }
453  case PT13L : { bendangle = phiDiff(1,3); break; }
454  case PT13H : { bendangle = phiDiff(1,3); break; }
455  case PT14L : { bendangle = phiDiff(1,4); break; }
456  case PT14H : { bendangle = phiDiff(1,4); break; }
457  case PT23L : { bendangle = phiDiff(2,3); break; }
458  case PT23H : { bendangle = phiDiff(2,3); break; }
459  case PT24L : { bendangle = phiDiff(2,4); break; }
460  case PT24H : { bendangle = phiDiff(2,4); break; }
461  case PT34L : { bendangle = phiDiff(4,3); break; }
462  case PT34H : { bendangle = phiDiff(4,3); break; }
463  case PT12LO : { bendangle = phiDiff(1,2); break; }
464  case PT12HO : { bendangle = phiDiff(1,2); break; }
465  case PT13LO : { bendangle = phiDiff(1,3); break; }
466  case PT13HO : { bendangle = phiDiff(1,3); break; }
467  case PT14LO : { bendangle = phiDiff(1,4); break; }
468  case PT14HO : { bendangle = phiDiff(1,4); break; }
469  case PT23LO : { bendangle = phiDiff(2,3); break; }
470  case PT23HO : { bendangle = phiDiff(2,3); break; }
471  case PT24LO : { bendangle = phiDiff(2,4); break; }
472  case PT24HO : { bendangle = phiDiff(2,4); break; }
473  case PT34LO : { bendangle = phiDiff(4,3); break; }
474  case PT34HO : { bendangle = phiDiff(4,3); break; }
475  case PT15LO : { bendangle = phiDiff(1,3); break; }
476  case PT15HO : { bendangle = phiDiff(1,3); break; }
477  case PT25LO : { bendangle = phiDiff(2,3); break; }
478  case PT25HO : { bendangle = phiDiff(2,3); break; }
479  case NODEF : { bendangle = 0;
480  // cerr << "AssignmentUnit::getPtAddress : undefined PtAssMethod" << endl;
481  break;
482  }
483  }
484 
485  int signo = 1;
486  bendangle = (bendangle+8192)%4096;
487  if ( bendangle > 2047 ) bendangle -= 4096;
488  if ( bendangle < 0 ) signo = -1;
489 
490  if (bendcharge) return signo;
491 
492  bendangle = (bendangle+2048)%1024;
493  if ( bendangle > 511 ) bendangle -= 1024;
494 
495  return bendangle;
496 
497 }
int phiDiff(int stat1, int stat2) const
build difference of two phi values
PtAssMethod L1MuDTAssignmentUnit::getPtMethod ( ) const
private

determine pt assignment method

Definition at line 378 of file L1MuDTAssignmentUnit.cc.

References funct::abs(), L1MuDTPtaLut::getPtLutThreshold(), getTSphi(), m_addArray, m_id, m_sp, AlcaSiPixelAliHarvester0T_cff::method, NODEF, nullptr, 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, electronIdCutBased_cfi::threshold, and L1MuDTTrackAssembler::trackBitMap().

Referenced by PtAU().

378  {
379 
380  // determine which pt-assignment method should be used as a function
381  // of the track class and
382  // of the phib values of the track segments making up this track candidate.
383 
384  // get bitmap of track candidate
385  const bitset<4> s = m_sp.TA()->trackBitMap(m_id);
386 
387  int method = -1;
388 
389  if ( s.test(0) && s.test(3) ) method = 2; // stations 1 and 4
390  if ( s.test(0) && s.test(2) ) method = 1; // stations 1 and 3
391  if ( s.test(0) && s.test(1) ) method = 0; // stations 1 and 2
392  if ( !s.test(0) && s.test(1) && s.test(3) ) method = 4; // stations 2 and 4
393  if ( !s.test(0) && s.test(1) && s.test(2) ) method = 3; // stations 2 and 3
394  if ( !s.test(0) && !s.test(1) && s.test(2) && s.test(3) ) method = 5; // stations 3 and 4
395 
396  if ( m_sp.ovl() ) {
397  int adr = m_addArray.station(3);
398  bool s5 = (adr == 15) ? false : ((adr/2)%2 == 1);
399  if ( s.test(0) && s.test(3) ) method = 8; // stations 1 and 4
400  if ( s.test(0) && s.test(2) && s5 ) method = 12; // stations 1 and 5
401  if ( s.test(0) && s.test(2) && !s5 ) method = 7; // stations 1 and 3
402  if ( s.test(0) && s.test(1) ) method = 6; // stations 1 and 2
403  if ( !s.test(0) && s.test(1) && s.test(3) ) method = 10; // stations 2 and 4
404  if ( !s.test(0) && s.test(1) && s.test(2) && s5 ) method = 13; // stations 2 and 5
405  if ( !s.test(0) && s.test(1) && s.test(2) && !s5 ) method = 9; // stations 2 and 3
406  if ( !s.test(0) && !s.test(1) && s.test(2) && s.test(3) ) method = 11; // stations 3 and 4
407  }
408 
409  int threshold = thePtaLUTs->getPtLutThreshold(method);
410 
411  // phib values of track segments from stations 1, 2 and 4
412  int phib1 = ( getTSphi(1) != nullptr ) ? getTSphi(1)->phib() : 0;
413  int phib2 = ( getTSphi(2) != nullptr ) ? getTSphi(2)->phib() : 0;
414  int phib4 = ( getTSphi(4) != nullptr ) ? getTSphi(4)->phib() : 0;
415 
416  PtAssMethod pam = NODEF;
417 
418  switch ( method ) {
419  case 0 : { pam = ( abs(phib1) < threshold ) ? PT12H : PT12L; break; }
420  case 1 : { pam = ( abs(phib1) < threshold ) ? PT13H : PT13L; break; }
421  case 2 : { pam = ( abs(phib1) < threshold ) ? PT14H : PT14L; break; }
422  case 3 : { pam = ( abs(phib2) < threshold ) ? PT23H : PT23L; break; }
423  case 4 : { pam = ( abs(phib2) < threshold ) ? PT24H : PT24L; break; }
424  case 5 : { pam = ( abs(phib4) < threshold ) ? PT34H : PT34L; break; }
425  case 6 : { pam = ( abs(phib1) < threshold ) ? PT12HO : PT12LO; break; }
426  case 7 : { pam = ( abs(phib1) < threshold ) ? PT13HO : PT13LO; break; }
427  case 8 : { pam = ( abs(phib1) < threshold ) ? PT14HO : PT14LO; break; }
428  case 9 : { pam = ( abs(phib2) < threshold ) ? PT23HO : PT23LO; break; }
429  case 10 : { pam = ( abs(phib2) < threshold ) ? PT24HO : PT24LO; break; }
430  case 11 : { pam = ( abs(phib4) < threshold ) ? PT34HO : PT34LO; break; }
431  case 12 : { pam = ( abs(phib1) < threshold ) ? PT15HO : PT15LO; break; }
432  case 13 : { pam = ( abs(phib2) < threshold ) ? PT25HO : PT25LO; break; }
433  default : ;
434  //cout << "L1MuDTAssignmentUnit : Error in PT ass method evaluation" << endl;
435  }
436 
437  return pam;
438 
439 }
edm::ESHandle< L1MuDTPtaLut > thePtaLUTs
pt-assignment look-up tables
L1MuDTAddressArray m_addArray
#define nullptr
L1MuDTSectorProcessor & m_sp
const L1MuDTTrackAssembler * TA() const
return pointer to Track Assembler
const L1MuDTTrackSegPhi * getTSphi(int station) const
get track segment from a given station
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int phib() const
return phib
int getPtLutThreshold(int pta_ind) const
get pt-assignment LUT threshold
unsigned short station(int stat) const
get address of a given station [1-4]
bool ovl() const
is it an overlap region Sector Processor?
PtAssMethod
const L1MuDTTrackSegPhi * L1MuDTAssignmentUnit::getTSphi ( int  station) const
private

get track segment from a given station

Definition at line 298 of file L1MuDTAssignmentUnit.cc.

References m_TSphi.

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

298  {
299 
300  vector<const L1MuDTTrackSegPhi*>::const_iterator iter;
301  for ( iter = m_TSphi.begin(); iter != m_TSphi.end(); iter++ ) {
302  int stat = (*iter)->station();
303  if ( station == stat ) {
304  return (*iter);
305  break;
306  }
307  }
308 
309  return nullptr;
310 
311 }
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
void L1MuDTAssignmentUnit::PhiAU ( const edm::EventSetup c)

assign phi

Definition at line 146 of file L1MuDTAssignmentUnit.cc.

References L1MuDTTrackFinder::config(), convertSector(), plotBeamSpotDB::first, edm::EventSetup::get(), L1MuDTPhiLut::getDeltaPhi(), L1MuDTTFConfig::getNbitsPhiPhi(), L1MuDTTFConfig::getNbitsPhiPhib(), getTSphi(), L1MuDTSectorProcessor::id(), gen::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().

146  {
147 
148  // calculate phi at station 2 using 8 bits (precision = 2.5 degrees)
149 
150  c.get< L1MuDTPhiLutRcd >().get( thePhiLUTs );
151 
152  int sh_phi = 12 - m_sp.tf().config()->getNbitsPhiPhi();
153  int sh_phib = 10 - m_sp.tf().config()->getNbitsPhiPhib();
154 
155  const L1MuDTTrackSegPhi* second = getTSphi(2); // track segment at station 2
156  const L1MuDTTrackSegPhi* first = getTSphi(1); // track segment at station 1
157  const L1MuDTTrackSegPhi* forth = getTSphi(4); // track segment at station 4
158 
159  int phi2 = 0; // phi-value at station 2
160  int sector = 0;
161 
162  if ( second ) {
163  phi2 = second->phi() >> sh_phi;
164  sector = second->sector();
165  }
166  else if ( second == nullptr && first ) {
167  phi2 = first->phi() >> sh_phi;
168  sector = first->sector();
169  }
170  else if ( second == nullptr && forth ) {
171  phi2 = forth->phi() >> sh_phi;
172  sector = forth->sector();
173  }
174 
175  int sector0 = m_sp.id().sector();
176 
177  // convert sector difference to values in the range -6 to +5
178 
179  int sectordiff = (sector - sector0)%12;
180  if ( sectordiff >= 6 ) sectordiff -= 12;
181  if ( sectordiff < -6 ) sectordiff += 12;
182 
183  // assert( abs(sectordiff) <= 1 );
184 
185  // get sector center in 8 bit coding
186  int sector_8 = convertSector(sector0);
187 
188  // convert phi to 2.5 degree precision
189  int phi_precision = 4096 >> sh_phi;
190  const double k = 57.2958/2.5/static_cast<float>(phi_precision);
191  double phi_f = static_cast<double>(phi2);
192  int phi_8 = static_cast<int>(floor(phi_f*k));
193 
194  if ( second == nullptr && first ) {
195  int bend_angle = (first->phib() >> sh_phib) << sh_phib;
196  phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(0,bend_angle);
197  }
198  else if ( second == nullptr && forth ) {
199  int bend_angle = (forth->phib() >> sh_phib) << sh_phib;
200  phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(1,bend_angle);
201  }
202 
203  phi_8 += sectordiff*12;
204 
205  if (phi_8 > 15) phi_8 = 15;
206  if (phi_8 < -16) phi_8 = -16;
207 
208  int phi = (sector_8 + phi_8 + 144)%144;
209  phi_8 = (phi_8 + 32)%32;
210 
211  m_sp.track(m_id)->setPhi(phi);
212  m_sp.tracK(m_id)->setPhi(phi_8);
213 
214 }
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
edm::ESHandle< L1MuDTPhiLut > thePhiLUTs
phi-assignment look-up tables
int phi() const
return phi
int sector() const
return sector number
U second(std::pair< T, U > const &p)
L1MuDTSectorProcessor & m_sp
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
const L1MuDTTrackSegPhi * getTSphi(int station) const
get track segment from a given station
int phib() const
return phib
const L1MuDTSecProcId & id() const
return Sector Processor identifier
int k[5][pyjets_maxn]
int convertSector(int)
convert sector Id to 8 bit code (= sector center)
static L1MuDTTFConfig * config()
return configuration
T get() const
Definition: EventSetup.h:63
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
int sector() const
return sector
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
int getNbitsPhiPhi() const
void setPhi(int phi)
set phi-code of muon candidate
Definition: L1MuDTTrack.h:138
int getNbitsPhiPhib() const
int L1MuDTAssignmentUnit::phiDiff ( int  stat1,
int  stat2 
) const
private

build difference of two phi values

Definition at line 503 of file L1MuDTAssignmentUnit.cc.

References getTSphi(), nbit_phi, PFRecoTauDiscriminationByIsolation_cfi::offset, L1MuDTTrackSegPhi::phi(), and L1MuDTTrackSegPhi::sector().

Referenced by getPtAddress().

503  {
504 
505  // calculate bit shift
506 
507  int sh_phi = 12 - nbit_phi;
508 
509  // get 2 phi values and add offset (30 degrees ) for adjacent sector
510  int sector1 = getTSphi(stat1)->sector();
511  int sector2 = getTSphi(stat2)->sector();
512  int phi1 = getTSphi(stat1)->phi() >> sh_phi;
513  int phi2 = getTSphi(stat2)->phi() >> sh_phi;
514 
515  // convert sector difference to values in the range -6 to +5
516 
517  int sectordiff = (sector2 - sector1)%12;
518  if ( sectordiff >= 6 ) sectordiff -= 12;
519  if ( sectordiff < -6 ) sectordiff += 12;
520 
521  // assert( abs(sectordiff) <= 1 );
522 
523  int offset = (2144 >> sh_phi) * sectordiff;
524  int bendangle = (phi2 - phi1 + offset) << sh_phi;
525 
526  return bendangle;
527 
528 }
int phi() const
return phi
unsigned short nbit_phi
of bits used for pt-assignment
const L1MuDTTrackSegPhi * getTSphi(int station) const
get track segment from a given station
int sector() const
return sector
void L1MuDTAssignmentUnit::PtAU ( const edm::EventSetup c)

assign pt and charge

Definition at line 220 of file L1MuDTAssignmentUnit.cc.

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

Referenced by run().

220  {
221 
222  c.get< L1MuDTPtaLutRcd >().get( thePtaLUTs );
223 
224  // get pt-assignment method as function of track class and TS phib values
226 
227  // get input address for look-up table
228  int bend_angle = getPtAddress(m_ptAssMethod);
229  int bend_carga = getPtAddress(m_ptAssMethod, 1);
230 
231  // retrieve pt value from look-up table
232  int lut_idx = m_ptAssMethod;
233  int pt = thePtaLUTs->getPt(lut_idx,bend_angle );
234 
235  m_sp.track(m_id)->setPt(pt);
236  m_sp.tracK(m_id)->setPt(pt);
237 
238  // assign charge
239  int chsign = getCharge(m_ptAssMethod);
240  int charge = ( bend_carga >= 0 ) ? chsign : -1 * chsign;
241  m_sp.track(m_id)->setCharge(charge);
242  m_sp.tracK(m_id)->setCharge(charge);
243 
244 }
int getPt(int pta_ind, int address) const
get pt-value for a given address
void setPt(int pt)
set pt-code of muon candidate
Definition: L1MuDTTrack.h:147
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
edm::ESHandle< L1MuDTPtaLut > thePtaLUTs
pt-assignment look-up tables
int getCharge(PtAssMethod)
determine charge
L1MuDTSectorProcessor & m_sp
int getPtAddress(PtAssMethod, int bendcharge=0) const
calculate bend angle
T get() const
Definition: EventSetup.h:63
PtAssMethod getPtMethod() const
determine pt assignment method
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
void setCharge(int charge)
set charge of muon candidate
Definition: L1MuDTTrack.h:150
void L1MuDTAssignmentUnit::QuaAU ( )

assign quality

Definition at line 250 of file L1MuDTAssignmentUnit.cc.

References m_id, m_sp, jets_cff::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().

250  {
251 
252  unsigned int quality = 0;
253 
254  const TrackClass tc = m_sp.TA()->trackClass(m_id);
255 
256  switch ( tc ) {
257  case T1234 : { quality = 7; break; }
258  case T123 : { quality = 6; break; }
259  case T124 : { quality = 6; break; }
260  case T134 : { quality = 5; break; }
261  case T234 : { quality = 4; break; }
262  case T12 : { quality = 3; break; }
263  case T13 : { quality = 3; break; }
264  case T14 : { quality = 3; break; }
265  case T23 : { quality = 2; break; }
266  case T24 : { quality = 2; break; }
267  case T34 : { quality = 1; break; }
268  default : { quality = 0; break; }
269  }
270 
271  m_sp.track(m_id)->setQuality(quality);
272  m_sp.tracK(m_id)->setQuality(quality);
273 
274 }
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
L1MuDTSectorProcessor & m_sp
const L1MuDTTrackAssembler * TA() const
return pointer to Track Assembler
void setQuality(unsigned int quality)
set quality of muon candidate
Definition: L1MuDTTrack.h:153
TrackClass trackClass(int id) const
return Track Class of found track
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
void L1MuDTAssignmentUnit::reset ( void  )
overridevirtual

reset Assignment Unit

Implements L1AbstractProcessor.

Definition at line 134 of file L1MuDTAssignmentUnit.cc.

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

Referenced by L1MuDTAssignmentUnit().

134  {
135 
136  m_addArray.reset();
137  m_TSphi.clear();
139 
140 }
void reset()
reset address array
L1MuDTAddressArray m_addArray
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
void L1MuDTAssignmentUnit::run ( const edm::EventSetup c)
overridevirtual

run Assignment Unit

Reimplemented from L1AbstractProcessor.

Definition at line 85 of file L1MuDTAssignmentUnit.cc.

References L1MuDTTrackAssembler::address(), 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().

85  {
86 
87  // enable track candidate
88  m_sp.track(m_id)->enable();
89  m_sp.tracK(m_id)->enable();
90 
91  // set track class
92  TrackClass tc = m_sp.TA()->trackClass(m_id);
93  m_sp.track(m_id)->setTC(tc);
94  m_sp.tracK(m_id)->setTC(tc);
95 
96  // get relative addresses of matching track segments
100 
101  // get track segments (track segment router)
102  TSR();
105 
106  // set bunch-crossing (use first track segment)
107  vector<const L1MuDTTrackSegPhi*>::const_iterator iter = m_TSphi.begin();
108  int bx = (*iter)->bx();
109  m_sp.track(m_id)->setBx(bx);
110  m_sp.tracK(m_id)->setBx(bx);
111 
112  // assign phi
113  PhiAU(c);
114 
115  // assign pt and charge
116  PtAU(c);
117 
118  // assign quality
119  QuaAU();
120 
121  // special hack for overlap region
122  // for ( iter = m_TSphi.begin(); iter != m_TSphi.end(); iter++ ) {
123  // int wheel = abs((*iter)->wheel());
124  // if ( wheel == 3 && (*iter)->etaFlag() ) m_sp.track(m_id)->disable();
125  // if ( wheel == 3 && (*iter)->etaFlag() ) m_sp.tracK(m_id)->disable();
126  // }
127 
128 }
void PtAU(const edm::EventSetup &c)
assign pt and charge
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
void QuaAU()
assign quality
void setTSphi(const std::vector< const L1MuDTTrackSegPhi * > &tsList)
set phi track segments used to form the muon candidate
Definition: L1MuDTTrack.cc:168
void setTC(TrackClass tc)
set track-class of muon candidate
Definition: L1MuDTTrack.h:135
L1MuDTAddressArray m_addArray
void setAddresses(const L1MuDTAddressArray &addr)
set relative addresses of muon candidate
Definition: L1MuDTTrack.h:156
void enable()
enable muon candidate
Definition: L1MuDTTrack.h:126
L1MuDTSectorProcessor & m_sp
void setBx(int bx)
Set Bunch Crossing.
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
const L1MuDTTrackAssembler * TA() const
return pointer to Track Assembler
void TSR()
Track Segment Router.
void PhiAU(const edm::EventSetup &c)
assign phi
TrackClass trackClass(int id) const
return Track Class of found track
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
int address(int id, int stat) const
get address of a single station of selected track candidate
void L1MuDTAssignmentUnit::setPrecision ( )

set precision of phi and phib

Definition at line 535 of file L1MuDTAssignmentUnit.cc.

References L1MuDTTrackFinder::config(), L1MuDTTFConfig::getNbitsPtaPhi(), L1MuDTTFConfig::getNbitsPtaPhib(), m_sp, nbit_phi, nbit_phib, and L1MuDTSectorProcessor::tf().

Referenced by L1MuDTAssignmentUnit().

535  {
536 
539 
540 }
unsigned short nbit_phib
of bits used for pt-assignment
int getNbitsPtaPhib() const
L1MuDTSectorProcessor & m_sp
unsigned short nbit_phi
of bits used for pt-assignment
int getNbitsPtaPhi() const
static L1MuDTTFConfig * config()
return configuration
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
void L1MuDTAssignmentUnit::TSR ( )
private

Track Segment Router.

Definition at line 280 of file L1MuDTAssignmentUnit.cc.

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

Referenced by run().

280  {
281 
282  // get the track segments from the data buffer
283  const L1MuDTTrackSegPhi* ts = nullptr;
284  for ( int stat = 1; stat <= 4; stat++ ) {
285  int adr = m_addArray.station(stat);
286  if ( adr != 15 ) {
287  ts = m_sp.data()->getTSphi(stat,adr);
288  if ( ts != nullptr ) m_TSphi.push_back( ts );
289  }
290  }
291 
292 }
L1MuDTAddressArray m_addArray
const L1MuDTDataBuffer * data() const
return pointer to Data Buffer
L1MuDTSectorProcessor & m_sp
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
const TSPhivector & getTSphi() const
get all track segments from the buffer
unsigned short station(int stat) const
get address of a given station [1-4]

Member Data Documentation

L1MuDTAddressArray L1MuDTAssignmentUnit::m_addArray
private

Definition at line 106 of file L1MuDTAssignmentUnit.h.

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

int L1MuDTAssignmentUnit::m_id
private

Definition at line 104 of file L1MuDTAssignmentUnit.h.

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

PtAssMethod L1MuDTAssignmentUnit::m_ptAssMethod
private

Definition at line 108 of file L1MuDTAssignmentUnit.h.

Referenced by PtAU(), and reset().

L1MuDTSectorProcessor& L1MuDTAssignmentUnit::m_sp
private

Definition at line 103 of file L1MuDTAssignmentUnit.h.

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

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

Definition at line 107 of file L1MuDTAssignmentUnit.h.

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

unsigned short L1MuDTAssignmentUnit::nbit_phi
private

of bits used for pt-assignment

Definition at line 112 of file L1MuDTAssignmentUnit.h.

Referenced by phiDiff(), and setPrecision().

unsigned short L1MuDTAssignmentUnit::nbit_phib
private

of bits used for pt-assignment

Definition at line 113 of file L1MuDTAssignmentUnit.h.

Referenced by setPrecision().

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

phi-assignment look-up tables

Definition at line 110 of file L1MuDTAssignmentUnit.h.

Referenced by PhiAU().

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

pt-assignment look-up tables

Definition at line 111 of file L1MuDTAssignmentUnit.h.

Referenced by getPtMethod(), and PtAU().