CondFormats
CSCObjects
interface
CSCBadChambers.h
Go to the documentation of this file.
1
#ifndef CSCBadChambers_h
2
#define CSCBadChambers_h
3
4
#include "
CondFormats/Serialization/interface/Serializable.h
"
5
6
#include <
DataFormats/MuonDetId/interface/CSCDetId.h
>
7
#include <vector>
8
9
class
CSCBadChambers
{
10
public
:
11
typedef
uint16_t
IndexType
;
12
13
CSCBadChambers
() :
numberOfBadChambers
(0),
chambers
(
std
::
vector
<
int
>()){};
14
CSCBadChambers
(
int
nch,
const
std::vector<int>& ch) :
numberOfBadChambers
(nch),
chambers
(ch){};
15
~CSCBadChambers
(){};
16
18
int
numberOfChambers
()
const
{
return
numberOfBadChambers
; }
19
21
std::vector<int>
container
()
const
{
return
chambers
; }
22
24
bool
isInBadChamber
(
IndexType
ichamber)
const
;
25
27
bool
isInBadChamber
(
const
CSCDetId
&
id
)
const
;
28
29
IndexType
startChamberIndexInEndcap
(
IndexType
ie,
IndexType
is,
IndexType
ir)
const
{
30
const
IndexType
nschin[32] = {1, 37, 73, 1, 109, 127, 0, 0, 163, 181, 0, 0, 217, 469, 0, 0,
31
235, 271, 307, 235, 343, 361, 0, 0, 397, 415, 0, 0, 451, 505, 0, 0};
32
return
nschin[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
33
}
34
35
IndexType
chamberIndex
(
IndexType
ie,
IndexType
is,
IndexType
ir,
IndexType
ic)
const
{
36
return
startChamberIndexInEndcap
(ie, is, ir) + ic - 1;
// -1 so start index _is_ ic=1
37
}
38
39
private
:
40
int
numberOfBadChambers
;
41
std::vector<int>
chambers
;
42
43
COND_SERIALIZABLE
;
44
};
45
46
#endif
CSCBadChambers::chamberIndex
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
Definition:
CSCBadChambers.h:35
CSCDetId.h
CSCDetId
Definition:
CSCDetId.h:26
CSCBadChambers::chambers
std::vector< int > chambers
Definition:
CSCBadChambers.h:41
std
Definition:
JetResolutionObject.h:76
CSCBadChambers::CSCBadChambers
CSCBadChambers()
Definition:
CSCBadChambers.h:13
CSCBadChambers::CSCBadChambers
CSCBadChambers(int nch, const std::vector< int > &ch)
Definition:
CSCBadChambers.h:14
CSCBadChambers::~CSCBadChambers
~CSCBadChambers()
Definition:
CSCBadChambers.h:15
CSCBadChambers::IndexType
uint16_t IndexType
Definition:
CSCBadChambers.h:11
createfilelist.int
int
Definition:
createfilelist.py:10
CSCBadChambers::startChamberIndexInEndcap
IndexType startChamberIndexInEndcap(IndexType ie, IndexType is, IndexType ir) const
Definition:
CSCBadChambers.h:29
CSCBadChambers::numberOfBadChambers
int numberOfBadChambers
Definition:
CSCBadChambers.h:40
CSCBadChambers
Definition:
CSCBadChambers.h:9
CSCBadChambers::isInBadChamber
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index 'ichamber' flagged as bad?
Definition:
CSCBadChambers.cc:4
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition:
Serializable.h:39
trackerHitRTTI::vector
Definition:
trackerHitRTTI.h:21
Serializable.h
CSCBadChambers::container
std::vector< int > container() const
Return the container of bad chambers.
Definition:
CSCBadChambers.h:21
CSCBadChambers::numberOfChambers
int numberOfChambers() const
How many bad chambers are there>
Definition:
CSCBadChambers.h:18
Generated for CMSSW Reference Manual by
1.8.14