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
 
std::string chamberName () const
 
int channel (int istrip)
 
 CSCDetId ()
 
 CSCDetId (DetId id)
 
 CSCDetId (int iendcap, int istation, int iring, int ichamber, int ilayer=0)
 
 CSCDetId (uint32_t id)
 
int endcap () const
 
unsigned short iChamberType () const
 
bool isME11 () const
 
bool isME12 () const
 
bool isME13 () const
 
bool isME1a () const
 
bool isME1b () const
 
bool isME21 () const
 
bool isME22 () const
 
bool isME31 () const
 
bool isME32 () const
 
bool isME41 () const
 
bool isME42 () 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
constexpr Detector det () const
 get the detector field from this detid More...
 
constexpr DetId ()
 Create an empty or null id (also for persistence) More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. More...
 
constexpr bool null () const
 is this a null id ? More...
 
constexpr operator uint32_t () const
 
constexpr bool operator!= (DetId id) const
 inequality More...
 
constexpr uint32_t operator() () const
 
constexpr bool operator< (DetId id) const
 comparison More...
 
constexpr bool operator== (DetId id) const
 equality More...
 
constexpr uint32_t rawId () const
 get the raw id More...
 
constexpr 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 std::string chamberName (int endcap, int station, int ring, int chamber)
 
static std::string chamberName (int iChamberType)
 
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, HGCalEE = 8,
  HGCalHSi = 9, HGCalHSc = 10, HGCalTrigger = 11
}
 
- Static Public Attributes inherited from DetId
static const int kDetMask = 0xF
 
static const int kDetOffset = 28
 
static const int kSubdetMask = 0x7
 
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

◆ eMaskBitDet

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

Definition at line 306 of file CSCDetId.h.

306 { MASK_ENDCAP = 07, MASK_STATION = 07, MASK_RING = 07, MASK_CHAMBER = 077, MASK_LAYER = 07 };

◆ eMaxNum

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

Definition at line 297 of file CSCDetId.h.

297 { MAX_ENDCAP = 2, MAX_STATION = 4, MAX_RING = 4, MAX_CHAMBER = 36, MAX_LAYER = 6 };

◆ eMinNum

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

Definition at line 299 of file CSCDetId.h.

299 { MIN_ENDCAP = 1, MIN_STATION = 1, MIN_RING = 1, MIN_CHAMBER = 1, MIN_LAYER = 1 };

◆ eNumBitDet

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

Definition at line 303 of file CSCDetId.h.

303 { BITS_ENDCAP = 3, BITS_STATION = 3, BITS_RING = 3, BITS_CHAMBER = 6, BITS_LAYER = 3 };

◆ eStartBitDet

enum CSCDetId::eStartBitDet
private
Enumerator
START_CHAMBER 
START_RING 
START_STATION 
START_ENDCAP 

Definition at line 309 of file CSCDetId.h.

Constructor & Destructor Documentation

◆ CSCDetId() [1/4]

CSCDetId::CSCDetId ( )
inline

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

Definition at line 30 of file CSCDetId.h.

Referenced by chamberId().

◆ CSCDetId() [2/4]

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 34 of file CSCDetId.h.

34 : DetId(id) {}

◆ CSCDetId() [3/4]

CSCDetId::CSCDetId ( DetId  id)
inline

Definition at line 35 of file CSCDetId.h.

35 : DetId(id) {}

◆ CSCDetId() [4/4]

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 41 of file CSCDetId.h.

42  id_ |= init(iendcap, istation, iring, ichamber, ilayer);
43  }

References DetId::id_, and init().

Member Function Documentation

◆ chamber() [1/2]

int CSCDetId::chamber ( ) const
inline

Return Chamber label.

Definition at line 62 of file CSCDetId.h.

62 { return ((id_ >> START_CHAMBER) & MASK_CHAMBER); }

References DetId::id_, MASK_CHAMBER, and START_CHAMBER.

