CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
L1MuDTEtaProcessor Class Reference

#include <L1MuDTEtaProcessor.h>

Public Member Functions

int eta (int id) const
 return eta values, index [0,11] More...
 
bool fineBit (int id) const
 return fine bit, index [0,11] More...
 
int id () const
 return Eta Processor identifier (0-11) More...
 
 L1MuDTEtaProcessor (const L1MuDTTrackFinder &, int id, edm::ConsumesCollector &&iC)
 constructor More...
 
void print () const
 print muon candidates found by the Eta Processor More...
 
virtual void reset ()
 reset the Eta Processor More...
 
virtual void run (int bx, const edm::Event &e, const edm::EventSetup &c)
 run the Eta Processor More...
 
const L1MuDTTrackFindertf () const
 return reference to barrel MTTF More...
 
virtual ~L1MuDTEtaProcessor ()
 destructor More...
 

Private Member Functions

void assign ()
 assign eta and etaFineBit More...
 
void receiveAddresses ()
 receive addresses (from 6 Sector Processors) More...
 
void receiveData (int bx, const edm::Event &e, const edm::EventSetup &c)
 receive data (eta trigger primitives) More...
 
void runEtaMatchingUnit (const edm::EventSetup &c)
 run Eta Matching Unit (EMU) More...
 
void runEtaTrackFinder (const edm::EventSetup &c)
 run Eta Track Finder (ETF) More...
 

Static Private Member Functions

static int quality (int id, int stat)
 get quality code; id [0,26], stat [1,3] More...
 

Private Attributes

int m_address [12]
 
edm::EDGetTokenT
< L1MuDTChambThContainer
m_DTDigiToken
 
int m_epid
 
int m_eta [12]
 
bool m_fine [12]
 
std::vector< int > m_foundPattern
 
int m_mask
 
int m_pattern [12]
 
const L1MuDTTrackFinderm_tf
 
L1MuDTTrackm_TrackCand [12]
 
L1MuDTTrackm_TracKCand [12]
 
std::vector< const
L1MuDTTrackSegEta * > 
m_tseta
 
edm::ESHandle< L1MuDTTFMasksmsks
 
edm::ESHandle
< L1MuDTEtaPatternLut
theEtaPatternLUT
 
edm::ESHandle
< L1MuDTQualPatternLut
theQualPatternLUT
 

Detailed Description

Eta Processor:

An Eta Processor consists of :

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 55 of file L1MuDTEtaProcessor.h.

Constructor & Destructor Documentation

L1MuDTEtaProcessor::L1MuDTEtaProcessor ( const L1MuDTTrackFinder tf,
int  id,
edm::ConsumesCollector &&  iC 
)

constructor

Definition at line 63 of file L1MuDTEtaProcessor.cc.

References m_tseta.

63  :
64  m_tf(tf), m_epid(id), m_foundPattern(0), m_tseta(15),
66 
67  m_tseta.reserve(15);
68 
69 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const L1MuDTTrackFinder & m_tf
std::vector< const L1MuDTTrackSegEta * > m_tseta
std::vector< int > m_foundPattern
static edm::InputTag getDTDigiInputTag()
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken
L1MuDTEtaProcessor::~L1MuDTEtaProcessor ( )
virtual

destructor

Definition at line 76 of file L1MuDTEtaProcessor.cc.

76 {}

Member Function Documentation

void L1MuDTEtaProcessor::assign ( )
private

assign eta and etaFineBit

Definition at line 427 of file L1MuDTEtaProcessor.cc.

References i, m_eta, m_fine, m_pattern, m_TrackCand, m_TracKCand, m_tseta, AlCaHLTBitMon_ParallelJobs::p, L1MuDTEtaPattern::position(), L1MuDTTrack::setEta(), L1MuDTTrack::setFineEtaBit(), L1MuDTTrack::setTSeta(), theEtaPatternLUT, and L1MuDTEtaPattern::wheel().

