CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ( RPCTriggerConfiguration triggerConfig)

Defualt constructor

Definition at line 16 of file RPCFinalSorter.cc.

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

Member Function Documentation

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 28 of file RPCFinalSorter.cc.

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

Referenced by RPCPacTrigger::runEvent().

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

Definition at line 61 of file RPCFinalSorter.cc.

References begin, end, RPCConst::m_FINAL_OUT_MUONS_CNT, findQualityFiles::size, and python.multivaluedict::sort().

61  {
62 //---------sorting-----------------------------------------
63  sort(finalMuons[0].begin(), finalMuons[0].end(), RPCTBMuon::TMuonMore()) ;
64  sort(finalMuons[1].begin(), finalMuons[1].end(), RPCTBMuon::TMuonMore()) ;
65 
66 //-------setting size to m_GBETA_OUT_MUONS_CNT----------------
67  while(finalMuons[0].size() > RPCConst::m_FINAL_OUT_MUONS_CNT) {
68  finalMuons[0].pop_back();
69  finalMuons[1].pop_back();
70  }
71 
72 //-----setting 2'complement EtaAddr
73  for(unsigned int iMu = 0; iMu < finalMuons[0].size(); iMu++) {
74  // 10 oct 2006 - moved to RPCTCGhostBusterSorter::run
75  //finalMuons[0][iMu].setEtaAddr(m_TrigCnfg->towNum2TowNum2Comp(finalMuons[0][iMu].getEtaAddr()));
76  //finalMuons[1][iMu].setEtaAddr(m_TrigCnfg->towNum2TowNum2Comp(finalMuons[1][iMu].getEtaAddr()));
77 
78  // 9 July 2007 - temporarly moved to HS
79  //finalMuons[0][iMu].setPhiAddr(finalMuons[0][iMu].getContinSegmAddr());
80  //finalMuons[1][iMu].setPhiAddr(finalMuons[1][iMu].getContinSegmAddr());
81  }
82 }
static const unsigned int m_FINAL_OUT_MUONS_CNT
m_Number of muon candidates return by Final GhostBuster&amp;Sorter
Definition: RPCConst.h:163
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
Used in sorting.
Definition: RPCTBMuon.h:97
tuple size
Write out results.
L1RpcTBMuonsVec2 RPCFinalSorter::runHalf ( L1RpcTBMuonsVec2 tcsMuonsVec2)

Member Data Documentation

L1RpcTBMuonsVec2 RPCFinalSorter::m_GBOutputMuons
private

Definition at line 30 of file RPCFinalSorter.h.

RPCTriggerConfiguration* RPCFinalSorter::m_TrigCnfg
private

Definition at line 32 of file RPCFinalSorter.h.