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

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
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 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 kDetOffset = 28
 
static const int kSubdetOffset = 25
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Enumeration for Strip Tracker Subdetectors

Definition at line 12 of file StripSubdetector.h.

Member Enumeration Documentation

Enumerator
TIB 
TID 
TOB 
TEC 

Definition at line 14 of file StripSubdetector.h.

Constructor & Destructor Documentation

StripSubdetector::StripSubdetector ( uint32_t  rawid)
inline

Constructor from a raw value

Definition at line 17 of file StripSubdetector.h.

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

Construct from generic DetId

Definition at line 19 of file StripSubdetector.h.

19 : DetId(id) {}
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:28

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 27 of file StripSubdetector.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by CkfDebugger::analyseRecHitExistance(), TrackerGeomBuilderFromGeometricDet::buildGeomDet(), SiTrackerGaussianSmearingRecHitConverter::matchHits(), and SiTrackerGaussianSmearingRecHitConverter::smearHits().

28  {
29  if(((id_>>sterStartBit_)& sterMask_) == 1){
30  return (id_ -1);
31  }else if(((id_>>sterStartBit_)& sterMask_) == 2){
32  return (id_ -2);
33  }else{
34  return 0;
35  }
36  }
static const unsigned int sterStartBit_
static const unsigned int sterMask_
uint32_t id_
Definition: DetId.h:57
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 57 of file StripSubdetector.h.

References DetId::id_, sterMask_, and sterStartBit_.

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

58  {
59  if(((id_>>sterStartBit_)& sterMask_)==1){
60  return (id_ + 1);
61  }else if(((id_>>sterStartBit_)& sterMask_)==2){
62  return (id_ - 1);
63  }else{
64  return 0;
65  }
66  }
static const unsigned int sterStartBit_
static const unsigned int sterMask_
uint32_t id_
Definition: DetId.h:57
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 43 of file StripSubdetector.h.

References DetId::id_, sterMask_, and sterStartBit_.

Referenced by SiStripCalibLorentzAngle::algoBeginJob(), SiStripLAProfileBooker::analyze(), SiPixelErrorEstimation::analyze(), SiStripTrackingRecHitsValid::analyze(), TrackerGeomBuilderFromGeometricDet::buildGeomDet(), SiTrackerGaussianSmearingRecHitConverter::matchHits(), and SiStripRecHitConverterAlgorithm::run().

44  {
45  if(((id_>>sterStartBit_)& sterMask_)==1){
46  return ((id_>>sterStartBit_)& sterMask_);
47  }else{
48  return 0;
49  }
50  }
static const unsigned int sterStartBit_
static const unsigned int sterMask_
uint32_t id_
Definition: DetId.h:57

Member Data Documentation

const unsigned int StripSubdetector::detMask_ = 0x3
staticprivate

Definition at line 72 of file StripSubdetector.h.

const unsigned int StripSubdetector::detStartBit_ = 2
staticprivate

Definition at line 69 of file StripSubdetector.h.

const unsigned int StripSubdetector::sterMask_ = 0x3
staticprivate

Definition at line 73 of file StripSubdetector.h.

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

const unsigned int StripSubdetector::sterStartBit_ = 0
staticprivate

Definition at line 70 of file StripSubdetector.h.

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