Referenced by run().

427  {
428 
429  for ( int i = 0; i < 12; i++ ) {
430  if ( m_TrackCand[i] ) {
431  if ( m_eta[i] != 99 ) {
432  m_TrackCand[i]->setEta(m_eta[i]);
433  m_TracKCand[i]->setEta(m_eta[i]);
434  }
435  else {
436  // if ( i/2 != 2 ) cerr << "L1MuDTEtaProcessor: assign invalid eta" << " " << m_address[i] << endl;
437  }
438  if ( m_fine[i] ) {
441  // find all contributing track segments
442  const L1MuDTEtaPattern p = theEtaPatternLUT->getPattern(m_pattern[i]);
443  vector<const L1MuDTTrackSegEta*> TSeta;
444  const L1MuDTTrackSegEta* ts = 0;
445  for ( int stat = 0; stat < 3; stat++ ) {
446  int wh = p.wheel(stat+1);
447  int pos = p.position(stat+1);
448  if ( pos == 0 ) continue;
449  ts = m_tseta[wh+2 + stat*5];
450  TSeta.push_back(ts);
451  }
452  m_TrackCand[i]->setTSeta(TSeta);
453  m_TracKCand[i]->setTSeta(TSeta);
454  }
455  }
456  }
457 
458 }
void setFineEtaBit()
set fine eta bit
Definition: L1MuDTTrack.h:144
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
L1MuDTTrack * m_TracKCand[12]
int position(int station) const
return position in station [1,3]
void setEta(int eta)
set eta-code of muon candidate
Definition: L1MuDTTrack.cc:114
void setTSeta(const std::vector< const L1MuDTTrackSegEta * > &tsList)
set eta track segments used to form the muon candidate
Definition: L1MuDTTrack.cc:183
std::vector< const L1MuDTTrackSegEta * > m_tseta
int wheel(int station) const
return wheel number in station [1,3]
L1MuDTTrack * m_TrackCand[12]
int L1MuDTEtaProcessor::eta ( int  id) const
inline

return eta values, index [0,11]

Definition at line 81 of file L1MuDTEtaProcessor.h.

References id(), and m_eta.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

81 { return m_eta[id]; }
int id() const
return Eta Processor identifier (0-11)
bool L1MuDTEtaProcessor::fineBit ( int  id) const
inline

return fine bit, index [0,11]

Definition at line 84 of file L1MuDTEtaProcessor.h.

References id(), and m_fine.

84 { return m_fine[id]; }
int id() const
return Eta Processor identifier (0-11)
int L1MuDTEtaProcessor::id ( void  ) const
inline

return Eta Processor identifier (0-11)

Definition at line 66 of file L1MuDTEtaProcessor.h.

References m_epid.

Referenced by eta(), fineBit(), and quality().

66 { return m_epid; }
void L1MuDTEtaProcessor::print ( void  ) const

print muon candidates found by the Eta Processor

Definition at line 136 of file L1MuDTEtaProcessor.cc.

References gather_cfg::cout, L1MuDTEtaPattern::eta(), i, L1MuDTEtaPattern::id(), j, m_address, m_epid, m_eta, m_fine, m_foundPattern, m_pattern, m_tseta, AlCaHLTBitMon_ParallelJobs::p, position, L1MuDTEtaPattern::quality(), quality(), relativeConstraints::station, theEtaPatternLUT, and theQualPatternLUT.

