#include <CSCIndexer.h>
Public Types | |
typedef uint16_t | IndexType |
typedef uint32_t | LongIndexType |
Private Member Functions | |
void | fillChamberLabel () const |
Private Attributes | |
std::vector< IndexType > | chamberLabel |
Creates a linear index for various sublevels of the endcap muon CSC system.
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 (or 64: ME13 chambers have only 64 channels.) 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.
Definition at line 44 of file CSCIndexer.h.
typedef uint16_t CSCIndexer::IndexType |
Definition at line 50 of file CSCIndexer.h.
typedef uint32_t CSCIndexer::LongIndexType |
Definition at line 51 of file CSCIndexer.h.
|
inline |
Definition at line 53 of file CSCIndexer.h.
|
inline |
Definition at line 54 of file CSCIndexer.h.
Linear index to label each CSC in CSC system. Argument is the CSCDetId of some CSCChamber.
Output is 1-468 (CSCs 2008) 469-540 (ME42)
WARNING: Do not input ME1a values (i.e. ring '4'): does not consider ME1a and ME1b to be separate, No sanity checking on input value: if you supply an ME1a CSCDetId then you'll get nonsense.
Definition at line 66 of file CSCIndexer.h.
References Reference_intrackfit_cff::endcap, relativeConstraints::ring, and relativeConstraints::station.
Referenced by CSCBadChambers::isInBadChamber(), CSCChamberTimeCorrections::item(), layerIndex(), CSCChamberTimeCorrectionsValues::prefill(), and cond::PayLoadInspector< DataT >::summary().
|
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 99 of file CSCIndexer.h.
References startChamberIndexInEndcap().
CSCIndexer::IndexType CSCIndexer::chamberLabelFromChamberIndex | ( | IndexType | ici | ) | const |
How many chambers are there in ring ir of station is?
Works for ME1a (ring 4 of ME1) too.
Definition at line 127 of file CSCIndexer.h.
Referenced by fillChamberLabel().
|
inline |
Linear index for Buckeye chip 'ichip' in layer 'il' of chamber 'ic' of ring 'ir' in station 'is' of endcap 'ie'.
Output is 1-13608 (CSCs 2008) or 13609-15768 (ME42).
WARNING: Use at your own risk! You must input labels within hardware ranges. No trapping on out-of-range values!
Definition at line 237 of file CSCIndexer.h.
References chipsPerLayer(), and chipStart().
Referenced by CSCConditions::chipCorrection(), chipIndex(), gasGainIndex(), CSCDBChipSpeedCorrection::item(), and CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection().
Linear index for Buckeye chip 'ichip' in layer labelled by CSCDetId 'id'.
Output is 1-13608 (CSCs 2008) or 13609-15768 (ME42).
WARNING: Use at your own risk! The supplied CSCDetId must be a layer id. No trapping on out-of-range values!
Definition at line 252 of file CSCIndexer.h.
References chipIndex(), Reference_intrackfit_cff::endcap, relativeConstraints::ring, and relativeConstraints::station.
Linear index for Buckeye chip processing strip 'istrip'.
Output is 1-5.
WARNING: Use at your own risk! The supplied CSCDetId must be a strip id 1-80 ME1/1a strips must be 65-80 No trapping on out-of-range values!
Definition at line 266 of file CSCIndexer.h.
Number of Buckeye chips per layer in a chamber in ring ir of station is.
Station label range 1-4, Ring label range 1-3.
WARNING: ME1a channels are the last 1 of the 5 total in each layer of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
Considers ME42 as standard 5 chip per layer chambers.
Definition at line 202 of file CSCIndexer.h.
Referenced by chipIndex(), gasGainIndex(), and sectorsPerLayer().
Linear index for 1st Buckey chip in ring 'ir' of station 'is' in endcap 'ie'.
Endcap label range 1-2, Station label range 1-4, Ring label range 1-3.
WARNING: ME1a channels are the last 1 of the 5 chips total in each layer of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
Definition at line 215 of file CSCIndexer.h.
Referenced by chipIndex().
int CSCIndexer::dbIndex | ( | const CSCDetId & | id, |
int & | channel | ||
) |
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 reset to channels 65-80 of ME11.
Definition at line 240 of file CSCIndexer.cc.
Referenced by CSCValidation::doADCTiming(), CSCValidation::doAFEBTiming(), CSCValidation::doCompTiming(), CSCValidation::doGasGain(), CSCPedestals::item(), CSCGains::item(), CSCNoiseMatrix::item(), and CSCcrosstalk::item().
Definition at line 62 of file CSCIndexer.cc.
References chamberLabel, detIdFromChamberLabel(), fillChamberLabel(), and diffTwoXMLs::label.
Referenced by detIdFromLayerIndex(), CSCConditions::fillBadStripWords(), CSCConditions::fillBadWireWords(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), and cond::PayLoadInspector< DataT >::summary().
Definition at line 24 of file CSCIndexer.cc.
References CSCDetId, i, relativeConstraints::ring, startChamberIndexInEndcap(), and relativeConstraints::station.
Definition at line 109 of file CSCIndexer.cc.
References CSCDetId, and diffTwoXMLs::label.
Referenced by detIdFromChamberIndex().
std::pair< CSCDetId, CSCIndexer::IndexType > CSCIndexer::detIdFromChipIndex | ( | IndexType | ichi | ) | const |
Definition at line 185 of file CSCIndexer.cc.
References detIdFromLayerIndex().
Decode CSCDetId from various indexes and labels
Definition at line 120 of file CSCIndexer.cc.
References CSCDetId, detIdFromChamberIndex(), Reference_intrackfit_cff::endcap, relativeConstraints::ring, and relativeConstraints::station.
Referenced by detIdFromChipIndex(), and detIdFromStripChannelIndex().
std::pair< CSCDetId, CSCIndexer::IndexType > CSCIndexer::detIdFromStripChannelIndex | ( | LongIndexType | ichi | ) | const |
Definition at line 129 of file CSCIndexer.cc.
References detIdFromLayerIndex(), and nchan.
Referenced by operator<<().
|
private |
Definition at line 4 of file CSCIndexer.cc.
References chamberLabel, chambersInRingOfStation(), prof2calltree::count, and ringsInStation().
Referenced by chamberLabelFromChamberIndex(), and detIdFromChamberIndex().
|
inline |
Linear index for Gas gain sector, based on CSCDetId 'id', cathode strip 'istrip' and anode wire 'iwire'
Output is 1-45144 (CSCs 2008) and 45145-55944 (ME42).
WARNING: Use at your own risk! You must input labels within hardware ranges (e.g., 'id' must correspond to a specific layer 1-6). No trapping on out-of-range values!
Definition at line 370 of file CSCIndexer.h.
References Reference_intrackfit_cff::endcap, relativeConstraints::ring, and relativeConstraints::station.
Referenced by CSCDBGasGainCorrection::item().
|
inline |
Linear index for Gas gain sector, based on the cathode strip 'istrip' and anode wire 'iwire' 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).
WARNING: Use at your own risk! You must input labels within hardware ranges. No trapping on out-of-range values!
Definition at line 383 of file CSCIndexer.h.
References chipIndex(), chipsPerLayer(), hvSegmentIndex(), sectorsPerLayer(), and sectorStart().
Linear index for HV segment
Output is 1-5.
WARNING: Use at your own risk! The supplied CSCDetId must be chamber station, ring, and wire. No trapping on out-of-range values!
Definition at line 303 of file CSCIndexer.h.
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-3.
WARNING: ME1a channels are the last 1 of the 5 total in each layer of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
Definition at line 278 of file CSCIndexer.h.
Referenced by sectorsPerLayer().
Linear index to label each hardware layer in CSC system. Argument is the CSCDetId of some CSCLayer.
Output is 1-2808 (CSCs 2008) 2809-3240 (ME42)
WARNING: Do not input ME1a values (i.e. ring '4'): does not consider ME1a and ME1b to be separate, No sanity checking on input value: if you supply an ME1a CSCDetId then you'll get nonsense.
Definition at line 80 of file CSCIndexer.h.
References Reference_intrackfit_cff::endcap, relativeConstraints::ring, and relativeConstraints::station.
Referenced by CSCConditions::badStripWord(), CSCConditions::badWireWord(), CSCConditions::fillBadStripWords(), CSCConditions::fillBadWireWords(), and cond::PayLoadInspector< DataT >::summary().
|
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 107 of file CSCIndexer.h.
References chamberIndex().
How many rings are there in station is=1, 2, 3, 4 ?
BEWARE! Includes ME42 so claims 2 rings in station 4. There is only 1 at CSC installation 2008.
Definition at line 117 of file CSCIndexer.h.
Referenced by fillChamberLabel().
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-3.
WARNING: ME1a channels are the last 1 of the 5 total in each layer of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
Definition at line 291 of file CSCIndexer.h.
References chipsPerLayer(), and hvSegmentsPerLayer().
Referenced by gasGainIndex().
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-3.
WARNING: ME1a channels are the last 1 of the 5 chips total in each layer of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
Definition at line 342 of file CSCIndexer.h.
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 88 of file CSCIndexer.h.
Referenced by chamberIndex(), and detIdFromChamberIndex_OLD().
|
inline |
Linear index for strip channel istrip in layer 'il' of chamber 'ic' of ring 'ir' in station 'is' of endcap 'ie'.
Output is 1-217728 (CSCs 2008) or 217729-252288 (ME42).
WARNING: Use at your own risk! You must input labels within hardware ranges. No trapping on out-of-range values!
Definition at line 176 of file CSCIndexer.h.
References stripChannelsPerLayer(), and stripChannelStart().
Referenced by CSCDBNoiseMatrix::item(), CSCDBPedestals::item(), CSCDBGains::item(), CSCDBCrosstalk::item(), and stripChannelIndex().
|
inline |
Linear index for strip channel 'istrip' in layer labelled by CSCDetId 'id'.
Output is 1-217728 (CSCs 2008) or 217729-252288 (ME42).
WARNING: Use at your own risk! The supplied CSCDetId must be a layer id. No trapping on out-of-range values!
Definition at line 189 of file CSCIndexer.h.
References Reference_intrackfit_cff::endcap, relativeConstraints::ring, relativeConstraints::station, and stripChannelIndex().
Number of strip channels per layer in a chamber in ring ir of station is.
Station label range 1-4, Ring label range 1-3.
WARNING: ME1a channels are the last 16 of the 80 total in each layer of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
Considers ME42 as standard 80-strip per layer chambers.
Definition at line 142 of file CSCIndexer.h.
Referenced by stripChannelIndex().
|
inline |
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-3.
WARNING: ME1a channels are the last 16 of the 80 total in each layer of an ME11 chamber, and an input ir=4 is invalid and will give nonsense.
Definition at line 155 of file CSCIndexer.h.
Referenced by stripChannelIndex().
|
mutableprivate |
Definition at line 413 of file CSCIndexer.h.
Referenced by chamberLabelFromChamberIndex(), detIdFromChamberIndex(), and fillChamberLabel().