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

virtual uint32_t glued () const
 
ModuleGeometry moduleGeometry () const
 
virtual uint32_t partnerDetId () const
 
uint16_t reserved () const
 
 SiStripDetId ()
 
 SiStripDetId (const uint32_t &raw_id)
 
 SiStripDetId (const DetId &)
 
 SiStripDetId (Detector det, int subdet)
 
 SiStripDetId (const uint32_t &raw_id, const uint16_t &reserved)
 
 SiStripDetId (const DetId &det_id, const uint16_t &reserved)
 
virtual uint32_t stereo () const
 
virtual 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 ( )

Construct a null id

Definition at line 6 of file SiStripDetId.cc.

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

Construct from a raw value

Definition at line 10 of file SiStripDetId.cc.

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

Construct from generic DetId

Definition at line 14 of file SiStripDetId.cc.

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

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

Definition at line 18 of file SiStripDetId.cc.

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

Returns true if the module is a double side = rphi + stereo Construct from a raw value and set "reserved" field.

Definition at line 22 of file SiStripDetId.cc.

References DetId::id_, reservedMask_, and reservedStartBit_.

24  : DetId( raw_id )
25 {
26  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
28 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
static const uint16_t reservedMask_
Definition: SiStripDetId.h:86
uint16_t reserved() const
Definition: SiStripDetId.h:172
uint32_t id_
Definition: DetId.h:57
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:80
SiStripDetId::SiStripDetId ( const DetId det_id,
const uint16_t &  reserved 
)

Construct from generic DetId and set "reserved" field.

Definition at line 32 of file SiStripDetId.cc.

References DetId::id_, reservedMask_, and reservedStartBit_.

34  : DetId( det_id.rawId() )
35 {
36  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
38 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
static const uint16_t reservedMask_
Definition: SiStripDetId.h:86
uint16_t reserved() const
Definition: SiStripDetId.h:172
uint32_t id_
Definition: DetId.h:57
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:80

Member Function Documentation

uint32_t SiStripDetId::glued ( ) const
inlinevirtual
SiStripDetId::ModuleGeometry SiStripDetId::moduleGeometry ( ) const
inline

Returns enumerated type specifying sub-detector.

Definition at line 120 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.

120  {
121  switch(subDetector()) {
122  case TIB: return int((id_>>layerStartBit_) & layerMask_)<3? IB1 : IB2;
123  case TOB: return int((id_>>layerStartBit_) & layerMask_)<5? OB2 : OB1;
124  case TID: switch ((id_>>ringStartBitTID_) & ringMaskTID_) {
125  case 1: return W1A;
126  case 2: return W2A;
127  case 3: return W3A;
128  }
129  case TEC: switch ((id_>>ringStartBitTEC_) & ringMaskTEC_) {
130  case 1: return W1B;
131  case 2: return W2B;
132  case 3: return W3B;
133  case 4: return W4;
134  case 5: return W5;
135  case 6: return W6;
136  case 7: return W7;
137  }
138  case UNKNOWN: default: return UNKNOWNGEOMETRY;
139  }
140 }
static const unsigned ringStartBitTID_
Definition: SiStripDetId.h:93
static const unsigned layerStartBit_
Definition: SiStripDetId.h:91
static const unsigned layerMask_
Definition: SiStripDetId.h:92
SubDetector subDetector() const
Definition: SiStripDetId.h:102
uint32_t id_
Definition: DetId.h:57
static const unsigned ringMaskTEC_
Definition: SiStripDetId.h:96
static const unsigned ringStartBitTEC_
Definition: SiStripDetId.h:95
static const unsigned ringMaskTID_
Definition: SiStripDetId.h:94
uint32_t SiStripDetId::partnerDetId ( ) const
inlinevirtual

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

Definition at line 156 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by TrackAssociatorByHits::associateSimToReco(), MuonAssociatorByHits::associateSimToRecoIndices(), RingMaker::determineExtensions(), and RingMaker::dumpDetIds().

156  {
157  if ( ((id_>>sterStartBit_) & sterMask_ ) == 1 ) {
158  return ( id_ + 1 );
159  } else if ( ((id_>>sterStartBit_) & sterMask_ ) == 2 ) {
160  return ( id_ - 1 );
161  } else { return 0; }
162 }
static const uint32_t sterStartBit_
Definition: SiStripDetId.h:83
static const uint32_t sterMask_
Definition: SiStripDetId.h:89
uint32_t id_
Definition: DetId.h:57
uint16_t SiStripDetId::reserved ( ) const
inline

Returns value of "reserved" field.

Definition at line 172 of file SiStripDetId.h.

References DetId::id_, reservedMask_, and reservedStartBit_.

172  {
173  return static_cast<uint16_t>( (id_>>reservedStartBit_) & reservedMask_ );
174 }
static const uint16_t reservedMask_
Definition: SiStripDetId.h:86
uint32_t id_
Definition: DetId.h:57
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:80
uint32_t SiStripDetId::stereo ( ) const
inlinevirtual
double SiStripDetId::stripLength ( ) const
inlinevirtual

Returns strip length of strip tracker sensor, otherwise null.

Definition at line 164 of file SiStripDetId.h.

164  {
165  return 0.;
166 }
SiStripDetId::SubDetector SiStripDetId::subDetector ( ) const
inline

Returns enumerated type specifying sub-detector.

Definition at line 102 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(), SiStripBadModuleGenerator::isTECDetector(), SiStripBadModuleGenerator::isTIBDetector(), SiStripBadModuleGenerator::isTIDDetector(), SiStripBadModuleGenerator::isTOBDetector(), LA_Filler_Fitter::layerLabel(), moduleGeometry(), ShallowClustersProducer::moduleVars::moduleVars(), SiStripFolderOrganizer::setLayerFolder(), SiStripRegionCabling::subdetFromDetId(), LA_Filler_Fitter::subdetLabel(), TrackerDpgAnalysis::toStringName(), and HDQMInspectorConfigSiStrip::translateDetId().

102  {
103  if( det() == DetId::Tracker &&
104  subdetId() == static_cast<int>(SiStripDetId::TIB) ) {
105  return SiStripDetId::TIB;
106  } else if ( det() == DetId::Tracker &&
107  subdetId() == static_cast<int>(SiStripDetId::TID) ) {
108  return SiStripDetId::TID;
109  } else if ( det() == DetId::Tracker &&
110  subdetId() == static_cast<int>(SiStripDetId::TOB) ) {
111  return SiStripDetId::TOB;
112  } else if ( det() == DetId::Tracker &&
113  subdetId() == static_cast<int>(SiStripDetId::TEC) ) {
114  return SiStripDetId::TEC;
115  } else {
116  return SiStripDetId::UNKNOWN;
117  }
118 }
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Detector det() const
get the detector field from this detid
Definition: DetId.h:37

Member Data Documentation

const unsigned SiStripDetId::layerMask_ = 0x7
staticprivate

Definition at line 92 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::layerStartBit_ = 14
staticprivate

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

Referenced by reserved(), and SiStripDetId().

const uint16_t SiStripDetId::reservedStartBit_ = 20
staticprivate

Position of "reserved" bit field.

Definition at line 80 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

const unsigned SiStripDetId::ringMaskTEC_ = 0x7
staticprivate

Definition at line 96 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringMaskTID_ = 0x3
staticprivate

Definition at line 94 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTEC_ = 5
staticprivate

Definition at line 95 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTID_ = 9
staticprivate

Definition at line 93 of file SiStripDetId.h.

Referenced by moduleGeometry().

const uint32_t SiStripDetId::sterMask_ = 0x3
staticprivate

Definition at line 89 of file SiStripDetId.h.

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

const uint32_t SiStripDetId::sterStartBit_ = 0
staticprivate

Definition at line 83 of file SiStripDetId.h.

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