Referenced by cscd2r::accept(), CSCPairResidualsConstraint::addTrack(), CSCChamberMasker::ageDigis(), MuonAlignmentAnalyzer::analyze(), MuonGeometrySanityCheck::analyze(), CSCChamberMasker::beginRun(), CSCGeometryParsFromDD::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), MuonHitHelper::chamber(), cscd2r::chamberID(), chamberName(), MuonAlignmentFromReference::chamberPrettyNameFromId(), PrimitiveConversion::convert_csc(), CSCChamberFitter::CSCChamberFitter(), CSCReadoutMapping::detId(), CSCDigitizer::doAction(), CSCOfflineMonitor::doBXMonitor(), CSCSkim::doCSCSkimming(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCSkim::doMessyEventSkimming(), CSCOfflineMonitor::doOccupancies(), CSCValidation::doOccupancies(), CSCValidation::doRecHits(), CSCPairResidualsConstraint::dphidzFromTrack(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), MuonGeometryArrange::fillTree(), CSCValidation::findNonAssociatedRecHits(), MuonAlignmentFromReference::fitAndAlign(), cscdqm::EventProcessor::getCSCFromMap(), CSCStubMatcher::getGlobalPosition(), TrackerMuonHitExtractor::getMuonHits(), HLTCSCOverlapFilter::hltFilter(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), CSCSimHitMatcher::LocalBendingInChamber(), CSCStubMatcher::matchALCTsToSimTrack(), CSCStubMatcher::matchCLCTsToSimTrack(), MuonSegmentMatcher::matchCSC(), CSCStubMatcher::matchLCTsToSimTrack(), CSCDigiMatcher::nLayersWithComparatorInChamber(), CSCDigiMatcher::nLayersWithStripInChamber(), CSCDigiMatcher::nLayersWithWireInChamber(), omtf::CscPacker::pack(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), MuonTrackProducer::produce(), CSCChamberFitter::radiusCorrection(), CSCOverlapsAlignmentAlgorithm::run(), AlignmentCSCOverlapSelector::select(), PrimitiveSelection::select_csc(), SectorProcessorShower::select_shower(), CSCPairResidualsConstraint::setZplane(), CSCSegtoRPC::thePoints(), triggerCscId(), L1TMuon::TriggerPrimitive::TriggerPrimitive(), and triggerSector().

◆ chamber() [2/2]

static int CSCDetId::chamber ( int  index)
inlinestatic

Return Chamber label for supplied CSCDetId index.

Definition at line 162 of file CSCDetId.h.

162 { return ((index >> START_CHAMBER) & MASK_CHAMBER); }

References MASK_CHAMBER, and START_CHAMBER.

Referenced by geometryXMLparser.CSCAlignable::index().

◆ chamberId()

CSCDetId CSCDetId::chamberId ( ) const
inline

◆ chamberName() [1/3]

std::string CSCDetId::chamberName ( ) const

◆ chamberName() [2/3]

std::string CSCDetId::chamberName ( int  endcap,
int  station,
int  ring,
int  chamber 
)
static

Returns the chamber name in the format ME$sign$station/$ring/$chamber. Example: ME+1/1/9

Definition at line 74 of file CSCDetId.cc.

74  {
75  const std::string eSign = endcap == 1 ? "+" : "-";
76  return "ME" + eSign + std::to_string(station) + "/" + std::to_string(ring) + "/" + std::to_string(chamber);
77 }

References chamber(), endcap(), ring(), station(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CSCCathodeLCTProcessor::getDigis().

◆ chamberName() [3/3]

std::string CSCDetId::chamberName ( int  iChamberType)
static

Definition at line 79 of file CSCDetId.cc.

79  {
80  // ME1a, ME1b, ME12, ME13, ME21, ME22, ME31, ME32, ME41, ME42
81  const unsigned stations[10] = {1, 1, 1, 1, 2, 2, 3, 3, 4, 4};
82  const std::string rings[10] = {"A", "B", "2", "3", "1", "2", "1", "2", "1", "2"};
83  return "ME" + std::to_string(stations[chamberType - 1]) + rings[chamberType - 1];
84 }

References AlCaHLTBitMon_QueryRunRegistry::string.

◆ channel()

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 105 of file CSCDetId.h.

105  {
106  if (ring() == 4)
107  // strips 1-48 mapped to channels 1-16:
108  // 1+17+33->1, 2+18+34->2, .... 16+32+48->16
109  return 1 + (istrip - 1) % 16;
110  else
111  return istrip;
112  }

References ring().

Referenced by CSCRecHit2D::sharesInput().

◆ detIdToInt()

static int CSCDetId::detIdToInt ( int  iring)
inlinestaticprivate

Definition at line 285 of file CSCDetId.h.

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

References mps_fire::i.

Referenced by ring().

◆ endcap() [1/2]

int CSCDetId::endcap ( ) const
inline

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

Definition at line 85 of file CSCDetId.h.

85 { return ((id_ >> START_ENDCAP) & MASK_ENDCAP); }

References DetId::id_, MASK_ENDCAP, and START_ENDCAP.

Referenced by cscd2r::accept(), CSCComparatorData::add(), CSCDigiToRaw::add(), CSCPairResidualsConstraint::addTrack(), CSCChamberMasker::ageDigis(), CSCAFEBConnectAnalysis::analyze(), CSCAFEBThrAnalysis::analyze(), MuonAlignmentAnalyzer::analyze(), MuonGeometrySanityCheck::analyze(), BeamHaloAnalyzer::analyze(), CSCChamberMasker::beginRun(), CSCGeometryParsFromDD::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), AlignableMuon::buildCSCEndcap(), CSCPairResidualsConstraint::calculatePhi(), cscd2r::chamberID(), chamberName(), MuonAlignmentFromReference::chamberPrettyNameFromId(), CSCComparatorData::comparatorDigis(), PrimitiveConversion::convert_csc(), CSCChamberFitter::CSCChamberFitter(), CSCReadoutMapping::detId(), CSCCFEBData::digis(), CSCDigitizer::doAction(), 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(), MuonAlignmentFromReference::fitAndAlign(), cscdqm::EventProcessor::getCSCFromMap(), CSCStubMatcher::getGlobalPosition(), TrackerMuonHitExtractor::getMuonHits(), HLTCSCOverlapFilter::hltFilter(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), CSCMuonPortCard::loadLCTs(), CSCSimHitMatcher::LocalBendingInChamber(), CSCStubMatcher::matchALCTsToSimTrack(), CSCStubMatcher::matchCLCTsToSimTrack(), MuonSegmentMatcher::matchCSC(), CSCStubMatcher::matchLCTsToSimTrack(), CSCDigiMatcher::nLayersWithComparatorInChamber(), CSCDigiMatcher::nLayersWithStripInChamber(), CSCDigiMatcher::nLayersWithWireInChamber(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), cscdqm::EventProcessor::processCSC(), MuonTrackProducer::produce(), MuonSimHitProducer::produce(), CSCChamberFitter::radiusCorrection(), CSCOverlapsAlignmentAlgorithm::run(), AlignmentCSCOverlapSelector::select(), AlignmentCSCBeamHaloSelector::select(), AlignmentCSCTrackSelector::select(), PrimitiveSelection::select_csc(), SectorProcessorShower::select_shower(), CSCPairResidualsConstraint::setZplane(), CSCSegtoRPC::thePoints(), TracktoRPC::thePoints(), L1TMuon::TriggerPrimitive::TriggerPrimitive(), and zendcap().

◆ endcap() [2/2]

static int CSCDetId::endcap ( int  index)
inlinestatic

Return Endcap label for supplied CSCDetId index.

Definition at line 185 of file CSCDetId.h.

185 { return ((index >> START_ENDCAP) & MASK_ENDCAP); }

References MASK_ENDCAP, and START_ENDCAP.

Referenced by geometryXMLparser.CSCAlignable::index().

◆ iChamberType() [1/2]

unsigned short CSCDetId::iChamberType ( ) const
inline

◆ iChamberType() [2/2]

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 52 of file CSCDetId.cc.

52  {
53  int i = 2 * istation + iring; // i=2S+R ok for S=2, 3, 4
54  if (istation == 1) {
55  --i; // ring 1R -> i=1+R (2S+R-1=1+R for S=1)
56  if (i > 4)
57  i = 1; // But ring 1A (R=4) -> i=1
58  }
59  return i;
60 }

References mps_fire::i.

◆ init()

static uint32_t CSCDetId::init ( int  iendcap,
int  istation,
int  iring,
int  ichamber,
int  ilayer 
)
inlinestaticprivate

Method for initialization within ctors.

Definition at line 258 of file CSCDetId.h.

258  {
259  if (istation == 1)
260  iring = intToDetId(iring);
261 
262  return (ilayer & MASK_LAYER) | ((ichamber & MASK_CHAMBER) << START_CHAMBER) | ((iring & MASK_RING) << START_RING) |
263  ((istation & MASK_STATION) << START_STATION) | ((iendcap & MASK_ENDCAP) << START_ENDCAP);
264  }

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().

◆ intToDetId()

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.

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)
281  i = 4;
282  return i;
283  }

