CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
CSCIndexerStartup Class Reference

#include <CSCIndexerStartup.h>

Inheritance diagram for CSCIndexerStartup:
CSCIndexerBase

Public Member Functions

int dbIndex (const CSCDetId &id, int &channel) const
 
std::pair< CSCDetId, IndexTypedetIdFromChipIndex (IndexType ichi) const
 
GasGainIndexType detIdFromGasGainIndex (IndexType igg) const
 
std::pair< CSCDetId, IndexTypedetIdFromStripChannelIndex (LongIndexType ichi) const
 
std::string name () const
 
 ~CSCIndexerStartup ()
 
maxIndexMethods
LongIndexType maxStripChannelIndex () const
 
IndexType maxChipIndex () const
 
IndexType maxGasGainIndex () const
 
nonIndexCountingMethods
IndexType onlineRingsInStation (IndexType is) const
 
IndexType stripChannelsPerOfflineLayer (IndexType is, IndexType ir) const
 
IndexType stripChannelsPerOnlineLayer (IndexType is, IndexType ir) const
 
IndexType chipsPerOnlineLayer (IndexType is, IndexType ir) const
 
stripIndexMethods
IndexType stripChannelsPerLayer (IndexType is, IndexType ir) const
 
LongIndexType stripChannelStart (IndexType ie, IndexType is, IndexType ir) const
 
chipIndexMethods
IndexType chipsPerLayer (IndexType is, IndexType ir) const
 
IndexType chipStart (IndexType ie, IndexType is, IndexType ir) const
 
gasGainIndexMethods
IndexType sectorStart (IndexType ie, IndexType is, IndexType ir) const
 
- 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 boost::tuple< CSCDetId,
IndexType, IndexType
GasGainIndexType
 
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 for CMS startup (2008-2013) in which most ME4/2 chambers do not exist and the 48 ME1/1A strips are ganged into 16 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 at start-up of CMS in 2008. with rings ME11, ME12, ME13, ME21, ME22, ME31, ME32, ME41 totalling 234 chambers per endcap. But ME42 is appended (to permit simulation studies), 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

CSCIndexerBase::stripChannelIndex returns
1-217728 (CSCs 2008), 217729-252288 (ME42) (and ME1a channels are always channels 65-80 of 1-80 in ME11)

CSCIndexerBase::chipIndex returns
1-13608 (CSCs 2008), 13609-15768 (ME42)

CSCIndexerBase::gasGainIndex returns
1-45144 (CSCs 2008), 45145-55944 (ME42)

Warning
This uses magic numbers galore!!
EVERY LABEL COUNTS FROM ONE NOT ZERO.

Definition at line 35 of file CSCIndexerStartup.h.

Constructor & Destructor Documentation

CSCIndexerStartup::~CSCIndexerStartup ( )

Definition at line 4 of file CSCIndexerStartup.cc.

Member Function Documentation

IndexType CSCIndexerStartup::chipsPerLayer ( IndexType  is,
IndexType  ir 
) const
inlinevirtual

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)

Warning
: the ME1a CFEB is just the last 1 of the 5 total in each layer of an ME11 chamber. So, the input of ir=4 is will just return the same 5 total chips per whole ME11.

Considers ME42 as standard 5 chip per layer chambers.

Implements CSCIndexerBase.

Definition at line 162 of file CSCIndexerStartup.h.

IndexType CSCIndexerStartup::chipsPerOnlineLayer ( IndexType  is,
IndexType  ir 
) const
inlinevirtual

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 startup is considered as a single chamber with 5 chips

Implements CSCIndexerBase.

Definition at line 98 of file CSCIndexerStartup.h.

IndexType CSCIndexerStartup::chipStart ( IndexType  ie,
IndexType  is,
IndexType  ir 
) const
inlinevirtual

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-3.

Warning
: while ME1a chip is the last 1 of the 5 chips total in each layer of an ME11 chamber, here the ME1a input ir=4 defaults to the ME1b start index (ir=4 <=> ir=1).

