CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
9 class FastTimeDetId : public DetId {
10 public:
11  static const int kFastTimeCellXOffset = 8;
12  static const int kFastTimeCellXMask = 0xFF;
13  static const int kFastTimeCellYOffset = 0;
14  static const int kFastTimeCellYMask = 0xFFF;
15  static const int kFastTimeZsideMask = 0x10000;
16  enum { Subdet=FastTime};
18  FastTimeDetId();
20  FastTimeDetId(uint32_t rawid);
22  FastTimeDetId(int module_ix, int module_iy, int iz);
24  FastTimeDetId(const DetId& id);
26  FastTimeDetId& operator=(const DetId& id);
27 
29  FastTimeDetId geometryCell () const {return FastTimeDetId (0, 0, zside());}
30 
32  ForwardSubdetector subdet() const { return FastTime; }
33 
35  int ix() const { return (id_>>kFastTimeCellXOffset)&kFastTimeCellXMask; }
36 
38  int iy() const { return (id_>>kFastTimeCellYOffset)&kFastTimeCellYMask; }
39 
41  int zside() const { return (((id_& kFastTimeZsideMask) > 0) ? 1 : -1); }
42 
44  bool isFastTime() const { return true; }
45  bool isForward() const { return true; }
46 
47  static const FastTimeDetId Undefined;
48 
49 };
50 
51 std::ostream& operator<<(std::ostream&,const FastTimeDetId& id);
52 
53 #endif
bool isForward() const
Definition: FastTimeDetId.h:45
FastTimeDetId & operator=(const DetId &id)
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:29
ForwardSubdetector subdet() const
get the subdetector
Definition: FastTimeDetId.h:32
static const int kFastTimeCellXOffset
Definition: FastTimeDetId.h:11
static const int kFastTimeZsideMask
Definition: FastTimeDetId.h:15
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
int zside() const
get the z-side of the cell (1/-1)
Definition: FastTimeDetId.h:41
ForwardSubdetector
static const int kFastTimeCellYMask
Definition: FastTimeDetId.h:14
static const FastTimeDetId Undefined
Definition: FastTimeDetId.h:47
int ix() const
get the absolute value of the cell #&#39;s along x-axis
Definition: FastTimeDetId.h:35
bool isFastTime() const
consistency check : no bits left =&gt; no overhead
Definition: FastTimeDetId.h:44
Definition: DetId.h:18
uint32_t id_
Definition: DetId.h:55
static const int kFastTimeCellXMask
Definition: FastTimeDetId.h:12
static const int kFastTimeCellYOffset
Definition: FastTimeDetId.h:13
int iy() const
get the absolute value of the cell #&#39;s along y-axis
Definition: FastTimeDetId.h:38