CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Static Private Attributes
SiStripDetId Class Reference

Detector identifier class for the strip tracker. More...

#include <SiStripDetId.h>

Inheritance diagram for SiStripDetId:
DetId

Public Types

using SubDetector = SiStripSubdetector::Subdetector
 
- 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
}
 

Public Member Functions

uint32_t glued () const
 
SiStripModuleGeometry moduleGeometry () const
 
uint32_t partnerDetId () const
 
uint16_t reserved () const
 
 SiStripDetId ()
 
 SiStripDetId (const uint32_t &raw_id)
 
 SiStripDetId (const DetId &det_id)
 
 SiStripDetId (Detector det, int subdet)
 
 SiStripDetId (const uint32_t &raw_id, const uint16_t &reserved)
 
 SiStripDetId (const DetId &det_id, const uint16_t &reserved)
 
uint32_t stereo () const
 
double stripLength () const
 
SubDetector subDetector () 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 (uint32_t id)
 Create an id from a raw number. More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. 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 Attributes

static constexpr auto TEC = SiStripSubdetector::TEC
 
static constexpr auto TIB = SiStripSubdetector::TIB
 
static constexpr auto TID = SiStripSubdetector::TID
 
static constexpr auto TOB = SiStripSubdetector::TOB
 
static constexpr auto UNKNOWN = SiStripSubdetector::UNKNOWN
 
- 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
 

Static Private Attributes

static const unsigned layerMask_ = 0x7
 
static const unsigned layerStartBit_ = 14
 
static const uint16_t reservedMask_ = 0x7
 
static const uint16_t reservedStartBit_ = 20
 
static const unsigned ringMaskTEC_ = 0x7
 
static const unsigned ringMaskTID_ = 0x3
 
static const unsigned ringStartBitTEC_ = 5
 
static const unsigned ringStartBitTID_ = 9
 
static const uint32_t sterMask_ = 0x3
 
static const uint32_t sterStartBit_ = 0
 

Additional Inherited Members

- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Detector identifier class for the strip tracker.

Author
R.Bainbridge
Examples:
/tmp/cmsbuild/jenkins/workspace/cmssw-doxygen/cmsdoxy/TMP/CMSSW_14_0_9_patch1/src/CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleCalibrationHelpers.h.

Definition at line 18 of file SiStripDetId.h.

Member Typedef Documentation

◆ SubDetector

Enumerated type for tracker sub-deteector systems.

Definition at line 35 of file SiStripDetId.h.

Constructor & Destructor Documentation

◆ SiStripDetId() [1/6]

SiStripDetId::SiStripDetId ( )
inline

Construct a null id

Definition at line 23 of file SiStripDetId.h.

23 : DetId() { ; }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ SiStripDetId() [2/6]

SiStripDetId::SiStripDetId ( const uint32_t &  raw_id)
inline

Construct from a raw value

Definition at line 26 of file SiStripDetId.h.

26 : DetId(raw_id) { ; }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ SiStripDetId() [3/6]

SiStripDetId::SiStripDetId ( const DetId det_id)
inline

Construct from generic DetId

Definition at line 29 of file SiStripDetId.h.

29 : DetId(det_id.rawId()) { ; }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ SiStripDetId() [4/6]

SiStripDetId::SiStripDetId ( Detector  det,
int  subdet 
)
inline

Construct and fill only the det and sub-det fields.

Definition at line 32 of file SiStripDetId.h.

32 : DetId(det, subdet) { ; }
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ SiStripDetId() [5/6]

SiStripDetId::SiStripDetId ( const uint32_t &  raw_id,
const uint16_t &  reserved 
)
inline

Construct from a raw value and set "reserved" field.

Definition at line 65 of file SiStripDetId.h.

References DetId::id_, reserved(), reservedMask_, and reservedStartBit_.

65  : DetId(raw_id) {
66  id_ &= (~static_cast<uint32_t>(reservedMask_ << reservedStartBit_));
68  }
uint16_t reserved() const
Definition: SiStripDetId.h:184
static const uint16_t reservedMask_
Definition: SiStripDetId.h:90
uint32_t id_
Definition: DetId.h:69
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:84
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ SiStripDetId() [6/6]

SiStripDetId::SiStripDetId ( const DetId det_id,
const uint16_t &  reserved 
)
inline

Construct from generic DetId and set "reserved" field.

