CMS 3D CMS Logo

FastTimeDetId.h
Go to the documentation of this file.
1 #ifndef DataFormats_ForwardDetId_FastTimeDetId_H
2 #define DataFormats_ForwardDetId_FastTimeDetId_H 1
3 
4 #include <iosfwd>
7 
8 class FastTimeDetId : public DetId {
9 public:
10  static const int kFastTimeCellZOffset = 10;
11  static const int kFastTimeCellZMask = 0x3FF;
12  static const int kFastTimeCellPhiOffset = 0;
13  static const int kFastTimeCellPhiMask = 0x3FF;
14  static const int kFastTimeZsideOffset = 20;
15  static const int kFastTimeZsideMask = 0x1;
16  static const int kFastTimeTypeOffset = 21;
17  static const int kFastTimeTypeMask = 0x3;
18  enum { Subdet = FastTime };
21  FastTimeDetId();
23  FastTimeDetId(uint32_t rawid);
25  FastTimeDetId(int type, int module_izeta, int module_iphi, int iz);
27  FastTimeDetId(const DetId& id);
29  FastTimeDetId& operator=(const DetId& id);
30 
32  FastTimeDetId geometryCell() const { return FastTimeDetId(type(), 0, 0, zside()); }
33 
35  ForwardSubdetector subdet() const { return FastTime; }
36 
38  int type() const { return (id_ >> kFastTimeTypeOffset) & kFastTimeTypeMask; }
39 
41  int ieta() const { return (id_ >> kFastTimeCellZOffset) & kFastTimeCellZMask; }
42  int iz() const { return (id_ >> kFastTimeCellZOffset) & kFastTimeCellZMask; }
43 
45  int iphi() const { return (id_ >> kFastTimeCellPhiOffset) & kFastTimeCellPhiMask; }
46 
48  int zside() const { return ((((id_ >> kFastTimeZsideOffset) & kFastTimeZsideMask) > 0) ? 1 : -1); }
49 
51  bool isFastTime() const { return true; }
52  bool isForward() const { return true; }
53 
54  static const FastTimeDetId Undefined;
55 };
56 
57 std::ostream& operator<<(std::ostream&, const FastTimeDetId& id);
58 
59 #endif
FastTimeDetId::type
int type() const
get the type (barrel vs endcap)
Definition: FastTimeDetId.h:38
FastTimeDetId::isForward
bool isForward() const
Definition: FastTimeDetId.h:52
FastTimeDetId::ieta
int ieta() const
get the absolute value of the cell #'s along x-axis (EC) | z-axis (Barel)
Definition: FastTimeDetId.h:41
FastTimeDetId::isFastTime
bool isFastTime() const
consistency check : no bits left => no overhead
Definition: FastTimeDetId.h:51
ForwardSubdetector
ForwardSubdetector
Definition: ForwardSubdetector.h:4
FastTimeDetId::iphi
int iphi() const
get the absolute value of the cell #'s along y-axis (EC) | phi (Barrel)
Definition: FastTimeDetId.h:45
FastTimeDetId::operator=
FastTimeDetId & operator=(const DetId &id)
Definition: FastTimeDetId.cc:31
FastTimeDetId::kFastTimeCellPhiMask
static const int kFastTimeCellPhiMask
Definition: FastTimeDetId.h:13
FastTimeDetId::iz
int iz() const
Definition: FastTimeDetId.h:42
ForwardSubdetector.h
FastTimeDetId::kFastTimeTypeMask
static const int kFastTimeTypeMask
Definition: FastTimeDetId.h:17
FastTimeDetId::FastTimeDetId
FastTimeDetId()
Definition: FastTimeDetId.cc:8
DetId
Definition: DetId.h:17
FastTimeDetId::FastTimeUnknown
Definition: FastTimeDetId.h:19
FastTimeDetId::Undefined
static const FastTimeDetId Undefined
Definition: FastTimeDetId.h:54
FastTimeDetId::Subdet
Definition: FastTimeDetId.h:18
FastTimeDetId::FastTimeEndcap
Definition: FastTimeDetId.h:19
DetId::id_
uint32_t id_
Definition: DetId.h:69
operator<<
std::ostream & operator<<(std::ostream &, const FastTimeDetId &id)
Definition: FastTimeDetId.cc:43
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
FastTimeDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: FastTimeDetId.h:48
FastTime
Definition: ForwardSubdetector.h:6
FastTimeDetId::geometryCell
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:32
FastTimeDetId::kFastTimeZsideOffset
static const int kFastTimeZsideOffset
Definition: FastTimeDetId.h:14
FastTimeDetId::kFastTimeCellZMask
static const int kFastTimeCellZMask
Definition: FastTimeDetId.h:11
DetId.h
FastTimeDetId
Definition: FastTimeDetId.h:8
FastTimeDetId::kFastTimeCellPhiOffset
static const int kFastTimeCellPhiOffset
Definition: FastTimeDetId.h:12
FastTimeDetId::kFastTimeZsideMask
static const int kFastTimeZsideMask
Definition: FastTimeDetId.h:15
FastTimeDetId::FastTimeBarrel
Definition: FastTimeDetId.h:19
FastTimeDetId::kFastTimeTypeOffset
static const int kFastTimeTypeOffset
Definition: FastTimeDetId.h:16
FastTimeDetId::kFastTimeCellZOffset
static const int kFastTimeCellZOffset
Definition: FastTimeDetId.h:10
FastTimeDetId::subdet
ForwardSubdetector subdet() const
get the subdetector
Definition: FastTimeDetId.h:35