#include <CSCBadChambers.h>
Public Member Functions | |
std::vector< int > | container () const |
Return the container of bad chambers. | |
CSCBadChambers () | |
CSCBadChambers (int nch, std::vector< int > ch) | |
bool | isInBadChamber (const CSCDetId &id) const |
Is the gven chamber flagged as bad? | |
int | numberOfChambers () const |
How many bad chambers are there> | |
~CSCBadChambers () | |
Private Attributes | |
std::vector< int > | chambers |
int | numberOfBadChambers |
Definition at line 8 of file CSCBadChambers.h.
CSCBadChambers::CSCBadChambers | ( | ) | [inline] |
Definition at line 10 of file CSCBadChambers.h.
: numberOfBadChambers( 0 ), chambers( std::vector<int>() ) {};
CSCBadChambers::CSCBadChambers | ( | int | nch, |
std::vector< int > | ch | ||
) | [inline] |
Definition at line 11 of file CSCBadChambers.h.
: numberOfBadChambers( nch ), chambers( ch ) {};
CSCBadChambers::~CSCBadChambers | ( | ) | [inline] |
Definition at line 12 of file CSCBadChambers.h.
{};
std::vector<int> CSCBadChambers::container | ( | ) | const [inline] |
Return the container of bad chambers.
Definition at line 18 of file CSCBadChambers.h.
References chambers.
{ return chambers; }
bool CSCBadChambers::isInBadChamber | ( | const CSCDetId & | id | ) | const |
Is the gven chamber flagged as bad?
Definition at line 5 of file CSCBadChambers.cc.
References CSCIndexer::chamberIndex(), chambers, Reference_intrackfit_cff::endcap, spr::find(), numberOfChambers(), and relativeConstraints::station.
Referenced by MuonAssociatorByHits::associateSimToRecoIndices(), CSCTriggerPrimitivesBuilder::build(), and MuonDetIdAssociator::getValidDetIds().
{ if ( numberOfChambers() == 0 ) return false; short int iri = id.ring(); //@@ Beware future ME11 changes if ( iri == 4 ) iri = 1; // reset ME1A to ME11 CSCIndexer indexer; int ilin = indexer.chamberIndex( id.endcap(), id.station(), iri, id.chamber() ); std::vector<int>::const_iterator badbegin = chambers.begin(); std::vector<int>::const_iterator badend = chambers.end(); std::vector<int>::const_iterator it = std::find( badbegin, badend, ilin ); if ( it != badend ) return true; // id is in the list of bad chambers else return false; }
int CSCBadChambers::numberOfChambers | ( | ) | const [inline] |
How many bad chambers are there>
Definition at line 15 of file CSCBadChambers.h.
References numberOfBadChambers.
Referenced by isInBadChamber().
{ return numberOfBadChambers; }
std::vector<int> CSCBadChambers::chambers [private] |
Definition at line 25 of file CSCBadChambers.h.
Referenced by container(), and isInBadChamber().
int CSCBadChambers::numberOfBadChambers [private] |
Definition at line 24 of file CSCBadChambers.h.
Referenced by numberOfChambers().