CMS 3D CMS Logo

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< L1MuDTChambThContainerm_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< L1MuDTEtaPatternLuttheEtaPatternLUT
 
edm::ESHandle< L1MuDTQualPatternLuttheQualPatternLUT
 

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.

64  : m_tf(tf),
65  m_epid(id),
66  m_foundPattern(0),
67  m_tseta(15),
69  m_tseta.reserve(15);
70 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::InputTag getDTDigiInputTag() const
const L1MuDTTrackFinder & m_tf
std::vector< const L1MuDTTrackSegEta * > m_tseta
std::vector< int > m_foundPattern
static L1MuDTTFConfig * config()
return configuration
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 431 of file L1MuDTEtaProcessor.cc.

References L1MuDTEtaPatternLut::getPattern(), mps_fire::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 fineBit(), and run().

431  {
432  for (int i = 0; i < 12; i++) {
433  if (m_TrackCand[i]) {
434  if (m_eta[i] != 99) {
435  m_TrackCand[i]->setEta(m_eta[i]);
436  m_TracKCand[i]->setEta(m_eta[i]);
437  } else {
438  // if ( i/2 != 2 ) cerr << "L1MuDTEtaProcessor: assign invalid eta" << " " << m_address[i] << endl;
439  }
440  if (m_fine[i]) {
443  // find all contributing track segments
445  vector<const L1MuDTTrackSegEta*> TSeta;
446  const L1MuDTTrackSegEta* ts = nullptr;
447  for (int stat = 0; stat < 3; stat++) {
448  int wh = p.wheel(stat + 1);
449  int pos = p.position(stat + 1);
450  if (pos == 0)
451  continue;
452  ts = m_tseta[wh + 2 + stat * 5];
453  TSeta.push_back(ts);
454  }
455  m_TrackCand[i]->setTSeta(TSeta);
456  m_TracKCand[i]->setTSeta(TSeta);
457  }
458  }
459  }
460 }
void setFineEtaBit()
set fine eta bit
Definition: L1MuDTTrack.h:143
L1MuDTTrack * m_TracKCand[12]
int position(int station) const
return position in station [1,3]
L1MuDTEtaPattern getPattern(int id) const
get pattern with a given ID
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:158
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
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 79 of file L1MuDTEtaProcessor.h.

References id(), and m_eta.

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

