CMS 3D CMS Logo

CSCChamberMap.cc
Go to the documentation of this file.
3 
5 
7 
8 const CSCMapItem::MapItem& CSCChamberMap::item(int key) const { return (ch_map.find(key))->second; }
9 
10 int CSCChamberMap::dbIndex(const CSCDetId& id) const {
11  int ie = id.endcap();
12  int is = id.station();
13  int ir = id.ring();
14  int ic = id.chamber();
15  // int il = id.layer(); // zero for parent chamber
16 
17  // ME1a must be reset to ME11
18  if ((is == 1) && (ir == 4))
19  ir = 1;
20 
21  return ie * 100000 + is * 10000 + ir * 1000 + ic * 10;
22 }
23 
24 int CSCChamberMap::crate(const CSCDetId& id) const {
25  int igor = dbIndex(id);
26  CSCMapItem::MapItem mitem = this->item(igor);
27  return mitem.crateid;
28 }
29 
30 int CSCChamberMap::dmb(const CSCDetId& id) const {
31  int igor = dbIndex(id);
32  CSCMapItem::MapItem mitem = this->item(igor);
33  return mitem.dmb;
34 }
35 
36 int CSCChamberMap::ddu(const CSCDetId& id) const {
37  int igor = dbIndex(id);
38  CSCMapItem::MapItem mitem = this->item(igor);
39  return mitem.ddu;
40 }
41 
42 int CSCChamberMap::slink(const CSCDetId& id) const {
43  int igor = dbIndex(id);
44  CSCMapItem::MapItem mitem = this->item(igor);
45  return mitem.slink;
46 }
47 
48 int CSCChamberMap::dduSlot(const CSCDetId& id) const {
49  int igor = dbIndex(id);
50  CSCMapItem::MapItem mitem = this->item(igor);
51  return mitem.ddu_slot;
52 }
53 
54 int CSCChamberMap::dduInput(const CSCDetId& id) const {
55  int igor = dbIndex(id);
56  CSCMapItem::MapItem mitem = this->item(igor);
57  return mitem.ddu_input;
58 }
CSCMapItem::MapItem::ddu_input
int ddu_input
Definition: CSCMapItem.h:33
CSCChamberMap::dduInput
int dduInput(const CSCDetId &) const
ddu input for given DetId
Definition: CSCChamberMap.cc:54
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
CSCMapItem::MapItem::crateid
int crateid
Definition: CSCMapItem.h:27
CSCChamberMap::ddu
int ddu(const CSCDetId &) const
ddu id for given DetId
Definition: CSCChamberMap.cc:36
CSCChamberMap::dmb
int dmb(const CSCDetId &) const
dmb id for given DetId
Definition: CSCChamberMap.cc:30
CSCMapItem::MapItem::slink
int slink
Definition: CSCMapItem.h:34
CSCDetId.h
CSCChamberMap::dduSlot
int dduSlot(const CSCDetId &) const
ddu slot for given DetId
Definition: CSCChamberMap.cc:48
CSCMapItem::MapItem::dmb
int dmb
Definition: CSCMapItem.h:30
CSCChamberMap::~CSCChamberMap
~CSCChamberMap()
Definition: CSCChamberMap.cc:6
CSCChamberMap::dbIndex
int dbIndex(const CSCDetId &) const
Definition: CSCChamberMap.cc:10
CSCMapItem::MapItem
Definition: CSCMapItem.h:13
CSCMapItem::MapItem::ddu
int ddu
Definition: CSCMapItem.h:32
CSCChamberMap::slink
int slink(const CSCDetId &) const
slink id for given DetId
Definition: CSCChamberMap.cc:42
CSCChamberMap.h
CSCDetId
Definition: CSCDetId.h:26
CSCChamberMap::ch_map
CSCMap ch_map
Definition: CSCChamberMap.h:41
CSCChamberMap::CSCChamberMap
CSCChamberMap()
Definition: CSCChamberMap.cc:4
CSCMapItem::MapItem::ddu_slot
int ddu_slot
Definition: CSCMapItem.h:36
CSCChamberMap::crate
int crate(const CSCDetId &) const
Interface required use in digi-to-raw.
Definition: CSCChamberMap.cc:24
crabWrapper.key
key
Definition: crabWrapper.py:19
CSCChamberMap::item
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8