CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 (uint32_t id)
 
 DTSuperLayerId (int wheel, int station, int sector, int superlayer)
 
 DTSuperLayerId (const DTSuperLayerId &slId)
 
 DTSuperLayerId (const DTChamberId &chId, int superlayer)
 Constructor from a DTChamberId and SL number. More...
 
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 (uint32_t id)
 
 DTChamberId (DetId id)
 
 DTChamberId (int wheel, int station, int sector)
 
 DTChamberId (const DTChamberId &chId)
 
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
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...
 

Additional Inherited Members

- Public Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5
}
 
- 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 kDetOffset = 28
 
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_
 
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)

Date:
2006/04/12 17:52:39
Revision:
1.4
Author
G. Cerminara - INFN Torino

Definition at line 15 of file DTSuperLayerId.h.

Constructor & Destructor Documentation

DTSuperLayerId::DTSuperLayerId ( )

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

Definition at line 15 of file DTSuperLayerId.cc.

Referenced by DTLayerId::superlayerId().

15 : DTChamberId() {}
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 19 of file DTSuperLayerId.cc.

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

19  {
20  id_ = id & slIdMask_; // Mask the bits outside DTSuperLayerId fields
21  checkMuonId(); // Check this is a valid id for muon DTs.
22 }
static const uint32_t slIdMask_
Definition: DTChamberId.h:119
void checkMuonId()
Definition: DTChamberId.cc:59
uint32_t id_
Definition: DetId.h:57
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 25 of file DTSuperLayerId.cc.

References edm::hlt::Exception, DetId::id_, DTChamberId::maxSuperLayerId, DTChamberId::slayerStartBit_, and DTChamberId::slMask_.

29  if(superlayer < minSuperLayerId || superlayer > maxSuperLayerId) {
30  throw cms::Exception("InvalidDetId") << "DTSuperLayerId ctor:"
31  << " Invalid parameters: "
32  << " Wh:"<< wheel
33  << " St:"<< station
34  << " Se:"<< sector
35  << " Sl:"<< superlayer
36  << std::endl;
37  }
39  }
static const uint32_t slMask_
Definition: DTChamberId.h:114
static const int maxSuperLayerId
highest superlayer id
Definition: DTChamberId.h:83
int superlayer() const
Return the superlayer number (deprecated method name)
uint32_t id_
Definition: DetId.h:57
int sector() const
Definition: DTChamberId.h:63
static const int slayerStartBit_
Definition: DTChamberId.h:101
int station() const
Return the station number.
Definition: DTChamberId.h:53
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:47
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 44 of file DTSuperLayerId.cc.

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

44  {
45  // The mask is required for proper slicing, i.e. if slId is
46  // actually a derived class.
47  id_ = (slId.rawId() & slIdMask_);
48 }
static const uint32_t slIdMask_
Definition: DTChamberId.h:119
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
uint32_t id_
Definition: DetId.h:57
DTSuperLayerId::DTSuperLayerId ( const DTChamberId chId,
int  superlayer 
)

Constructor from a DTChamberId and SL number.

Definition at line 53 of file DTSuperLayerId.cc.

References edm::hlt::Exception, DetId::id_, DTChamberId::maxSuperLayerId, DTChamberId::slayerStartBit_, and DTChamberId::slMask_.

53  : DTChamberId(chId) {
54  if(superlayer < minSuperLayerId || superlayer > maxSuperLayerId) {
55  throw cms::Exception("InvalidDetId") << "DTSuperLayerId ctor:"
56  << " Invalid parameter: "
57  << " Sl:"<< superlayer
58  << std::endl;
59  }
61 }
static const uint32_t slMask_
Definition: DTChamberId.h:114
static const int maxSuperLayerId
highest superlayer id
Definition: DTChamberId.h:83
int superlayer() const
Return the superlayer number (deprecated method name)
uint32_t id_
Definition: DetId.h:57
static const int slayerStartBit_
Definition: DTChamberId.h:101

Member Function Documentation

DTChamberId DTSuperLayerId::chamberId ( ) const
inline

Return the corresponding ChamberId.

Definition at line 63 of file DTSuperLayerId.h.

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