79 { 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 82 of file L1MuDTEtaProcessor.h.

References assign(), id(), m_fine, quality(), receiveAddresses(), receiveData(), runEtaMatchingUnit(), and runEtaTrackFinder().

82 { 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 64 of file L1MuDTEtaProcessor.h.

References l1GtPatternGenerator_cfi::bx, HltBtagPostValidation_cff::c, MillePedeFileConverter_cfg::e, m_epid, print(), reset(), and run().

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

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

print muon candidates found by the Eta Processor

Definition at line 129 of file L1MuDTEtaProcessor.cc.

References gather_cfg::cout, L1MuDTEtaPattern::eta(), L1MuDTQualPatternLut::getCoarseEta(), L1MuDTEtaPatternLut::getPattern(), mps_fire::i, L1MuDTEtaPattern::id(), dqmiolumiharvest::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.

Referenced by id().

129  {
130  bool empty1 = true;
131  for (int i = 0; i < 15; i++) {
132  empty1 &= (m_tseta[i] == nullptr || m_tseta[i]->empty());
133  }
134 
135  bool empty2 = true;
136  for (int i = 0; i < 12; i++) {
137  empty2 &= (m_address[i] == 0);
138  }
139 
140  if (!empty1 || !empty2) {
141  cout << "Eta processor " << m_epid << " : " << endl;
142 
143  // print local pattern
144  if (!empty1) {
145  cout << "Local pattern : " << endl;
146  for (int i = 0; i < 15; i++) {
147  if ((i + 5) % 5 == 0)
148  cout << "station " << m_tseta[i]->station() << " : ";
149  bitset<7> pos(m_tseta[i]->position());
150  bitset<7> qua(m_tseta[i]->quality());
151  for (int j = 6; j >= 0; j--) {
152  cout << pos[j] + qua[j];
153  }
154  cout << " ";
155  if ((i + 1) % 5 == 0)
156  cout << endl;
157  }
158  cout << "Found patterns :" << endl;
159  vector<int>::const_iterator iter;
160  for (iter = m_foundPattern.begin(); iter != m_foundPattern.end(); iter++) {
162  int qualitycode = p.quality();
163  cout << "ID = " << setw(4) << p.id() << " "
164  << "eta = " << setw(3) << p.eta() << " "
165  << "quality = " << setw(2) << qualitycode << " (" << quality(qualitycode, 1) << " "
166  << quality(qualitycode, 2) << " " << quality(qualitycode, 3) << ")";
167  for (int i = 0; i < 12; i++) {
168  if (m_pattern[i] == p.id())
169  cout << " <--";
170  }
171  cout << endl;
172  }
173  }
174 
175  cout << "Received addresses : " << endl;
176  for (int i = 0; i < 12; i++)
177  cout << setw(3) << m_address[i] << " ";
178  cout << endl;
179 
180  if (!empty1) {
181  cout << "Matched patterns : " << endl;
182  for (int i = 0; i < 12; i++) {
183  if (m_fine[i]) {
185  int fineeta = p.eta();
186  int coarseeta = theQualPatternLUT->getCoarseEta(i / 2 + 1, m_address[i]);
187  cout << "Index = " << setw(2) << i << ", "
188  << "address = " << setw(2) << m_address[i] << " --> "
189  << "pattern = " << setw(4) << m_pattern[i] << " "
190  << "eta (coarse) = " << setw(3) << coarseeta << " "
191  << "eta (fine) = " << setw(3) << fineeta << " "
192  << "quality = " << setw(2) << p.quality() << endl;
193  }
194  }
195  }
196 
197  cout << "Eta values and fine bits : " << endl;
198  for (int i = 0; i < 12; i++)
199  cout << setw(3) << m_eta[i] << " ";
200  cout << endl;
201  for (int i = 0; i < 12; i++)
202  cout << setw(3) << m_fine[i] << " ";
203  cout << endl;
204  }
205 }
int quality() const
return quality
static int quality(int id, int stat)
get quality code; id [0,26], stat [1,3]
L1MuDTEtaPattern getPattern(int id) const
get pattern with a given ID
int id() const
return id
int eta() const
return eta
int getCoarseEta(int sp, int adr) const
get coarse eta value for a given sector processor [1-6] and address [1-22]
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
std::vector< const L1MuDTTrackSegEta * > m_tseta
std::vector< int > m_foundPattern
static int position[264][3]
Definition: ReadPGInfo.cc:289
edm::ESHandle< L1MuDTQualPatternLut > theQualPatternLUT
int L1MuDTEtaProcessor::quality ( int  id,
int  stat 
)
staticprivate

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

Definition at line 465 of file L1MuDTEtaProcessor.cc.

References id().

Referenced by fineBit(), print(), and runEtaTrackFinder().

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}, {0, 2, 0}, {0, 0, 2},
476  {1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {2, 1, 0}, {1, 2, 0}, {2, 0, 1}, {1, 0, 2},
477  {0, 2, 1}, {0, 1, 2}, {2, 2, 0}, {2, 0, 2}, {0, 2, 2}, {1, 1, 1}, {2, 1, 1},
478  {1, 2, 1}, {1, 1, 2}, {2, 2, 1}, {2, 1, 2}, {1, 2, 2}, {2, 2, 2}};
479 
480  return qualcode[id][stat - 1];
481 }
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(), mps_fire::i, m_address, m_epid, m_tf, m_TrackCand, m_TracKCand, contentValuesFiles::number, L1MuDTTrackFinder::sp(), L1MuDTSectorProcessor::track(), L1MuDTSectorProcessor::tracK(), L1MuDTAddressArray::trackAddressCode(), and makeMuonMisalignmentScenario::wheel.

Referenced by fineBit(), and run().

