CMS 3D CMS Logo

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

#include <RPCWheelMap.h>

Public Member Functions

void addHit (int, int, int)
 
void prepareData ()
 
 RPCWheelMap (int)
 
int wheelid () const
 
int wheelIdx () const
 

Public Attributes

std::array< TTUInput, m_maxBxm_ttuinVec
 

Private Attributes

int m_bx
 
bool m_debug
 
int m_wheelid
 
std::array< std::bitset< 6 >, m_maxSectorsm_wheelMap
 
std::array< std::bitset< 6 >, m_maxSectors *m_maxBxm_wheelMapBx
 

Static Private Attributes

static constexpr int m_maxBx = 7
 
static constexpr int m_maxBxWindow = 3
 
static constexpr int m_maxSectors = 12
 

Detailed Description

Author
Andres Felipe Osorio Oliveros
Date
2008-11-24

Definition at line 14 of file RPCWheelMap.h.

Constructor & Destructor Documentation

◆ RPCWheelMap()

RPCWheelMap::RPCWheelMap ( int  wheelid)

Definition at line 16 of file RPCWheelMap.cc.

16  {
18  m_debug = false;
19 }

References m_debug, m_wheelid, and wheelid().

Member Function Documentation

◆ addHit()

void RPCWheelMap::addHit ( int  bx,
int  sec,
int  layer 
)

Definition at line 22 of file RPCWheelMap.cc.

22  {
23  // |--12--|--12--|--12--|--12--|--12--|--12--|--12--| (12 sectors x 6 layers x 7 bx)
24  // 0.....11
25  int indx1 = bx + m_maxBxWindow;
26  int indx2 = sec + indx1 * m_maxSectors;
27  m_wheelMapBx[indx2].set(layer - 1, true);
28 }

References l1GtPatternGenerator_cfi::bx, m_maxBxWindow, m_maxSectors, m_wheelMapBx, and fileinputsource_cfi::sec.

◆ prepareData()

void RPCWheelMap::prepareData ( )

Definition at line 30 of file RPCWheelMap.cc.

30  {
31  bool anyHits(false);
32 
33  for (int bx = 0; bx < m_maxBx; ++bx) {
34  anyHits = false;
35 
36  for (int i = 0; i < m_maxSectors; ++i) {
37  int indx = i + bx * m_maxSectors;
38 
39  m_ttuinVec[bx].m_bx = (bx - m_maxBxWindow);
40  m_wheelMap[i] = m_wheelMapBx[indx];
41  m_ttuinVec[bx].input_sec[i] = m_wheelMap[i];
42 
43  anyHits |= m_wheelMap[i].any();
44 
45  if (m_debug) {
47  test = m_wheelMap[i].to_string<char, std::char_traits<char>, std::allocator<char> >();
48  std::cout << "prepareData> sec: " << i << " " << test << " anyHits " << anyHits << std::endl;
49  }
50  }
51 
52  m_ttuinVec[bx].m_hasHits = anyHits;
53  }
54 
55  if (m_debug)
56  std::cout << "prepareData> done." << '\n';
57 }

References l1GtPatternGenerator_cfi::bx, gather_cfg::cout, mps_fire::i, m_debug, m_maxBx, m_maxBxWindow, m_maxSectors, m_ttuinVec, m_wheelMap, m_wheelMapBx, AlCaHLTBitMon_QueryRunRegistry::string, and ctpps_dqm_sourceclient-live_cfg::test.

◆ wheelid()

int RPCWheelMap::wheelid ( ) const
inline

Definition at line 27 of file RPCWheelMap.h.

27 { return m_wheelid; };

References m_wheelid.

Referenced by RPCWheelMap().

◆ wheelIdx()

int RPCWheelMap::wheelIdx ( ) const
inline

Definition at line 29 of file RPCWheelMap.h.

29 { return (m_wheelid + 2); };

References m_wheelid.

Member Data Documentation

◆ m_bx

int RPCWheelMap::m_bx
private

Definition at line 35 of file RPCWheelMap.h.

◆ m_debug

bool RPCWheelMap::m_debug
private

Definition at line 41 of file RPCWheelMap.h.

Referenced by prepareData(), and RPCWheelMap().

◆ m_maxBx

constexpr int RPCWheelMap::m_maxBx = 7
staticconstexprprivate

Definition at line 16 of file RPCWheelMap.h.

Referenced by prepareData().

◆ m_maxBxWindow

constexpr int RPCWheelMap::m_maxBxWindow = 3
staticconstexprprivate

Definition at line 18 of file RPCWheelMap.h.

Referenced by addHit(), and prepareData().

◆ m_maxSectors

constexpr int RPCWheelMap::m_maxSectors = 12
staticconstexprprivate

Definition at line 17 of file RPCWheelMap.h.

Referenced by addHit(), and prepareData().

◆ m_ttuinVec

std::array<TTUInput, m_maxBx> RPCWheelMap::m_ttuinVec

Definition at line 29 of file RPCWheelMap.h.

Referenced by prepareData().

◆ m_wheelid

int RPCWheelMap::m_wheelid
private

Definition at line 36 of file RPCWheelMap.h.

Referenced by RPCWheelMap(), wheelid(), and wheelIdx().

◆ m_wheelMap

std::array<std::bitset<6>, m_maxSectors> RPCWheelMap::m_wheelMap
private

Definition at line 38 of file RPCWheelMap.h.

Referenced by prepareData().

◆ m_wheelMapBx

std::array<std::bitset<6>, m_maxSectors * m_maxBx> RPCWheelMap::m_wheelMapBx
private

Definition at line 39 of file RPCWheelMap.h.

Referenced by addHit(), and prepareData().

mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
RPCWheelMap::m_debug
bool m_debug
Definition: RPCWheelMap.h:41
RPCWheelMap::m_maxBx
static constexpr int m_maxBx
Definition: RPCWheelMap.h:16
test
Definition: SmallWORMDict.h:13
ctpps_dqm_sourceclient-live_cfg.test
test
Definition: ctpps_dqm_sourceclient-live_cfg.py:7
RPCWheelMap::wheelid
int wheelid() const
Definition: RPCWheelMap.h:27
RPCWheelMap::m_wheelid
int m_wheelid
Definition: RPCWheelMap.h:36
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCWheelMap::m_maxBxWindow
static constexpr int m_maxBxWindow
Definition: RPCWheelMap.h:18
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:87
RPCWheelMap::m_wheelMap
std::array< std::bitset< 6 >, m_maxSectors > m_wheelMap
Definition: RPCWheelMap.h:38
RPCWheelMap::m_wheelMapBx
std::array< std::bitset< 6 >, m_maxSectors *m_maxBx > m_wheelMapBx
Definition: RPCWheelMap.h:39
RPCWheelMap::m_ttuinVec
std::array< TTUInput, m_maxBx > m_ttuinVec
Definition: RPCWheelMap.h:29
RPCWheelMap::m_maxSectors
static constexpr int m_maxSectors
Definition: RPCWheelMap.h:17