107 vector<const L1MuDTTrackSegPhi*>::const_iterator iter =
m_TSphi.begin();
108 int bx = (*iter)->bx();
157 phi2 = second->
phi() >> sh_phi;
158 sector = second->
sector();
159 }
else if (second ==
nullptr && first) {
160 phi2 = first->
phi() >> sh_phi;
162 }
else if (second ==
nullptr && forth) {
163 phi2 = forth->
phi() >> sh_phi;
171 int sectordiff = (sector - sector0) % 12;
183 int phi_precision = 4096 >> sh_phi;
184 const double k = 57.2958 / 2.5 /
static_cast<float>(phi_precision);
185 double phi_f =
static_cast<double>(phi2);
186 int phi_8 =
static_cast<int>(floor(phi_f * k));
188 if (second ==
nullptr && first) {
189 int bend_angle = (first->
phib() >> sh_phib) << sh_phib;
190 phi_8 = phi_8 +
thePhiLUTs->getDeltaPhi(0, bend_angle);
191 }
else if (second ==
nullptr && forth) {
192 int bend_angle = (forth->
phib() >> sh_phib) << sh_phib;
193 phi_8 = phi_8 +
thePhiLUTs->getDeltaPhi(1, bend_angle);
196 phi_8 += sectordiff * 12;
203 int phi = (sector_8 + phi_8 + 144) % 144;
204 phi_8 = (phi_8 + 32) % 32;
232 int charge = (bend_carga >= 0) ? chsign : -1 * chsign;
320 vector<const L1MuDTTrackSegPhi*>::const_iterator iter;
322 int stat = (*iter)->station();
323 if (station == stat) {
337 const int sectorvalues[12] = {0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132};
339 return sectorvalues[sector];
484 if (s.test(0) && s.test(3))
486 if (s.test(0) && s.test(2))
488 if (s.test(0) && s.test(1))
490 if (!s.test(0) && s.test(1) && s.test(3))
492 if (!s.test(0) && s.test(1) && s.test(2))
494 if (!s.test(0) && !s.test(1) && s.test(2) && s.test(3))
499 bool s5 = (adr == 15) ?
false : ((adr / 2) % 2 == 1);
500 if (s.test(0) && s.test(3))
502 if (s.test(0) && s.test(2) && s5)
504 if (s.test(0) && s.test(2) && !s5)
506 if (s.test(0) && s.test(1))
508 if (!s.test(0) && s.test(1) && s.test(3))
510 if (!s.test(0) && s.test(1) && s.test(2) && s5)
512 if (!s.test(0) && s.test(1) && s.test(2) && !s5)
514 if (!s.test(0) && !s.test(1) && s.test(2) && s.test(3))
719 bendangle = (bendangle + 8192) % 4096;
720 if (bendangle > 2047)
728 bendangle = (bendangle + 2048) % 1024;
751 int sectordiff = (sector2 - sector1) % 12;
759 int offset = (2144 >> sh_phi) * sectordiff;
760 int bendangle = (phi2 - phi1 +
offset) << sh_phi;
const L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
void PtAU(const edm::EventSetup &c)
assign pt and charge
const edm::EventSetup & c
void setPt(int pt)
set pt-code of muon candidate
void QuaAU()
assign quality
unsigned short nbit_phib
of bits used for pt-assignment
uint32_t const *__restrict__ Quality * quality
void reset()
reset address array
int getNbitsPtaPhib() const
edm::ESGetToken< L1MuDTPtaLut, L1MuDTPtaLutRcd > thePtaToken
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 run(const edm::EventSetup &c)
run Assignment Unit
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
void reset()
reset Assignment Unit
unsigned short nbit_phi
of bits used for pt-assignment
~L1MuDTAssignmentUnit()
destructor
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
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
L1MuDTAssignmentUnit(L1MuDTSectorProcessor &sp, int id, edm::ConsumesCollector)
constructor
int getNbitsPtaPhi() const
const TSPhivector & getTSphi() const
get all track segments from the buffer
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
edm::ESGetToken< L1MuDTPhiLut, L1MuDTPhiLutRcd > thePhiToken
const L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
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
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
TrackClass trackClass(int id) const
return Track Class of found track
PtAssMethod getPtMethod() const
determine pt assignment method
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
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