CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
L1MuBMEtaProcessor Class Reference

#include <L1MuBMEtaProcessor.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...
 
 L1MuBMEtaProcessor (const L1MuBMTrackFinder &, 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 L1MuBMTrackFindertf () const
 return reference to barrel MTTF More...
 
virtual ~L1MuBMEtaProcessor ()
 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 L1TMuonBarrelParams &params)
 receive data (eta trigger primitives) More...
 
void runEtaMatchingUnit (const L1TMuonBarrelParams &params)
 run Eta Matching Unit (EMU) More...
 
void runEtaTrackFinder (const L1TMuonBarrelParams &params)
 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::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcdm_bmtfParamsToken
 
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 L1MuBMTrackFinderm_tf
 
L1MuBMTrackm_TrackCand [12]
 
L1MuBMTrackm_TracKCand [12]
 
std::vector< const L1MuBMTrackSegEta * > m_tseta
 
L1MuDTTFMasks msks
 
L1MuBMTEtaPatternLut theEtaPatternLUT
 
L1MuBMTQualPatternLut theQualPatternLUT
 

Detailed Description

Eta Processor:

An Eta Processor consists of :

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 63 of file L1MuBMEtaProcessor.h.

Constructor & Destructor Documentation

◆ L1MuBMEtaProcessor()

L1MuBMEtaProcessor::L1MuBMEtaProcessor ( const L1MuBMTrackFinder tf,
int  id,
edm::ConsumesCollector &&  iC 
)

constructor

Definition at line 64 of file L1MuBMEtaProcessor.cc.

References m_tseta.

65  : m_tf(tf),
66  m_epid(id),
67  m_foundPattern(0),
68  m_tseta(15),
71  m_tseta.reserve(15);
72 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_bmtfParamsToken
const L1MuBMTrackFinder & m_tf
const L1MuBMTrackFinder & tf() const
return reference to barrel MTTF
static edm::InputTag getBMThetaDigiInputTag()
std::vector< int > m_foundPattern
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken
std::vector< const L1MuBMTrackSegEta * > m_tseta

◆ ~L1MuBMEtaProcessor()

L1MuBMEtaProcessor::~L1MuBMEtaProcessor ( )
virtual

destructor

Definition at line 78 of file L1MuBMEtaProcessor.cc.

78 {}

Member Function Documentation

◆ assign()

void L1MuBMEtaProcessor::assign ( )
private

assign eta and etaFineBit

Definition at line 418 of file L1MuBMEtaProcessor.cc.

References L1MuBMTEtaPatternLut::getPattern(), mps_fire::i, m_eta, m_fine, m_pattern, m_TrackCand, m_TracKCand, m_tseta, AlCaHLTBitMon_ParallelJobs::p, L1MuBMTrack::setEta(), L1MuBMTrack::setFineEtaBit(), L1MuBMTrack::setTSeta(), and theEtaPatternLUT.

Referenced by run().

418  {
419  for (int i = 0; i < 12; i++) {
420  if (m_TrackCand[i]) {
421  if (m_eta[i] != 99) {
422  m_TrackCand[i]->setEta(m_eta[i]);
423  m_TracKCand[i]->setEta(m_eta[i]);
424  } else {
425  // if ( i/2 != 2 ) cerr << "L1MuBMEtaProcessor: assign invalid eta" << " " << m_address[i] << endl;
426  }
427  if (m_fine[i]) {
430  // find all contributing track segments
432  vector<const L1MuBMTrackSegEta*> TSeta;
433  const L1MuBMTrackSegEta* ts = nullptr;
434  for (int stat = 0; stat < 3; stat++) {
435  int wh = p.wheel(stat + 1);
436  int pos = p.position(stat + 1);
437  if (pos == 0)
438  continue;
439  ts = m_tseta[wh + 2 + stat * 5];
440  TSeta.push_back(ts);
441  }
442  m_TrackCand[i]->setTSeta(TSeta);
443  m_TracKCand[i]->setTSeta(TSeta);
444  }
445  }
446  }
447 }
L1MuBMTrack * m_TrackCand[12]
L1MuBMTrack * m_TracKCand[12]
L1MuDTEtaPattern getPattern(int id) const
get pattern with a given ID
L1MuBMTEtaPatternLut theEtaPatternLUT
void setTSeta(const std::vector< const L1MuBMTrackSegEta *> &tsList)
set eta track segments used to form the muon candidate
Definition: L1MuBMTrack.cc:160
void setFineEtaBit()
set fine eta bit
Definition: L1MuBMTrack.h:151
void setEta(int eta)
set eta-code of muon candidate
Definition: L1MuBMTrack.cc:118
std::vector< const L1MuBMTrackSegEta * > m_tseta

