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 (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]
 
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 ( 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 & tf() const
return reference to barrel MTTF
std::vector< int > m_foundPattern
edm::InputTag getBMThetaDigiInputTag() const
const L1MuBMTFConfig & config() const
return configuration
edm::EDGetTokenT< L1MuDTChambThContainer > m_DTDigiToken
L1MuBMTrackFinder & m_tf
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 416 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().

416  {
417  for (int i = 0; i < 12; i++) {
418  if (m_TrackCand[i]) {
419  if (m_eta[i] != 99) {
420  m_TrackCand[i]->setEta(m_eta[i]);
421  m_TracKCand[i]->setEta(m_eta[i]);
422  } else {
423  // if ( i/2 != 2 ) cerr << "L1MuBMEtaProcessor: assign invalid eta" << " " << m_address[i] << endl;
424  }
425  if (m_fine[i]) {
428  // find all contributing track segments
430  vector<const L1MuBMTrackSegEta*> TSeta;
431  const L1MuBMTrackSegEta* ts = nullptr;
432  for (int stat = 0; stat < 3; stat++) {
433  int wh = p.wheel(stat + 1);
434  int pos = p.position(stat + 1);
435  if (pos == 0)
436  continue;
437  ts = m_tseta[wh + 2 + stat * 5];
438  TSeta.push_back(ts);
439  }
440  m_TrackCand[i]->setTSeta(TSeta);
441  m_TracKCand[i]->setTSeta(TSeta);
442  }
443  }
444  }
445 }
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(), quality(), and L1MuBMTrackFinder::run().

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.

Referenced by L1MuBMTrackFinder::run().

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 450 of file L1MuBMEtaProcessor.cc.

References id().

Referenced by print(), and runEtaTrackFinder().

450  {
451  // quality codes as defined in CMS Note 2001/027
452  // This QualityPatterns are used to have a defined Quality-Identifier for
453  // all possible found tracks.
454  // Therefore three integer numbers ( Station 1, 2, 3 from left to right )
455  // can have numbers like 0, 1 or 2
456  // 0 ... no hit is given
457  // 1 ... a LTRG is given
458  // 2 ... a HTRG is given
459 
460  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},
461  {1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {2, 1, 0}, {1, 2, 0}, {2, 0, 1}, {1, 0, 2},
462  {0, 2, 1}, {0, 1, 2}, {2, 2, 0}, {2, 0, 2}, {0, 2, 2}, {1, 1, 1}, {2, 1, 1},
463  {1, 2, 1}, {1, 1, 2}, {2, 2, 1}, {2, 1, 2}, {1, 2, 2}, {2, 2, 2}};
464 
465  return qualcode[id][stat - 1];
466 }
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, ConfigBuilder::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  L1MuBMTrack& cand = m_tf.sp(tmpspid)->track(number);
292  L1MuBMTrack& canD = m_tf.sp(tmpspid)->tracK(number);
293  m_address[i] = cand.address().trackAddressCode();
294  if (!cand.empty()) {
295  m_TrackCand[i] = &cand;
296  m_TracKCand[i] = &canD;
297  }
298  i++;
299  }
300  }
301 }
const L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
get a pointer to a Sector Processor
L1MuBMTrack const & track(int id) const
return muon candidate, index [0,1]
L1MuBMTrack * m_TrackCand[12]
L1MuBMTrack const & tracK(int id) const
return muon candidate, index [0,1]
L1MuBMTrack * m_TracKCand[12]
L1MuBMTrackFinder & m_tf

◆ 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.

Referenced by L1MuBMTrackFinder::reset().

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, L1MuBMTrackFinder::config(), MillePedeFileConverter_cfg::e, L1MuBMTFConfig::getEtaTF(), m_bmtfParamsToken, m_tf, submitPVValidationJobs::params, receiveAddresses(), receiveData(), runEtaMatchingUnit(), and runEtaTrackFinder().

Referenced by L1MuBMTrackFinder::run().

87  {
88  auto const& params = c.getData(m_bmtfParamsToken);
89  if (m_tf.config().getEtaTF()) {
92  }
93 
96 
97  assign();
98 }
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_bmtfParamsToken
bool getEtaTF() const
void receiveData(int bx, const edm::Event &e, const L1TMuonBarrelParams &params)
receive data (eta trigger primitives)
const L1MuBMTFConfig & config() const
return configuration
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)
L1MuBMTrackFinder & m_tf
void receiveAddresses()
receive addresses (from 6 Sector Processors)

◆ runEtaMatchingUnit()

void L1MuBMEtaProcessor::runEtaMatchingUnit ( const L1TMuonBarrelParams params)
private

run Eta Matching Unit (EMU)

Definition at line 352 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().

352  {
353  theQualPatternLUT.m_lut = bmtfParams.lutparams_.qp_lut_; //l1mudttfqualplut; // EMU look-up tables
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)
365 
366  if (m_foundPattern.empty())
367  continue;
368 
369  // get list of qualified patterns ordered by quality
370  // and compare with found patterns
371  const vector<short>& qualifiedPatterns = theQualPatternLUT.getQualifiedPatterns(sp, adr);
372  vector<short>::const_iterator iter;
373  vector<int>::const_iterator f_iter;
374  for (iter = qualifiedPatterns.begin(); iter != qualifiedPatterns.end(); iter++) {
375  f_iter = find(m_foundPattern.begin(), m_foundPattern.end(), (*iter));
376  // found
377  if (f_iter != m_foundPattern.end()) {
379  // assign fine eta value
380  m_fine[i] = true;
381  m_eta[i] = p.eta(); // improved eta
382  ;
383  m_pattern[i] = (*f_iter);
384  break;
385  }
386  }
387  }
388 
389  // if both tracks from one sector processor deliver the same track address
390  // both tracks get only a coarse eta value!
391 
392  // loop over sector processors
393  for (int i = 0; i < 6; i++) {
394  int idx1 = 2 * i;
395  int idx2 = 2 * i + 1;
396  int adr1 = m_address[idx1];
397  int adr2 = m_address[idx2];
398  if (adr1 == 0 || adr2 == 0)
399  continue;
400  if (adr1 == adr2 && !m_mask) {
401  // both tracks get coarse (default) eta value
402  m_eta[idx1] = theQualPatternLUT.getCoarseEta(i + 1, adr1);
403  m_pattern[idx1] = 0;
404  m_fine[idx1] = false;
405  m_eta[idx2] = theQualPatternLUT.getCoarseEta(i + 1, adr2);
406 
407  m_pattern[idx2] = 0;
408  m_fine[idx2] = false;
409  }
410  }
411 }
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 306 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().

306  {
307  theEtaPatternLUT.m_lut = bmtfParams.lutparams_.eta_lut_; //l1mudttfetaplut; // ETF look-up table
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 }
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; }
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

L1MuBMTrackFinder& L1MuBMEtaProcessor::m_tf
private

Definition at line 112 of file L1MuBMEtaProcessor.h.

Referenced by receiveAddresses(), run(), 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().