CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCChamberMap.cc
Go to the documentation of this file.
3 
5 
7 
9  return (ch_map.find(key))->second;
10 }
11 
12 int CSCChamberMap::dbIndex(const CSCDetId& id ) const {
13 
14  int ie = id.endcap();
15  int is = id.station();
16  int ir = id.ring();
17  int ic = id.chamber();
18  // int il = id.layer(); // zero for parent chamber
19 
20  // ME1a must be reset to ME11
21  if ( ( is == 1 ) && ( ir == 4 ) ) ir=1;
22 
23  return ie*100000 + is*10000 + ir*1000 + ic*10;
24 }
25 
26 int CSCChamberMap::crate( const CSCDetId& id ) const {
27  int igor = dbIndex( id );
28  CSCMapItem::MapItem mitem = this->item( igor );
29  return mitem.crateid;
30 }
31 
32 int CSCChamberMap::dmb( const CSCDetId& id ) const {
33  int igor = dbIndex( id );
34  CSCMapItem::MapItem mitem = this->item( igor );
35  return mitem.dmb;
36 }
37 
38 int CSCChamberMap::ddu( const CSCDetId& id ) const {
39  int igor = dbIndex( id );
40  CSCMapItem::MapItem mitem = this->item( igor );
41  return mitem.ddu;
42 }
43 
44 int CSCChamberMap::slink( const CSCDetId& id ) const {
45  int igor = dbIndex( id );
46  CSCMapItem::MapItem mitem = this->item( igor );
47  return mitem.slink;
48 }
49 
50 int CSCChamberMap::dduSlot( const CSCDetId& id ) const {
51  int igor = dbIndex( id );
52  CSCMapItem::MapItem mitem = this->item( igor );
53  return mitem.ddu_slot;
54 }
55 
56 int CSCChamberMap::dduInput( const CSCDetId& id ) const {
57  int igor = dbIndex( id );
58  CSCMapItem::MapItem mitem = this->item( igor );
59  return mitem.ddu_input;
60 }
61 
int ddu(const CSCDetId &) const
ddu id for given DetId
int dmb(const CSCDetId &) const
dmb 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 slink(const CSCDetId &) const
slink id for given DetId
int dduInput(const CSCDetId &) const
ddu input for given DetId
int dbIndex(const CSCDetId &) const
int crate(const CSCDetId &) const
Interface required use in digi-to-raw.
int dduSlot(const CSCDetId &) const
ddu slot for given DetId
list key
Definition: combine.py:13