111 int max_address = (
station == 1) ? 2 : 12;
112 for (
int reladr = 0; reladr < max_address; reladr++) {
114 if (
m_sp.
ovl() && (reladr / 2) % 2 != 0)
119 ts = dttrig->chPhiSegm1(wheel,
station, sector, bx);
121 ts = dttrig->chPhiSegm2(wheel,
station, sector, bx);
124 int phib = ts->
phiB();
125 int qual = ts->
code();
126 bool tag = (reladr % 2 == 1) ?
true :
false;
129 lwheel =
abs(lwheel) / lwheel * (
abs(wheel) + 1);
132 if (
msks->get_inrec_chdis_st1(lwheel, sector))
134 if (qual < pars->get_inrec_qual_st1(lwheel, sector))
137 if (
msks->get_inrec_chdis_st2(lwheel, sector))
139 if (qual < pars->get_inrec_qual_st2(lwheel, sector))
142 if (
msks->get_inrec_chdis_st3(lwheel, sector))
144 if (qual < pars->get_inrec_qual_st3(lwheel, sector))
147 if (
msks->get_inrec_chdis_st4(lwheel, sector))
149 if (qual < pars->get_inrec_qual_st4(lwheel, sector))
175 if (tsPreviousBX_1) {
176 int phiBX = tsPreviousBX_1->
phi();
177 int qualBX = tsPreviousBX_1->
code();
178 if (
abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
183 if (tsPreviousBX_2) {
184 int phiBX = tsPreviousBX_2->
phi();
185 int qualBX = tsPreviousBX_2->
code();
186 if (
abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
192 int phiBX = tsNextBX_1->
phi();
193 int qualBX = tsNextBX_1->
code();
194 if (
abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
200 int phiBX = tsNextBX_2->
phi();
201 int qualBX = tsNextBX_2->
code();
202 if (
abs((phi >> sh_phi) - (phiBX >> sh_phi)) <= tolerance && qualBX > qual)
209 wheel, sector,
station, phi, phib, static_cast<L1MuDTTrackSegPhi::TSQuality>(qual), tag, bx - bx_offset);
224 if (bx < -6 || bx > 6)
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;
276 int phi = csc_iter->phiPacked();
279 if (phi < -2048 || phi > 2047)
292 int address = 16 + ncsc;
293 bool tag = (ncsc == 1) ?
true :
false;
295 wheel, sector, station + 2, phi, 0, static_cast<L1MuDTTrackSegPhi::TSQuality>(qual), tag, bx, etaFlag);
309 if (adr >= 4 && adr <= 7)
310 sector = (sector + 13) % 12;
311 if (adr >= 8 && adr <= 11)
312 sector = (sector + 11) % 12;
324 if ((adr / 2) % 2 == 1)
void receiveCSCData(int bx, const edm::Event &e, const edm::EventSetup &c)
receive track segment data from CSC chamber trigger
const edm::EventSetup & c
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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
L1MuDTSectorProcessor & m_sp
edm::InputTag getCSCTrSInputTag() const
bool getTSOutOfTimeFilter() const
int sector() const
return sector number
const L1MuDTDataBuffer * data() const
return pointer to Data Buffer
edm::ESHandle< L1MuDTTFParameters > pars
int getTSOutOfTimeWindow() const
L1MuDTSectorReceiver(L1MuDTSectorProcessor &, edm::ConsumesCollector iC)
constructor
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)
int address2wheel(int adr) const
find the right wheel for a given address
edm::ESGetToken< L1MuDTTFParameters, L1MuDTTFParametersRcd > m_parsToken
static L1MuDTTFConfig * config()
return configuration
edm::ESHandle< L1MuDTTFMasks > msks
tuple config
parse the configuration file
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
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
int getNbitsExtPhi() const
edm::ESGetToken< L1MuDTTFMasks, L1MuDTTFMasksRcd > m_msksToken
bool ovl() const
is it an overlap region Sector Processor?
virtual ~L1MuDTSectorReceiver()
destructor