#include <CSCBadChambers.h>
Public Types | |
typedef uint16_t | IndexType |
Public Member Functions | |
IndexType | chamberIndex (IndexType ie, IndexType is, IndexType ir, IndexType ic) const |
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 chamber with CSCDetId 'id' flagged as bad? | |
bool | isInBadChamber (IndexType ichamber) const |
Is the chamber with index 'ichamber' flagged as bad? | |
int | numberOfChambers () const |
How many bad chambers are there> | |
IndexType | startChamberIndexInEndcap (IndexType ie, IndexType is, IndexType ir) const |
~CSCBadChambers () | |
Private Attributes | |
std::vector< int > | chambers |
int | numberOfBadChambers |
Definition at line 7 of file CSCBadChambers.h.
typedef uint16_t CSCBadChambers::IndexType |
Definition at line 9 of file CSCBadChambers.h.
CSCBadChambers::CSCBadChambers | ( | ) | [inline] |
Definition at line 11 of file CSCBadChambers.h.
: numberOfBadChambers( 0 ), chambers( std::vector<int>() ) {};
CSCBadChambers::CSCBadChambers | ( | int | nch, |
std::vector< int > | ch | ||
) | [inline] |
Definition at line 12 of file CSCBadChambers.h.
: numberOfBadChambers( nch ), chambers( ch ) {};
CSCBadChambers::~CSCBadChambers | ( | ) | [inline] |
Definition at line 13 of file CSCBadChambers.h.
{};
IndexType CSCBadChambers::chamberIndex | ( | IndexType | ie, |
IndexType | is, | ||
IndexType | ir, | ||
IndexType | ic | ||
) | const [inline] |
Definition at line 35 of file CSCBadChambers.h.
References startChamberIndexInEndcap().
Referenced by isInBadChamber().
{ return startChamberIndexInEndcap(ie, is, ir) + ic - 1; // -1 so start index _is_ ic=1 }
std::vector<int> CSCBadChambers::container | ( | ) | const [inline] |
Return the container of bad chambers.
Definition at line 19 of file CSCBadChambers.h.
References chambers.
{ return chambers; }
bool CSCBadChambers::isInBadChamber | ( | const CSCDetId & | id | ) | const |
Is the chamber with CSCDetId 'id' flagged as bad?
Definition at line 15 of file CSCBadChambers.cc.
References chamberIndex(), Reference_intrackfit_cff::endcap, isInBadChamber(), numberOfChambers(), relativeConstraints::ring, and relativeConstraints::station.
{ if ( numberOfChambers() == 0 ) return false; return isInBadChamber( chamberIndex( id.endcap(), id.station(), id.ring(), id.chamber() ) ); }
bool CSCBadChambers::isInBadChamber | ( | IndexType | ichamber | ) | const |
Is the chamber with index 'ichamber' flagged as bad?
Definition at line 4 of file CSCBadChambers.cc.
References chambers, spr::find(), and numberOfChambers().
Referenced by MuonAssociatorByHits::associateSimToRecoIndices(), CSCTriggerPrimitivesBuilder::build(), MuonDetIdAssociator::getValidDetIds(), and isInBadChamber().
{ if ( numberOfChambers() == 0 ) return false; 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, ichamber ); if ( it != badend ) return true; // ichamber is in the list of bad chambers else return false; }
int CSCBadChambers::numberOfChambers | ( | ) | const [inline] |
How many bad chambers are there>
Definition at line 16 of file CSCBadChambers.h.
References numberOfBadChambers.
Referenced by isInBadChamber().
{ return numberOfBadChambers; }
IndexType CSCBadChambers::startChamberIndexInEndcap | ( | IndexType | ie, |
IndexType | is, | ||
IndexType | ir | ||
) | const [inline] |
Definition at line 27 of file CSCBadChambers.h.
Referenced by chamberIndex().
{ const IndexType nschin[32] = { 1,37,73,1, 109,127,0,0, 163,181,0,0, 217,469,0,0, 235,271,307,235, 343,361,0,0, 397,415,0,0, 451,505,0,0 }; return nschin[(ie - 1)*16 + (is - 1)*4 + ir - 1]; }
std::vector<int> CSCBadChambers::chambers [private] |
Definition at line 42 of file CSCBadChambers.h.
Referenced by container(), and isInBadChamber().
int CSCBadChambers::numberOfBadChambers [private] |
Definition at line 41 of file CSCBadChambers.h.
Referenced by numberOfChambers().