CMS 3D CMS Logo

List of all members | Public Member Functions
CSCIndexerPostls1 Class Reference

#include <CSCIndexerPostls1.h>

Inheritance diagram for CSCIndexerPostls1:
CSCIndexerBase

Public Member Functions

int dbIndex (const CSCDetId &id, int &channel) const override
 
std::pair< CSCDetId, IndexTypedetIdFromChipIndex (IndexType ichi) const override
 
CSCIndexerBase::GasGainIndexType detIdFromGasGainIndex (IndexType igg) const override
 
std::pair< CSCDetId, IndexTypedetIdFromStripChannelIndex (LongIndexType ichi) const override
 
std::string name () const override
 
 ~CSCIndexerPostls1 () override
 
maxIndexMethods
LongIndexType maxStripChannelIndex () const override
 
IndexType maxChipIndex () const override
 
IndexType maxGasGainIndex () const override
 
nonIndexCountingMethods
IndexType onlineRingsInStation (IndexType is) const override
 
IndexType stripChannelsPerOfflineLayer (IndexType is, IndexType ir) const override
 
IndexType stripChannelsPerOnlineLayer (IndexType is, IndexType ir) const override
 
IndexType chipsPerOnlineLayer (IndexType is, IndexType ir) const override
 
stripIndexMethods
IndexType stripChannelsPerLayer (IndexType is, IndexType ir) const override
 
LongIndexType stripChannelStart (IndexType ie, IndexType is, IndexType ir) const override
 
chipIndexMethods
IndexType chipsPerLayer (IndexType is, IndexType ir) const override
 
IndexType chipStart (IndexType ie, IndexType is, IndexType ir) const override
 
gasGainIndexMethods
IndexType sectorStart (IndexType ie, IndexType is, IndexType ir) const override
 
- Public Member Functions inherited from CSCIndexerBase
IndexType chamberLabelFromChamberIndex (IndexType) const
 
 CSCIndexerBase ()
 
virtual ~CSCIndexerBase ()
 
IndexType maxChamberIndex () const
 
IndexType maxLayerIndex () const
 
IndexType ringsInStation (IndexType is) const
 
IndexType offlineRingsInStation (IndexType is) const
 
IndexType chambersInRingOfStation (IndexType is, IndexType ir) const
 
IndexType sectorsPerOnlineLayer (IndexType is, IndexType ir) const
 
IndexType startChamberIndexInEndcap (IndexType ie, IndexType is, IndexType ir) const
 
IndexType chamberIndex (IndexType ie, IndexType is, IndexType ir, IndexType ic) const
 
IndexType chamberIndex (const CSCDetId &id) const
 
IndexType layerIndex (IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il) const
 
IndexType layerIndex (const CSCDetId &id) const
 