Definition at line 74 of file SiStripDetId.h.

References DetId::id_, reserved(), reservedMask_, and reservedStartBit_.

74  : DetId(det_id.rawId()) {
75  id_ &= (~static_cast<uint32_t>(reservedMask_ << reservedStartBit_));
77  }
uint16_t reserved() const
Definition: SiStripDetId.h:184
static const uint16_t reservedMask_
Definition: SiStripDetId.h:90
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t id_
Definition: DetId.h:69
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:84
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

Member Function Documentation

◆ glued()

uint32_t SiStripDetId::glued ( ) const
inline

A non-zero value means a glued module, null means not glued.

Definition at line 163 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by OverlapValidation::analyzeTrajectory().

163  {
164  uint32_t testId = (id_ >> sterStartBit_) & sterMask_;
165  return (testId == 0) ? 0 : (id_ - testId);
166 }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:87
static const uint32_t sterMask_
Definition: SiStripDetId.h:93
uint32_t id_
Definition: DetId.h:69

◆ moduleGeometry()

SiStripModuleGeometry SiStripDetId::moduleGeometry ( ) const
inline

Returns enumerated type specifying sub-detector.

Definition at line 109 of file SiStripDetId.h.

References relativeConstraints::geometry, IB1, IB2, DetId::id_, createfilelist::int, layerMask_, layerStartBit_, OB1, OB2, ringMaskTEC_, ringMaskTID_, ringStartBitTEC_, ringStartBitTID_, subDetector(), TEC, TIB, TID, TOB, UNKNOWN, UNKNOWNGEOMETRY, W1A, W1B, W2A, W2B, W3A, W3B, W4, W5, W6, and W7.

Referenced by SiPixelErrorEstimation::analyze(), SiStripDB2Tree::analyze(), HITrackClusterRemover::sensorThickness(), siStripClusterTools::sensorThicknessInverse(), and APVGain::thickness().

109  {
111  switch (subDetector()) {
112  case TIB:
113  geometry =
115  break;
116  case TOB:
117  geometry =
119  break;
120  case TID:
121  switch ((id_ >> ringStartBitTID_) & ringMaskTID_) {
122  case 1:
124  break;
125  case 2:
127  break;
128  case 3:
130  break;
131  }
132  break;
133  case TEC:
134  switch ((id_ >> ringStartBitTEC_) & ringMaskTEC_) {
135  case 1:
137  break;
138  case 2:
140  break;
141  case 3:
143  break;
144  case 4:
146  break;
147  case 5:
149  break;
150  case 6:
152  break;
153  case 7:
155  break;
156  }
157  case UNKNOWN:
158  default:;
159  }
160  return geometry;
161 }
static const unsigned ringStartBitTID_
Definition: SiStripDetId.h:97
static constexpr auto TID
Definition: SiStripDetId.h:38
static const unsigned layerStartBit_
Definition: SiStripDetId.h:95
SubDetector subDetector() const
Definition: SiStripDetId.h:105
static constexpr auto UNKNOWN
Definition: SiStripDetId.h:36
static const unsigned layerMask_
Definition: SiStripDetId.h:96
static constexpr auto TOB
Definition: SiStripDetId.h:39
uint32_t id_
Definition: DetId.h:69
static constexpr auto TIB
Definition: SiStripDetId.h:37
static const unsigned ringMaskTEC_
Definition: SiStripDetId.h:100
static const unsigned ringStartBitTEC_
Definition: SiStripDetId.h:99
static const unsigned ringMaskTID_
Definition: SiStripDetId.h:98
static constexpr auto TEC
Definition: SiStripDetId.h:40

◆ partnerDetId()

uint32_t SiStripDetId::partnerDetId ( ) const
inline

Returns DetId of the partner module if glued, otherwise null.

Definition at line 170 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by TrackAssociatorByHitsImpl::associateSimToReco().

170  {
171  uint32_t testId = (id_ >> sterStartBit_) & sterMask_;
172  if (testId == 1) {
173  testId = id_ + 1;
174  } else if (testId == 2) {
175  testId = id_ - 1;
176  } else {
177  testId = 0;
178  }
179  return testId;
180 }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:87
static const uint32_t sterMask_
Definition: SiStripDetId.h:93
uint32_t id_
Definition: DetId.h:69

◆ reserved()

uint16_t SiStripDetId::reserved ( ) const
inline

