CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 TECDetId TIBDetId TIDDetId TOBDetId

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
}
 

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
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...
 

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 kDetOffset = 28
 
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 39 of file SiStripDetId.h.

Enumerated type for tracker sub-deteector systems.

Enumerator
UNKNOWN 
TIB 
TID 
TOB 
TEC 

Definition at line 36 of file SiStripDetId.h.

Constructor & Destructor Documentation

SiStripDetId::SiStripDetId ( )
inline

Construct a null id

Definition at line 24 of file SiStripDetId.h.

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

Construct from a raw value

Definition at line 27 of file SiStripDetId.h.

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

Construct from generic DetId

Definition at line 30 of file SiStripDetId.h.

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

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

Definition at line 33 of file SiStripDetId.h.

33 : DetId( det, subdet ) {;}
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
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_, reservedMask_, and reservedStartBit_.

67  : DetId( raw_id )
68  {
69  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
71  }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
static const uint16_t reservedMask_
Definition: SiStripDetId.h:98
uint16_t reserved() const
Definition: SiStripDetId.h:181
uint32_t id_
Definition: DetId.h:55
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:92
SiStripDetId::SiStripDetId ( const DetId det_id,
const uint16_t &  reserved 
)
inline

Construct from generic DetId and set "reserved" field.

Definition at line 77 of file SiStripDetId.h.

References DetId::id_, reservedMask_, and reservedStartBit_.

79  : DetId( det_id.rawId() )
80  {
81  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
83  }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static const uint16_t reservedMask_
Definition: SiStripDetId.h:98
uint16_t reserved() const
Definition: SiStripDetId.h:181
uint32_t id_
Definition: DetId.h:55
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:92

Member Function Documentation

uint32_t SiStripDetId::glued ( ) const
inline

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

Definition at line 154 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by AlignableTracker::detsToAlignables(), TOBDetId::isDoubleSide(), TIBDetId::isDoubleSide(), TIDDetId::isDoubleSide(), TECDetId::isDoubleSide(), TrackerTopology::tecIsDoubleSide(), TrackerTopology::tibIsDoubleSide(), TrackerTopology::tidIsDoubleSide(), TrackerTopology::tobIsDoubleSide(), and trackerHierarchy().

154  {
155  if ( ((id_>>sterStartBit_) & sterMask_ ) == 1 ) {
156  return ( id_ - 1 );
157  } else if ( ((id_>>sterStartBit_) & sterMask_ ) == 2 ) {
158  return ( id_ - 2 );
159  } else { return 0; }
160 }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:95
static const uint32_t sterMask_
Definition: SiStripDetId.h:101
uint32_t id_
Definition: DetId.h:55
SiStripDetId::ModuleGeometry SiStripDetId::moduleGeometry ( ) const
inline

Returns enumerated type specifying sub-detector.

Definition at line 132 of file SiStripDetId.h.

References IB1, IB2, DetId::id_, 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(), SiStripBackPlaneCorrectionGenerator::createObject(), SiStripBackPlaneCorrection::printDebug(), TrackClusterRemover::sensorThickness(), and TrackClusterSplitter::splitCluster().

132  {
133  switch(subDetector()) {
134  case TIB: return int((id_>>layerStartBit_) & layerMask_)<3? IB1 : IB2;
135  case TOB: return int((id_>>layerStartBit_) & layerMask_)<5? OB2 : OB1;
136  case TID: switch ((id_>>ringStartBitTID_) & ringMaskTID_) {
137  case 1: return W1A;
138  case 2: return W2A;
139  case 3: return W3A;
140  }
141  case TEC: switch ((id_>>ringStartBitTEC_) & ringMaskTEC_) {
142  case 1: return W1B;
143  case 2: return W2B;
144  case 3: return W3B;
145  case 4: return W4;
146  case 5: return W5;
147  case 6: return W6;
148  case 7: return W7;
149  }
150  case UNKNOWN: default: return UNKNOWNGEOMETRY;
151  }
152 }
static const unsigned ringStartBitTID_
Definition: SiStripDetId.h:105
static const unsigned layerStartBit_
Definition: SiStripDetId.h:103
static const unsigned layerMask_
Definition: SiStripDetId.h:104
SubDetector subDetector() const
Definition: SiStripDetId.h:114
uint32_t id_
Definition: DetId.h:55
static const unsigned ringMaskTEC_
Definition: SiStripDetId.h:108
static const unsigned ringStartBitTEC_
Definition: SiStripDetId.h:107
static const unsigned ringMaskTID_
Definition: SiStripDetId.h:106
uint32_t SiStripDetId::partnerDetId ( ) const
inline

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