LongIndexType stripChannelIndex (IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const
 
LongIndexType stripChannelIndex (const CSCDetId &id, IndexType istrip) const
 
IndexType chipIndex (IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType ichip) const
 
IndexType chipIndex (const CSCDetId &id, IndexType ichip) const
 
IndexType chipIndex (IndexType istrip) const
 
IndexType hvSegmentsPerLayer (IndexType is, IndexType ir) const
 
IndexType hvSegmentIndex (IndexType is, IndexType ir, IndexType iwire) const
 
IndexType sectorsPerLayer (IndexType is, IndexType ir) const
 
IndexType gasGainIndex (IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType ihvsegment, IndexType ichip) const
 
IndexType gasGainIndex (const CSCDetId &id, IndexType istrip, IndexType iwire) const
 
IndexType gasGainIndex (IndexType ihvsegment, IndexType ichip, const CSCDetId &id) const
 
CSCDetId detIdFromChamberIndex (IndexType ici) const
 
CSCDetId detIdFromLayerIndex (IndexType ili) const
 

Additional Inherited Members

- Public Types inherited from CSCIndexerBase
typedef std::tuple< CSCDetId, IndexType, IndexTypeGasGainIndexType
 
typedef uint16_t IndexType
 
typedef uint32_t LongIndexType
 
- Protected Member Functions inherited from CSCIndexerBase
CSCDetId detIdFromChamberLabel (IndexType ie, IndexType icl) const
 
- Protected Attributes inherited from CSCIndexerBase
std::vector< IndexTypechamberLabel_
 

Detailed Description

Concrete CSCIndexer class appropriate for CSC Conditions Data access after CMS long shutdown 1 (2013-2014) in which most ME4/2 rings are complete and the 48 strips in ME1/1A are unganged and so have 48 channels.
The conditions data are stored in an order based on the hadrware channel order so this class has to jump through hoops in order to map between that order and a CSCDetID order offline.

See documentation in base class CSCIndexerBase for more information.

Warning
This class is hard-wired for the CSC system expected after long shutdown 2013-2014 (LS1) of CMS.
The basic order is as for startup (pre-LS1) with rings ME11, ME12, ME13, ME21, ME22, ME31, ME32, ME41 totalling 234 chambers per endcap. Then ME42 is appended, so the chamber order is
+z ME11, ME12, ME13, ME21, ME22, ME31, ME32, ME41,
-z ME11, ME12, ME13, ME21, ME22, ME31, ME32, ME41,
+z ME42, -z ME42

It is further extended for unganged ME1a strip channels by appending +z ME1a, -z ME1a.

CSCIndexerBase::stripChannelIndex returns
1-217728 (CSCs 2008), 217729-252288 (ME42), 252289-273024 (unganged ME1a)

CSCIndexerBase::chipIndex returns
1-13608 (CSCs 2008), 13609-15768 (ME42), 15769-17064 (unganged ME1a).

CSCIndexerBase::gasGainIndex returns
1-45144 (CSCs 2008), 45145-55944 (ME42), 55945-57240 (unganged ME1a)

Warning
This has "magic numbers galore".
EVERY LABEL COUNTS FROM ONE NOT ZERO.

Definition at line 42 of file CSCIndexerPostls1.h.

Constructor & Destructor Documentation

◆ ~CSCIndexerPostls1()

CSCIndexerPostls1::~CSCIndexerPostls1 ( )
override

Definition at line 4 of file CSCIndexerPostls1.cc.

4 {}

Member Function Documentation

◆ chipsPerLayer()

IndexType CSCIndexerPostls1::chipsPerLayer ( IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Number of Buckeye chips indices per layer in a chamber in offline ring 'ir' of station 'is'.

Station label range 1-4, Ring label range 1-4 (4=ME1a)

Works for ME1a input as is=1, ir=4 Considers ME42 as standard 5 chip per layer chambers.

WARNING:

  • ME1a channels are considered to be unganged and have their own 3 chips (ME1b has 4 chips).
  • ME1b keeps 5 chips for the indexing purposes, however indices for the chip #5 are ignored in the unganged case.

Implements CSCIndexerBase.

Definition at line 168 of file CSCIndexerPostls1.h.

Referenced by detIdFromGasGainIndex().

168  {
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  }
uint16_t IndexType

◆ chipsPerOnlineLayer()

IndexType CSCIndexerPostls1::chipsPerOnlineLayer ( IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Number of Buckeye chips per layer in an online chamber in ring 'ir' of station 'is'. Works for ME1a (ring 4 of ME1) too.

'Online' ME11 for the upgrade is considered as split into 1a and 1b chambers with 3 and 4 CFEBs respectively

Implements CSCIndexerBase.

Definition at line 99 of file CSCIndexerPostls1.h.

99  {
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  }
uint16_t IndexType

◆ chipStart()

IndexType CSCIndexerPostls1::chipStart ( IndexType  ie,
IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Linear index for 1st Buckeye chip in offline ring 'ir' of station 'is' in endcap 'ie'.

Endcap label range 1-2, Station label range 1-4, Ring label range 1-4 (4=ME1a) Works for ME1a input as is=1, ir=4

Warning
: ME1a chips are the last 3 of the 7 chips total in each layer of an ME11 chamber,

Implements CSCIndexerBase.

Definition at line 183 of file CSCIndexerPostls1.h.

183  {
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  }
uint16_t IndexType

◆ dbIndex()

int CSCIndexerPostls1::dbIndex ( const CSCDetId id,
int &  channel 
) const
overridevirtual

Build index used internally in online CSC conditions databases (the 'Igor Index')

This is the decimal integer ie*100000 + is*10000 + ir*1000 + ic*10 + il
(ie=1-2, is=1-4, ir=1-4, ic=1-36, il=1-6)
Channels 1-16 in ME1A (is=1, ir=4) are NOT reset to channels 65-80 of ME11. WARNING: This is now ADAPTED for unganged ME1a channels (we expect that the online conditions DB will adopt it too).

Implements CSCIndexerBase.

Definition at line 155 of file CSCIndexerPostls1.cc.

155  {
156  int ec = id.endcap();
157  int st = id.station();
158  int rg = id.ring();
159  int ch = id.chamber();
160  int la = id.layer();
161 
162  return ec * 100000 + st * 10000 + rg * 1000 + ch * 10 + la;
163 }

◆ detIdFromChipIndex()

std::pair< CSCDetId, CSCIndexerBase::IndexType > CSCIndexerPostls1::detIdFromChipIndex ( IndexType  ichi) const
overridevirtual

CSCDetId + chip within chamber from conditions data chip index.

Warning
This function changes meaning with ganged and unganged ME1/1a. If ME1/1a is ganged then an ME1/1a chip index returns ME1/1b CSCDetId + chip=5.
If ME1/1a is unganged then an ME1/1a chip index returns ME1/1a CSCDetId + chip# in range 1-3.

Implements CSCIndexerBase.

Definition at line 81 of file CSCIndexerPostls1.cc.

References relativeConstraints::chamber, CSCIndexerBase::detIdFromLayerIndex(), makeMuonMisalignmentScenario::endcap, and nano_mu_digi_cff::layer.

81  {
82  const LongIndexType lastnonme1a = 15768; // chips in chambers with ME42 installed
83  const LongIndexType lastpluszme1a = 16416; // last unganged ME1a +z chip = 15768 + 648 = 16416
84  const LongIndexType lastnonme42 = 13608; // chips in 2008 installed chambers
85  const LongIndexType lastplusznonme42 = 6804; // = 13608/2
86  const LongIndexType firstme13 = 2161; // First channel of ME13
87  const LongIndexType lastme13 = 3024; // Last channel of ME13
88 
89  const IndexType lastnonme42layer = 2808;
90  const IndexType lastplusznonme42layer = 1404; // = 2808/2
91  const IndexType firstme13layer = 433; // = 72*6 + 1 (ME13 chambers are 72-108 in range 1-234)
92  const IndexType lastme13layer = 648; // = 108*6
93 
94  bool me1a = false;
95 
96  // Most chambers (except ME13, ME1a) have 5 chips/layer
97  IndexType nchipPerLayer = 5;
98 
99  // Set endcap to +z. This should work for ME42 channels too, since we don't
100  // need to calculate its endcap explicitly.
101  IndexType ie = 1;
102 
103  LongIndexType istart = 0;
104  IndexType layerOffset = 0;
105 
106  if (ici <= lastnonme42) {
107  // Chambers as of 2008 Installation (ME11 keeps the same #of chips 5
108  // allocated for it in the index)
109  if (ici > lastplusznonme42) {
110  ie = 2;
111  ici -= lastplusznonme42;
112  }
113  if (ici > lastme13) // after ME13
114  {
115  istart = lastme13;
116  layerOffset = lastme13layer;
117  } else if (ici >= firstme13) // ME13
118  {
119  istart = firstme13 - 1;
120  layerOffset = firstme13layer - 1;
121  nchipPerLayer = 4;
122  }
123  } else if (ici <= lastnonme1a) // ME42 chambers
124  {
125  istart = lastnonme42;
126  layerOffset = lastnonme42layer;
127  // don't care about ie, as ME42 stratch of indices is uniform
128  } else // Unganged ME1a channels
129  {
130  me1a = true;
131  if (ici > lastpluszme1a)
132  ie = 2;
133  istart = lastnonme1a;
134  nchipPerLayer = 3;
135  // layerOffset stays 0, as we want to map them onto ME1b's layer indices
136  }
137 
138  ici -= istart; // remove earlier group(s)
139  IndexType ichip = (ici - 1) % nchipPerLayer + 1;
140  IndexType ili = (ici - 1) / nchipPerLayer + 1;
141  ili += layerOffset; // add appropriate offset for earlier group(s)
142  if (ie != 1)
143  ili += lastplusznonme42layer; // add offset to -z endcap; ME42 doesn't need
144  // this.
145 
146  CSCDetId id = detIdFromLayerIndex(ili);
147 
148  // For unganged ME1a we need to turn this ME11 detid into an ME1a one
149  if (me1a)
150  id = CSCDetId(id.endcap(), 1, 4, id.chamber(), id.layer());
151 
152  return std::make_pair(id, ichip);
153 }
uint32_t LongIndexType
CSCDetId detIdFromLayerIndex(IndexType ili) const
uint16_t IndexType

◆ detIdFromGasGainIndex()

CSCIndexerBase::GasGainIndexType CSCIndexerPostls1::detIdFromGasGainIndex ( IndexType  igg) const
overridevirtual

CSCDetId + HV segment + chip within chamber from conditions data gas gain index.

Warning
This function changes meaning with ganged and unganged ME1/1a. If ME1/1a is ganged then an ME1/1a gas gain index returns ME1/1b CSCDetId + HVsegment=1 + chip=5.
If ME1/1a is unganged then an ME1/1a gas gain index returns ME1/1a CSCDetId + HVsegment=1 + chip# in range 1-3.

Implements CSCIndexerBase.

Definition at line 165 of file CSCIndexerPostls1.cc.

References relativeConstraints::chamber, chipsPerLayer(), l1ctLayer2EG_cff::id, createfilelist::int, nano_mu_digi_cff::layer, CSCIndexerBase::sectorsPerLayer(), and pfDeepBoostedJetPreprocessParams_cfi::upper_bound.

165  {
166  const int n_types = 20;
167  const IndexType type_starts[n_types] = {1, 1081, 4321, 6913, 8533, 13933, 15553, 20953, 22573, 23653,
168  26893, 29485, 31105, 36505, 38125, 43525, 45145, 50545, 55945, 56593};
169  //+1/1 +1/2 +1/3 +2/1 +2/2 +3/1 +3/2 +4/1 -1/1 -1/2 -1/3 -2/1
170  //-2/2 -3/1 -3/2 -4/1 +4/2 -4/2 +1/4 -1/4
171 
172  const int endcaps[n_types] = {1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2};
173  const int stations[n_types] = {1, 1, 1, 2, 2, 3, 3, 4, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 1, 1};
174  const int rings[n_types] = {1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 2, 4, 4};
175 
176  // determine chamber type
177  std::vector<IndexType> v_type_starts(type_starts, type_starts + n_types);
178  int type = int(std::upper_bound(v_type_starts.begin(), v_type_starts.end(), igg) - v_type_starts.begin()) - 1;
179 
180  // determine factors for #HVsectors and #chips
181  int sectors_per_layer = sectorsPerLayer(stations[type], rings[type]);
182  int chips_per_layer = chipsPerLayer(stations[type], rings[type]);
183 
184  IndexType igg_chamber_etc = igg - type_starts[type] + 1;
185 
186  IndexType igg_chamber_and_layer = (igg_chamber_etc - 1) / sectors_per_layer + 1;
187 
188  // extract chamber & layer
189  int chamber = (igg_chamber_and_layer - 1) / 6 + 1;
190  int layer = (igg_chamber_and_layer - 1) % 6 + 1;
191 
192  IndexType igg_hvseg_etc = (igg_chamber_etc - 1) % sectors_per_layer + 1;
193 
194  // extract HVsegment and chip numbers
195  IndexType hvsegment = (igg_hvseg_etc - 1) / chips_per_layer + 1;
196  IndexType chip = (igg_hvseg_etc - 1) % chips_per_layer + 1;
197 
198  CSCDetId id(endcaps[type], stations[type], rings[type], chamber, layer);
199  return std::make_tuple(id, hvsegment, chip);
200 }
uint16_t IndexType
IndexType sectorsPerLayer(IndexType is, IndexType ir) const
IndexType chipsPerLayer(IndexType is, IndexType ir) const override

◆ detIdFromStripChannelIndex()

std::pair< CSCDetId, CSCIndexerBase::IndexType > CSCIndexerPostls1::detIdFromStripChannelIndex ( LongIndexType  ichi) const
overridevirtual

Decode CSCDetId from various indexes and labels

Implements CSCIndexerBase.

Definition at line 6 of file CSCIndexerPostls1.cc.

References relativeConstraints::chamber, CSCIndexerBase::detIdFromLayerIndex(), makeMuonMisalignmentScenario::endcap, and nano_mu_digi_cff::layer.

6  {
7  const LongIndexType lastnonme1a = 252288; // channels with ME42 installed
8  const LongIndexType lastpluszme1a = 262656; // last unganged ME1a +z channel = 252288 + 10368
9  const LongIndexType lastnonme42 = 217728; // channels in 2008 installed chambers
10  const LongIndexType lastplusznonme42 = 108864; // = 217728/2
11  const LongIndexType firstme13 = 34561; // First channel of ME13
12  const LongIndexType lastme13 = 48384; // Last channel of ME13
13 
14  const IndexType lastnonme42layer = 2808;
15  const IndexType lastplusznonme42layer = 1404; // = 2808/2
16  const IndexType firstme13layer = 433; // = 72*6 + 1 (ME13 chambers are 72-108 in range 1-234)
17  const IndexType lastme13layer = 648; // = 108*6
18 
19  bool me1a = false;
20 
21  // Most chambers (except ME13 & ME1a) have 80 channels index width allocated
22  // unganged ME1a have 48 channels
23  // ME13 have 64 channels
24  IndexType nchan = 80;
25 
26  // Set endcap to +z initially
27  IndexType ie = 1;
28 
29  LongIndexType istart = 0;
30  IndexType layerOffset = 0;
31 
32  if (isi <= lastnonme42) {
33  // Chambers as of 2008 Installation (ME11 keeps the same #of channels 80
34  // allocated for it in the index)
35  if (isi > lastplusznonme42) {
36  ie = 2;
37  isi -= lastplusznonme42;
38  }
39  if (isi > lastme13) // after ME13
40  {
41  istart = lastme13;
42  layerOffset = lastme13layer;
43  } else if (isi >= firstme13) // ME13
44  {
45  istart = firstme13 - 1;
46  layerOffset = firstme13layer - 1;
47  nchan = 64;
48  }
49  } else if (isi <= lastnonme1a) // ME42 chambers
50  {
51  istart = lastnonme42;
52  layerOffset = lastnonme42layer;
53  // don't care about ie, as ME42 stretch of indices is uniform
54  } else // Unganged ME1a channels
55  {
56  me1a = true;
57  if (isi > lastpluszme1a)
58  ie = 2;
59  istart = lastnonme1a;
60  nchan = 48;
61  // layerOffset stays 0, as we want to map them onto ME1b's layer indices
62  }
63 
64  isi -= istart; // remove earlier group(s)
65  IndexType ichan = (isi - 1) % nchan + 1;
66  IndexType ili = (isi - 1) / nchan + 1;
67  ili += layerOffset; // add appropriate offset for earlier group(s)
68  if (ie != 1)
69  ili += lastplusznonme42layer; // add offset to -z endcap; ME42 doesn't need
70  // this.
71 
72  CSCDetId id = detIdFromLayerIndex(ili);
73 
74  // For unganged ME1a we need to turn this ME11 detid into an ME1a one
75  if (me1a)
76  id = CSCDetId(id.endcap(), 1, 4, id.chamber(), id.layer());
77 
78  return std::make_pair(id, ichan);
79 }
uint32_t LongIndexType
CSCDetId detIdFromLayerIndex(IndexType ili) const
uint16_t IndexType

◆ maxChipIndex()

IndexType CSCIndexerPostls1::maxChipIndex ( ) const
inlineoverridevirtual

Implements CSCIndexerBase.

Definition at line 51 of file CSCIndexerPostls1.h.

51 { return 17064; }

◆ maxGasGainIndex()

IndexType CSCIndexerPostls1::maxGasGainIndex ( ) const
inlineoverridevirtual

Implements CSCIndexerBase.

Definition at line 52 of file CSCIndexerPostls1.h.

52 { return 57240; }

◆ maxStripChannelIndex()

LongIndexType CSCIndexerPostls1::maxStripChannelIndex ( ) const
inlineoverridevirtual

Implements CSCIndexerBase.

Definition at line 50 of file CSCIndexerPostls1.h.

50 { return 273024; }

◆ name()

std::string CSCIndexerPostls1::name ( ) const
inlineoverridevirtual

Reimplemented from CSCIndexerBase.

Definition at line 46 of file CSCIndexerPostls1.h.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

46 { return "CSCIndexerPostls1"; }

◆ onlineRingsInStation()

IndexType CSCIndexerPostls1::onlineRingsInStation ( IndexType  is) const
inlineoverridevirtual

How many online rings are there in station 'is'=1, 2, 3, 4 ?

Warning
: ME1a and ME1b are considered as two separate 'online' rings for the upgrade

Implements CSCIndexerBase.

Definition at line 63 of file CSCIndexerPostls1.h.

63  {
64  const IndexType nrings[5] = {0, 4, 2, 2, 2};
65  return nrings[is];
66  }
uint16_t IndexType

◆ sectorStart()

IndexType CSCIndexerPostls1::sectorStart ( IndexType  ie,
IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Linear index for 1st Gas gain sector in ring 'ir' of station 'is' in endcap 'ie'.

Endcap label range 1-2, Station label range 1-4, Ring label range 1-4 (4=ME1a)

Warning
: unganged ME1a has 3 own chips, which are currently appended to the end of the index range, ME1b still keeps 5 chips with the chip #5 index being unused.

Implements CSCIndexerBase.

Definition at line 209 of file CSCIndexerPostls1.h.

209  {
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  }
uint16_t IndexType

◆ stripChannelsPerLayer()

IndexType CSCIndexerPostls1::stripChannelsPerLayer ( IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Number of strip channel indices for a layer in a chamber defined by station number 'is' and ring number 'ir'.

Station label range 1-4, Ring label range 1-4 (4=ME1a)

This depends on the ordering of the channels in the database. In the currently implemented upgrade scenario, the ME1b still keeps the 80 indices wide ranges inherited from Startup (with the last 65-80 indices remaining unused), while the ME1/1A unganged channels get their own 48 indices wide ranges.

Implements CSCIndexerBase.

Definition at line 120 of file CSCIndexerPostls1.h.

120  {
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  }
uint16_t IndexType

◆ stripChannelsPerOfflineLayer()

IndexType CSCIndexerPostls1::stripChannelsPerOfflineLayer ( IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Number of strip readout channels per layer in an offline chamber with ring 'ir' and station 'is'.

Assume ME1a has 48 unganged readout channels.

Implements CSCIndexerBase.

Definition at line 74 of file CSCIndexerPostls1.h.

74  {
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  }
uint16_t IndexType

◆ stripChannelsPerOnlineLayer()

IndexType CSCIndexerPostls1::stripChannelsPerOnlineLayer ( IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Number of strip readout channels per layer in an online chamber with ring 'ir' and station 'is'.

Assume ME1a has 48 unganged readout channels. Online chambers ME1a and ME1b are separate.

Implements CSCIndexerBase.

Definition at line 86 of file CSCIndexerPostls1.h.

86  {
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  }
uint16_t IndexType

◆ stripChannelStart()

LongIndexType CSCIndexerPostls1::stripChannelStart ( IndexType  ie,
IndexType  is,
IndexType  ir 
) const
inlineoverridevirtual

Linear index for 1st strip channel in ring 'ir' of station 'is' in endcap 'ie'.

Endcap label range 1-2, Station label range 1-4, Ring label range 1-4 (4=ME1a)

WARNING: ME1a channels are NOT considered the last 16 of the 80 total in each layer of an ME11 chamber!

Implements CSCIndexerBase.

Definition at line 135 of file CSCIndexerPostls1.h.

135  {
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  }
uint32_t LongIndexType