Main Page
Namespaces
Classes
Package Documentation
GIT Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CondFormats
CSCObjects
interface
CSCBadChambers.h
Go to the documentation of this file.
1
#ifndef CSCBadChambers_h
2
#define CSCBadChambers_h
3
4
#include "
CondFormats/Serialization/interface/Serializable.h
"
5
6
#include <
DataFormats/MuonDetId/interface/CSCDetId.h
>
7
#include <vector>
8
9
class
CSCBadChambers
{
10
public
:
11
typedef
uint16_t
IndexType
;
12
13
CSCBadChambers
() :
numberOfBadChambers
( 0 ),
chambers
( std::vector<int>() ) {};
14
CSCBadChambers
(
int
nch,
const
std::vector<int>& ch ) :
numberOfBadChambers
( nch ),
chambers
( ch ) {};
15
~CSCBadChambers
(){};
16
18
int
numberOfChambers
()
const
{
return
numberOfBadChambers
; }
19
21
std::vector<int>
container
()
const
{
return
chambers
; }
22
24
bool
isInBadChamber
(
IndexType
ichamber )
const
;
25
27
bool
isInBadChamber
(
const
CSCDetId
&
id
)
const
;
28
29
IndexType
startChamberIndexInEndcap
(
IndexType
ie,
IndexType
is,
IndexType
ir)
const
30
{
31
const
IndexType
nschin[32] =
32
{ 1,37,73,1, 109,127,0,0, 163,181,0,0, 217,469,0,0,
33
235,271,307,235, 343,361,0,0, 397,415,0,0, 451,505,0,0 };
34
return
nschin[(ie - 1)*16 + (is - 1)*4 + ir - 1];
35
}
36
37
IndexType
chamberIndex
(
IndexType
ie,
IndexType
is,
IndexType
ir,
IndexType
ic)
const
38
{
39
return
startChamberIndexInEndcap
(ie, is, ir) + ic - 1;
// -1 so start index _is_ ic=1
40
}
41
42
private
:
43
int
numberOfBadChambers
;
44
std::vector<int>
chambers
;
45
46
COND_SERIALIZABLE
;
47
};
48
49
#endif
CSCBadChambers::startChamberIndexInEndcap
IndexType startChamberIndexInEndcap(IndexType ie, IndexType is, IndexType ir) const
Definition:
CSCBadChambers.h:29
CSCBadChambers::COND_SERIALIZABLE
COND_SERIALIZABLE
Definition:
CSCBadChambers.h:46
CSCDetId.h
CSCDetId
Definition:
CSCDetId.h:27
CSCBadChambers::chambers
std::vector< int > chambers
Definition:
CSCBadChambers.h:44
CSCBadChambers::CSCBadChambers
CSCBadChambers()
Definition:
CSCBadChambers.h:13
CSCBadChambers::CSCBadChambers
CSCBadChambers(int nch, const std::vector< int > &ch)
Definition:
CSCBadChambers.h:14
CSCBadChambers::isInBadChamber
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index 'ichamber' flagged as bad?
Definition:
CSCBadChambers.cc:4
CSCBadChambers::~CSCBadChambers
~CSCBadChambers()
Definition:
CSCBadChambers.h:15
CSCBadChambers::IndexType
uint16_t IndexType
Definition:
CSCBadChambers.h:11
CSCBadChambers::numberOfBadChambers
int numberOfBadChambers
Definition:
CSCBadChambers.h:43
CSCBadChambers::chamberIndex
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
Definition:
CSCBadChambers.h:37
CSCBadChambers::container
std::vector< int > container() const
Return the container of bad chambers.
Definition:
CSCBadChambers.h:21
CSCBadChambers
Definition:
CSCBadChambers.h:9
Serializable.h
CSCBadChambers::numberOfChambers
int numberOfChambers() const
How many bad chambers are there>
Definition:
CSCBadChambers.h:18
Generated for CMSSW Reference Manual by
1.8.5