00001 #ifndef CSCIndexerStartup_H
00002 #define CSCIndexerStartup_H
00003
00033 #include <CalibMuon/CSCCalibration/interface/CSCIndexerBase.h>
00034
00035 class CSCIndexerStartup : public CSCIndexerBase {
00036
00037 public:
00038
00039 ~CSCIndexerStartup();
00040
00041 std::string name() const {return "CSCIndexerStartup";}
00042
00044
00045 LongIndexType maxStripChannelIndex() const { return 252288; }
00046 IndexType maxChipIndex() const { return 15768; }
00047 IndexType maxGasGainIndex() const { return 55944; }
00049
00050
00052
00053
00059 IndexType onlineRingsInStation( IndexType is ) const
00060 {
00061 const IndexType nrings[5] = { 0, 3, 2, 2, 2 };
00062 return nrings[is];
00063 }
00064
00072 IndexType stripChannelsPerOfflineLayer( IndexType is, IndexType ir ) const
00073 {
00074 const IndexType nSC[16] = { 64,80,64,16, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
00075 return nSC[(is-1)*4 + ir - 1];
00076 }
00077
00085 IndexType stripChannelsPerOnlineLayer( IndexType is, IndexType ir ) const
00086 {
00087 const IndexType nSC[16] = { 80,80,64,80, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
00088 return nSC[(is-1)*4 + ir - 1];
00089 }
00090
00098 IndexType chipsPerOnlineLayer( IndexType is, IndexType ir ) const
00099 {
00100 const IndexType nCinL[16] = { 5,5,4,5, 5,5,0,0, 5,5,0,0, 5,5,0,0 };
00101 return nCinL[(is - 1)*4 + ir - 1];
00102 }
00103
00105
00106
00108
00109
00120 IndexType stripChannelsPerLayer( IndexType is, IndexType ir ) const
00121 {
00122 const IndexType nSCinC[16] = { 80,80,64,80, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
00123 return nSCinC[(is - 1)*4 + ir - 1];
00124 }
00125
00134 LongIndexType stripChannelStart( IndexType ie, IndexType is, IndexType ir ) const
00135 {
00136
00137
00138
00139
00140
00141 const LongIndexType nStart[32] =
00142 { 1, 17281, 34561, 1, 48385, 57025,0,0, 74305, 82945,0,0, 100225,217729,0,0,
00143 108865,126145,143425,108865, 157249,165889,0,0, 183169,191809,0,0, 209089,235009,0,0 };
00144 return nStart[(ie - 1)*16 + (is - 1)*4 + ir - 1];
00145 }
00147
00148
00150
00151
00162 IndexType chipsPerLayer( IndexType is, IndexType ir ) const
00163 {
00164 const IndexType nCinL[16] = { 5,5,4,5, 5,5,0,0, 5,5,0,0, 5,5,0,0 };
00165 return nCinL[(is - 1)*4 + ir - 1];
00166 }
00167
00176 IndexType chipStart( IndexType ie, IndexType is, IndexType ir ) const
00177 {
00178
00179
00180
00181
00182
00183 const IndexType nStart[32] =
00184 { 1, 1081, 2161, 1, 3025, 3565, 0,0, 4645, 5185, 0,0, 6265, 13609,0,0,
00185 6805, 7885, 8965, 6805, 9829, 10369,0,0, 11449, 11989, 0,0, 13069, 14689,0,0 };
00186 return nStart[(ie - 1)*16 + (is - 1)*4 + ir - 1];
00187 }
00189
00190
00192
00193
00201 IndexType sectorStart( IndexType ie, IndexType is, IndexType ir ) const
00202 {
00203
00204
00205
00206
00207
00208
00209
00210
00211 const IndexType nStart[32] =
00212 {1 ,1081 , 4321, 1,
00213 6913 ,8533 , 0, 0,
00214 13933,15553, 0, 0,
00215 20953,45145, 0, 0,
00216 22573,23653,26893, 22573,
00217 29485,31105, 0, 0,
00218 36505,38125, 0, 0,
00219 43525,50545, 0, 0};
00220 return nStart[(ie-1)*16 + (is-1)*4 + ir - 1];
00221 }
00223
00224
00228 std::pair<CSCDetId, IndexType> detIdFromStripChannelIndex( LongIndexType ichi ) const;
00229 std::pair<CSCDetId, IndexType> detIdFromChipIndex( IndexType ichi ) const;
00230 GasGainIndexType detIdFromGasGainIndex( IndexType igg ) const;
00231
00239 int dbIndex(const CSCDetId & id, int & channel) const;
00240 };
00241
00242 #endif