References mps_fire::i.

Referenced by init().

◆ isME11()

bool CSCDetId::isME11 ( ) const

Definition at line 64 of file CSCDetId.cc.

64 { return isME1a() or isME1b(); }

References isME1a(), isME1b(), and or.

◆ isME12()

bool CSCDetId::isME12 ( ) const

Definition at line 65 of file CSCDetId.cc.

65 { return iChamberType(station(), ring()) == 3; }

References iChamberType(), ring(), and station().

◆ isME13()

bool CSCDetId::isME13 ( ) const

Definition at line 66 of file CSCDetId.cc.

66 { return iChamberType(station(), ring()) == 4; }

References iChamberType(), ring(), and station().

◆ isME1a()

bool CSCDetId::isME1a ( ) const

Simple accessors

Definition at line 62 of file CSCDetId.cc.

62 { return iChamberType(station(), ring()) == 1; }

References iChamberType(), ring(), and station().

Referenced by isME11().

◆ isME1b()

bool CSCDetId::isME1b ( ) const

Definition at line 63 of file CSCDetId.cc.

63 { return iChamberType(station(), ring()) == 2; }

References iChamberType(), ring(), and station().

Referenced by isME11().

◆ isME21()

bool CSCDetId::isME21 ( ) const

Definition at line 67 of file CSCDetId.cc.

