CMS 3D CMS Logo

Public Member Functions | Private Attributes

RPCFinalSorter Class Reference

#include <RPCFinalSorter.h>

List of all members.

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.

                                                                     {
  
  m_TrigCnfg = triggerConfig;
  m_GBOutputMuons.assign(2, L1RpcTBMuonsVec());
  
}

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().

                                                                   {
  
  //m_GBOutputMuons[0].clear();
  //m_GBOutputMuons[1].clear();
    
  runFinalSorter(tcsMuonsVec2); // modyfies  tcsMuonsVec2


  if (m_TrigCnfg->getDebugLevel()!=0){
    for (unsigned  int region = 0; region < tcsMuonsVec2.size(); ++region){
        for (unsigned  int iTB = 0; iTB < tcsMuonsVec2[region].size(); iTB++){
#ifndef _STAND_ALONE
          //  LogDebug("RPCHwDebug")<<"GB 4" << region
          //      << "0 " << iTB << " "
          //      << tcsMuonsVec2[region][iTB].printDebugInfo(m_TrigCnfg->getDebugLevel());
          MuonsGrabber::Instance().addMuon(tcsMuonsVec2[region][iTB], 4, region, 0, iTB);  
#else
            std::cout<<"GB 4" << region 
                << "0 " << iTB << " "
                << tcsMuonsVec2[region][iTB].printDebugInfo(m_TrigCnfg->getDebugLevel())
                << std::endl;
#endif
        }
    }
  }

  return tcsMuonsVec2;
}
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().

                                                                {
//---------sorting-----------------------------------------
  sort(finalMuons[0].begin(), finalMuons[0].end(), RPCTBMuon::TMuonMore()) ;
  sort(finalMuons[1].begin(), finalMuons[1].end(), RPCTBMuon::TMuonMore()) ;

//-------setting size to m_GBETA_OUT_MUONS_CNT----------------
  while(finalMuons[0].size() > RPCConst::m_FINAL_OUT_MUONS_CNT) {
    finalMuons[0].pop_back();
    finalMuons[1].pop_back();
  }

//-----setting 2'complement EtaAddr
  for(unsigned int iMu = 0; iMu < finalMuons[0].size(); iMu++) {
    // 10 oct 2006 - moved to RPCTCGhostBusterSorter::run 
    //finalMuons[0][iMu].setEtaAddr(m_TrigCnfg->towNum2TowNum2Comp(finalMuons[0][iMu].getEtaAddr()));
    //finalMuons[1][iMu].setEtaAddr(m_TrigCnfg->towNum2TowNum2Comp(finalMuons[1][iMu].getEtaAddr()));
    
    // 9 July 2007 - temporarly moved to HS
    //finalMuons[0][iMu].setPhiAddr(finalMuons[0][iMu].getContinSegmAddr());
    //finalMuons[1][iMu].setPhiAddr(finalMuons[1][iMu].getContinSegmAddr());   
  }  
}
L1RpcTBMuonsVec2 RPCFinalSorter::runHalf ( L1RpcTBMuonsVec2 tcsMuonsVec2)

Member Data Documentation

Definition at line 30 of file RPCFinalSorter.h.

Definition at line 32 of file RPCFinalSorter.h.