Go to the documentation of this file.00001 #ifndef CSCBadChambers_h
00002 #define CSCBadChambers_h
00003
00004 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
00005 #include <vector>
00006
00007 class CSCBadChambers{
00008 public:
00009 typedef uint16_t IndexType;
00010
00011 CSCBadChambers() : numberOfBadChambers( 0 ), chambers( std::vector<int>() ) {};
00012 CSCBadChambers(int nch, std::vector<int> ch ) : numberOfBadChambers( nch ), chambers( ch ) {};
00013 ~CSCBadChambers(){};
00014
00016 int numberOfChambers() const { return numberOfBadChambers; }
00017
00019 std::vector<int> container() const { return chambers; }
00020
00022 bool isInBadChamber( IndexType ichamber ) const;
00023
00025 bool isInBadChamber( const CSCDetId& id ) const;
00026
00027 IndexType startChamberIndexInEndcap(IndexType ie, IndexType is, IndexType ir) const
00028 {
00029 const IndexType nschin[32] =
00030 { 1,37,73,1, 109,127,0,0, 163,181,0,0, 217,469,0,0,
00031 235,271,307,235, 343,361,0,0, 397,415,0,0, 451,505,0,0 };
00032 return nschin[(ie - 1)*16 + (is - 1)*4 + ir - 1];
00033 }
00034
00035 IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
00036 {
00037 return startChamberIndexInEndcap(ie, is, ir) + ic - 1;
00038 }
00039
00040 private:
00041 int numberOfBadChambers;
00042 std::vector<int> chambers;
00043 };
00044
00045 #endif