CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCCrateMap.cc
Go to the documentation of this file.
2 
4 
6 
7 const CSCMapItem::MapItem& CSCCrateMap::item(int key) const { return (crate_map.find(key))->second; }
8 
9 CSCDetId CSCCrateMap::detId(int vme, int dmb, int cfeb, int layer) const {
10  int cscid = dmb;
11  if (dmb >= 6)
12  --cscid;
13  int key = vme * 10 + cscid;
14  const CSCMapItem::MapItem& mitem = this->item(key);
15  int ie = mitem.endcap;
16  int is = mitem.station;
17  int ir = mitem.ring;
18  int ic = mitem.chamber;
19 
20  // Now sort out ME1a from ME11-combined
21  // cfeb =0-3 for ME1b, cfeb=4 for ME1a (pre-LS1) cfeb=4-6 for ME1a (post-LS1)
22  if (is == 1 && ir == 1 && cfeb >= 4 && cfeb <= 6) {
23  // This is ME1a region
24  ir = 4; // reset from 1 to 4 which flags ME1a
25  }
26  return CSCDetId(ie, is, ir, ic, layer);
27 }
CSCDetId detId(int vme, int dmb, int cfeb, int layer=0) const
Definition: CSCCrateMap.cc:9
constexpr std::array< uint8_t, layerIndexSize > layer
U second(std::pair< T, U > const &p)
tuple key
prepare the HTCondor submission files and eventually submit them
const CSCMapItem::MapItem & item(int key) const
Accessor for item according to a key.
Definition: CSCCrateMap.cc:7
CSCMap crate_map
Definition: CSCCrateMap.h:25