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();
160 phi2 =
first->phi() >> sh_phi;
161 sector =
first->sector();
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));
189 int bend_angle = (
first->phib() >> sh_phib) << sh_phib;
191 }
else if (
second ==
nullptr && forth) {
192 int bend_angle = (forth->
phib() >> sh_phib) << sh_phib;
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();
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;
759 int offset = (2144 >> sh_phi) * sectordiff;
760 int bendangle = (phi2 - phi1 +
offset) << sh_phi;
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
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
static L1MuDTTFConfig * config()
return configuration
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
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