96 vector<const L1MuBMTrackSegPhi*>::const_iterator iter =
m_TSphi.begin();
97 int bx = (*iter)->bx();
137 phi2 = second->
phi() >> sh_phi;
138 sector = second->
sector();
139 }
else if (second ==
nullptr && first) {
140 phi2 = first->
phi() >> sh_phi;
142 }
else if (second ==
nullptr && forth) {
143 phi2 = forth->
phi() >> sh_phi;
151 int sectordiff = (sector - sector0) % 12;
158 int phi_precision = 4096 >> sh_phi;
159 const double k = 57.2958 / 0.625 /
static_cast<float>(phi_precision);
160 double phi_f =
static_cast<double>(phi2);
161 int bit_div_phi =
static_cast<int>(phi2) % 4;
164 phi_f = phi_f -
std::abs(bit_div_phi);
165 int phi_8 =
static_cast<int>(floor(phi_f * k));
167 if (second ==
nullptr && first) {
168 int bend_angle = (first->
phib() >> sh_phib) << sh_phib;
171 }
else if (second ==
nullptr && forth) {
172 int bend_angle = (forth->
phib() >> sh_phib) << sh_phib;
179 phi_8 += sectordiff * 48;
181 int phi = phi_8 + 24;
222 if (
abs(bend_angle) < 512)
227 if (
abs(bend_angle) < 512)
240 int charge = (bend_carga >= 0) ? chsign : -1 * chsign;
394 vector<const L1MuBMTrackSegPhi*>::const_iterator iter;
396 int stat = (*iter)->station();
397 if (station == stat) {
411 const int sectorvalues[12] = {0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132};
413 return sectorvalues[sector];
499 if (s.test(0) && s.test(3))
501 if (s.test(0) && s.test(2))
503 if (s.test(0) && s.test(1))
505 if (!s.test(0) && s.test(1) && s.test(3))
507 if (!s.test(0) && s.test(1) && s.test(2))
509 if (!s.test(0) && !s.test(1) && s.test(2) && s.test(3))
619 bendangle = (bendangle + 8192) % 4096;
620 if (bendangle > 2047)
628 bendangle = (bendangle + 2048) % 1024;
651 int sectordiff = (sector2 - sector1) % 12;
659 int offset = (2144 >> sh_phi) * sectordiff;
660 int bendangle = (phi2 - phi1 +
offset) << sh_phi;
761 int bendangle = -999;
807 int bendangle = -999;
L1MuBMLUTHandler::PtAssMethod getPtMethod() const
determine pt assignment method
void setTC(TrackClass tc)
set track-class of muon candidate
static int getNbitsPhiPhi()
void setPt(int pt)
set pt-code of muon candidate
static int getNbitsPhiPhib()
L1MuBMAssignmentUnit(L1MuBMSectorProcessor &sp, int id)
constructor
void QuaAU()
assign quality
int getPt(int pta_ind, int address) const
get pt-value for a given address
uint32_t const *__restrict__ Quality * quality
void setQuality(unsigned int quality)
set quality of muon candidate
void setPhi(int phi)
set phi-code of muon candidate
int getPtAddress(L1MuBMLUTHandler::PtAssMethod, int bendcharge=0) const
calculate bend angle
void setAddresses(const L1MuBMAddressArray &addr)
set relative addresses of muon candidate
static int getNbitsPtaPhi()
void setCharge(int charge)
set charge of muon candidate
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
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
~L1MuBMAssignmentUnit()
destructor
Abs< T >::type abs(const T &t)
const L1MuBMTrackAssembler * TA() const
return pointer to Track Assembler
void setBx(int bx)
set charge of muon candidate
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
void PtAU(const L1TMuonBarrelParams &)
assign pt and charge
void PhiAU(const L1TMuonBarrelParams &)
assign phi
int getPt1Address(L1MuBMLUTHandler::PtAssMethod) const
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
void run(const L1TMuonBarrelParams &mbtfParams)
run Assignment Unit
void setTSphi(const std::vector< const L1MuBMTrackSegPhi * > &tsList)
set phi track segments used to form the muon candidate
L1MuBMAddressArray m_addArray
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 getPt2Address(L1MuBMLUTHandler::PtAssMethod) const
bool get_DisableNewAlgo() const
L1MuBMLUTHandler::PtAssMethod getPt2Method(L1MuBMLUTHandler::PtAssMethod) const
int phiDiff(int stat1, int stat2) const
build difference of two phi values
L1MuBMSectorProcessor & m_sp
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