274  {
275  // get track address code of all track segments
276  // 6*2 times 5 bits; valid range [1-22]
277 
278  int sector = m_epid;
279 
280  int i = 0;
281  for (int wheel = -3; wheel <= 3; wheel++) {
282  if (wheel == 0)
283  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 }
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:92
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 override
is it an empty muon candidate?
Definition: L1MuDTTrack.h:86
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 210 of file L1MuDTEtaProcessor.cc.

References L1MuDTChambThContainer::chThetaSegm(), edm::EventSetup::get(), L1MuDTTFMasks::get_etsoc_chdis_st1(), L1MuDTTFMasks::get_etsoc_chdis_st2(), L1MuDTTFMasks::get_etsoc_chdis_st3(), edm::Event::getByToken(), mps_fire::i, m_DTDigiToken, m_epid, m_mask, m_tseta, msks, L1MuDTChambThDigi::position(), L1MuDTChambThDigi::quality(), and makeMuonMisalignmentScenario::wheel.

Referenced by fineBit(), and run().

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

reset the Eta Processor

Definition at line 100 of file L1MuDTEtaProcessor.cc.

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

Referenced by id().

100  {
101  vector<const L1MuDTTrackSegEta*>::iterator iter = m_tseta.begin();
102  while (iter != m_tseta.end()) {
103  if (*iter) {
104  delete *iter;
105  *iter = nullptr;
106  }
107  iter++;
108  }
109 
110  m_tseta.clear();
111 
112  for (int i = 0; i < 12; i++) {
113  m_eta[i] = 99;
114  m_fine[i] = false;
115  m_pattern[i] = 0;
116  m_address[i] = 0;
117  m_TrackCand[i] = nullptr;
118  m_TracKCand[i] = nullptr;
119  }
120 
121  m_foundPattern.clear();
122 
123  m_mask = true;
124 }
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 85 of file L1MuDTEtaProcessor.cc.

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

Referenced by id().

85  {
86  if (m_tf.config()->getEtaTF()) {
87  receiveData(bx, e, c);
89  }
90 
93 
94  assign();
95 }
void runEtaTrackFinder(const edm::EventSetup &c)
run Eta Track Finder (ETF)
const L1MuDTTrackFinder & m_tf
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)
bool getEtaTF() const
static L1MuDTTFConfig * config()
return configuration
void L1MuDTEtaProcessor::runEtaMatchingUnit ( const edm::EventSetup c)
private

run Eta Matching Unit (EMU)

Definition at line 349 of file L1MuDTEtaProcessor.cc.

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

Referenced by fineBit(), and run().

349  {
351 
352  // loop over all addresses
353  for (int i = 0; i < 12; i++) {
354  int adr = m_address[i];
355  if (adr == 0)
356  continue;
357  int sp = i / 2 + 1; //sector processor [1,6]
358 
359  // assign coarse eta value
360  if (!m_mask)
361  m_eta[i] = theQualPatternLUT->getCoarseEta(sp, adr);
362  if (m_eta[i] == 99)
363  m_eta[i] = 32;
364  if (m_eta[i] > 31)
365  m_eta[i] -= 64;
366  m_eta[i] += 32;
367 
368  if (m_foundPattern.empty())
369  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)
385  m_eta[i] = 32;
386  if (m_eta[i] > 31)
387  m_eta[i] -= 64;
388  m_eta[i] += 32;
389  m_pattern[i] = (*f_iter);
390  break;
391  }
392  }
393  }
394 
395  // if both tracks from one sector processor deliver the same track address
396  // both tracks get only a coarse eta value!
397 
398  // loop over sector processors
399  for (int i = 0; i < 6; i++) {
400  int idx1 = 2 * i;
401  int idx2 = 2 * i + 1;
402  int adr1 = m_address[idx1];
403  int adr2 = m_address[idx2];
404  if (adr1 == 0 || adr2 == 0)
405  continue;
406  if (adr1 == adr2 && !m_mask) {
407  // both tracks get coarse (default) eta value
408  m_eta[idx1] = theQualPatternLUT->getCoarseEta(i + 1, adr1);
409  if (m_eta[idx1] == 99)
410  m_eta[idx1] = 32;
411  if (m_eta[idx1] > 31)
412  m_eta[idx1] -= 64;
413  m_eta[idx1] += 32;
414  m_pattern[idx1] = 0;
415  m_fine[idx1] = false;
416  m_eta[idx2] = theQualPatternLUT->getCoarseEta(i + 1, adr2);
417  if (m_eta[idx2] == 99)
418  m_eta[idx2] = 32;
419  if (m_eta[idx2] > 31)
420  m_eta[idx2] -= 64;
421  m_eta[idx2] += 32;
422  m_pattern[idx2] = 0;
423  m_fine[idx2] = false;
424  }
425  }
426 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
L1MuDTEtaPattern getPattern(int id) const
get pattern with a given ID
int eta() const
return eta
int getCoarseEta(int sp, int adr) const
get coarse eta value for a given sector processor [1-6] and address [1-22]
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
std::vector< int > m_foundPattern
T get() const
Definition: EventSetup.h:73
edm::ESHandle< L1MuDTQualPatternLut > theQualPatternLUT
const std::vector< short > & getQualifiedPatterns(int sp, int adr) const
get list of qualified patterns for a given sector processor [1-6] and address [1-22] ...
void L1MuDTEtaProcessor::runEtaTrackFinder ( const edm::EventSetup c)
private

