CMS 3D CMS Logo

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