CMS 3D CMS Logo

L1MuGMTMerger.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTMerger
4 //
5 // Description: GMT Merger
6 //
7 //
8 //
9 // Author :
10 // H. Sakulin HEPHY Vienna
11 //
12 // Migrated to CMSSW:
13 // I. Mikulec
14 //
15 //--------------------------------------------------
16 
17 //-----------------------
18 // This Class's Header --
19 //-----------------------
20 
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 #include <iostream>
28 #include <vector>
29 #include <cmath>
30 
31 //-------------------------------
32 // Collaborating Class Headers --
33 //-------------------------------
34 
43 
48 
50 
53 
55 
58 
60 
62 
63 //---------------------------------
64 // class L1MuGMTMerger
65 //---------------------------------
66 
67 //----------------
68 // Constructors --
69 //----------------
70 L1MuGMTMerger::L1MuGMTMerger(const L1MuGlobalMuonTrigger& gmt, int id) : m_gmt(gmt), m_id(id), dtcsc_mu(4), rpc_mu(4) {
71  dtcsc_mu.reserve(4);
72  rpc_mu.reserve(4);
73 }
74 
75 //--------------
76 // Destructor --
77 //--------------
79 
80 //--------------
81 // Operations --
82 //--------------
83 
84 //
85 // run Merger
86 //
88  load();
89  merge();
90 }
91 
92 //
93 // reset Merger
94 //
96  for (int i = 0; i < 4; i++) {
97  dtcsc_mu[i] = nullptr;
98  rpc_mu[i] = nullptr;
99  }
100 
101  std::vector<L1MuGMTExtendedCand*>::iterator iter;
102  for (iter = m_MuonCands.begin(); iter != m_MuonCands.end(); iter++) {
103  if (*iter)
104  delete (*iter);
105  *iter = nullptr;
106  }
107 
108  m_MuonCands.clear();
109 }
110 
111 //
112 // print selection results
113 //
114 void L1MuGMTMerger::print() const {
115  edm::LogVerbatim("GMT_Merger_info") << " ";
116 
117  std::vector<L1MuGMTExtendedCand*>::const_iterator iter;
118  for (iter = m_MuonCands.begin(); iter != m_MuonCands.end(); iter++) {
119  if (*iter && !(*iter)->empty())
120  (*iter)->print();
121  }
122 
123  edm::LogVerbatim("GMT_Merger_info") << " ";
124 }
125 
126 //
127 // load Merger (get data from PSB)
128 //
130  // barrel Merger gets DTBX and barrel RPC muons
131  if (m_id == 0) {
132  for (unsigned idt = 0; idt < L1MuGMTConfig::MAXDTBX; idt++) {
133  dtcsc_mu[idt] = m_gmt.Data()->DTBXMuon(idt);
134  }
135  for (unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCbarrel; irpc++) {
136  rpc_mu[irpc] = m_gmt.Data()->RPCMuon(irpc);
137  }
138  }
139 
140  // endcap Merger gets CSC and endcap RPC muons
141  if (m_id == 1) {
142  for (unsigned icsc = 0; icsc < L1MuGMTConfig::MAXCSC; icsc++) {
143  dtcsc_mu[icsc] = m_gmt.Data()->CSCMuon(icsc);
144  }
145  for (unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCendcap; irpc++) {
146  rpc_mu[irpc] = m_gmt.Data()->RPCMuon(irpc + 4);
147  }
148  }
149 }
150 
152  const L1MuGMTMatrix<bool>& pairM = m_gmt.Matcher(m_id)->pairM();
153 
154  // Handling of cancel-out and empty muons is different in software and hardware
155  //
156  // - in hardware, a candidate may be empty (pt_code == 0) and an empty bit
157  // is passed to the sorter in order to suppress the candidate. In the
158  // software no candidate is created in this case.
159  //
160  // - in hardware, RPC candidates are passed to the sorter even if they are
161  // also used in a matched pair. They are then suppressed in the sorter. In
162  // software no RPC candidate is created if the muon is used in a pair.
163  //
164  // - in hardware, cancel-out signals from the cancel-out units in the own and
165  // other Logic FPGA are passed to the sorter in order to cancel out muons.
166  // In software the cancel-out signals are alrady checked here in the merger
167  // and no candidates are created for cancelled muons.
168  //
169  // There may therefore be less muons passed to the sorter in software than
170  // in Hardware. At the output of the first sorter stage the results should
171  // be comparable, again.
172 
173  unsigned HaloOverwritesMatched = 1;
174 
175  // loop over DT/CSC muons
176  for (int i = 0; i < 4; i++) {
177  if (dtcsc_mu[i] != nullptr) {
178  int match_idx = pairM.rowAny(i);
179 
180  int csc_is_halo = (m_id == 1) && (dtcsc_mu[i]->finehalo_packed() == 1);
181 
182  if ((match_idx != -1) && // is it matched?
183  (!(csc_is_halo && HaloOverwritesMatched)))
184  createMergedCand(i, match_idx);
185  else {
186  // check my first and the other chip's second cancel-out units
190  }
191  }
192  }
193 
194  // additionally loop over RPC muons
195  for (int j = 0; j < 4; j++) {
196  if (rpc_mu[j] != nullptr) {
197  int match_idx = pairM.colAny(j);
198 
199  if (match_idx == -1) { // is it unmatched?
201  createRPCCand(j);
202  }
203  }
204  }
205 
206  // set physical values in the GMT candidates for use in the analysis
207  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
208  const L1MuTriggerPtScale* theTriggerPtScale = L1MuGMTConfig::getTriggerPtScale();
209 
210  std::vector<L1MuGMTExtendedCand*>::const_iterator icand;
211  for (icand = m_MuonCands.begin(); icand != m_MuonCands.end(); icand++) {
212  L1MuGMTExtendedCand* cand = (*icand);
213  cand->setPhiValue(theTriggerScales->getPhiScale()->getLowEdge(cand->phiIndex()));
214  cand->setEtaValue(theTriggerScales->getGMTEtaScale()->getCenter(cand->etaIndex()));
215  cand->setPtValue(theTriggerPtScale->getPtScale()->getLowEdge(cand->ptIndex()));
216  // cand->setPtValue( theTriggerScales->getPtScale()->getLowEdge( cand->ptIndex() ));
217  }
218 }
219 
220 void L1MuGMTMerger::createDTCSCCand(int idx_dtcsc) {
221  L1MuGMTExtendedCand* tmpmuon = new L1MuGMTExtendedCand();
222 
223  tmpmuon->setBx(dtcsc_mu[idx_dtcsc]->bx());
224  tmpmuon->setPhiPacked(projectedPhi(dtcsc_mu[idx_dtcsc]));
225  tmpmuon->setEtaPacked(convertedEta(dtcsc_mu[idx_dtcsc]));
226  tmpmuon->setPtPacked(dtcsc_mu[idx_dtcsc]->pt_packed());
227  tmpmuon->setChargePacked(sysign(dtcsc_mu[idx_dtcsc]));
228  tmpmuon->setMIP(m_gmt.MipIsoAU(m_id)->MIP(idx_dtcsc));
229  tmpmuon->setIsolation(m_gmt.MipIsoAU(m_id)->ISO(idx_dtcsc));
230  tmpmuon->setRank(L1MuGMTSortRankUnit::sort_rank(dtcsc_mu[idx_dtcsc]));
231 
232  unsigned quality = 0;
234  case 0:
235  quality = 6;
236  break; //DT/CSC
237  case 1:
238  quality = 2;
239  break; //VERY LOW QUALITY LEVEL 1
240  case 2:
241  quality = 3;
242  break; //VERY LOW QUALITY LEVEL 2
243  case 3:
244  quality = 4;
245  break; //VERY LOW QUALITY LEVEL 3
246  }
247 
248  if ((m_id == 1) && (dtcsc_mu[idx_dtcsc]->finehalo_packed() == 1))
249  quality = 1; // HALO quality
250 
251  tmpmuon->setQuality(quality); // RPC
252  tmpmuon->setDTCSCIndex(idx_dtcsc);
253  tmpmuon->setRPCIndex(0);
254  tmpmuon->setFwdBit(m_id);
255  tmpmuon->setRPCBit(0);
256 
257  m_MuonCands.push_back(tmpmuon);
258 }
259 
260 void L1MuGMTMerger::createRPCCand(int idx_rpc) {
261  L1MuGMTExtendedCand* tmpmuon = new L1MuGMTExtendedCand();
262 
263  tmpmuon->setBx(rpc_mu[idx_rpc]->bx());
264  tmpmuon->setPhiPacked(projectedPhi(rpc_mu[idx_rpc]));
265  tmpmuon->setEtaPacked(convertedEta(rpc_mu[idx_rpc]));
266  tmpmuon->setPtPacked(rpc_mu[idx_rpc]->pt_packed());
267  tmpmuon->setChargePacked(sysign(rpc_mu[idx_rpc]));
268  tmpmuon->setMIP(m_gmt.MipIsoAU(m_id)->MIP(idx_rpc + 4));
269  tmpmuon->setIsolation(m_gmt.MipIsoAU(m_id)->ISO(idx_rpc + 4));
270  tmpmuon->setRank(L1MuGMTSortRankUnit::sort_rank(rpc_mu[idx_rpc]));
271 
272  unsigned quality = 0;
274  case 0:
275  quality = 5;
276  break; //RPC
277  case 1:
278  quality = 2;
279  break; //VERY LOW QUALITY LEVEL1
280  case 2:
281  quality = 3;
282  break; //VERY LOW QUALITY LEVEL2
283  case 3:
284  quality = 4;
285  break; //VERY LOW QUALITY LEVEL3
286  }
287 
288  tmpmuon->setQuality(quality); // RPC
289  tmpmuon->setDTCSCIndex(0);
290  tmpmuon->setRPCIndex(idx_rpc);
291  tmpmuon->setFwdBit(m_id);
292  tmpmuon->setRPCBit(1);
293 
294  m_MuonCands.push_back(tmpmuon);
295 }
296 
297 int L1MuGMTMerger::selectDTCSC(unsigned MMconfig, int by_rank, int by_pt, int by_combi) const {
298  return ((MMconfig & 32) == 32) || (((MMconfig & 8) == 8) && by_rank) || (((MMconfig & 4) == 4) && by_pt) ||
299  (((MMconfig & 2) == 2) && by_combi);
300 }
301 
302 int L1MuGMTMerger::doSpecialMerge(unsigned MMconfig) const { return (MMconfig & 1) == 1; }
303 
304 int L1MuGMTMerger::doANDMerge(unsigned MMconfig) const { return (MMconfig & 64) == 64; }
305 
308  return etaconv_lut->SpecificLookup_eta_gmt(mu->type_idx(), mu->eta_packed());
309 }
310 
312  // convert eta
314  unsigned eta4 = phiproetaconv_lut->SpecificLookup_eta_out(mu->type_idx(), mu->eta_packed());
315 
316  // look up delta-phi 9 bit signed
318  unsigned dphi9 = phipro_lut->SpecificLookup_dphi(mu->type_idx(), eta4, mu->pt_packed(), mu->charge_packed());
319 
320  // sign extend
321  L1MuSignedPacking<9> DPhiPacking;
322  int dphi = DPhiPacking.idxFromPacked(dphi9);
323 
324  // add modulo 144
325  int newphi = mu->phi_packed() + dphi;
326  if (newphi < 0)
327  newphi += 144;
328  if (newphi >= 144)
329  newphi -= 144;
330 
331  return (unsigned)newphi;
332 }
333 
334 unsigned L1MuGMTMerger::sysign(const L1MuRegionalCand* mu) const {
335  unsigned sysign = mu->charge_packed();
336 
337  if (mu->charge_valid_packed() == 0)
338  sysign = 2; // undefined charge
339 
340  return sysign;
341 }
342 
343 void L1MuGMTMerger::createMergedCand(int idx_dtcsc, int idx_rpc) {
344  // In the hardware matrices of select_bits are calculated for all
345  // possible pairings.
346  // In ORCA we only calculate selec-bits for the actual
347  // pairs to save time.
348 
349  // look up merge ranks
350  int merge_rank_dtcsc = merge_rank(dtcsc_mu[idx_dtcsc]);
351  int merge_rank_rpc = merge_rank(rpc_mu[idx_rpc]);
352 
353  // calculate select-bits (1: take DT/CSC, 0: take RPC)
354  // fix: if equal prefer DT/CSC as in HW!
355  // int selected_by_rank = abs(merge_rank_dtcsc) > abs(merge_rank_rpc);
356  int selected_by_rank = abs(merge_rank_dtcsc) >= abs(merge_rank_rpc);
357  int selected_by_pt = dtcsc_mu[idx_dtcsc]->pt_packed() <= rpc_mu[idx_rpc]->pt_packed();
358 
359  // Selection by combination of min pt and higher rank
360  // select by rank if both flags are set, otherwise by min pt
361  // in other words: select by minpt if one flag is not set
362  int selected_by_combi = (merge_rank_dtcsc < 0 && merge_rank_rpc < 0) ? selected_by_rank : selected_by_pt;
363 
364  L1MuGMTExtendedCand* tmpmuon = new L1MuGMTExtendedCand();
365 
366  tmpmuon->setBx(dtcsc_mu[idx_dtcsc]->bx());
367 
368  // merge phi
369  // unsigned MMConfig_phi = 32; // take DT
370  unsigned MMConfig_phi = L1MuGMTConfig::getRegMMConfigPhi()->getValue(m_id);
371 
372  unsigned phi = 0;
373 
374  if (selectDTCSC(MMConfig_phi, selected_by_rank, selected_by_pt, selected_by_combi))
375  phi = projectedPhi(dtcsc_mu[idx_dtcsc]);
376  else
377  phi = projectedPhi(rpc_mu[idx_rpc]);
378 
379  tmpmuon->setPhiPacked(phi);
380 
381  // merge eta
382  unsigned MMConfig_eta = L1MuGMTConfig::getRegMMConfigEta()->getValue(m_id);
383 
384  unsigned eta = 0;
385 
386  if (doSpecialMerge(MMConfig_eta)) {
387  if ((m_id == 1) || dtcsc_mu[idx_dtcsc]->finehalo_packed())
388  eta = convertedEta(dtcsc_mu[idx_dtcsc]);
389  else
390  eta = convertedEta(rpc_mu[idx_rpc]);
391  } else {
392  if (selectDTCSC(MMConfig_eta, selected_by_rank, selected_by_pt, selected_by_combi))
393  eta = convertedEta(dtcsc_mu[idx_dtcsc]);
394  else
395  eta = convertedEta(rpc_mu[idx_rpc]);
396  }
397  tmpmuon->setEtaPacked(eta);
398 
399  // merge pt
400  unsigned MMConfig_pt = L1MuGMTConfig::getRegMMConfigPt()->getValue(m_id);
401 
402  unsigned pt = 0;
403 
404  if (doSpecialMerge(MMConfig_pt)) { // mix pt
406  pt = ptmix_lut->SpecificLookup_pt_mixed(m_id, dtcsc_mu[idx_dtcsc]->pt_packed(), rpc_mu[idx_rpc]->pt_packed());
407  } else {
408  if (selectDTCSC(MMConfig_pt, selected_by_rank, selected_by_pt, selected_by_combi))
409  pt = dtcsc_mu[idx_dtcsc]->pt_packed();
410  else
411  pt = rpc_mu[idx_rpc]->pt_packed();
412  }
413  tmpmuon->setPtPacked(pt);
414 
415  // merge charge
416  unsigned MMConfig_charge = L1MuGMTConfig::getRegMMConfigCharge()->getValue(m_id);
417 
418  unsigned sy_sign = 0;
419 
420  if (doSpecialMerge(MMConfig_charge)) {
421  // based on charge valid bits
422  if (rpc_mu[idx_rpc]->charge_valid_packed() == 1 && dtcsc_mu[idx_dtcsc]->charge_valid_packed() == 0)
423  sy_sign = sysign(rpc_mu[idx_rpc]);
424  else
425  sy_sign = sysign(dtcsc_mu[idx_dtcsc]);
426  } else {
427  if (selectDTCSC(MMConfig_charge, selected_by_rank, selected_by_pt, selected_by_combi))
428  sy_sign = sysign(dtcsc_mu[idx_dtcsc]);
429  else
430  sy_sign = sysign(rpc_mu[idx_rpc]);
431  }
432  tmpmuon->setChargePacked(sy_sign);
433 
434  // merge quality
435 
436  // merge MIP
437  unsigned MMConfig_MIP = L1MuGMTConfig::getRegMMConfigMIP()->getValue(m_id);
438 
439  bool mip_bit = false;
440 
441  bool mip_bit_dtcsc = m_gmt.MipIsoAU(m_id)->MIP(idx_dtcsc);
442  bool mip_bit_rpc = m_gmt.MipIsoAU(m_id)->MIP(idx_rpc + 4);
443 
444  if (doSpecialMerge(MMConfig_MIP)) {
445  if (doANDMerge(MMConfig_MIP))
446  mip_bit = mip_bit_dtcsc && mip_bit_rpc;
447  else
448  mip_bit = mip_bit_dtcsc || mip_bit_rpc;
449  } else {
450  if (selectDTCSC(MMConfig_MIP, selected_by_rank, selected_by_pt, selected_by_combi))
451  mip_bit = mip_bit_dtcsc;
452  else
453  mip_bit = mip_bit_rpc;
454  }
455 
456  tmpmuon->setMIP(mip_bit);
457 
458  // merge ISO
459  unsigned MMConfig_ISO = L1MuGMTConfig::getRegMMConfigISO()->getValue(m_id);
460 
461  bool iso_bit = false;
462 
463  bool iso_bit_dtcsc = m_gmt.MipIsoAU(m_id)->ISO(idx_dtcsc);
464  bool iso_bit_rpc = m_gmt.MipIsoAU(m_id)->ISO(idx_rpc + 4);
465 
466  if (doSpecialMerge(MMConfig_ISO)) {
467  if (doANDMerge(MMConfig_ISO))
468  iso_bit = iso_bit_dtcsc && iso_bit_rpc;
469  else
470  iso_bit = iso_bit_dtcsc || iso_bit_rpc;
471  } else {
472  if (selectDTCSC(MMConfig_ISO, selected_by_rank, selected_by_pt, selected_by_combi))
473  iso_bit = iso_bit_dtcsc;
474  else
475  iso_bit = iso_bit_rpc;
476  }
477 
478  tmpmuon->setIsolation(iso_bit);
479 
480  // merge sort rank
481  unsigned MMConfig_SRK = L1MuGMTConfig::getRegMMConfigSRK()->getValue(m_id);
482 
483  unsigned rank_offset = L1MuGMTConfig::getRegSortRankOffset()->getValue(m_id);
484 
485  unsigned rank = 0;
486  if (selectDTCSC(MMConfig_SRK, selected_by_rank, selected_by_pt, selected_by_combi))
487  rank = L1MuGMTSortRankUnit::sort_rank(dtcsc_mu[idx_dtcsc]) + rank_offset;
488  else
489  rank = L1MuGMTSortRankUnit::sort_rank(rpc_mu[idx_rpc]) + rank_offset;
490 
491  tmpmuon->setRank(rank);
492 
493  // quality of merged candidate
494  tmpmuon->setQuality(7); // code for matched muons
495 
496  tmpmuon->setDTCSCIndex(idx_dtcsc);
497  tmpmuon->setRPCIndex(idx_rpc);
498  tmpmuon->setFwdBit(m_id);
499  tmpmuon->setRPCBit(0);
500 
501  m_MuonCands.push_back(tmpmuon);
502 }
503 
504 // calculate merge rank as in HW
505 
507  if (muon == nullptr || muon->empty())
508  return 0;
509 
510  unsigned lut_idx = muon->type_idx();
511 
512  // obtain inputs as coded in HW
513  unsigned eta = muon->eta_packed();
514  unsigned q = muon->quality_packed();
515  unsigned pt = muon->pt_packed();
516  unsigned phi = muon->phi_packed();
517 
518  // lookup eta-q
520  unsigned rank_etaq = etaq_lut->SpecificLookup_rank_etaq(lut_idx, eta, q);
521  unsigned flag = etaq_lut->SpecificLookup_flag(lut_idx, eta, q);
522 
523  // lookup pt-q
525  unsigned rank_ptq = ptq_lut->SpecificLookup_rank_ptq(lut_idx, q, pt);
526 
527  // lookup etaphi
529  unsigned rank_etaphi = etaphi_lut->SpecificLookup_rank_etaphi(lut_idx, eta, phi);
530 
531  // combine
533  unsigned rank = combine_lut->SpecificLookup_merge_rank(lut_idx, rank_etaq, rank_ptq, rank_etaphi);
534 
535  int rank_signed = rank;
536 
537  if (flag == 1)
538  rank_signed *= -1;
539 
540  return rank_signed;
541 }
Log< level::Info, true > LogVerbatim
static L1MuGMTRegMMConfigISO * getRegMMConfigISO()
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
Definition: L1MuGMTCand.h:154
static L1MuGMTRegMMConfigCharge * getRegMMConfigCharge()
const L1MuGMTMatcher * Matcher(int id) const
return pointer to Matcher
int selectDTCSC(unsigned MMconfig, int by_rank, int by_pt, int by_combi) const
void setMIP(bool mip)
set min ionizing bit for muon candidate
Definition: L1MuGMTCand.h:166
std::vector< L1MuGMTExtendedCand * > m_MuonCands
static L1MuGMTLFMergeRankPtQLUT * getLFMergeRankPtQLUT()
static L1MuGMTRegMMConfigEta * getRegMMConfigEta()
unsigned sysign(const L1MuRegionalCand *mu) const
unsigned SpecificLookup_rank_ptq(int idx, unsigned q, unsigned pt) const
specific lookup function for rank_ptq
static bool isDisabled(const L1MuRegionalCand *)
Diable bit.
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuGMTMipIsoAU * MipIsoAU(int id) const
return pointer to MIP & ISO bit assignment unit
void createMergedCand(int idx_dtcsc, int idx_rpc)
bool MIP(int idx) const
return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)
unsigned getValue(int idx)
get Value
Definition: L1MuGMTReg.h:53
void setDTCSCIndex(unsigned int idxdtcsc)
set index of contributing DT/CSC muon
const L1MuRegionalCand * RPCMuon(int index) const
get RPC muon
Definition: L1MuGMTPSB.cc:224
int doANDMerge(unsigned MMconfig) const
unsigned projectedPhi(const L1MuRegionalCand *mu) const
const L1MuScale * getPhiScale() const
get the phi scale
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
const bool cancelMyChipMuon(int idx) const
return cancel bit for DT (m_id==0 || m_id==3) or CSC (m_id==1 || m_id==2) muon
const L1MuScale * getPtScale() const
get the Pt scale
const L1MuRegionalCand * DTBXMuon(int index) const
get DTBX muon
Definition: L1MuGMTPSB.cc:231
static unsigned getVeryLowQualityLevel(const L1MuRegionalCand *)
Very low quality bits.
const L1MuRegionalCand * CSCMuon(int index) const
get CSC muon
Definition: L1MuGMTPSB.cc:238
void createDTCSCCand(int idx_dtcsc)
virtual ~L1MuGMTMerger()
destructor
const bool cancelOtherChipMuon(int idx) const
return cancel bit for barrel RPC (m_id==2) or forward RPC (m_id==3) muon
string quality
unsigned SpecificLookup_merge_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for merge_rank
int merge_rank(const L1MuRegionalCand *) const
Merge Rank Table.
std::vector< const L1MuRegionalCand * > dtcsc_mu
unsigned convertedEta(const L1MuRegionalCand *mu) const
void print() const
print results after selection
static L1MuGMTRegMMConfigSRK * getRegMMConfigSRK()
const L1MuGlobalMuonTrigger & m_gmt
void setFwdBit(unsigned int fwdbit)
set forward bit (1=forward, 0=barrel)
static L1MuGMTRegMMConfigPhi * getRegMMConfigPhi()
static L1MuGMTLFPhiProLUT * getLFPhiProLUT()
static L1MuGMTRegMMConfigPt * getRegMMConfigPt()
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned SpecificLookup_eta_gmt(int idx, unsigned eta_regional) const
specific lookup function for eta_gmt
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:85
static unsigned sort_rank(const L1MuRegionalCand *)
Sort Rank Table.
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:85
static const unsigned int MAXRPCendcap
Definition: L1MuGMTConfig.h:85
void setBx(int bx)
set bunch crossing identifier
Definition: L1MuGMTCand.h:172
static L1MuGMTLFPtMixLUT * getLFPtMixLUT()
unsigned SpecificLookup_dphi(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for dphi
const L1MuGMTMatrix< bool > & pairM() const
return pair matrix
void setChargePacked(unsigned ch)
set packed charge/synchronization word of muon candidate (0=POS, 1=NEG, 2=UNDEF, 3=SYNC) ...
Definition: L1MuGMTCand.h:169
static L1MuGMTLFMergeRankEtaPhiLUT * getLFMergeRankEtaPhiLUT()
void reset()
clear Merger
unsigned SpecificLookup_flag(int idx, unsigned eta, unsigned q) const
specific lookup function for flag
static const L1MuTriggerPtScale * getTriggerPtScale()
int idxFromPacked(unsigned packed) const override
get the value from the packed notation (+/-)
Definition: L1MuPacking.h:100
std::vector< const L1MuRegionalCand * > rpc_mu
bool ISO(int idx) const
return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)
void setQuality(unsigned quality)
set quality of muon candidate
Definition: L1MuGMTCand.h:157
static L1MuGMTLFMergeRankCombineLUT * getLFMergeRankCombineLUT()
static const L1MuTriggerScales * getTriggerScales()
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
Definition: L1MuGMTCand.h:160
void run()
run GMT Merger
void setRPCBit(unsigned int rpcbit)
set RPC bit (1=RPC, 0=DT/CSC or matched)
static L1MuGMTLFEtaConvLUT * getLFEtaConvLUT()
int rowAny(int r) const
is any element in row r > 0 ? return index or -1
void setRank(unsigned int rank)
set rank
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
static L1MuGMTRegSortRankOffset * getRegSortRankOffset()
int colAny(int c) const
is any element in column c > 0 ? return index or -1
unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const
specific lookup function for rank_etaphi
const L1MuGMTCancelOutUnit * CancelOutUnit(int id) const
return pointer to Cancel Out Unit
static L1MuGMTRegMMConfigMIP * getRegMMConfigMIP()
L1MuGMTMerger(const L1MuGlobalMuonTrigger &gmt, int id)
constructor
static const unsigned int MAXRPCbarrel
Definition: L1MuGMTConfig.h:85
static L1MuGMTLFPhiProEtaConvLUT * getLFPhiProEtaConvLUT()
void setRPCIndex(unsigned int idxrpc)
set index of contributing RPC muon
int doSpecialMerge(unsigned MMconfig) const
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate
Definition: L1MuGMTCand.h:151
const L1MuGMTPSB * Data() const
return pointer to PSB
static L1MuGMTLFMergeRankEtaQLUT * getLFMergeRankEtaQLUT()
void setIsolation(bool isol)
set isolation of muon candidate
Definition: L1MuGMTCand.h:163
void createRPCCand(int idx_rpc)
unsigned SpecificLookup_pt_mixed(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const
specific lookup function for pt_mixed