CMS 3D CMS Logo

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

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

#include <SiStripDetId.h>

Inheritance diagram for SiStripDetId:
DetId

Public Types

enum  ModuleGeometry {
  UNKNOWNGEOMETRY, IB1, IB2, OB1,
  OB2, W1A, W2A, W3A,
  W1B, W2B, W3B, W4,
  W5, W6, W7
}
 
enum  SubDetector {
  UNKNOWN = 0, TIB = 3, TID = 4, TOB = 5,
  TEC = 6
}
 
- 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
 
ModuleGeometry 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 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

- 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 Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Detector identifier class for the strip tracker.

Author
R.Bainbridge

Definition at line 17 of file SiStripDetId.h.

Member Enumeration Documentation

Enumerated type for tracker module geometries.

Enumerator
UNKNOWNGEOMETRY 
IB1 
IB2 
OB1 
OB2 
W1A 
W2A 
W3A 
W1B 
W2B 
W3B 
W4 
W5 
W6 
W7 

Definition at line 37 of file SiStripDetId.h.

Enumerated type for tracker sub-deteector systems.

Enumerator
UNKNOWN 
TIB 
TID 
TOB 
TEC 

Definition at line 34 of file SiStripDetId.h.

Constructor & Destructor Documentation

SiStripDetId::SiStripDetId ( )
inline

Construct a null id

Definition at line 22 of file SiStripDetId.h.

22 : DetId() { ; }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
SiStripDetId::SiStripDetId ( const uint32_t &  raw_id)
inline

Construct from a raw value

Definition at line 25 of file SiStripDetId.h.

25 : DetId(raw_id) { ; }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
SiStripDetId::SiStripDetId ( const DetId det_id)
inline

Construct from generic DetId

Definition at line 28 of file SiStripDetId.h.

28 : DetId(det_id.rawId()) { ; }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
SiStripDetId::SiStripDetId ( Detector  det,
int  subdet 
)
inline

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

Definition at line 31 of file SiStripDetId.h.

31 : DetId(det, subdet) { ; }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
SiStripDetId::SiStripDetId ( const uint32_t &  raw_id,
const uint16_t &  reserved 
)
inline

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

Definition at line 62 of file SiStripDetId.h.

References DetId::id_, reservedMask_, and reservedStartBit_.

62  : DetId(raw_id) {
63  id_ &= (~static_cast<uint32_t>(reservedMask_ << reservedStartBit_));
65  }
static const uint16_t reservedMask_
Definition: SiStripDetId.h:87
uint16_t reserved() const
Definition: SiStripDetId.h:179
uint32_t id_
Definition: DetId.h:62
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:81
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
SiStripDetId::SiStripDetId ( const DetId det_id,
const uint16_t &  reserved 
)
inline

Construct from generic DetId and set "reserved" field.

Definition at line 71 of file SiStripDetId.h.

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

71  : DetId(det_id.rawId()) {
72  id_ &= (~static_cast<uint32_t>(reservedMask_ << reservedStartBit_));
74  }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
static const uint16_t reservedMask_
Definition: SiStripDetId.h:87
uint16_t reserved() const
Definition: SiStripDetId.h:179
uint32_t id_
Definition: DetId.h:62
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:81
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30

Member Function Documentation

uint32_t SiStripDetId::glued ( ) const
inline

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

Definition at line 158 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by OverlapValidation::analyze(), and TrackingRecoMaterialAnalyser::isDoubleSided().

158  {
159  uint32_t testId = (id_ >> sterStartBit_) & sterMask_;
160  return (testId == 0) ? 0 : (id_ - testId);
161 }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:84
static const uint32_t sterMask_
Definition: SiStripDetId.h:90
uint32_t id_
Definition: DetId.h:62
SiStripDetId::ModuleGeometry SiStripDetId::moduleGeometry ( ) const
inline

Returns enumerated type specifying sub-detector.

Definition at line 106 of file SiStripDetId.h.

References 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(), HITrackClusterRemover::sensorThickness(), and siStripClusterTools::sensorThicknessInverse().

