Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:55

0001 #include "CondFormats/CSCObjects/interface/CSCBadChambers.h"
0002 #include <algorithm>
0003 
0004 bool CSCBadChambers::isInBadChamber(IndexType ichamber) const {
0005   if (numberOfChambers() == 0)
0006     return false;
0007 
0008   std::vector<int>::const_iterator badbegin = chambers.begin();
0009   std::vector<int>::const_iterator badend = chambers.end();
0010   std::vector<int>::const_iterator it = std::find(badbegin, badend, ichamber);
0011   if (it != badend)
0012     return true;  // ichamber is in the list of bad chambers
0013   else
0014     return false;
0015 }
0016 
0017 bool CSCBadChambers::isInBadChamber(const CSCDetId& id) const {
0018   if (numberOfChambers() == 0)
0019     return false;
0020 
0021   return isInBadChamber(chamberIndex(id.endcap(), id.station(), id.ring(), id.chamber()));
0022 }