CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes
RPCWheelMap Class Reference

#include <RPCWheelMap.h>

Public Member Functions

void addHit (int, int, int)
 
void prepareData ()
 
 RPCWheelMap ()
 Standard constructor. More...
 
 RPCWheelMap (int)
 
int wheelid ()
 
int wheelIdx ()
 
virtual ~RPCWheelMap ()
 Destructor. More...
 

Public Attributes

TTUInputm_ttuinVec
 

Private Attributes

int m_bx
 
bool m_debug
 
int m_maxBx
 
int m_maxBxWindow
 
int m_maxSectors
 
int m_wheelid
 
std::bitset< 6 > * m_wheelMap
 
std::bitset< 6 > * m_wheelMapBx
 

Detailed Description

Author
Andres Felipe Osorio Oliveros
Date
2008-11-24

Definition at line 14 of file RPCWheelMap.h.

Constructor & Destructor Documentation

RPCWheelMap::RPCWheelMap ( )
inline

Standard constructor.

Definition at line 17 of file RPCWheelMap.h.

17 {};
RPCWheelMap::RPCWheelMap ( int  wheelid)

Definition at line 18 of file RPCWheelMap.cc.

References i, m_debug, m_maxBx, m_maxBxWindow, m_maxSectors, m_ttuinVec, m_wheelid, m_wheelMap, m_wheelMapBx, reset(), and wheelid().

18  {
19 
20  m_maxBx = 7;
21  m_maxBxWindow = 3; //... considering that we have a bxing in the range [-3,+3]
22  m_maxSectors = 12;
23 
24  int maxMaps = m_maxBx * m_maxSectors;
25 
27  m_wheelMap = new std::bitset<6>[m_maxSectors];
28  m_wheelMapBx = new std::bitset<6>[m_maxSectors * m_maxBx];
30 
31  for(int i=0; i < m_maxSectors; ++i)
32  m_wheelMap[i].reset();
33 
34  for(int i=0; i < maxMaps; ++i)
35  m_wheelMapBx[i].reset();
36 
37  m_debug = false;
38 
39 }
int i
Definition: DBlmapReader.cc:9
bool m_debug
Definition: RPCWheelMap.h:46
int wheelid()
Definition: RPCWheelMap.h:27
std::bitset< 6 > * m_wheelMap
Definition: RPCWheelMap.h:43
TTUInput * m_ttuinVec
Definition: RPCWheelMap.h:29
int m_maxSectors
Definition: RPCWheelMap.h:40
int m_maxBxWindow
Definition: RPCWheelMap.h:41
std::bitset< 6 > * m_wheelMapBx
Definition: RPCWheelMap.h:44
void reset(double vett[256])
Definition: TPedValues.cc:11
RPCWheelMap::~RPCWheelMap ( )
virtual

Destructor.

Definition at line 43 of file RPCWheelMap.cc.

References m_ttuinVec, m_wheelMap, and m_wheelMapBx.

43  {
44 
45  if ( m_wheelMap ) delete[] m_wheelMap;
46  if ( m_wheelMapBx ) delete[] m_wheelMapBx;
47  if ( m_ttuinVec ) delete[] m_ttuinVec;
48 
49 }
std::bitset< 6 > * m_wheelMap
Definition: RPCWheelMap.h:43
TTUInput * m_ttuinVec
Definition: RPCWheelMap.h:29
std::bitset< 6 > * m_wheelMapBx
Definition: RPCWheelMap.h:44

Member Function Documentation

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

Definition at line 52 of file RPCWheelMap.cc.

References m_maxBxWindow, m_maxSectors, and m_wheelMapBx.

53 {
54 
55  // |--12--|--12--|--12--|--12--|--12--|--12--|--12--| (12 sectors x 6 layers x 7 bx)
56  // 0.....11
57  int indx1 = bx + m_maxBxWindow;
58  int indx2 = sec + indx1*m_maxSectors;
59  m_wheelMapBx[ indx2 ].set( layer-1, 1);
60 
61 }
int m_maxSectors
Definition: RPCWheelMap.h:40
int m_maxBxWindow
Definition: RPCWheelMap.h:41
std::bitset< 6 > * m_wheelMapBx
Definition: RPCWheelMap.h:44
void RPCWheelMap::prepareData ( )