67 { return iChamberType(station(), ring()) == 5; }

References iChamberType(), ring(), and station().

◆ isME22()

bool CSCDetId::isME22 ( ) const

Definition at line 68 of file CSCDetId.cc.

68 { return iChamberType(station(), ring()) == 6; }

References iChamberType(), ring(), and station().

◆ isME31()

bool CSCDetId::isME31 ( ) const

Definition at line 69 of file CSCDetId.cc.

69 { return iChamberType(station(), ring()) == 7; }

References iChamberType(), ring(), and station().

◆ isME32()

bool CSCDetId::isME32 ( ) const

Definition at line 70 of file CSCDetId.cc.

70 { return iChamberType(station(), ring()) == 8; }

References iChamberType(), ring(), and station().

◆ isME41()

bool CSCDetId::isME41 ( ) const

Definition at line 71 of file CSCDetId.cc.

71 { return iChamberType(station(), ring()) == 9; }

References iChamberType(), ring(), and station().

◆ isME42()

bool CSCDetId::isME42 ( ) const

Definition at line 72 of file CSCDetId.cc.

72 { return iChamberType(station(), ring()) == 10; }

References iChamberType(), ring(), and station().

◆ layer() [1/2]

int CSCDetId::layer ( ) const
inline

◆ layer() [2/2]

static int CSCDetId::layer ( int  index)
inlinestatic

Return Layer label for supplied CSCDetId index.

Definition at line 156 of file CSCDetId.h.

156 { return (index & MASK_LAYER); }

References MASK_LAYER.

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

◆ maxChamberId()

static int CSCDetId::maxChamberId ( )
inlinestatic

◆ maxEndcapId()

static int CSCDetId::maxEndcapId ( )
inlinestatic

◆ maxLayerId()

static int CSCDetId::maxLayerId ( )
inlinestatic

◆ maxRingId()

static int CSCDetId::maxRingId ( )
inlinestatic

◆ maxStationId()

static int CSCDetId::maxStationId ( )
inlinestatic

◆ minChamberId()

static int CSCDetId::minChamberId ( )
inlinestatic

◆ minEndcapId()

static int CSCDetId::minEndcapId ( )
inlinestatic

◆ minLayerId()

static int CSCDetId::minLayerId ( )
inlinestatic

◆ minRingId()

static int CSCDetId::minRingId ( )
inlinestatic

◆ minStationId()

static int CSCDetId::minStationId ( )
inlinestatic

◆ rawIdMaker()

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 146 of file CSCDetId.h.

146  {
147  return ((DetId::Muon & 0xF) << (DetId::kDetOffset)) | // set Muon flag
148  ((MuonSubdetId::CSC & 0x7) << (DetId::kSubdetOffset)) | // set CSC flag
149  init(iendcap, istation, iring, ichamber, ilayer);
150  } // set CSC id

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().

◆ ring() [1/2]

int CSCDetId::ring ( ) const
inline

Return Ring label.

Definition at line 68 of file CSCDetId.h.

68  {
69  if (((id_ >> START_STATION) & MASK_STATION) == 1)
70  return (detIdToInt((id_ >> START_RING) & MASK_RING));
71  else
72  return (((id_ >> START_RING) & MASK_RING));
73  }

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

