Go to the documentation of this file.00001 #include "CondFormats/CSCObjects/interface/CSCBadChambers.h"
00002 #include "DataFormats/MuonDetId/interface/CSCIndexer.h"
00003 #include <algorithm>
00004
00005 bool CSCBadChambers::isInBadChamber( const CSCDetId& id ) const {
00006
00007 if ( numberOfChambers() == 0 ) return false;
00008
00009 short int iri = id.ring();
00010
00011 if ( iri == 4 ) iri = 1;
00012 CSCIndexer indexer;
00013 int ilin = indexer.chamberIndex( id.endcap(), id.station(), iri, id.chamber() );
00014 std::vector<int>::const_iterator badbegin = chambers.begin();
00015 std::vector<int>::const_iterator badend = chambers.end();
00016 std::vector<int>::const_iterator it = std::find( badbegin, badend, ilin );
00017 if ( it != badend ) return true;
00018 else return false;
00019 }
00020