CMS 3D CMS Logo

List of all members | Public Member Functions
DTSuperLayerId Class Reference

#include <DTSuperLayerId.h>

Inheritance diagram for DTSuperLayerId:
DTChamberId DetId DTLayerId DTWireId

Public Member Functions

DTChamberId chamberId () const
 Return the corresponding ChamberId. More...
 
 DTSuperLayerId ()
 
 DTSuperLayerId (const DTChamberId &chId, int superlayer)
 Constructor from a DTChamberId and SL number. More...
 
 DTSuperLayerId (const DTSuperLayerId &slId)
 
 DTSuperLayerId (int wheel, int station, int sector, int superlayer)
 
 DTSuperLayerId (uint32_t id)
 
int superLayer () const
 Return the superlayer number. More...
 
int superlayer () const
 Return the superlayer number (deprecated method name) More...
 
- Public Member Functions inherited from DTChamberId
 DTChamberId ()
 
 DTChamberId (const DTChamberId &chId)
 
 DTChamberId (DetId id)
 
 DTChamberId (int wheel, int station, int sector)
 
 DTChamberId (uint32_t id)
 
int sector () const
 
int station () const
 Return the station number. More...
 
int wheel () const
 Return the wheel number. More...
 
- 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...
 

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 DTChamberId
static const int maxLayerId = 4
 highest layer id More...
 
static const int maxSectorId = 14
 highest sector id. More...
 
static const int maxStationId = 4
 highest station id More...
 
static const int maxSuperLayerId = 3
 highest superlayer id More...
 
static const int maxWheelId = 2
 highest wheel number More...
 
static const int maxWireId = 97
 highest wire id (chambers have 48 to 96 wires) More...
 
static const int minLayerId = 0
 lowest layer id. 0 indicates a full SL More...
 
static const int minSectorId = 0
 lowest sector id. 0 indicates all sectors (a station) More...
 
static const int minStationId = 1
 lowest station id More...
 
static const int minSuperLayerId = 0
 loweset super layer id. 0 indicates a full chamber More...
 
static const int minWheelId = -2
 lowest wheel number More...
 
static const int minWireId = 0
 lowest wire id (numbering starts from 1 or 2). 0 indicates a full layer More...
 
- 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 Member Functions inherited from DTChamberId
void checkMuonId ()
 
- Protected Attributes inherited from DetId
uint32_t id_
 
- Static Protected Attributes inherited from DTChamberId
static const uint32_t chamberIdMask_
 
static const uint32_t layerIdMask_ = ~(wireMask_ << wireStartBit_)
 
static const int layerNumBits_ = 3
 
static const int layerStartBit_ = wireStartBit_ + wireNumBits_
 
static const uint32_t lMask_ = 0x7
 
static const uint32_t sectorMask_ = 0xf
 
static const int sectorNumBits_ = 4
 
static const int sectorStartBit_ = wheelStartBit_ + wheelNumBits_
 
static const int slayerNumBits_ = 2
 
static const int slayerStartBit_ = layerStartBit_ + layerNumBits_
 
static const uint32_t slIdMask_ = ~((wireMask_ << wireStartBit_) | (lMask_ << layerStartBit_))
 
static const uint32_t slMask_ = 0x3
 
static const uint32_t stationMask_ = 0x7
 
static const int stationNumBits_ = 3
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const int stationStartBit_ = sectorStartBit_ + sectorNumBits_
 
static const uint32_t wheelMask_ = 0x7
 
static const int wheelNumBits_ = 3
 
static const int wheelStartBit_ = slayerStartBit_ + slayerNumBits_
 
static const uint32_t wireMask_ = 0x7f
 
static const int wireNumBits_ = 7
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const int wireStartBit_ = 3
 

Detailed Description

DetUnit identifier for DT SuperLayers (SL)

Author
G. Cerminara - INFN Torino

Definition at line 12 of file DTSuperLayerId.h.

Constructor & Destructor Documentation

◆ DTSuperLayerId() [1/5]

DTSuperLayerId::DTSuperLayerId ( )

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

Definition at line 11 of file DTSuperLayerId.cc.

11 : DTChamberId() {}

Referenced by DTLayerId::superlayerId().

◆ DTSuperLayerId() [2/5]

DTSuperLayerId::DTSuperLayerId ( uint32_t  id)
explicit