Referenced by cscd2r::accept(), CSCComparatorData::add(), CSCDigiToRaw::add(), CSCPairResidualsConstraint::addTrack(), CSCChamberMasker::ageDigis(), MuonAlignmentAnalyzer::analyze(), MuonGeometrySanityCheck::analyze(), CSCSegAlgoRU::baseline(), CSCChamberMasker::beginRun(), CSCGeometryBuilder::build(), FWCSCWireDigiProxyBuilder::build(), CSCGeometryParsFromDD::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), AlignableMuon::buildCSCEndcap(), CSCPairResidualsConstraint::calculatePhi(), cscd2r::chamberID(), CSCSimHitMatcher::chamberIds(), chamberName(), MuonAlignmentFromReference::chamberPrettyNameFromId(), channel(), CSCComparatorData::comparatorDigis(), PrimitiveConversion::convert_csc(), CSCChamberFitter::CSCChamberFitter(), CSCReadoutMapping::detId(), CSCSimHitMatcher::detIds(), CSCCFEBData::digis(), CSCDigitizer::doAction(), CSCSkim::doCSCSkimming(), CSCOfflineMonitor::doEfficiencies(), CSCValidation::doEfficiencies(), CSCSkim::doMessyEventSkimming(), CSCOfflineMonitor::doOccupancies(), CSCValidation::doOccupancies(), CSCValidation::doRecHits(), CSCOfflineMonitor::doResolution(), CSCValidation::doResolution(), CSCValidation::doTimeMonitoring(), CSCPairResidualsConstraint::dphidzFromTrack(), AlignmentMonitorMuonResiduals::event(), CSCConfigurableStripConditions::fetchNoisifier(), MuonIdProducer::fillArbitrationInfo(), MuonMesh::fillMesh(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), CSCDigiToRaw::findEventData(), CSCValidation::findNonAssociatedRecHits(), MuonAlignmentFromReference::fitAndAlign(), CSCConfigurableStripConditions::gain(), CSCDriftSim::gasGain(), cscdqm::EventProcessor::getCSCFromMap(), CSCStubMatcher::getGlobalPosition(), TrackerMuonHitExtractor::getMuonHits(), CSCValidation::getthisSignal(), CSCValidation::getWidth(), HLTCSCOverlapFilter::hltFilter(), iChamberType(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), CSCPairResidualsConstraint::isFiducial(), isME12(), isME13(), isME1a(), isME1b(), isME21(), isME22(), isME31(), isME32(), isME41(), isME42(), CSCSimHitMatcher::LocalBendingInChamber(), MuonSeedOrcaPatternRecognition::markAsUsed(), CSCSimHitMatcher::match(), CSCStubMatcher::matchALCTsToSimTrack(), CSCStubMatcher::matchCLCTsToSimTrack(), MuonSegmentMatcher::matchCSC(), CSCStubMatcher::matchLCTsToSimTrack(), CSCDigiMatcher::nLayersWithComparatorInChamber(), CSCDigiMatcher::nLayersWithStripInChamber(), CSCDigiMatcher::nLayersWithWireInChamber(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), cscdqm::EventProcessor::processCSC(), MuonTrackProducer::produce(), MuonSimHitProducer::produce(), MuonMesh::pruneMesh(), MuonSeedPtExtractor::pT_extract(), CSCChamberFitter::radiusCorrection(), CSCDigiValidator::relabelCompDigis(), CSCOverlapsAlignmentAlgorithm::run(), CSCHitFromStripOnly::runStrip(), PrimitiveSelection::select_csc(), CSCDigiMatcher::selectDetIds(), CSCStubMatcher::selectDetIds(), CSCPairResidualsConstraint::setZplane(), SETSeedFinder::sortByLayer(), MuonSeedPtExtractor::stationCode(), CSCSegtoRPC::thePoints(), triggerCscId(), L1TMuon::TriggerPrimitive::TriggerPrimitive(), and triggerSector().

◆ ring() [2/2]

static int CSCDetId::ring ( int  index)
inlinestatic

Return Ring label for supplied CSCDetId index.

Definition at line 168 of file CSCDetId.h.

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  }

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

Referenced by geometryXMLparser.CSCAlignable::index().

◆ station() [1/2]

int CSCDetId::station ( ) const
inline

Return Station label.

Definition at line 79 of file CSCDetId.h.

