CMS 3D CMS Logo

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

List of all members.

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 Member Functions

virtual uint32_t glued () const
ModuleGeometry moduleGeometry () const
virtual uint32_t partnerDetId () const
uint16_t reserved () const
 SiStripDetId (const DetId &det_id, const uint16_t &reserved)
 SiStripDetId (const uint32_t &raw_id)
 SiStripDetId (Detector det, int subdet)
 SiStripDetId ()
 SiStripDetId (const uint32_t &raw_id, const uint16_t &reserved)
 SiStripDetId (const DetId &)
virtual uint32_t stereo () const
virtual double stripLength () const
SubDetector subDetector () const

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

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.

{ UNKNOWN=0, TIB=3, TID=4, TOB=5, TEC=6 };

Constructor & Destructor Documentation

SiStripDetId::SiStripDetId ( )

Construct a null id

Definition at line 6 of file SiStripDetId.cc.

: DetId() {;}
SiStripDetId::SiStripDetId ( const uint32_t &  raw_id)

Construct from a raw value

Definition at line 10 of file SiStripDetId.cc.

: DetId( raw_id ) {;}
SiStripDetId::SiStripDetId ( const DetId det_id)

Construct from generic DetId

Definition at line 14 of file SiStripDetId.cc.

: DetId( det_id.rawId() ) {;}
SiStripDetId::SiStripDetId ( Detector  det,
int  subdet 
)

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

Definition at line 18 of file SiStripDetId.cc.

: DetId( det, subdet ) {;}
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_.

  : DetId( raw_id ) 
{
  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
  id_ |= ( ( reserved & reservedMask_ ) << reservedStartBit_ );
}
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_.

  : DetId( det_id.rawId() ) 
{
  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
  id_ |= ( ( reserved & reservedMask_ ) << reservedStartBit_ );
}

Member Function Documentation

uint32_t SiStripDetId::glued ( ) const [inline, virtual]
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.

                                                              {
  switch(subDetector()) {
  case TIB: return int((id_>>layerStartBit_) & layerMask_)<3? IB1 : IB2;
  case TOB: return int((id_>>layerStartBit_) & layerMask_)<5? OB2 : OB1;
  case TID: switch ((id_>>ringStartBitTID_) & ringMaskTID_) {
    case 1: return W1A;
    case 2: return W2A;
    case 3: return W3A;
    }
  case TEC: switch ((id_>>ringStartBitTEC_) & ringMaskTEC_) {
    case 1: return W1B;
    case 2: return W2B;
    case 3: return W3B;
    case 4: return W4;
    case 5: return W5;
    case 6: return W6;
    case 7: return W7;
    }
  case UNKNOWN: default: return UNKNOWNGEOMETRY;
  }
}
uint32_t SiStripDetId::partnerDetId ( ) const [inline, virtual]

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(), RingMaker::dumpDetIds(), and TrackerValidationVariables::fillHitQuantities().

                                          {
  if ( ((id_>>sterStartBit_) & sterMask_ ) == 1 ) {
    return ( id_ + 1 );
  } else if ( ((id_>>sterStartBit_) & sterMask_ ) == 2 ) {
    return ( id_ - 1 );
  } else { return 0; }
}
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_.

                                      { 
  return static_cast<uint16_t>( (id_>>reservedStartBit_) & reservedMask_ );
}
uint32_t SiStripDetId::stereo ( ) const [inline, virtual]
double SiStripDetId::stripLength ( ) const [inline, virtual]

Returns strip length of strip tracker sensor, otherwise null.

Definition at line 164 of file SiStripDetId.h.

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

Member Data Documentation

const unsigned SiStripDetId::layerMask_ = 0x7 [static, private]

Reimplemented in TIBDetId, and TOBDetId.

Definition at line 92 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::layerStartBit_ = 14 [static, private]

Reimplemented in TIBDetId, and TOBDetId.

Definition at line 91 of file SiStripDetId.h.

Referenced by moduleGeometry().

const uint16_t SiStripDetId::reservedMask_ = 0x7 [static, private]

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 [static, private]

Position of "reserved" bit field.

Definition at line 80 of file SiStripDetId.h.

Referenced by reserved(), and SiStripDetId().

const unsigned SiStripDetId::ringMaskTEC_ = 0x7 [static, private]

Definition at line 96 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringMaskTID_ = 0x3 [static, private]

Definition at line 94 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTEC_ = 5 [static, private]

Definition at line 95 of file SiStripDetId.h.

Referenced by moduleGeometry().

const unsigned SiStripDetId::ringStartBitTID_ = 9 [static, private]

Definition at line 93 of file SiStripDetId.h.

Referenced by moduleGeometry().

const uint32_t SiStripDetId::sterMask_ = 0x3 [static, private]

Reimplemented in TECDetId, TIBDetId, TIDDetId, and TOBDetId.

Definition at line 89 of file SiStripDetId.h.

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

const uint32_t SiStripDetId::sterStartBit_ = 0 [static, private]

Reimplemented in TECDetId, TIBDetId, TIDDetId, and TOBDetId.

Definition at line 83 of file SiStripDetId.h.

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