◆ eta()

int L1MuBMEtaProcessor::eta ( int  id) const
inline

return eta values, index [0,11]

Definition at line 87 of file L1MuBMEtaProcessor.h.

References id(), and m_eta.

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

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

◆ fineBit()

bool L1MuBMEtaProcessor::fineBit ( int  id) const
inline

return fine bit, index [0,11]

Definition at line 90 of file L1MuBMEtaProcessor.h.

References id(), and m_fine.

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

◆ id()

int L1MuBMEtaProcessor::id ( void  ) const
inline

return Eta Processor identifier (0-11)

Definition at line 72 of file L1MuBMEtaProcessor.h.

References m_epid.

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

72 { return m_epid; }

◆ print()

void L1MuBMEtaProcessor::print ( void  ) const

print muon candidates found by the Eta Processor

Definition at line 132 of file L1MuBMEtaProcessor.cc.

References gather_cfg::cout, L1MuBMTQualPatternLut::getCoarseEta(), L1MuBMTEtaPatternLut::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 }
int getCoarseEta(int sp, int adr) const
get coarse eta value for a given sector processor [1-6] and address [1-22]
L1MuDTEtaPattern getPattern(int id) const
get pattern with a given ID
L1MuBMTEtaPatternLut theEtaPatternLUT
std::vector< int > m_foundPattern
static int quality(int id, int stat)
get quality code; id [0,26], stat [1,3]
static int position[264][3]
Definition: ReadPGInfo.cc:289
std::vector< const L1MuBMTrackSegEta * > m_tseta
L1MuBMTQualPatternLut theQualPatternLUT

◆ quality()

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

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

Definition at line 452 of file L1MuBMEtaProcessor.cc.

References id().

Referenced by print(), and runEtaTrackFinder().

452  {
453  // quality codes as defined in CMS Note 2001/027
454  // This QualityPatterns are used to have a defined Quality-Identifier for
455  // all possible found tracks.
456  // Therefore three integer numbers ( Station 1, 2, 3 from left to right )
457  // can have numbers like 0, 1 or 2
458  // 0 ... no hit is given
459  // 1 ... a LTRG is given
460  // 2 ... a HTRG is given
461 
462  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},
463  {1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {2, 1, 0}, {1, 2, 0}, {2, 0, 1}, {1, 0, 2},
464  {0, 2, 1}, {0, 1, 2}, {2, 2, 0}, {2, 0, 2}, {0, 2, 2}, {1, 1, 1}, {2, 1, 1},
465  {1, 2, 1}, {1, 1, 2}, {2, 2, 1}, {2, 1, 2}, {1, 2, 2}, {2, 2, 2}};
466 
467  return qualcode[id][stat - 1];
468 }
int id() const
return Eta Processor identifier (0-11)

◆ receiveAddresses()

void L1MuBMEtaProcessor::receiveAddresses ( )
private

receive addresses (from 6 Sector Processors)

Definition at line 279 of file L1MuBMEtaProcessor.cc.

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

Referenced by run().

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

◆ receiveData()

void L1MuBMEtaProcessor::receiveData ( int  bx,
const edm::Event e,
const L1TMuonBarrelParams params 
)
private

receive data (eta trigger primitives)

Definition at line 213 of file L1MuBMEtaProcessor.cc.

References nano_mu_digi_cff::bx, L1MuDTChambThContainer::chThetaSegm(), MillePedeFileConverter_cfg::e, L1TMuonBarrelParams::LUTParams::eta_lut_, L1MuDTTFMasks::get_etsoc_chdis_st1(), L1MuDTTFMasks::get_etsoc_chdis_st2(), L1MuDTTFMasks::get_etsoc_chdis_st3(), mps_fire::i, L1TMuonBarrelParams::l1mudttfmasks, L1TMuonBarrelParams::lutparams_, m_DTDigiToken, m_epid, L1MuBMTEtaPatternLut::m_lut, L1MuBMTQualPatternLut::m_lut, m_mask, m_tseta, msks, L1MuDTChambThDigi::position(), L1TMuonBarrelParams::LUTParams::qp_lut_, L1MuDTChambThDigi::quality(), nano_mu_digi_cff::sector, theEtaPatternLUT, theQualPatternLUT, and makeMuonMisalignmentScenario::wheel.

