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.

References m_debug, m_wheelid, and wheelid().

16  {
18  m_debug = false;
19 }
bool m_debug
Definition: RPCWheelMap.h:41
int wheelid() const
Definition: RPCWheelMap.h:27

Member Function Documentation

◆ addHit()

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

Definition at line 22 of file RPCWheelMap.cc.

References simKBmtfDigis_cfi::bx, phase1PixelTopology::layer, m_maxBxWindow, m_maxSectors, m_wheelMapBx, and fileinputsource_cfi::sec.

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 }
constexpr std::array< uint8_t, layerIndexSize > layer
std::array< std::bitset< 6 >, m_maxSectors *m_maxBx > m_wheelMapBx
Definition: RPCWheelMap.h:39
static constexpr int m_maxBxWindow
Definition: RPCWheelMap.h:18
static constexpr int m_maxSectors
Definition: RPCWheelMap.h:17

◆ prepareData()

void RPCWheelMap::prepareData ( )

Definition at line 30 of file RPCWheelMap.cc.

References simKBmtfDigis_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.

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 }
std::array< TTUInput, m_maxBx > m_ttuinVec
Definition: RPCWheelMap.h:29
bool m_debug
Definition: RPCWheelMap.h:41
static constexpr int m_maxBx
Definition: RPCWheelMap.h:16
std::array< std::bitset< 6 >, m_maxSectors > m_wheelMap
Definition: RPCWheelMap.h:38
std::array< std::bitset< 6 >, m_maxSectors *m_maxBx > m_wheelMapBx
Definition: RPCWheelMap.h:39
static constexpr int m_maxBxWindow
Definition: RPCWheelMap.h:18
static constexpr int m_maxSectors
Definition: RPCWheelMap.h:17

◆ wheelid()

int RPCWheelMap::wheelid ( ) const
inline

Definition at line 27 of file RPCWheelMap.h.

References m_wheelid.

Referenced by RPCWheelMap().

27 { return m_wheelid; };

◆ wheelIdx()

int RPCWheelMap::wheelIdx ( ) const
inline

Definition at line 29 of file RPCWheelMap.h.

References m_wheelid.

29 { return (m_wheelid + 2); };

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
staticprivate

Definition at line 16 of file RPCWheelMap.h.

Referenced by prepareData().

◆ m_maxBxWindow

constexpr int RPCWheelMap::m_maxBxWindow = 3
staticprivate

Definition at line 18 of file RPCWheelMap.h.

Referenced by addHit(), and prepareData().

◆ m_maxSectors

constexpr int RPCWheelMap::m_maxSectors = 12
staticprivate

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