CMS 3D CMS Logo

CSCIndexerPostls1.h
Go to the documentation of this file.
1 #ifndef CSCIndexerPostls1_H
2 #define CSCIndexerPostls1_H
3 
37 
39 {
40 public:
41 
42  ~CSCIndexerPostls1() override;
43 
44  std::string name() const override { return "CSCIndexerPostls1"; }
45 
46 
48 
49  LongIndexType maxStripChannelIndex() const override { return 273024; }
50  IndexType maxChipIndex() const override { return 17064; }
51  IndexType maxGasGainIndex() const override { return 57240; }
53 
54 
56 
57 
64  {
65  const IndexType nrings[5] = { 0, 4, 2, 2, 2 };
66  return nrings[is];
67  }
68 
76  {
77  const IndexType nSC[16] = { 64,80,64,48, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
78  return nSC[(is-1)*4 + ir - 1];
79  }
80 
89  {
90  const IndexType nSC[16] = { 64,80,64,48, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
91  return nSC[(is-1)*4 + ir - 1];
92  }
93 
103  {
104  const IndexType nCinL[16] = { 4,5,4,3, 5,5,0,0, 5,5,0,0, 5,5,0,0 };
105  return nCinL[(is - 1)*4 + ir - 1];
106  }
107 
109 
110 
112 
113 
125  {
126  const IndexType nSCinC[16] = { 80,80,64,48, 80,80,0,0, 80,80,0,0, 80,80,0,0 };
127  return nSCinC[(is - 1)*4 + ir - 1];
128  }
129 
138  {
139  // These are in the ranges 1-217728 (CSCs 2008), 217729-252288 (ME42), and 252289-273024 (unganged ME1a)
140  // There are 1-108884 channels per endcap (CSCs 2008), 17280 channels per endcap (ME42),
141  // and 10368 channels per endcap (unganged ME1a)
142  // Start of -z channels (CSCs 2008) is 108864 + 1 = 108865
143  // Start of +z (ME42) is 217728 + 1 = 217729
144  // Start of -z (ME42) is 217728 + 1 + 17280 = 235009
145  // Start of +z (unganged ME1a) is 252288 + 1 = 252289
146  // Start of -z (unganged ME1a) is 252288 + 1 + 10368 = 262657
147  const LongIndexType nStart[32] =
148  { 1, 17281, 34561,252289, 48385, 57025,0,0, 74305, 82945,0,0, 100225,217729,0,0,
149  108865,126145,143425,262657, 157249,165889,0,0, 183169,191809,0,0, 209089,235009,0,0 };
150  return nStart[(ie - 1)*16 + (is - 1)*4 + ir - 1];
151  }
153 
154 
156 
157 
170  IndexType chipsPerLayer( IndexType is, IndexType ir ) const override
171  {
172  const IndexType nCinL[16] = { 5,5,4,3, 5,5,0,0, 5,5,0,0, 5,5,0,0 };
173  return nCinL[(is - 1)*4 + ir - 1];
174  }
175 
184  IndexType chipStart( IndexType ie, IndexType is, IndexType ir ) const override
185  {
186  // These are in the ranges 1-13608 (CSCs 2008) and 13609-15768 (ME42) and 15769-17064 (ME1a).
187  // There are 1-6804 chips per endcap (CSCs 2008) and 1080 chips per endcap (ME42) and 648 chips per endcap (ME1a).
188  // Start of -z channels (CSCs 2008) is 6804 + 1 = 6805
189  // Start of +z (ME42) is 13608 + 1 = 13609
190  // Start of -z (ME42) is 13608 + 1 + 1080 = 14689
191  // Start of +z (ME1a) is 15768 + 1 = 15769
192  // Start of -z (ME1a) is 15768 + 1 + 648 = 16417
193  const IndexType nStart[32] =
194  {1, 1081, 2161, 15769, 3025, 3565, 0,0, 4645, 5185, 0,0, 6265, 13609,0,0,
195  6805,7885, 8965, 16417, 9829, 10369,0,0, 11449,11989,0,0, 13069,14689,0,0 };
196  return nStart[(ie - 1)*16 + (is - 1)*4 + ir - 1];
197  }
199 
200 
202 
203 
211  IndexType sectorStart( IndexType ie, IndexType is, IndexType ir ) const override
212  {
213  // There are 36 chambers * 6 layers * 5 CFEB's * 1 HV segment = 1080 gas-gain sectors in ME1/1 (non-upgraded)
214  // There are 36 chambers * 6 layers * 3 CFEB's * 1 HV segment = 648 gas-gain sectors in ME1/1a (upgraded)
215  // There are 36*6*5*3 = 3240 gas-gain sectors in ME1/2
216  // There are 36*6*4*3 = 2592 gas-gain sectors in ME1/3
217  // There are 18*6*5*3 = 1620 gas-gain sectors in ME[2-4]/1
218  // There are 36*6*5*5 = 5400 gas-gain sectors in ME[2-4]/2
219  // Start of -z channels (CSCs 2008) is 22572 + 1 = 22573
220  // Start of +z (ME42) is 45144 + 1 = 45145
221  // Start of -z (ME42) is 45144 + 1 + 5400 = 50545
222  // Start of +z (ME1a) is 45144 + 1 + 2*5400 = 55945
223  // Start of -z (ME42) is 45144 + 1 + 2*5400 + 648 = 56593
224  const IndexType nStart[32] =
225  {1 , 1081 , 4321, 55945, //ME+1/1,ME+1/2,ME+1/3,ME+1/a
226  6913 , 8533 , 0, 0, //ME+2/1,ME+2/2
227  13933, 15553, 0, 0, //ME+3/1,ME+3/2
228  20953, 45145, 0, 0, //ME+4/1,ME+4/2 (note, ME+4/2 index follows ME-4/1...)
229  22573, 23653, 26893, 56593, //ME-1/1,ME-1/2,ME-1/3,ME+1/a
230  29485, 31105, 0, 0, //ME-2/1,ME-2/2
231  36505, 38125, 0, 0, //ME-3/1,ME-3/2
232  43525, 50545, 0, 0 };//ME-4/1,ME-4/2 (note, ME-4/2 index follows ME+4/2...)
233  return nStart[(ie-1)*16 + (is-1)*4 + ir - 1];
234  }
236 
240  std::pair<CSCDetId, IndexType> detIdFromStripChannelIndex( LongIndexType ichi ) const override;
241  std::pair<CSCDetId, IndexType> detIdFromChipIndex( IndexType ichi ) const override;
243 
253  int dbIndex(const CSCDetId & id, int & channel) const override;
254 
255 };
256 
257 #endif
uint32_t LongIndexType
IndexType chipsPerLayer(IndexType is, IndexType ir) const override
LongIndexType stripChannelStart(IndexType ie, IndexType is, IndexType ir) const override
~CSCIndexerPostls1() override
boost::tuple< CSCDetId, IndexType, IndexType > GasGainIndexType
IndexType chipStart(IndexType ie, IndexType is, IndexType ir) const override
CSCIndexerBase::GasGainIndexType detIdFromGasGainIndex(IndexType igg) const override
std::pair< CSCDetId, IndexType > detIdFromStripChannelIndex(LongIndexType ichi) const override
std::pair< CSCDetId, IndexType > detIdFromChipIndex(IndexType ichi) const override
IndexType maxGasGainIndex() const override
IndexType onlineRingsInStation(IndexType is) const override
IndexType stripChannelsPerLayer(IndexType is, IndexType ir) const override
IndexType chipsPerOnlineLayer(IndexType is, IndexType ir) const override
IndexType maxChipIndex() const override
IndexType stripChannelsPerOfflineLayer(IndexType is, IndexType ir) const override
uint16_t IndexType
int dbIndex(const CSCDetId &id, int &channel) const override
IndexType stripChannelsPerOnlineLayer(IndexType is, IndexType ir) const override
std::string name() const override
IndexType sectorStart(IndexType ie, IndexType is, IndexType ir) const override
LongIndexType maxStripChannelIndex() const override