136  {
137 
138  bool empty1 = true;
139  for ( int i = 0; i < 15; i++ ) {
140  empty1 &= ( m_tseta[i] == 0 || m_tseta[i]->empty() );
141  }
142 
143  bool empty2 = true;
144  for ( int i = 0; i < 12; i++ ) {
145  empty2 &= ( m_address[i] == 0 );
146  }
147 
148  if ( !empty1 || !empty2 ) {
149  cout << "Eta processor " << m_epid << " : " << endl;
150 
151  // print local pattern
152  if ( !empty1 ) {
153  cout << "Local pattern : " << endl;
154  for ( int i = 0; i < 15; i++ ) {
155  if ( (i+5)%5 == 0 ) cout << "station " << m_tseta[i]->station() << " : ";
156  bitset<7> pos(m_tseta[i]->position());
157  bitset<7> qua(m_tseta[i]->quality());
158  for ( int j = 6; j >= 0; j-- ) {
159  cout << pos[j]+qua[j];
160  }
161  cout << " ";
162  if ( (i+1)%5 == 0 ) cout << endl;
163  }
164  cout << "Found patterns :" << endl;
165  vector<int>::const_iterator iter;
166  for ( iter = m_foundPattern.begin(); iter != m_foundPattern.end(); iter++ ) {
167  const L1MuDTEtaPattern p = theEtaPatternLUT->getPattern(*iter);
168  int qualitycode = p.quality();
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++ ) {
176  if ( m_pattern[i] == p.id() ) cout << " <--";
177  }
178  cout << endl;
179  }
180  }
181 
182  cout << "Received addresses : " << endl;
183  for ( int i = 0; i < 12; i++ ) cout << setw(3) << m_address[i] << " ";
184  cout << endl;
185 
186  if ( !empty1 ) {
187  cout << "Matched patterns : " << endl;
188  for ( int i = 0; i < 12; i++ ) {
189  if ( m_fine[i] ) {
190  const L1MuDTEtaPattern p = theEtaPatternLUT->getPattern(m_pattern[i]);
191  int fineeta = p.eta();
192  int coarseeta = theQualPatternLUT->getCoarseEta(i/2+1,m_address[i]);
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;
199  }
200  }
201  }
202 
203  cout << "Eta values and fine bits : " << endl;
204  for ( int i = 0; i < 12; i++ ) cout << setw(3) << m_eta[i] << " ";
205  cout << endl;
206  for ( int i = 0; i < 12; i++ ) cout << setw(3) << m_fine[i] << " ";
207  cout << endl;
208  }
209 
210 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
int quality() const
return quality
edm::ESHandle< L1MuDTQualPatternLut > theQualPatternLUT
static int quality(int id, int stat)
get quality code; id [0,26], stat [1,3]
int id() const
return id
int eta() const
return eta
std::vector< const L1MuDTTrackSegEta * > m_tseta
int j
Definition: DBlmapReader.cc:9
std::vector< int > m_foundPattern
static int position[264][3]
Definition: ReadPGInfo.cc:509
tuple cout
Definition: gather_cfg.py:145
int L1MuDTEtaProcessor::quality ( int  id,
int  stat 
)
staticprivate

get quality code; id [0,26], stat [1,3]

Definition at line 464 of file L1MuDTEtaProcessor.cc.

References id().

Referenced by print(), and runEtaTrackFinder().

464  {
465 
466  // quality codes as defined in CMS Note 2001/027
467  // This QualityPatterns are used to have a defined Quality-Identifier for
468  // all possible found tracks.
469  // Therefore three integer numbers ( Station 1, 2, 3 from left to right )
470  // can have numbers like 0, 1 or 2
471  // 0 ... no hit is given
472  // 1 ... a LTRG is given
473  // 2 ... a HTRG is given
474 
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},
480  {1,2,2},{2,2,2} };
481 
482  return qualcode[id][stat-1];
483 
484 }
int id() const
return Eta Processor identifier (0-11)
void L1MuDTEtaProcessor::receiveAddresses ( )
private

receive addresses (from 6 Sector Processors)

Definition at line 274 of file L1MuDTEtaProcessor.cc.

References L1MuDTTrack::address(), L1MuDTTrack::empty(), i, m_address, m_epid, m_tf, m_TrackCand, m_TracKCand, contentValuesFiles::number, L1MuDTTrackFinder::sp(), L1MuDTSectorProcessor::track(), L1MuDTSectorProcessor::tracK(), and L1MuDTAddressArray::trackAddressCode().

