CMS 3D CMS Logo

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

#include <TIDDetId.h>

Inheritance diagram for TIDDetId:
SiStripDetId DetId

Public Member Functions

unsigned int diskNumber () const
 
bool isBackRing () const
 
bool isDoubleSide () const
 
bool isFrontRing () const
 
bool isRPhi ()
 
bool isStereo ()
 
bool isZMinusSide () const
 
bool isZPlusSide () const
 
std::vector< unsigned int > module () const
 det id More...
 
unsigned int moduleNumber () const
 
unsigned int order () const
 
unsigned int ring () const
 ring id More...
 
unsigned int ringNumber () const
 
unsigned int side () const
 positive or negative id More...
 
 TIDDetId ()
 
 TIDDetId (uint32_t rawid)
 
 TIDDetId (const DetId &id)
 
 TIDDetId (uint32_t side, uint32_t wheel, uint32_t ring, uint32_t module_fw_bw, uint32_t module, uint32_t ster)
 
unsigned int wheel () const
 wheel id More...
 
- Public Member Functions inherited from SiStripDetId
uint32_t glued () const
 
ModuleGeometry moduleGeometry () const
 
uint32_t partnerDetId () const
 
uint16_t reserved () const
 
 SiStripDetId ()
 
 SiStripDetId (const uint32_t &raw_id)
 
 SiStripDetId (const DetId &det_id)
 
 SiStripDetId (Detector det, int subdet)
 
 SiStripDetId (const uint32_t &raw_id, const uint16_t &reserved)
 
 SiStripDetId (const DetId &det_id, const uint16_t &reserved)
 
uint32_t stereo () const
 
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 int module_fw_bwMask_ = 0x3
 
static const unsigned int module_fw_bwStartBit_ = 7
 
static const unsigned int moduleMask_ = 0x1F
 
static const unsigned int moduleStartBit_ = 2
 
static const unsigned int ringMask_ = 0x3
 
static const unsigned int ringStartBit_ = 9
 
static const unsigned int sideMask_ = 0x3
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const unsigned int sideStartBit_ = 13
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const unsigned int sterMask_ = 0x3
 
static const unsigned int sterStartBit_ = 0
 
static const unsigned int wheelMask_ = 0x3
 
static const unsigned int wheelStartBit_ = 11
 

Additional Inherited Members

- Public Types inherited from SiStripDetId
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, Forward =6, VeryForward =7
}
 
- 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

Definition at line 16 of file TIDDetId.h.

Constructor & Destructor Documentation

TIDDetId::TIDDetId ( )
inline

Constructor of a null id

Definition at line 131 of file TIDDetId.h.

131  : SiStripDetId() {
132 }
TIDDetId::TIDDetId ( uint32_t  rawid)
inline

Constructor from a raw value

Definition at line 134 of file TIDDetId.h.

134  : SiStripDetId(rawid) {
135 }
TIDDetId::TIDDetId ( const DetId id)
inline

Construct from generic DetId

Definition at line 137 of file TIDDetId.h.

137  : SiStripDetId(id.rawId()) {
138 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
TIDDetId::TIDDetId ( uint32_t  side,
uint32_t  wheel,
uint32_t  ring,
uint32_t  module_fw_bw,
uint32_t  module,
uint32_t  ster 
)
inline

Definition at line 25 of file TIDDetId.h.

References DetId::id_, module_fw_bwMask_, module_fw_bwStartBit_, moduleMask_, moduleStartBit_, ringMask_, ringStartBit_, sideMask_, sideStartBit_, sterMask_, sterStartBit_, wheelMask_, and wheelStartBit_.

31  id_ |= (side& sideMask_) << sideStartBit_ |
34  (module_fw_bw& module_fw_bwMask_) << module_fw_bwStartBit_ |
36  (ster& sterMask_) << sterStartBit_ ;
37  }
static const unsigned int moduleStartBit_
Definition: TIDDetId.h:118
static const unsigned int wheelMask_
Definition: TIDDetId.h:122
unsigned int ring() const
ring id
Definition: TIDDetId.h:55
static const unsigned int sideMask_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: TIDDetId.h:121
static const unsigned int module_fw_bwMask_
Definition: TIDDetId.h:124
static const unsigned int sterStartBit_
Definition: TIDDetId.h:119
static const unsigned int sideStartBit_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: TIDDetId.h:114
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
uint32_t id_
Definition: DetId.h:55
static const unsigned int module_fw_bwStartBit_
Definition: TIDDetId.h:117
static const unsigned int sterMask_
Definition: TIDDetId.h:126
static const unsigned int ringStartBit_
Definition: TIDDetId.h:116
static const unsigned int ringMask_
Definition: TIDDetId.h:123
static const unsigned int moduleMask_
Definition: TIDDetId.h:125
Definition: vlib.h:208
static const unsigned int wheelStartBit_
Definition: TIDDetId.h:115
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50

