CMS 3D CMS Logo

RPCTriggerBoard Class Reference

Class describing the Trigger Board. More...

#include <L1Trigger/RPCTrigger/interface/RPCTriggerBoard.h>

List of all members.

Public Member Functions

 RPCTriggerBoard (RPCTriggerConfiguration *triggerConfig, int tbNum, int tcNum)
bool runCone (const RPCLogCone &cone)
 Runs RPCPacData::run() for cone.
L1RpcTBMuonsVec runTBGB ()
 Creates L1RpcTBMuonsVec2 from muons from m_PacsMuonsVec.

Private Types

typedef std::map< int, PACsVecPACsAll
typedef std::vector
< boost::shared_ptr< RPCPac > > 
PACsVec

Private Attributes

PACsAll m_pacs
L1RpcTBMuonsVec m_PacsMuonsVec
RPCTBGhostBuster m_TBGhostBuster
int m_TBNumber
 0...8 , 0 = tbn4, m_tower -16..-13, 4 = tb0
RPCTriggerConfigurationm_TriggerConfig


Detailed Description

Class describing the Trigger Board.

In hardware on one TB thera are m_PAC procesors for 3 or 4 towers of one sector. In this implementation the RPCTriggerBoard does not holds the m_PAC, but acces them through RPCTriggerConfiguration, beacouse deifferent configuration are possible (for example the same m_PAC for every Log Segment of given m_tower).

Author:
Karol Bunkowski (Warsaw)

Definition at line 20 of file RPCTriggerBoard.h.


Member Typedef Documentation

typedef std::map<int,PACsVec> RPCTriggerBoard::PACsAll [private]

Definition at line 48 of file RPCTriggerBoard.h.

typedef std::vector<boost::shared_ptr< RPCPac > > RPCTriggerBoard::PACsVec [private]

Definition at line 47 of file RPCTriggerBoard.h.


Constructor & Destructor Documentation

RPCTriggerBoard::RPCTriggerBoard ( RPCTriggerConfiguration triggerConfig,
int  tbNum,
int  tcNum 
)

Definition at line 12 of file RPCTriggerBoard.cc.

References RPCTriggerConfiguration::getPac(), RPCTriggerConfiguration::getTowsCntOnTB(), i, RPCConst::l1RpcConeCrdnts::m_LogSector, RPCConst::l1RpcConeCrdnts::m_LogSegment, m_pacs, m_TBNumber, RPCConst::l1RpcConeCrdnts::m_Tower, and m_TriggerConfig.

00014 {
00015   
00016   m_TriggerConfig = triggerConfig;
00017   m_TBNumber = tbNum;
00018 
00019   int towerMin=-16;
00020   int towerMax=-16;
00021   
00022   // Calculate tower boundaries for this TB
00023   for (int i=0;i <= tbNum; i++){ // Trigger Boards are numbered from 0 to 8
00024     towerMin=towerMax;
00025     towerMax+=m_TriggerConfig->getTowsCntOnTB(i);
00026   }
00027   towerMax--;
00028   
00029   for (int tower = towerMin; tower <= towerMax; tower++){
00030     for (int logSegment = 0; logSegment < 12; logSegment++){ // One logSegment = one PAC
00031       //m_pacs[cone.getTower()][cone.getLogSegment()]
00032       RPCConst::l1RpcConeCrdnts coneCrds;
00033       coneCrds.m_Tower=tower;  
00034       coneCrds.m_LogSector=tcNum;
00035       coneCrds.m_LogSegment=logSegment;
00036       
00037       const RPCPacData *pacData = m_TriggerConfig->getPac(coneCrds);
00038       
00039       // one trigger crate covers one logsector:
00040       //RPCPac *pac = new RPCPac(pacData, tower, tcNum, logSegment); 
00041       boost::shared_ptr< RPCPac > pac (new RPCPac(pacData, tower, tcNum, logSegment) ); 
00042 
00043       m_pacs[tower].push_back(pac);
00044     
00045     }
00046   }
00047            
00048            
00049 }


Member Function Documentation

bool RPCTriggerBoard::runCone ( const RPCLogCone cone  ) 

Runs RPCPacData::run() for cone.

Converts RPCPacMuon to RPCTBMuon and puts it to the m_PacsMuonsVec.

Returns:
true if non-empty muon was return by m_PAC

Definition at line 51 of file RPCTriggerBoard.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), RPCTriggerConfiguration::getDebugLevel(), RPCLogCone::getLogSegment(), RPCLogCone::getTower(), LogDebug, m_pacs, m_PacsMuonsVec, m_TBNumber, m_TriggerConfig, and s.