run Eta Track Finder (ETF)

Definition at line 303 of file L1MuDTEtaProcessor.cc.

References L1MuDTEtaPatternLut::begin(), newFWLiteAna::bin, relativeConstraints::empty, L1MuDTEtaPatternLut::end(), edm::EventSetup::get(), mps_fire::i, L1MuDTEtaPattern::id(), m_foundPattern, m_tseta, topSingleLeptonDQM_PU_cfi::pattern, L1MuDTEtaPattern::position(), data-class-funcs::q, L1MuDTEtaPattern::quality(), quality(), relativeConstraints::station, theEtaPatternLUT, L1MuDTEtaPattern::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by fineBit(), and run().

303  {
305 
306  // check if there are any data
307  bool empty = true;
308  for (int i = 0; i < 15; i++) {
309  empty &= m_tseta[i]->empty();
310  }
311  if (empty)
312  return;
313 
314  // Pattern comparator:
315  // loop over all patterns and compare with local chamber pattern
316  // result : list of valid pattern IDs ( m_foundPattern )
318  while (it != theEtaPatternLUT->end()) {
319  const L1MuDTEtaPattern pattern = (*it).second;
320  int qualitycode = pattern.quality();
321 
322  bool good = true;
323 
324  for (int station = 0; station < 3; station++) {
325  int q = quality(qualitycode, station + 1);
326  int wheel = pattern.wheel(station + 1);
327  int bin = pattern.position(station + 1);
328  if (bin == 0)
329  continue;
330  bitset<7> pos = m_tseta[wheel + 2 + station * 5]->position();
331  bitset<7> qual = m_tseta[wheel + 2 + station * 5]->quality();
332  // compare position
333  good &= pos.test(bin - 1);
334  // compare quality
335  if (q == 2)
336  good &= qual.test(bin - 1);
337  }
338 
339  if (good)
340  m_foundPattern.push_back(pattern.id());
341 
342  it++;
343  }
344 }
LUT::const_iterator ETFLut_iter
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
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
std::vector< const L1MuDTTrackSegEta * > m_tseta
ETFLut_iter begin() const
return iterator which points to the first entry of the LUT
std::vector< int > m_foundPattern
ETFLut_iter end() const
return iterator which points to the one-past-last entry of the LUT
T get() const
Definition: EventSetup.h:73
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 76 of file L1MuDTEtaProcessor.h.

References m_tf.

76 { return m_tf; }
const L1MuDTTrackFinder & m_tf

Member Data Documentation

int L1MuDTEtaProcessor::m_address[12]
private

Definition at line 115 of file L1MuDTEtaProcessor.h.

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

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

Definition at line 119 of file L1MuDTEtaProcessor.h.

Referenced by receiveData().

int L1MuDTEtaProcessor::m_epid
private

Definition at line 105 of file L1MuDTEtaProcessor.h.

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

int L1MuDTEtaProcessor::m_eta[12]
private

Definition at line 109 of file L1MuDTEtaProcessor.h.

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

bool L1MuDTEtaProcessor::m_fine[12]
private

Definition at line 110 of file L1MuDTEtaProcessor.h.

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

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

Definition at line 112 of file L1MuDTEtaProcessor.h.

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

int L1MuDTEtaProcessor::m_mask
private

Definition at line 107 of file L1MuDTEtaProcessor.h.

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

int L1MuDTEtaProcessor::m_pattern[12]
private

Definition at line 113 of file L1MuDTEtaProcessor.h.

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

const L1MuDTTrackFinder& L1MuDTEtaProcessor::m_tf
private

Definition at line 104 of file L1MuDTEtaProcessor.h.

Referenced by receiveAddresses(), run(), and tf().

L1MuDTTrack* L1MuDTEtaProcessor::m_TrackCand[12]
private

Definition at line 116 of file L1MuDTEtaProcessor.h.

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

L1MuDTTrack* L1MuDTEtaProcessor::m_TracKCand[12]
private

Definition at line 117 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 123 of file L1MuDTEtaProcessor.h.

Referenced by receiveData().

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

Definition at line 121 of file L1MuDTEtaProcessor.h.

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

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

Definition at line 122 of file L1MuDTEtaProcessor.h.

Referenced by print(), and runEtaMatchingUnit().