#include <CSCIndexerBase.h>
Public Types | |
typedef boost::tuple< CSCDetId, IndexType, IndexType > | GasGainIndexType |
typedef uint16_t | IndexType |
typedef uint32_t | LongIndexType |
reverseIndexMethods | |
std::vector< IndexType > | chamberLabel_ |
CSCDetId | detIdFromChamberIndex (IndexType ici) const |
CSCDetId | detIdFromLayerIndex (IndexType ili) const |
virtual std::pair< CSCDetId, IndexType > | detIdFromStripChannelIndex (LongIndexType ichi) const =0 |
virtual std::pair< CSCDetId, IndexType > | detIdFromChipIndex (IndexType ichi) const =0 |
virtual GasGainIndexType | detIdFromGasGainIndex (IndexType igg) const =0 |
virtual int | dbIndex (const CSCDetId &id, int &channel) const =0 |
IndexType | chamberLabelFromChamberIndex (IndexType) const |
CSCDetId | detIdFromChamberLabel (IndexType ie, IndexType icl) const |
ABC for CSCIndexer classes.
A CSCIndexer class provides a linear index for various sublevels of the endcap muon CSC system for use in access to information stored in the Conditions Database. Only concrete derived classes can be instantiated.
It supplies a linear index for:
The chamber and layer may be specified by CSCDetId or labels for endcap, station, ring, chamber, layer.
The strip channel is a value 1-80 for most chambers.
ME1/3 and ME1/1B have 64 channels.
ME1/1A has 16 channels at CMS startup (2008-2013) and 48 channels after Long Shutdown 1 ('LS1' 2013-2014)
The chip number is a value 1-30 (or 24: ME13 chambers have only 24 chips.)
The main user interface is the set of functions
chamberIndex(.)
layerIndex(.)
stripChannelIndex(.)
chipIndex(.)
But the other functions are public since they may be useful in contexts other than for Conditions Data for which the above functions are intended.
The terminology "label" can be confusing.
The CSC project typically refers to an element of the CSC detector by hardware labels endcap (+z, -z), station (1-4), ring (1-3), chamber (1-18 or 1-36 depending on ring), layer (1-6). Strips (and wiregroups) are number 1-N where N is the total number of strips in a given layer.
Offline, we turn +z, -z into integers 1, 2 and extend the ring index to 4 to mean ME1/1A (leaving ring 1 in station 1 to mean ME1/1B when dealing with strip planes. Since there is only one common wire plane sometimes ring 1, station 1 means the entire ME1/1 and sometimes just ME1/1B.) So in offline code, when we talk about "labels" for an element, we typically mean these integer values.
For example, strip 71 of layer 4 of chamber 17 of ME-3/1 is labelled {ie=2, is=3, ir=1, ic=17, il=4, istrip=71}. However, in CSCIndexer classes, "label" may be generalized to mean more than this. For example, the "chamberLabel_" vector encodes these integer labels for a chamber, and does not just mean the value ic=1-18 or 36.
Definition at line 69 of file CSCIndexerBase.h.
typedef boost::tuple<CSCDetId, IndexType, IndexType > CSCIndexerBase::GasGainIndexType |
Definition at line 77 of file CSCIndexerBase.h.
typedef uint16_t CSCIndexerBase::IndexType |
Definition at line 71 of file CSCIndexerBase.h.
typedef uint32_t CSCIndexerBase::LongIndexType |
Definition at line 72 of file CSCIndexerBase.h.
CSCIndexerBase::CSCIndexerBase | ( | ) |
Definition at line 3 of file CSCIndexerBase.cc.
References chamberLabel_, chambersInRingOfStation(), KineDebug3::count(), and ringsInStation().
|
virtual |
Definition at line 23 of file CSCIndexerBase.cc.
Linear index to label each CSC in CSC system. Argument is the CSCDetId of some CSC chamber.
Output is 1-468 (CSCs 2008) 469-540 (with ME42)
Definition at line 207 of file CSCIndexerBase.h.
References relativeConstraints::chamber, chamberIndex(), makeMuonMisalignmentScenario::endcap, relativeConstraints::ring, and relativeConstraints::station.
|
inline |
Linear index for chamber 'ic' in ring 'ir' of station 'is' in endcap 'ie', in range 1-468 (CSCs 2008) or 469-540 (ME42)
Definition at line 193 of file CSCIndexerBase.h.
References startChamberIndexInEndcap().
Referenced by CSCConditions::anodeBXoffset(), chamberIndex(), CSCConditions::chamberTimingCorrection(), CSCConditions::fillBadStripWord(), CSCConditions::fillBadWireWord(), CSCConditions::isInBadChamber(), and layerIndex().
CSCIndexerBase::IndexType CSCIndexerBase::chamberLabelFromChamberIndex | ( | IndexType | ici | ) | const |
Encoded chambers label value from cache for input chamber index. For debugging only!
Definition at line 25 of file CSCIndexerBase.cc.
References chamberLabel_.
How many chambers are there in an "offline" ring ir of station is? Works for ME1a (ring 4 of ME1) too.
Definition at line 130 of file CSCIndexerBase.h.
Referenced by CSCIndexerBase().
Linear index for Buckeye chip 'ichip' in layer labelled by CSCDetId 'id'.
Definition at line 334 of file CSCIndexerBase.h.
References relativeConstraints::chamber, chipIndex(), makeMuonMisalignmentScenario::endcap, relativeConstraints::ring, and relativeConstraints::station.
|
inline |
Linear index for Buckeye chip 'ichip' in layer 'il' of chamber 'ic' of ring 'ir' in station 'is' of endcap 'ie'.
Definition at line 322 of file CSCIndexerBase.h.
References chipsPerLayer(), and chipStart().
Referenced by CSCConditions::chipCorrection(), chipIndex(), and gasGainIndex().
Chip number in a chamber for a Buckeye chip processing strip 'istrip'.
Input is hardware strip channel 1-80.
Output is 1-5.
Definition at line 347 of file CSCIndexerBase.h.
Number of Buckeye chips indices per layer in a chamber in ring 'ir' of station 'is'.
Station label range 1-4, Ring label range 1-4 (4=ME1a)
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
Referenced by chipIndex(), gasGainIndex(), and sectorsPerLayer().
|
pure virtual |
Number of Buckeye chips per layer in an online chamber in ring 'ir' of station 'is'. Works for ME1a (ring 4 of ME1) too.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
Referenced by sectorsPerOnlineLayer().
|
pure virtual |
Linear index for 1st Buckeye chip 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)
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
Referenced by chipIndex().
|
pure virtual |
Create the "Igor Index" for a strip channel. This is integer ie*100000 + is*10000 + ir*1000 + ic*10 + il.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
CSCDetId for a physical chamber labelled by the chamber index (1-468 non-ME4/2, 469-540 ME4/2)
No distinction between ME1/1a and ME1/1b.
Definition at line 101 of file CSCIndexerBase.cc.
References chamberLabel_, detIdFromChamberLabel(), and label.
Referenced by detIdFromLayerIndex().
Decode CSCDetId from the encoded chamber values in chamberLabel cache vector. Requires endcap label since that is not encoded in cache.
Definition at line 91 of file CSCIndexerBase.cc.
References label.
Referenced by detIdFromChamberIndex().
|
pure virtual |
CSCDetId + chip within chamber from conditions data chip index.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
pure virtual |
CSCDetId + HV segment + chip within chamber from conditions data gas gain index.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
CSCDetId for a physical layer labelled by the layer index (1-2808 non-ME4/2, 2809-3240 ME4/2)
No distinction between ME1/1a and ME1/1b.
Definition at line 127 of file CSCIndexerBase.cc.
References relativeConstraints::chamber, detIdFromChamberIndex(), makeMuonMisalignmentScenario::endcap, relativeConstraints::ring, and relativeConstraints::station.
Referenced by CSCIndexerStartup::detIdFromChipIndex(), CSCIndexerPostls1::detIdFromChipIndex(), CSCIndexerStartup::detIdFromStripChannelIndex(), and CSCIndexerPostls1::detIdFromStripChannelIndex().
|
pure virtual |
CSCDetId + strip channel within layer from conditions data strip index.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
inline |
Linear index for Gas gain sector, based on CSCDetId 'id', cathode strip 'istrip' and anode wire 'iwire'
Definition at line 436 of file CSCIndexerBase.h.
References relativeConstraints::chamber, chipIndex(), makeMuonMisalignmentScenario::endcap, gasGainIndex(), hvSegmentIndex(), relativeConstraints::ring, and relativeConstraints::station.
|
inline |
Linear index for Gas gain sector, based on the HV segment# and the chip# located in layer 'il' of chamber 'ic' of ring 'ir' in station 'is' of endcap 'ie'.
Output is 1-45144 (CSCs 2008) and 45145-55944 (ME42) and 55945-57240 (ME1a)
Definition at line 415 of file CSCIndexerBase.h.
References chipsPerLayer(), sectorsPerLayer(), and sectorStart().
Referenced by CSCConditions::gasGainCorrection(), and gasGainIndex().
|
inline |
Linear index for Gas gain sector, based on CSCDetId 'id', the HV segment# and the chip#. Note: to allow method overloading, the parameters order is reversed comparing to the (id,strip,wire) method
Output is 1-45144 (CSCs 2008) and 45145-55944 (ME42) and 55945-57240 (ME1a)
Definition at line 459 of file CSCIndexerBase.h.
References relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, gasGainIndex(), relativeConstraints::ring, and relativeConstraints::station.
CSCIndexerBase::IndexType CSCIndexerBase::hvSegmentIndex | ( | IndexType | is, |
IndexType | ir, | ||
IndexType | iwire | ||
) | const |
Linear index inside a chamber for HV segment given station, ring, and wiregroup number.
Output is 1-5.
ME1a (ir=4), ME1b(ir=1) and whole ME11 are all assumed to have the same single HV segment
Definition at line 48 of file CSCIndexerBase.cc.
Referenced by gasGainIndex().
Number of HV segments per layer in a chamber in ring ir of station is.
Station label range 1-4, Ring label range 1-4 (4=ME1a)
ME1a (ir=4), ME1b(ir=1) and whole ME11 are all assumed to have the same single HV segment
Definition at line 360 of file CSCIndexerBase.h.
Referenced by sectorsPerLayer(), and sectorsPerOnlineLayer().
Linear index to label each hardware layer in CSC system. Argument is the CSCDetId of some CSC layer.
Output is 1-2808 (CSCs 2008) 2809-3240 (ME42)
Definition at line 237 of file CSCIndexerBase.h.
References relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, layerIndex(), relativeConstraints::ring, and relativeConstraints::station.
|
inline |
Linear index for layer 'il' of chamber 'ic' in ring 'ir' of station 'is' in endcap 'ie', in range 1-2808 (CSCs 2008) or 2809-3240 (ME42).
Definition at line 222 of file CSCIndexerBase.h.
References chamberIndex().
Referenced by layerIndex().
|
inline |
Definition at line 92 of file CSCIndexerBase.h.
|
pure virtual |
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
pure virtual |
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
inline |
Definition at line 93 of file CSCIndexerBase.h.
|
pure virtual |
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
inlinevirtual |
Reimplemented in CSCIndexerPostls1, and CSCIndexerStartup.
Definition at line 82 of file CSCIndexerBase.h.
Referenced by config.CFG::__str__(), CSCRecoBadChannelsAnalyzer::analyze(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().
How many offline rings are there in station 'is'=1, 2, 3, 4 ?
Definition at line 121 of file CSCIndexerBase.h.
How many online rings are there in station 'is'=1, 2, 3, 4 ?
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
How many physical rings are there in station 'is'=1, 2, 3, 4 ?
Definition at line 104 of file CSCIndexerBase.h.
Referenced by CSCIndexerBase().
Number of Gas Gain sectors per layer in a chamber in ring ir of station is.
Station label range 1-4, Ring label range 1-4 (4=ME1a)
Definition at line 384 of file CSCIndexerBase.h.
References chipsPerLayer(), and hvSegmentsPerLayer().
Referenced by CSCIndexerStartup::detIdFromGasGainIndex(), CSCIndexerPostls1::detIdFromGasGainIndex(), and gasGainIndex().
Number of Gas Gain sectors per layer in an online chamber in ring 'ir' of station 'is'. Works for ME1a (ring 4 of ME1) too.
The difference between this and sectorsPerLayer completely depends on the difference between chipsPerOnlineLayer and chipsPerLayer
Definition at line 164 of file CSCIndexerBase.h.
References chipsPerOnlineLayer(), and hvSegmentsPerLayer().
|
pure virtual |
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)
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
Referenced by gasGainIndex().
|
inline |
Starting index for first chamber in ring 'ir' of station 'is' in endcap 'ie', in range 1-468 (CSCs 2008) or 469-540 (ME42).
Definition at line 179 of file CSCIndexerBase.h.
Referenced by chamberIndex().
|
inline |
Linear index for strip channel 'istrip' in layer labeled by CSCDetId 'id'
Definition at line 289 of file CSCIndexerBase.h.
References relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, relativeConstraints::ring, relativeConstraints::station, and stripChannelIndex().
|
inline |
Linear index for strip channel istrip in layer 'il' of chamber 'ic' of ring 'ir' in station 'is' of endcap 'ie'.
Definition at line 278 of file CSCIndexerBase.h.
References stripChannelsPerLayer(), and stripChannelStart().
Referenced by CSCConditions::crossTalk(), CSCConditions::crosstalkIntercept(), CSCConditions::crosstalkSlope(), CSCConditions::gain(), CSCConditions::noiseMatrix(), CSCConditions::pedestal(), CSCConditions::pedestalSigma(), and stripChannelIndex().
|
pure virtual |
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. E.g., in startup scenario there are 80 indices allocated per ME1/1 layer with 1-64 belonging to ME1b and 65-80 belonging to ME1a. So the ME1/a database indices are mapped to extend the ME1/b index ranges, which is how the raw hardware chnnels numbering is implemented.
In the currently implemented upgrade scenario on the other hand, the ME1b still keeps the 80 indices wide ranges (with the last 16 of them remaining unused), while the ME1/1A gets its own 48 indices wide ranges.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
Referenced by stripChannelIndex().
|
pure virtual |
Number of strip readout channels per layer in an offline chamber with ring 'ir' and station 'is'. Works for ME1a (ring 4 of ME1) too.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
pure virtual |
Number of strip readout channels per layer in an online chamber with ring 'ir' and station 'is'. Works for ME1a (ring 4 of ME1) too.
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
pure virtual |
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)
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
Referenced by stripChannelIndex().
|
protected |
Encode a chamber's is, ir, ic values as is*1000 + ir*100 + ic in linear vector with serial index 1-270. Save space in this vector by not storing ie.
Definition at line 545 of file CSCIndexerBase.h.
Referenced by chamberLabelFromChamberIndex(), CSCIndexerBase(), and detIdFromChamberIndex().