CMS 3D CMS Logo

CSCIndexerStartup.h
Go to the documentation of this file.
1 #ifndef CSCIndexerStartup_H
2 #define CSCIndexerStartup_H
3 
37 
39 public:
40  ~CSCIndexerStartup() override;
41 
42  std::string name() const override { return "CSCIndexerStartup"; }
43 
45 
46  LongIndexType maxStripChannelIndex() const override { return 252288; }
47  IndexType maxChipIndex() const override { return 15768; }
48  IndexType maxGasGainIndex() const override { return 55944; }
50 
52 
53 
60  const IndexType nrings[5] = {0, 3, 2, 2, 2};
61  return nrings[is];
62  }
63 
72  const IndexType nSC[16] = {64, 80, 64, 16, 80, 80, 0, 0, 80, 80, 0, 0, 80, 80, 0, 0};
73  return nSC[(is - 1) * 4 + ir - 1];
74  }
75 
85  const IndexType nSC[16] = {80, 80, 64, 80, 80, 80, 0, 0, 80, 80, 0, 0, 80, 80, 0, 0};
86  return nSC[(is - 1) * 4 + ir - 1];
87  }
88 
98  const IndexType nCinL[16] = {5, 5, 4, 5, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0};
99  return nCinL[(is - 1) * 4 + ir - 1];
100  }
101 
103 
105 
106 
119  const IndexType nSCinC[16] = {80, 80, 64, 80, 80, 80, 0, 0, 80, 80, 0, 0, 80, 80, 0, 0};
120  return nSCinC[(is - 1) * 4 + ir - 1];
121  }
122 
134  // These are in the ranges 1-217728 (CSCs 2008) and 217729-252288 (ME42).
135  // There are 1-108884 channels per endcap (CSCs 2008) and 17280 channels per
136  // endcap (ME42). Start of -z channels (CSCs 2008) is 108864 + 1 = 108865
137  // Start of +z (ME42) is 217728 + 1 = 217729
138  // Start of -z (ME42) is 217728 + 1 + 17280 = 235009
139  const LongIndexType nStart[32] = {1, 17281, 34561, 1, 48385, 57025, 0, 0, 74305, 82945, 0,
140  0, 100225, 217729, 0, 0, 108865, 126145, 143425, 108865, 157249, 165889,
141  0, 0, 183169, 191809, 0, 0, 209089, 235009, 0, 0};
142  return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
143  }
145 
147 
148 
160  IndexType chipsPerLayer(IndexType is, IndexType ir) const override {
161  const IndexType nCinL[16] = {5, 5, 4, 5, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0};
162  return nCinL[(is - 1) * 4 + ir - 1];
163  }
164 
175  IndexType chipStart(IndexType ie, IndexType is, IndexType ir) const override {
176  // These are in the ranges 1-13608 (CSCs 2008) and 13609-15768 (ME42).
177  // There are 1-6804 chips per endcap (CSCs 2008) and 1080 channels per
178  // endcap (ME42). Start of -z channels (CSCs 2008) is 6804 + 1 = 6805 Start
179  // of +z (ME42) is 13608 + 1 = 13609 Start of -z (ME42) is 13608 + 1 + 1080
180  // = 14689
181  const IndexType nStart[32] = {1, 1081, 2161, 1, 3025, 3565, 0, 0, 4645, 5185, 0, 0, 6265, 13609, 0, 0,
182  6805, 7885, 8965, 6805, 9829, 10369, 0, 0, 11449, 11989, 0, 0, 13069, 14689, 0, 0};
183  return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
184  }
186 
188 
189 
200  IndexType sectorStart(IndexType ie, IndexType is, IndexType ir) const override {
201  // There are 36 chambers * 6 layers * 5 CFEB's * 1 HV segment = 1080
202  // gas-gain sectors in ME1/1 There are 36*6*5*3 = 3240 gas-gain sectors in
203  // ME1/2 There are 36*6*4*3 = 2592 gas-gain sectors in ME1/3 There are
204  // 18*6*5*3 = 1620 gas-gain sectors in ME[2-4]/1 There are 36*6*5*5 = 5400
205  // gas-gain sectors in ME[2-4]/2 Start of -z channels (CSCs 2008) is 22572 +
206  // 1 = 22573 Start of +z (ME42) is 45144 + 1 = 45145 Start of -z (ME42) is
207  // 45144 + 1 + 5400 = 50545
208  const IndexType nStart[32] = {1, 1081, 4321,
209  1, // ME+1/1,ME+1/2,ME+1/3,ME+1/4
210  6913, 8533, 0,
211  0, // ME+2/1,ME+2/2,
212  13933, 15553, 0,
213  0, // ME+3/1,ME+3/2,
214  20953, 45145, 0,
215  0, // ME+4/1,ME+4/2,ME+4/3 (note, ME+4/2 index follows ME-4/1...)
216  22573, 23653, 26893,
217  22573, // ME-1/1,ME-1/2,ME-1/3, ME-1/4
218  29485, 31105, 0,
219  0, // ME-2/1,ME-2/2,ME-2/3
220  36505, 38125, 0,
221  0, // ME-3/1,ME-3/2,ME-3/3
222  43525, 50545, 0,
223  0}; // ME-4/1,ME-4/2,ME-4/3 (note, ME-4/2 index follows ME+4/2...)
224  return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
225  }
227 
231  std::pair<CSCDetId, IndexType> detIdFromStripChannelIndex(LongIndexType ichi) const override;
232  std::pair<CSCDetId, IndexType> detIdFromChipIndex(IndexType ichi) const override;
234 
243  int dbIndex(const CSCDetId &id, int &channel) const override;
244 };
245 
246 #endif
uint32_t LongIndexType
IndexType maxGasGainIndex() const override
IndexType stripChannelsPerLayer(IndexType is, IndexType ir) const override
IndexType onlineRingsInStation(IndexType is) const override
std::pair< CSCDetId, IndexType > detIdFromStripChannelIndex(LongIndexType ichi) const override
IndexType sectorStart(IndexType ie, IndexType is, IndexType ir) const override
GasGainIndexType detIdFromGasGainIndex(IndexType igg) const override
IndexType stripChannelsPerOfflineLayer(IndexType is, IndexType ir) const override
IndexType chipsPerOnlineLayer(IndexType is, IndexType ir) const override
LongIndexType stripChannelStart(IndexType ie, IndexType is, IndexType ir) const override
uint16_t IndexType
int dbIndex(const CSCDetId &id, int &channel) const override
IndexType chipStart(IndexType ie, IndexType is, IndexType ir) const override
IndexType maxChipIndex() const override
~CSCIndexerStartup() override
std::string name() const override
std::pair< CSCDetId, IndexType > detIdFromChipIndex(IndexType ichi) const override
IndexType chipsPerLayer(IndexType is, IndexType ir) const override
std::tuple< CSCDetId, IndexType, IndexType > GasGainIndexType
LongIndexType maxStripChannelIndex() const override
IndexType stripChannelsPerOnlineLayer(IndexType is, IndexType ir) const override