CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/CalibMuon/CSCCalibration/src/CSCChannelMapperPostls1.cc

Go to the documentation of this file.
00001 #include "CalibMuon/CSCCalibration/interface/CSCChannelMapperPostls1.h"
00002 
00003 int CSCChannelMapperPostls1::rawStripChannel( const CSCDetId& id, int igeo ) const {
00004 
00005   // Translate a geometry-oriented strip channel in range 1-80, igeo,
00006   // into corresponding raw channel.
00007 
00008   int iraw = igeo;
00009 
00010   bool zplus = (id.endcap()==1);
00011 
00012   bool me1a = (id.station()==1) && (id.ring()==4);
00013   bool me1b = (id.station()==1) && (id.ring()==1);
00014 
00015   if ( me1a && zplus ) { iraw = 49 - iraw; } // 1-48 -> 48-1
00016   if ( me1b && !zplus) { iraw = 65 - iraw; }  // 1-64 -> 64-1
00017 
00018   return iraw;
00019 }
00020 
00021 
00022 int CSCChannelMapperPostls1::geomStripChannel( const CSCDetId& id, int iraw ) const {
00023   // Translate a raw strip channel in range 1-80, iraw,  into
00024   // corresponding geometry-oriented channel in which increasing
00025   // channel number <-> strip number increasing with +ve local x.
00026 
00027   int igeo = iraw;
00028 
00029   bool zplus = (id.endcap()==1);
00030   bool me1a = (id.station()==1) && (id.ring()==4);
00031   bool me1b = (id.station()==1) && (id.ring()==1);
00032 
00033   if ( me1a && zplus ) { igeo = 49 - igeo; } // 1-48 -> 48-1
00034   if ( me1b && !zplus) { igeo = 65 - igeo; }  // 1-64 -> 64-1
00035 
00036   return igeo;
00037 }
00038 
00039 int CSCChannelMapperPostls1::channelFromStrip( const CSCDetId& id, int strip ) const {
00040   // This just returns the electronics channel label to which a given strip is connected
00041   // In all chambers (including upgraded ME1A) this is just a direct 1-1 correspondence.
00042   int ichan = strip;
00043   return ichan;
00044 }
00045 
00046 CSCDetId CSCChannelMapperPostls1::rawCSCDetId( const CSCDetId& id ) const {
00047   // Return the effective online CSCDetId for given offline CSCDetId
00048   // That means the same one (for upgraded ME1A)
00049   CSCDetId idraw( id );
00050   return idraw;
00051 }