Returns value of "reserved" field.

Definition at line 184 of file SiStripDetId.h.

References DetId::id_, reservedMask_, and reservedStartBit_.

Referenced by SiStripDetId().

184 { return static_cast<uint16_t>((id_ >> reservedStartBit_) & reservedMask_); }
static const uint16_t reservedMask_
Definition: SiStripDetId.h:90
uint32_t id_
Definition: DetId.h:69
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:84

◆ stereo()

uint32_t SiStripDetId::stereo ( ) const
inline

◆ stripLength()

double SiStripDetId::stripLength ( ) const
inline

Returns strip length of strip tracker sensor, otherwise null.

Definition at line 182 of file SiStripDetId.h.

182 { return 0.; }

◆ subDetector()

SiStripDetId::SubDetector SiStripDetId::subDetector ( ) const
inline

Member Data Documentation

◆ layerMask_

const unsigned SiStripDetId::layerMask_ = 0x7
staticprivate

Definition at line 96 of file SiStripDetId.h.

Referenced by moduleGeometry().

◆ layerStartBit_

const unsigned SiStripDetId::layerStartBit_ = 14
staticprivate

Definition at line 95 of file SiStripDetId.h.

Referenced by moduleGeometry().

◆ reservedMask_

const uint16_t SiStripDetId::reservedMask_ = 0x7
staticprivate

Mask for "reserved" bit field (3-bits wide).

Definition at line 90 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

◆ reservedStartBit_

const uint16_t SiStripDetId::reservedStartBit_ = 20
staticprivate

Position of "reserved" bit field.

Definition at line 84 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

◆ ringMaskTEC_

const unsigned SiStripDetId::ringMaskTEC_ = 0x7
staticprivate

Definition at line 100 of file SiStripDetId.h.

Referenced by moduleGeometry().

◆ ringMaskTID_

const unsigned SiStripDetId::ringMaskTID_ = 0x3
staticprivate

Definition at line 98 of file SiStripDetId.h.

Referenced by moduleGeometry().

◆ ringStartBitTEC_

const unsigned SiStripDetId::ringStartBitTEC_ = 5
staticprivate

Definition at line 99 of file SiStripDetId.h.

Referenced by moduleGeometry().

◆ ringStartBitTID_

const unsigned SiStripDetId::ringStartBitTID_ = 9
staticprivate

Definition at line 97 of file SiStripDetId.h.

Referenced by moduleGeometry().

◆ sterMask_

const uint32_t SiStripDetId::sterMask_ = 0x3
staticprivate

Definition at line 93 of file SiStripDetId.h.

Referenced by glued(), partnerDetId(), and stereo().

◆ sterStartBit_

const uint32_t SiStripDetId::sterStartBit_ = 0
staticprivate

Definition at line 87 of file SiStripDetId.h.

Referenced by glued(), partnerDetId(), and stereo().

◆ TEC

constexpr auto SiStripDetId::TEC = SiStripSubdetector::TEC
static

Definition at line 40 of file SiStripDetId.h.

Referenced by FWConvTrackHitsDetailView::addModules(), SiStripHitEffFromCalibTree::algoAnalyze(), SegmentTrackAnalyzer::analyze(), AlignmentStats::analyze(), CosmicRateAnalyzer::analyze(), TrackerSystematicMisalignments::applySystematicMisalignment(), TrackAssociatorByHitsImpl::associateSimToReco(), SiStripLorentzAngleCalibration::beginOfJob(), SiStripBackplaneCalibration::beginOfJob(), MillePedeAlignmentAlgorithm::callMille2D(), AlignableTrackerBuilder::convertGeomDetsToAlignables(), AlignmentTrackSelector::detailedHitsCheck(), AlignmentParameterSelector::detUnitDeselected(), AlignmentStats::endRun(), SiStripMonitorTrack::fillControlViewHistos(), SiStripQualityDQM::fillGrandSummaryMEs(), MillePedeMonitor::fillTrack(), SiStripFolderOrganizer::getFolderName(), SiStripFolderOrganizer::getLayerFolderName(), SiStripFolderOrganizer::getSubDetLayerFolderName(), TkDetMap::getSubDetLayerSide(), track_associator::hitsToClusterRefs(), MeasurementTrackerImpl::initializeStripStatus(), SeedFromConsecutiveHitsTripletOnlyCreator::initialKinematic(), TkLayerMap::layerSearch(), SiStripCondVisualizer::module_location_type(), moduleGeometry(), ShallowClustersProducer::moduleVars::moduleVars(), AlignmentParameterSelector::outsideDetIdRanges(), SiStripTrackerMapCreator::printBadModuleList(), SiStripTrackerMapCreator::printTopModules(), TkAlCaOverlapTagger::produce(), GsfTrackProducerBase::putInEvt(), SiStripBadModuleConfigurableFakeESSource::selectDetectors(), SiStripFolderOrganizer::setLayerFolder(), and StripCPEfromTrackAngle::StripCPEfromTrackAngle().

