CMS 3D CMS Logo

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

#include <RPCFinalSorter.h>

Public Member Functions

 RPCFinalSorter (RPCTriggerConfiguration *triggerConfig)
 
L1RpcTBMuonsVec2 run (L1RpcTBMuonsVec2 &tcsMuonsVec2)
 
void runFinalSorter (L1RpcTBMuonsVec2 &finalMuons)
 
L1RpcTBMuonsVec2 runHalf (L1RpcTBMuonsVec2 &tcsMuonsVec2)
 

Private Attributes

L1RpcTBMuonsVec2 m_GBOutputMuons
 
RPCTriggerConfigurationm_TrigCnfg
 

Detailed Description

Emulates FinalSorter

Author
Karol Bunkowski (Warsaw)

Definition at line 13 of file RPCFinalSorter.h.

Constructor & Destructor Documentation

◆ RPCFinalSorter()

RPCFinalSorter::RPCFinalSorter ( RPCTriggerConfiguration triggerConfig)

Defualt constructor

Definition at line 16 of file RPCFinalSorter.cc.

16  {
17  m_TrigCnfg = triggerConfig;
18  m_GBOutputMuons.assign(2, L1RpcTBMuonsVec());
19 }
std::vector< RPCTBMuon > L1RpcTBMuonsVec
Definition: RPCTBMuon.h:218
L1RpcTBMuonsVec2 m_GBOutputMuons
RPCTriggerConfiguration * m_TrigCnfg

Member Function Documentation

◆ run()

L1RpcTBMuonsVec2 RPCFinalSorter::run ( L1RpcTBMuonsVec2 tcsMuonsVec2)

Converts m_tower number (eta addr) from continous (0 - 32, m_tower 0 = 16) to 2'complement.

Returns
4 munons from barrel (m_GBOutputMuons[0]), and 4 from endcaps (m_GBOutputMuons[1]).

Definition at line 26 of file RPCFinalSorter.cc.

References MuonsGrabber::addMuon(), gather_cfg::cout, MuonsGrabber::Instance(), and nano_mu_digi_cff::region.

Referenced by RPCPacTrigger::runEvent().

26  {
27  //m_GBOutputMuons[0].clear();
28  //m_GBOutputMuons[1].clear();
29 
30  runFinalSorter(tcsMuonsVec2); // modyfies tcsMuonsVec2
31 
32  if (m_TrigCnfg->getDebugLevel() != 0) {
33  for (unsigned int region = 0; region < tcsMuonsVec2.size(); ++region) {
34  for (unsigned int iTB = 0; iTB < tcsMuonsVec2[region].size(); iTB++) {
35 #ifndef _STAND_ALONE
36  // LogDebug("RPCHwDebug")<<"GB 4" << region
37  // << "0 " << iTB << " "
38  // << tcsMuonsVec2[region][iTB].printDebugInfo(m_TrigCnfg->getDebugLevel());
39  MuonsGrabber::Instance().addMuon(tcsMuonsVec2[region][iTB], 4, region, 0, iTB);
40 #else
41  std::cout << "GB 4" << region << "0 " << iTB << " "
42  << tcsMuonsVec2[region][iTB].printDebugInfo(m_TrigCnfg->getDebugLevel()) << std::endl;
43 #endif
44  }
45  }
46  }
47 
48  return tcsMuonsVec2;
49 }
void runFinalSorter(L1RpcTBMuonsVec2 &finalMuons)
static MuonsGrabber & Instance()
Definition: MuonsGrabber.cc:48
void addMuon(RPCTBMuon &mu, int lvl, int region, int hs, int index)
RPCTriggerConfiguration * m_TrigCnfg

◆ runFinalSorter()

void RPCFinalSorter::runFinalSorter ( L1RpcTBMuonsVec2 finalMuons)

Definition at line 55 of file RPCFinalSorter.cc.

References muons_cff::finalMuons, RPCConst::m_FINAL_OUT_MUONS_CNT, and jetUpdater_cfi::sort.

55  {
56  //---------sorting-----------------------------------------
59 
60  //-------setting size to m_GBETA_OUT_MUONS_CNT----------------
62  finalMuons[0].pop_back();
63  finalMuons[1].pop_back();
64  }
65 
66  //-----setting 2'complement EtaAddr
67  for (unsigned int iMu = 0; iMu < finalMuons[0].size(); iMu++) {
68  // 10 oct 2006 - moved to RPCTCGhostBusterSorter::run
69  //finalMuons[0][iMu].setEtaAddr(m_TrigCnfg->towNum2TowNum2Comp(finalMuons[0][iMu].getEtaAddr()));
70  //finalMuons[1][iMu].setEtaAddr(m_TrigCnfg->towNum2TowNum2Comp(finalMuons[1][iMu].getEtaAddr()));
71 
72  // 9 July 2007 - temporarly moved to HS
73  //finalMuons[0][iMu].setPhiAddr(finalMuons[0][iMu].getContinSegmAddr());
74  //finalMuons[1][iMu].setPhiAddr(finalMuons[1][iMu].getContinSegmAddr());
75  }
76 }
size
Write out results.
static const unsigned int m_FINAL_OUT_MUONS_CNT
m_Number of muon candidates return by Final GhostBuster&Sorter
Definition: RPCConst.h:161
Used in sorting.
Definition: RPCTBMuon.h:89

◆ runHalf()

L1RpcTBMuonsVec2 RPCFinalSorter::runHalf ( L1RpcTBMuonsVec2 tcsMuonsVec2)

Member Data Documentation

◆ m_GBOutputMuons

L1RpcTBMuonsVec2 RPCFinalSorter::m_GBOutputMuons
private

Definition at line 29 of file RPCFinalSorter.h.

◆ m_TrigCnfg

RPCTriggerConfiguration* RPCFinalSorter::m_TrigCnfg
private

Definition at line 31 of file RPCFinalSorter.h.