79 { return ((id_ >> START_STATION) & MASK_STATION); }

References DetId::id_, MASK_STATION, and START_STATION.

Referenced by cscd2r::accept(), CSCComparatorData::add(), CSCDigiToRaw::add(), CSCPairResidualsConstraint::addTrack(), CSCChamberMasker::ageDigis(), MuonAlignmentAnalyzer::analyze(), MuonGeometrySanityCheck::analyze(), CSCSegAlgoRU::baseline(), CSCChamberMasker::beginRun(), CSCGeometryBuilder::build(), FWCSCWireDigiProxyBuilder::build(), CSCGeometryParsFromDD::build(), CSCRecHitDBuilder::build(), GEMCSCSegmentBuilder::build(), CSCGeometryBuilder::buildChamber(), AlignableMuon::buildCSCEndcap(), CSCPairResidualsConstraint::calculatePhi(), cscd2r::chamberID(), CSCSimHitMatcher::chamberIds(), chamberName(), MuonAlignmentFromReference::chamberPrettyNameFromId(), CSCComparatorData::comparatorDigis(), PrimitiveConversion::convert_csc(), DTDigiToRaw::createFedBuffers(), CSCChamberFitter::CSCChamberFitter(), CSCReadoutMapping::detId(), CSCSimHitMatcher::detIds(), CSCCFEBData::digis(), CSCDigitizer::doAction(), 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(), AlignmentMonitorMuonResiduals::event(), CSCConfigurableStripConditions::fetchNoisifier(), CSCEfficiency::fillRechitsSegments_info(), CSCEfficiency::fillSimhit_info(), CSCDigiToRaw::findEventData(), CSCValidation::findNonAssociatedRecHits(), MuonAlignmentFromReference::fitAndAlign(), CSCConfigurableStripConditions::gain(), CSCDriftSim::gasGain(), cscdqm::EventProcessor::getCSCFromMap(), GlobalMuonRefitter::getFirstHits(), CSCStubMatcher::getGlobalPosition(), TrackerMuonHitExtractor::getMuonHits(), GlobalMuonRefitter::getRidOfSelectStationHits(), CSCValidation::getthisSignal(), CSCValidation::getWidth(), HLTCSCOverlapFilter::hltFilter(), iChamberType(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), DetIdInfo::info(), TAMuonChamberMatch::info(), fireworks::info(), TrackerMuonHitExtractor::init(), cscdqm::Summary::isChamberStandby(), CSCPairResidualsConstraint::isFiducial(), isME12(), isME13(), isME1a(), isME1b(), isME21(), isME22(), isME31(), isME32(), isME41(), isME42(), CSCMuonPortCard::loadLCTs(), CSCSimHitMatcher::LocalBendingInChamber(), CSCSimHitMatcher::match(), CSCStubMatcher::matchALCTsToSimTrack(), CSCStubMatcher::matchCLCTsToSimTrack(), MuonSegmentMatcher::matchCSC(), CSCStubMatcher::matchLCTsToSimTrack(), TrackTransformerForGlobalCosmicMuons::MuonKeep(), CSCDigiMatcher::nLayersWithComparatorInChamber(), CSCDigiMatcher::nLayersWithStripInChamber(), CSCDigiMatcher::nLayersWithWireInChamber(), omtf::CscPacker::pack(), CSCChipSpeedCorrectionDBConditions::prefillDBChipSpeedCorrection(), cscdqm::EventProcessor::processCSC(), MuonTrackProducer::produce(), MuonSimHitProducer::produce(), MuonSeedPtExtractor::pT_extract(), CSCChamberFitter::radiusCorrection(), CSCDigiValidator::relabelCompDigis(), CSCOverlapsAlignmentAlgorithm::run(), MuonSeedCleaner::SeedCandidates(), AlignmentCSCOverlapSelector::select(), AlignmentCSCTrackSelector::select(), AlignmentCSCBeamHaloSelector::select(), PrimitiveSelection::select_csc(), SectorProcessorShower::select_shower(), CSCDigiMatcher::selectDetIds(), CSCStubMatcher::selectDetIds(), CSCPairResidualsConstraint::setZplane(), SETSeedFinder::sortByLayer(), TAMuonChamberMatch::station(), csc::L1TrackId::station(), reco::MuonChamberMatch::station(), csctf::TrackStub::station(), MuonSeedPtExtractor::stationCode(), DynamicTruncation::stationfromDet(), CSCSegtoRPC::thePoints(), triggerCscId(), L1TMuon::TriggerPrimitive::TriggerPrimitive(), and triggerSector().