◆ TIB

constexpr auto SiStripDetId::TIB = SiStripSubdetector::TIB
static
Examples:
/tmp/cmsbuild/jenkins/workspace/cmssw-doxygen/cmsdoxy/TMP/CMSSW_14_0_9_patch1/src/CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleCalibrationHelpers.h.

Definition at line 37 of file SiStripDetId.h.

Referenced by FWConvTrackHitsDetailView::addModules(), SiStripHitEffFromCalibTree::algoAnalyze(), SegmentTrackAnalyzer::analyze(), AlignmentStats::analyze(), CosmicRateAnalyzer::analyze(), TrackerSystematicMisalignments::applySystematicMisalignment(), TrackAssociatorByHitsImpl::associateSimToReco(), SiStripLorentzAngleCalibration::beginOfJob(), SiStripBackplaneCalibration::beginOfJob(), sistrip::MeasureLA::calibration_key(), StripSubClusterShapeSeedFilter::compatible(), AlignableTrackerBuilder::convertGeomDetsToAlignables(), AlignmentTrackSelector::detailedHitsCheck(), AlignmentParameterSelector::detUnitDeselected(), AlignmentStats::endRun(), LA_Filler_Fitter::fill(), SiStripMonitorTrack::fillControlViewHistos(), SiStripQualityDQM::fillGrandSummaryMEs(), MillePedeMonitor::fillTrack(), SiStripFolderOrganizer::getFolderName(), SiStripFolderOrganizer::getLayerFolderName(), SiStripFolderOrganizer::getSubDetLayerFolderName(), TkDetMap::getSubDetLayerSide(), MultiHitGeneratorFromChi2::hitSets(), track_associator::hitsToClusterRefs(), MeasurementTrackerImpl::initializeStripStatus(), AlignmentParameterSelector::layerDeselected(), TkLayerMap::layerSearch(), MatchedHitRZCorrectionFromBending::MatchedHitRZCorrectionFromBending(), SiStripCondVisualizer::module_location_type(), moduleGeometry(), siStripLACalibration::moduleLocationType(), SiStripLorentzAnglePCLMonitor::moduleLocationType(), ShallowClustersProducer::moduleVars::moduleVars(), AlignmentParameterSelector::outsideDetIdRanges(), reco::DeDxHitInfo::pixelCluster(), SiStripTrackerMapCreator::printBadModuleList(), SiStripTrackerMapCreator::printTopModules(), TkAlCaOverlapTagger::produce(), GsfTrackProducerBase::putInEvt(), SiStripMonitorTrack::RecHitInfo(), SiStripBadModuleConfigurableFakeESSource::selectDetectors(), HITrackClusterRemover::sensorThickness(), siStripClusterTools::sensorThicknessInverse(), SiStripFolderOrganizer::setLayerFolder(), reco::DeDxHitInfo::stripCluster(), StripCPEfromTrackAngle::StripCPEfromTrackAngle(), StripSubClusterShapeTrajectoryFilter::testLastHit(), and APVGain::thickness().

◆ TID

constexpr auto SiStripDetId::TID = SiStripSubdetector::TID
static

Definition at line 38 of file SiStripDetId.h.