Referenced by DTT0Calibration::analyze(), DTT0CalibrationNew::analyze(), DTNoiseCalibration::analyze(), DTTTrigCalibration::analyze(), DTDigiTask::analyze(), DTnoiseDBValidation::beginRun(), DTNoiseComputation::beginRun(), DTt0DBValidation::bookHistos(), DTAlbertoBenvenutiTask::bookHistos(), DTDigiForNoiseTask::bookHistos(), DTNoiseTask::bookHistos(), DTEfficiencyTask::bookHistos(), DTSLRecSegment2D::chamberId(), DTRecHitSegmentResidual::compute(), DTTTrigMatchRPhi::correction(), DTDigiToRaw::createFedBuffers(), DTT0Calibration::endJob(), DTT0CalibrationNew::endJob(), DTSegmentUpdator::fit(), DTNoiseComputation::getChamberName(), DTConfigManager::getDTConfigBti(), DTVDriftSegment::getHistoName(), DTTTrigT0SegCorrection::getHistoName(), DTCalibrationMap::getKey(), DTNoiseCalibration::getLayerName(), DTNoiseComputation::getLayerName(), DTConfigPedestals::getOffset(), DTNoiseCalibration::getSuperLayerName(), DTNoiseComputation::getSuperLayerName(), DTResidualCalibration::segmentToWireDistance(), DTConfigManager::setDTConfigBti(), and DTTrig::triggerReco().

63  {
64  return DTChamberId(id_ & chamberIdMask_);
65  }
uint32_t id_
Definition: DetId.h:57
static const uint32_t chamberIdMask_
Definition: DTChamberId.h:121
int DTSuperLayerId::superLayer ( ) const
inline
int DTSuperLayerId::superlayer ( ) const
inline

Return the superlayer number (deprecated method name)

Definition at line 57 of file DTSuperLayerId.h.

References superLayer().

Referenced by DTPreCalibrationTask::analyze(), DTEfficiencyTask::analyze(), DTResolutionAnalysisTask::analyze(), DTDigiTask::analyze(), DTResidualCalibration::bookHistos(), DTt0DBValidation::bookHistos(), DTTestPulsesTask::bookHistos(), DTAlbertoBenvenutiTask::bookHistos(), DTDigiForNoiseTask::bookHistos(), DTNoiseTask::bookHistos(), DTEfficiencyTest::bookHistos(), DTDeadChannelTest::bookHistos(), DTEfficiencyTask::bookHistos(), DTResolutionAnalysisTask::bookHistos(), DTCalibValidation::bookHistos(), DTCalibrationMap::checkGranularity(), DTRecHitSegmentResidual::compute(), DTCalibValidation::compute(), DTRecHitQuality::compute(), DTDigiToRaw::createFedBuffers(), DTCreateSummaryHistos::endJob(), DTResolutionTest::endLuminosityBlock(), DTDeadChannelTest::endLuminosityBlock(), DTEfficiencyTest::endLuminosityBlock(), DTResolutionAnalysisTest::endRun(), DTNoiseCalibration::getChannelName(), DTTPAnalyzer::getHistoName(), DTTTrigResidualCorrection::getHistoName(), DTT0Calibration::getHistoName(), DTT0CalibrationNew::getHistoName(), DTNoiseCalibration::getLayerName(), DTNoiseComputation::getLayerName(), DTResolutionAnalysisTest::getMEName(), DTResolutionTest::getMEName(), DTtTrigCalibrationTest::getMEName(), DTEfficiencyTest::getMEName(), DTNoiseTest::getMEName(), DTResolutionTest::getMEName2D(), DTTTrigCalibration::getOccupancyName(), DTNoiseCalibration::getSuperLayerName(), DTNoiseComputation::getSuperLayerName(), DTTTrigWriter::getTBoxName(), DTTTrigCalibration::getTBoxName(), MuonChamberResidual::hitlayer(), geometryXMLparser.DTAlignable::index(), DTBtiCard::loadBTI(), MuonResidualsFromTrack::MuonResidualsFromTrack(), MuonSimHitProducer::produce(), DTResidualCalibration::segmentToWireDistance(), and DTBtiId::superlayer().

57  {
58  return superLayer();
59  }
int superLayer() const
Return the superlayer number.