CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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< 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::ESGetToken< L1MuDTEtaPatternLut, L1MuDTEtaPatternLutRcdtheEtaToken
 
edm::ESGetToken< L1MuDTTFMasks, L1MuDTTFMasksRcdtheMsksToken
 
edm::ESHandle< L1MuDTQualPatternLuttheQualPatternLUT
 
edm::ESGetToken< L1MuDTQualPatternLut, L1MuDTQualPatternLutRcdtheQualToken
 

Detailed Description

Eta Processor:

An Eta Processor consists of :

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 58 of file L1MuDTEtaProcessor.h.

Constructor & Destructor Documentation

◆ L1MuDTEtaProcessor()

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  theEtaToken(iC.esConsumes()),
71  theMsksToken(iC.esConsumes()) {
72  m_tseta.reserve(15);
73 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const L1MuDTTrackFinder & m_tf
edm::ESGetToken< L1MuDTEtaPatternLut, L1MuDTEtaPatternLutRcd > theEtaToken
edm::ESGetToken< L1MuDTTFMasks, L1MuDTTFMasksRcd > theMsksToken
edm::InputTag getDTDigiInputTag() const
std::vector< const L1MuDTTrackSegEta * > m_tseta
edm::ESGetToken< L1MuDTQualPatternLut, L1MuDTQualPatternLutRcd > theQualToken
const L1MuDTTFConfig * config() const
return configuration
std::vector< int > m_foundPattern
const L1MuDTTrackFinder & tf() const
return reference to barrel MTTF
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken

◆ ~L1MuDTEtaProcessor()

L1MuDTEtaProcessor::~L1MuDTEtaProcessor ( )
virtual

destructor

Definition at line 79 of file L1MuDTEtaProcessor.cc.

79 {}

Member Function Documentation

◆ assign()

void L1MuDTEtaProcessor::assign ( )
private

assign eta and etaFineBit

Definition at line 434 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, L1MuDTTrack::setEta(), L1MuDTTrack::setFineEtaBit(), L1MuDTTrack::setTSeta(), and theEtaPatternLUT.

Referenced by run().

434  {
435  for (int i = 0; i < 12; i++) {
436  if (m_TrackCand[i]) {
437  if (m_eta[i] != 99) {
438  m_TrackCand[i]->setEta(m_eta[i]);
439  m_TracKCand[i]->setEta(m_eta[i]);
440  } else {
441  // if ( i/2 != 2 ) cerr << "L1MuDTEtaProcessor: assign invalid eta" << " " << m_address[i] << endl;
442  }
443  if (m_fine[i]) {
446  // find all contributing track segments
448  vector<const L1MuDTTrackSegEta*> TSeta;
449  const L1MuDTTrackSegEta* ts = nullptr;
450  for (int stat = 0; stat < 3; stat++) {
451  int wh = p.wheel(stat + 1);
452  int pos = p.position(stat + 1);
453  if (pos == 0)
454  continue;
455  ts = m_tseta[wh + 2 + stat * 5];
456  TSeta.push_back(ts);
457  }
458  m_TrackCand[i]->setTSeta(TSeta);
459  m_TracKCand[i]->setTSeta(TSeta);
460  }
461  }
462  }
463 }
void setFineEtaBit()
set fine eta bit
Definition: L1MuDTTrack.h:141
L1MuDTTrack * m_TracKCand[12]
void setTSeta(const std::vector< const L1MuDTTrackSegEta *> &tsList)
set eta track segments used to form the muon candidate
Definition: L1MuDTTrack.cc:158
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
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
std::vector< const L1MuDTTrackSegEta * > m_tseta
L1MuDTTrack * m_TrackCand[12]

◆ eta()

int L1MuDTEtaProcessor::eta ( int  id) const
inline

return eta values, index [0,11]

Definition at line 82 of file L1MuDTEtaProcessor.h.

References id(), and m_eta.

Referenced by Particle.Particle::__str__(), datamodel.Object::DeltaR(), Jet.Jet::jetID(), datamodel.Object::p4(), and Jet.Jet::puJetId().

82 { return m_eta[id]; }
int id() const
return Eta Processor identifier (0-11)

◆ fineBit()

bool L1MuDTEtaProcessor::fineBit ( int  id) const
inline

return fine bit, index [0,11]

Definition at line 85 of file L1MuDTEtaProcessor.h.

References id(), and m_fine.

85 { return m_fine[id]; }
int id() const
return Eta Processor identifier (0-11)

◆ id()

int L1MuDTEtaProcessor::id ( void  ) const
inline

return Eta Processor identifier (0-11)

Definition at line 67 of file L1MuDTEtaProcessor.h.

References m_epid.

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

67 { return m_epid; }

◆ print()

void L1MuDTEtaProcessor::print ( void  ) const

print muon candidates found by the Eta Processor

Definition at line 132 of file L1MuDTEtaProcessor.cc.

References gather_cfg::cout, L1MuDTQualPatternLut::getCoarseEta(), L1MuDTEtaPatternLut::getPattern(), mps_fire::i, dqmiolumiharvest::j, m_address, m_epid, m_eta, m_fine, m_foundPattern, m_pattern, m_tseta, AlCaHLTBitMon_ParallelJobs::p, position, quality(), relativeConstraints::station, theEtaPatternLUT, and theQualPatternLUT.

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

◆ quality()

int L1MuDTEtaProcessor::quality ( int  id,
int  stat 
)
staticprivate

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

Definition at line 468 of file L1MuDTEtaProcessor.cc.

References id().

Referenced by print(), and runEtaTrackFinder().

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

◆ receiveAddresses()

void L1MuDTEtaProcessor::receiveAddresses ( )
private

receive addresses (from 6 Sector Processors)

Definition at line 277 of file L1MuDTEtaProcessor.cc.

References mps_fire::i, m_address, m_epid, m_tf, m_TrackCand, m_TracKCand, contentValuesFiles::number, nano_mu_digi_cff::sector, L1MuDTTrackFinder::sp(), L1MuDTSectorProcessor::track(), L1MuDTSectorProcessor::tracK(), and makeMuonMisalignmentScenario::wheel.

Referenced by run().

277  {
278  // get track address code of all track segments
279  // 6*2 times 5 bits; valid range [1-22]
280 
281  int sector = m_epid;
282 
283  int i = 0;
284  for (int wheel = -3; wheel <= 3; wheel++) {
285  if (wheel == 0)
286  continue;
287  L1MuDTSecProcId tmpspid(wheel, sector);
288  for (int number = 0; number < 2; number++) {
289  const L1MuDTTrack* cand = m_tf.sp(tmpspid)->track(number);
290  const L1MuDTTrack* canD = m_tf.sp(tmpspid)->tracK(number);
291  if (cand) {
292  m_address[i] = cand->address().trackAddressCode();
293  if (!cand->empty()) {
294  m_TrackCand[i] = const_cast<L1MuDTTrack*>(cand);
295  m_TracKCand[i] = const_cast<L1MuDTTrack*>(canD);
296  }
297  i++;
298  }
299  }
300  }
301 }
const L1MuDTTrackFinder & m_tf
L1MuDTTrack * m_TracKCand[12]
const L1MuDTTrack * tracK(int id) const
return pointer to muon candidate, index [0,1]
const L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
get a pointer to a Sector Processor
L1MuDTTrack * m_TrackCand[12]
const L1MuDTTrack * track(int id) const
return pointer to muon candidate, index [0,1]

◆ receiveData()

void L1MuDTEtaProcessor::receiveData ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)
private

