104 vector<const L1MuDTTrackSegEta*>::iterator iter =
m_tseta.begin();
105 while (iter !=
m_tseta.end()) {
115 for (
int i = 0;
i < 12;
i++) {
134 for (
int i = 0;
i < 15;
i++) {
139 for (
int i = 0;
i < 12;
i++) {
143 if (!empty1 || !empty2) {
144 cout <<
"Eta processor " <<
m_epid <<
" : " << endl;
148 cout <<
"Local pattern : " << endl;
149 for (
int i = 0;
i < 15;
i++) {
150 if ((
i + 5) % 5 == 0)
154 for (
int j = 6;
j >= 0;
j--) {
158 if ((
i + 1) % 5 == 0)
161 cout <<
"Found patterns :" << endl;
162 vector<int>::const_iterator iter;
166 cout <<
"ID = " << setw(4) << p.
id() <<
" "
167 <<
"eta = " << setw(3) << p.
eta() <<
" "
168 <<
"quality = " << setw(2) << qualitycode <<
" (" <<
quality(qualitycode, 1) <<
" "
169 <<
quality(qualitycode, 2) <<
" " <<
quality(qualitycode, 3) <<
")";
170 for (
int i = 0;
i < 12;
i++) {
178 cout <<
"Received addresses : " << endl;
179 for (
int i = 0;
i < 12;
i++)
184 cout <<
"Matched patterns : " << endl;
185 for (
int i = 0;
i < 12;
i++) {
188 int fineeta = p.
eta();
190 cout <<
"Index = " << setw(2) << i <<
", "
191 <<
"address = " << setw(2) <<
m_address[
i] <<
" --> "
192 <<
"pattern = " << setw(4) <<
m_pattern[
i] <<
" "
193 <<
"eta (coarse) = " << setw(3) << coarseeta <<
" "
194 <<
"eta (fine) = " << setw(3) << fineeta <<
" "
195 <<
"quality = " << setw(2) << p.
quality() << endl;
200 cout <<
"Eta values and fine bits : " << endl;
201 for (
int i = 0;
i < 12;
i++)
204 for (
int i = 0;
i < 12;
i++)
228 for (
int wheel = -2; wheel <= 2; wheel++) {
233 int lwheel = wheel + 1;
239 masked =
msks->get_etsoc_chdis_st1(lwheel, sector);
241 masked =
msks->get_etsoc_chdis_st2(lwheel, sector);
243 masked =
msks->get_etsoc_chdis_st3(lwheel, sector);
248 if (tseta && !masked) {
249 if (wheel == -2 || wheel == -1 ||
250 (wheel == 0 && (sector == 0 || sector == 3 || sector == 4 || sector == 7 || sector == 8 || sector == 11))) {
251 for (
int i = 0;
i < 7;
i++) {
258 for (
int i = 0;
i < 7;
i++) {
284 for (
int wheel = -3; wheel <= 3; wheel++) {
293 if (!cand->
empty()) {
311 for (
int i = 0;
i < 15;
i++) {
323 int qualitycode = pattern.
quality();
336 good &= pos.test(bin - 1);
339 good &= qual.test(bin - 1);
356 for (
int i = 0;
i < 12;
i++) {
376 const vector<short>& qualifiedPatterns =
theQualPatternLUT->getQualifiedPatterns(sp, adr);
377 vector<short>::const_iterator iter;
378 vector<int>::const_iterator f_iter;
379 for (iter = qualifiedPatterns.begin(); iter != qualifiedPatterns.end(); iter++) {
402 for (
int i = 0;
i < 6;
i++) {
404 int idx2 = 2 *
i + 1;
407 if (adr1 == 0 || adr2 == 0)
409 if (adr1 == adr2 && !
m_mask) {
412 if (
m_eta[idx1] == 99)
414 if (
m_eta[idx1] > 31)
420 if (
m_eta[idx2] == 99)
422 if (
m_eta[idx2] > 31)
435 for (
int i = 0;
i < 12;
i++) {
437 if (
m_eta[i] != 99) {
448 vector<const L1MuDTTrackSegEta*> TSeta;
478 const int qualcode[27][3] = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {2, 0, 0}, {0, 2, 0}, {0, 0, 2},
479 {1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {2, 1, 0}, {1, 2, 0}, {2, 0, 1}, {1, 0, 2},
480 {0, 2, 1}, {0, 1, 2}, {2, 2, 0}, {2, 0, 2}, {0, 2, 2}, {1, 1, 1}, {2, 1, 1},
481 {1, 2, 1}, {1, 1, 2}, {2, 2, 1}, {2, 1, 2}, {1, 2, 2}, {2, 2, 2}};
483 return qualcode[
id][stat - 1];
const L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
void setFineEtaBit()
set fine eta bit
L1MuDTEtaProcessor(const L1MuDTTrackFinder &, int id, edm::ConsumesCollector &&iC)
constructor
void runEtaTrackFinder(const edm::EventSetup &c)
run Eta Track Finder (ETF)
LUT::const_iterator ETFLut_iter
const L1MuDTTrackFinder & m_tf
const edm::EventSetup & c
virtual ~L1MuDTEtaProcessor()
destructor
edm::ESGetToken< L1MuDTEtaPatternLut, L1MuDTEtaPatternLutRcd > theEtaToken
int quality() const
return quality
edm::ESGetToken< L1MuDTTFMasks, L1MuDTTFMasksRcd > theMsksToken
L1MuDTTrack * m_TracKCand[12]
void assign()
assign eta and etaFineBit
L1MuDTAddressArray address() const
get address-array for this muon candidate
bool getByToken(EDGetToken token, Handle< PROD > &result) const
int trackAddressCode() const
get track address code (for eta track finder)
static int quality(int id, int stat)
get quality code; id [0,26], stat [1,3]
const L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
get a pointer to a Sector Processor
edm::ESHandle< L1MuDTTFMasks > msks
int position(int station) const
return position in station [1,3]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int quality(const int i) const
int position(const int i) const
void setEta(int eta)
set eta-code of muon candidate
int eta() const
return eta
virtual void run(int bx, const edm::Event &e, const edm::EventSetup &c)
run the Eta Processor
void setTSeta(const std::vector< const L1MuDTTrackSegEta * > &tsList)
set eta track segments used to form the muon candidate
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
std::vector< const L1MuDTTrackSegEta * > m_tseta
edm::ESGetToken< L1MuDTQualPatternLut, L1MuDTQualPatternLutRcd > theQualToken
void receiveAddresses()
receive addresses (from 6 Sector Processors)
int id() const
return Eta Processor identifier (0-11)
void runEtaMatchingUnit(const edm::EventSetup &c)
run Eta Matching Unit (EMU)
std::vector< int > m_foundPattern
auto const good
min quality of good
void receiveData(int bx, const edm::Event &e, const edm::EventSetup &c)
receive data (eta trigger primitives)
static L1MuDTTFConfig * config()
return configuration
const L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
virtual void reset()
reset the Eta Processor
bool empty() const override
is it an empty muon candidate?
tuple config
parse the configuration file
static int position[264][3]
edm::ESHandle< L1MuDTQualPatternLut > theQualPatternLUT
int wheel(int station) const
return wheel number in station [1,3]
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
L1MuDTTrack * m_TrackCand[12]
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken
void print() const
print muon candidates found by the Eta Processor