CMS 3D CMS Logo

Public Member Functions | Static Private Attributes

TOBDetId Class Reference

#include <TOBDetId.h>

Inheritance diagram for TOBDetId:
SiStripDetId DetId

List of all members.

Public Member Functions

bool isDoubleSide () const
bool isRPhi ()
bool isStereo ()
bool isZMinusSide () const
bool isZPlusSide () const
unsigned int layer () const
 layer id
unsigned int layerNumber () const
unsigned int module () const
 detector id
unsigned int moduleNumber () const
std::vector< unsigned int > rod () const
 rod id
unsigned int rodNumber () const
unsigned int side () const
 TOBDetId (uint32_t rawid)
 TOBDetId (const DetId &id)
 TOBDetId ()
 TOBDetId (uint32_t layer, uint32_t rod_fw_bw, uint32_t rod, uint32_t module, uint32_t ster)

Static Private Attributes

static const unsigned int layerMask_ = 0x7
 two bits would be enough, but we could use the number "0" as a wildcard
static const unsigned int layerStartBit_ = 14
 two bits would be enough, but we could use the number "0" as a wildcard
static const unsigned int moduleMask_ = 0x7
static const unsigned int moduleStartBit_ = 2
static const unsigned int rod_fw_bwMask_ = 0x3
static const unsigned int rod_fw_bwStartBit_ = 12
static const unsigned int rodMask_ = 0x7F
static const unsigned int rodStartBit_ = 5
static const unsigned int sterMask_ = 0x3
static const unsigned int sterStartBit_ = 0

Detailed Description

Definition at line 16 of file TOBDetId.h.


Constructor & Destructor Documentation

TOBDetId::TOBDetId ( ) [inline]

Constructor of a null id

Definition at line 110 of file TOBDetId.h.

                   : SiStripDetId() {
}
TOBDetId::TOBDetId ( uint32_t  rawid) [inline]

Constructor from a raw value

Definition at line 113 of file TOBDetId.h.

                                 : SiStripDetId(rawid) {
}
TOBDetId::TOBDetId ( const DetId id) [inline]

Construct from generic DetId

Definition at line 116 of file TOBDetId.h.

                                  : SiStripDetId(id.rawId()) {
}
TOBDetId::TOBDetId ( uint32_t  layer,
uint32_t  rod_fw_bw,
uint32_t  rod,
uint32_t  module,
uint32_t  ster 
) [inline]

Member Function Documentation

bool TOBDetId::isDoubleSide ( ) const [inline]

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

Definition at line 119 of file TOBDetId.h.

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

Referenced by isRPhi(), and isStereo().

                                  {
  // Double Side: only layers 1 and 2
  return this->glued() == 0 && ( this->layer() == 1 || this->layer() == 2 );
}
bool TOBDetId::isRPhi ( ) [inline]

Returns true if the module is rphi

Definition at line 85 of file TOBDetId.h.

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

Referenced by SiStripBadModuleGenerator::isTOBDetector().

  { return (stereo() == 0 && !isDoubleSide());}
bool TOBDetId::isStereo ( ) [inline]

Returns true if the module is stereo

Definition at line 89 of file TOBDetId.h.

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

Referenced by TkLayerMap::getXY_TOB(), and SiStripBadModuleGenerator::isTOBDetector().

  { return (stereo() != 0 && !isDoubleSide());}
bool TOBDetId::isZMinusSide ( ) const [inline]

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

Definition at line 69 of file TOBDetId.h.

References side().

Referenced by SiStripFolderOrganizer::getFolderName(), TkLayerMap::getXY_TOB(), and isZPlusSide().

  { return (side() == 1);}
bool TOBDetId::isZPlusSide ( ) const [inline]

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

Definition at line 65 of file TOBDetId.h.

References isZMinusSide().

Referenced by SiStripBadModuleGenerator::isTOBDetector().

  { return (!isZMinusSide());}
unsigned int TOBDetId::layer ( ) const [inline]
unsigned int TOBDetId::layerNumber ( ) const [inline]
unsigned int TOBDetId::module ( ) const [inline]

detector id

Definition at line 58 of file TOBDetId.h.

References DetId::id_, moduleMask_, and moduleStartBit_.

Referenced by moduleNumber(), and trackerHierarchy().

    { return ((id_>>moduleStartBit_)& moduleMask_) ;}
unsigned int TOBDetId::moduleNumber ( ) const [inline]

Returns the module number

Definition at line 81 of file TOBDetId.h.

References module().

Referenced by TkLayerMap::getXY_TOB().

  { return module();}
std::vector<unsigned int> TOBDetId::rod ( ) const [inline]

rod id

vector[0] = 1 -> bw rod (TOB-) vector[0] = 2 -> fw rod (TOB+) vector[1] -> rod

Definition at line 49 of file TOBDetId.h.

References rodNumber(), and side().

Referenced by SiStripSubStructure::getTOBDetectors(), and trackerHierarchy().

    { std::vector<unsigned int> num;
      num.push_back( side() );
      num.push_back( rodNumber() );
      return num ;}
unsigned int TOBDetId::rodNumber ( ) const [inline]

Returns the rod number

Definition at line 77 of file TOBDetId.h.

References DetId::id_, rodMask_, and rodStartBit_.

Referenced by SiStripFolderOrganizer::getFolderName(), TkLayerMap::getXY_TOB(), SiStripBadModuleGenerator::isTOBDetector(), and rod().

  { return ((id_>>rodStartBit_) & rodMask_);}
unsigned int TOBDetId::side ( ) const [inline]

Definition at line 55 of file TOBDetId.h.

References DetId::id_, rod_fw_bwMask_, and rod_fw_bwStartBit_.

Referenced by isZMinusSide(), and rod().


Member Data Documentation

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

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

Reimplemented from SiStripDetId.

Definition at line 101 of file TOBDetId.h.

Referenced by layer(), and TOBDetId().

const unsigned int TOBDetId::layerStartBit_ = 14 [static, private]

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

Reimplemented from SiStripDetId.

Definition at line 94 of file TOBDetId.h.

Referenced by layer(), and TOBDetId().

const unsigned int TOBDetId::moduleMask_ = 0x7 [static, private]

Definition at line 104 of file TOBDetId.h.

Referenced by module(), and TOBDetId().

const unsigned int TOBDetId::moduleStartBit_ = 2 [static, private]

Definition at line 97 of file TOBDetId.h.

Referenced by module(), and TOBDetId().

const unsigned int TOBDetId::rod_fw_bwMask_ = 0x3 [static, private]

Definition at line 102 of file TOBDetId.h.

Referenced by side(), and TOBDetId().

const unsigned int TOBDetId::rod_fw_bwStartBit_ = 12 [static, private]

Definition at line 95 of file TOBDetId.h.

Referenced by side(), and TOBDetId().

const unsigned int TOBDetId::rodMask_ = 0x7F [static, private]

Definition at line 103 of file TOBDetId.h.

Referenced by rodNumber(), and TOBDetId().

const unsigned int TOBDetId::rodStartBit_ = 5 [static, private]

Definition at line 96 of file TOBDetId.h.

Referenced by rodNumber(), and TOBDetId().

const unsigned int TOBDetId::sterMask_ = 0x3 [static, private]

Reimplemented from SiStripDetId.

Definition at line 105 of file TOBDetId.h.

Referenced by TOBDetId().

const unsigned int TOBDetId::sterStartBit_ = 0 [static, private]

Reimplemented from SiStripDetId.

Definition at line 98 of file TOBDetId.h.

Referenced by TOBDetId().