Referenced by run().

213  {
214  msks = bmtfParams.l1mudttfmasks;
215  theEtaPatternLUT.m_lut = bmtfParams.lutparams_.eta_lut_; //l1mudttfetaplut; // ETF look-up table
216  theQualPatternLUT.m_lut = bmtfParams.lutparams_.qp_lut_; //l1mudttfqualplut; // EMU look-up tables
217 
219  e.getByToken(m_DTDigiToken, dttrig);
220 
221  // const int bx_offset = dttrig->correctBX();
222  int bx_offset = 0;
223  bx = bx + bx_offset;
224 
225  //
226  // get 5*3 eta track segments
227  //
228  int sector = m_epid;
229  for (int stat = 1; stat <= 3; stat++) {
230  for (int wheel = -2; wheel <= 2; wheel++) {
231  L1MuDTChambThDigi const* tseta = dttrig->chThetaSegm(wheel, stat, sector, bx);
232  bitset<7> pos;
233  bitset<7> qual;
234 
235  int lwheel = wheel + 1;
236  if (wheel < 0)
237  lwheel = wheel - 1;
238 
239  bool masked = false;
240  if (stat == 1)
241  masked = msks.get_etsoc_chdis_st1(lwheel, sector);
242  if (stat == 2)
243  masked = msks.get_etsoc_chdis_st2(lwheel, sector);
244  if (stat == 3)
245  masked = msks.get_etsoc_chdis_st3(lwheel, sector);
246 
247  if (!masked)
248  m_mask = false;
249 
250  if (tseta && !masked) {
251  if (wheel == -2 || wheel == -1 ||
252  (wheel == 0 && (sector == 0 || sector == 3 || sector == 4 || sector == 7 || sector == 8 || sector == 11))) {
253  for (int i = 0; i < 7; i++) {
254  if (tseta->position(i))
255  pos.set(6 - i);
256  if (tseta->quality(i))
257  qual.set(6 - i);
258  }
259  } else {
260  for (int i = 0; i < 7; i++) {
261  if (tseta->position(i))
262  pos.set(i);
263  if (tseta->quality(i))
264  qual.set(i);
265  }
266  }
267  }
268 
269  const L1MuBMTrackSegEta* tmpts =
270  new L1MuBMTrackSegEta(wheel, sector, stat, pos.to_ulong(), qual.to_ulong(), bx - bx_offset);
271  m_tseta.push_back(tmpts);
272  }
273  }
274 }
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
bool get_etsoc_chdis_st2(int wh, int sc) const
int position(const int i) const
bool get_etsoc_chdis_st1(int wh, int sc) const
L1MuBMTEtaPatternLut theEtaPatternLUT
bool get_etsoc_chdis_st3(int wh, int sc) const
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken
int quality(const int i) const
std::vector< const L1MuBMTrackSegEta * > m_tseta
L1MuBMTQualPatternLut theQualPatternLUT

◆ reset()

void L1MuBMEtaProcessor::reset ( void  )
virtual

reset the Eta Processor

Definition at line 103 of file L1MuBMEtaProcessor.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 L1MuBMTrackSegEta*>::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 }
L1MuBMTrack * m_TrackCand[12]
L1MuBMTrack * m_TracKCand[12]
std::vector< int > m_foundPattern
std::vector< const L1MuBMTrackSegEta * > m_tseta

◆ run()

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

run the Eta Processor

Definition at line 87 of file L1MuBMEtaProcessor.cc.

References assign(), nano_mu_digi_cff::bx, DummyCfis::c, MillePedeFileConverter_cfg::e, L1MuBMTFConfig::getEtaTF(), m_bmtfParamsToken, submitPVValidationJobs::params, receiveAddresses(), receiveData(), runEtaMatchingUnit(), and runEtaTrackFinder().

87  {
88  auto const& params = c.getData(m_bmtfParamsToken);
92  }
93 
96 
97  assign();
98 }
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_bmtfParamsToken
void receiveData(int bx, const edm::Event &e, const L1TMuonBarrelParams &params)
receive data (eta trigger primitives)
void assign()
assign eta and etaFineBit
void runEtaMatchingUnit(const L1TMuonBarrelParams &params)
run Eta Matching Unit (EMU)
void runEtaTrackFinder(const L1TMuonBarrelParams &params)
run Eta Track Finder (ETF)
void receiveAddresses()
receive addresses (from 6 Sector Processors)
static bool getEtaTF()