Referenced by run().

274  {
275 
276  // get track address code of all track segments
277  // 6*2 times 5 bits; valid range [1-22]
278 
279  int sector = m_epid;
280 
281  int i = 0;
282  for ( int wheel = -3; wheel <= 3; wheel++ ) {
283  if ( wheel == 0 ) continue;
284  L1MuDTSecProcId tmpspid(wheel,sector);
285  for ( int number = 0; number < 2; number++ ) {
286  const L1MuDTTrack* cand = m_tf.sp(tmpspid)->track(number);
287  const L1MuDTTrack* canD = m_tf.sp(tmpspid)->tracK(number);
288  if ( cand ) {
289  m_address[i] = cand->address().trackAddressCode();
290  if ( !cand->empty() ) {
291  m_TrackCand[i] = const_cast<L1MuDTTrack*>(cand);
292  m_TracKCand[i] = const_cast<L1MuDTTrack*>(canD);
293  }
294  i++;
295  }
296  }
297  }
298 
299 }
int i
Definition: DBlmapReader.cc:9
const L1MuDTTrackFinder & m_tf
L1MuDTTrack * m_TracKCand[12]
L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
L1MuDTAddressArray address() const
get address-array for this muon candidate
Definition: L1MuDTTrack.h:96
int trackAddressCode() const
get track address code (for eta track finder)
const L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
get a pointer to a Sector Processor
bool empty() const
is it an empty muon candidate?
Definition: L1MuDTTrack.h:90
L1MuDTTrack * m_TrackCand[12]
L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]
void L1MuDTEtaProcessor::receiveData ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)
private

receive data (eta trigger primitives)

Definition at line 216 of file L1MuDTEtaProcessor.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), i, m_DTDigiToken, m_epid, m_mask, m_tseta, msks, L1MuDTChambThDigi::position(), and L1MuDTChambThDigi::quality().

Referenced by run().

216  {
217 
218  c.get< L1MuDTTFMasksRcd >().get( msks );
219 
221  e.getByToken(m_DTDigiToken,dttrig);
222 
223  // const int bx_offset = dttrig->correctBX();
224  int bx_offset=0;
225  bx = bx + bx_offset;
226 
227  //
228  // get 5*3 eta track segments
229  //
230  int sector = m_epid;
231  for ( int stat = 1; stat <= 3; stat++ ) {
232  for ( int wheel = -2; wheel <= 2; wheel++ ) {
233  L1MuDTChambThDigi const* tseta = dttrig->chThetaSegm(wheel,stat,sector,bx);
234  bitset<7> pos;
235  bitset<7> qual;
236 
237  int lwheel = wheel+1;
238  if ( wheel < 0 ) lwheel = wheel-1;
239 
240  bool masked = false;
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);
244 
245  if ( !masked ) m_mask = false;
246 
247  if ( tseta && !masked ) {
248 
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++ ) {
252  if ( tseta->position(i) ) pos.set(6-i);
253  if ( tseta->quality(i) ) qual.set(6-i);
254  }
255  } else {
256  for ( int i = 0; i < 7; i++ ) {
257  if ( tseta->position(i) ) pos.set(i);
258  if ( tseta->quality(i) ) qual.set(i);
259  }
260  }
261  }
262 
263  const L1MuDTTrackSegEta* tmpts = new L1MuDTTrackSegEta(wheel,sector,stat,pos.to_ulong(),qual.to_ulong(),bx-bx_offset);
264  m_tseta.push_back(tmpts);
265  }
266  }
267 
268 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
int quality(const int i) const
int position(const int i) const
std::vector< const L1MuDTTrackSegEta * > m_tseta
const T & get() const
Definition: EventSetup.h:56
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken
edm::ESHandle< L1MuDTTFMasks > msks
void L1MuDTEtaProcessor::reset ( void  )
virtual

