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 }

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.

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 }

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

Referenced by RPCPacTrigger::runEvent().

◆ runFinalSorter()

void RPCFinalSorter::runFinalSorter ( L1RpcTBMuonsVec2 finalMuons)

Definition at line 55 of file RPCFinalSorter.cc.

55  {
56  //---------sorting-----------------------------------------
57  sort(finalMuons[0].begin(), finalMuons[0].end(), RPCTBMuon::TMuonMore());
58  sort(finalMuons[1].begin(), finalMuons[1].end(), RPCTBMuon::TMuonMore());
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 }

References mps_fire::end, muons_cff::finalMuons, RPCConst::m_FINAL_OUT_MUONS_CNT, and findQualityFiles::size.

◆ 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.

RPCFinalSorter::m_GBOutputMuons
L1RpcTBMuonsVec2 m_GBOutputMuons
Definition: RPCFinalSorter.h:29
RPCTriggerConfiguration::getDebugLevel
int getDebugLevel() const
Definition: RPCTriggerConfiguration.h:41
gather_cfg.cout
cout
Definition: gather_cfg.py:144
MuonsGrabber::Instance
static MuonsGrabber & Instance()
Definition: MuonsGrabber.cc:48
RPCConst::m_FINAL_OUT_MUONS_CNT
static const unsigned int m_FINAL_OUT_MUONS_CNT
m_Number of muon candidates return by Final GhostBuster&Sorter
Definition: RPCConst.h:162
RPCFinalSorter::m_TrigCnfg
RPCTriggerConfiguration * m_TrigCnfg
Definition: RPCFinalSorter.h:31
RPCFinalSorter::runFinalSorter
void runFinalSorter(L1RpcTBMuonsVec2 &finalMuons)
Definition: RPCFinalSorter.cc:55
L1RpcTBMuonsVec
std::vector< RPCTBMuon > L1RpcTBMuonsVec
Definition: RPCTBMuon.h:218
mps_fire.end
end
Definition: mps_fire.py:242
muons_cff.finalMuons
finalMuons
Definition: muons_cff.py:48
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88272
RPCTBMuon::TMuonMore
Used in sorting.
Definition: RPCTBMuon.h:89
MuonsGrabber::addMuon
void addMuon(RPCTBMuon &mu, int lvl, int region, int hs, int index)
Definition: MuonsGrabber.cc:118
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443