CMS 3D CMS Logo

List of all members | Public Member Functions
DTWireId Class Reference

#include <DTWireId.h>

Inheritance diagram for DTWireId:
DTLayerId DTSuperLayerId DTChamberId DetId

Public Member Functions

 DTWireId ()
 
 DTWireId (const DTChamberId &chId, int superlayer, int layer, int wire)
 Constructor from a CamberId and SL, layer and wire numbers. More...
 
 DTWireId (const DTLayerId &layerId, int wire)
 Constructor from a layerId and a wire number. More...
 
 DTWireId (const DTSuperLayerId &slId, int layer, int wire)
 Constructor from a SuperLayerId and layer and wire numbers. More...
 
 DTWireId (const DTWireId &wireId)
 Copy Constructor. More...
 
 DTWireId (int wheel, int station, int sector, int superlayer, int layer, int wire)
 
 DTWireId (uint32_t id)
 
DTLayerId layerId () const
 Return the corresponding LayerId. More...
 
int wire () const
 Return the wire number. More...
 
- Public Member Functions inherited from DTLayerId
 DTLayerId ()
 
 DTLayerId (const DTChamberId &chId, int superlayer, int layer)
 Constructor from a camberId and SL and layer numbers. More...
 
 DTLayerId (const DTLayerId &layerId)
 
 DTLayerId (const DTSuperLayerId &slId, int layer)
 Constructor from a SuperLayerId and layer number. More...
 
 DTLayerId (int wheel, int station, int sector, int superlayer, int layer)
 
 DTLayerId (uint32_t id)
 
int layer () const
 Return the layer number. More...
 
DTSuperLayerId superlayerId () const
 Return the corresponding SuperLayerId. More...
 
- Public Member Functions inherited from DTSuperLayerId
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 wires

Author
G. Cerminara - INFN Torino

Definition at line 12 of file DTWireId.h.

Constructor & Destructor Documentation

◆ DTWireId() [1/7]

DTWireId::DTWireId ( )

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

Definition at line 12 of file DTWireId.cc.

12 : DTLayerId() {}

◆ DTWireId() [2/7]

DTWireId::DTWireId ( 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. No check is done on the vaildity of the values.

Definition at line 14 of file DTWireId.cc.

14  {
15  id_ = id;
16  checkMuonId(); // Check this is a valid id for muon DTs.
17 }

References DTChamberId::checkMuonId(), triggerObjects_cff::id, and DetId::id_.

◆ DTWireId() [3/7]

DTWireId::DTWireId ( int  wheel,
int  station,
int  sector,
int  superlayer,
int  layer,
int  wire 
)

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

Definition at line 19 of file DTWireId.cc.

21  if (wire < minWireId || wire > maxWireId) {
22  throw cms::Exception("InvalidDetId") << "DTWireId ctor:"
23  << " Invalid parameters: "
24  << " Wh:" << wheel << " St:" << station << " Se:" << sector
25  << " Sl:" << superlayer << " La:" << layer << " Wi:" << wire << std::endl;
26  }
27 
28  id_ |= (wire & wireMask_) << wireStartBit_;
29 }

References Exception, DetId::id_, DTLayerId::layer(), DTChamberId::maxWireId, DTChamberId::sector(), DTChamberId::station(), DTSuperLayerId::superlayer(), DTChamberId::wheel(), wire(), DTChamberId::wireMask_, and DTChamberId::wireStartBit_.

◆ DTWireId() [4/7]

DTWireId::DTWireId ( const DTWireId wireId)

Copy Constructor.

Definition at line 32 of file DTWireId.cc.

32 : DTLayerId() { id_ = wireId.rawId(); }

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

◆ DTWireId() [5/7]

DTWireId::DTWireId ( const DTChamberId chId,
int  superlayer,
int  layer,
int  wire 
)

Constructor from a CamberId and SL, layer and wire numbers.

Definition at line 35 of file DTWireId.cc.

35  : DTLayerId(chId, superlayer, layer) {
36  if (wire < minWireId || wire > maxWireId) {
37  throw cms::Exception("InvalidDetId") << "DTWireId ctor:"
38  << " Invalid parameters: "
39  << " Wi:" << wire << std::endl;
40  }
41 
42  id_ |= (wire & wireMask_) << wireStartBit_;
43 }

References Exception, DetId::id_, DTChamberId::maxWireId, wire(), DTChamberId::wireMask_, and DTChamberId::wireStartBit_.

◆ DTWireId() [6/7]

DTWireId::DTWireId ( const DTSuperLayerId slId,
int  layer,
int  wire 
)

Constructor from a SuperLayerId and layer and wire numbers.

