CMS 3D CMS Logo

PXFDetId.h
Go to the documentation of this file.
1 #ifndef DataFormats_SiStripDetId_PXFDetId_H
2 #define DataFormats_SiStripDetId_PXFDetId_H
3 
4 #include <ostream>
7 
11 class PXFDetId;
12 
13 std::ostream& operator<<(std::ostream& os, const PXFDetId& id);
14 
15 class PXFDetId : public DetId {
16 public:
18  PXFDetId();
20  PXFDetId(uint32_t rawid);
22  PXFDetId(const DetId& id);
23 
24  PXFDetId(uint32_t side, uint32_t disk, uint32_t blade, uint32_t panel, uint32_t module)
29  }
30 
32  unsigned int side() const { return int((id_ >> sideStartBit_) & sideMask_); }
33 
35  unsigned int disk() const { return int((id_ >> diskStartBit_) & diskMask_); }
36 
38  unsigned int blade() const { return ((id_ >> bladeStartBit_) & bladeMask_); }
39 
41  unsigned int panel() const { return ((id_ >> panelStartBit_) & panelMask_); }
42 
44  unsigned int module() const { return ((id_ >> moduleStartBit_) & moduleMask_); }
45 
46 private:
48  static const unsigned int sideStartBit_ = 23;
49  static const unsigned int diskStartBit_ = 16;
50  static const unsigned int bladeStartBit_ = 10;
51  static const unsigned int panelStartBit_ = 8;
52  static const unsigned int moduleStartBit_ = 2;
54 
55  static const unsigned int sideMask_ = 0x3;
56  static const unsigned int diskMask_ = 0xF;
57  static const unsigned int bladeMask_ = 0x3F;
58  static const unsigned int panelMask_ = 0x3;
59  static const unsigned int moduleMask_ = 0x3F;
60 };
61 
62 #endif
PixelSubdetector
Definition: PixelSubdetector.h:9
PixelSubdetector.h
PXFDetId::bladeStartBit_
static const unsigned int bladeStartBit_
Definition: PXFDetId.h:50
PXFDetId::sideMask_
static const unsigned int sideMask_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: PXFDetId.h:55
DetId
Definition: DetId.h:17
PXFDetId::PXFDetId
PXFDetId(uint32_t side, uint32_t disk, uint32_t blade, uint32_t panel, uint32_t module)
Definition: PXFDetId.h:24
PXFDetId
Definition: PXFDetId.h:15
PXFDetId::diskStartBit_
static const unsigned int diskStartBit_
Definition: PXFDetId.h:49
PXFDetId::moduleStartBit_
static const unsigned int moduleStartBit_
Definition: PXFDetId.h:52
PXFDetId::blade
unsigned int blade() const
blade id
Definition: PXFDetId.h:38
PXFDetId::panelMask_
static const unsigned int panelMask_
Definition: PXFDetId.h:58
PXFDetId::panelStartBit_
static const unsigned int panelStartBit_
Definition: PXFDetId.h:51
DetId::Tracker
Definition: DetId.h:25
DetId::id_
uint32_t id_
Definition: DetId.h:69
PXFDetId::module
unsigned int module() const
det id
Definition: PXFDetId.h:44
PXFDetId::disk
unsigned int disk() const
disk id
Definition: PXFDetId.h:35
createfilelist.int
int
Definition: createfilelist.py:10
module
Definition: vlib.h:198
operator<<
std::ostream & operator<<(std::ostream &os, const PXFDetId &id)
Definition: PXFDetId.cc:8
PXFDetId::panel
unsigned int panel() const
panel id
Definition: PXFDetId.h:41
DetId.h
PXFDetId::bladeMask_
static const unsigned int bladeMask_
Definition: PXFDetId.h:57
PXFDetId::side
unsigned int side() const
positive or negative id
Definition: PXFDetId.h:32
PXFDetId::PXFDetId
PXFDetId()
Definition: PXFDetId.cc:3
PXFDetId::moduleMask_
static const unsigned int moduleMask_
Definition: PXFDetId.h:59
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
PXFDetId::sideStartBit_
static const unsigned int sideStartBit_
two bits would be enough, but we could use the number "0" as a wildcard
Definition: PXFDetId.h:48
PXFDetId::diskMask_
static const unsigned int diskMask_
Definition: PXFDetId.h:56