reset the Eta Processor

Definition at line 104 of file L1MuDTEtaProcessor.cc.

References i, m_address, m_eta, m_fine, m_foundPattern, m_mask, m_pattern, m_TrackCand, m_TracKCand, and m_tseta.

104  {
105 
106  vector<const L1MuDTTrackSegEta*>::iterator iter = m_tseta.begin();
107  while ( iter != m_tseta.end() ) {
108  if ( *iter ) {
109  delete *iter;
110  *iter = 0;
111  }
112  iter++;
113  }
114 
115  m_tseta.clear();
116 
117  for ( int i = 0; i < 12; i++ ) {
118  m_eta[i] = 99;
119  m_fine[i] = false;
120  m_pattern[i] = 0;
121  m_address[i] = 0;
122  m_TrackCand[i] = 0;
123  m_TracKCand[i] = 0;
124  }
125 
126  m_foundPattern.clear();
127 
128  m_mask = true;
129 
130 }
int i
Definition: DBlmapReader.cc:9
L1MuDTTrack * m_TracKCand[12]
std::vector< const L1MuDTTrackSegEta * > m_tseta
std::vector< int > m_foundPattern
L1MuDTTrack * m_TrackCand[12]
void L1MuDTEtaProcessor::run ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)
virtual

run the Eta Processor

Definition at line 86 of file L1MuDTEtaProcessor.cc.

References assign(), L1MuDTTFConfig::getEtaTF(), receiveAddresses(), receiveData(), runEtaMatchingUnit(), and runEtaTrackFinder().

86  {
87 
88  if ( L1MuDTTFConfig::getEtaTF() ) {
89  receiveData(bx,e,c);
91  }
92 
95 
96  assign();
97 
98 }
void runEtaTrackFinder(const edm::EventSetup &c)
run Eta Track Finder (ETF)
void assign()
assign eta and etaFineBit
void receiveAddresses()
receive addresses (from 6 Sector Processors)
void runEtaMatchingUnit(const edm::EventSetup &c)
run Eta Matching Unit (EMU)
void receiveData(int bx, const edm::Event &e, const edm::EventSetup &c)
receive data (eta trigger primitives)
static bool getEtaTF()
void L1MuDTEtaProcessor::runEtaMatchingUnit ( const edm::EventSetup c)
private

run Eta Matching Unit (EMU)

Definition at line 352 of file L1MuDTEtaProcessor.cc.

References L1MuDTEtaPattern::eta(), spr::find(), edm::EventSetup::get(), i, m_address, m_eta, m_fine, m_foundPattern, m_mask, m_pattern, AlCaHLTBitMon_ParallelJobs::p, theEtaPatternLUT, and theQualPatternLUT.

Referenced by run().

