CMS 3D CMS Logo

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

#include <PXBDetId.h>

Inheritance diagram for PXBDetId:
DetId

Public Member Functions

unsigned int ladder () const
 ladder id More...
 
unsigned int layer () const
 layer id More...
 
unsigned int module () const
 det id More...
 
 PXBDetId ()
 
 PXBDetId (uint32_t rawid)
 
 PXBDetId (const DetId &id)
 
 PXBDetId (uint32_t layer, uint32_t ladder, uint32_t module)
 
- 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 ladderMask_ = 0xFF
 
static const unsigned int ladderStartBit_ = 8
 
static const unsigned int layerMask_ = 0xF
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const unsigned int layerStartBit_ = 16
 two bits would be enough, but we could use the number "0" as a wildcard More...
 
static const unsigned int moduleMask_ = 0x3F
 
static const unsigned int moduleStartBit_ = 2
 

Additional Inherited Members

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

Definition at line 16 of file PXBDetId.h.

Constructor & Destructor Documentation

◆ PXBDetId() [1/4]

PXBDetId::PXBDetId ( )

Constructor of a null id

Definition at line 3 of file PXBDetId.cc.

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

◆ PXBDetId() [2/4]

PXBDetId::PXBDetId ( uint32_t  rawid)

Constructor from a raw value

Definition at line 5 of file PXBDetId.cc.

5 : DetId(rawid) {}
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ PXBDetId() [3/4]

PXBDetId::PXBDetId ( const DetId id)

Construct from generic DetId

Definition at line 6 of file PXBDetId.cc.

6 : DetId(id.rawId()) {}
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ PXBDetId() [4/4]

PXBDetId::PXBDetId ( uint32_t  layer,
uint32_t  ladder,
uint32_t  module 
)
inline

Definition at line 25 of file PXBDetId.h.

References DetId::id_, ladder(), ladderMask_, ladderStartBit_, layer(), layerMask_, layerStartBit_, module(), moduleMask_, and moduleStartBit_.

28  }
unsigned int module() const
det id
Definition: PXBDetId.h:37
static const unsigned int layerMask_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: PXBDetId.h:45
unsigned int layer() const
layer id
Definition: PXBDetId.h:31
static const unsigned int moduleMask_
Definition: PXBDetId.h:47
static const unsigned int moduleStartBit_
Definition: PXBDetId.h:43
static const unsigned int layerStartBit_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: PXBDetId.h:41
static const unsigned int ladderStartBit_
Definition: PXBDetId.h:42
static const unsigned int ladderMask_
Definition: PXBDetId.h:46
uint32_t id_
Definition: DetId.h:69
unsigned int ladder() const
ladder id
Definition: PXBDetId.h:34
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

Member Function Documentation

◆ ladder()

unsigned int PXBDetId::ladder ( ) const
inline

ladder id

Definition at line 34 of file PXBDetId.h.

References DetId::id_, ladderMask_, and ladderStartBit_.

Referenced by SiPixelHitEfficiencySource::analyze(), PixelBarrelName::PixelBarrelName(), PixelBarrelNameUpgrade::PixelBarrelNameUpgrade(), and PXBDetId().

34 { return ((id_ >> ladderStartBit_) & ladderMask_); }
static const unsigned int ladderStartBit_
Definition: PXBDetId.h:42
static const unsigned int ladderMask_
Definition: PXBDetId.h:46
uint32_t id_
Definition: DetId.h:69

◆ layer()

unsigned int PXBDetId::layer ( ) const
inline

layer id

Definition at line 31 of file PXBDetId.h.

References DetId::id_, createfilelist::int, layerMask_, and layerStartBit_.

Referenced by geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), PixelBarrelName::PixelBarrelName(), PixelBarrelNameUpgrade::PixelBarrelNameUpgrade(), and PXBDetId().

31 { return int((id_ >> layerStartBit_) & layerMask_); }
static const unsigned int layerMask_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: PXBDetId.h:45
static const unsigned int layerStartBit_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: PXBDetId.h:41
uint32_t id_
Definition: DetId.h:69

◆ module()

unsigned int PXBDetId::module ( ) const
inline

det id

Definition at line 37 of file PXBDetId.h.

References DetId::id_, moduleMask_, and moduleStartBit_.

Referenced by SiPixelHitEfficiencySource::analyze(), PixelBarrelName::PixelBarrelName(), PixelBarrelNameUpgrade::PixelBarrelNameUpgrade(), and PXBDetId().

37 { return ((id_ >> moduleStartBit_) & moduleMask_); }
static const unsigned int moduleMask_
Definition: PXBDetId.h:47
static const unsigned int moduleStartBit_
Definition: PXBDetId.h:43
uint32_t id_
Definition: DetId.h:69

Member Data Documentation

◆ ladderMask_

const unsigned int PXBDetId::ladderMask_ = 0xFF
staticprivate

Definition at line 46 of file PXBDetId.h.

Referenced by ladder(), and PXBDetId().

◆ ladderStartBit_

const unsigned int PXBDetId::ladderStartBit_ = 8
staticprivate

Definition at line 42 of file PXBDetId.h.

Referenced by ladder(), and PXBDetId().

◆ layerMask_

const unsigned int PXBDetId::layerMask_ = 0xF
staticprivate

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

Definition at line 45 of file PXBDetId.h.

Referenced by layer(), and PXBDetId().

◆ layerStartBit_

const unsigned int PXBDetId::layerStartBit_ = 16
staticprivate

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

Definition at line 41 of file PXBDetId.h.

Referenced by layer(), and PXBDetId().

◆ moduleMask_

const unsigned int PXBDetId::moduleMask_ = 0x3F
staticprivate

Definition at line 47 of file PXBDetId.h.

Referenced by module(), and PXBDetId().

◆ moduleStartBit_

const unsigned int PXBDetId::moduleStartBit_ = 2
staticprivate

Definition at line 43 of file PXBDetId.h.

Referenced by module(), and PXBDetId().