97 vector<const L1MuBMTrackSegPhi*>::const_iterator iter =
m_TSphi.begin();
98 int bx = (*iter)->bx();
138 phi2 =
second->phi() >> sh_phi;
141 phi2 =
first->phi() >> sh_phi;
143 }
else if (
second ==
nullptr && forth) {
144 phi2 = forth->
phi() >> sh_phi;
152 int sectordiff = (
sector - sector0) % 12;
159 int phi_precision = 4096 >> sh_phi;
160 const double k = 57.2958 / 0.625 /
static_cast<float>(phi_precision);
161 double phi_f =
static_cast<double>(phi2);
162 int bit_div_phi =
static_cast<int>(phi2) % 4;
165 phi_f = phi_f -
std::abs(bit_div_phi);
166 int phi_8 =
static_cast<int>(floor(phi_f *
k));
172 }
else if (
second ==
nullptr && forth) {
180 phi_8 += sectordiff * 48;
182 int phi = phi_8 + 24;
223 if (
abs(bend_angle) < 512)
228 if (
abs(bend_angle) < 512)
241 int charge = (bend_carga >= 0) ? chsign : -1 * chsign;
395 vector<const L1MuBMTrackSegPhi*>::const_iterator iter;
397 int stat = (*iter)->station();
412 const int sectorvalues[12] = {0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132};
414 return sectorvalues[
sector];
500 if (
s.test(0) &&
s.test(3))
502 if (
s.test(0) &&
s.test(2))
504 if (
s.test(0) &&
s.test(1))
506 if (!
s.test(0) &&
s.test(1) &&
s.test(3))
508 if (!
s.test(0) &&
s.test(1) &&
s.test(2))
510 if (!
s.test(0) && !
s.test(1) &&
s.test(2) &&
s.test(3))
620 bendangle = (bendangle + 8192) % 4096;
621 if (bendangle > 2047)
629 bendangle = (bendangle + 2048) % 1024;
660 int offset = (2144 >> sh_phi) * sectordiff;
762 int bendangle = -999;
808 int bendangle = -999;
const L1MuBMSecProcId & id() const
return Sector Processor identifier
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
L1MuBMTrack * track(int id) const
return pointer to muon candidate, index [0,1]
void QuaAU()
assign quality
int address(int id, int stat) const
get address of a single station of selected track candidate
void setQuality(unsigned int quality)
set quality of muon candidate
void setPhi(int phi)
set phi-code of muon candidate
void setAddresses(const L1MuBMAddressArray &addr)
set relative addresses of muon candidate
const L1MuBMTrackSegPhi * getTSphi(int station) const
get track segment from a given station
static int getNbitsPtaPhi()
void setCharge(int charge)
set charge of muon candidate
L1MuBMLUTHandler * thePtaLUTs
pt-assignment look-up tables
bool get_DisableNewAlgo() const
void TSR()
Track Segment Router.
void enable()
enable muon candidate
std::vector< const L1MuBMTrackSegPhi * > m_TSphi
U second(std::pair< T, U > const &p)
static int getNbitsPtaPhib()
int getPt2Address(L1MuBMLUTHandler::PtAssMethod) const
static int convertSector(int)
convert sector Id to 8 bit code (= sector center)
L1MuBMLUTHandler * thePhiLUTs
phi-assignment look-up tables
const L1MuBMDataBuffer * data() const
return pointer to Data Buffer
static unsigned short nbit_phib
of bits used for pt-assignment
static void setPrecision()
set precision of phi and phib
int quality() const
return quality code
L1MuBMLUTHandler::PtAssMethod getPtMethod() const
determine pt assignment method
~L1MuBMAssignmentUnit()
destructor
Abs< T >::type abs(const T &t)
L1MuBMLUTHandler::PtAssMethod getPt2Method(L1MuBMLUTHandler::PtAssMethod) const
const L1MuBMTrackAssembler * TA() const
return pointer to Track Assembler
void setTSphi(const std::vector< const L1MuBMTrackSegPhi *> &tsList)
set phi track segments used to form the muon candidate
void setBx(int bx)
set charge of muon candidate
int phib() const
return phib
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
unsigned short station(int stat) const
get address of a given station [1-4]
int getPt(int pta_ind, int address) const
get pt-value for a given address
int getPt1Address(L1MuBMLUTHandler::PtAssMethod) const
const TSPhivector & getTSphi() const
get all track segments from the buffer
int phiDiff(int stat1, int stat2) const
build difference of two phi values
void PtAU(const L1TMuonBarrelParams &)
assign pt and charge
void PhiAU(const L1TMuonBarrelParams &)
assign phi
int sector() const
return sector number
int getPtLutThreshold(int pta_ind) const
get pt-assignment LUT threshold
void run(const L1TMuonBarrelParams &mbtfParams)
run Assignment Unit
L1MuBMTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
L1MuBMLUTHandler::PtAssMethod getPt1Method(L1MuBMLUTHandler::PtAssMethod) const
L1MuBMAddressArray m_addArray
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
void reset()
reset Assignment Unit
static int getCharge(L1MuBMLUTHandler::PtAssMethod)
determine charge
void reset()
reset address array
int sector() const
return sector
int phi() const
return phi
int getPtAddress(L1MuBMLUTHandler::PtAssMethod, int bendcharge=0) const
calculate bend angle
L1MuBMSectorProcessor & m_sp
TrackClass trackClass(int id) const
return Track Class of found track
static unsigned short nbit_phi
of bits used for pt-assignment
L1MuBMLUTHandler::PtAssMethod m_ptAssMethod
int bitShift(int num, int bits)