receive data (eta trigger primitives)

Definition at line 213 of file L1MuDTEtaProcessor.cc.

References nano_mu_digi_cff::bx, HltBtagPostValidation_cff::c, L1MuDTChambThContainer::chThetaSegm(), MillePedeFileConverter_cfg::e, L1MuDTTFMasks::get_etsoc_chdis_st1(), L1MuDTTFMasks::get_etsoc_chdis_st2(), L1MuDTTFMasks::get_etsoc_chdis_st3(), mps_fire::i, m_DTDigiToken, m_epid, m_mask, m_tseta, msks, L1MuDTChambThDigi::position(), l1tGTMenu_lepSeeds_cff::qual, L1MuDTChambThDigi::quality(), nano_mu_digi_cff::sector, theMsksToken, and makeMuonMisalignmentScenario::wheel.

Referenced by run().

213  {
214  msks = c.getHandle(theMsksToken);
215 
217  e.getByToken(m_DTDigiToken, dttrig);
218 
219  // const int bx_offset = dttrig->correctBX();
220  int bx_offset = 0;
221  bx = bx + bx_offset;
222 
223  //
224  // get 5*3 eta track segments
225  //
226  int sector = m_epid;
227  for (int stat = 1; stat <= 3; stat++) {
228  for (int wheel = -2; wheel <= 2; wheel++) {
229  L1MuDTChambThDigi const* tseta = dttrig->chThetaSegm(wheel, stat, sector, bx);
230  bitset<7> pos;
231  bitset<7> qual;
232 
233  int lwheel = wheel + 1;
234  if (wheel < 0)
235  lwheel = wheel - 1;
236 
237  bool masked = false;
238  if (stat == 1)
239  masked = msks->get_etsoc_chdis_st1(lwheel, sector);
240  if (stat == 2)
241  masked = msks->get_etsoc_chdis_st2(lwheel, sector);
242  if (stat == 3)
243  masked = msks->get_etsoc_chdis_st3(lwheel, sector);
244 
245  if (!masked)
246  m_mask = false;
247 
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++) {
252  if (tseta->position(i))
253  pos.set(6 - i);
254  if (tseta->quality(i))
255  qual.set(6 - i);
256  }
257  } else {
258  for (int i = 0; i < 7; i++) {
259  if (tseta->position(i))
260  pos.set(i);
261  if (tseta->quality(i))
262  qual.set(i);
263  }
264  }
265  }
266 
267  const L1MuDTTrackSegEta* tmpts =
268  new L1MuDTTrackSegEta(wheel, sector, stat, pos.to_ulong(), qual.to_ulong(), bx - bx_offset);
269  m_tseta.push_back(tmpts);
270  }
271  }
272 }
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
bool get_etsoc_chdis_st2(int wh, int sc) const
edm::ESGetToken< L1MuDTTFMasks, L1MuDTTFMasksRcd > theMsksToken
int position(const int i) const
edm::ESHandle< L1MuDTTFMasks > msks
bool get_etsoc_chdis_st1(int wh, int sc) const
std::vector< const L1MuDTTrackSegEta * > m_tseta
bool get_etsoc_chdis_st3(int wh, int sc) const
int quality(const int i) const
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken

