CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Static Private Member Functions
CSCDetId Class Reference

#include <CSCDetId.h>

Inheritance diagram for CSCDetId:
DetId

Public Member Functions

int chamber () const
 
CSCDetId chamberId () const
 
int channel (int istrip)
 
 CSCDetId ()
 
 CSCDetId (uint32_t id)
 
 CSCDetId (DetId id)
 
 CSCDetId (int iendcap, int istation, int iring, int ichamber, int ilayer=0)
 
int endcap () const
 
unsigned short iChamberType () const
 
int layer () const
 
int ring () const
 
int station () const
 
int triggerCscId () const
 
int triggerSector () const
 
short int zendcap () const
 
- Public Member Functions inherited from DetId
Detector det () const
 get the detector field from this detid More...
 
 DetId ()
 Create an empty or null id (also for persistence) More...
 
 DetId (uint32_t id)
 Create an id from a raw number. More...
 
 DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
bool null () const
 is this a null id ? More...
 
 operator uint32_t () const
 
bool operator!= (DetId id) const
 inequality More...
 
uint32_t operator() () const
 
bool operator< (DetId id) const
 comparison More...
 
bool operator== (DetId id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 
int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Public Member Functions

static int chamber (int index)
 
static int endcap (int index)
 
static unsigned short iChamberType (unsigned short istation, unsigned short iring)
 
static int layer (int index)
 
static int maxChamberId ()
 
static int maxEndcapId ()
 
static int maxLayerId ()
 
static int maxRingId ()
 
static int maxStationId ()
 
static int minChamberId ()
 
static int minEndcapId ()
 
static int minLayerId ()
 
static int minRingId ()
 
static int minStationId ()
 
static int rawIdMaker (int iendcap, int istation, int iring, int ichamber, int ilayer)
 
static int ring (int index)
 
static int station (int index)
 

Private Types

enum  eMaskBitDet {
  MASK_ENDCAP =07, MASK_STATION =07, MASK_RING =07, MASK_CHAMBER =077,
  MASK_LAYER =07
}
 
enum  eMaxNum {
  MAX_ENDCAP =2, MAX_STATION =4, MAX_RING =4, MAX_CHAMBER =36,
  MAX_LAYER =6
}
 
enum  eMinNum {
  MIN_ENDCAP =1, MIN_STATION =1, MIN_RING =1, MIN_CHAMBER =1,
  MIN_LAYER =1
}
 
enum  eNumBitDet {
  BITS_ENDCAP =3, BITS_STATION =3, BITS_RING =3, BITS_CHAMBER =6,
  BITS_LAYER =3
}
 
enum  eStartBitDet { START_CHAMBER =BITS_LAYER, START_RING =START_CHAMBER+BITS_CHAMBER, START_STATION =START_RING+BITS_RING, START_ENDCAP =START_STATION+BITS_STATION }
 

Static Private Member Functions

static int detIdToInt (int iring)
 
static uint32_t init (int iendcap, int istation, int iring, int ichamber, int ilayer)
 
static int intToDetId (int iring)
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7
}
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Identifier class for hierarchy of Endcap Muon detector components.

Ported from MuEndDetectorId but now derived from DetId and updated accordingly.

Allows access to hardware integer labels of the subcomponents of the Muon Endcap CSC detector system.

The STATIC member functions can be used to translate back and forth between a layer/chamber 'rawId' and the set of subdetector labels.

Warning
EVERY LABEL COUNTS FROM ONE NOT ZERO.

Definition at line 26 of file CSCDetId.h.

Member Enumeration Documentation

enum CSCDetId::eMaskBitDet
private
Enumerator
MASK_ENDCAP 
MASK_STATION 
MASK_RING 
MASK_CHAMBER 
MASK_LAYER 

Definition at line 304 of file CSCDetId.h.

enum CSCDetId::eMaxNum
private
Enumerator
MAX_ENDCAP 
MAX_STATION 
MAX_RING 
MAX_CHAMBER 
MAX_LAYER 

Definition at line 295 of file CSCDetId.h.

enum CSCDetId::eMinNum
private
Enumerator
MIN_ENDCAP 
MIN_STATION 
MIN_RING 
MIN_CHAMBER 
MIN_LAYER 

Definition at line 297 of file CSCDetId.h.

enum CSCDetId::eNumBitDet
private
Enumerator
BITS_ENDCAP 
BITS_STATION 
BITS_RING 
BITS_CHAMBER 
BITS_LAYER 

Definition at line 301 of file CSCDetId.h.

