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.

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 }

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

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.

49  {
51  m_WasMuon = true;
52 }

References RPCLogCone::getConeCrdnts(), RPCTriggerConfiguration::getTBNum(), m_TBsVec, m_TriggerConfig, and m_WasMuon.

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

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 }

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

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

RPCTriggerConfiguration::getDebugLevel
int getDebugLevel() const
Definition: RPCTriggerConfiguration.h:41
RPCTriggerCrate::runCone
void runCone(const RPCLogCone &cone)
Definition: RPCTriggerCrate.cc:49
gather_cfg.cout
cout
Definition: gather_cfg.py:144
MuonsGrabber::Instance
static MuonsGrabber & Instance()
Definition: MuonsGrabber.cc:48
RPCTriggerConfiguration::getTBsInTC
virtual int getTBsInTC()=0
returns number og Trigger Boards in one Trigger Crate.
L1RpcTBMuonsVec
std::vector< RPCTBMuon > L1RpcTBMuonsVec
Definition: RPCTBMuon.h:218
RPCTriggerConfiguration::getTBNum
virtual int getTBNum(const RPCConst::l1RpcConeCrdnts &coneCrdnts)=0
Returns the index of TB (in TC) that should run given LogCone.
RPCTriggerCrate::m_TCGhostBusterSorter
RPCTCGhostBusterSorter m_TCGhostBusterSorter
Definition: RPCTriggerCrate.h:40
RPCTriggerCrate::m_TBsVec
std::vector< RPCTriggerBoard > m_TBsVec
Here TB belonging to thie TC are stored.
Definition: RPCTriggerCrate.h:38
RPCTriggerBoard
Definition: RPCTriggerBoard.h:20
L1RpcTBMuonsVec2
std::vector< L1RpcTBMuonsVec > L1RpcTBMuonsVec2
Definition: RPCTBMuon.h:219
RPCLogCone::getConeCrdnts
RPCConst::l1RpcConeCrdnts getConeCrdnts() const
Definition: RPCLogCone.cc:167
MuonsGrabber::addMuon
void addMuon(RPCTBMuon &mu, int lvl, int region, int hs, int index)
Definition: MuonsGrabber.cc:118
RPCTriggerCrate::m_WasMuon
bool m_WasMuon
Definition: RPCTriggerCrate.h:42
RPCTriggerCrate::m_TriggerConfig
RPCTriggerConfiguration * m_TriggerConfig
Definition: RPCTriggerCrate.h:36
RPCTriggerCrate::m_TCNumber
int m_TCNumber
The number of this TriggerCrate (0 - 11)
Definition: RPCTriggerCrate.h:34
RPCTCGhostBusterSorter::run
L1RpcTBMuonsVec run(L1RpcTBMuonsVec2 &tbMuonsVec)
Definition: RPCTCGhostBusterSorter.cc:12