CMS 3D CMS Logo

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

#include <StripSubdetector.h>

Inheritance diagram for StripSubdetector:
DetId

Public Types

enum  SubDetector { 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

unsigned int glued () const
 glued More...
 
unsigned int partnerDetId () const
 
unsigned int stereo () const
 stereo More...
 
 StripSubdetector (uint32_t rawid)
 
 StripSubdetector (const DetId &id)
 
- 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 int detMask_ = 0x3
 
static const unsigned int detStartBit_ = 2
 
static const unsigned int sterMask_ = 0x3
 
static const unsigned int 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

Enumeration for Strip Tracker Subdetectors

Definition at line 11 of file StripSubdetector.h.

Member Enumeration Documentation

Enumerator
TIB 
TID 
TOB 
TEC 

Definition at line 13 of file StripSubdetector.h.

Constructor & Destructor Documentation

StripSubdetector::StripSubdetector ( uint32_t  rawid)
inline

Constructor from a raw value

Definition at line 16 of file StripSubdetector.h.

16 : DetId(rawid) {}
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
StripSubdetector::StripSubdetector ( const DetId id)
inline

Construct from generic DetId

Definition at line 18 of file StripSubdetector.h.

18 : DetId(id) {}
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30

Member Function Documentation

unsigned int StripSubdetector::glued ( ) const
inline

glued

glued() = 0 it's not a glued module glued() != 0 it's a glued module

Definition at line 25 of file StripSubdetector.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by CkfDebugger::analyseRecHitExistance(), and FastTrackerRecHitMatcher::produce().

25  {
26  if (((id_ >> sterStartBit_) & sterMask_) == 1) {
27  return (id_ - 1);
28  } else if (((id_ >> sterStartBit_) & sterMask_) == 2) {
29  return (id_ - 2);
30  } else {
31  return 0;
32  }
33  }
static const unsigned int sterStartBit_
static const unsigned int sterMask_
uint32_t id_
Definition: DetId.h:62
unsigned int StripSubdetector::partnerDetId ( ) const
inline

If the DetId identify a glued module return the DetId of your partner otherwise return 0

Definition at line 53 of file StripSubdetector.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by CkfDebugger::analyseRecHitExistance(), and SiStripRecHitConverterAlgorithm::match().

53  {
54  if (((id_ >> sterStartBit_) & sterMask_) == 1) {
55  return (id_ + 1);
56  } else if (((id_ >> sterStartBit_) & sterMask_) == 2) {
57  return (id_ - 1);
58  } else {
59  return 0;
60  }
61  }
static const unsigned int sterStartBit_
static const unsigned int sterMask_
uint32_t id_
Definition: DetId.h:62
unsigned int StripSubdetector::stereo ( ) const
inline

stereo

stereo() = 0 it's not a stereo module stereo() = 1 it's a stereo module

Definition at line 40 of file StripSubdetector.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by SiStripCalibLorentzAngle::algoBeginJob(), SiStripLAProfileBooker::analyze(), SiPixelErrorEstimation::analyze(), SiStripTrackingRecHitsValid::analyze(), FastTrackerRecHitMatcher::produce(), and SiStripRecHitConverterAlgorithm::run().

40  {
41  if (((id_ >> sterStartBit_) & sterMask_) == 1) {
42  return ((id_ >> sterStartBit_) & sterMask_);
43  } else {
44  return 0;
45  }
46  }
static const unsigned int sterStartBit_
static const unsigned int sterMask_
uint32_t id_
Definition: DetId.h:62

Member Data Documentation

const unsigned int StripSubdetector::detMask_ = 0x3
staticprivate

Definition at line 67 of file StripSubdetector.h.

const unsigned int StripSubdetector::detStartBit_ = 2
staticprivate

Definition at line 64 of file StripSubdetector.h.

const unsigned int StripSubdetector::sterMask_ = 0x3
staticprivate

Definition at line 68 of file StripSubdetector.h.

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

const unsigned int StripSubdetector::sterStartBit_ = 0
staticprivate

Definition at line 65 of file StripSubdetector.h.

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