58 : m_sp(sp), m_id(id), m_addArray(), m_TSphi(), m_ptAssMethod(
NODEF), nbit_phi(12), nbit_phib(10) {
99 vector<const L1MuDTTrackSegPhi*>::const_iterator iter =
m_TSphi.begin();
100 int bx = (*iter)->bx();
149 phi2 = second->
phi() >> sh_phi;
150 sector = second->
sector();
151 }
else if (second ==
nullptr && first) {
152 phi2 = first->
phi() >> sh_phi;
154 }
else if (second ==
nullptr && forth) {
155 phi2 = forth->
phi() >> sh_phi;
163 int sectordiff = (sector - sector0) % 12;
175 int phi_precision = 4096 >> sh_phi;
176 const double k = 57.2958 / 2.5 /
static_cast<float>(phi_precision);
177 double phi_f =
static_cast<double>(phi2);
178 int phi_8 =
static_cast<int>(floor(phi_f * k));
180 if (second ==
nullptr && first) {
181 int bend_angle = (first->
phib() >> sh_phib) << sh_phib;
183 }
else if (second ==
nullptr && forth) {
184 int bend_angle = (forth->
phib() >> sh_phib) << sh_phib;
188 phi_8 += sectordiff * 12;
195 int phi = (sector_8 + phi_8 + 144) % 144;
196 phi_8 = (phi_8 + 32) % 32;
224 int charge = (bend_carga >= 0) ? chsign : -1 * chsign;
312 vector<const L1MuDTTrackSegPhi*>::const_iterator iter;
314 int stat = (*iter)->station();
315 if (station == stat) {
329 const int sectorvalues[12] = {0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132};
331 return sectorvalues[sector];
476 if (s.test(0) && s.test(3))
478 if (s.test(0) && s.test(2))
480 if (s.test(0) && s.test(1))
482 if (!s.test(0) && s.test(1) && s.test(3))
484 if (!s.test(0) && s.test(1) && s.test(2))
486 if (!s.test(0) && !s.test(1) && s.test(2) && s.test(3))
491 bool s5 = (adr == 15) ?
false : ((adr / 2) % 2 == 1);
492 if (s.test(0) && s.test(3))
494 if (s.test(0) && s.test(2) && s5)
496 if (s.test(0) && s.test(2) && !s5)
498 if (s.test(0) && s.test(1))
500 if (!s.test(0) && s.test(1) && s.test(3))
502 if (!s.test(0) && s.test(1) && s.test(2) && s5)
504 if (!s.test(0) && s.test(1) && s.test(2) && !s5)
506 if (!s.test(0) && !s.test(1) && s.test(2) && s.test(3))
711 bendangle = (bendangle + 8192) % 4096;
712 if (bendangle > 2047)
720 bendangle = (bendangle + 2048) % 1024;
743 int sectordiff = (sector2 -
sector1) % 12;
751 int offset = (2144 >> sh_phi) * sectordiff;
752 int bendangle = (phi2 - phi1 +
offset) << sh_phi;
void PtAU(const edm::EventSetup &c)
assign pt and charge
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
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
void QuaAU()
assign quality
unsigned short nbit_phib
of bits used for pt-assignment
void reset()
reset address array
int getNbitsPtaPhib() const
~L1MuDTAssignmentUnit() override
destructor
void setTSphi(const std::vector< const L1MuDTTrackSegPhi * > &tsList)
set phi track segments used to form the muon candidate
int getCharge(PtAssMethod)
determine charge
int phi() const
return phi
void setTC(TrackClass tc)
set track-class of muon candidate
L1MuDTAddressArray m_addArray
void setAddresses(const L1MuDTAddressArray &addr)
set relative addresses of muon candidate
void enable()
enable muon candidate
int sector() const
return sector number
const L1MuDTDataBuffer * data() const
return pointer to Data Buffer
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
unsigned short nbit_phi
of bits used for pt-assignment
int getDeltaPhi(int idx, int address) const
get delta-phi for a given address (bend-angle)
PtAssMethod m_ptAssMethod
const L1MuDTTrackAssembler * TA() const
return pointer to Track Assembler
void TSR()
Track Segment Router.
const L1MuDTTrackSegPhi * getTSphi(int station) const
get track segment from a given station
virtual void run()
run processor logic
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
Abs< T >::type abs(const T &t)
int phib() const
return phib
int phiDiff(int stat1, int stat2) const
build difference of two phi values
const L1MuDTSecProcId & id() const
return Sector Processor identifier
void setQuality(unsigned int quality)
set quality of muon candidate
int getNbitsPtaPhi() const
const TSPhivector & getTSphi() const
get all track segments from the buffer
void reset() override
reset Assignment Unit
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
static L1MuDTTFConfig * config()
return configuration
int getPtAddress(PtAssMethod, int bendcharge=0) const
calculate bend angle
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
int sector() const
return sector
edm::ESHandle< L1MuDTPhiLut > thePhiLUTs
phi-assignment look-up tables
int getPtLutThreshold(int pta_ind) const
get pt-assignment LUT threshold
TrackClass trackClass(int id) const
return Track Class of found track
PtAssMethod getPtMethod() const
determine pt assignment method
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
unsigned short station(int stat) const
get address of a given station [1-4]
int getNbitsPhiPhi() const
L1MuDTAssignmentUnit(L1MuDTSectorProcessor &sp, int id)
constructor
void setPhi(int phi)
set phi-code of muon candidate
bool ovl() const
is it an overlap region Sector Processor?
int getNbitsPhiPhib() const
void setCharge(int charge)
set charge of muon candidate