◆ station() [2/2]

static int CSCDetId::station ( int  index)
inlinestatic

Return Station label for supplied CSCDetId index.

Definition at line 179 of file CSCDetId.h.

179 { return ((index >> START_STATION) & MASK_STATION); }

References MASK_STATION, and START_STATION.

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

◆ triggerCscId()

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 22 of file CSCDetId.cc.

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

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

◆ triggerSector()

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.

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

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

Referenced by PrimitiveConversion::convert_csc(), CSCMuonPortCard::loadLCTs(), MuonIdProducer::sectorPhi(), PrimitiveSelection::select_csc(), and SectorProcessorShower::select_shower().

◆ zendcap()

short int CSCDetId::zendcap ( ) const
inline

What is the sign of global z?

Definition at line 91 of file CSCDetId.h.

91 { return (endcap() != 1 ? -1 : +1); }

References endcap().

Referenced by CSCTriggerPrimitivesBuilder::build(), and CSCStubMatcher::matchLCTsToSimTrack().

CSCDetId::BITS_CHAMBER
Definition: CSCDetId.h:303
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
mps_fire.i
i
Definition: mps_fire.py:428
CSCDetId::MAX_ENDCAP
Definition: CSCDetId.h:297
CSCDetId::detIdToInt
static int detIdToInt(int iring)
Definition: CSCDetId.h:285
CSCDetId::BITS_ENDCAP
Definition: CSCDetId.h:303
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
CSCDetId::CSCDetId
CSCDetId()
Definition: CSCDetId.h:30
CSCDetId::isME1a
bool isME1a() const
Definition: CSCDetId.cc:62
CSCDetId::MASK_CHAMBER
Definition: CSCDetId.h:306
CSCDetId::iChamberType
unsigned short iChamberType() const
Definition: CSCDetId.h:96
CSCDetId::START_ENDCAP
Definition: CSCDetId.h:313
DetId::kSubdetOffset
static const int kSubdetOffset
Definition: DetId.h:22
CSCDetId::BITS_STATION
Definition: CSCDetId.h:303
CSCDetId::layer
int layer() const
Definition: CSCDetId.h:56
CSCDetId::MIN_STATION
Definition: CSCDetId.h:299
CSCDetId::START_STATION
Definition: CSCDetId.h:312
CSCDetId::BITS_LAYER
Definition: CSCDetId.h:303
CSCDetId::intToDetId
static int intToDetId(int iring)
Definition: CSCDetId.h:276
CSCDetId::BITS_RING
Definition: CSCDetId.h:303
DetId::id_
uint32_t id_
Definition: DetId.h:69
CSCDetId::MASK_ENDCAP
Definition: CSCDetId.h:306
CSCDetId::MIN_LAYER
Definition: CSCDetId.h:299
CSCDetId::MASK_LAYER
Definition: CSCDetId.h:306
CSCDetId::MAX_CHAMBER
Definition: CSCDetId.h:297
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
CSCDetId::START_RING
Definition: CSCDetId.h:311
CSCDetId::init
static uint32_t init(int iendcap, int istation, int iring, int ichamber, int ilayer)
Definition: CSCDetId.h:258
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCDetId::isME1b
bool isME1b() const
Definition: CSCDetId.cc:63
DetId::kDetOffset
static const int kDetOffset
Definition: DetId.h:21
CSCDetId::MIN_ENDCAP
Definition: CSCDetId.h:299
CSCDetId::MAX_LAYER
Definition: CSCDetId.h:297
CSCDetId::MASK_RING
Definition: CSCDetId.h:306
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
CSCDetId::chamberName
std::string chamberName() const
Definition: CSCDetId.cc:86
DetId::DetId
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
CSCDetId::MAX_STATION
Definition: CSCDetId.h:297
mps_fire.result
result
Definition: mps_fire.py:311
DetId::Muon
Definition: DetId.h:26
CSCDetId::MIN_RING
Definition: CSCDetId.h:299
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
CSCDetId::MAX_RING
Definition: CSCDetId.h:297
CSCDetId::MASK_STATION
Definition: CSCDetId.h:306
CSCDetId::START_CHAMBER
Definition: CSCDetId.h:310
CSCDetId::MIN_CHAMBER
Definition: CSCDetId.h:299