64 m_tf(tf), m_epid(id), m_foundPattern(0), m_tseta(15),
106 vector<const L1MuDTTrackSegEta*>::iterator iter =
m_tseta.begin();
107 while ( iter !=
m_tseta.end() ) {
117 for (
int i = 0;
i < 12;
i++ ) {
139 for (
int i = 0;
i < 15;
i++ ) {
144 for (
int i = 0;
i < 12;
i++ ) {
148 if ( !empty1 || !empty2 ) {
149 cout <<
"Eta processor " <<
m_epid <<
" : " << endl;
153 cout <<
"Local pattern : " << endl;
154 for (
int i = 0;
i < 15;
i++ ) {
158 for (
int j = 6;
j >= 0;
j-- ) {
162 if ( (
i+1)%5 == 0 )
cout << endl;
164 cout <<
"Found patterns :" << endl;
165 vector<int>::const_iterator iter;
169 cout <<
"ID = " << setw(4) << p.
id() <<
" "
170 <<
"eta = " << setw(3) << p.
eta() <<
" "
171 <<
"quality = " << setw(2) << qualitycode <<
" ("
172 <<
quality(qualitycode,1) <<
" "
173 <<
quality(qualitycode,2) <<
" "
174 <<
quality(qualitycode,3) <<
")";
175 for (
int i = 0;
i < 12;
i++ ) {
182 cout <<
"Received addresses : " << endl;
187 cout <<
"Matched patterns : " << endl;
188 for (
int i = 0;
i < 12;
i++ ) {
191 int fineeta = p.
eta();
193 cout <<
"Index = " << setw(2) << i <<
", "
194 <<
"address = " << setw(2) <<
m_address[
i] <<
" --> "
195 <<
"pattern = " << setw(4) <<
m_pattern[
i] <<
" "
196 <<
"eta (coarse) = " << setw(3) << coarseeta <<
" "
197 <<
"eta (fine) = " << setw(3) << fineeta <<
" "
198 <<
"quality = " << setw(2) << p.
quality() << endl;
203 cout <<
"Eta values and fine bits : " << endl;
204 for (
int i = 0;
i < 12;
i++ )
cout << setw(3) <<
m_eta[
i] <<
" ";
206 for (
int i = 0;
i < 12;
i++ )
cout << setw(3) <<
m_fine[
i] <<
" ";
231 for (
int stat = 1; stat <= 3; stat++ ) {
232 for (
int wheel = -2; wheel <= 2; wheel++ ) {
237 int lwheel = wheel+1;
238 if ( wheel < 0 ) lwheel = wheel-1;
241 if ( stat == 1 ) masked =
msks->get_etsoc_chdis_st1(lwheel, sector);
242 if ( stat == 2 ) masked =
msks->get_etsoc_chdis_st2(lwheel, sector);
243 if ( stat == 3 ) masked =
msks->get_etsoc_chdis_st3(lwheel, sector);
245 if ( !masked )
m_mask =
false;
247 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++ ) {
256 for (
int i = 0;
i < 7;
i++ ) {
282 for (
int wheel = -3; wheel <= 3; wheel++ ) {
283 if ( wheel == 0 )
continue;
290 if ( !cand->
empty() ) {
311 for (
int i = 0;
i < 15;
i++ ) {
323 int qualitycode = pattern.
quality();
331 if ( bin == 0 )
continue;
335 good &= pos.test(bin-1);
337 if ( q == 2 ) good &= qual.test(bin-1);
357 for (
int i = 0;
i < 12;
i++ ) {
360 if ( adr == 0 )
continue;
373 const vector<short>& qualifiedPatterns =
theQualPatternLUT->getQualifiedPatterns(sp,adr);
374 vector<short>::const_iterator iter;
375 vector<int>::const_iterator f_iter;
376 for ( iter = qualifiedPatterns.begin(); iter != qualifiedPatterns.end(); iter++ ) {
398 for (
int i = 0;
i < 6;
i++ ) {
403 if ( adr1 == 0 || adr2 == 0 )
continue;
404 if ( adr1 == adr2 && !
m_mask ) {
429 for (
int i = 0;
i < 12;
i++ ) {
431 if (
m_eta[i] != 99 ) {
443 vector<const L1MuDTTrackSegEta*> TSeta;
445 for (
int stat = 0; stat < 3; stat++ ) {
446 int wh = p.
wheel(stat+1);
448 if ( pos == 0 )
continue;
475 const int qualcode[27][3] = { {0,0,0},{1,0,0},{0,1,0},{0,0,1},{2,0,0},
476 {0,2,0},{0,0,2},{1,1,0},{1,0,1},{0,1,1},
477 {2,1,0},{1,2,0},{2,0,1},{1,0,2},{0,2,1},
478 {0,1,2},{2,2,0},{2,0,2},{0,2,2},{1,1,1},
479 {2,1,1},{1,2,1},{1,1,2},{2,2,1},{2,1,2},
482 return qualcode[
id][stat-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
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
const L1MuDTTrackFinder & m_tf
virtual ~L1MuDTEtaProcessor()
destructor
int quality() const
return quality
L1MuDTTrack * m_TracKCand[12]
void assign()
assign eta and etaFineBit
edm::ESHandle< L1MuDTQualPatternLut > theQualPatternLUT
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
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
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
std::vector< const L1MuDTTrackSegEta * > m_tseta
bool empty() const
is it an empty muon candidate?
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
void receiveData(int bx, const edm::Event &e, const edm::EventSetup &c)
receive data (eta trigger primitives)
virtual void reset()
reset the Eta Processor
static int position[264][3]
int wheel(int station) const
return wheel number in station [1,3]
L1MuDTTrack * m_TrackCand[12]
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
void print() const
print muon candidates found by the Eta Processor
edm::ESHandle< L1MuDTTFMasks > msks