106  {
108  switch (subDetector()) {
109  case TIB:
110  geometry = int((id_ >> layerStartBit_) & layerMask_) < 3 ? IB1 : IB2;
111  break;
112  case TOB:
113  geometry = int((id_ >> layerStartBit_) & layerMask_) < 5 ? OB2 : OB1;
114  break;
115  case TID:
116  switch ((id_ >> ringStartBitTID_) & ringMaskTID_) {
117  case 1:
118  geometry = W1A;
119  break;
120  case 2:
121  geometry = W2A;
122  break;
123  case 3:
124  geometry = W3A;
125  break;
126  }
127  break;
128  case TEC:
129  switch ((id_ >> ringStartBitTEC_) & ringMaskTEC_) {
130  case 1:
131  geometry = W1B;
132  break;
133  case 2:
134  geometry = W2B;
135  break;
136  case 3:
137  geometry = W3B;
138  break;
139  case 4:
140  geometry = W4;
141  break;
142  case 5:
143  geometry = W5;
144  break;
145  case 6:
146  geometry = W6;
147  break;
148  case 7:
149  geometry = W7;
150  break;
151  }
152  case UNKNOWN:
153  default:;
154  }
155  return geometry;
156 }
static const unsigned ringStartBitTID_
Definition: SiStripDetId.h:94
static const unsigned layerStartBit_
Definition: SiStripDetId.h:92
static const unsigned layerMask_
Definition: SiStripDetId.h:93
SubDetector subDetector() const
Definition: SiStripDetId.h:102
uint32_t id_
Definition: DetId.h:62
static const unsigned ringMaskTEC_
Definition: SiStripDetId.h:97
ESHandle< TrackerGeometry > geometry
static const unsigned ringStartBitTEC_
Definition: SiStripDetId.h:96
static const unsigned ringMaskTID_
Definition: SiStripDetId.h:95
uint32_t SiStripDetId::partnerDetId ( ) const
inline

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

Definition at line 165 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by TrackAssociatorByHitsImpl::associateSimToReco().

165  {
166  uint32_t testId = (id_ >> sterStartBit_) & sterMask_;
167  if (testId == 1) {
168  testId = id_ + 1;
169  } else if (testId == 2) {
170  testId = id_ - 1;
171  } else {
172  testId = 0;
173  }
174  return testId;
175 }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:84
static const uint32_t sterMask_
Definition: SiStripDetId.h:90
uint32_t id_
Definition: DetId.h:62
uint16_t SiStripDetId::reserved ( ) const
inline

Returns value of "reserved" field.

Definition at line 179 of file SiStripDetId.h.

References DetId::id_, reservedMask_, and reservedStartBit_.

Referenced by SiStripDetId().

179 { return static_cast<uint16_t>((id_ >> reservedStartBit_) & reservedMask_); }
static const uint16_t reservedMask_
Definition: SiStripDetId.h:87
uint32_t id_
Definition: DetId.h:62
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:81
uint32_t SiStripDetId::stereo ( ) const
inline

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

Definition at line 163 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by OverlapValidation::analyze(), helper::ClusterStorer::ClusterHitRecord< SiStripRecHit2D::ClusterRef >rekey(), AlignmentTrackSelector::isHit2D(), ApeEstimator::isHit2D(), TkAlCaOverlapTagger::produce(), and reco::modules::TrackerTrackHitFilter::produceFromTrajectory().

163 { return (((id_ >> sterStartBit_) & sterMask_) == 1) ? 1 : 0; }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:84
static const uint32_t sterMask_
Definition: SiStripDetId.h:90
uint32_t id_
Definition: DetId.h:62
double SiStripDetId::stripLength ( ) const
inline

Returns strip length of strip tracker sensor, otherwise null.

Definition at line 177 of file SiStripDetId.h.

177 { return 0.; }
SiStripDetId::SubDetector SiStripDetId::subDetector ( ) const
inline

Member Data Documentation

const unsigned SiStripDetId::layerMask_ = 0x7
staticprivate

Definition at line 93 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::layerStartBit_ = 14
staticprivate

Definition at line 92 of file SiStripDetId.h.

Referenced by moduleGeometry().

const uint16_t SiStripDetId::reservedMask_ = 0x7
staticprivate

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

Definition at line 87 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

const uint16_t SiStripDetId::reservedStartBit_ = 20
staticprivate

Position of "reserved" bit field.

Definition at line 81 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

const unsigned SiStripDetId::ringMaskTEC_ = 0x7
staticprivate

Definition at line 97 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringMaskTID_ = 0x3
staticprivate

Definition at line 95 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTEC_ = 5
staticprivate

Definition at line 96 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTID_ = 9
staticprivate

Definition at line 94 of file SiStripDetId.h.

Referenced by moduleGeometry().

const uint32_t SiStripDetId::sterMask_ = 0x3
staticprivate

Definition at line 90 of file SiStripDetId.h.

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

const uint32_t SiStripDetId::sterStartBit_ = 0
staticprivate

Definition at line 84 of file SiStripDetId.h.

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