◆ runEtaMatchingUnit()

void L1MuBMEtaProcessor::runEtaMatchingUnit ( const L1TMuonBarrelParams params)
private

run Eta Matching Unit (EMU)

Definition at line 354 of file L1MuBMEtaProcessor.cc.

References spr::find(), L1MuBMTQualPatternLut::getCoarseEta(), L1MuBMTEtaPatternLut::getPattern(), L1MuBMTQualPatternLut::getQualifiedPatterns(), mps_fire::i, L1TMuonBarrelParams::lutparams_, m_address, m_eta, m_fine, m_foundPattern, L1MuBMTQualPatternLut::m_lut, m_mask, m_pattern, AlCaHLTBitMon_ParallelJobs::p, L1TMuonBarrelParams::LUTParams::qp_lut_, theEtaPatternLUT, and theQualPatternLUT.

Referenced by run().

354  {
355  theQualPatternLUT.m_lut = bmtfParams.lutparams_.qp_lut_; //l1mudttfqualplut; // EMU look-up tables
356 
357  // loop over all addresses
358  for (int i = 0; i < 12; i++) {
359  int adr = m_address[i];
360  if (adr == 0)
361  continue;
362  int sp = i / 2 + 1; //sector processor [1,6]
363 
364  // assign coarse eta value
365  if (!m_mask)
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()) {
381  // assign fine eta value
382  m_fine[i] = true;
383  m_eta[i] = p.eta(); // improved eta
384  ;
385  m_pattern[i] = (*f_iter);
386  break;
387  }
388  }
389  }
390 
391  // if both tracks from one sector processor deliver the same track address
392  // both tracks get only a coarse eta value!
393 
394  // loop over sector processors
395  for (int i = 0; i < 6; i++) {
396  int idx1 = 2 * i;
397  int idx2 = 2 * i + 1;
398  int adr1 = m_address[idx1];
399  int adr2 = m_address[idx2];
400  if (adr1 == 0 || adr2 == 0)
401  continue;
402  if (adr1 == adr2 && !m_mask) {
403  // both tracks get coarse (default) eta value
404  m_eta[idx1] = theQualPatternLUT.getCoarseEta(i + 1, adr1);
405  m_pattern[idx1] = 0;
406  m_fine[idx1] = false;
407  m_eta[idx2] = theQualPatternLUT.getCoarseEta(i + 1, adr2);
408 
409  m_pattern[idx2] = 0;
410  m_fine[idx2] = false;
411  }
412  }
413 }
int getCoarseEta(int sp, int adr) const
get coarse eta value for a given sector processor [1-6] and address [1-22]
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
L1MuBMTEtaPatternLut theEtaPatternLUT
std::vector< int > m_foundPattern
L1MuBMTQualPatternLut theQualPatternLUT

◆ runEtaTrackFinder()

void L1MuBMEtaProcessor::runEtaTrackFinder ( const L1TMuonBarrelParams params)
private

run Eta Track Finder (ETF)

Definition at line 308 of file L1MuBMEtaProcessor.cc.

References L1MuBMTEtaPatternLut::begin(), newFWLiteAna::bin, relativeConstraints::empty, L1MuBMTEtaPatternLut::end(), L1TMuonBarrelParams::LUTParams::eta_lut_, caHitNtupletGeneratorKernels::good, mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, L1TMuonBarrelParams::lutparams_, m_foundPattern, L1MuBMTEtaPatternLut::m_lut, m_tseta, topSingleLeptonDQM_PU_cfi::pattern, submitPVResolutionJobs::q, quality(), relativeConstraints::station, theEtaPatternLUT, and makeMuonMisalignmentScenario::wheel.

Referenced by run().