Construct from a packed id. It is required that the packed id represents a valid DT DetId (proper Detector and SubDet fields), otherwise an exception is thrown. Any bits outside the DTSuperLayerId fields are zeroed; apart for this, no check is done on the vaildity of the values.

Definition at line 13 of file DTSuperLayerId.cc.

13  {
14  id_ = id & slIdMask_; // Mask the bits outside DTSuperLayerId fields
15  checkMuonId(); // Check this is a valid id for muon DTs.
16 }

References DTChamberId::checkMuonId(), DetId::id_, and DTChamberId::slIdMask_.

◆ DTSuperLayerId() [3/5]

DTSuperLayerId::DTSuperLayerId ( int  wheel,
int  station,
int  sector,
int  superlayer 
)

Construct from indexes. Input values are required to be within legal ranges, otherwise an exception is thrown.

Definition at line 18 of file DTSuperLayerId.cc.

20  if (superlayer < minSuperLayerId || superlayer > maxSuperLayerId) {
21  throw cms::Exception("InvalidDetId") << "DTSuperLayerId ctor:"
22  << " Invalid parameters: "
23  << " Wh:" << wheel << " St:" << station << " Se:" << sector
24  << " Sl:" << superlayer << std::endl;
25  }
27 }

References Exception, DetId::id_, DTChamberId::maxSuperLayerId, DTChamberId::sector(), DTChamberId::slayerStartBit_, DTChamberId::slMask_, DTChamberId::station(), superlayer(), and DTChamberId::wheel().

◆ DTSuperLayerId() [4/5]

DTSuperLayerId::DTSuperLayerId ( const DTSuperLayerId slId)

Copy Constructor. Any bits outside the DTChamberId fields are zeroed; apart for this, no check is done on the vaildity of the values.

Definition at line 30 of file DTSuperLayerId.cc.

30  : DTChamberId() {
31  // The mask is required for proper slicing, i.e. if slId is
32  // actually a derived class.
33  id_ = (slId.rawId() & slIdMask_);
34 }

References DetId::id_, DetId::rawId(), and DTChamberId::slIdMask_.

◆ DTSuperLayerId() [5/5]

DTSuperLayerId::DTSuperLayerId ( const DTChamberId chId,
int  superlayer 
)

Constructor from a DTChamberId and SL number.

Definition at line 37 of file DTSuperLayerId.cc.

37  : DTChamberId(chId) {
38  if (superlayer < minSuperLayerId || superlayer > maxSuperLayerId) {
39  throw cms::Exception("InvalidDetId") << "DTSuperLayerId ctor:"
40  << " Invalid parameter: "
41  << " Sl:" << superlayer << std::endl;
42  }
44 }

References Exception, DetId::id_, DTChamberId::maxSuperLayerId, DTChamberId::slayerStartBit_, DTChamberId::slMask_, and superlayer().

Member Function Documentation

◆ chamberId()

DTChamberId DTSuperLayerId::chamberId ( ) const
inline

Return the corresponding ChamberId.

Definition at line 45 of file DTSuperLayerId.h.

45 { return DTChamberId(id_ & chamberIdMask_); }

References DTChamberId::chamberIdMask_, DTChamberId::DTChamberId(), and DetId::id_.

Referenced by DTT0CalibrationRMS::analyze(), DTNoiseCalibration::analyze(), DTTTrigCalibration::analyze(), DTT0Calibration::analyze(), DTDigiTask::analyze(), DTnoiseDBValidation::beginRun(), DTNoiseComputation::beginRun(), DTEfficiencyTask::bookHistograms(), DTt0DBValidation::bookHistos(), DTNoiseTask::bookHistos(), DTSLRecSegment2D::chamberId(), DTRecHitSegmentResidual::compute(), dtCalibration::DTTTrigMatchRPhi::correction(), dtCalibration::DTT0FillChamberFromDB::correction(), dtCalibration::DTTTrigConstantShift::correction(), dtCalibration::DTT0AbsoluteReferenceCorrection::correction(), dtCalibration::DTT0ChamberReferenceCorrection::correction(), dtCalibration::DTT0FEBPathCorrection::correction(), dtCalibration::DTT0WireInChamberReferenceCorrection::correction(), DTDigiToRaw::createFedBuffers(), DTT0CalibrationRMS::endJob(), DTSegmentUpdator::fit(), DTNoiseComputation::getChamberName(), DTConfigManager::getDTConfigBti(), dtCalibration::DTVDriftSegment::getHistoName(), dtCalibration::DTTTrigT0SegCorrection::getHistoName(), DTCalibrationMap::getKey(), DTNoiseCalibration::getLayerName(), DTNoiseComputation::getLayerName(), DTConfigPedestals::getOffset(), DTNoiseCalibration::getSuperLayerName(), DTNoiseComputation::getSuperLayerName(), DTTrigPhase2Prod::produce(), DTResidualCalibration::segmentToWireDistance(), DTConfigManager::setDTConfigBti(), and DTTrig::triggerReco().

