CMS 3D CMS Logo

CSCIndexerPostls1.h
Go to the documentation of this file.
1 #ifndef CSCIndexerPostls1_H
2 #define CSCIndexerPostls1_H
3 
41 
43 public:
44  ~CSCIndexerPostls1() override;
45 
46  std::string name() const override { return "CSCIndexerPostls1"; }
47 
49 
50  LongIndexType maxStripChannelIndex() const override { return 273024; }
51  IndexType maxChipIndex() const override { return 17064; }
52  IndexType maxGasGainIndex() const override { return 57240; }
54 
56 
57 
64  const IndexType nrings[5] = {0, 4, 2, 2, 2};
65  return nrings[is];
66  }
67 
75  const IndexType nSC[16] = {64, 80, 64, 48, 80, 80, 0, 0, 80, 80, 0, 0, 80, 80, 0, 0};
76  return nSC[(is - 1) * 4 + ir - 1];
77  }
78 
87  const IndexType nSC[16] = {64, 80, 64, 48, 80, 80, 0, 0, 80, 80, 0, 0, 80, 80, 0, 0};
88  return nSC[(is - 1) * 4 + ir - 1];
89  }
90 
100  const IndexType nCinL[16] = {4, 5, 4, 3, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0};
101  return nCinL[(is - 1) * 4 + ir - 1];
102  }
103 
105 
107 
108 
121  const IndexType nSCinC[16] = {80, 80, 64, 48, 80, 80, 0, 0, 80, 80, 0, 0, 80, 80, 0, 0};
122  return nSCinC[(is - 1) * 4 + ir - 1];
123  }
124 
136  // These are in the ranges 1-217728 (CSCs 2008), 217729-252288 (ME42), and
137  // 252289-273024 (unganged ME1a) There are 1-108884 channels per endcap
138  // (CSCs 2008), 17280 channels per endcap (ME42), and 10368 channels per
139  // endcap (unganged ME1a) Start of -z channels (CSCs 2008) is 108864 + 1 =
140  // 108865 Start of +z (ME42) is 217728 + 1 = 217729 Start
141  // of -z (ME42) is 217728 + 1 + 17280 = 235009 Start of +z
142  // (unganged ME1a) is 252288 + 1 = 252289 Start of -z (unganged
143  // ME1a) is 252288 + 1 + 10368 = 262657
144  const LongIndexType nStart[32] = {1, 17281, 34561, 252289, 48385, 57025, 0, 0, 74305, 82945, 0,
145  0, 100225, 217729, 0, 0, 108865, 126145, 143425, 262657, 157249, 165889,
146  0, 0, 183169, 191809, 0, 0, 209089, 235009, 0, 0};
147  return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
148  }
150 
152 
153 
168  IndexType chipsPerLayer(IndexType is, IndexType ir) const override {
169  const IndexType nCinL[16] = {5, 5, 4, 3, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0};
170  return nCinL[(is - 1) * 4 + ir - 1];
171  }
172 
183  IndexType chipStart(IndexType ie, IndexType is, IndexType ir) const override {
184  // These are in the ranges 1-13608 (CSCs 2008) and 13609-15768 (ME42) and
185  // 15769-17064 (ME1a). There are 1-6804 chips per endcap (CSCs 2008) and
186  // 1080 chips per endcap (ME42) and 648 chips per endcap (ME1a). Start of -z
187  // channels (CSCs 2008) is 6804 + 1 = 6805 Start of +z (ME42) is 13608 + 1 =
188  // 13609 Start of -z (ME42) is 13608 + 1 + 1080 = 14689 Start of +z (ME1a)
189  // is 15768 + 1 = 15769 Start of -z (ME1a) is 15768 + 1 + 648 = 16417
190  const IndexType nStart[32] = {1, 1081, 2161, 15769, 3025, 3565, 0, 0, 4645, 5185, 0, 0, 6265, 13609, 0, 0,
191  6805, 7885, 8965, 16417, 9829, 10369, 0, 0, 11449, 11989, 0, 0, 13069, 14689, 0, 0};
192  return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
193  }
195 
197 
198 
209  IndexType sectorStart(IndexType ie, IndexType is, IndexType ir) const override {
210  // There are 36 chambers * 6 layers * 5 CFEB's * 1 HV segment = 1080
211  // gas-gain sectors in ME1/1 (non-upgraded) There are 36 chambers * 6 layers
212  // * 3 CFEB's * 1 HV segment = 648 gas-gain sectors in ME1/1a (upgraded)
213  // There are 36*6*5*3 = 3240 gas-gain sectors in ME1/2
214  // There are 36*6*4*3 = 2592 gas-gain sectors in ME1/3
215  // There are 18*6*5*3 = 1620 gas-gain sectors in ME[2-4]/1
216  // There are 36*6*5*5 = 5400 gas-gain sectors in ME[2-4]/2
217  // Start of -z channels (CSCs 2008) is 22572 + 1 = 22573
218  // Start of +z (ME42) is 45144 + 1 = 45145
219  // Start of -z (ME42) is 45144 + 1 + 5400 = 50545
220  // Start of +z (ME1a) is 45144 + 1 + 2*5400 = 55945
221  // Start of -z (ME42) is 45144 + 1 + 2*5400 + 648 = 56593
222  const IndexType nStart[32] = {1, 1081, 4321, 55945, // ME+1/1,ME+1/2,ME+1/3,ME+1/a
223  6913, 8533, 0, 0, // ME+2/1,ME+2/2
224  13933, 15553, 0, 0, // ME+3/1,ME+3/2
225  20953, 45145, 0, 0, // ME+4/1,ME+4/2 (note, ME+4/2 index follows ME-4/1...)
226  22573, 23653, 26893, 56593, // ME-1/1,ME-1/2,ME-1/3,ME+1/a
227  29485, 31105, 0, 0, // ME-2/1,ME-2/2
228  36505, 38125, 0, 0, // ME-3/1,ME-3/2
229  43525, 50545, 0, 0}; // ME-4/1,ME-4/2 (note, ME-4/2 index follows ME+4/2...)
230  return nStart[(ie - 1) * 16 + (is - 1) * 4 + ir - 1];
231  }
233 
237  std::pair<CSCDetId, IndexType> detIdFromStripChannelIndex(LongIndexType ichi) const override;
238  std::pair<CSCDetId, IndexType> detIdFromChipIndex(IndexType ichi) const override;
240 
251  int dbIndex(const CSCDetId &id, int &channel) const override;
252 };
253 
254 #endif
CSCIndexerPostls1::detIdFromGasGainIndex
CSCIndexerBase::GasGainIndexType detIdFromGasGainIndex(IndexType igg) const override
Definition: CSCIndexerPostls1.cc:165
CSCIndexerPostls1::stripChannelsPerOfflineLayer
IndexType stripChannelsPerOfflineLayer(IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:74
CSCIndexerPostls1::chipsPerLayer
IndexType chipsPerLayer(IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:168
CSCIndexerPostls1::maxGasGainIndex
IndexType maxGasGainIndex() const override
Definition: CSCIndexerPostls1.h:52
CSCIndexerPostls1::~CSCIndexerPostls1
~CSCIndexerPostls1() override
Definition: CSCIndexerPostls1.cc:4
CSCIndexerPostls1::dbIndex
int dbIndex(const CSCDetId &id, int &channel) const override
Definition: CSCIndexerPostls1.cc:155
CSCIndexerPostls1::name
std::string name() const override
Definition: CSCIndexerPostls1.h:46
CSCIndexerPostls1::stripChannelsPerLayer
IndexType stripChannelsPerLayer(IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:120
CSCIndexerPostls1
Definition: CSCIndexerPostls1.h:42
CSCIndexerPostls1::sectorStart
IndexType sectorStart(IndexType ie, IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:209
CSCIndexerBase::IndexType
uint16_t IndexType
Definition: CSCIndexerBase.h:71
CSCIndexerPostls1::detIdFromStripChannelIndex
std::pair< CSCDetId, IndexType > detIdFromStripChannelIndex(LongIndexType ichi) const override
Definition: CSCIndexerPostls1.cc:6
CSCIndexerPostls1::maxStripChannelIndex
LongIndexType maxStripChannelIndex() const override
Definition: CSCIndexerPostls1.h:50
CSCIndexerPostls1::maxChipIndex
IndexType maxChipIndex() const override
Definition: CSCIndexerPostls1.h:51
CSCIndexerPostls1::chipsPerOnlineLayer
IndexType chipsPerOnlineLayer(IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:99
CSCIndexerBase::LongIndexType
uint32_t LongIndexType
Definition: CSCIndexerBase.h:72
CSCDetId
Definition: CSCDetId.h:26
CSCIndexerBase
Definition: CSCIndexerBase.h:69
CSCIndexerPostls1::detIdFromChipIndex
std::pair< CSCDetId, IndexType > detIdFromChipIndex(IndexType ichi) const override
Definition: CSCIndexerPostls1.cc:81
CSCIndexerPostls1::onlineRingsInStation
IndexType onlineRingsInStation(IndexType is) const override
Definition: CSCIndexerPostls1.h:63
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCIndexerBase::GasGainIndexType
std::tuple< CSCDetId, IndexType, IndexType > GasGainIndexType
Definition: CSCIndexerBase.h:77
CSCIndexerPostls1::stripChannelStart
LongIndexType stripChannelStart(IndexType ie, IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:135
CSCIndexerPostls1::stripChannelsPerOnlineLayer
IndexType stripChannelsPerOnlineLayer(IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:86
CSCIndexerPostls1::chipStart
IndexType chipStart(IndexType ie, IndexType is, IndexType ir) const override
Definition: CSCIndexerPostls1.h:183
CSCIndexerBase.h