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 ( int  wheelid)

Definition at line 18 of file RPCWheelMap.cc.

References m_debug, m_wheelid, and wheelid().

18  {
19 
21  m_debug = false;
22 
23 }
bool m_debug
Definition: RPCWheelMap.h:43
int wheelid() const
Definition: RPCWheelMap.h:28

Member Function Documentation

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

Definition at line 26 of file RPCWheelMap.cc.

References m_maxBxWindow, m_maxSectors, and m_wheelMapBx.

27 {
28 
29  // |--12--|--12--|--12--|--12--|--12--|--12--|--12--| (12 sectors x 6 layers x 7 bx)
30  // 0.....11
31  int indx1 = bx + m_maxBxWindow;
32  int indx2 = sec + indx1*m_maxSectors;
33  m_wheelMapBx[ indx2 ].set( layer-1, true);
34 
35 }
std::array< std::bitset< 6 >, m_maxSectors *m_maxBx > m_wheelMapBx
Definition: RPCWheelMap.h:41
static constexpr int m_maxBxWindow
Definition: RPCWheelMap.h:18
static constexpr int m_maxSectors
Definition: RPCWheelMap.h:17
void RPCWheelMap::prepareData ( )

Definition at line 37 of file RPCWheelMap.cc.

References gather_cfg::cout, mps_fire::i, m_debug, m_maxBx, m_maxBxWindow, m_maxSectors, m_ttuinVec, m_wheelMap, m_wheelMapBx, AlCaHLTBitMon_QueryRunRegistry::string, and PFTauMVAInputDiscriminatorTranslator_cfi::test.

38 {
39 
40  bool anyHits(false);
41 
42  for(int bx=0; bx < m_maxBx; ++bx) {
43 
44  anyHits = false;
45 
46  for(int i=0; i < m_maxSectors; ++i) {
47 
48  int indx = i + bx*m_maxSectors;
49 
50  m_ttuinVec[bx].m_bx = ( bx - m_maxBxWindow );
51  m_wheelMap[i] = m_wheelMapBx[ indx ];
52  m_ttuinVec[bx].input_sec[i] = m_wheelMap[i];
53 
54  anyHits |= m_wheelMap[i].any();
55 
56  if( m_debug ) {
58  test = m_wheelMap[i].to_string<char,std::char_traits<char>,std::allocator<char> >();
59  std::cout << "prepareData> sec: " << i << " " << test << " anyHits " << anyHits << std::endl;
60  }
61 
62  }
63 
64  m_ttuinVec[bx].m_hasHits = anyHits;
65 
66  }
67 
68  if( m_debug ) std::cout << "prepareData> done." << '\n';
69 
70 }
std::array< TTUInput, m_maxBx > m_ttuinVec
Definition: RPCWheelMap.h:30
bool m_debug
Definition: RPCWheelMap.h:43
std::array< std::bitset< 6 >, m_maxSectors > m_wheelMap
Definition: RPCWheelMap.h:40
static constexpr int m_maxBx
Definition: RPCWheelMap.h:16
std::array< std::bitset< 6 >, m_maxSectors *m_maxBx > m_wheelMapBx
Definition: RPCWheelMap.h:41
static constexpr int m_maxBxWindow
Definition: RPCWheelMap.h:18
static constexpr int m_maxSectors
Definition: RPCWheelMap.h:17
int RPCWheelMap::wheelid ( ) const
inline

Definition at line 28 of file RPCWheelMap.h.

References m_wheelid.

Referenced by RPCWheelMap().

28 { return m_wheelid; };
int RPCWheelMap::wheelIdx ( ) const
inline

Definition at line 30 of file RPCWheelMap.h.

References m_ttuinVec, and m_wheelid.

30 { return (m_wheelid+2); };

Member Data Documentation

int RPCWheelMap::m_bx
private

Definition at line 37 of file RPCWheelMap.h.

bool RPCWheelMap::m_debug
private

Definition at line 43 of file RPCWheelMap.h.

Referenced by prepareData(), and RPCWheelMap().

constexpr int RPCWheelMap::m_maxBx = 7
staticprivate

Definition at line 16 of file RPCWheelMap.h.

Referenced by prepareData().

constexpr int RPCWheelMap::m_maxBxWindow = 3
staticprivate

Definition at line 18 of file RPCWheelMap.h.

Referenced by addHit(), and prepareData().

constexpr int RPCWheelMap::m_maxSectors = 12
staticprivate

Definition at line 17 of file RPCWheelMap.h.

Referenced by addHit(), and prepareData().

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

Definition at line 30 of file RPCWheelMap.h.

Referenced by prepareData(), and wheelIdx().

int RPCWheelMap::m_wheelid
private

Definition at line 38 of file RPCWheelMap.h.

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

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

Definition at line 40 of file RPCWheelMap.h.

Referenced by prepareData().

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

Definition at line 41 of file RPCWheelMap.h.

Referenced by addHit(), and prepareData().