Member Function Documentation

unsigned int TIDDetId::diskNumber ( ) const
inline

Returns the disk number

Definition at line 93 of file TIDDetId.h.

References wheel().

94  { return wheel();}
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
bool TIDDetId::isBackRing ( ) const
inline

Returns true if the ring is mounted on the disk back (not facing impact point)

Definition at line 85 of file TIDDetId.h.

References order().

Referenced by TkLayerMap::getXY_TID(), and isFrontRing().

86  { return (order()==1);}
unsigned int order() const
Definition: TIDDetId.h:70
bool TIDDetId::isDoubleSide ( ) const
inline

Returns true if the module is a double side = rphi + stereo

Definition at line 140 of file TIDDetId.h.

References SiStripDetId::glued(), and ring().

Referenced by isRPhi(), isStereo(), and order().

140  {
141  // Double Side: only rings 1 and 2
142  return this->glued() == 0 && ( this->ring() == 1 || this->ring() == 2 );
143 }
unsigned int ring() const
ring id
Definition: TIDDetId.h:55
uint32_t glued() const
Definition: SiStripDetId.h:155
bool TIDDetId::isFrontRing ( ) const
inline

Returns true if the ring is mounted on the disk front (facing impact point)

Definition at line 89 of file TIDDetId.h.

References isBackRing().

90  { return (!isBackRing());}
bool isBackRing() const
Definition: TIDDetId.h:85
bool TIDDetId::isRPhi ( )
inline

Returns true if the module is rphi

Definition at line 105 of file TIDDetId.h.

References isDoubleSide(), and SiStripDetId::stereo().

106  { return (stereo() == 0 && !isDoubleSide());}
uint32_t stereo() const
Definition: SiStripDetId.h:160
bool isDoubleSide() const
Definition: TIDDetId.h:140
bool TIDDetId::isStereo ( )
inline

Returns true if the module is stereo

Definition at line 109 of file TIDDetId.h.

References isDoubleSide(), and SiStripDetId::stereo().

Referenced by SiStripFolderOrganizer::getFolderName(), and TkLayerMap::getXY_TID().

110  { return (stereo() != 0 && !isDoubleSide());}
uint32_t stereo() const
Definition: SiStripDetId.h:160
bool isDoubleSide() const
Definition: TIDDetId.h:140
bool TIDDetId::isZMinusSide ( ) const
inline

Returns true if the module is in TID- (z<0 side)

Definition at line 81 of file TIDDetId.h.

References side().

Referenced by CosmicRateAnalyzer::analyze(), TkLayerMap::getXY_TID(), and isZPlusSide().

82  { return (side()==1);}
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
bool TIDDetId::isZPlusSide ( ) const
inline

Returns true if the module is in TID+ (z>0 side)

Definition at line 77 of file TIDDetId.h.

References isZMinusSide().

78  { return (!isZMinusSide());}
bool isZMinusSide() const
Definition: TIDDetId.h:81
std::vector<unsigned int> TIDDetId::module ( ) const
inline

det id

vector[0] = 1 -> back ring vector[0] = 2 -> front ring vector[1] -> module

Definition at line 64 of file TIDDetId.h.

References moduleNumber(), pileupDistInMC::num, and order().

Referenced by trackerHierarchy().

65  { std::vector<unsigned int> num;
66  num.push_back( order() );
67  num.push_back( moduleNumber() );
68  return num ;}
unsigned int order() const
Definition: TIDDetId.h:70
unsigned int moduleNumber() const
Definition: TIDDetId.h:101
unsigned int TIDDetId::moduleNumber ( ) const
inline

Returns the module number

Definition at line 101 of file TIDDetId.h.

References DetId::id_, moduleMask_, and moduleStartBit_.

Referenced by TkLayerMap::getXY_TID(), and module().

102  { return ((id_>>moduleStartBit_) & moduleMask_);}
static const unsigned int moduleStartBit_
Definition: TIDDetId.h:118
uint32_t id_
Definition: DetId.h:55
static const unsigned int moduleMask_
Definition: TIDDetId.h:125
unsigned int TIDDetId::order ( ) const
inline

