CMS 3D CMS Logo

SiStripDetId Class Reference

Author:
R.Bainbridge
More...

#include <DataFormats/SiStripDetId/interface/SiStripDetId.h>

Inheritance diagram for SiStripDetId:

DetId TECDetId TIBDetId TIDDetId TOBDetId

List of all members.

Public Types

enum  SubDetector {
  UNKNOWN = 0, TIB = 3, TID = 4, TOB = 5,
  TEC = 6
}
 Enumerated type for tracker sub-deteector systems. More...

Public Member Functions

virtual uint32_t glued () const
 A non-zero value means a glued module, null means not glued.
virtual uint32_t partnerDetId () const
 Returns DetId of the partner module if glued, otherwise null.
uint16_t reserved () const
 Returns value of "reserved" field.
 SiStripDetId (const DetId &det_id, const uint16_t &reserved)
 Construct from generic DetId and set "reserved" field.
 SiStripDetId (const uint32_t &raw_id, const uint16_t &reserved)
 Returns true if the module is a double side = rphi + stereo.
 SiStripDetId (Detector det, int subdet)
 Construct and fill only the det and sub-det fields.
 SiStripDetId (const DetId &)
 Construct from generic DetId.
 SiStripDetId (const uint32_t &raw_id)
 Construct from a raw value.
 SiStripDetId ()
 Construct a null id.
virtual uint32_t stereo () const
 A non-zero value means a stereo module, null means not stereo.
virtual double stripLength () const
 Returns strip length of strip tracker sensor, otherwise null.
SubDetector subDetector () const
 Returns enumerated type specifying sub-detector.

Static Private Attributes

static const uint16_t reservedMask_ = 0x7
 Mask for "reserved" bit field (3-bits wide).
static const uint16_t reservedStartBit_ = 20
 Position of "reserved" bit field.
static const uint32_t sterMask_ = 0x3
static const uint32_t sterStartBit_ = 0


Detailed Description

Author:
R.Bainbridge

Detector identifier class for the strip tracker.

Definition at line 17 of file SiStripDetId.h.


Member Enumeration Documentation

enum SiStripDetId::SubDetector

Enumerated type for tracker sub-deteector systems.

Enumerator:
UNKNOWN 
TIB 
TID 
TOB 
TEC 

Definition at line 36 of file SiStripDetId.h.

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

00006 : DetId() {;}

SiStripDetId::SiStripDetId ( const uint32_t &  raw_id  ) 

Construct from a raw value.

Definition at line 10 of file SiStripDetId.cc.

00010 : DetId( raw_id ) {;}

SiStripDetId::SiStripDetId ( const DetId det_id  ) 

Construct from generic DetId.

Definition at line 14 of file SiStripDetId.cc.

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

00018 : 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_.

00024   : DetId( raw_id ) 
00025 {
00026   id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
00027   id_ |= ( ( reserved & reservedMask_ ) << reservedStartBit_ );
00028 }

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

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


Member Function Documentation

uint32_t SiStripDetId::glued (  )  const [inline, virtual]

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

Definition at line 107 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by cms::ClusterAnalysis::book(), cms::ClusterAnalysis::clusterInfos(), RingMaker::determineExtensions(), AlignableTracker::detsToAlignables(), RingMaker::dumpDetIds(), cms::ClusterAnalysis::fillPedNoiseFromDB(), RingMaker::fillTECGeometryArray(), RingMaker::fillTIBGeometryArray(), RingMaker::fillTIDGeometryArray(), RingMaker::fillTOBGeometryArray(), cms::ClusterMTCCFilter::filter(), SiStripGainCosmicCalculator::getNewObject(), RoadSearchDetIdHelper::IsGluedRPhi(), RoadSearchDetIdHelper::IsMatched(), RoadSearchCloudMakerAlgorithm::isSingleLayer(), RoadSearchDetIdHelper::IsSingleRPhi(), RoadSearchDetIdHelper::IsStereo(), and trackerHierarchy().