352  {
353 
355 
356  // loop over all addresses
357  for ( int i = 0; i < 12; i++ ) {
358 
359  int adr = m_address[i];
360  if ( adr == 0 ) continue;
361  int sp = i/2 + 1; //sector processor [1,6]
362 
363  // assign coarse eta value
364  if ( !m_mask ) m_eta[i] = theQualPatternLUT->getCoarseEta(sp,adr);
365  if ( m_eta[i] == 99 ) m_eta[i] = 32;
366  if ( m_eta[i] > 31 ) m_eta[i] -= 64;
367  m_eta[i] += 32;
368 
369  if ( m_foundPattern.empty() ) continue;
370 
371  // get list of qualified patterns ordered by quality
372  // and compare with found patterns
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++ ) {
377  f_iter = find(m_foundPattern.begin(),m_foundPattern.end(),(*iter));
378  // found
379  if ( f_iter != m_foundPattern.end() ) {
380  const L1MuDTEtaPattern p = theEtaPatternLUT->getPattern(*f_iter);
381  // assign fine eta value
382  m_fine[i] = true;
383  m_eta[i] = p.eta(); // improved eta
384  if ( m_eta[i] == 99 ) m_eta[i] = 32;
385  if ( m_eta[i] > 31 ) m_eta[i] -= 64;
386  m_eta[i] += 32;
387  m_pattern[i] = (*f_iter);
388  break;
389  }
390  }
391 
392  }
393 
394  // if both tracks from one sector processor deliver the same track address
395  // both tracks get only a coarse eta value!
396 
397  // loop over sector processors
398  for ( int i = 0; i < 6; i++ ) {
399  int idx1 = 2*i;
400  int idx2 = 2*i+1;
401  int adr1 = m_address[idx1];
402  int adr2 = m_address[idx2];
403  if ( adr1 == 0 || adr2 == 0 ) continue;
404  if ( adr1 == adr2 && !m_mask ) {
405  // both tracks get coarse (default) eta value
406  m_eta[idx1] = theQualPatternLUT->getCoarseEta(i+1,adr1);
407  if ( m_eta[idx1] == 99 ) m_eta[idx1] = 32;
408  if ( m_eta[idx1] > 31 ) m_eta[idx1] -= 64;
409  m_eta[idx1] += 32;
410  m_pattern[idx1] = 0;
411  m_fine[idx1] = false;
412  m_eta[idx2] = theQualPatternLUT->getCoarseEta(i+1,adr2);
413  if ( m_eta[idx2] == 99 ) m_eta[idx2] = 32;
414  if ( m_eta[idx2] > 31 ) m_eta[idx2] -= 64;
415  m_eta[idx2] += 32;
416  m_pattern[idx2] = 0;
417  m_fine[idx2] = false;
418  }
419  }
420 
421 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
edm::ESHandle< L1MuDTQualPatternLut > theQualPatternLUT
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
int eta() const
return eta
std::vector< int > m_foundPattern
const T & get() const
Definition: EventSetup.h:56
Definition: sp.h:21
void L1MuDTEtaProcessor::runEtaTrackFinder ( const edm::EventSetup c)
private

run Eta Track Finder (ETF)

Definition at line 305 of file L1MuDTEtaProcessor.cc.

References newFWLiteAna::bin, relativeConstraints::empty, edm::EventSetup::get(), i, L1MuDTEtaPattern::id(), m_foundPattern, m_tseta, listBenchmarks::pattern, L1MuDTEtaPattern::position(), lumiQueryAPI::q, L1MuDTEtaPattern::quality(), quality(), relativeConstraints::station, theEtaPatternLUT, and L1MuDTEtaPattern::wheel().

Referenced by run().

305  {
306 
308 
309  // check if there are any data
310  bool empty = true;
311  for ( int i = 0; i < 15; i++ ) {
312  empty &= m_tseta[i]->empty();
313  }
314  if ( empty ) return;
315 
316  // Pattern comparator:
317  // loop over all patterns and compare with local chamber pattern
318  // result : list of valid pattern IDs ( m_foundPattern )
320  while ( it != theEtaPatternLUT->end() ) {
321 
322  const L1MuDTEtaPattern pattern = (*it).second;
323  int qualitycode = pattern.quality();
324 
325  bool good = true;
326 
327  for ( int station = 0; station < 3; station++) {
328  int q = quality(qualitycode,station+1);
329  int wheel = pattern.wheel(station+1);
330  int bin = pattern.position(station+1);
331  if ( bin == 0 ) continue;
332  bitset<7> pos = m_tseta[wheel+2 + station*5]->position();
333  bitset<7> qual = m_tseta[wheel+2 + station*5]->quality();
334  // compare position
335  good &= pos.test(bin-1);
336  // compare quality
337  if ( q == 2 ) good &= qual.test(bin-1);
338  }
339 
340  if ( good ) m_foundPattern.push_back(pattern.id());
341 
342  it++;
343 
344  }
345 
346 }
int i
Definition: DBlmapReader.cc:9
LUT::const_iterator ETFLut_iter
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
int quality() const
return quality
static int quality(int id, int stat)
get quality code; id [0,26], stat [1,3]
int position(int station) const
return position in station [1,3]
int id() const
return id
std::vector< const L1MuDTTrackSegEta * > m_tseta
std::vector< int > m_foundPattern
const T & get() const
Definition: EventSetup.h:56
int wheel(int station) const
return wheel number in station [1,3]
const L1MuDTTrackFinder& L1MuDTEtaProcessor::tf ( ) const
inline