00051                                                      {
00052 
00053     //RPCTBMuon tbMuon(m_TriggerConfig->getPac(cone.getConeCrdnts())->run(cone) );
00054     if(m_pacs.find(cone.getTower())==m_pacs.end()){
00055       std::stringstream s;
00056       s << "RPCTriggerBoard::runCone() wrong tower: " << cone.getTower() << " in TB=" << m_TBNumber;
00057       throw RPCException(s.str());
00058     }
00059     
00060     RPCTBMuon tbMuon(m_pacs[cone.getTower()][cone.getLogSegment()]->run(cone));  
00061     //Reference: RPCTBMuon(int ptCode, int quality, int sign, int patternNum, unsigned short firedPlanes);
00062 
00063     //RPCPacMuon pmuon = m_pacs[cone.getTower()][cone.getLogSegment()]->run(cone);
00064     //RPCTBMuon tbMuon(pmuon.getPtCode(), pmuon.getQuality(), pmuon.getSign(), pmuon.getPatternNum(), pmuon.getFiredPlanes());
00065     
00066 
00067     if(tbMuon.getCode() > 0) {
00068         m_PacsMuonsVec.push_back(tbMuon);
00069         if (m_TriggerConfig->getDebugLevel()!=0){
00070 #ifndef _STAND_ALONE
00071           LogDebug("RPCHwDebug") << "GB 0 -1 "
00072                                  << tbMuon.printDebugInfo(m_TriggerConfig->getDebugLevel());
00073 #else
00074           std::cout << "GB 0 -1 "
00075                     << tbMuon.printDebugInfo(m_TriggerConfig->getDebugLevel())
00076                     << std::endl;
00077 #endif //_STAND_ALONE
00078         }
00079       return true;
00080     }
00081     else
00082       return false;
00083       

L1RpcTBMuonsVec RPCTriggerBoard::runTBGB (  ) 

Creates L1RpcTBMuonsVec2 from muons from m_PacsMuonsVec.

Then runs RPCTBGhostBuster::run().

Returns:
4 muons or empty vector.

Definition at line 85 of file RPCTriggerBoard.cc.

References RPCTriggerConfiguration::getTowerNumOnTb(), m_PacsMuonsVec, RPCConst::m_SEGMENTS_IN_SECTOR_CNT, m_TBGhostBuster, RPCConst::m_TOWERS_ON_TB_CNT, m_TriggerConfig, RPCTBGhostBuster::run(), and size.

00086                                          { //4 muons or empty vector
00087   if(m_PacsMuonsVec.size() == 0)
00088     return L1RpcTBMuonsVec();
00089 
00090   L1RpcTBMuonsVec2 gbMuons(RPCConst::m_TOWERS_ON_TB_CNT, L1RpcTBMuonsVec());
00091   for(unsigned int iMu = 0; iMu < m_PacsMuonsVec.size(); iMu++) {
00092     int tbTower = m_TriggerConfig->getTowerNumOnTb(m_PacsMuonsVec[iMu].getConeCrdnts());
00093 
00094     if(gbMuons[tbTower].size() == 0)
00095       gbMuons[tbTower].assign(RPCConst::m_SEGMENTS_IN_SECTOR_CNT, RPCTBMuon());
00096 
00097     gbMuons[tbTower][m_PacsMuonsVec[iMu].getLogSegment()] = m_PacsMuonsVec[iMu];
00098   }
00099 
00100   m_PacsMuonsVec.clear();
00101   return m_TBGhostBuster.run(gbMuons);


Member Data Documentation

PACsAll RPCTriggerBoard::m_pacs [private]

Definition at line 50 of file RPCTriggerBoard.h.

Referenced by RPCTriggerBoard(), and runCone().

L1RpcTBMuonsVec RPCTriggerBoard::m_PacsMuonsVec [private]

Definition at line 44 of file RPCTriggerBoard.h.

Referenced by runCone(), and runTBGB().

RPCTBGhostBuster RPCTriggerBoard::m_TBGhostBuster [private]

Definition at line 42 of file RPCTriggerBoard.h.

Referenced by runTBGB().

int RPCTriggerBoard::m_TBNumber [private]

0...8 , 0 = tbn4, m_tower -16..-13, 4 = tb0

Definition at line 38 of file RPCTriggerBoard.h.

Referenced by RPCTriggerBoard(), and runCone().

RPCTriggerConfiguration* RPCTriggerBoard::m_TriggerConfig [private]

Definition at line 40 of file RPCTriggerBoard.h.

Referenced by RPCTriggerBoard(), runCone(), and runTBGB().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:13 2009 for CMSSW by  doxygen 1.5.4