Definition at line 70 of file TIDDetId.h.

References DetId::id_, isDoubleSide(), module_fw_bwMask_, and module_fw_bwStartBit_.

Referenced by isBackRing(), and module().

static const unsigned int module_fw_bwMask_
Definition: TIDDetId.h:124
uint32_t id_
Definition: DetId.h:55
static const unsigned int module_fw_bwStartBit_
Definition: TIDDetId.h:117
unsigned int TIDDetId::ring ( ) const
inline

ring id

Definition at line 55 of file TIDDetId.h.

References DetId::id_, ringMask_, and ringStartBit_.

Referenced by SiStripFolderOrganizer::getFolderName(), SiStripSubStructure::getTIDDetectors(), TkLayerMap::getXY_TID(), geometryXMLparser.CSCAlignable::index(), isDoubleSide(), ringNumber(), and trackerHierarchy().

56  { return ((id_>>ringStartBit_) & ringMask_) ;}
uint32_t id_
Definition: DetId.h:55
static const unsigned int ringStartBit_
Definition: TIDDetId.h:116
static const unsigned int ringMask_
Definition: TIDDetId.h:123
unsigned int TIDDetId::ringNumber ( ) const
inline

Returns the ring number

Definition at line 97 of file TIDDetId.h.

References ring().

98  { return ring();}
unsigned int ring() const
ring id
Definition: TIDDetId.h:55
unsigned int TIDDetId::side ( ) const
inline

positive or negative id

side() = 1 The DetId identify a module in the negative part side() = 2 The DetId identify a module in the positive part

Definition at line 45 of file TIDDetId.h.

References DetId::id_, createfilelist::int, sideMask_, and sideStartBit_.

Referenced by SiStripFolderOrganizer::getFolderName(), SiStripSubStructure::getTIDDetectors(), isZMinusSide(), TkLayerMap::layerSearch(), trackerHierarchy(), and HDQMInspectorConfigSiStrip::translateDetId().

45  {
46  return int((id_>>sideStartBit_) & sideMask_);
47  }
static const unsigned int sideMask_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: TIDDetId.h:121
static const unsigned int sideStartBit_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: TIDDetId.h:114
uint32_t id_
Definition: DetId.h:55
unsigned int TIDDetId::wheel ( ) const
inline

Member Data Documentation

const unsigned int TIDDetId::module_fw_bwMask_ = 0x3
staticprivate

Definition at line 124 of file TIDDetId.h.

Referenced by order(), and TIDDetId().

const unsigned int TIDDetId::module_fw_bwStartBit_ = 7
staticprivate

Definition at line 117 of file TIDDetId.h.

Referenced by order(), and TIDDetId().

const unsigned int TIDDetId::moduleMask_ = 0x1F
staticprivate

Definition at line 125 of file TIDDetId.h.

Referenced by moduleNumber(), and TIDDetId().

const unsigned int TIDDetId::moduleStartBit_ = 2
staticprivate

Definition at line 118 of file TIDDetId.h.

Referenced by moduleNumber(), and TIDDetId().

const unsigned int TIDDetId::ringMask_ = 0x3
staticprivate

Definition at line 123 of file TIDDetId.h.

Referenced by ring(), and TIDDetId().

const unsigned int TIDDetId::ringStartBit_ = 9
staticprivate

Definition at line 116 of file TIDDetId.h.

Referenced by ring(), and TIDDetId().

const unsigned int TIDDetId::sideMask_ = 0x3
staticprivate

two bits would be enough, but we could use the number "0" as a wildcard

Definition at line 121 of file TIDDetId.h.

Referenced by side(), and TIDDetId().

const unsigned int TIDDetId::sideStartBit_ = 13
staticprivate

two bits would be enough, but we could use the number "0" as a wildcard

Definition at line 114 of file TIDDetId.h.

Referenced by side(), and TIDDetId().

const unsigned int TIDDetId::sterMask_ = 0x3
staticprivate

Definition at line 126 of file TIDDetId.h.

Referenced by TIDDetId().

const unsigned int TIDDetId::sterStartBit_ = 0
staticprivate

Definition at line 119 of file TIDDetId.h.

Referenced by TIDDetId().

const unsigned int TIDDetId::wheelMask_ = 0x3
staticprivate

Definition at line 122 of file TIDDetId.h.

Referenced by TIDDetId(), and wheel().

const unsigned int TIDDetId::wheelStartBit_ = 11
staticprivate

Definition at line 115 of file TIDDetId.h.

Referenced by TIDDetId(), and wheel().