CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CSCBadChambers Class Reference

#include <CSCBadChambers.h>

Public Member Functions

std::vector< int > container () const
 Return the container of bad chambers. More...
 
 CSCBadChambers ()
 
 CSCBadChambers (int nch, std::vector< int > ch)
 
bool isInBadChamber (const CSCDetId &id) const
 Is the gven chamber flagged as bad? More...
 
int numberOfChambers () const
 How many bad chambers are there> More...
 
 ~CSCBadChambers ()
 

Private Attributes

std::vector< int > chambers
 
int numberOfBadChambers
 

Detailed Description

Definition at line 8 of file CSCBadChambers.h.

Constructor & Destructor Documentation

CSCBadChambers::CSCBadChambers ( )
inline

Definition at line 10 of file CSCBadChambers.h.

10 : numberOfBadChambers( 0 ), chambers( std::vector<int>() ) {};
std::vector< int > chambers
CSCBadChambers::CSCBadChambers ( int  nch,
std::vector< int >  ch 
)
inline

Definition at line 11 of file CSCBadChambers.h.

11 : numberOfBadChambers( nch ), chambers( ch ) {};
std::vector< int > chambers
CSCBadChambers::~CSCBadChambers ( )
inline

Definition at line 12 of file CSCBadChambers.h.

12 {};

Member Function Documentation

std::vector<int> CSCBadChambers::container ( ) const
inline

Return the container of bad chambers.

Definition at line 18 of file CSCBadChambers.h.

References chambers.

18 { return chambers; }
std::vector< int > 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().

5  {
6 
7  if ( numberOfChambers() == 0 ) return false;
8 
9  short int iri = id.ring();
10  //@@ Beware future ME11 changes
11  if ( iri == 4 ) iri = 1; // reset ME1A to ME11
12  CSCIndexer indexer;
13  int ilin = indexer.chamberIndex( id.endcap(), id.station(), iri, id.chamber() );
14  std::vector<int>::const_iterator badbegin = chambers.begin();
15  std::vector<int>::const_iterator badend = chambers.end();
16  std::vector<int>::const_iterator it = std::find( badbegin, badend, ilin );
17  if ( it != badend ) return true; // id is in the list of bad chambers
18  else return false;
19 }
IndexType chamberIndex(const CSCDetId &id) const
Definition: CSCIndexer.h:65
std::vector< int > chambers
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
int numberOfChambers() const
How many bad chambers are there&gt;
int CSCBadChambers::numberOfChambers ( ) const
inline

How many bad chambers are there>

Definition at line 15 of file CSCBadChambers.h.

References numberOfBadChambers.

Referenced by isInBadChamber().

15 { return numberOfBadChambers; }

Member Data Documentation

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().