Definition at line 63 of file RPCWheelMap.cc.

References hitfit::char, gather_cfg::cout, i, TTUInput::input_sec, TTUInput::m_bx, m_debug, TTUInput::m_hasHits, m_maxBx, m_maxBxWindow, m_maxSectors, m_ttuinVec, m_wheelMap, m_wheelMapBx, AlCaHLTBitMon_QueryRunRegistry::string, and run_regression::test.

64 {
65 
66  bool anyHits(false);
67 
68  for(int bx=0; bx < m_maxBx; ++bx) {
69 
70  anyHits = false;
71 
72  for(int i=0; i < m_maxSectors; ++i) {
73 
74  int indx = i + bx*m_maxSectors;
75 
76  m_ttuinVec[bx].m_bx = ( bx - m_maxBxWindow );
77  m_wheelMap[i] = m_wheelMapBx[ indx ];
79 
80  anyHits |= m_wheelMap[i].any();
81 
82  if( m_debug ) {
84  test = m_wheelMap[i].to_string<char,std::char_traits<char>,std::allocator<char> >();
85  std::cout << "prepareData> sec: " << i << " " << test << " anyHits " << anyHits << std::endl;
86  }
87 
88  }
89 
90  m_ttuinVec[bx].m_hasHits = anyHits;
91 
92  }
93 
94  if( m_debug ) std::cout << "prepareData> done." << '\n';
95 
96 }
int i
Definition: DBlmapReader.cc:9
int m_bx
Definition: TTUInput.h:52
bool m_debug
Definition: RPCWheelMap.h:46
std::bitset< 6 > * m_wheelMap
Definition: RPCWheelMap.h:43
TTUInput * m_ttuinVec
Definition: RPCWheelMap.h:29
int m_maxSectors
Definition: RPCWheelMap.h:40
int m_maxBxWindow
Definition: RPCWheelMap.h:41
bool m_hasHits
Definition: TTUInput.h:56
std::bitset< 6 > * m_wheelMapBx
Definition: RPCWheelMap.h:44
tuple cout
Definition: gather_cfg.py:121
std::bitset< 6 > * input_sec
Definition: TTUInput.h:58
int RPCWheelMap::wheelid ( )
inline

Definition at line 27 of file RPCWheelMap.h.

References m_wheelid.

Referenced by RPCWheelMap().

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

Definition at line 29 of file RPCWheelMap.h.

References m_wheelid.

29 { 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 46 of file RPCWheelMap.h.

Referenced by prepareData(), and RPCWheelMap().

int RPCWheelMap::m_maxBx
private

Definition at line 39 of file RPCWheelMap.h.

Referenced by prepareData(), and RPCWheelMap().

int RPCWheelMap::m_maxBxWindow
private

Definition at line 41 of file RPCWheelMap.h.

Referenced by addHit(), prepareData(), and RPCWheelMap().

int RPCWheelMap::m_maxSectors
private

Definition at line 40 of file RPCWheelMap.h.

Referenced by addHit(), prepareData(), and RPCWheelMap().

TTUInput* RPCWheelMap::m_ttuinVec

Definition at line 29 of file RPCWheelMap.h.

Referenced by prepareData(), RPCWheelMap(), and ~RPCWheelMap().

int RPCWheelMap::m_wheelid
private

Definition at line 38 of file RPCWheelMap.h.

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

std::bitset<6>* RPCWheelMap::m_wheelMap
private

Definition at line 43 of file RPCWheelMap.h.

Referenced by prepareData(), RPCWheelMap(), and ~RPCWheelMap().

std::bitset<6>* RPCWheelMap::m_wheelMapBx
private

Definition at line 44 of file RPCWheelMap.h.

Referenced by addHit(), prepareData(), RPCWheelMap(), and ~RPCWheelMap().