CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuBMAssignmentUnit.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuBMAssignmentUnit
4 //
5 // Description: Assignment Unit
6 //
7 //
8 //
9 // Author :
10 // N. Neumeister CERN EP
11 // J. Troconiz UAM Madrid
12 // Modifications:
13 // G. Flouris U. Ioannina
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
19 
20 #include "L1MuBMAssignmentUnit.h"
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 #include <iostream>
27 #include <cmath>
28 #include <cassert>
29 
30 //-------------------------------
31 // Collaborating Class Headers --
32 //-------------------------------
33 
34 #include "L1MuBMTFConfig.h"
35 #include "L1MuBMSectorProcessor.h"
36 #include "L1MuBMDataBuffer.h"
37 #include "L1MuBMTrackSegPhi.h"
38 #include "L1MuBMTrackSegLoc.h"
39 #include "L1MuBMTrackAssembler.h"
40 #include "L1MuBMTrackAssParam.h"
41 
42 #include <iostream>
43 #include <iomanip>
44 
45 using namespace std;
46 // --------------------------------
47 // class L1MuBMAssignmentUnit
48 //---------------------------------
49 
50 //----------------
51 // Constructors --
52 //----------------
53 
55  m_sp(sp), m_id(id),
56  m_addArray(), m_TSphi(), m_ptAssMethod(L1MuBMLUTHandler::NODEF ) {
57 
58  m_TSphi.reserve(4); // a track candidate can consist of max 4 TS
59  reset();
60  setPrecision();
61 
62 }
63 
64 
65 //--------------
66 // Destructor --
67 //--------------
68 
70 }
71 
72 
73 //--------------
74 // Operations --
75 //--------------
76 
77 //
78 // run Assignment Unit
79 //
81 
82  // enable track candidate
83  m_sp.track(m_id)->enable();
84  m_sp.tracK(m_id)->enable();
85 
86  // set track class
87  TrackClass tc = m_sp.TA()->trackClass(m_id);
88  m_sp.track(m_id)->setTC(tc);
89  m_sp.tracK(m_id)->setTC(tc);
90 
91  // get relative addresses of matching track segments
95 
96  // get track segments (track segment router)
97  TSR();
100 
101  // set bunch-crossing (use first track segment)
102  vector<const L1MuBMTrackSegPhi*>::const_iterator iter = m_TSphi.begin();
103  int bx = (*iter)->bx();
104  m_sp.track(m_id)->setBx(bx);
105  m_sp.tracK(m_id)->setBx(bx);
106 
107  // assign phi
108  PhiAU(c);
109 
110  // assign pt and charge
111  PtAU(c);
112 
113  // assign quality
114  QuaAU();
115 
116 }
117 
118 
119 //
120 // reset Assignment Unit
121 //
123 
124  m_addArray.reset();
125  m_TSphi.clear();
127 
128 }
129 
130 
131 //
132 // assign phi with 8 bit precision
133 //
135 
136  const L1TMuonBarrelParamsRcd& bmtfParamsRcd = c.get<L1TMuonBarrelParamsRcd>();
137  bmtfParamsRcd.get(bmtfParamsHandle);
138  const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle.product();
139  thePhiLUTs = new L1MuBMLUTHandler(bmtfParams);
140  //thePhiLUTs->print();
141  // calculate phi at station 2 using 8 bits (precision = 0.625 degrees)
142  int sh_phi = 12 - L1MuBMTFConfig::getNbitsPhiPhi();
143  int sh_phib = 10 - L1MuBMTFConfig::getNbitsPhiPhib();
144 
145  const L1MuBMTrackSegPhi* second = getTSphi(2); // track segment at station 2
146  const L1MuBMTrackSegPhi* first = getTSphi(1); // track segment at station 1
147  const L1MuBMTrackSegPhi* forth = getTSphi(4); // track segment at station 4
148 
149  int phi2 = 0; // phi-value at station 2
150  int sector = 0;
151  if ( second ) {
152  phi2 = second->phi() >> sh_phi;
153  sector = second->sector();
154  }
155  else if ( second == 0 && first ) {
156  phi2 = first->phi() >> sh_phi;
157  sector = first->sector();
158  }
159  else if ( second == 0 && forth ) {
160  phi2 = forth->phi() >> sh_phi;
161  sector = forth->sector();
162  }
163 
164  int sector0 = m_sp.id().sector();
165 
166  // convert sector difference to values in the range -6 to +5
167 
168  int sectordiff = (sector - sector0)%12;
169  if ( sectordiff >= 6 ) sectordiff -= 12;
170  if ( sectordiff < -6 ) sectordiff += 12;
171 
172  // convert phi to 0.625 degree precision
173  int phi_precision = 4096 >> sh_phi;
174  const double k = 57.2958/0.625/static_cast<float>(phi_precision);
175  double phi_f = static_cast<double>(phi2);
176  int phi_8 = static_cast<int>(floor(phi_f*k));
177 
178  if ( second == 0 && first ) {
179  int bend_angle = (first->phib() >> sh_phib) << sh_phib;
180  phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(0,bend_angle);
181  //phi_8 = phi_8 + getDeltaPhi(0, bend_angle, bmtfParams->phi_lut());
182  }
183  else if ( second == 0 && forth ) {
184 
185  int bend_angle = (forth->phib() >> sh_phib) << sh_phib;
186  phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(1,bend_angle);
187  //phi_8 = phi_8 + getDeltaPhi(1, bend_angle, bmtfParams->phi_lut());
188  }
189 
190  //If muon is found at the neighbour sector - second station
191  //a shift is needed by 48
192  phi_8 += sectordiff*48;
193 
194  int phi = phi_8 + 24;
195  if (phi > 55) phi = 55;
196  if (phi < -8) phi = -8;
197 
198  m_sp.track(m_id)->setPhi(phi); // Regional
199  m_sp.tracK(m_id)->setPhi(phi);
200 
201 delete thePhiLUTs;
202 }
203 
204 
205 //
206 // assign pt with 5 bit precision
207 //
209 
210  const L1TMuonBarrelParamsRcd& bmtfParamsRcd = c.get<L1TMuonBarrelParamsRcd>();
211  bmtfParamsRcd.get(bmtfParamsHandle);
212  const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle.product();
213  thePtaLUTs = new L1MuBMLUTHandler(bmtfParams);
214  //thePtaLUTs->print();
215  // get pt-assignment method as function of track class and TS phib values
216  //m_ptAssMethod = getPtMethod(bmtfParams);
218  // get input address for look-up table
219  int bend_angle = getPtAddress(m_ptAssMethod);
220  int bend_carga = getPtAddress(m_ptAssMethod, 1);
221 
222  // retrieve pt value from look-up table
223  int lut_idx = m_ptAssMethod;
224  int pt = thePtaLUTs->getPt(lut_idx,bend_angle );
225  //int pt = getPt(lut_idx, bend_angle, bmtfParams->pta_lut());
226 
227 if(bmtfParams.fwVersion()==2){
228  if (Quality() < 4) {
229  int ptj = pt;
232  if (jj1 != L1MuBMLUTHandler::NODEF) {
233  lut_idx = jj1;
234  bend_angle = getPt1Address(m_ptAssMethod);
235  if (abs(bend_angle) < 512) ptj = thePtaLUTs->getPt(lut_idx,bend_angle );
236  }
237  else if (jj2 != L1MuBMLUTHandler::NODEF) {
238  lut_idx = jj2;
239  bend_angle = getPt2Address(m_ptAssMethod);
240  if (abs(bend_angle) < 512) ptj = thePtaLUTs->getPt(lut_idx,bend_angle );
241  }
242  if (ptj < pt) pt = ptj;
243  }
244 }
245 
246  m_sp.track(m_id)->setPt(pt);
247  m_sp.tracK(m_id)->setPt(pt);
248 
249  // assign charge
250  int chsign = getCharge(m_ptAssMethod);
251  int charge = ( bend_carga >= 0 ) ? chsign : -1 * chsign;
252  m_sp.track(m_id)->setCharge(charge);
253  m_sp.tracK(m_id)->setCharge(charge);
254  delete thePtaLUTs;
255 
256 }
257 
258 
259 //
260 // assign 4 bit quality code
261 //
263 
264  unsigned int quality = 0;
265 
266  const TrackClass tc = m_sp.TA()->trackClass(m_id);
267 
269  switch ( tc ) {
270  case T1234 : { quality = 3; break; }
271  case T123 : { quality = 2; break; }
272  case T124 : { quality = 2; break; }
273  case T134 : { quality = 2; break; }
274  case T234 : { quality = 2; break; }
275  case T12 : { quality = 1; break; }
276  case T13 : { quality = 1; break; }
277  case T14 : { quality = 1; break; }
278  case T23 : { quality = 0; break; }
279  case T24 : { quality = 0; break; }
280  case T34 : { quality = 0; break; }
281  default : { quality = 0; break; }
282  }
283 
285  quality += 12;
286 
287  m_sp.track(m_id)->setQuality(quality);
288  m_sp.tracK(m_id)->setQuality(quality);
289 
290 }
291 
292 
293 //
294 // assign 3 bit quality code
295 //
297 
298  unsigned int quality = 0;
299 
300  const TrackClass tc = m_sp.TA()->trackClass(m_id);
301 
302  switch ( tc ) {
303  case T1234 : { quality = 7; break; }
304  case T123 : { quality = 6; break; }
305  case T124 : { quality = 6; break; }
306  case T134 : { quality = 5; break; }
307  case T234 : { quality = 4; break; }
308  case T12 : { quality = 3; break; }
309  case T13 : { quality = 3; break; }
310  case T14 : { quality = 3; break; }
311  case T23 : { quality = 2; break; }
312  case T24 : { quality = 2; break; }
313  case T34 : { quality = 1; break; }
314  default : { quality = 0; }
315  }
316 
317  return quality;
318 
319 }
320 
321 //
322 // Track Segment Router (TSR)
323 //
325 
326  // get the track segments from the data buffer
327  const L1MuBMTrackSegPhi* ts = 0;
328  for ( int stat = 1; stat <= 4; stat++ ) {
329  int adr = m_addArray.station(stat);
330  if ( adr != 15 ) {
331  ts = m_sp.data()->getTSphi(stat,adr);
332  if ( ts != 0 ) m_TSphi.push_back( ts );
333  }
334  }
335 
336 }
337 
338 
339 //
340 // get track segment from a given station
341 //
343 
344  vector<const L1MuBMTrackSegPhi*>::const_iterator iter;
345  for ( iter = m_TSphi.begin(); iter != m_TSphi.end(); iter++ ) {
346  int stat = (*iter)->station();
347  if ( station == stat ) {
348  return (*iter);
349  break;
350  }
351  }
352 
353  return 0;
354 
355 }
356 
357 
358 //
359 // convert sector Id to a precision of 2.5 degrees using 8 bits (= sector center)
360 //
362 
363  // assert( sector >=0 && sector < 12 );
364  const int sectorvalues[12] = { 0, 12, 24, 36, 48, 60, 72, 84,
365  96, 108, 120, 132 };
366 
367  return sectorvalues[sector];
368 
369 }
370 
371 
372 //
373 // determine charge
374 //
376 
377  int chargesign = 0;
378  switch ( method ) {
379  case L1MuBMLUTHandler::PT12L : { chargesign = -1; break; }
380  case L1MuBMLUTHandler::PT12H : { chargesign = -1; break; }
381  case L1MuBMLUTHandler::PT13L : { chargesign = -1; break; }
382  case L1MuBMLUTHandler::PT13H : { chargesign = -1; break; }
383  case L1MuBMLUTHandler::PT14L : { chargesign = -1; break; }
384  case L1MuBMLUTHandler::PT14H : { chargesign = -1; break; }
385  case L1MuBMLUTHandler::PT23L : { chargesign = -1; break; }
386  case L1MuBMLUTHandler::PT23H : { chargesign = -1; break; }
387  case L1MuBMLUTHandler::PT24L : { chargesign = -1; break; }
388  case L1MuBMLUTHandler::PT24H : { chargesign = -1; break; }
389  case L1MuBMLUTHandler::PT34L : { chargesign = 1; break; }
390  case L1MuBMLUTHandler::PT34H : { chargesign = 1; break; }
391 
392  case L1MuBMLUTHandler::NODEF : { chargesign = 0;
393  // cerr << "AssignmentUnit::getCharge : undefined PtAssMethod!"
394  // << endl;
395  break;
396  }
397  default : { chargesign = 0; }
398  }
399 
400  return chargesign;
401 
402 }
403 
404 
405 //
406 // determine pt-assignment method
407 //
408 //PtAssMethod L1MuBMAssignmentUnit::getPtMethod(L1TMuonBarrelParams *l1tbmparams) const {
410 
411  // determine which pt-assignment method should be used as a function
412  // of the track class and
413  // of the phib values of the track segments making up this track candidate.
414 
415  // get bitmap of track candidate
416  const bitset<4> s = m_sp.TA()->trackBitMap(m_id);
417 
418  int method = -1;
419 
420  if ( s.test(0) && s.test(3) ) method = 2; // stations 1 and 4
421  if ( s.test(0) && s.test(2) ) method = 1; // stations 1 and 3
422  if ( s.test(0) && s.test(1) ) method = 0; // stations 1 and 2
423  if ( !s.test(0) && s.test(1) && s.test(3) ) method = 4; // stations 2 and 4
424  if ( !s.test(0) && s.test(1) && s.test(2) ) method = 3; // stations 2 and 3
425  if ( !s.test(0) && !s.test(1) && s.test(2) && s.test(3) ) method = 5; // stations 3 and 4
426  int threshold = thePtaLUTs->getPtLutThreshold(method);
427 
428  // phib values of track segments from stations 1, 2 and 4
429  int phib1 = ( getTSphi(1) != 0 ) ? getTSphi(1)->phib() : 0;
430  int phib2 = ( getTSphi(2) != 0 ) ? getTSphi(2)->phib() : 0;
431  int phib4 = ( getTSphi(4) != 0 ) ? getTSphi(4)->phib() : 0;
432 
434 
435  switch ( method ) {
436  case 0 : { pam = ( abs(phib1) < threshold ) ? L1MuBMLUTHandler::PT12H : L1MuBMLUTHandler::PT12L; break; }
437  case 1 : { pam = ( abs(phib1) < threshold ) ? L1MuBMLUTHandler::PT13H : L1MuBMLUTHandler::PT13L; break; }
438  case 2 : { pam = ( abs(phib1) < threshold ) ? L1MuBMLUTHandler::PT14H : L1MuBMLUTHandler::PT14L; break; }
439  case 3 : { pam = ( abs(phib2) < threshold ) ? L1MuBMLUTHandler::PT23H : L1MuBMLUTHandler::PT23L; break; }
440  case 4 : { pam = ( abs(phib2) < threshold ) ? L1MuBMLUTHandler::PT24H : L1MuBMLUTHandler::PT24L; break; }
441  case 5 : { pam = ( abs(phib4) < threshold ) ? L1MuBMLUTHandler::PT34H : L1MuBMLUTHandler::PT34L; break; }
442  default : ;
443  //cout << "L1MuBMAssignmentUnit : Error in PT ass method evaluation" << endl;
444  }
445 
446  return pam;
447 
448 }
449 
450 
451 //
452 // calculate bend angle
453 //
455 
456  // calculate bend angle as difference of two azimuthal positions
457 
458  int bendangle = 0;
459  switch (method) {
460  case L1MuBMLUTHandler::PT12L : { bendangle = phiDiff(1,2); break; }
461  case L1MuBMLUTHandler::PT12H : { bendangle = phiDiff(1,2); break; }
462  case L1MuBMLUTHandler::PT13L : { bendangle = phiDiff(1,3); break; }
463  case L1MuBMLUTHandler::PT13H : { bendangle = phiDiff(1,3); break; }
464  case L1MuBMLUTHandler::PT14L : { bendangle = phiDiff(1,4); break; }
465  case L1MuBMLUTHandler::PT14H : { bendangle = phiDiff(1,4); break; }
466  case L1MuBMLUTHandler::PT23L : { bendangle = phiDiff(2,3); break; }
467  case L1MuBMLUTHandler::PT23H : { bendangle = phiDiff(2,3); break; }
468  case L1MuBMLUTHandler::PT24L : { bendangle = phiDiff(2,4); break; }
469  case L1MuBMLUTHandler::PT24H : { bendangle = phiDiff(2,4); break; }
470  case L1MuBMLUTHandler::PT34L : { bendangle = phiDiff(4,3); break; }
471  case L1MuBMLUTHandler::PT34H : { bendangle = phiDiff(4,3); break; }
472  case L1MuBMLUTHandler::NODEF : { bendangle = 0;
473  // cerr << "AssignmentUnit::getPtAddress : undefined PtAssMethod" << endl;
474  break;
475  }
476  default : { bendangle = 0; }
477 
478  }
479 
480  int signo = 1;
481  bendangle = (bendangle+8192)%4096;
482  if ( bendangle > 2047 ) bendangle -= 4096;
483  if ( bendangle < 0 ) signo = -1;
484 
485  if (bendcharge) return signo;
486 
487  bendangle = (bendangle+2048)%1024;
488  if ( bendangle > 511 ) bendangle -= 1024;
489 
490  return bendangle;
491 
492 }
493 
494 
495 //
496 // build difference of two phi values
497 //
498 int L1MuBMAssignmentUnit::phiDiff(int stat1, int stat2) const {
499 
500  // calculate bit shift
501 
502  int sh_phi = 12 - nbit_phi;
503 
504  // get 2 phi values and add offset (30 degrees ) for adjacent sector
505  int sector1 = getTSphi(stat1)->sector();
506  int sector2 = getTSphi(stat2)->sector();
507  int phi1 = getTSphi(stat1)->phi() >> sh_phi;
508  int phi2 = getTSphi(stat2)->phi() >> sh_phi;
509 
510  // convert sector difference to values in the range -6 to +5
511 
512  int sectordiff = (sector2 - sector1)%12;
513  if ( sectordiff >= 6 ) sectordiff -= 12;
514  if ( sectordiff < -6 ) sectordiff += 12;
515 
516  // assert( abs(sectordiff) <= 1 );
517 
518  int offset = (2144 >> sh_phi) * sectordiff;
519  int bendangle = (phi2 - phi1 + offset) << sh_phi;
520 
521  return bendangle;
522 
523 }
524 
525 
526 
527 //
528 // determine pt-assignment method
529 //
531 
532  // quality values of track segments from stations 1, 2 and 4
533  int qual1 = ( getTSphi(1) != 0 ) ? getTSphi(1)->quality() : 0;
534  int qual2 = ( getTSphi(2) != 0 ) ? getTSphi(2)->quality() : 0;
535  int qual4 = ( getTSphi(4) != 0 ) ? getTSphi(4)->quality() : 0;
536 
538 
539  switch ( method ) {
540  case L1MuBMLUTHandler::PT12H : { if (qual1 > 3) pam = L1MuBMLUTHandler::PB12H; break; }
541  case L1MuBMLUTHandler::PT13H : { if (qual1 > 3) pam = L1MuBMLUTHandler::PB13H; break; }
542  case L1MuBMLUTHandler::PT14H : { if (qual1 > 3) pam = L1MuBMLUTHandler::PB14H; break; }
543  case L1MuBMLUTHandler::PT23H : { if (qual2 > 3) pam = L1MuBMLUTHandler::PB23H; break; }
544  case L1MuBMLUTHandler::PT24H : { if (qual2 > 3) pam = L1MuBMLUTHandler::PB24H; break; }
545  case L1MuBMLUTHandler::PT34H : { if (qual4 > 3) pam = L1MuBMLUTHandler::PB34H; break; }
546  case L1MuBMLUTHandler::NODEF : { pam = L1MuBMLUTHandler::NODEF; break;}
547  default : { pam = L1MuBMLUTHandler::NODEF; }
548  }
549 
550  return pam;
551 
552 }
553 
554 
555 //
556 // determine pt-assignment method
557 //
559 
560  // quality values of track segments from stations 2 and 4
561  int qual2 = ( getTSphi(2) != 0 ) ? getTSphi(2)->quality() : 0;
562  // int qual4 = ( getTSphi(4) != 0 ) ? getTSphi(4)->quality() : 0;
563 
565 
566  switch ( method ) {
567  case L1MuBMLUTHandler::PT12H : { if (qual2 > 3) pam = L1MuBMLUTHandler::PB21H; break; }
568  // case PT14H : { if (qual4 > 3) pam = PB34H; break; }
569  // case PT24H : { if (qual4 > 3) pam = PB34H; break; }
570  //case PT12HO : { if (qual2 > 3) pam = PB21HO; break; }
571  // case PT14HO : { if (qual4 > 3) pam = PB34HO; break; }
572  // case PT24HO : { if (qual4 > 3) pam = PB34HO; break; }
573  case L1MuBMLUTHandler::NODEF : { pam = L1MuBMLUTHandler::NODEF; break; }
574  default : { pam = L1MuBMLUTHandler::NODEF; }
575  }
576 
577  return pam;
578 
579 }
580 
581 
582 //
583 // calculate bend angle
584 //
586 
587  // phib values of track segments from stations 1, 2 and 4
588  int phib1 = ( getTSphi(1) != 0 ) ? getTSphi(1)->phib() : -999;
589  int phib2 = ( getTSphi(2) != 0 ) ? getTSphi(2)->phib() : -999;
590  int phib4 = ( getTSphi(4) != 0 ) ? getTSphi(4)->phib() : -999;
591 
592 
593  int bendangle = -999;
594  switch (method) {
595  case L1MuBMLUTHandler::PT12H : { bendangle = phib1; break; }
596  case L1MuBMLUTHandler::PT13H : { bendangle = phib1; break; }
597  case L1MuBMLUTHandler::PT14H : { bendangle = phib1; break; }
598  case L1MuBMLUTHandler::PT23H : { bendangle = phib2; break; }
599  case L1MuBMLUTHandler::PT24H : { bendangle = phib2; break; }
600  case L1MuBMLUTHandler::PT34H : { bendangle = phib4; break; }
601  case L1MuBMLUTHandler::NODEF : { bendangle = -999; break; }
602  default : { bendangle = -999; }
603  }
604 
605  return bendangle;
606 
607 }
608 
609 
610 //
611 // calculate bend angle
612 //
614 
615  // phib values of track segments from stations 1, 2 and 4
616  int phib2 = ( getTSphi(2) != 0 ) ? getTSphi(2)->phib() : -999;
617  int phib4 = ( getTSphi(4) != 0 ) ? getTSphi(4)->phib() : -999;
618 
619 
620  int bendangle = -999;
621  switch (method) {
622  case L1MuBMLUTHandler::PT12H : { bendangle = phib2; break; }
623  case L1MuBMLUTHandler::PT14H : { bendangle = phib4; break; }
624  case L1MuBMLUTHandler::PT24H : { bendangle = phib4; break; }
625  //case L1MuBMLUTHandler::PT12HO : { bendangle = phib2; break; }
626  //case L1MuBMLUTHandler::PT14HO : { bendangle = phib4; break; }
627  //case L1MuBMLUTHandler::PT24HO : { bendangle = phib4; break; }
628  case L1MuBMLUTHandler::NODEF : { bendangle = -999; break; }
629  default : { bendangle = -999; }
630  }
631 
632  return bendangle;
633 
634 }
635 
636 //
637 // set precision for pt-assignment of phi and phib
638 // default is 12 bits for phi and 10 bits for phib
639 //
641 
644 
645 }
646 
647 
648 // static data members
649 
650 unsigned short int L1MuBMAssignmentUnit::nbit_phi = 12;
651 unsigned short int L1MuBMAssignmentUnit::nbit_phib = 10;
L1MuBMLUTHandler::PtAssMethod getPtMethod() const
determine pt assignment method
void setTC(TrackClass tc)
set track-class of muon candidate
Definition: L1MuBMTrack.h:145
static int getNbitsPhiPhi()
void setPt(int pt)
set pt-code of muon candidate
Definition: L1MuBMTrack.h:157
static int getNbitsPhiPhib()
L1MuBMAssignmentUnit(L1MuBMSectorProcessor &sp, int id)
constructor
edm::ESHandle< L1TMuonBarrelParams > bmtfParamsHandle
void QuaAU()
assign quality
int getPt(int pta_ind, int address) const
get pt-value for a given address
void PtAU(const edm::EventSetup &c)
assign pt and charge
void setQuality(unsigned int quality)
set quality of muon candidate
Definition: L1MuBMTrack.h:166
void setPhi(int phi)
set phi-code of muon candidate
Definition: L1MuBMTrack.h:148
int getPtAddress(L1MuBMLUTHandler::PtAssMethod, int bendcharge=0) const
calculate bend angle
void setAddresses(const L1MuBMAddressArray &addr)
set relative addresses of muon candidate
Definition: L1MuBMTrack.h:169
static int getNbitsPtaPhi()
void setCharge(int charge)
set charge of muon candidate
Definition: L1MuBMTrack.h:160
L1MuBMLUTHandler * thePtaLUTs
pt-assignment look-up tables
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]
void TSR()
Track Segment Router.
void enable()
enable muon candidate
Definition: L1MuBMTrack.h:136
std::vector< const L1MuBMTrackSegPhi * > m_TSphi
L1MuBMLUTHandler::PtAssMethod getPt1Method(L1MuBMLUTHandler::PtAssMethod) const
U second(std::pair< T, U > const &p)
L1MuBMTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
int sector() const
return sector number
int phib() const
return phib
static int getNbitsPtaPhib()
static int convertSector(int)
convert sector Id to 8 bit code (= sector center)
L1MuBMLUTHandler * thePhiLUTs
phi-assignment look-up tables
static unsigned short nbit_phib
of bits used for pt-assignment
static void setPrecision()
set precision of phi and phib
TrackClass trackClass(int id) const
return Track Class of found track
virtual void run()
run processor logic
void get(HolderT &iHolder) const
virtual ~L1MuBMAssignmentUnit()
destructor
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const L1MuBMTrackAssembler * TA() const
return pointer to Track Assembler
void setBx(int bx)
set charge of muon candidate
Definition: L1MuBMTrack.h:163
const L1MuBMSecProcId & id() const
return Sector Processor identifier
L1MuBMTrack * track(int id) const
return pointer to muon candidate, index [0,1]
int phi() const
return phi
unsigned fwVersion() const
int getPt1Address(L1MuBMLUTHandler::PtAssMethod) const
m_id("(unknown)")
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
void setTSphi(const std::vector< const L1MuBMTrackSegPhi * > &tsList)
set phi track segments used to form the muon candidate
Definition: L1MuBMTrack.cc:171
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
L1MuBMAddressArray m_addArray
virtual void reset()
reset Assignment Unit
const L1MuBMTrackSegPhi * getTSphi(int station) const
get track segment from a given station
const TSPhivector & getTSphi() const
get all track segments from the buffer
static int getCharge(L1MuBMLUTHandler::PtAssMethod)
determine charge
void reset()
reset address array
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
const L1MuBMDataBuffer * data() const
return pointer to Data Buffer
int station() const
return station
int getPt2Address(L1MuBMLUTHandler::PtAssMethod) const
L1MuBMLUTHandler::PtAssMethod getPt2Method(L1MuBMLUTHandler::PtAssMethod) const
int phiDiff(int stat1, int stat2) const
build difference of two phi values
Definition: sp.h:21
L1MuBMSectorProcessor & m_sp
void PhiAU(const edm::EventSetup &c)
assign phi
static unsigned short nbit_phi
of bits used for pt-assignment
int sector() const
return sector
L1MuBMLUTHandler::PtAssMethod m_ptAssMethod
int address(int id, int stat) const
get address of a single station of selected track candidate
int quality() const
return quality code