Definition at line 168 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

168  {
169  if ( ((id_>>sterStartBit_) & sterMask_ ) == 1 ) {
170  return ( id_ + 1 );
171  } else if ( ((id_>>sterStartBit_) & sterMask_ ) == 2 ) {
172  return ( id_ - 1 );
173  } else { return 0; }
174 }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:95
static const uint32_t sterMask_
Definition: SiStripDetId.h:101
uint32_t id_
Definition: DetId.h:55
uint16_t SiStripDetId::reserved ( ) const
inline

Returns value of "reserved" field.

Definition at line 181 of file SiStripDetId.h.

References DetId::id_, reservedMask_, and reservedStartBit_.

181  {
182  return static_cast<uint16_t>( (id_>>reservedStartBit_) & reservedMask_ );
183 }
static const uint16_t reservedMask_
Definition: SiStripDetId.h:98
uint32_t id_
Definition: DetId.h:55
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:92
uint32_t SiStripDetId::stereo ( ) const
inline
double SiStripDetId::stripLength ( ) const
inline

Returns strip length of strip tracker sensor, otherwise null.

Definition at line 176 of file SiStripDetId.h.

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

Returns enumerated type specifying sub-detector.

Definition at line 114 of file SiStripDetId.h.

References DetId::det(), DetId::subdetId(), TEC, TIB, TID, TOB, DetId::Tracker, and UNKNOWN.

Referenced by MonitorTrackResiduals::analyze(), sistrip::MeasureLA::calibration_key(), MonitorTrackResiduals::createMEs(), LA_Filler_Fitter::fill(), SiStripFolderOrganizer::getFolderName(), SiStripFolderOrganizer::getLayerFolderName(), SiStripHashedDetId::init(), ClusterSummary::ModuleSelection::IsStripSelected(), SiStripBadModuleGenerator::isTECDetector(), SiStripBadModuleGenerator::isTIBDetector(), SiStripBadModuleGenerator::isTIDDetector(), SiStripBadModuleGenerator::isTOBDetector(), LA_Filler_Fitter::layerLabel(), moduleGeometry(), ShallowClustersProducer::moduleVars::moduleVars(), SiStripTrackerMapCreator::printBadModuleList(), SiStripFolderOrganizer::setLayerFolder(), SiStripRegionCabling::subdetFromDetId(), LA_Filler_Fitter::subdetLabel(), TrackerDpgAnalysis::toStringName(), and HDQMInspectorConfigSiStrip::translateDetId().

114  {
115  if( det() == DetId::Tracker &&
116  subdetId() == static_cast<int>(SiStripDetId::TIB) ) {
117  return SiStripDetId::TIB;
118  } else if ( det() == DetId::Tracker &&
119  subdetId() == static_cast<int>(SiStripDetId::TID) ) {
120  return SiStripDetId::TID;
121  } else if ( det() == DetId::Tracker &&
122  subdetId() == static_cast<int>(SiStripDetId::TOB) ) {
123  return SiStripDetId::TOB;
124  } else if ( det() == DetId::Tracker &&
125  subdetId() == static_cast<int>(SiStripDetId::TEC) ) {
126  return SiStripDetId::TEC;
127  } else {
128  return SiStripDetId::UNKNOWN;
129  }
130 }
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Detector det() const
get the detector field from this detid
Definition: DetId.h:35

Member Data Documentation

const unsigned SiStripDetId::layerMask_ = 0x7
staticprivate

Definition at line 104 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::layerStartBit_ = 14
staticprivate

Definition at line 103 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 98 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

const uint16_t SiStripDetId::reservedStartBit_ = 20
staticprivate

Position of "reserved" bit field.

Definition at line 92 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

const unsigned SiStripDetId::ringMaskTEC_ = 0x7
staticprivate

Definition at line 108 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringMaskTID_ = 0x3
staticprivate

Definition at line 106 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTEC_ = 5
staticprivate

Definition at line 107 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTID_ = 9
staticprivate

Definition at line 105 of file SiStripDetId.h.

Referenced by moduleGeometry().

const uint32_t SiStripDetId::sterMask_ = 0x3
staticprivate

Definition at line 101 of file SiStripDetId.h.

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

const uint32_t SiStripDetId::sterStartBit_ = 0
staticprivate

Definition at line 95 of file SiStripDetId.h.

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