Main Page
Namespaces
Classes
Package Documentation
DataFormats
L1GlobalCaloTrigger
src
L1GctHtMiss.cc
Go to the documentation of this file.
1
2
#include "
DataFormats/L1GlobalCaloTrigger/interface/L1GctHtMiss.h
"
3
4
L1GctHtMiss::L1GctHtMiss
() : m_data(0), m_bx(0) { }
5
6
// The raw data is masked off so as only the MHT magnitude, overflow + phi bits are stored.
7
// This is because the raw data stream also contains a BC0 flag on bit 31, bit 15 is always
8
// set to 1, bits 14:13 are always '10', and bits 30:16 are always '101010...'.
9
// This data is masked off so as to match an L1GctHtMiss object constructed using
10
// the L1GctHtMiss(unsigned et, unsigned phi, bool oflow) constructor.
11
L1GctHtMiss::L1GctHtMiss
(uint32_t rawData) :
m_data
(rawData &
kRawCtorMask
),
m_bx
(0) { }
12
13
L1GctHtMiss::L1GctHtMiss
(uint32_t rawData, int16_t
bx
) :
m_data
(rawData &
kRawCtorMask
),
m_bx
(bx) { }
14
15
L1GctHtMiss::L1GctHtMiss
(
unsigned
et
,
unsigned
phi
,
bool
oflow) :
m_data
(0),
16
m_bx
(0)
17
{
18
if
((et <=
kHtMissMagMask
) && (phi <
kHtMissPhiNBins
)) {
19
m_data
= (oflow ?
kHtMissOFlowBit
: 0) |
20
((et &
kHtMissMagMask
) <<
kHtMissMagShift
) |
21
((phi &
kHtMissPhiMask
) <<
kHtMissPhiShift
);
22
}
23
else
{
24
m_data
= ((et &
kHtMissMagMask
) <<
kHtMissMagShift
) |
kHtMissOFlowBit
;
25
}
26
}
27
28
L1GctHtMiss::L1GctHtMiss
(
unsigned
et
,
unsigned
phi
,
bool
oflow, int16_t
bx
) :
m_data
(0),
29
m_bx
(bx)
30
{
31
if
((et <=
kHtMissMagMask
) && (phi <
kHtMissPhiNBins
)) {
32
m_data
= (oflow ?
kHtMissOFlowBit
: 0) |
33
((et &
kHtMissMagMask
) <<
kHtMissMagShift
) |
34
((phi &
kHtMissPhiMask
) <<
kHtMissPhiShift
);
35
}
36
else
{
37
m_data
= ((et &
kHtMissMagMask
) <<
kHtMissMagShift
) |
kHtMissOFlowBit
;
38
}
39
}
40
41
L1GctHtMiss::~L1GctHtMiss
() { }
42
44
std::ostream&
operator<<
(std::ostream&
s
,
const
L1GctHtMiss
&
c
) {
45
s <<
" L1GctHtMiss: "
;
46
s <<
" mag="
<< c.
et
() <<
", phi="
<< c.
phi
();
47
if
(c.
overFlow
()) { s <<
"; overflow set"
; }
48
return
s
;
49
}
50
L1GctHtMiss::kHtMissPhiShift
Definition:
L1GctHtMiss.h:29
L1GctHtMiss::kHtMissMagMask
Definition:
L1GctHtMiss.h:28
L1GctHtMiss::kRawCtorMask
Definition:
L1GctHtMiss.h:33
L1GctHtMiss::kHtMissMagShift
Definition:
L1GctHtMiss.h:30
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
EnergyCorrector.c
c
Definition:
EnergyCorrector.py:44
L1GctHtMiss::m_bx
int16_t m_bx
Definition:
L1GctHtMiss.h:80
L1GctHtMiss::overFlow
bool overFlow() const
get the overflow
Definition:
L1GctHtMiss.h:63
L1GctHtMiss::bx
int16_t bx() const
get bunch-crossing index
Definition:
L1GctHtMiss.h:69
operator<<
std::ostream & operator<<(std::ostream &s, const L1GctHtMiss &c)
Pretty-print operator for L1GctHtMiss.
Definition:
L1GctHtMiss.cc:44
L1GctHtMiss::et
unsigned et() const
get the magnitude
Definition:
L1GctHtMiss.h:60
L1GctHtMiss::~L1GctHtMiss
virtual ~L1GctHtMiss()
Definition:
L1GctHtMiss.cc:41
L1GctHtMiss::kHtMissPhiNBins
Definition:
L1GctHtMiss.h:32
L1GctHtMiss::kHtMissPhiMask
Definition:
L1GctHtMiss.h:27
L1GctHtMiss::L1GctHtMiss
L1GctHtMiss()
Definition:
L1GctHtMiss.cc:4
L1GctHtMiss
Persistable copy of missing Et measured at Level-1.
Definition:
L1GctHtMiss.h:16
L1GctHtMiss::m_data
uint32_t m_data
Definition:
L1GctHtMiss.h:79
L1GctHtMiss.h
L1GctHtMiss::kHtMissOFlowBit
Definition:
L1GctHtMiss.h:31
L1GctHtMiss::phi
unsigned phi() const
get the Et
Definition:
L1GctHtMiss.h:66
Generated for CMSSW Reference Manual by
1.8.11