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