#include <CSCIndexerBase.h>
Public Types | |
typedef boost::tuple< CSCDetId, IndexType, IndexType > | GasGainIndexType |
typedef uint16_t | IndexType |
typedef uint32_t | LongIndexType |
Protected Member Functions | |
CSCDetId | detIdFromChamberLabel (IndexType ie, IndexType icl) const |
Protected Attributes | |
std::vector< IndexType > | chamberLabel_ |
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 55 of file CSCIndexerBase.h.
typedef boost::tuple<CSCDetId, IndexType, IndexType > CSCIndexerBase::GasGainIndexType |
Definition at line 64 of file CSCIndexerBase.h.
typedef uint16_t CSCIndexerBase::IndexType |
Definition at line 59 of file CSCIndexerBase.h.
typedef uint32_t CSCIndexerBase::LongIndexType |
Definition at line 60 of file CSCIndexerBase.h.
CSCIndexerBase::CSCIndexerBase | ( | ) |
Definition at line 3 of file CSCIndexerBase.cc.
References chamberLabel_, chambersInRingOfStation(), prof2calltree::count, and ringsInStation().
|
virtual |
Definition at line 27 of file CSCIndexerBase.cc.
|
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 186 of file CSCIndexerBase.h.
References startChamberIndexInEndcap().
Referenced by chamberIndex(), and layerIndex().
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 201 of file CSCIndexerBase.h.
References chamberIndex(), Reference_intrackfit_cff::endcap, relativeConstraints::ring, and relativeConstraints::station.
CSCIndexerBase::IndexType CSCIndexerBase::chamberLabelFromChamberIndex | ( | IndexType | ici | ) | const |
Encoded chambers label value from cache for input chamber index. For debugging only!
Definition at line 30 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 118 of file CSCIndexerBase.h.
Referenced by CSCIndexerBase().
|
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 316 of file CSCIndexerBase.h.
References chipsPerLayer(), and chipStart().
Referenced by chipIndex(), and gasGainIndex().
Linear index for Buckeye chip 'ichip' in layer labelled by CSCDetId 'id'.
Definition at line 331 of file CSCIndexerBase.h.
References chipIndex(), Reference_intrackfit_cff::endcap, relativeConstraints::ring, and relativeConstraints::station.
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 344 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 104 of file CSCIndexerBase.cc.
References chamberLabel_, detIdFromChamberLabel(), and diffTwoXMLs::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 92 of file CSCIndexerBase.cc.
References CSCDetId, and diffTwoXMLs::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 134 of file CSCIndexerBase.cc.
References CSCDetId, detIdFromChamberIndex(), Reference_intrackfit_cff::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 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 411 of file CSCIndexerBase.h.
References chipsPerLayer(), sectorsPerLayer(), and sectorStart().
Referenced by gasGainIndex().
|
inline |
Linear index for Gas gain sector, based on CSCDetId 'id', cathode strip 'istrip' and anode wire 'iwire'
Definition at line 428 of file CSCIndexerBase.h.
References chipIndex(), Reference_intrackfit_cff::endcap, gasGainIndex(), hvSegmentIndex(), relativeConstraints::ring, and relativeConstraints::station.
|
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 447 of file CSCIndexerBase.h.
References Reference_intrackfit_cff::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 57 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().
|
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 218 of file CSCIndexerBase.h.
References chamberIndex().
Referenced by layerIndex().
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 234 of file CSCIndexerBase.h.
References Reference_intrackfit_cff::endcap, layerIndex(), relativeConstraints::ring, and relativeConstraints::station.
|
inline |
Definition at line 78 of file CSCIndexerBase.h.
|
pure virtual |
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
pure virtual |
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
inline |
Definition at line 79 of file CSCIndexerBase.h.
|
pure virtual |
Implemented in CSCIndexerPostls1, and CSCIndexerStartup.
|
inlinevirtual |
Reimplemented in CSCIndexerPostls1, and CSCIndexerStartup.
Definition at line 69 of file CSCIndexerBase.h.
Referenced by cuy.divideElement::__init__(), cuy.plotElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), cuy.graphElement::__init__(), config.CFG::__str__(), and Vispa.Views.PropertyView.Property::valueChanged().
How many offline rings are there in station 'is'=1, 2, 3, 4 ?
Definition at line 108 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 91 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 383 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 153 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 170 of file CSCIndexerBase.h.
Referenced by chamberIndex().
|
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 273 of file CSCIndexerBase.h.
References stripChannelsPerLayer(), and stripChannelStart().
Referenced by stripChannelIndex().
|
inline |
Linear index for strip channel 'istrip' in layer labeled by CSCDetId 'id'
Definition at line 285 of file CSCIndexerBase.h.
References Reference_intrackfit_cff::endcap, relativeConstraints::ring, relativeConstraints::station, 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 530 of file CSCIndexerBase.h.
Referenced by chamberLabelFromChamberIndex(), CSCIndexerBase(), and detIdFromChamberIndex().