108 vector<const L1MuDTTrackSegPhi*>::const_iterator iter =
m_TSphi.begin();
109 int bx = (*iter)->bx();
158 phi2 =
second->phi() >> sh_phi;
161 phi2 =
first->phi() >> sh_phi;
163 }
else if (
second ==
nullptr && forth) {
164 phi2 = forth->
phi() >> sh_phi;
172 int sectordiff = (
sector - sector0) % 12;
184 int phi_precision = 4096 >> sh_phi;
185 const double k = 57.2958 / 2.5 /
static_cast<float>(phi_precision);
186 double phi_f =
static_cast<double>(phi2);
187 int phi_8 =
static_cast<int>(floor(phi_f *
k));
192 }
else if (
second ==
nullptr && forth) {
197 phi_8 += sectordiff * 12;
204 int phi = (sector_8 + phi_8 + 144) % 144;
205 phi_8 = (phi_8 + 32) % 32;
233 int charge = (bend_carga >= 0) ? chsign : -1 * chsign;
321 vector<const L1MuDTTrackSegPhi*>::const_iterator iter;
323 int stat = (*iter)->station();
338 const int sectorvalues[12] = {0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132};
340 return sectorvalues[
sector];
485 if (
s.test(0) &&
s.test(3))
487 if (
s.test(0) &&
s.test(2))
489 if (
s.test(0) &&
s.test(1))
491 if (!
s.test(0) &&
s.test(1) &&
s.test(3))
493 if (!
s.test(0) &&
s.test(1) &&
s.test(2))
495 if (!
s.test(0) && !
s.test(1) &&
s.test(2) &&
s.test(3))
500 bool s5 = (adr == 15) ?
false : ((adr / 2) % 2 == 1);
501 if (
s.test(0) &&
s.test(3))
503 if (
s.test(0) &&
s.test(2) && s5)
505 if (
s.test(0) &&
s.test(2) && !s5)
507 if (
s.test(0) &&
s.test(1))
509 if (!
s.test(0) &&
s.test(1) &&
s.test(3))
511 if (!
s.test(0) &&
s.test(1) &&
s.test(2) && s5)
513 if (!
s.test(0) &&
s.test(1) &&
s.test(2) && !s5)
515 if (!
s.test(0) && !
s.test(1) &&
s.test(2) &&
s.test(3))
720 bendangle = (bendangle + 8192) % 4096;
721 if (bendangle > 2047)
729 bendangle = (bendangle + 2048) % 1024;
760 int offset = (2144 >> sh_phi) * sectordiff;
unsigned short station(int stat) const
get address of a given station [1-4]
int address(int id, int stat) const
get address of a single station of selected track candidate
int getPtLutThreshold(int pta_ind) const
get pt-assignment LUT threshold
void PtAU(const edm::EventSetup &c)
assign pt and charge
int getNbitsPtaPhi() const
void setPt(int pt)
set pt-code of muon candidate
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
bool ovl() const
is it an overlap region Sector Processor?
void QuaAU()
assign quality
unsigned short nbit_phib
of bits used for pt-assignment
void reset()
reset address array
const L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
int getNbitsPtaPhib() const
edm::ESGetToken< L1MuDTPtaLut, L1MuDTPtaLutRcd > thePtaToken
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
int sector() const
return sector number
int getCharge(PtAssMethod)
determine charge
const L1MuDTTrackSegPhi * getTSphi(int station) const
get track segment from a given station
int phib() const
return phib
void setTC(TrackClass tc)
set track-class of muon candidate
L1MuDTAddressArray m_addArray
const L1MuDTDataBuffer * data() const
return pointer to Data Buffer
const TSPhivector & getTSphi() const
get all track segments from the buffer
void setAddresses(const L1MuDTAddressArray &addr)
set relative addresses of muon candidate
void run(const edm::EventSetup &c)
run Assignment Unit
void enable()
enable muon candidate
edm::ESHandle< L1MuDTPtaLut > thePtaLUTs
pt-assignment look-up tables
U second(std::pair< T, U > const &p)
L1MuDTSectorProcessor & m_sp
void setBx(int bx)
Set Bunch Crossing.
std::vector< const L1MuDTTrackSegPhi * > m_TSphi
const L1MuDTSecProcId & id() const
return Sector Processor identifier
PtAssMethod getPtMethod() const
determine pt assignment method
void reset()
reset Assignment Unit
unsigned short nbit_phi
of bits used for pt-assignment
int phiDiff(int stat1, int stat2) const
build difference of two phi values
~L1MuDTAssignmentUnit()
destructor
PtAssMethod m_ptAssMethod
void TSR()
Track Segment Router.
int getNbitsPhiPhi() const
int phi() const
return phi
void setTSphi(const std::vector< const L1MuDTTrackSegPhi *> &tsList)
set phi track segments used to form the muon candidate
Abs< T >::type abs(const T &t)
int getPtAddress(PtAssMethod, int bendcharge=0) const
calculate bend angle
void setQuality(unsigned int quality)
set quality of muon candidate
L1MuDTAssignmentUnit(L1MuDTSectorProcessor &sp, int id, edm::ConsumesCollector)
constructor
const L1MuDTTFConfig * config() const
return configuration
int convertSector(int)
convert sector Id to 8 bit code (= sector center)
void PhiAU(const edm::EventSetup &c)
assign phi
void setPrecision()
set precision of phi and phib
int sector() const
return sector
TrackClass trackClass(int id) const
return Track Class of found track
edm::ESGetToken< L1MuDTPhiLut, L1MuDTPhiLutRcd > thePhiToken
edm::ESHandle< L1MuDTPhiLut > thePhiLUTs
phi-assignment look-up tables
const L1MuDTTrackAssembler * TA() const
return pointer to Track Assembler
int getNbitsPhiPhib() const
const L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
int getPt(int pta_ind, int address) const
get pt-value for a given address
int bitShift(int num, int bits)
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
void setPhi(int phi)
set phi-code of muon candidate
void setCharge(int charge)
set charge of muon candidate