CMS 3D CMS Logo

CSCBadChambers.cc
Go to the documentation of this file.
2 #include <algorithm>
3 
5  if (numberOfChambers() == 0)
6  return false;
7 
8  std::vector<int>::const_iterator badbegin = chambers.begin();
9  std::vector<int>::const_iterator badend = chambers.end();
10  std::vector<int>::const_iterator it = std::find(badbegin, badend, ichamber);
11  if (it != badend)
12  return true; // ichamber is in the list of bad chambers
13  else
14  return false;
15 }
16 
18  if (numberOfChambers() == 0)
19  return false;
20 
21  return isInBadChamber(chamberIndex(id.endcap(), id.station(), id.ring(), id.chamber()));
22 }
std::vector< int > chambers
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index &#39;ichamber&#39; flagged as bad?
uint16_t IndexType
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
int numberOfChambers() const
How many bad chambers are there>