enum CSCDetId::eStartBitDet
private

Constructor & Destructor Documentation

CSCDetId::CSCDetId ( )
inline

Default constructor; fills the common part in the base and leaves 0 in all other fields

Definition at line 33 of file CSCDetId.h.

Referenced by chamberId().

DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
static const int CSC
Definition: MuonSubdetId.h:13
CSCDetId::CSCDetId ( uint32_t  id)
inline

Construct from a packed id. It is required that the Detector part of id is Muon and the SubDet part is CSC, otherwise an exception is thrown.

Definition at line 37 of file CSCDetId.h.

37 : DetId(id) {}
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
CSCDetId::CSCDetId ( DetId  id)
inline

Definition at line 38 of file CSCDetId.h.

38 : DetId(id) {}
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
CSCDetId::CSCDetId ( int  iendcap,
int  istation,
int  iring,
int  ichamber,
int  ilayer = 0 
)
inline

Construct from fully qualified identifier. Input values are required to be within legal ranges, otherwise an exception is thrown.
iendcap: 1=forward (+Z), 2=backward(-Z)

Definition at line 45 of file CSCDetId.h.

References DetId::id_, and init().

48  id_ |= init(iendcap, istation, iring, ichamber, ilayer);
49  }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
static const int CSC
Definition: MuonSubdetId.h:13
static uint32_t init(int iendcap, int istation, int iring, int ichamber, int ilayer)
Definition: CSCDetId.h:253
uint32_t id_
Definition: DetId.h:55

Member Function Documentation

int CSCDetId::chamber ( ) const
inline

Return Chamber label.

Definition at line 68 of file CSCDetId.h.

References DetId::id_, MASK_CHAMBER, and START_CHAMBER.

