Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:22

0001 #include "CalibMuon/CSCCalibration/interface/CSCChannelMapperPostls1.h"
0002 
0003 int CSCChannelMapperPostls1::rawStripChannel(const CSCDetId &id, int igeo) const {
0004   // Translate a geometry-oriented strip channel in range 1-80, igeo,
0005   // into corresponding raw channel.
0006 
0007   int iraw = igeo;
0008 
0009   bool zplus = (id.endcap() == 1);
0010 
0011   bool me1a = (id.station() == 1) && (id.ring() == 4);
0012   bool me1b = (id.station() == 1) && (id.ring() == 1);
0013 
0014   if (me1a && zplus) {
0015     iraw = 49 - iraw;
0016   }  // 1-48 -> 48-1
0017   if (me1b && !zplus) {
0018     iraw = 65 - iraw;
0019   }  // 1-64 -> 64-1
0020 
0021   return iraw;
0022 }
0023 
0024 int CSCChannelMapperPostls1::geomStripChannel(const CSCDetId &id, int iraw) const {
0025   // Translate a raw strip channel in range 1-80, iraw,  into
0026   // corresponding geometry-oriented channel in which increasing
0027   // channel number <-> strip number increasing with +ve local x.
0028 
0029   int igeo = iraw;
0030 
0031   bool zplus = (id.endcap() == 1);
0032   bool me1a = (id.station() == 1) && (id.ring() == 4);
0033   bool me1b = (id.station() == 1) && (id.ring() == 1);
0034 
0035   if (me1a && zplus) {
0036     igeo = 49 - igeo;
0037   }  // 1-48 -> 48-1
0038   if (me1b && !zplus) {
0039     igeo = 65 - igeo;
0040   }  // 1-64 -> 64-1
0041 
0042   return igeo;
0043 }
0044 
0045 int CSCChannelMapperPostls1::channelFromStrip(const CSCDetId &id, int strip) const {
0046   // This just returns the electronics channel label to which a given strip is
0047   // connected In all chambers (including upgraded ME1A) this is just a direct
0048   // 1-1 correspondence.
0049   int ichan = strip;
0050   return ichan;
0051 }
0052 
0053 CSCDetId CSCChannelMapperPostls1::rawCSCDetId(const CSCDetId &id) const {
0054   // Return the effective online CSCDetId for given offline CSCDetId
0055   // That means the same one (for upgraded ME1A)
0056   CSCDetId idraw(id);
0057   return idraw;
0058 }