Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CondFormats
HcalObjects
interface
HcalChannelStatus.h
Go to the documentation of this file.
1
#ifndef HcalChannelStatus_h
2
#define HcalChannelStatus_h
3
4
/*
5
\class HcalChannelStatus
6
\author Radek Ofierzynski
7
contains one channel status and corresponding DetId
8
*/
9
10
#include "
CondFormats/Serialization/interface/Serializable.h
"
11
12
#include <boost/cstdint.hpp>
13
14
15
class
HcalChannelStatus
16
{
17
public
:
18
// contains the defined bits for easy access, see https://twiki.cern.ch/twiki/bin/view/CMS/HcalDataValidationWorkflow
19
enum
StatusBit
{
20
HcalCellOff
=0,
// 1=Hcal cell is off
21
HcalCellMask
=1,
// 1=Hcal cell is masked/to be masked at RecHit Level
22
// Quality Bits
23
HcalCellDead
=5,
// 1=Hcal cell is dead (from DQM algo)
24
HcalCellHot
=6,
// 1=Hcal cell is hot (from DQM algo)
25
HcalCellStabErr
=7,
// 1=Hcal cell has stability error
26
HcalCellTimErr
=8,
// 1=Hcal cell has timing error
27
HcalCellExcludeFromHBHENoiseSummary
= 9,
//1=cell is completely excluded from all HBHENoiseSummary computations
28
HcalCellExcludeFromHBHENoiseSummaryR45
= 10,
//1=cell's rechit is excluded when calculating the TS4TS5 ratio only in the HBHE Noise Summary
29
HcalBadLaserSignal
= 11,
//1 = channel does not receive good laser calibration signal
30
// Trigger Bits
31
HcalCellTrigMask
=15,
// 1=cell is masked from the Trigger
32
// CaloTower Bits
33
HcalCellCaloTowerMask
=18,
// 1=cell is always excluded from the CaloTower, regardless of other bit settings.
34
HcalCellCaloTowerProb
=19
// 1=cell is counted as problematic within the tower.
35
};
36
37
HcalChannelStatus
():
mId
(0),
mStatus
(0) {}
38
HcalChannelStatus
(
unsigned
long
fid
, uint32_t
status
):
mId
(fid),
mStatus
(status) {}
39
40
// void setDetId(unsigned long fid) {mId = fid;}
41
void
setValue
(uint32_t
value
) {
mStatus
=
value
;}
42
43
// for the following, one can use unsigned int values or HcalChannelStatus::StatusBit values
44
// e.g. 5 or HcalChannelStatus::HcalCellDead
45
void
setBit
(
unsigned
int
bitnumber)
46
{
47
uint32_t statadd = 0x1<<(bitnumber);
48
mStatus
=
mStatus
|statadd;
49
}
50
void
unsetBit
(
unsigned
int
bitnumber)
51
{
52
uint32_t statadd = 0x1<<(bitnumber);
53
statadd = ~statadd;
54
mStatus
=
mStatus
&statadd;
55
}
56
57
bool
isBitSet
(
unsigned
int
bitnumber)
const
58
{
59
uint32_t statadd = 0x1<<(bitnumber);
60
return
(
mStatus
&statadd)?(
true
):(
false
);
61
}
62
63
uint32_t
rawId
()
const
{
return
mId
;}
64
65
uint32_t
getValue
()
const
{
return
mStatus
;}
66
67
private
:
68
uint32_t
mId
;
69
uint32_t
mStatus
;
70
71
72
COND_SERIALIZABLE
;
73
};
74
#endif
HcalChannelStatus::HcalCellOff
Definition:
HcalChannelStatus.h:20
HcalChannelStatus
Definition:
HcalChannelStatus.h:15
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
HcalChannelStatus::HcalBadLaserSignal
Definition:
HcalChannelStatus.h:29
HcalChannelStatus::HcalCellMask
Definition:
HcalChannelStatus.h:21
HcalChannelStatus::HcalChannelStatus
HcalChannelStatus(unsigned long fid, uint32_t status)
Definition:
HcalChannelStatus.h:38
HcalChannelStatus::HcalCellHot
Definition:
HcalChannelStatus.h:24
HcalChannelStatus::HcalCellDead
Definition:
HcalChannelStatus.h:23
HcalChannelStatus::unsetBit
void unsetBit(unsigned int bitnumber)
Definition:
HcalChannelStatus.h:50
HcalChannelStatus::setBit
void setBit(unsigned int bitnumber)
Definition:
HcalChannelStatus.h:45
HcalChannelStatus::rawId
uint32_t rawId() const
Definition:
HcalChannelStatus.h:63
HcalChannelStatus::HcalChannelStatus
HcalChannelStatus()
Definition:
HcalChannelStatus.h:37
HcalChannelStatus::mId
uint32_t mId
Definition:
HcalChannelStatus.h:68
HcalChannelStatus::HcalCellCaloTowerMask
Definition:
HcalChannelStatus.h:33
HcalChannelStatus::isBitSet
bool isBitSet(unsigned int bitnumber) const
Definition:
HcalChannelStatus.h:57
HcalChannelStatus::mStatus
uint32_t mStatus
Definition:
HcalChannelStatus.h:69
HcalChannelStatus::setValue
void setValue(uint32_t value)
Definition:
HcalChannelStatus.h:41
HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummaryR45
Definition:
HcalChannelStatus.h:28
HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummary
Definition:
HcalChannelStatus.h:27
HcalChannelStatus::HcalCellTrigMask
Definition:
HcalChannelStatus.h:31
HcalChannelStatus::HcalCellCaloTowerProb
Definition:
HcalChannelStatus.h:34
ntuplemaker.status
tuple status
Definition:
ntuplemaker.py:245
HcalChannelStatus::getValue
uint32_t getValue() const
Definition:
HcalChannelStatus.h:65
Serializable.h
HcalChannelStatus::COND_SERIALIZABLE
COND_SERIALIZABLE
Definition:
HcalChannelStatus.h:72
NewTree.fid
list fid
Definition:
NewTree.py:51
HcalChannelStatus::HcalCellTimErr
Definition:
HcalChannelStatus.h:26
HcalChannelStatus::HcalCellStabErr
Definition:
HcalChannelStatus.h:25
HcalChannelStatus::StatusBit
StatusBit
Definition:
HcalChannelStatus.h:19
Generated for CMSSW Reference Manual by
1.8.5