66 m_tf(tf), m_epid(id), m_foundPattern(0), m_tseta(15) {
107 vector<const L1MuDTTrackSegEta*>::iterator iter =
m_tseta.begin();
108 while ( iter !=
m_tseta.end() ) {
118 for (
int i = 0;
i < 12;
i++ ) {
140 for (
int i = 0;
i < 15;
i++ ) {
145 for (
int i = 0;
i < 12;
i++ ) {
149 if ( !empty1 || !empty2 ) {
150 cout <<
"Eta processor " <<
m_epid <<
" : " << endl;
154 cout <<
"Local pattern : " << endl;
155 for (
int i = 0;
i < 15;
i++ ) {
159 for (
int j = 6;
j >= 0;
j-- ) {
163 if ( (
i+1)%5 == 0 )
cout << endl;
165 cout <<
"Found patterns :" << endl;
166 vector<int>::const_iterator iter;
170 cout <<
"ID = " << setw(4) << p.
id() <<
" "
171 <<
"eta = " << setw(3) << p.
eta() <<
" "
172 <<
"quality = " << setw(2) << qualitycode <<
" ("
173 <<
quality(qualitycode,1) <<
" "
174 <<
quality(qualitycode,2) <<
" "
175 <<
quality(qualitycode,3) <<
")";
176 for (
int i = 0;
i < 12;
i++ ) {
183 cout <<
"Received addresses : " << endl;
188 cout <<
"Matched patterns : " << endl;
189 for (
int i = 0;
i < 12;
i++ ) {
192 int fineeta = p.
eta();
194 cout <<
"Index = " << setw(2) << i <<
", "
195 <<
"address = " << setw(2) <<
m_address[
i] <<
" --> "
196 <<
"pattern = " << setw(4) <<
m_pattern[
i] <<
" "
197 <<
"eta (coarse) = " << setw(3) << coarseeta <<
" "
198 <<
"eta (fine) = " << setw(3) << fineeta <<
" "
199 <<
"quality = " << setw(2) << p.
quality() << endl;
204 cout <<
"Eta values and fine bits : " << endl;
205 for (
int i = 0;
i < 12;
i++ )
cout << setw(3) <<
m_eta[
i] <<
" ";
207 for (
int i = 0;
i < 12;
i++ )
cout << setw(3) <<
m_fine[
i] <<
" ";
232 for (
int stat = 1; stat <= 3; stat++ ) {
233 for (
int wheel = -2; wheel <= 2; wheel++ ) {
238 int lwheel = wheel+1;
239 if ( wheel < 0 ) lwheel = wheel-1;
242 if ( stat == 1 ) masked =
msks->get_etsoc_chdis_st1(lwheel, sector);
243 if ( stat == 2 ) masked =
msks->get_etsoc_chdis_st2(lwheel, sector);
244 if ( stat == 3 ) masked =
msks->get_etsoc_chdis_st3(lwheel, sector);
246 if ( !masked )
m_mask =
false;
248 if ( tseta && !masked ) {
250 if ( wheel == -2 || wheel == -1 ||
251 ( wheel == 0 && (sector == 0 || sector == 3 || sector == 4 || sector == 7 || sector == 8 || sector == 11) ) ) {
252 for (
int i = 0;
i < 7;
i++ ) {
257 for (
int i = 0;
i < 7;
i++ ) {
283 for (
int wheel = -3; wheel <= 3; wheel++ ) {
284 if ( wheel == 0 )
continue;
286 for (
int number = 0; number < 2; number++ ) {
291 if ( !cand->
empty() ) {
312 for (
int i = 0;
i < 15;
i++ ) {
324 int qualitycode = pattern.
quality();
332 if ( bin == 0 )
continue;
336 good &= pos.test(bin-1);
338 if ( q == 2 ) good &= qual.test(bin-1);
358 for (
int i = 0;
i < 12;
i++ ) {
361 if ( adr == 0 )
continue;
374 const vector<short>& qualifiedPatterns =
theQualPatternLUT->getQualifiedPatterns(sp,adr);
375 vector<short>::const_iterator iter;
376 vector<int>::const_iterator f_iter;
377 for ( iter = qualifiedPatterns.begin(); iter != qualifiedPatterns.end(); iter++ ) {
399 for (
int i = 0;
i < 6;
i++ ) {
404 if ( adr1 == 0 || adr2 == 0 )
continue;
405 if ( adr1 == adr2 && !
m_mask ) {
430 for (
int i = 0;
i < 12;
i++ ) {
432 if (
m_eta[i] != 99 ) {
444 vector<const L1MuDTTrackSegEta*> TSeta;
446 for (
int stat = 0; stat < 3; stat++ ) {
447 int wh = p.
wheel(stat+1);
449 if ( pos == 0 )
continue;
476 const int qualcode[27][3] = { {0,0,0},{1,0,0},{0,1,0},{0,0,1},{2,0,0},
477 {0,2,0},{0,0,2},{1,1,0},{1,0,1},{0,1,1},
478 {2,1,0},{1,2,0},{2,0,1},{1,0,2},{0,2,1},
479 {0,1,2},{2,2,0},{2,0,2},{0,2,2},{1,1,1},
480 {2,1,1},{1,2,1},{1,1,2},{2,2,1},{2,1,2},
483 return qualcode[
id][stat-1];
void setFineEtaBit()
set fine eta bit
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
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
static int position[TOTALCHAMBERS][3]
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)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)
static edm::InputTag getDTDigiInputTag()
virtual void reset()
reset the Eta Processor
int wheel(int station) const
return wheel number in station [1,3]
L1MuDTTrack * m_TrackCand[12]
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
L1MuDTEtaProcessor(const L1MuDTTrackFinder &, int id)
constructor
void print() const
print muon candidates found by the Eta Processor
edm::ESHandle< L1MuDTTFMasks > msks