00107                                    {
00108   if ( ((id_>>sterStartBit_) & sterMask_ ) == 1 ) {
00109     return ( id_ - 1 );
00110   } else if ( ((id_>>sterStartBit_) & sterMask_ ) == 2 ) {
00111     return ( id_ - 2 );
00112   } else { return 0; }
00113 }

uint32_t SiStripDetId::partnerDetId (  )  const [inline, virtual]

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

Definition at line 121 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

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

00121                                           {
00122   if ( ((id_>>sterStartBit_) & sterMask_ ) == 1 ) {
00123     return ( id_ + 1 );
00124   } else if ( ((id_>>sterStartBit_) & sterMask_ ) == 2 ) {
00125     return ( id_ - 1 );
00126   } else { return 0; }
00127 }

uint16_t SiStripDetId::reserved (  )  const [inline]

Returns value of "reserved" field.

Definition at line 137 of file SiStripDetId.h.

References DetId::id_, reservedMask_, and reservedStartBit_.

00137                                       { 
00138   return static_cast<uint16_t>( (id_>>reservedStartBit_) & reservedMask_ );
00139 }

uint32_t SiStripDetId::stereo (  )  const [inline, virtual]

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

Definition at line 115 of file SiStripDetId.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by SiStripRecHitsValid::analyze(), cms::ClusterAnalysis::book(), cms::ClusterAnalysis::clusterInfos(), RingMaker::determineExtensions(), RingMaker::dumpDetIds(), cms::ClusterAnalysis::fillPedNoiseFromDB(), cms::ClusterMTCCFilter::filter(), SiStripGainCosmicCalculator::getNewObject(), SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIDDetectors(), AlignmentTrackSelector::isHit2D(), TECDetId::isRPhi(), TOBDetId::isRPhi(), TIBDetId::isRPhi(), TIDDetId::isRPhi(), TIDDetId::isStereo(), TIBDetId::isStereo(), TOBDetId::isStereo(), TECDetId::isStereo(), TrajectoryManager::makeSinglePSimHit(), and trackerHierarchy().

00115                                     {
00116   if ( ((id_>>sterStartBit_ ) & sterMask_ ) == 1 ) {
00117     return ( (id_>>sterStartBit_) & sterMask_ );
00118   } else { return 0; }
00119 }

double SiStripDetId::stripLength (  )  const [inline, virtual]

Returns strip length of strip tracker sensor, otherwise null.

Definition at line 129 of file SiStripDetId.h.

00129                                        {
00130   return 0.;
00131 }

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

Returns enumerated type specifying sub-detector.

Definition at line 89 of file SiStripDetId.h.

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

Referenced by SiStripHashedDetId::init(), SiStripQualityConfigurableFakeESSource::isTECDetector(), SiStripQualityConfigurableFakeESSource::isTIBDetector(), SiStripQualityConfigurableFakeESSource::isTIDDetector(), SiStripQualityConfigurableFakeESSource::isTOBDetector(), and SiStripFolderOrganizer::setLayerFolder().

00089                                                         {
00090   if( det() == DetId::Tracker &&
00091       subdetId() == static_cast<int>(SiStripDetId::TIB) ) {
00092     return SiStripDetId::TIB;
00093   } else if ( det() == DetId::Tracker &&
00094               subdetId() == static_cast<int>(SiStripDetId::TID) ) {
00095     return SiStripDetId::TID;
00096   } else if ( det() == DetId::Tracker &&
00097               subdetId() == static_cast<int>(SiStripDetId::TOB) ) {
00098     return SiStripDetId::TOB;
00099   } else if ( det() == DetId::Tracker &&
00100               subdetId() == static_cast<int>(SiStripDetId::TEC) ) {
00101     return SiStripDetId::TEC;
00102   } else {
00103     return SiStripDetId::UNKNOWN;
00104   }
00105 }


Member Data Documentation

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

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

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

Referenced by reserved(), and SiStripDetId().

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

Reimplemented in TECDetId, TIBDetId, TIDDetId, and TOBDetId.

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

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:16 2009 for CMSSW by  doxygen 1.5.4