CMS 3D CMS Logo

CSCBadChambers.h
Go to the documentation of this file.
1 #ifndef CSCBadChambers_h
2 #define CSCBadChambers_h
3 
5 
7 #include <vector>
8 
10 public:
11  typedef uint16_t IndexType;
12 
14  CSCBadChambers(int nch, const std::vector<int>& ch) : numberOfBadChambers(nch), chambers(ch){};
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 
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 
36  return startChamberIndexInEndcap(ie, is, ir) + ic - 1; // -1 so start index _is_ ic=1
37  }
38 
39 private:
41  std::vector<int> chambers;
42 
44 };
45 
46 #endif
CSCBadChambers::CSCBadChambers
CSCBadChambers(int nch, const std::vector< int > &ch)
Definition: CSCBadChambers.h:14
CSCBadChambers::container
std::vector< int > container() const
Return the container of bad chambers.
Definition: CSCBadChambers.h:21
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
CSCBadChambers::IndexType
uint16_t IndexType
Definition: CSCBadChambers.h:11
CSCBadChambers
Definition: CSCBadChambers.h:9
CSCBadChambers::chambers
std::vector< int > chambers
Definition: CSCBadChambers.h:41
CSCBadChambers::numberOfBadChambers
int numberOfBadChambers
Definition: CSCBadChambers.h:40
CSCBadChambers::CSCBadChambers
CSCBadChambers()
Definition: CSCBadChambers.h:13
CSCDetId.h
CSCBadChambers::chamberIndex
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
Definition: CSCBadChambers.h:35
CSCBadChambers::numberOfChambers
int numberOfChambers() const
How many bad chambers are there>
Definition: CSCBadChambers.h:18
CSCBadChambers::isInBadChamber
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index 'ichamber' flagged as bad?
Definition: CSCBadChambers.cc:4
CSCBadChambers::startChamberIndexInEndcap
IndexType startChamberIndexInEndcap(IndexType ie, IndexType is, IndexType ir) const
Definition: CSCBadChambers.h:29
CSCDetId
Definition: CSCDetId.h:26
createfilelist.int
int
Definition: createfilelist.py:10
Serializable.h
std
Definition: JetResolutionObject.h:76
CSCBadChambers::~CSCBadChambers
~CSCBadChambers()
Definition: CSCBadChambers.h:15