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 }
L1MuGMTConfig::getRegMMConfigPt
static L1MuGMTRegMMConfigPt * getRegMMConfigPt()
Definition: L1MuGMTConfig.h:139
L1MuGMTMatrix::colAny
int colAny(int c) const
is any element in column c > 0 ? return index or -1
Definition: L1MuGMTMatrix.h:262
L1MuGMTConfig::MAXCSC
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:85
L1MuGMTMerger::createDTCSCCand
void createDTCSCCand(int idx_dtcsc)
Definition: L1MuGMTMerger.cc:220
L1MuGMTLFPtMixLUT::SpecificLookup_pt_mixed
unsigned SpecificLookup_pt_mixed(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const
specific lookup function for pt_mixed
Definition: L1MuGMTLFPtMixLUT.h:51
L1MuGMTConfig::MAXRPCendcap
static const unsigned int MAXRPCendcap
Definition: L1MuGMTConfig.h:85
mps_fire.i
i
Definition: mps_fire.py:355
L1MuGMTCand::setMIP
void setMIP(bool mip)
set min ionizing bit for muon candidate
Definition: L1MuGMTCand.h:163
HLT_2018_cff.eta4
eta4
Definition: HLT_2018_cff.py:8216
L1MuGMTConfig::getLFEtaConvLUT
static L1MuGMTLFEtaConvLUT * getLFEtaConvLUT()
Definition: L1MuGMTConfig.h:151
MessageLogger.h
L1MuGMTExtendedCand
Definition: L1MuGMTExtendedCand.h:46
L1MuTriggerScales::getGMTEtaScale
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
Definition: L1MuTriggerScales.h:169
muon
Definition: MuonCocktails.h:17
L1MuGMTExtendedCand::setDTCSCIndex
void setDTCSCIndex(unsigned int idxdtcsc)
set index of contributing DT/CSC muon
Definition: L1MuGMTExtendedCand.h:95
L1MuGMTConfig::getRegSortRankOffset
static L1MuGMTRegSortRankOffset * getRegSortRankOffset()
Definition: L1MuGMTConfig.h:144
L1MuGMTMatcher.h
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
L1MuGMTLFEtaConvLUT.h
L1MuGMTMerger::rpc_mu
std::vector< const L1MuRegionalCand * > rpc_mu
Definition: L1MuGMTMerger.h:105
L1MuGMTMerger::createMergedCand
void createMergedCand(int idx_dtcsc, int idx_rpc)
Definition: L1MuGMTMerger.cc:343
L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_rank_etaq
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
Definition: L1MuGMTLFMergeRankEtaQLUT.h:60
L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_flag
unsigned SpecificLookup_flag(int idx, unsigned eta, unsigned q) const
specific lookup function for flag
Definition: L1MuGMTLFMergeRankEtaQLUT.h:52
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1MuGMTConfig::MAXRPCbarrel
static const unsigned int MAXRPCbarrel
Definition: L1MuGMTConfig.h:85
data-class-funcs.q
q
Definition: data-class-funcs.py:169
L1MuGMTLFMergeRankEtaPhiLUT::SpecificLookup_rank_etaphi
unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const
specific lookup function for rank_etaphi
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:52
L1MuGMTConfig::MAXDTBX
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:85
L1MuGMTMerger::m_MuonCands
std::vector< L1MuGMTExtendedCand * > m_MuonCands
Definition: L1MuGMTMerger.h:107
L1MuGMTConfig::getLFPhiProEtaConvLUT
static L1MuGMTLFPhiProEtaConvLUT * getLFPhiProEtaConvLUT()
Definition: L1MuGMTConfig.h:158
L1MuGMTExtendedCand::setRPCIndex
void setRPCIndex(unsigned int idxrpc)
set index of contributing RPC muon
Definition: L1MuGMTExtendedCand.h:98
L1MuGMTLFMergeRankEtaQLUT.h
L1MuGMTLFMergeRankPtQLUT
Definition: L1MuGMTLFMergeRankPtQLUT.h:38
L1MuGMTMatcher::pairM
const L1MuGMTMatrix< bool > & pairM() const
return pair matrix
Definition: L1MuGMTMatcher.h:64
L1MuGMTLFPhiProEtaConvLUT
Definition: L1MuGMTLFPhiProEtaConvLUT.h:38
L1MuGMTConfig::getLFMergeRankEtaPhiLUT
static L1MuGMTLFMergeRankEtaPhiLUT * getLFMergeRankEtaPhiLUT()
Definition: L1MuGMTConfig.h:154
L1MuGMTMerger::load
void load()
Definition: L1MuGMTMerger.cc:129
L1MuGMTMerger.h
L1MuGMTCancelOutUnit::cancelMyChipMuon
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
Definition: L1MuGMTCancelOutUnit.h:87
irpc
int irpc
Definition: CascadeWrapper.h:67
L1MuTriggerScales::getPhiScale
const L1MuScale * getPhiScale() const
get the phi scale
Definition: L1MuTriggerScales.h:175
L1MuGMTConfig::getRegMMConfigMIP
static L1MuGMTRegMMConfigMIP * getRegMMConfigMIP()
Definition: L1MuGMTConfig.h:141
L1MuTriggerPtScale
Definition: L1MuTriggerPtScale.h:33
L1MuGMTLFMergeRankEtaQLUT
Definition: L1MuGMTLFMergeRankEtaQLUT.h:38
L1MuGMTMipIsoAU.h
L1MuGlobalMuonTrigger
Definition: L1MuGlobalMuonTrigger.h:50
L1MuGMTConfig::getLFMergeRankCombineLUT
static L1MuGMTLFMergeRankCombineLUT * getLFMergeRankCombineLUT()
Definition: L1MuGMTConfig.h:153
L1MuGMTMerger::selectDTCSC
int selectDTCSC(unsigned MMconfig, int by_rank, int by_pt, int by_combi) const
Definition: L1MuGMTMerger.cc:297
L1MuGMTLFMergeRankEtaPhiLUT
Definition: L1MuGMTLFMergeRankEtaPhiLUT.h:38
L1MuGMTConfig::getTriggerScales
static const L1MuTriggerScales * getTriggerScales()
Definition: L1MuGMTConfig.h:178
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1MuGMTSortRankUnit::sort_rank
static unsigned sort_rank(const L1MuRegionalCand *)
Sort Rank Table.
Definition: L1MuGMTSortRankUnit.cc:41
L1MuGMTMerger::doSpecialMerge
int doSpecialMerge(unsigned MMconfig) const
Definition: L1MuGMTMerger.cc:302
L1MuRegionalCand
Definition: L1MuRegionalCand.h:26
L1MuScale::getLowEdge
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
L1MuGMTConfig::getLFMergeRankEtaQLUT
static L1MuGMTLFMergeRankEtaQLUT * getLFMergeRankEtaQLUT()
Definition: L1MuGMTConfig.h:155
L1MuGMTMatrix::rowAny
int rowAny(int r) const
is any element in row r > 0 ? return index or -1
Definition: L1MuGMTMatrix.h:276
L1MuGMTLFMergeRankPtQLUT.h
L1MuGMTMerger::m_id
int m_id
Definition: L1MuGMTMerger.h:102
L1MuGMTLFEtaConvLUT
Definition: L1MuGMTLFEtaConvLUT.h:38
L1MuGMTLFPtMixLUT.h
L1MuGMTConfig.h
L1MuGMTMerger::~L1MuGMTMerger
virtual ~L1MuGMTMerger()
destructor
Definition: L1MuGMTMerger.cc:78
L1MuGlobalMuonTrigger::Data
const L1MuGMTPSB * Data() const
return pointer to PSB
Definition: L1MuGlobalMuonTrigger.h:61
L1MuGMTLFMergeRankCombineLUT.h
L1MuGMTConfig::getRegMMConfigISO
static L1MuGMTRegMMConfigISO * getRegMMConfigISO()
Definition: L1MuGMTConfig.h:142
L1MuGlobalMuonTrigger::Matcher
const L1MuGMTMatcher * Matcher(int id) const
return pointer to Matcher
Definition: L1MuGlobalMuonTrigger.h:64
L1MuGMTCand::setChargePacked
void setChargePacked(unsigned ch)
set packed charge/synchronization word of muon candidate (0=POS, 1=NEG, 2=UNDEF, 3=SYNC)
Definition: L1MuGMTCand.h:166
L1MuGMTMerger::print
void print() const
print results after selection
Definition: L1MuGMTMerger.cc:114
L1MuGMTMerger::doANDMerge
int doANDMerge(unsigned MMconfig) const
Definition: L1MuGMTMerger.cc:304
L1MuGMTConfig::getRegMMConfigCharge
static L1MuGMTRegMMConfigCharge * getRegMMConfigCharge()
Definition: L1MuGMTConfig.h:140
L1MuGMTMerger::projectedPhi
unsigned projectedPhi(const L1MuRegionalCand *mu) const
Definition: L1MuGMTMerger.cc:311
L1MuGMTMerger::m_gmt
const L1MuGlobalMuonTrigger & m_gmt
Definition: L1MuGMTMerger.h:101
L1MuGMTLFEtaConvLUT::SpecificLookup_eta_gmt
unsigned SpecificLookup_eta_gmt(int idx, unsigned eta_regional) const
specific lookup function for eta_gmt
Definition: L1MuGMTLFEtaConvLUT.h:51
L1MuTriggerPtScale::getPtScale
const L1MuScale * getPtScale() const
get the Pt scale
Definition: L1MuTriggerPtScale.h:59
L1MuGlobalMuonTrigger::CancelOutUnit
const L1MuGMTCancelOutUnit * CancelOutUnit(int id) const
return pointer to Cancel Out Unit
Definition: L1MuGlobalMuonTrigger.h:67
L1MuTriggerPtScale.h
L1MuGMTMerger::run
void run()
run GMT Merger
Definition: L1MuGMTMerger.cc:87
L1MuGMTMerger::merge
void merge()
Definition: L1MuGMTMerger.cc:151
L1MuGMTCand::setBx
void setBx(int bx)
set bunch crossing identifier
Definition: L1MuGMTCand.h:169
cand
Definition: decayParser.h:34
L1MuGMTConfig::getLFMergeRankPtQLUT
static L1MuGMTLFMergeRankPtQLUT * getLFMergeRankPtQLUT()
Definition: L1MuGMTConfig.h:156
L1MuGMTSortRankUnit::isDisabled
static bool isDisabled(const L1MuRegionalCand *)
Diable bit.
Definition: L1MuGMTSortRankUnit.cc:87
L1MuGMTMipIsoAU::MIP
bool MIP(int idx) const
return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)
Definition: L1MuGMTMipIsoAU.h:75
L1MuTriggerScales.h
L1MuGMTCand::setQuality
void setQuality(unsigned quality)
set quality of muon candidate
Definition: L1MuGMTCand.h:154
L1MuGMTMipIsoAU::ISO
bool ISO(int idx) const
return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)
Definition: L1MuGMTMipIsoAU.h:78
L1MuGMTConfig::getRegMMConfigEta
static L1MuGMTRegMMConfigEta * getRegMMConfigEta()
Definition: L1MuGMTConfig.h:138
edm::LogVerbatim
Definition: MessageLogger.h:297
L1MuGMTLFMergeRankPtQLUT::SpecificLookup_rank_ptq
unsigned SpecificLookup_rank_ptq(int idx, unsigned q, unsigned pt) const
specific lookup function for rank_ptq
Definition: L1MuGMTLFMergeRankPtQLUT.h:51
L1MuGMTLFPhiProEtaConvLUT.h
L1MuGMTLFPhiProEtaConvLUT::SpecificLookup_eta_out
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
Definition: L1MuGMTLFPhiProEtaConvLUT.h:51
L1MuGMTCand::setEtaPacked
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
Definition: L1MuGMTCand.h:157
L1MuGlobalMuonTrigger::MipIsoAU
const L1MuGMTMipIsoAU * MipIsoAU(int id) const
return pointer to MIP & ISO bit assignment unit
Definition: L1MuGlobalMuonTrigger.h:70
L1MuGMTExtendedCand::setRank
void setRank(unsigned int rank)
set rank
Definition: L1MuGMTExtendedCand.h:83
L1MuGMTLFMergeRankCombineLUT::SpecificLookup_merge_rank
unsigned SpecificLookup_merge_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for merge_rank
Definition: L1MuGMTLFMergeRankCombineLUT.h:57
L1MuTriggerScales
Definition: L1MuTriggerScales.h:33
L1MuGMTLFPtMixLUT
Definition: L1MuGMTLFPtMixLUT.h:38
L1MuGMTReg::getValue
unsigned getValue(int idx)
get Value
Definition: L1MuGMTReg.h:53
L1MuGMTCancelOutUnit.h
L1MuGMTMerger::merge_rank
int merge_rank(const L1MuRegionalCand *) const
Merge Rank Table.
Definition: L1MuGMTMerger.cc:506
L1MuGMTMerger::dtcsc_mu
std::vector< const L1MuRegionalCand * > dtcsc_mu
Definition: L1MuGMTMerger.h:104
L1MuGMTMerger::reset
void reset()
clear Merger
Definition: L1MuGMTMerger.cc:95
DDAxes::phi
L1MuGMTPSB.h
L1MuGMTMerger::L1MuGMTMerger
L1MuGMTMerger(const L1MuGlobalMuonTrigger &gmt, int id)
constructor
Definition: L1MuGMTMerger.cc:70
L1MuGMTReg.h
L1MuGMTConfig::getRegMMConfigSRK
static L1MuGMTRegMMConfigSRK * getRegMMConfigSRK()
Definition: L1MuGMTConfig.h:143
L1MuGMTLFPhiProLUT.h
L1MuSignedPacking::idxFromPacked
int idxFromPacked(unsigned packed) const override
get the value from the packed notation (+/-)
Definition: L1MuPacking.h:100
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
L1MuGMTLFPhiProLUT::SpecificLookup_dphi
unsigned SpecificLookup_dphi(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for dphi
Definition: L1MuGMTLFPhiProLUT.h:51
L1MuGMTPSB::RPCMuon
const L1MuRegionalCand * RPCMuon(int index) const
get RPC muon
Definition: L1MuGMTPSB.cc:224
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
L1MuGMTConfig::getLFPhiProLUT
static L1MuGMTLFPhiProLUT * getLFPhiProLUT()
Definition: L1MuGMTConfig.h:159
L1MuGMTSortRankUnit.h
L1MuGMTLFPhiProLUT
Definition: L1MuGMTLFPhiProLUT.h:38
L1MuGMTPSB::CSCMuon
const L1MuRegionalCand * CSCMuon(int index) const
get CSC muon
Definition: L1MuGMTPSB.cc:238
L1MuGMTCancelOutUnit::cancelOtherChipMuon
const bool cancelOtherChipMuon(int idx) const
return cancel bit for barrel RPC (m_id==2) or forward RPC (m_id==3) muon
Definition: L1MuGMTCancelOutUnit.h:90
L1MuGMTMerger::createRPCCand
void createRPCCand(int idx_rpc)
Definition: L1MuGMTMerger.cc:260
L1MuGMTExtendedCand::setRPCBit
void setRPCBit(unsigned int rpcbit)
set RPC bit (1=RPC, 0=DT/CSC or matched)
Definition: L1MuGMTExtendedCand.h:104
L1MuGMTMerger::sysign
unsigned sysign(const L1MuRegionalCand *mu) const
Definition: L1MuGMTMerger.cc:334
L1MuGlobalMuonTrigger.h
L1MuGMTConfig::getLFPtMixLUT
static L1MuGMTLFPtMixLUT * getLFPtMixLUT()
Definition: L1MuGMTConfig.h:160
L1MuGMTLFMergeRankCombineLUT
Definition: L1MuGMTLFMergeRankCombineLUT.h:38
L1MuSignedPacking
Definition: L1MuPacking.h:94
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1MuGMTMerger::convertedEta
unsigned convertedEta(const L1MuRegionalCand *mu) const
Definition: L1MuGMTMerger.cc:306
L1MuGMTPSB::DTBXMuon
const L1MuRegionalCand * DTBXMuon(int index) const
get DTBX muon
Definition: L1MuGMTPSB.cc:231
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
L1MuGMTLFMergeRankEtaPhiLUT.h
L1MuGMTConfig::getTriggerPtScale
static const L1MuTriggerPtScale * getTriggerPtScale()
Definition: L1MuGMTConfig.h:181
L1MuGMTExtendedCand.h
L1MuGMTCand::setIsolation
void setIsolation(bool isol)
set isolation of muon candidate
Definition: L1MuGMTCand.h:160
L1MuGMTMatrix< bool >
L1MuGMTSortRankUnit::getVeryLowQualityLevel
static unsigned getVeryLowQualityLevel(const L1MuRegionalCand *)
Very low quality bits.
Definition: L1MuGMTSortRankUnit.cc:72
L1MuGMTExtendedCand::setFwdBit
void setFwdBit(unsigned int fwdbit)
set forward bit (1=forward, 0=barrel)
Definition: L1MuGMTExtendedCand.h:101
L1MuGMTConfig::getRegMMConfigPhi
static L1MuGMTRegMMConfigPhi * getRegMMConfigPhi()
Definition: L1MuGMTConfig.h:137
L1MuGMTCand::setPtPacked
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
Definition: L1MuGMTCand.h:151
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
L1MuScale::getCenter
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
L1MuGMTCand::setPhiPacked
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate
Definition: L1MuGMTCand.h:148