#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 48 of file CSCIndexer.h.
typedef uint32_t CSCIndexer::LongIndexType |
Definition at line 49 of file CSCIndexer.h.
|
inline |
Definition at line 51 of file CSCIndexer.h.
|
inline |
Definition at line 52 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 64 of file CSCIndexer.h.
References relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, relativeConstraints::ring, and relativeConstraints::station.
Referenced by layerIndex(), and CSCChamberTimeCorrectionsValues::prefill().
|
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 96 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 124 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 234 of file CSCIndexer.h.
References chipsPerLayer(), and chipStart().
Referenced by chipIndex(), gasGainIndex(), 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 248 of file CSCIndexer.h.
References relativeConstraints::chamber, chipIndex(), makeMuonMisalignmentScenario::endcap, phase1PixelTopology::layer, 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 262 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 200 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 213 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 231 of file CSCIndexer.cc.
Referenced by CSCValidation::doADCTiming(), CSCValidation::doAFEBTiming(), CSCValidation::doCompTiming(), CSCValidation::doGasGain(), CSCPedestals::item(), CSCNoiseMatrix::item(), CSCGains::item(), and CSCcrosstalk::item().
Definition at line 61 of file CSCIndexer.cc.
References chamberLabel, detIdFromChamberLabel(), fillChamberLabel(), and label.
Referenced by detIdFromLayerIndex(), and CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection().
Definition at line 24 of file CSCIndexer.cc.
References mps_fire::i, relativeConstraints::ring, startChamberIndexInEndcap(), and relativeConstraints::station.
Definition at line 107 of file CSCIndexer.cc.
References label.
Referenced by detIdFromChamberIndex().
std::pair< CSCDetId, CSCIndexer::IndexType > CSCIndexer::detIdFromChipIndex | ( | IndexType | ichi | ) | const |
Definition at line 178 of file CSCIndexer.cc.
References detIdFromLayerIndex().
Decode CSCDetId from various indexes and labels
Definition at line 117 of file CSCIndexer.cc.
References relativeConstraints::chamber, detIdFromChamberIndex(), makeMuonMisalignmentScenario::endcap, relativeConstraints::ring, and relativeConstraints::station.
Referenced by detIdFromChipIndex(), and detIdFromStripChannelIndex().
std::pair< CSCDetId, CSCIndexer::IndexType > CSCIndexer::detIdFromStripChannelIndex | ( | LongIndexType | ichi | ) | const |
Definition at line 125 of file CSCIndexer.cc.
References detIdFromLayerIndex().
|
private |
Definition at line 4 of file CSCIndexer.cc.
References chamberLabel, chambersInRingOfStation(), submitPVResolutionJobs::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 379 of file CSCIndexer.h.
References relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, phase1PixelTopology::layer, relativeConstraints::ring, and relativeConstraints::station.
|
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 392 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 297 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 272 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 78 of file CSCIndexer.h.
References relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, phase1PixelTopology::layer, 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 104 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 114 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 285 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 351 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 86 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 173 of file CSCIndexer.h.
References stripChannelsPerLayer(), and stripChannelStart().
Referenced by 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 187 of file CSCIndexer.h.
References relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, phase1PixelTopology::layer, 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 140 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 153 of file CSCIndexer.h.
Referenced by stripChannelIndex().
|
mutableprivate |
Definition at line 424 of file CSCIndexer.h.
Referenced by chamberLabelFromChamberIndex(), detIdFromChamberIndex(), and fillChamberLabel().