Definition at line 46 of file DTWireId.cc.

46  : DTLayerId(slId, layer) {
47  if (wire < minWireId || wire > maxWireId) {
48  throw cms::Exception("InvalidDetId") << "DTWireId ctor:"
49  << " Invalid parameters: "
50  << " Wi:" << wire << std::endl;
51  }
52 
53  id_ |= (wire & wireMask_) << wireStartBit_;
54 }

References Exception, DetId::id_, DTChamberId::maxWireId, wire(), DTChamberId::wireMask_, and DTChamberId::wireStartBit_.

◆ DTWireId() [7/7]

DTWireId::DTWireId ( const DTLayerId layerId,
int  wire 
)

Constructor from a layerId and a wire number.

Definition at line 57 of file DTWireId.cc.

57  : DTLayerId(layerId) {
58  if (wire < minWireId || wire > maxWireId) {
59  throw cms::Exception("InvalidDetId") << "DTWireId ctor:"
60  << " Invalid parameters: "
61  << " Wi:" << wire << std::endl;
62  }
63 
64  id_ |= (wire & wireMask_) << wireStartBit_;
65 }

References Exception, DetId::id_, DTChamberId::maxWireId, wire(), DTChamberId::wireMask_, and DTChamberId::wireStartBit_.

Member Function Documentation

◆ layerId()

DTLayerId DTWireId::layerId ( ) const
inline

◆ wire()

int DTWireId::wire ( ) const
inline

Return the wire number.

Definition at line 42 of file DTWireId.h.

42 { return ((id_ >> wireStartBit_) & wireMask_); }

References DetId::id_, DTChamberId::wireMask_, and DTChamberId::wireStartBit_.

Referenced by DTResolutionAnalysisTask::analyze(), DTnoiseDBValidation::beginRun(), cond::service::DTHVCheckByAbsoluteValues::checkCurrentStatus(), cond::service::DTHVCheckWithHysteresis::checkCurrentStatus(), DTCalibrationMap::checkGranularity(), DTHVStatusHandler::checkStatusChange(), DTRecHitSegmentResidual::compute(), DTLinearDriftFromDBAlgo::compute(), DTLinearDriftAlgo::compute(), DTNoDriftAlgo::compute(), DTParametrizedDriftAlgo::compute(), DTCalibValidationFromMuons::compute(), DTCalibValidation::compute(), DTDigitizer::computeTime(), dtCalibration::DTT0FEBPathCorrection::correction(), DTHVStatusHandler::createSnapshot(), DTWireId(), DTHVStatusHandler::dumpSnapshot(), DTTPAnalyzer::endJob(), DTReadOutMapping::geometryToReadOut(), DTTtrig::get(), DTMtime::get(), DTNoiseCalibration::getChannelName(), DTT0CalibrationRMS::getHistoName(), DTT0Calibration::getHistoName(), DTTMax::InfoLayer::InfoLayer(), DTClusterer::initHits(), DTROS25Unpacker::interpretRawData(), DTHVStatusHandler::offlineList(), DTTTrigSyncTOFCorr::offset(), DTTTrigSyncFromDB::offset(), DTuROSRawToDigi::process(), CalibratedDigis::produce(), DTResidualCalibration::segmentToWireDistance(), DTTtrig::set(), DTMtime::set(), DTRecHitQuality::simHitDistFromWire(), GlobalRecHitsAnalyzer::simHitDistFromWire(), GlobalRecHitsProducer::simHitDistFromWire(), and DTDigitizer::storeDigis().

DTWireId::wire
int wire() const
Return the wire number.
Definition: DTWireId.h:42
DTChamberId::layerIdMask_
static const uint32_t layerIdMask_
Definition: DTChamberId.h:99
DTSuperLayerId::superlayer
int superlayer() const
Return the superlayer number (deprecated method name)
Definition: DTSuperLayerId.h:42
DTChamberId::maxWireId
static const int maxWireId
highest wire id (chambers have 48 to 96 wires)
Definition: DTChamberId.h:74
DTChamberId::wireStartBit_
static const int wireStartBit_
Definition: DTChamberId.h:79
DTChamberId::checkMuonId
void checkMuonId()
Definition: DTChamberId.cc:41
DetId::id_
uint32_t id_
Definition: DetId.h:69
DTLayerId::DTLayerId
DTLayerId()
Definition: DTLayerId.cc:12
DTChamberId::wireMask_
static const uint32_t wireMask_
Definition: DTChamberId.h:97
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
Exception
Definition: hltDiff.cc:246
DTWireId::layerId
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:45
DTLayerId::layer
int layer() const
Return the layer number.
Definition: DTLayerId.h:42
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