Referenced by cscd2r::accept(), OMTFinputMaker::acceptDigi(), CSCPairResidualsConstraint::addTrack(), CSCChamberMasker::ageDigis(), MuonAlignmentAnalyzer::analyze(), MuonAlignment::analyze(), MuonGeometrySanityCheck::analyze(), RPCEfficiency::analyze(), CSCChamberMasker::beginRun(), CSCGeometryParsFromDD::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), cscd2r::chamberID(), MuonAlignmentFromReference::chamberPrettyNameFromId(), PrimitiveConverter::convert(), CSCChamberFitter::CSCChamberFitter(), CSCSegtoRPC::CSCSegtoRPC(), CSCReadoutMapping::detId(), CSCDigitizer::doAction(), CSCOfflineMonitor::doBXMonitor(), CSCSkim::doCSCSkimming(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCSkim::doMessyEventSkimming(), CSCOfflineMonitor::doOccupancies(), CSCValidation::doOccupancies(), CSCValidation::doRecHits(), CSCValidation::doTimeMonitoring(), CSCPairResidualsConstraint::dphidzFromTrack(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), MuonGeometryArrange::fillTree(), CSCValidation::findNonAssociatedRecHits(), CSCComparatorDigiFitter::fit(), MuonAlignmentFromReference::fitAndAlign(), CSCUpgradeMotherboardLUTGenerator::generateLUTsME11(), CSCUpgradeMotherboardLUTGenerator::generateLUTsME21(), cscdqm::EventProcessor::getCSCFromMap(), OMTFinputMaker::getInputNumber(), TrackerMuonHitExtractor::getMuonHits(), AngleConverter::getProcessorPhi(), HLTCSCOverlapFilter::hltFilter(), l1t::EMTFHit2016::ImportCSCDetId(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), MuonSegmentMatcher::matchCSC(), CSCComparatorDigiFitter::matchingComparatorDigisLCT(), muon::overlap(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), PrimConv(), MuonTrackProducer::produce(), L1TMuonEndCapTrackProducer::produce(), SimHitShifter::produce(), CSCChamberFitter::radiusCorrection(), CSCOverlapsAlignmentAlgorithm::run(), AlignmentCSCOverlapSelector::select(), CSCPairResidualsConstraint::setZplane(), triggerCscId(), and triggerSector().

68  {
69  return ( (id_>>START_CHAMBER) & MASK_CHAMBER ); }
uint32_t id_
Definition: DetId.h:55
static int CSCDetId::chamber ( int  index)
inlinestatic

Return Chamber label for supplied CSCDetId index.

Definition at line 161 of file CSCDetId.h.

References MASK_CHAMBER, and START_CHAMBER.

Referenced by geometryXMLparser.CSCAlignable::index().

CSCDetId CSCDetId::chamberId ( ) const
inline
int CSCDetId::channel ( int  istrip)
inline

Geometric channel no. from geometric strip no. - identical except for ME1a ganged strips

Note that 'Geometric' means increasing number corresponds to increasing local x coordinate.

Warning
There is no attempt here to handle cabling or readout questions. If you need that look at CondFormats/CSCObjects/CSCChannelTranslator.

Definition at line 118 of file CSCDetId.h.

References ring().

Referenced by CSCRecHit2D::sharesInput().

118  {
119  if ( ring()== 4 )
120  // strips 1-48 mapped to channels 1-16:
121  // 1+17+33->1, 2+18+34->2, .... 16+32+48->16
122  return 1 + (istrip-1)%16;
123  else
124  return istrip;
125  }
int ring() const
Definition: CSCDetId.h:75
static int CSCDetId::detIdToInt ( int  iring)
inlinestaticprivate

Definition at line 284 of file CSCDetId.h.

References mps_fire::i.

Referenced by ring().

284  {
285  // reverse intToDetId: change 1, 2, 3, 4 inside the DetId to 4, 1, 2, 3 for external use
286  // i.e. output ring # 1, 2, 3, 4 in ME1 means ME1b, ME12, ME13, ME1a as usual in the offline software.
287  int i = (iring-1);
288  if (i == 0) i = 4;
289  return i;
290  }
int CSCDetId::endcap ( ) const
inline

Return Endcap label. 1=forward (+Z); 2=backward (-Z)

Definition at line 93 of file CSCDetId.h.

References DetId::id_, MASK_ENDCAP, and START_ENDCAP.

Referenced by cscd2r::accept(), OMTFinputMaker::acceptDigi(), CSCDigiToRaw::add(), CSCCLCTData::add(), CSCPairResidualsConstraint::addTrack(), CSCChamberMasker::ageDigis(), CSCAFEBConnectAnalysis::analyze(), CSCAFEBThrAnalysis::analyze(), MuonAlignmentAnalyzer::analyze(), MuonAlignment::analyze(), MuonGeometrySanityCheck::analyze(), RPCEfficiency::analyze(), BeamHaloAnalyzer::analyze(), CSCChamberMasker::beginRun(), CSCGeometryParsFromDD::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), AlignableMuon::buildCSCEndcap(), CSCPairResidualsConstraint::calculatePhi(), cscd2r::chamberID(), MuonAlignmentFromReference::chamberPrettyNameFromId(), CSCCLCTData::comparatorDigis(), PrimitiveConverter::convert(), CSCChamberFitter::CSCChamberFitter(), CSCSegtoRPC::CSCSegtoRPC(), CSCReadoutMapping::detId(), CSCCFEBData::digis(), CSCDigitizer::doAction(), CSCOfflineMonitor::doBXMonitor(), CSCSkim::doCertainChamberSelection(), CSCSkim::doCSCSkimming(), CSCSkim::doDTOverlap(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCSkim::doHaloLike(), CSCSkim::doMessyEventSkimming(), CSCOfflineMonitor::doOccupancies(), CSCValidation::doOccupancies(), CSCSkim::doOverlapSkimming(), CSCOfflineMonitor::doRecHits(), CSCValidation::doRecHits(), CSCValidation::doSegments(), CSCValidation::doTimeMonitoring(), CSCPairResidualsConstraint::dphidzFromTrack(), csc::L1TrackId::endcap(), csctf::TrackStub::endcap(), AlignmentMonitorMuonResiduals::event(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), CSCValidation::findNonAssociatedRecHits(), CSCComparatorDigiFitter::fit(), MuonAlignmentFromReference::fitAndAlign(), cscdqm::EventProcessor::getCSCFromMap(), TrackerMuonHitExtractor::getMuonHits(), HLTCSCOverlapFilter::hltFilter(), l1t::EMTFHit2016::ImportCSCDetId(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), MuonSegmentMatcher::matchCSC(), CSCComparatorDigiFitter::matchingComparatorDigisLCT(), CSCDetIdSameDetLayerComparator::operator()(), muon::overlap(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), PrimConv(), cscdqm::EventProcessor::processCSC(), MuonTrackProducer::produce(), L1TMuonEndCapTrackProducer::produce(), MuonSimHitProducer::produce(), SimHitShifter::produce(), CSCChamberFitter::radiusCorrection(), CSCOverlapsAlignmentAlgorithm::run(), AlignmentCSCOverlapSelector::select(), AlignmentCSCBeamHaloSelector::select(), AlignmentCSCTrackSelector::select(), CSCPairResidualsConstraint::setZplane(), TracktoRPC::TracktoRPC(), ValidateGeometry::validateCSChamberGeometry(), ValidateGeometry::validateCSCLayerGeometry(), and zendcap().

93  {
94  return ( (id_>>START_ENDCAP) & MASK_ENDCAP ); }
uint32_t id_
Definition: DetId.h:55
static int CSCDetId::endcap ( int  index)
inlinestatic

Return Endcap label for supplied CSCDetId index.

Definition at line 186 of file CSCDetId.h.

References iChamberType(), MASK_ENDCAP, START_ENDCAP, triggerCscId(), and triggerSector().

Referenced by geometryXMLparser.CSCAlignable::index().

unsigned short CSCDetId::iChamberType ( ) const
inline
unsigned short CSCDetId::iChamberType ( unsigned short  istation,
unsigned short  iring 
)
static

Return a unique integer 1-10 for a station, ring pair: 1 for S = 1 and R=4 inner strip part of ME11 (ME1a) 2,3,4 = R+1 for S = 1 and R = 1,2,3 (ME11 means ME1b) 5-10 = 2*S+R for S = 2,3,4 and R = 1,2

Definition at line 56 of file CSCDetId.cc.

References mps_fire::i.

56  {
57  int i = 2 * istation + iring; // i=2S+R ok for S=2, 3, 4
58  if ( istation == 1 ) {
59  --i; // ring 1R -> i=1+R (2S+R-1=1+R for S=1)
60  if ( i > 4 ) i = 1; // But ring 1A (R=4) -> i=1
61  }
62  return i;
63 }
static uint32_t CSCDetId::init ( int  iendcap,
int  istation,
int  iring,
int  ichamber,
int  ilayer 
)
inlinestaticprivate

Method for initialization within ctors.

Definition at line 253 of file CSCDetId.h.

References intToDetId(), MASK_CHAMBER, MASK_ENDCAP, MASK_LAYER, MASK_RING, MASK_STATION, START_CHAMBER, START_ENDCAP, START_RING, and START_STATION.

Referenced by CSCDetId(), and rawIdMaker().

254  {
255 
256  if (istation == 1)
257  iring = intToDetId(iring);
258 
259  return
260  (ilayer & MASK_LAYER) |
261  ( (ichamber & MASK_CHAMBER) << START_CHAMBER ) |
262  ( (iring & MASK_RING) << START_RING ) |
263  ( (istation & MASK_STATION) << START_STATION ) |
264  ( (iendcap & MASK_ENDCAP) << START_ENDCAP ) ; }
static int intToDetId(int iring)
Definition: CSCDetId.h:276
static int CSCDetId::intToDetId ( int  iring)
inlinestaticprivate

Methods for reordering CSCDetId for ME1 detectors.

Internally the chambers are ordered (Station/Ring) as: ME1/a (1/1), ME1/b (1/2), ME1/2 (1/3), ME1/3 (1/4) i.e. they are labelled within the DetId as if ME1a, ME1b, ME12, ME13 are rings 1, 2, 3, 4. The offline software always considers rings 1, 2, 3, 4 as ME1b, ME12, ME13, ME1a so that at least ME12 and ME13 have ring numbers which match in hardware and software!

Definition at line 276 of file CSCDetId.h.

References mps_fire::i.

Referenced by init().

276  {
277  // change iring = 1, 2, 3, 4 input to 2, 3, 4, 1 for use inside the DetId
278  // i.e. ME1b, ME12, ME13, ME1a externally become stored internally in order ME1a, ME1b, ME12, ME13
279  int i = (iring+1)%4;
280  if (i == 0) i = 4;
281  return i;
282  }
int CSCDetId::layer ( ) const
inline

Return Layer label.

Definition at line 61 of file CSCDetId.h.

References DetId::id_, and MASK_LAYER.

Referenced by CSCDigiToRaw::add(), CSCCLCTData::add(), CSCChamberMasker::ageDigis(), CSCSegAlgoSK::areHitsCloseInGlobalPhi(), CSCSegAlgoTC::areHitsCloseInGlobalPhi(), CSCSegAlgoRU::areHitsCloseInGlobalPhi(), CSCSegAlgoRU::areHitsCloseInR(), CSCSegAlgoRU::baseline(), CSCGeometryParsFromDD::build(), CSCRecHitDBuilder::build(), CSCGeometryBuilder::buildChamber(), CSCSegAlgoTC::buildSegments(), CSCSegAlgoRU::buildSegments(), chamberId(), CSCCLCTData::comparatorDigis(), CSCCondSegFit::correctTheCovX(), CSCSegFit::derivativeMatrix(), CSCCFEBData::digis(), CSCDigitizer::doAction(), CSCSkim::doCSCSkimming(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCSkim::doMessyEventSkimming(), CSCValidation::doRecHits(), CSCOfflineMonitor::doResolution(), CSCValidation::doResolution(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), CSCValidation::findNonAssociatedRecHits(), CSCCondSegFit::fit(), CSCSegFit::fit2(), GEMCSCSegFit::fit2(), CSCSegFit::fitlsq(), getDetLayer(), MuonChamberResidual::hitlayer(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), CSCSegAlgoShowering::isHitNearSegment(), CSCSegAlgoSK::isHitNearSegment(), CSCSegAlgoTC::isHitNearSegment(), CSCSegAlgoRU::isHitNearSegment(), CSCSegAlgoDF::isHitNearSegment(), CSCChamber::layer(), CSCDigitizer::layersMissing(), CSCNeutronWriter::localDetId(), CSCNeutronReader::localDetId(), MuonSimHitProducer::produce(), SimHitShifter::produce(), CSCSegAlgoShowering::pruneFromResidual(), CSCSegAlgoDF::pruneFromResidual(), CSCEventData::selfTest(), CSCCondSegFit::setChi2(), CSCSegFit::setChi2(), CSCSegAlgoShowering::showerSeg(), and CSCSegAlgoTC::tryAddingHitsToSegment().

61  {
62  return (id_ & MASK_LAYER); }
uint32_t id_
Definition: DetId.h:55
static int CSCDetId::layer ( int  index)
inlinestatic

Return Layer label for supplied CSCDetId index.

Definition at line 154 of file CSCDetId.h.

References MASK_LAYER.

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

154  {
155  return (index & MASK_LAYER); }
static int CSCDetId::maxChamberId ( )
inlinestatic
static int CSCDetId::maxEndcapId ( )
inlinestatic
static int CSCDetId::maxLayerId ( )
inlinestatic
static int CSCDetId::maxRingId ( )
inlinestatic
static int CSCDetId::maxStationId ( )
inlinestatic
static int CSCDetId::minChamberId ( )
inlinestatic
static int CSCDetId::minEndcapId ( )
inlinestatic
static int CSCDetId::minLayerId ( )
inlinestatic
static int CSCDetId::minRingId ( )
inlinestatic
static int CSCDetId::minStationId ( )
inlinestatic
static int CSCDetId::rawIdMaker ( int  iendcap,
int  istation,
int  iring,
int  ichamber,
int  ilayer 
)
inlinestatic

Returns the unique integer 'rawId' which labels each CSC layer.

The arguments are the integer labels for, respectively,
endcap, station, ring, chamber, layer.

Warning
The input int args are expected to be .ge. 1 and there is no sanity-checking for their upper limits.
The returned integers are not necessarily consecutive, i.e. there are gaps. This is to permit computational efficiency starting from the component ids.

Definition at line 144 of file CSCDetId.h.

References MuonSubdetId::CSC, init(), DetId::kDetOffset, DetId::kSubdetOffset, and DetId::Muon.

Referenced by CSCNumberingScheme::baseNumberToUnitNumber(), CSCChamberMasker::beginRun(), CSCReadoutMapping::findHardwareId(), CSCTriggerSimpleMapping::hwId(), CSCTriggerMapping::swId(), and CSCReadoutMapping::swId().

145  {
146  return ( (DetId::Muon&0xF)<<(DetId::kDetOffset) ) | // set Muon flag
147  ( (MuonSubdetId::CSC&0x7)<<(DetId::kSubdetOffset) ) | // set CSC flag
148  init(iendcap, istation, iring, ichamber, ilayer) ; } // set CSC id
static const int kSubdetOffset
Definition: DetId.h:21
static const int CSC
Definition: MuonSubdetId.h:13
static uint32_t init(int iendcap, int istation, int iring, int ichamber, int ilayer)
Definition: CSCDetId.h:253
static const int kDetOffset
Definition: DetId.h:20
int CSCDetId::ring ( ) const
inline

Return Ring label.

Definition at line 75 of file CSCDetId.h.

References detIdToInt(), DetId::id_, MASK_RING, MASK_STATION, START_RING, and START_STATION.

Referenced by cscd2r::accept(), OMTFinputMaker::acceptDigi(), CSCDigiToRaw::add(), CSCCLCTData::add(), CSCPairResidualsConstraint::addTrack(), CSCChamberMasker::ageDigis(), MuonAlignmentAnalyzer::analyze(), MuonAlignment::analyze(), MuonGeometrySanityCheck::analyze(), RPCEfficiency::analyze(), CSCSegAlgoRU::baseline(), CSCChamberMasker::beginRun(), CSCGeometryBuilder::build(), CSCGeometryParsFromDD::build(), FWCSCWireDigiProxyBuilder::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), AlignableMuon::buildCSCEndcap(), CSCPairResidualsConstraint::calculatePhi(), cscd2r::chamberID(), MuonAlignmentFromReference::chamberPrettyNameFromId(), channel(), CSCCLCTData::comparatorDigis(), PrimitiveConverter::convert(), CSCChamberFitter::CSCChamberFitter(), CSCSegtoRPC::CSCSegtoRPC(), CSCReadoutMapping::detId(), CSCCFEBData::digis(), CSCDigitizer::doAction(), CSCOfflineMonitor::doBXMonitor(), CSCSkim::doCSCSkimming(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCSkim::doMessyEventSkimming(), CSCOfflineMonitor::doOccupancies(), CSCValidation::doOccupancies(), CSCValidation::doRecHits(), CSCOfflineMonitor::doResolution(), CSCValidation::doResolution(), CSCValidation::doTimeMonitoring(), CSCPairResidualsConstraint::dphidzFromTrack(), reco::HitPattern::encode(), AlignmentMonitorMuonResiduals::event(), CSCConfigurableStripConditions::fetchNoisifier(), MuonIdProducer::fillArbitrationInfo(), MuonMesh::fillMesh(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), CSCDigiToRaw::findEventData(), CSCValidation::findNonAssociatedRecHits(), CSCComparatorDigiFitter::fit(), MuonAlignmentFromReference::fitAndAlign(), CSCConfigurableStripConditions::gain(), CSCDriftSim::gasGain(), cscdqm::EventProcessor::getCSCFromMap(), OMTFinputMaker::getInputNumber(), OMTFConfiguration::getLayerNumber(), TrackerMuonHitExtractor::getMuonHits(), AngleConverter::getProcessorPhi(), CSCValidation::getthisSignal(), CSCValidation::getWidth(), HLTCSCOverlapFilter::hltFilter(), iChamberType(), l1t::EMTFHit2016::ImportCSCDetId(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), CSCPairResidualsConstraint::isFiducial(), MuonSeedOrcaPatternRecognition::markAsUsed(), MuonSegmentMatcher::matchCSC(), CSCComparatorDigiFitter::matchingComparatorDigisLCT(), CSCDetIdSameDetLayerComparator::operator()(), muon::overlap(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), PrimConv(), cscdqm::EventProcessor::processCSC(), MuonTrackProducer::produce(), L1TMuonEndCapTrackProducer::produce(), MuonSimHitProducer::produce(), SimHitShifter::produce(), MuonMesh::pruneMesh(), MuonSeedPtExtractor::pT_extract(), CSCChamberFitter::radiusCorrection(), CSCDigiValidator::relabelCompDigis(), CSCOverlapsAlignmentAlgorithm::run(), CSCHitFromStripOnly::runStrip(), CSCPairResidualsConstraint::setZplane(), SETSeedFinder::sortByLayer(), MuonSeedPtExtractor::stationCode(), triggerCscId(), triggerSector(), ValidateGeometry::validateCSCLayerGeometry(), and CSCSegmentValidation::whatChamberType().

75  {
76  if (((id_>>START_STATION) & MASK_STATION) == 1)
77  return ( detIdToInt((id_>>START_RING) & MASK_RING ));
78  else
79  return (((id_>>START_RING) & MASK_RING ));
80  }
uint32_t id_
Definition: DetId.h:55
static int detIdToInt(int iring)
Definition: CSCDetId.h:284
static int CSCDetId::ring ( int  index)
inlinestatic

Return Ring label for supplied CSCDetId index.

Definition at line 168 of file CSCDetId.h.

References detIdToInt(), MASK_RING, MASK_STATION, START_RING, and START_STATION.

Referenced by geometryXMLparser.CSCAlignable::index().

168  {
169  if (((index>>START_STATION) & MASK_STATION) == 1)
170  return ( detIdToInt((index>>START_RING) & MASK_RING ));
171  else
172  return (( index>>START_RING) & MASK_RING );
173  }
static int detIdToInt(int iring)
Definition: CSCDetId.h:284
int CSCDetId::station ( ) const
inline

Return Station label.

Definition at line 86 of file CSCDetId.h.

References DetId::id_, MASK_STATION, and START_STATION.

Referenced by cscd2r::accept(), OMTFinputMaker::acceptDigi(), CSCDigiToRaw::add(), CSCCLCTData::add(), CSCPairResidualsConstraint::addTrack(), AlignmentMonitorMuonResiduals::afterAlignment(), CSCChamberMasker::ageDigis(), MuonAlignmentAnalyzer::analyze(), MuonAlignment::analyze(), MuonGeometrySanityCheck::analyze(), RPCEfficiency::analyze(), CSCSegAlgoRU::baseline(), CSCChamberMasker::beginRun(), CSCGeometryBuilder::build(), CSCGeometryParsFromDD::build(), FWCSCWireDigiProxyBuilder::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), AlignableMuon::buildCSCEndcap(), CSCPairResidualsConstraint::calculatePhi(), cscd2r::chamberID(), MuonAlignmentFromReference::chamberPrettyNameFromId(), CSCCLCTData::comparatorDigis(), PrimitiveConverter::convert(), CSCChamberFitter::CSCChamberFitter(), CSCSegtoRPC::CSCSegtoRPC(), CSCReadoutMapping::detId(), CSCCFEBData::digis(), CSCDigitizer::doAction(), CSCOfflineMonitor::doBXMonitor(), CSCSkim::doCSCSkimming(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCSkim::doMessyEventSkimming(), CSCOfflineMonitor::doOccupancies(), CSCValidation::doOccupancies(), CSCOfflineMonitor::doPedestalNoise(), CSCOfflineMonitor::doRecHits(), CSCValidation::doRecHits(), CSCOfflineMonitor::doResolution(), CSCValidation::doResolution(), CSCValidation::doTimeMonitoring(), CSCPairResidualsConstraint::dphidzFromTrack(), reco::HitPattern::encode(), AlignmentMonitorMuonResiduals::event(), CSCConfigurableStripConditions::fetchNoisifier(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), CSCDigiToRaw::findEventData(), CSCValidation::findNonAssociatedRecHits(), CSCComparatorDigiFitter::fit(), MuonAlignmentFromReference::fitAndAlign(), CSCConfigurableStripConditions::gain(), CSCDriftSim::gasGain(), cscdqm::EventProcessor::getCSCFromMap(), GlobalMuonRefitter::getFirstHits(), OMTFinputMaker::getInputNumber(), OMTFConfiguration::getLayerNumber(), TrackerMuonHitExtractor::getMuonHits(), AngleConverter::getProcessorPhi(), GlobalMuonRefitter::getRidOfSelectStationHits(), CSCUpgradeMotherboardLUTGenerator::Helpers::getRPCfromCSC(), CSCValidation::getthisSignal(), CSCValidation::getWidth(), HLTCSCOverlapFilter::hltFilter(), iChamberType(), l1t::EMTFHit2016::ImportCSCDetId(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), CSCPairResidualsConstraint::isFiducial(), MuonSegmentMatcher::matchCSC(), CSCComparatorDigiFitter::matchingComparatorDigisLCT(), TrackTransformerForGlobalCosmicMuons::MuonKeep(), CSCDetIdSameDetLayerComparator::operator()(), muon::overlap(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), PrimConv(), cscdqm::EventProcessor::processCSC(), MuonTrackProducer::produce(), L1TMuonEndCapTrackProducer::produce(), MuonSimHitProducer::produce(), SimHitShifter::produce(), MuonSeedPtExtractor::pT_extract(), CSCChamberFitter::radiusCorrection(), CSCDigiValidator::relabelCompDigis(), CSCOverlapsAlignmentAlgorithm::run(), MuonSeedCleaner::SeedCandidates(), AlignmentCSCOverlapSelector::select(), AlignmentCSCBeamHaloSelector::select(), AlignmentCSCTrackSelector::select(), CSCPairResidualsConstraint::setZplane(), SETSeedFinder::sortByLayer(), TAMuonChamberMatch::station(), reco::MuonChamberMatch::station(), csc::L1TrackId::station(), csctf::TrackStub::station(), MuonSeedPtExtractor::stationCode(), DynamicTruncation::stationfromDet(), triggerCscId(), triggerSector(), ValidateGeometry::validateCSCLayerGeometry(), and CSCSegmentValidation::whatChamberType().

86  {
87  return ( (id_>>START_STATION) & MASK_STATION ); }
uint32_t id_
Definition: DetId.h:55
static int CSCDetId::station ( int  index)
inlinestatic

Return Station label for supplied CSCDetId index.

Definition at line 179 of file CSCDetId.h.

References MASK_STATION, and START_STATION.

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

int CSCDetId::triggerCscId ( ) const

Return trigger-level CSC id within a sector for an Endcap Muon chamber.

This id is an index within a sector such that the 3 inner ring chambers (20 degrees each) are 1, 2, 3 (increasing counterclockwise) and the 6 outer ring chambers (10 degrees each) are 4, 5, 6, 7, 8, 9 (again increasing counter-clockwise.)

This method knows which chambers are part of which sector and returns the chamber label/index/identifier accordingly. Beware that this information is liable to change according to hardware and software changes.

Definition at line 23 of file CSCDetId.cc.

References chamber(), mps_fire::result, ring(), and station().

Referenced by endcap().

24 {
25  // UPDATED TO OCT 2005 - LGRAY Feb 2006
26 
27  int result;
28  int ring = this->ring();
29  int station = this->station();
30  int chamber = this->chamber();
31 
32  if( station == 1 ) {
33  result = (chamber) % 3 + 1; // 1,2,3
34  switch (ring) {
35  case 1:
36  break;
37  case 2:
38  result += 3; // 4,5,6
39  break;
40  case 3:
41  result += 6; // 7,8,9
42  break;
43  }
44  }
45  else {
46  if( ring == 1 ) {
47  result = (chamber+1) % 3 + 1; // 1,2,3
48  }
49  else {
50  result = (chamber+3) % 6 + 4; // 4,5,6,7,8,9
51  }
52  }
53  return result;
54 }
int chamber() const
Definition: CSCDetId.h:68
int ring() const
Definition: CSCDetId.h:75
int station() const
Definition: CSCDetId.h:86
int CSCDetId::triggerSector ( ) const

Return trigger-level sector id for an Endcap Muon chamber.

This method encapsulates the information about which chambers are in which sectors, and may need updating according to hardware changes, or software chamber indexing.

Station 1 has 3 rings of 10-degree chambers.
Stations 2, 3, 4 have an inner ring of 20-degree chambers and an outer ring of 10-degree chambers.

Sectors are 60 degree slices of a station, covering both rings.
For Station 1, there are subsectors of 30 degrees: 9 10-degree chambers (3 each from ME1/1, ME1/2, ME1/3.)

The first sector starts at phi = 15 degrees so it matches Barrel Muon sectors. We count from one not zero.

Definition at line 3 of file CSCDetId.cc.

References chamber(), mps_fire::result, ring(), and station().

Referenced by PrimitiveConverter::convert(), endcap(), l1t::EMTFHit2016::ImportCSCDetId(), PrimConv(), L1TMuonEndCapTrackProducer::produce(), and MuonIdProducer::sectorPhi().

4 {
5  // UPDATED TO OCT 2005 - LGRAY Feb 2006
6 
7  int result;
8  int ring = this->ring();
9  int station = this->station();
10  int chamber = this->chamber();
11 
12  if(station > 1 && ring > 1 ) {
13  result = ((static_cast<unsigned>(chamber-3) & 0x7f) / 6) + 1; // ch 3-8->1, 9-14->2, ... 1,2 -> 6
14  }
15  else {
16  result = (station != 1) ? ((static_cast<unsigned>(chamber-2) & 0x1f) / 3) + 1 : // ch 2-4-> 1, 5-7->2, ...
17  ((static_cast<unsigned>(chamber-3) & 0x7f) / 6) + 1;
18  }
19 
20  return (result <= 6) ? result : 6; // max sector is 6, some calculations give a value greater than six but this is expected.
21 }
int chamber() const
Definition: CSCDetId.h:68
int ring() const
Definition: CSCDetId.h:75
int station() const
Definition: CSCDetId.h:86
short int CSCDetId::zendcap ( ) const
inline

What is the sign of global z?

Definition at line 100 of file CSCDetId.h.

References endcap().

Referenced by CSCTriggerPrimitivesBuilder::build(), AngleConverter::getProcessorPhi(), and CSCUpgradeMotherboardLUTGenerator::Helpers::getRPCfromCSC().

100  {
101  return ( endcap()!=1 ? -1 : +1 );
102  }
int endcap() const
Definition: CSCDetId.h:93