◆ superLayer()

int DTSuperLayerId::superLayer ( ) const
inline

◆ superlayer()

int DTSuperLayerId::superlayer ( ) const
inline

Return the superlayer number (deprecated method name)

Definition at line 42 of file DTSuperLayerId.h.

42 { return superLayer(); }

References superLayer().

Referenced by DTPreCalibrationTask::analyze(), DTEfficiencyTask::analyze(), DTResolutionAnalysisTask::analyze(), DTDigiTask::analyze(), DTEfficiencyTask::bookHistograms(), DTCalibValidation::bookHistograms(), DTCalibValidationFromMuons::bookHistograms(), DTResidualCalibration::bookHistos(), DTt0DBValidation::bookHistos(), DTEfficiencyTest::bookHistos(), DTNoiseTask::bookHistos(), DTResolutionAnalysisTask::bookHistos(), DTCalibrationMap::checkGranularity(), DTRecHitSegmentResidual::compute(), DTParametrizedDriftAlgo::compute(), DTCalibValidationFromMuons::compute(), DTCalibValidation::compute(), dtCalibration::DTT0FEBPathCorrection::correction(), DTDigiToRaw::createFedBuffers(), DTResolutionAnalysisTest::dqmEndJob(), DTResolutionTest::dqmEndLuminosityBlock(), DTEfficiencyTest::dqmEndLuminosityBlock(), DTLayerId::DTLayerId(), DTSuperLayerId(), DTWireId::DTWireId(), PseudoBayesGrouping::FillDigisByLayer(), DTNoiseCalibration::getChannelName(), DTTPAnalyzer::getHistoName(), dtCalibration::DTTTrigResidualCorrection::getHistoName(), DTT0CalibrationRMS::getHistoName(), DTT0Calibration::getHistoName(), DTNoiseCalibration::getLayerName(), DTNoiseComputation::getLayerName(), DTResolutionAnalysisTest::getMEName(), DTResolutionTest::getMEName(), DTEfficiencyTest::getMEName(), DTResolutionTest::getMEName2D(), DTTTrigCalibration::getOccupancyName(), DTNoiseCalibration::getSuperLayerName(), DTNoiseComputation::getSuperLayerName(), DTTTrigWriter::getTBoxName(), DTTTrigCalibration::getTBoxName(), MuonChamberResidual::hitlayer(), geometryXMLparser.DTAlignable::index(), DTBtiCard::loadBTI(), DTuROSDigiToRaw::process(), MuonSimHitProducer::produce(), DTResidualCalibration::segmentToWireDistance(), InitialGrouping::setInChannels(), and DTBtiId::superlayer().

DTSuperLayerId::superlayer
int superlayer() const
Return the superlayer number (deprecated method name)
Definition: DTSuperLayerId.h:42
DTSuperLayerId::superLayer
int superLayer() const
Return the superlayer number.
Definition: DTSuperLayerId.h:39
DTChamberId::slIdMask_
static const uint32_t slIdMask_
Definition: DTChamberId.h:100
DTChamberId::checkMuonId
void checkMuonId()
Definition: DTChamberId.cc:41
DTChamberId::slMask_
static const uint32_t slMask_
Definition: DTChamberId.h:95
DetId::id_
uint32_t id_
Definition: DetId.h:69
DTChamberId::DTChamberId
DTChamberId()
Definition: DTChamberId.cc:14
DTChamberId::maxSuperLayerId
static const int maxSuperLayerId
highest superlayer id
Definition: DTChamberId.h:66
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DTChamberId::chamberIdMask_
static const uint32_t chamberIdMask_
Definition: DTChamberId.h:101
DTChamberId::slayerStartBit_
static const int slayerStartBit_
Definition: DTChamberId.h:83
Exception
Definition: hltDiff.cc:245
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42