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 }
int slink(const CSCDetId &) const
slink id for given DetId
U second(std::pair< T, U > const &p)
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to key.
Definition: CSCChamberMap.cc:8
int dbIndex(const CSCDetId &) const
int crate(const CSCDetId &) const
Interface required use in digi-to-raw.
int dmb(const CSCDetId &) const
dmb id for given DetId
int ddu(const CSCDetId &) const
ddu id for given DetId
int dduSlot(const CSCDetId &) const
ddu slot for given DetId
int dduInput(const CSCDetId &) const
ddu input for given DetId