00001 #ifndef CSCIndexerPostls1_H
00002 #define CSCIndexerPostls1_H
00003
00036 #include <CalibMuon/CSCCalibration/interface/CSCIndexerBase.h>
00037
00038 class CSCIndexerPostls1 : public CSCIndexerBase
00039 {
00040 public:
00041
00042 ~CSCIndexerPostls1();
00043
00044 std::string name() const { return "CSCIndexerPostls1"; }
00045
00046
00048
00049 LongIndexType maxStripChannelIndex() const { return 273024; }
00050 IndexType maxChipIndex() const { return 17064; }
00051 IndexType maxGasGainIndex() const { return 57240; }
00053
00054
00056
00057
00063 IndexType onlineRingsInStation( IndexType is ) const
00064 {
00065 const IndexType nrings[5] = { 0, 4, 2, 2, 2 };
00066 return nrings[is];
00067 }
00068
00075 IndexType stripChannelsPerOfflineLayer( IndexType is, IndexType ir ) const
00076 {
00077 const IndexType nSC[16] = { 64,80,64,48, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
00078 return nSC[(is-1)*4 + ir - 1];
00079 }
00080
00088 IndexType stripChannelsPerOnlineLayer( IndexType is, IndexType ir ) const
00089 {
00090 const IndexType nSC[16] = { 64,80,64,48, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
00091 return nSC[(is-1)*4 + ir - 1];
00092 }
00093
00102 IndexType chipsPerOnlineLayer( IndexType is, IndexType ir ) const
00103 {
00104 const IndexType nCinL[16] = { 4,5,4,3, 5,5,0,0, 5,5,0,0, 5,5,0,0 };
00105 return nCinL[(is - 1)*4 + ir - 1];
00106 }
00107
00109
00110
00112
00113
00124 IndexType stripChannelsPerLayer( IndexType is, IndexType ir ) const
00125 {
00126 const IndexType nSCinC[16] = { 80,80,64,48, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
00127 return nSCinC[(is - 1)*4 + ir - 1];
00128 }
00129
00137 LongIndexType stripChannelStart( IndexType ie, IndexType is, IndexType ir ) const
00138 {
00139
00140
00141
00142
00143
00144
00145
00146
00147 const LongIndexType nStart[32] =
00148 { 1, 17281, 34561,252289, 48385, 57025,0,0, 74305, 82945,0,0, 100225,217729,0,0,
00149 108865,126145,143425,262657, 157249,165889,0,0, 183169,191809,0,0, 209089,235009,0,0 };
00150 return nStart[(ie - 1)*16 + (is - 1)*4 + ir - 1];
00151 }
00153
00154
00156
00157
00170 IndexType chipsPerLayer( IndexType is, IndexType ir ) const
00171 {
00172 const IndexType nCinL[16] = { 5,5,4,3, 5,5,0,0, 5,5,0,0, 5,5,0,0 };
00173 return nCinL[(is - 1)*4 + ir - 1];
00174 }
00175
00184 IndexType chipStart( IndexType ie, IndexType is, IndexType ir ) const
00185 {
00186
00187
00188
00189
00190
00191
00192
00193 const IndexType nStart[32] =
00194 {1, 1081, 2161, 15769, 3025, 3565, 0,0, 4645, 5185, 0,0, 6265, 13609,0,0,
00195 6805,7885, 8965, 16417, 9829, 10369,0,0, 11449,11989,0,0, 13069,14689,0,0 };
00196 return nStart[(ie - 1)*16 + (is - 1)*4 + ir - 1];
00197 }
00199
00200
00202
00203
00211 IndexType sectorStart( IndexType ie, IndexType is, IndexType ir ) const
00212 {
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224 const IndexType nStart[32] =
00225 {1 , 1081 , 4321, 55945,
00226 6913 , 8533 , 0, 0,
00227 13933, 15553, 0, 0,
00228 20953, 45145, 0, 0,
00229 22573, 23653, 26893, 56593,
00230 29485, 31105, 0, 0,
00231 36505, 38125, 0, 0,
00232 43525, 50545, 0, 0 };
00233 return nStart[(ie-1)*16 + (is-1)*4 + ir - 1];
00234 }
00236
00240 std::pair<CSCDetId, IndexType> detIdFromStripChannelIndex( LongIndexType ichi ) const;
00241 std::pair<CSCDetId, IndexType> detIdFromChipIndex( IndexType ichi ) const;
00242 CSCIndexerBase::GasGainIndexType detIdFromGasGainIndex( IndexType igg ) const;
00243
00253 int dbIndex(const CSCDetId & id, int & channel) const;
00254
00255 };
00256
00257 #endif