◆ reset()

void L1MuDTEtaProcessor::reset ( void  )
virtual

reset the Eta Processor

Definition at line 103 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.

103  {
104  vector<const L1MuDTTrackSegEta*>::iterator iter = m_tseta.begin();
105  while (iter != m_tseta.end()) {
106  if (*iter) {
107  delete *iter;
108  *iter = nullptr;
109  }
110  iter++;
111  }
112 
113  m_tseta.clear();
114 
115  for (int i = 0; i < 12; i++) {
116  m_eta[i] = 99;
117  m_fine[i] = false;
118  m_pattern[i] = 0;
119  m_address[i] = 0;
120  m_TrackCand[i] = nullptr;
121  m_TracKCand[i] = nullptr;
122  }
123 
124  m_foundPattern.clear();
125 
126  m_mask = true;
127 }
L1MuDTTrack * m_TracKCand[12]
std::vector< const L1MuDTTrackSegEta * > m_tseta
std::vector< int > m_foundPattern
L1MuDTTrack * m_TrackCand[12]

◆ run()

void L1MuDTEtaProcessor::run ( int  bx,
const edm::Event e,
const edm::EventSetup c 
)
virtual

run the Eta Processor

Definition at line 88 of file L1MuDTEtaProcessor.cc.

References assign(), nano_mu_digi_cff::bx, HltBtagPostValidation_cff::c, L1MuDTTrackFinder::config(), MillePedeFileConverter_cfg::e, L1MuDTTFConfig::getEtaTF(), m_tf, receiveAddresses(), receiveData(), runEtaMatchingUnit(), and runEtaTrackFinder().

88  {
89  if (m_tf.config()->getEtaTF()) {
90  receiveData(bx, e, c);
92  }
93 
96 
97  assign();
98 }
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)
const L1MuDTTFConfig * config() const
return configuration
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

◆ runEtaMatchingUnit()

void L1MuDTEtaProcessor::runEtaMatchingUnit ( const edm::EventSetup c)
private

run Eta Matching Unit (EMU)

Definition at line 352 of file L1MuDTEtaProcessor.cc.

References HltBtagPostValidation_cff::c, spr::find(), 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, theQualPatternLUT, and theQualToken.

Referenced by run().

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

◆ runEtaTrackFinder()

void L1MuDTEtaProcessor::runEtaTrackFinder ( const edm::EventSetup c)
private

run Eta Track Finder (ETF)

Definition at line 306 of file L1MuDTEtaProcessor.cc.

References L1MuDTEtaPatternLut::begin(), newFWLiteAna::bin, HltBtagPostValidation_cff::c, relativeConstraints::empty, L1MuDTEtaPatternLut::end(), caHitNtupletGeneratorKernels::good, mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_foundPattern, m_tseta, topSingleLeptonDQM_PU_cfi::pattern, submitPVResolutionJobs::q, l1tGTMenu_lepSeeds_cff::qual, quality(), relativeConstraints::station, theEtaPatternLUT, theEtaToken, and makeMuonMisalignmentScenario::wheel.

Referenced by run().

