119 int max_address = (
station == 1) ? 2 : 12;
120 for (
int reladr =0; reladr < max_address; reladr++) {
122 if (
m_sp.
ovl() && (reladr/2)%2 != 0 )
continue;
125 if ( reladr%2 == 0 ) ts = dttrig->chPhiSegm1(wheel,
station,sector,bx);
126 if ( reladr%2 == 1 ) ts = dttrig->chPhiSegm2(wheel,
station,sector,bx);
129 int phib = ts->
phiB();
130 int qual = ts->
code();
131 bool tag = (reladr%2 == 1) ?
true :
false;
134 lwheel =
abs(lwheel)/lwheel*(
abs(wheel)+1);
137 if (
msks->get_inrec_chdis_st1(lwheel, sector) )
continue;
138 if ( qual < pars->get_inrec_qual_st1(lwheel, sector) )
continue;
141 if (
msks->get_inrec_chdis_st2(lwheel, sector) )
continue;
142 if ( qual < pars->get_inrec_qual_st2(lwheel, sector) )
continue;
145 if (
msks->get_inrec_chdis_st3(lwheel, sector) )
continue;
146 if ( qual < pars->get_inrec_qual_st3(lwheel, sector) )
continue;
149 if (
msks->get_inrec_chdis_st4(lwheel, sector) )
continue;
150 if ( qual < pars->get_inrec_qual_st4(lwheel, sector) )
continue;
171 if ( tsPreviousBX_1 ) {
172 int phiBX = tsPreviousBX_1->
phi();
173 int qualBX = tsPreviousBX_1->
code();
174 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
175 qualBX > qual ) skipTS =
true;
179 if ( tsPreviousBX_2 ) {
180 int phiBX = tsPreviousBX_2->
phi();
181 int qualBX = tsPreviousBX_2->
code();
182 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
183 qualBX > qual ) skipTS =
true;
188 int phiBX = tsNextBX_1->
phi();
189 int qualBX = tsNextBX_1->
code();
190 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
191 qualBX > qual ) skipTS =
true;
196 int phiBX = tsNextBX_2->
phi();
197 int qualBX = tsNextBX_2->
code();
198 if (
abs( (phi >> sh_phi) - (phiBX >> sh_phi) ) <= tolerance &&
199 qualBX > qual ) skipTS =
true;
206 static_cast<L1MuDTTrackSegPhi::TSQuality>(qual),
225 if ( bx < -6 || bx > 6 )
return;
232 vector<csctf::TrackStub> csc_list;
233 vector<csctf::TrackStub>::const_iterator csc_iter;
237 int side = ( wheel == 3 ) ? 1 : 2;
239 int csc_sector = ( sector == 0 ) ? 6 : (sector+1)/2;
240 int subsector = ( sector%2 == 0 ) ? 2 : 1;
242 csc_list = csctrig->get(side,station,csc_sector,subsector,bxCSC+bx);
244 for ( csc_iter = csc_list.begin(); csc_iter != csc_list.end(); csc_iter++ ) {
245 bool etaFlag = ( csc_iter->etaPacked() > 17 );
246 int qualCSC = csc_iter->getQuality();
249 unsigned int qual = 7;
250 if ( qualCSC == 2 ) qual = 0;
251 if ( qualCSC == 6 ) qual = 1;
252 if ( qualCSC == 7 ) qual = 2;
253 if ( qualCSC == 8 ) qual = 2;
254 if ( qualCSC == 9 ) qual = 3;
255 if ( qualCSC == 10 ) qual = 3;
256 if ( qualCSC == 11 ) qual = 4;
257 if ( qualCSC == 12 ) qual = 5;
258 if ( qualCSC == 13 ) qual = 5;
259 if ( qualCSC == 14 ) qual = 6;
260 if ( qualCSC == 15 ) qual = 6;
261 if ( qual == 7 )
continue;
264 int phi = csc_iter->phiPacked();
265 if ( phi > 2047 ) phi -= 4096;
266 if ( phi < -2048 || phi > 2047 )
continue;
274 int address = 16 + ncsc;
275 bool tag = (ncsc == 1 ) ?
true :
false;
277 static_cast<L1MuDTTrackSegPhi::TSQuality>(qual),
296 if ( adr >= 4 && adr <= 7 ) sector = (sector+13)%12;
297 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
int address2sector(int adr) const
find the right sector for a given address
void reset()
clear Sector Receiver
L1MuDTSectorProcessor & m_sp
static int getNbitsExtPhi()
static bool getTSOutOfTimeFilter()
int sector() const
return sector number
const L1MuDTDataBuffer * data() const
return pointer to Data Buffer
edm::ESHandle< L1MuDTTFParameters > pars
edm::ESHandle< L1MuDTTFMasks > msks
Abs< T >::type abs(const T &t)
const L1MuDTSecProcId & id() const
return Sector Processor identifier
int locwheel() const
return physical wheel number (-2,-1,0,+1,+2)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int address2wheel(int adr) const
find the right wheel for a given address
static int getTSOutOfTimeWindow()
static edm::InputTag getDTDigiInputTag()
void addTSphi(int adr, const L1MuDTTrackSegPhi &)
add new phi track segment to the Data Buffer
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
static edm::InputTag getCSCTrSInputTag()
L1MuDTSectorReceiver(L1MuDTSectorProcessor &)
constructor
bool ovl() const
is it an overlap region Sector Processor?
virtual ~L1MuDTSectorReceiver()
destructor