00001 #include <CondFormats/CSCObjects/interface/CSCCrateMap.h> 00002 00003 CSCCrateMap::CSCCrateMap(){} 00004 00005 CSCCrateMap::~CSCCrateMap(){} 00006 00007 const CSCMapItem::MapItem& CSCCrateMap::item( int key ) const { 00008 return (crate_map.find(key))->second; 00009 } 00010 00011 CSCDetId CSCCrateMap::detId( int vme, int dmb, int cfeb, int layer ) const { 00012 int cscid = dmb; 00013 if ( dmb >= 6 ) --cscid; 00014 int key = vme*10 + cscid; 00015 const CSCMapItem::MapItem& mitem = this->item( key ); 00016 int ie = mitem.endcap; 00017 int is = mitem.station; 00018 int ir = mitem.ring; 00019 int ic = mitem.chamber; 00020 00021 // Now sort out ME1a from ME11-combined 00022 // cfeb =0-3 for ME1b, cfeb=4 for ME1a 00023 if ( is == 1 && ir == 1 && cfeb == 4 ) { 00024 // This is ME1a region 00025 ir = 4; // reset from 1 to 4 which flags ME1a 00026 } 00027 return CSCDetId( ie, is, ir, ic, layer ); 00028 }