308  {
309  theEtaPatternLUT.m_lut = bmtfParams.lutparams_.eta_lut_; //l1mudttfetaplut; // ETF look-up table
310 
311  // check if there are any data
312  bool empty = true;
313  for (int i = 0; i < 15; i++) {
314  empty &= m_tseta[i]->empty();
315  }
316  if (empty)
317  return;
318 
319  // Pattern comparator:
320  // loop over all patterns and compare with local chamber pattern
321  // result : list of valid pattern IDs ( m_foundPattern )
323  while (it != theEtaPatternLUT.end()) {
324  const L1MuDTEtaPattern pattern = (*it).second;
325  int qualitycode = pattern.quality();
326 
327  bool good = true;
328 
329  for (int station = 0; station < 3; station++) {
330  int q = quality(qualitycode, station + 1);
331  int wheel = pattern.wheel(station + 1);
332  int bin = pattern.position(station + 1);
333  if (bin == 0)
334  continue;
335  bitset<7> pos = m_tseta[wheel + 2 + station * 5]->position();
336  bitset<7> qual = m_tseta[wheel + 2 + station * 5]->quality();
337  // compare position
338  good &= pos.test(bin - 1);
339  // compare quality
340  if (q == 2)
341  good &= qual.test(bin - 1);
342  }
343 
344  if (good)
345  m_foundPattern.push_back(pattern.id());
346 
347  it++;
348  }
349 }
ETFLut_iter begin() const
return iterator which points to the first entry of the LUT
L1MuBMTEtaPatternLut theEtaPatternLUT
ETFLut_iter end() const
return iterator which points to the one-past-last entry of the LUT
std::vector< int > m_foundPattern
static int quality(int id, int stat)
get quality code; id [0,26], stat [1,3]
std::vector< const L1MuBMTrackSegEta * > m_tseta
LUT::const_iterator ETFLut_iter

◆ tf()

const L1MuBMTrackFinder& L1MuBMEtaProcessor::tf ( ) const
inline

return reference to barrel MTTF

Definition at line 84 of file L1MuBMEtaProcessor.h.

References m_tf.

84 { return m_tf; }
const L1MuBMTrackFinder & m_tf

Member Data Documentation

◆ m_address

int L1MuBMEtaProcessor::m_address[12]
private

Definition at line 123 of file L1MuBMEtaProcessor.h.

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

◆ m_bmtfParamsToken

edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> L1MuBMEtaProcessor::m_bmtfParamsToken
private

Definition at line 128 of file L1MuBMEtaProcessor.h.

Referenced by run().

◆ m_DTDigiToken

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

Definition at line 133 of file L1MuBMEtaProcessor.h.

Referenced by receiveData().

◆ m_epid

int L1MuBMEtaProcessor::m_epid
private

Definition at line 113 of file L1MuBMEtaProcessor.h.

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

◆ m_eta

int L1MuBMEtaProcessor::m_eta[12]
private

Definition at line 117 of file L1MuBMEtaProcessor.h.

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

◆ m_fine

bool L1MuBMEtaProcessor::m_fine[12]
private

Definition at line 118 of file L1MuBMEtaProcessor.h.

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

◆ m_foundPattern

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

Definition at line 120 of file L1MuBMEtaProcessor.h.

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

◆ m_mask

int L1MuBMEtaProcessor::m_mask
private

Definition at line 115 of file L1MuBMEtaProcessor.h.

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

◆ m_pattern

int L1MuBMEtaProcessor::m_pattern[12]
private

Definition at line 121 of file L1MuBMEtaProcessor.h.

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

◆ m_tf

const L1MuBMTrackFinder& L1MuBMEtaProcessor::m_tf
private

Definition at line 112 of file L1MuBMEtaProcessor.h.

Referenced by receiveAddresses(), and tf().

◆ m_TrackCand

L1MuBMTrack* L1MuBMEtaProcessor::m_TrackCand[12]
private

Definition at line 124 of file L1MuBMEtaProcessor.h.

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

◆ m_TracKCand

L1MuBMTrack* L1MuBMEtaProcessor::m_TracKCand[12]
private

Definition at line 125 of file L1MuBMEtaProcessor.h.

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

◆ m_tseta

std::vector<const L1MuBMTrackSegEta*> L1MuBMEtaProcessor::m_tseta
private

◆ msks

L1MuDTTFMasks L1MuBMEtaProcessor::msks
private

Definition at line 129 of file L1MuBMEtaProcessor.h.

Referenced by receiveData().

◆ theEtaPatternLUT

L1MuBMTEtaPatternLut L1MuBMEtaProcessor::theEtaPatternLUT
private

◆ theQualPatternLUT

L1MuBMTQualPatternLut L1MuBMEtaProcessor::theQualPatternLUT
private

Definition at line 131 of file L1MuBMEtaProcessor.h.

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