Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:55

0001 #include <CondFormats/CSCObjects/interface/CSCCrateMap.h>
0002 
0003 CSCCrateMap::CSCCrateMap() {}
0004 
0005 CSCCrateMap::~CSCCrateMap() {}
0006 
0007 const CSCMapItem::MapItem& CSCCrateMap::item(int key) const { return (crate_map.find(key))->second; }
0008 
0009 CSCDetId CSCCrateMap::detId(int vme, int dmb, int cfeb, int layer) const {
0010   int cscid = dmb;
0011   if (dmb >= 6)
0012     --cscid;
0013   int key = vme * 10 + cscid;
0014   const CSCMapItem::MapItem& mitem = this->item(key);
0015   int ie = mitem.endcap;
0016   int is = mitem.station;
0017   int ir = mitem.ring;
0018   int ic = mitem.chamber;
0019 
0020   // Now sort out ME1a from ME11-combined
0021   // cfeb =0-3 for ME1b, cfeb=4 for ME1a (pre-LS1) cfeb=4-6 for ME1a (post-LS1)
0022   if (is == 1 && ir == 1 && cfeb >= 4 && cfeb <= 6) {
0023     // This is ME1a region
0024     ir = 4;  // reset from 1 to 4 which flags ME1a
0025   }
0026   return CSCDetId(ie, is, ir, ic, layer);
0027 }