306  {
307  theEtaPatternLUT = c.getHandle(theEtaToken);
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)
315  return;
316 
317  // Pattern comparator:
318  // loop over all patterns and compare with local chamber pattern
319  // result : list of valid pattern IDs ( m_foundPattern )
321  while (it != theEtaPatternLUT->end()) {
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)
332  continue;
333  bitset<7> pos = m_tseta[wheel + 2 + station * 5]->position();
334  bitset<7> qual = m_tseta[wheel + 2 + station * 5]->quality();
335  // compare position
336  good &= pos.test(bin - 1);
337  // compare quality
338  if (q == 2)
339  good &= qual.test(bin - 1);
340  }
341 
342  if (good)
343  m_foundPattern.push_back(pattern.id());
344 
345  it++;
346  }
347 }
LUT::const_iterator ETFLut_iter
edm::ESGetToken< L1MuDTEtaPatternLut, L1MuDTEtaPatternLutRcd > theEtaToken
static int quality(int id, int stat)
get quality code; id [0,26], stat [1,3]
edm::ESHandle< L1MuDTEtaPatternLut > theEtaPatternLUT
std::vector< const L1MuDTTrackSegEta * > m_tseta
std::vector< int > m_foundPattern
ETFLut_iter begin() const
return iterator which points to the first entry of the LUT
ETFLut_iter end() const
return iterator which points to the one-past-last entry of the LUT

◆ tf()

const L1MuDTTrackFinder& L1MuDTEtaProcessor::tf ( ) const
inline

return reference to barrel MTTF

Definition at line 79 of file L1MuDTEtaProcessor.h.

References m_tf.

79 { return m_tf; }
const L1MuDTTrackFinder & m_tf

Member Data Documentation

◆ m_address

int L1MuDTEtaProcessor::m_address[12]
private

Definition at line 118 of file L1MuDTEtaProcessor.h.

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

◆ m_DTDigiToken

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

Definition at line 122 of file L1MuDTEtaProcessor.h.

Referenced by receiveData().

◆ m_epid

int L1MuDTEtaProcessor::m_epid
private

Definition at line 108 of file L1MuDTEtaProcessor.h.

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

◆ m_eta

int L1MuDTEtaProcessor::m_eta[12]
private

Definition at line 112 of file L1MuDTEtaProcessor.h.

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

◆ m_fine

bool L1MuDTEtaProcessor::m_fine[12]
private

Definition at line 113 of file L1MuDTEtaProcessor.h.

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

◆ m_foundPattern

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

Definition at line 115 of file L1MuDTEtaProcessor.h.

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

◆ m_mask

int L1MuDTEtaProcessor::m_mask
private

Definition at line 110 of file L1MuDTEtaProcessor.h.

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

◆ m_pattern

int L1MuDTEtaProcessor::m_pattern[12]
private

Definition at line 116 of file L1MuDTEtaProcessor.h.

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

◆ m_tf

const L1MuDTTrackFinder& L1MuDTEtaProcessor::m_tf
private

Definition at line 107 of file L1MuDTEtaProcessor.h.

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

◆ m_TrackCand

L1MuDTTrack* L1MuDTEtaProcessor::m_TrackCand[12]
private

Definition at line 119 of file L1MuDTEtaProcessor.h.

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

◆ m_TracKCand

L1MuDTTrack* L1MuDTEtaProcessor::m_TracKCand[12]
private

Definition at line 120 of file L1MuDTEtaProcessor.h.

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

◆ m_tseta

std::vector<const L1MuDTTrackSegEta*> L1MuDTEtaProcessor::m_tseta
private

◆ msks

edm::ESHandle<L1MuDTTFMasks> L1MuDTEtaProcessor::msks
private

Definition at line 129 of file L1MuDTEtaProcessor.h.

Referenced by receiveData().

◆ theEtaPatternLUT

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

Definition at line 127 of file L1MuDTEtaProcessor.h.

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

◆ theEtaToken

edm::ESGetToken<L1MuDTEtaPatternLut, L1MuDTEtaPatternLutRcd> L1MuDTEtaProcessor::theEtaToken
private

Definition at line 124 of file L1MuDTEtaProcessor.h.

Referenced by runEtaTrackFinder().

◆ theMsksToken

edm::ESGetToken<L1MuDTTFMasks, L1MuDTTFMasksRcd> L1MuDTEtaProcessor::theMsksToken
private

Definition at line 126 of file L1MuDTEtaProcessor.h.

Referenced by receiveData().

◆ theQualPatternLUT

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

Definition at line 128 of file L1MuDTEtaProcessor.h.

Referenced by print(), and runEtaMatchingUnit().

◆ theQualToken

edm::ESGetToken<L1MuDTQualPatternLut, L1MuDTQualPatternLutRcd> L1MuDTEtaProcessor::theQualToken
private

Definition at line 125 of file L1MuDTEtaProcessor.h.

Referenced by runEtaMatchingUnit().