return reference to barrel MTTF

Definition at line 78 of file L1MuDTEtaProcessor.h.

References m_tf.

78 { return m_tf; }
const L1MuDTTrackFinder & m_tf

Member Data Documentation

int L1MuDTEtaProcessor::m_address[12]
private

Definition at line 119 of file L1MuDTEtaProcessor.h.

Referenced by print(), receiveAddresses(), reset(), and runEtaMatchingUnit().

edm::EDGetTokenT<L1MuDTChambThContainer> L1MuDTEtaProcessor::m_DTDigiToken
private

Definition at line 123 of file L1MuDTEtaProcessor.h.

Referenced by receiveData().

int L1MuDTEtaProcessor::m_epid
private

Definition at line 109 of file L1MuDTEtaProcessor.h.

Referenced by id(), print(), receiveAddresses(), and receiveData().

int L1MuDTEtaProcessor::m_eta[12]
private

Definition at line 113 of file L1MuDTEtaProcessor.h.

Referenced by assign(), eta(), print(), reset(), and runEtaMatchingUnit().

bool L1MuDTEtaProcessor::m_fine[12]
private

Definition at line 114 of file L1MuDTEtaProcessor.h.

Referenced by assign(), fineBit(), print(), reset(), and runEtaMatchingUnit().

std::vector<int> L1MuDTEtaProcessor::m_foundPattern
private

Definition at line 116 of file L1MuDTEtaProcessor.h.

Referenced by print(), reset(), runEtaMatchingUnit(), and runEtaTrackFinder().

int L1MuDTEtaProcessor::m_mask
private

Definition at line 111 of file L1MuDTEtaProcessor.h.

Referenced by receiveData(), reset(), and runEtaMatchingUnit().

int L1MuDTEtaProcessor::m_pattern[12]
private

Definition at line 117 of file L1MuDTEtaProcessor.h.

Referenced by assign(), print(), reset(), and runEtaMatchingUnit().

const L1MuDTTrackFinder& L1MuDTEtaProcessor::m_tf
private

Definition at line 108 of file L1MuDTEtaProcessor.h.

Referenced by receiveAddresses(), and tf().

L1MuDTTrack* L1MuDTEtaProcessor::m_TrackCand[12]
private

Definition at line 120 of file L1MuDTEtaProcessor.h.

Referenced by assign(), receiveAddresses(), and reset().

L1MuDTTrack* L1MuDTEtaProcessor::m_TracKCand[12]
private

Definition at line 121 of file L1MuDTEtaProcessor.h.

Referenced by assign(), receiveAddresses(), and reset().

std::vector<const L1MuDTTrackSegEta*> L1MuDTEtaProcessor::m_tseta
private
edm::ESHandle< L1MuDTTFMasks > L1MuDTEtaProcessor::msks
private

Definition at line 127 of file L1MuDTEtaProcessor.h.

Referenced by receiveData().

edm::ESHandle< L1MuDTEtaPatternLut > L1MuDTEtaProcessor::theEtaPatternLUT
private

Definition at line 125 of file L1MuDTEtaProcessor.h.

Referenced by assign(), print(), runEtaMatchingUnit(), and runEtaTrackFinder().

edm::ESHandle< L1MuDTQualPatternLut > L1MuDTEtaProcessor::theQualPatternLUT
private

Definition at line 126 of file L1MuDTEtaProcessor.h.

Referenced by print(), and runEtaMatchingUnit().