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