CMS 3D CMS Logo

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

#include <RPCTriggerCrate.h>

Public Member Functions

 RPCTriggerCrate (RPCTriggerConfiguration *triggerConfig, int tcNum)
 
void runCone (const RPCLogCone &cone)
 
L1RpcTBMuonsVec runTCGBSorter ()
 

Private Attributes

std::vector< RPCTriggerBoardm_TBsVec
 Here TB belonging to thie TC are stored. More...
 
RPCTCGhostBusterSorter m_TCGhostBusterSorter
 
int m_TCNumber
 The number of this TriggerCrate (0 - 11) More...
 
RPCTriggerConfigurationm_TriggerConfig
 
bool m_WasMuon
 

Detailed Description

Class describing the Trigger Crate. In one Trigger Crate thera are Trigger Boards fro one sector.

Author
Karol Bunkowski (Warsaw)

Definition at line 21 of file RPCTriggerCrate.h.

Constructor & Destructor Documentation

◆ RPCTriggerCrate()

RPCTriggerCrate::RPCTriggerCrate ( RPCTriggerConfiguration triggerConfig,
int  tcNum 
)

Definition at line 6 of file RPCTriggerCrate.cc.

References RPCTriggerConfiguration::getTBsInTC(), m_TBsVec, m_TCNumber, m_TriggerConfig, and m_WasMuon.

7  : m_TCGhostBusterSorter(triggerConfig) {
8  //m_TCGhostBusterSorter = tcGhostBusterSorter;
9  m_TriggerConfig = triggerConfig;
10  m_WasMuon = false;
11 
12  m_TCNumber = tcNum;
13 
14  for (int iTB = 0; iTB < triggerConfig->getTBsInTC(); iTB++)
15  m_TBsVec.push_back(RPCTriggerBoard(triggerConfig, iTB, tcNum));
16 }
std::vector< RPCTriggerBoard > m_TBsVec
Here TB belonging to thie TC are stored.
virtual int getTBsInTC()=0
returns number og Trigger Boards in one Trigger Crate.
RPCTCGhostBusterSorter m_TCGhostBusterSorter
RPCTriggerConfiguration * m_TriggerConfig
int m_TCNumber
The number of this TriggerCrate (0 - 11)

Member Function Documentation

◆ runCone()

void RPCTriggerCrate::runCone ( const RPCLogCone cone)

Runs RPCTriggerBoard::runCone() for every TB. Cheks, if any non empty muons were found

Definition at line 49 of file RPCTriggerCrate.cc.

References hltPFPuppi_cfi::cone, RPCTriggerConfiguration::getTBNum(), m_TBsVec, m_TriggerConfig, and m_WasMuon.

49  {
50  if (m_TBsVec[m_TriggerConfig->getTBNum(cone.getConeCrdnts())].runCone(cone))
51  m_WasMuon = true;
52 }
std::vector< RPCTriggerBoard > m_TBsVec
Here TB belonging to thie TC are stored.
virtual int getTBNum(const RPCConst::l1RpcConeCrdnts &coneCrdnts)=0
Returns the index of TB (in TC) that should run given LogCone.
RPCTriggerConfiguration * m_TriggerConfig
void runCone(const RPCLogCone &cone)

◆ runTCGBSorter()

L1RpcTBMuonsVec RPCTriggerCrate::runTCGBSorter ( )

If in runCone() any muons were found, runs RPCTriggerBoard::runTBGB() for every TB. Then runs RPCTCGhostBusterSorter::run().

Definition at line 18 of file RPCTriggerCrate.cc.

References MuonsGrabber::addMuon(), gather_cfg::cout, RPCTriggerConfiguration::getDebugLevel(), MuonsGrabber::Instance(), m_TBsVec, m_TCGhostBusterSorter, m_TriggerConfig, m_WasMuon, and RPCTCGhostBusterSorter::run().

18  {
19  if (!m_WasMuon)
20  return L1RpcTBMuonsVec();
21 
22  L1RpcTBMuonsVec2 tbMuonsVec2;
23  for (unsigned int iTB = 0; iTB < m_TBsVec.size(); iTB++) {
24  tbMuonsVec2.push_back(m_TBsVec[iTB].runTBGB());
25  }
26 
27  m_WasMuon = false;
28 
29  if (m_TriggerConfig->getDebugLevel() != 0) {
30  for (unsigned int iTC = 0; iTC < tbMuonsVec2.size(); iTC++) {
31  for (unsigned int iTB = 0; iTB < tbMuonsVec2[iTC].size(); iTB++) {
32 #ifndef _STAND_ALONE
33  // LogDebug("RPCHwDebug") << "GB 1 " << iTB << " "
34  // <<tbMuonsVec2[iTC][iTB].printDebugInfo(m_TriggerConfig->getDebugLevel());
35  MuonsGrabber::Instance().addMuon(tbMuonsVec2[iTC][iTB], 1, -1, -1, iTB);
36 #else
37  std::cout << "GB 1 "
38  << "GB 1 " << iTB << " " << tbMuonsVec2[iTC][iTB].printDebugInfo(m_TriggerConfig->getDebugLevel())
39  << std::endl;
40 #endif //_STAND_ALONE
41  }
42  }
43  }
44 
45  return m_TCGhostBusterSorter.run(tbMuonsVec2);
46 }
std::vector< RPCTriggerBoard > m_TBsVec
Here TB belonging to thie TC are stored.
L1RpcTBMuonsVec run(L1RpcTBMuonsVec2 &tbMuonsVec)
static MuonsGrabber & Instance()
Definition: MuonsGrabber.cc:48
RPCTCGhostBusterSorter m_TCGhostBusterSorter
std::vector< RPCTBMuon > L1RpcTBMuonsVec
Definition: RPCTBMuon.h:218
RPCTriggerConfiguration * m_TriggerConfig
std::vector< L1RpcTBMuonsVec > L1RpcTBMuonsVec2
Definition: RPCTBMuon.h:219
void addMuon(RPCTBMuon &mu, int lvl, int region, int hs, int index)

Member Data Documentation

◆ m_TBsVec

std::vector<RPCTriggerBoard> RPCTriggerCrate::m_TBsVec
private

Here TB belonging to thie TC are stored.

Definition at line 38 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate(), runCone(), and runTCGBSorter().

◆ m_TCGhostBusterSorter

RPCTCGhostBusterSorter RPCTriggerCrate::m_TCGhostBusterSorter
private

Definition at line 40 of file RPCTriggerCrate.h.

Referenced by runTCGBSorter().

◆ m_TCNumber

int RPCTriggerCrate::m_TCNumber
private

The number of this TriggerCrate (0 - 11)

Definition at line 34 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate().

◆ m_TriggerConfig

RPCTriggerConfiguration* RPCTriggerCrate::m_TriggerConfig
private

Definition at line 36 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate(), runCone(), and runTCGBSorter().

◆ m_WasMuon

bool RPCTriggerCrate::m_WasMuon
private

Definition at line 42 of file RPCTriggerCrate.h.

Referenced by RPCTriggerCrate(), runCone(), and runTCGBSorter().