Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:35

0001 #ifndef MuonDetId_CSCIndexerOldPostls1_h
0002 #define MuonDetId_CSCIndexerOldPostls1_h
0003 
0004 /** \class CSCIndexerOldPostls1
0005  * Creates a linear index for various sublevels of the endcap muon CSC system.
0006  *
0007  * It supplies a linear index for:
0008  * 1. Each chamber of the CSC system: range 1-468 (CSC system as installed 2008)
0009  * 469-540 for ME42 <br>
0010  * 2. Each layer of the CSC system: range 1-2808 (CSCs 2008) 2809-3240 for ME42
0011  * <br>
0012  * 3. Each strip channel of the CSC system: range 1-217728 (CSCs 2008)
0013  * 217729-252288 for ME42 <br>
0014  * 4. Each Buckeye chip (1 for each layer in each CFEB)of the CSC system: range
0015  * 1-13608 (CSCs 2008) 13609-15768 for ME42 <br>
0016  * 5. Each Gas Gain Sector (1 for each [CFEB*HV segment] combination in each
0017  * layer): range 1-45144 (CSCs 2008) 45145-55944 for ME42 <br>
0018  * 6. Extended for unganged ME1a, appended to the standard list: only in the
0019  * strip list 252289-273024 (i.e. an extra 2 x 36 x 6 x 48 = 20736 channels)
0020  *
0021  * The chamber and layer may be specified by CSCDetId or labels for endcap,
0022  * station, ring, chamber, layer. The strip channel is a value 1-80 (or 64: ME13
0023  * chambers have only 64 channels.) The chip number is a value 1-30 (or 24: ME13
0024  * chambers have only 24 chips.)
0025  *
0026  * The main user interface is the set of functions <br>
0027  *   chamberIndex(.) <br>
0028  *   layerIndex(.) <br>
0029  *   stripChannelIndex(.) <br>
0030  *   chipIndex(.) <br>
0031  * But the other functions are public since they may be useful in contexts other
0032  * than for Conditions Data for which the above functions are intended.
0033  *
0034  * \warning This class is hard-wired for the CSC system at start-up of CMS in
0035  * 2008. with rings ME11, ME12, ME13, ME21, ME22, ME31, ME32, ME41 totalling 234
0036  * chambers per endcap. But ME42 is appended (to permit simulation studies), so
0037  * the chamber order is <br> +z ME11, ME12, ME13, ME21, ME22, ME31, ME32, ME41,
0038  * <br> -z ME11, ME12, ME13, ME21, ME22, ME31, ME32, ME41, <br> +z ME42, -z ME42
0039  * <br>
0040  *
0041  * Further it is extended for hypothetical unganged ME1a strip channels.
0042  * The strip list then appends
0043  * +z ME1a, -z ME1a <br>
0044  *
0045  * \warning This intentionally has "magic numbers galore" which, supposedly, is
0046  * for better performance.
0047  *
0048  * \warning EVERY LABEL COUNTS FROM ONE NOT ZERO.
0049  *
0050  */
0051 
0052 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0053 #include <iosfwd>
0054 #include <tuple>
0055 #include <utility>  // for pair
0056 #include <vector>
0057 
0058 class CSCIndexerOldPostls1 {
0059 public:
0060   typedef uint16_t IndexType;
0061   typedef uint32_t LongIndexType;
0062 
0063   typedef std::tuple<CSCDetId,   // id
0064                      IndexType,  // HV segment
0065                      IndexType   // chip
0066                      >
0067       GasGainTuple;
0068 
0069   static const IndexType MAX_CHAMBER_INDEX = 540;
0070   static const IndexType MAX_LAYER_INDEX = 3240;
0071   static const LongIndexType MAX_STRIP_CHANNEL_INDEX = 273024;
0072   static const IndexType MAX_CHIP_INDEX = 17064;
0073   static const IndexType MAX_GAS_GAIN_INDEX = 57240;
0074 
0075   CSCIndexerOldPostls1(){};
0076   ~CSCIndexerOldPostls1(){};
0077 
0078   /**
0079    * Starting index for first chamber in ring 'ir' of station 'is' in endcap
0080    * 'ie', in range 1-468 (CSCs 2008) or 469-540 (ME42).
0081    *
0082    * WARNING: Considers both ME1a and ME1b to be part of one ME11 chamber
0083    *          (result would be the same for is=1 and ir=1 or 4).
0084    */
0085   IndexType startChamberIndexInEndcap(IndexType ie, IndexType is, IndexType ir) const {
0086     const IndexType nschin[32] = {1,   37,  73,  1,   109, 127, 0, 0, 163, 181, 0, 0, 217, 469, 0, 0,
0087                                   235, 271, 307, 235, 343, 361, 0, 0, 397, 415, 0, 0, 451, 505, 0, 0};
0088     return nschin[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
0089   }
0090 
0091   /**
0092    * Linear index for chamber 'ic' in ring 'ir' of station 'is' in endcap 'ie',
0093    * in range 1-468 (CSCs 2008) or 469-540 (ME42)
0094    *
0095    * WARNING: Considers both ME1a and ME1b to be part of one ME11 chamber
0096    *          (result would be the same for is=1 and ir=1 or 4).
0097    */
0098   IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const {
0099     return startChamberIndexInEndcap(ie, is, ir) + ic - 1;  // -1 so start index _is_ ic=1
0100   }
0101 
0102   /**
0103    * Linear index to label each CSC in CSC system.
0104    * Argument is the CSCDetId of some CSCChamber.
0105    *
0106    * Output is 1-468 (CSCs 2008) 469-540 (with ME42)
0107    *
0108    * WARNING: Considers both ME1a and ME1b to be part of one ME11 chamber
0109    *          (result would be the same for is=1 and ir=1 or 4).
0110    */
0111   IndexType chamberIndex(const CSCDetId &id) const {
0112     return chamberIndex(id.endcap(), id.station(), id.ring(), id.chamber());
0113   }
0114 
0115   /**
0116    * Linear index to label each hardware layer in CSC system.
0117    * Argument is the CSCDetId of some CSCLayer.
0118    *
0119    * Output is 1-2808 (CSCs 2008) 2809-3240 (ME42)
0120    *
0121    * WARNING: Considers both ME1a and ME1b to share layers of single ME11
0122    * chamber (result would be the same for is=1 and ir=1 or 4).
0123    */
0124   IndexType layerIndex(const CSCDetId &id) const {
0125     return layerIndex(id.endcap(), id.station(), id.ring(), id.chamber(), id.layer());
0126   }
0127 
0128   /**
0129    * Linear index for layer 'il' of chamber 'ic' in ring 'ir' of station 'is' in
0130    * endcap 'ie', in range 1-2808 (CSCs 2008) or 2809-3240 (ME42).
0131    *
0132    * WARNING: Considers both ME1a and ME1b to share layers of single ME11
0133    * chamber (result would be the same for is=1 and ir=1 or 4).
0134    */
0135   IndexType layerIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il) const {
0136     return (chamberIndex(ie, is, ir, ic) - 1) * 6 + il;
0137   }
0138 
0139   /**
0140    * How many (physical hardware) rings are there in station is=1, 2, 3, 4 ?
0141    *
0142    * WARNING:
0143    * - ME1 has only 3 physical rings (the hardware) not 4 (virtual ring 4 is
0144    * used offline for ME1a).
0145    * - Includes ME42 so claims 2 rings in station 4.
0146    */
0147   IndexType ringsInStation(IndexType is) const {
0148     const IndexType nrings[5] = {0, 3, 2, 2, 2};  // rings per station
0149     return nrings[is];
0150   }
0151 
0152   /**
0153    * How many offline rings are there in station is=1, 2, 3, 4 ?
0154    *
0155    * WARNING:
0156    * - ME1 has 4 rings in the offline notation (virtual ring 4 is used for
0157    * ME1a).
0158    * - Includes ME42 so claims 2 rings in station 4.
0159    */
0160   IndexType offlineRingsInStation(IndexType is) const {
0161     const IndexType nrings[5] = {0, 4, 2, 2, 2};  // rings per station
0162     return nrings[is];
0163   }
0164 
0165   /**
0166    * How many chambers are there in ring ir of station is?
0167    *
0168    * Works for ME1a (virtual ring 4 of ME1) too.
0169    */
0170   IndexType chambersInRingOfStation(IndexType is, IndexType ir) const {
0171     const IndexType nCinR[16] = {36, 36, 36, 36, 18, 36, 0, 0, 18, 36, 0, 0, 18, 36, 0, 0};  // chambers in ring
0172     return nCinR[(is - 1) * 4 + ir - 1];
0173   }
0174 
0175   /**
0176    * Number of strip channels per layer in a chamber in ring ir of station is.
0177    *
0178    * Station label range 1-4, Ring label range 1-4.
0179    * Works for ME1a input as is=1, ir=4.
0180    *
0181    * WARNING:
0182    * - ME1a channels are considered to be unganged i.e. 48 not the standard 16.
0183    * - ME1b keeps 80 channels for the indexing purposes, however channels 65-80
0184    * are ignored in the unganged case.
0185    */
0186   IndexType stripChannelsPerLayer(IndexType is, IndexType ir) const {
0187     const IndexType nSCinC[16] = {80, 80, 64, 48, 80, 80, 0, 0, 80, 80, 0, 0, 80, 80, 0, 0};
0188     return nSCinC[(is - 1) * 4 + ir - 1];
0189   }
0190 
0191   /**
0192    * Linear index for 1st strip channel in ring 'ir' of station 'is' in endcap
0193    * 'ie'.
0194    *
0195    * Endcap label range 1-2, Station label range 1-4, Ring label range 1-3.
0196    *
0197    * WARNING: ME1a channels are  NOT  considered the last 16 of the 80 total in
0198    * each layer of an ME11 chamber!
0199    */
0200   LongIndexType stripChannelStart(IndexType ie, IndexType is, IndexType ir) const {
0201     // These are in the ranges 1-217728 (CSCs 2008), 217729-252288 (ME42), and
0202     // 252289-273024 (unganged ME1a) There are 1-108884 channels per endcap
0203     // (CSCs 2008), 17280 channels per endcap (ME42), and 10368 channels per
0204     // endcap (unganged ME1a) Start of -z channels (CSCs 2008) is 108864 + 1 =
0205     // 108865 Start of +z (ME42) is 217728 + 1                  = 217729 Start
0206     // of -z (ME42) is 217728 + 1 + 17280          = 235009 Start of +z
0207     // (unganged ME1a) is 252288 + 1         = 252289 Start of -z (unganged
0208     // ME1a) is 252288 + 1 + 10368 = 262657
0209     const LongIndexType nStart[32] = {1, 17281,  34561,  252289, 48385, 57025,  0,      0,      74305,  82945,  0,
0210                                       0, 100225, 217729, 0,      0,     108865, 126145, 143425, 262657, 157249, 165889,
0211                                       0, 0,      183169, 191809, 0,     0,      209089, 235009, 0,      0};
0212     return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
0213   }
0214 
0215   /**
0216    * Linear index for strip channel istrip in layer 'il' of chamber 'ic' of ring
0217    * 'ir' in station 'is' of endcap 'ie'.
0218    *
0219    * Output is 1-217728 (CSCs 2008) or 217729-252288 (ME42) or 252289-273024
0220    * (unganged ME1a) WARNING: Supplying ME1a values returns index for unganged
0221    * ME1a channels, not for channels 65-80 of ME11.
0222    *
0223    * WARNING: Use at your own risk! You must input labels within hardware
0224    * ranges. No trapping on out-of-range values!
0225    */
0226   LongIndexType stripChannelIndex(
0227       IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const {
0228     return stripChannelStart(ie, is, ir) + ((ic - 1) * 6 + il - 1) * stripChannelsPerLayer(is, ir) + (istrip - 1);
0229   }
0230 
0231   /**
0232    * Linear index for strip channel 'istrip' in layer labelled by CSCDetId 'id'.
0233    *
0234    * Output is 1-217728 (CSCs 2008) or 217729-252288 (ME42) or 252289-273024
0235    * (unganged ME1a)
0236    *
0237    * WARNING: Use at your own risk! The supplied CSCDetId must be a layer id.
0238    * No trapping on out-of-range values!
0239    */
0240   LongIndexType stripChannelIndex(const CSCDetId &id, IndexType istrip) const {
0241     return stripChannelIndex(id.endcap(), id.station(), id.ring(), id.chamber(), id.layer(), istrip);
0242   }
0243 
0244   /**
0245    * Number of Buckeye chips per layer in a chamber in ring ir of station is.
0246    *
0247    * Station label range 1-4, Ring label range 1-3.
0248    *
0249    * Works for ME1a input as is=1, ir=4
0250    * Considers ME42 as standard 5 chip per layer chambers.
0251    *
0252    * WARNING:
0253    * - ME1a channels are considered to be unganged and have their own 3 chips
0254    * (ME1b has 4 chips).
0255    * - ME1b keeps 5 chips for the indexing purposes, however indices for the
0256    * chip #5 are ignored in the unganged case.
0257    */
0258   IndexType chipsPerLayer(IndexType is, IndexType ir) const {
0259     const IndexType nCinL[16] = {5, 5, 4, 3, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0};
0260     return nCinL[(is - 1) * 4 + ir - 1];
0261   }
0262 
0263   /**
0264    * Linear index for 1st Buckey chip in ring 'ir' of station 'is' in endcap
0265    * 'ie'.
0266    *
0267    * Endcap label range 1-2, Station label range 1-4, Ring label range 1-3.
0268    *
0269    * Works for ME1a input as is=1, ir=4
0270    * WARNING: ME1a channels are the last 3 of the 7 chips total in each layer of
0271    * an ME11 chamber,
0272    */
0273   IndexType chipStart(IndexType ie, IndexType is, IndexType ir) const {
0274     // These are in the ranges 1-13608 (CSCs 2008) and 13609-15768 (ME42) and
0275     // 15769-17064 (ME1a). There are 1-6804 chips per endcap (CSCs 2008) and
0276     // 1080 chips per endcap (ME42) and 648 chips per endcap (ME1a). Start of -z
0277     // channels (CSCs 2008) is 6804 + 1 = 6805 Start of +z (ME42) is 13608 + 1 =
0278     // 13609 Start of -z (ME42) is 13608 + 1 + 1080 = 14689 Start of +z (ME1a)
0279     // is 15768 + 1 = 15769 Start of -z (ME1a) is 15768 + 1 + 648 = 16417
0280     const IndexType nStart[32] = {1,    1081, 2161, 15769, 3025, 3565,  0, 0, 4645,  5185,  0, 0, 6265,  13609, 0, 0,
0281                                   6805, 7885, 8965, 16417, 9829, 10369, 0, 0, 11449, 11989, 0, 0, 13069, 14689, 0, 0};
0282     return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
0283   }
0284 
0285   /**
0286    * Linear index for Buckeye chip 'ichip' in layer 'il' of chamber 'ic' of ring
0287    * 'ir' in station 'is' of endcap 'ie'.
0288    *
0289    * Output is 1-13608 (CSCs 2008) or 13609-15768 (ME42) or 15769-17064 (ME1a).
0290    *
0291    * WARNING: Use at your own risk! You must input labels within hardware
0292    * ranges. No trapping on out-of-range values!
0293    */
0294   IndexType chipIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType ichip) const {
0295     // printf("ME%d/%d/%d/%d layer %d  chip %d chipindex
0296     // %d\n",ie,is,ir,ic,il,ichip,chipStart(ie,is,ir)+( (ic-1)*6 + il - 1
0297     // )*chipsPerLayer(is,ir) + (ichip-1));
0298     return chipStart(ie, is, ir) + ((ic - 1) * 6 + il - 1) * chipsPerLayer(is, ir) + (ichip - 1);
0299   }
0300 
0301   /**
0302    * Linear index for Buckeye chip 'ichip' in layer labelled by CSCDetId 'id'.
0303    *
0304    * Output is 1-13608 (CSCs 2008) or 13609-15768 (ME42) or 15769-17064 (ME1a).
0305    *
0306    * WARNING: Use at your own risk! The supplied CSCDetId must be a layer id.
0307    * No trapping on out-of-range values!
0308    */
0309   IndexType chipIndex(const CSCDetId &id, IndexType ichip) const {
0310     return chipIndex(id.endcap(), id.station(), id.ring(), id.chamber(), id.layer(), ichip);
0311   }
0312 
0313   /**
0314    * Linear index inside of a chamber for Buckeye chip processing strip
0315    * 'istrip'.
0316    *
0317    * Output is 1-5.
0318    *
0319    * WARNING: Use at your own risk! The supplied CSCDetId must be a strip id
0320    * 1-80 ME1/1b strips must be 1-64 ME1/1a strips must be 1-48 No trapping on
0321    * out-of-range values!
0322    */
0323 
0324   IndexType chipIndex(IndexType istrip) const { return (istrip - 1) / 16 + 1; }
0325 
0326   /**
0327    * Number of HV segments per layer in a chamber in ring ir of station is.
0328    *
0329    * Station label range 1-4, Ring label range 1-4.
0330    *
0331    * WARNING: ME1a (ir=4), ME1b(ir=1) and whole ME11 are all assumed to have the
0332    * same single HV segment
0333    */
0334   IndexType hvSegmentsPerLayer(IndexType is, IndexType ir) const {
0335     const IndexType nSinL[16] = {1, 3, 3, 1, 3, 5, 0, 0, 3, 5, 0, 0, 3, 5, 0, 0};
0336     return nSinL[(is - 1) * 4 + ir - 1];
0337   }
0338 
0339   /**
0340    * Number of Gas Gain sectors per layer in a chamber in ring ir of station is.
0341    *
0342    * Station label range 1-4, Ring label range 1-4.
0343    */
0344   IndexType sectorsPerLayer(IndexType is, IndexType ir) const {
0345     return chipsPerLayer(is, ir) * hvSegmentsPerLayer(is, ir);
0346   }
0347 
0348   /**
0349    * Linear index inside of a chamber for HV segment
0350    *
0351    * Output is 1-5.
0352    *
0353    * WARNING: Use at your own risk! The supplied CSCDetId must be chamber
0354    * station, ring, and wire. No trapping on out-of-range values!
0355    */
0356   IndexType hvSegmentIndex(IndexType is, IndexType ir, IndexType iwire) const;
0357 
0358   /**
0359    * Linear index for 1st Gas gain sector in ring 'ir' of station 'is' in endcap
0360    * 'ie'.
0361    *
0362    * Endcap label range 1-2, Station label range 1-4, Ring label range 1-3.
0363    *
0364    * WARNING:
0365    *   current: ME1a channels are the last 1 of the 5 chips total in each layer
0366    * of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
0367    *   upgraded:
0368    */
0369   IndexType sectorStart(IndexType ie, IndexType is, IndexType ir) const {
0370     // There are 36 chambers * 6 layers * 5 CFEB's * 1 HV segment = 1080
0371     // gas-gain sectors in ME1/1 (non-upgraded) There are 36 chambers * 6 layers
0372     // * 3 CFEB's * 1 HV segment = 648 gas-gain sectors in ME1/1a (upgraded)
0373     // There are 36*6*5*3 = 3240 gas-gain sectors in ME1/2
0374     // There are 36*6*4*3 = 2592 gas-gain sectors in ME1/3
0375     // There are 18*6*5*3 = 1620 gas-gain sectors in ME[2-4]/1
0376     // There are 36*6*5*5 = 5400 gas-gain sectors in ME[2-4]/2
0377     // Start of -z channels (CSCs 2008) is 22572 + 1 = 22573
0378     // Start of +z (ME42) is 45144 + 1 = 45145
0379     // Start of -z (ME42) is 45144 + 1 + 5400 = 50545
0380     // Start of +z (ME1a) is 45144 + 1 + 2*5400 = 55945
0381     // Start of -z (ME42) is 45144 + 1 + 2*5400 + 648 = 56593
0382     const IndexType nStart[32] = {1,     1081,  4321,  55945,  // ME+1/1,ME+1/2,ME+1/3,ME+1/a
0383                                   6913,  8533,  0,     0,      // ME+2/1,ME+2/2
0384                                   13933, 15553, 0,     0,      // ME+3/1,ME+3/2
0385                                   20953, 45145, 0,     0,      // ME+4/1,ME+4/2 (note, ME+4/2 index follows ME-4/1...)
0386                                   22573, 23653, 26893, 56593,  // ME-1/1,ME-1/2,ME-1/3,ME+1/a
0387                                   29485, 31105, 0,     0,      // ME-2/1,ME-2/2
0388                                   36505, 38125, 0,     0,      // ME-3/1,ME-3/2
0389                                   43525, 50545, 0,     0};     // ME-4/1,ME-4/2 (note, ME-4/2 index follows ME+4/2...)
0390     return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
0391   }
0392 
0393   /**
0394    * Linear index for Gas gain sector, based on CSCDetId 'id', cathode strip
0395    * 'istrip' and anode wire 'iwire'
0396    *
0397    * Output is 1-45144 (CSCs 2008) and 45145-55944 (ME42) and 55945-57240 (ME1a)
0398    *
0399    * WARNING: Use at your own risk!  You must input labels within hardware
0400    * ranges (e.g., 'id' must correspond to a specific layer 1-6). No trapping on
0401    * out-of-range values!
0402    */
0403   IndexType gasGainIndex(const CSCDetId &id, IndexType istrip, IndexType iwire) const {
0404     return gasGainIndex(id.endcap(),
0405                         id.station(),
0406                         id.ring(),
0407                         id.chamber(),
0408                         id.layer(),
0409                         hvSegmentIndex(id.station(), id.ring(), iwire),
0410                         chipIndex(istrip));
0411   }
0412 
0413   /**
0414    * Linear index for Gas gain sector, based on CSCDetId 'id', the HV segment#
0415    * and the chip#. Note: to allow method overloading, the parameters order is
0416    * reversed comparing to the (id,strip,wire) method
0417    *
0418    * Output is 1-45144 (CSCs 2008) and 45145-55944 (ME42) and 55945-57240 (ME1a)
0419    *
0420    * WARNING: Use at your own risk! You must input labels within hardware
0421    * ranges. No trapping on out-of-range values!
0422    */
0423   IndexType gasGainIndex(IndexType ihvsegment, IndexType ichip, const CSCDetId &id) const {
0424     return gasGainIndex(id.endcap(), id.station(), id.ring(), id.chamber(), id.layer(), ihvsegment, ichip);
0425   }
0426 
0427   /**
0428    * Linear index for Gas gain sector, based on the HV segment# and the chip#
0429    * located in layer 'il' of chamber 'ic' of ring 'ir' in station 'is' of
0430    * endcap 'ie'.
0431    *
0432    * Output is 1-45144 (CSCs 2008) and 45145-55944 (ME42) and 55945-57240 (ME1a)
0433    *
0434    * WARNING: Use at your own risk! You must input labels within hardware
0435    * ranges. No trapping on out-of-range values!
0436    */
0437   IndexType gasGainIndex(IndexType ie,
0438                          IndexType is,
0439                          IndexType ir,
0440                          IndexType ic,
0441                          IndexType il,
0442                          IndexType ihvsegment,
0443                          IndexType ichip) const {
0444     return sectorStart(ie, is, ir) + ((ic - 1) * 6 + il - 1) * sectorsPerLayer(is, ir) +
0445            (ihvsegment - 1) * chipsPerLayer(is, ir) + (ichip - 1);
0446   }
0447 
0448   /**
0449    *  Decode CSCDetId from various indexes and labels
0450    */
0451   CSCDetId detIdFromLayerIndex(IndexType ili) const;
0452   CSCDetId detIdFromChamberIndex(IndexType ici) const;
0453   CSCDetId detIdFromChamberIndex_OLD(IndexType ici) const;
0454   CSCDetId detIdFromChamberLabel(IndexType ie, IndexType icl) const;
0455   std::pair<CSCDetId, IndexType> detIdFromStripChannelIndex(LongIndexType ichi) const;
0456   std::pair<CSCDetId, IndexType> detIdFromChipIndex(IndexType ichi) const;
0457   GasGainTuple detIdFromGasGainIndex(IndexType igg) const;
0458 
0459   IndexType chamberLabelFromChamberIndex(IndexType) const;  // just for cross-checks
0460 
0461   /**
0462    * Build index used internally in online CSC conditions databases (the 'Igor
0463    * Index')
0464    *
0465    * This is the decimal integer ie*100000 + is*10000 + ir*1000 + ic*10 + il
0466    * <br> (ie=1-2, is=1-4, ir=1-4, ic=1-36, il=1-6) <br> Channels 1-16 in ME1A
0467    * (is=1, ir=4) are NOT reset to channels 65-80 of ME11. WARNING: This is now
0468    * ADOPTED to unganged ME1a channels (we expect that the online conditions DB
0469    * will adopt it too).
0470    */
0471   int dbIndex(const CSCDetId &id, int &channel);
0472 
0473 private:
0474   void fillChamberLabel() const;  // const so it can be called in const function
0475                                   // detIdFromChamberIndex
0476 
0477   mutable std::vector<IndexType> chamberLabel;  // mutable so can be filled by fillChamberLabel
0478 };
0479 
0480 #endif