#include <DataFormats/MuonDetId/interface/DTLayerId.h>
Public Member Functions | |
DTLayerId (const DTSuperLayerId &slId, int layer) | |
Constructor from a SuperLayerId and layer number. | |
DTLayerId (const DTChamberId &chId, int superlayer, int layer) | |
Constructor from a camberId and SL and layer numbers. | |
DTLayerId (const DTLayerId &layerId) | |
Copy Constructor. | |
DTLayerId (int wheel, int station, int sector, int superlayer, int layer) | |
Construct from indexes. | |
DTLayerId (uint32_t id) | |
Construct from a packed id. | |
DTLayerId () | |
Default constructor. | |
int | layer () const |
Return the layer number. | |
DTSuperLayerId | superlayerId () const |
Return the corresponding SuperLayerId. |
Definition at line 14 of file DTLayerId.h.
DTLayerId::DTLayerId | ( | ) |
Default constructor.
Fills the common part in the base and leaves 0 in all other fields
Definition at line 15 of file DTLayerId.cc.
Referenced by DTWireId::layerId().
00015 : DTSuperLayerId() {}
DTLayerId::DTLayerId | ( | 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 DTLayerId fields are zeroed; apart for this, no check is done on the vaildity of the values.
Definition at line 18 of file DTLayerId.cc.
References DTChamberId::checkMuonId(), DetId::id_, and DTChamberId::layerIdMask_.
00018 { 00019 // Mask the bits outside DTLayerId fields (notably, the wire number) 00020 id_ = id & layerIdMask_; 00021 // Check this is a valid id for muon DTs. 00022 checkMuonId(); 00023 }
Construct from indexes.
Input values are required to be within legal ranges, otherwise an exception is thrown.
Definition at line 63 of file DTLayerId.cc.
References lat::endl(), Exception, DetId::id_, DTChamberId::layerStartBit_, DTChamberId::lMask_, and DTChamberId::maxLayerId.
00067 : DTSuperLayerId(wheel, station, sector, superlayer) { 00068 if (layer < minLayerId || layer > maxLayerId) { 00069 throw cms::Exception("InvalidDetId") << "DTLayerId ctor:" 00070 << " Invalid parameters: " 00071 << " Wh:"<< wheel 00072 << " St:"<< station 00073 << " Se:"<< sector 00074 << " Sl:"<< superlayer 00075 << " La:"<< layer 00076 << std::endl; 00077 } 00078 00079 id_ |= (layer & lMask_) << layerStartBit_; 00080 }
DTLayerId::DTLayerId | ( | const DTLayerId & | layerId | ) |
Copy Constructor.
Any bits outside the DTLayerId fields are zeroed; apart for this, no check is done on the vaildity of the values.
Definition at line 28 of file DTLayerId.cc.
References DetId::id_, DTChamberId::layerIdMask_, and DetId::rawId().
00028 { 00029 // The mask is required for proper slicing, i.e. if layerId is 00030 // actually a derived class. 00031 id_ = (layerId.rawId() & layerIdMask_); 00032 }
DTLayerId::DTLayerId | ( | const DTChamberId & | chId, | |
int | superlayer, | |||
int | layer | |||
) |
Constructor from a camberId and SL and layer numbers.
Definition at line 37 of file DTLayerId.cc.
References lat::endl(), Exception, DetId::id_, DTChamberId::layerStartBit_, DTChamberId::lMask_, and DTChamberId::maxLayerId.
00037 : DTSuperLayerId(chId, superlayer) { 00038 if (layer < minLayerId || layer > maxLayerId) { 00039 throw cms::Exception("InvalidDetId") << "DTLayerId ctor:" 00040 << " Invalid parameters: " 00041 << " La:"<< layer 00042 << std::endl; 00043 } 00044 id_ |= (layer & lMask_) << layerStartBit_; 00045 }
DTLayerId::DTLayerId | ( | const DTSuperLayerId & | slId, | |
int | layer | |||
) |
Constructor from a SuperLayerId and layer number.
Definition at line 50 of file DTLayerId.cc.
References lat::endl(), Exception, DetId::id_, DTChamberId::layerStartBit_, DTChamberId::lMask_, and DTChamberId::maxLayerId.
00050 : DTSuperLayerId(slId) { 00051 if (layer < minLayerId || layer > maxLayerId) { 00052 throw cms::Exception("InvalidDetId") << "DTLayerId ctor:" 00053 << " Invalid parameters: " 00054 << " La:"<< layer 00055 << std::endl; 00056 } 00057 id_ |= (layer & lMask_) << layerStartBit_; 00058 }
int DTLayerId::layer | ( | ) | const [inline] |
Return the layer number.
Definition at line 55 of file DTLayerId.h.
References DetId::id_, DTChamberId::layerStartBit_, and DTChamberId::lMask_.
Referenced by DTSuperLayer::add(), VisDTDigi::analyze(), DTDigiForNoiseTask::bookHistos(), DTDeadChannelTest::bookHistos(), DTEfficiencyTask::bookHistos(), DTt0DBValidation::bookHistos(), DTEfficiencyTest::bookHistos(), DTAlbertoBenvenutiTask::bookHistos(), DTCalibrationMap::checkGranularity(), DTChamber::component(), DTDigiToRaw::createFedBuffers(), DTNoiseComputation::endJob(), DTCreateSummaryHistos::endJob(), DTEfficiencyTest::endLuminosityBlock(), DTDeadChannelTest::endLuminosityBlock(), DTMeantimerPatternReco::geometryFilter(), DTReadOutMapping::geometryToReadOut(), DTTtrig::get(), DTMtime::get(), DTT0Calibration::getHistoName(), DTT0CalibrationNew::getHistoName(), DTNoiseCalibration::getLayerName(), DTNoiseComputation::getLayerName(), DTNoiseTest::getMEName(), DTTTrigCalibration::getOccupancyName(), DTTMax::getTMax(), MuonSimHitProducer::produce(), DTTtrig::set(), and DTMtime::set().
00055 { 00056 return ((id_>>layerStartBit_)&lMask_); 00057 }
DTSuperLayerId DTLayerId::superlayerId | ( | ) | const [inline] |
Return the corresponding SuperLayerId.
Definition at line 61 of file DTLayerId.h.
References DTSuperLayerId::DTSuperLayerId(), DetId::id_, and DTChamberId::slIdMask_.
Referenced by DTT0CalibrationNew::analyze(), DTTTrigCalibration::analyze(), DTEfficiencyTask::analyze(), DTResolutionAnalysisTask::analyze(), VisDTDigi::analyze(), DTT0Calibration::analyze(), DTVDriftCalibration::analyze(), DTNoiseCalibration::analyze(), DTNoiseComputation::beginJob(), DTDigiForNoiseTask::bookHistos(), DTDeadChannelTest::bookHistos(), DTEfficiencyTask::bookHistos(), DTt0DBValidation::bookHistos(), DTEfficiencyTest::bookHistos(), DTAlbertoBenvenutiTask::bookHistos(), DTLinearDriftFromDBAlgo::compute(), DTCalibValidation::compute(), DTDigiToRaw::createFedBuffers(), DTMeantimerPatternReco::geometryFilter(), DTNoiseComputation::getChamberName(), DTCalibrationMap::getKey(), DTNoiseCalibration::getLayerName(), DTNoiseComputation::getLayerName(), DTTTrigSyncFromDB::offset(), DTRecSegment2DProducer::produce(), and DTTrig::triggerReco().
00061 { 00062 return DTSuperLayerId(id_ & slIdMask_); 00063 }