Referenced by FWConvTrackHitsDetailView::addModules(), SiStripHitEffFromCalibTree::algoAnalyze(), SegmentTrackAnalyzer::analyze(), AlignmentStats::analyze(), CosmicRateAnalyzer::analyze(), TrackerSystematicMisalignments::applySystematicMisalignment(), TrackAssociatorByHitsImpl::associateSimToReco(), SiStripLorentzAngleCalibration::beginOfJob(), SiStripBackplaneCalibration::beginOfJob(), MillePedeAlignmentAlgorithm::callMille2D(), AlignableTrackerBuilder::convertGeomDetsToAlignables(), AlignmentTrackSelector::detailedHitsCheck(), AlignmentParameterSelector::detUnitDeselected(), AlignmentStats::endRun(), SiStripMonitorTrack::fillControlViewHistos(), SiStripQualityDQM::fillGrandSummaryMEs(), MillePedeMonitor::fillTrack(), SiStripFolderOrganizer::getFolderName(), SiStripFolderOrganizer::getLayerFolderName(), SiStripFolderOrganizer::getSubDetLayerFolderName(), TkDetMap::getSubDetLayerSide(), MultiHitGeneratorFromChi2::hitSets(), track_associator::hitsToClusterRefs(), MeasurementTrackerImpl::initializeStripStatus(), SeedFromConsecutiveHitsTripletOnlyCreator::initialKinematic(), TkLayerMap::layerSearch(), SiStripCondVisualizer::module_location_type(), moduleGeometry(), ShallowClustersProducer::moduleVars::moduleVars(), AlignmentParameterSelector::outsideDetIdRanges(), SiStripTrackerMapCreator::printBadModuleList(), SiStripTrackerMapCreator::printTopModules(), TkAlCaOverlapTagger::produce(), GsfTrackProducerBase::putInEvt(), SiStripBadModuleConfigurableFakeESSource::selectDetectors(), SiStripFolderOrganizer::setLayerFolder(), and StripCPEfromTrackAngle::StripCPEfromTrackAngle().

◆ TOB

constexpr auto SiStripDetId::TOB = SiStripSubdetector::TOB
static
Examples:
/tmp/cmsbuild/jenkins/workspace/cmssw-doxygen/cmsdoxy/TMP/CMSSW_14_0_9_patch1/src/CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleCalibrationHelpers.h.

Definition at line 39 of file SiStripDetId.h.

Referenced by FWConvTrackHitsDetailView::addModules(), SiStripHitEffFromCalibTree::algoAnalyze(), SegmentTrackAnalyzer::analyze(), AlignmentStats::analyze(), CosmicRateAnalyzer::analyze(), TrackerSystematicMisalignments::applySystematicMisalignment(), TrackAssociatorByHitsImpl::associateSimToReco(), SiStripLorentzAngleCalibration::beginOfJob(), SiStripBackplaneCalibration::beginOfJob(), AlignableTrackerBuilder::convertGeomDetsToAlignables(), AlignmentTrackSelector::detailedHitsCheck(), AlignmentParameterSelector::detUnitDeselected(), AlignmentStats::endRun(), LA_Filler_Fitter::fill(), SiStripMonitorTrack::fillControlViewHistos(), SiStripQualityDQM::fillGrandSummaryMEs(), MillePedeMonitor::fillTrack(), SiStripFolderOrganizer::getFolderName(), SiStripFolderOrganizer::getLayerFolderName(), SiStripFolderOrganizer::getSubDetLayerFolderName(), TkDetMap::getSubDetLayerSide(), track_associator::hitsToClusterRefs(), MeasurementTrackerImpl::initializeStripStatus(), AlignmentParameterSelector::layerDeselected(), TkLayerMap::layerSearch(), SiStripCondVisualizer::module_location_type(), moduleGeometry(), siStripLACalibration::moduleLocationType(), SiStripLorentzAnglePCLMonitor::moduleLocationType(), ShallowClustersProducer::moduleVars::moduleVars(), AlignmentParameterSelector::outsideDetIdRanges(), SiStripTrackerMapCreator::printBadModuleList(), SiStripTrackerMapCreator::printTopModules(), TkAlCaOverlapTagger::produce(), GsfTrackProducerBase::putInEvt(), SiStripMonitorTrack::RecHitInfo(), SiStripBadModuleConfigurableFakeESSource::selectDetectors(), HITrackClusterRemover::sensorThickness(), siStripClusterTools::sensorThicknessInverse(), SiStripFolderOrganizer::setLayerFolder(), StripCPEfromTrackAngle::StripCPEfromTrackAngle(), LA_Filler_Fitter::subdetLabel(), and APVGain::thickness().

◆ UNKNOWN

constexpr auto SiStripDetId::UNKNOWN = SiStripSubdetector::UNKNOWN
static

Definition at line 36 of file SiStripDetId.h.

Referenced by moduleGeometry().