Implements CSCIndexerBase.

Definition at line 176 of file CSCIndexerStartup.h.

int CSCIndexerStartup::dbIndex ( const CSCDetId id,
int &  channel 
) const
virtual

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.

Implements CSCIndexerBase.

Definition at line 119 of file CSCIndexerStartup.cc.

std::pair< CSCDetId, CSCIndexerBase::IndexType > CSCIndexerStartup::detIdFromChipIndex ( IndexType  ichi) const
virtual

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 63 of file CSCIndexerStartup.cc.

CSCIndexerBase::GasGainIndexType CSCIndexerStartup::detIdFromGasGainIndex ( IndexType  igg) const
virtual

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 137 of file CSCIndexerStartup.cc.

std::pair< CSCDetId, CSCIndexerBase::IndexType > CSCIndexerStartup::detIdFromStripChannelIndex ( LongIndexType  ichi) const
virtual

Decode CSCDetId from various indexes and labels

Implements CSCIndexerBase.

Definition at line 7 of file CSCIndexerStartup.cc.

IndexType CSCIndexerStartup::maxChipIndex ( ) const
inlinevirtual

Implements CSCIndexerBase.

Definition at line 46 of file CSCIndexerStartup.h.

IndexType CSCIndexerStartup::maxGasGainIndex ( ) const
inlinevirtual

Implements CSCIndexerBase.

Definition at line 47 of file CSCIndexerStartup.h.

LongIndexType CSCIndexerStartup::maxStripChannelIndex ( ) const
inlinevirtual

Implements CSCIndexerBase.

Definition at line 45 of file CSCIndexerStartup.h.

std::string CSCIndexerStartup::name ( ) const
inlinevirtual

Reimplemented from CSCIndexerBase.

Definition at line 41 of file CSCIndexerStartup.h.

Referenced by VIDSelectorBase.VIDSelectorBase::initialize().

IndexType CSCIndexerStartup::onlineRingsInStation ( IndexType  is) const
inlinevirtual

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

Warning
: ME1a + ME1b are considered as single ME1/1 'online' rings for the startup

Implements CSCIndexerBase.

Definition at line 59 of file CSCIndexerStartup.h.

IndexType CSCIndexerStartup::sectorStart ( IndexType  ie,
IndexType  is,
IndexType  ir 
) const
inlinevirtual

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
: ME1a chip is the last 1 of the 5 chips total in each layer of an ME11 chamber, and an input ir=4 in this case would give the same result as ir=1

Implements CSCIndexerBase.

Definition at line 201 of file CSCIndexerStartup.h.

IndexType CSCIndexerStartup::stripChannelsPerLayer ( IndexType  is,
IndexType  ir 
) const
inlinevirtual

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 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 channels numbering is implemented.

Implements CSCIndexerBase.

Definition at line 120 of file CSCIndexerStartup.h.

IndexType CSCIndexerStartup::stripChannelsPerOfflineLayer ( IndexType  is,
IndexType  ir 
) const
inlinevirtual

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.

Assume ME1a has 16 ganged readout channels.

Implements CSCIndexerBase.

Definition at line 72 of file CSCIndexerStartup.h.

IndexType CSCIndexerStartup::stripChannelsPerOnlineLayer ( IndexType  is,
IndexType  ir 
) const
inlinevirtual

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.

Assume ME1a has 16 ganged readout channels. Online chamber has 64+16=80 channels.

Implements CSCIndexerBase.

Definition at line 85 of file CSCIndexerStartup.h.

LongIndexType CSCIndexerStartup::stripChannelStart ( IndexType  ie,
IndexType  is,
IndexType  ir 
) const
inlinevirtual

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.

WARNING: while ME1a channels are the last 16 of the 80 total in each layer of an ME11 chamber, their start index here defaults to the start index of ME1a.

Implements CSCIndexerBase.

Definition at line 134 of file CSCIndexerStartup.h.