121 int max_address = (
station == 1) ? 2 : 12;
122 for (
int reladr =0; reladr < max_address; reladr++) {
124 if (
m_sp.
ovl() && (reladr/2)%2 != 0 )
continue;
131 int phib = ts->
phiB();
132 int qual = ts->
code();
133 bool tag = (reladr%2 == 1) ?
true :
false;
136 lwheel =
abs(lwheel)/lwheel*(
abs(wheel)+1);
140 if ( qual < pars->get_inrec_qual_st1(lwheel, sector) )
continue;
144 if ( qual < pars->get_inrec_qual_st2(lwheel, sector) )
continue;
148 if ( qual < pars->get_inrec_qual_st3(lwheel, sector) )
continue;
152 if ( qual < pars->get_inrec_qual_st4(lwheel, sector) )
continue;
173 if ( tsPreviousBX_1 ) {
174 int phiBX = tsPreviousBX_1->
phi();
175 int qualBX = tsPreviousBX_1->
code();
176 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
177 qualBX > qual ) skipTS =
true;
181 if ( tsPreviousBX_2 ) {
182 int phiBX = tsPreviousBX_2->
phi();
183 int qualBX = tsPreviousBX_2->
code();
184 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
185 qualBX > qual ) skipTS =
true;
190 int phiBX = tsNextBX_1->
phi();
191 int qualBX = tsNextBX_1->
code();
192 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
193 qualBX > qual ) skipTS =
true;
198 int phiBX = tsNextBX_2->
phi();
199 int qualBX = tsNextBX_2->
code();
200 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
201 qualBX > qual ) skipTS =
true;
208 static_cast<L1MuDTTrackSegPhi::TSQuality>(qual),
227 if ( bx < -6 || bx > 6 )
return;
234 vector<csctf::TrackStub> csc_list;
235 vector<csctf::TrackStub>::const_iterator csc_iter;
239 int side = ( wheel == 3 ) ? 1 : 2;
241 int csc_sector = ( sector == 0 ) ? 6 : (sector+1)/2;
242 int subsector = ( sector%2 == 0 ) ? 2 : 1;
244 csc_list = csctrig->get(side,station,csc_sector,subsector,bxCSC+bx);
246 for ( csc_iter = csc_list.begin(); csc_iter != csc_list.end(); csc_iter++ ) {
247 bool etaFlag = ( csc_iter->etaPacked() > 17 );
248 int qualCSC = csc_iter->getQuality();
251 unsigned int qual = 7;
252 if ( qualCSC == 2 ) qual = 0;
253 if ( qualCSC == 6 ) qual = 1;
254 if ( qualCSC == 7 ) qual = 2;
255 if ( qualCSC == 8 ) qual = 2;
256 if ( qualCSC == 9 ) qual = 3;
257 if ( qualCSC == 10 ) qual = 3;
258 if ( qualCSC == 11 ) qual = 4;
259 if ( qualCSC == 12 ) qual = 5;
260 if ( qualCSC == 13 ) qual = 5;
261 if ( qualCSC == 14 ) qual = 6;
262 if ( qualCSC == 15 ) qual = 6;
263 if ( qual == 7 )
continue;
266 int phi = csc_iter->phiPacked();
267 if ( phi > 2047 ) phi -= 4096;
268 if ( phi < -2048 || phi > 2047 )
continue;
276 int address = 16 + ncsc;
277 bool tag = (ncsc == 1 ) ?
true :
false;
279 static_cast<L1MuDTTrackSegPhi::TSQuality>(qual),
298 if ( adr >= 4 && adr <= 7 ) sector = (sector+13)%12;
299 if ( adr >= 8 && adr <= 11 ) sector = (sector+11)%12;
void receiveCSCData(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from CSC chamber trigger
void receiveDTBXData(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from DTBX chamber trigger
L1MuDTSectorReceiver(L1MuDTSectorProcessor &, edm::ConsumesCollector &&iC)
constructor
int address2sector(int adr) const
find the right sector for a given address
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
void reset()
clear Sector Receiver
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool get_soc_nbx_del(int wh, int sc) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
bool get_inrec_chdis_st1(int wh, int sc) const
L1MuDTSectorProcessor & m_sp
bool get_inrec_chdis_st3(int wh, int sc) const
edm::InputTag getCSCTrSInputTag() const
bool getTSOutOfTimeFilter() const
int sector() const
return sector number
const L1MuDTDataBuffer * data() const
return pointer to Data Buffer
bool get_soc_csc_etacanc(int wh, int sc) const
int getTSOutOfTimeWindow() const
edm::ESHandle< L1MuDTTFParameters > pars
edm::ESHandle< L1MuDTTFMasks > msks
Abs< T >::type abs(const T &t)
bool get_inrec_chdis_st2(int wh, int sc) const
const L1MuDTSecProcId & id() const
return Sector Processor identifier
int locwheel() const
return physical wheel number (-2,-1,0,+1,+2)
bool get_inrec_chdis_st4(int wh, int sc) const
int address2wheel(int adr) const
find the right wheel for a given address
bool get_inrec_chdis_csc(int wh, int sc) const
static L1MuDTTFConfig * config()
return configuration
void addTSphi(int adr, const L1MuDTTrackSegPhi &)
add new phi track segment to the Data Buffer
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > m_CSCTrSToken
void run(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from the DTBX and CSC chamber triggers
int wheel() const
return wheel number
int getNbitsExtPhi() const
bool ovl() const
is it an overlap region Sector Processor?
virtual ~L1MuDTSectorReceiver()
destructor