Main Page
Namespaces
Classes
Package Documentation
L1Trigger
RPCTechnicalTrigger
src
RPCWheelMap.cc
Go to the documentation of this file.
1
// Include files
2
3
4
5
// local
6
#include "
L1Trigger/RPCTechnicalTrigger/interface/RPCWheelMap.h
"
7
#include <string>
8
#include <iostream>
9
//-----------------------------------------------------------------------------
10
// Implementation file for class : RPCWheelMap
11
//
12
// 2008-11-24 : Andres Felipe Osorio Oliveros
13
//-----------------------------------------------------------------------------
14
15
//=============================================================================
16
// Standard constructor, initializes variables
17
//=============================================================================
18
RPCWheelMap::RPCWheelMap
(
int
wheelid ) {
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
26
m_wheelid
=
wheelid
;
27
m_wheelMap
=
new
std::bitset<6>[
m_maxSectors
];
28
m_wheelMapBx
=
new
std::bitset<6>[m_maxSectors *
m_maxBx
];
29
m_ttuinVec
=
new
TTUInput
[
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
}
40
//=============================================================================
41
// Destructor
42
//=============================================================================
43
RPCWheelMap::~RPCWheelMap
() {
44
45
if
(
m_wheelMap
)
delete
[]
m_wheelMap
;
46
if
(
m_wheelMapBx
)
delete
[]
m_wheelMapBx
;
47
if
(
m_ttuinVec
)
delete
[]
m_ttuinVec
;
48
49
}
50
51
//=============================================================================
52
void
RPCWheelMap::addHit
(
int
bx,
int
sec,
int
layer)
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,
true
);
60
61
}
62
63
void
RPCWheelMap::prepareData
()
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 ];
78
m_ttuinVec
[bx].
input_sec
[
i
] =
m_wheelMap
[
i
];
79
80
anyHits |=
m_wheelMap
[
i
].any();
81
82
if
(
m_debug
) {
83
std::string
test
;
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
}
97
98
TTUInput::m_bx
int m_bx
Definition:
TTUInput.h:52
mps_fire.i
i
Definition:
mps_fire.py:269
RPCWheelMap::m_debug
bool m_debug
Definition:
RPCWheelMap.h:46
RPCWheelMap::~RPCWheelMap
virtual ~RPCWheelMap()
Destructor.
Definition:
RPCWheelMap.cc:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
RPCWheelMap::RPCWheelMap
RPCWheelMap()
Standard constructor.
Definition:
RPCWheelMap.h:17
RPCWheelMap::prepareData
void prepareData()
Definition:
RPCWheelMap.cc:63
RPCWheelMap::wheelid
int wheelid()
Definition:
RPCWheelMap.h:27
RPCWheelMap::m_wheelMap
std::bitset< 6 > * m_wheelMap
Definition:
RPCWheelMap.h:43
PFTauMVAInputDiscriminatorTranslator_cfi.test
test
Definition:
PFTauMVAInputDiscriminatorTranslator_cfi.py:94
RPCWheelMap::m_ttuinVec
TTUInput * m_ttuinVec
Definition:
RPCWheelMap.h:29
RPCWheelMap::m_wheelid
int m_wheelid
Definition:
RPCWheelMap.h:38
RPCWheelMap::m_maxSectors
int m_maxSectors
Definition:
RPCWheelMap.h:40
RPCWheelMap.h
RPCWheelMap::m_maxBxWindow
int m_maxBxWindow
Definition:
RPCWheelMap.h:41
TTUInput::m_hasHits
bool m_hasHits
Definition:
TTUInput.h:56
RPCWheelMap::m_wheelMapBx
std::bitset< 6 > * m_wheelMapBx
Definition:
RPCWheelMap.h:44
gather_cfg.cout
cout
Definition:
gather_cfg.py:143
RPCWheelMap::m_maxBx
int m_maxBx
Definition:
RPCWheelMap.h:39
reset
void reset(double vett[256])
Definition:
TPedValues.cc:11
TTUInput
Definition:
TTUInput.h:17
RPCWheelMap::addHit
void addHit(int, int, int)
Definition:
RPCWheelMap.cc:52
TTUInput::input_sec
std::bitset< 6 > * input_sec
Definition:
TTUInput.h:58
Generated for CMSSW Reference Manual by
1.8.11