CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCBadChambers.h
Go to the documentation of this file.
1 #ifndef CSCBadChambers_h
2 #define CSCBadChambers_h
3 
5 #include <vector>
6 
8  public:
9  typedef uint16_t IndexType;
10 
11  CSCBadChambers() : numberOfBadChambers( 0 ), chambers( std::vector<int>() ) {};
12  CSCBadChambers(int nch, std::vector<int> ch ) : numberOfBadChambers( nch ), chambers( ch ) {};
14 
16  int numberOfChambers() const { return numberOfBadChambers; }
17 
19  std::vector<int> container() const { return chambers; }
20 
22  bool isInBadChamber( IndexType ichamber ) const;
23 
25  bool isInBadChamber( const CSCDetId& id ) const;
26 
28  {
29  const IndexType nschin[32] =
30  { 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  {
37  return startChamberIndexInEndcap(ie, is, ir) + ic - 1; // -1 so start index _is_ ic=1
38  }
39 
40  private:
42  std::vector<int> chambers;
43 };
44 
45 #endif
IndexType startChamberIndexInEndcap(IndexType ie, IndexType is, IndexType ir) const
CSCBadChambers(int nch, std::vector< int > ch)
std::vector< int > chambers
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index &#39;ichamber&#39; flagged as bad?
uint16_t IndexType
Definition: CSCBadChambers.h:9
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
std::vector< int > container() const
Return the container of bad chambers.
int numberOfChambers() const
How many bad chambers are there&gt;