CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HGCalTriggerModuleDetId.h
Go to the documentation of this file.
1 #ifndef DataFormats_ForwardDetId_HGCalTriggerModuleDetId_H
2 #define DataFormats_ForwardDetId_HGCalTriggerModuleDetId_H 1
3 
7 
8 /* \brief description of the bit assigment
9  [0:3] u-coordinate of the silicon module (u-axis points along -x axis)
10  or eta-coordinate of the scintillator module
11  [4:7] v-coordinate of the silicon module (v-axis points 60-degree wrt x-axis)
12  or phi-coordinate of the scintillator module
13  [8:9] sector (0,1,2 counter-clockwise from u-axis)
14 
15  [10:13] reserved for future use
16 
17  [14:18] layer number
18  [19:20] Type (0 fine divisions of wafer with 120 mum thick silicon
19  1 coarse divisions of wafer with 200 mum thick silicon
20  2 coarse divisions of wafer with 300 mum thick silicon
21  0 fine divisions of scintillators
22  1 coarse divisions of scintillators)
23 
24  [21:21] z-side (0 for +z; 1 for -z)
25  [22:23] Trigger Subdetector Type(HGCEE/HGCHEF/HGCHEB/HFNose)
26  [24:24] Class identifier (0 for HGCalTriggerModuleDetID, 1 for HGCalTriggerBackendDetID)
27  [25:27] Subdetector Type (HGCTrigger)
28  [28:31] Detector type (Forward)
29 */
30 
32 public:
36  HGCalTriggerModuleDetId(uint32_t rawid);
39  HGCalTriggerSubdetector subdet, int zp, int type, int layer, int sector, int moduleU, int moduleV);
41  HGCalTriggerModuleDetId(const DetId& id);
44 
47 
50 
52  int type() const { return (id_ >> kHGCalTypeOffset) & kHGCalTypeMask; }
53 
55  int zside() const { return ((id_ >> kHGCalZsideOffset) & kHGCalZsideMask ? -1 : 1); }
56 
58  int layer() const { return (id_ >> kHGCalLayerOffset) & kHGCalLayerMask; }
59 
61  int sector() const { return (id_ >> kHGCalSectorOffset) & kHGCalSectorMask; }
62 
64  int moduleU() const { return (id_ >> kHGCalModuleUOffset) & kHGCalModuleUMask; }
65 
67  int moduleV() const { return (id_ >> kHGCalModuleVOffset) & kHGCalModuleVMask; }
68 
70  int eta() const { return moduleU(); }
71 
73  int phi() const { return moduleV(); }
74 
76  bool isHFNose() const { return (triggerSubdetId() == HFNoseTrigger); }
77  bool isEE() const { return (triggerSubdetId() == HGCalEETrigger); }
78  bool isHSilicon() const { return (triggerSubdetId() == HGCalHSiTrigger); }
79  bool isHScintillator() const { return (triggerSubdetId() == HGCalHScTrigger); }
80  bool isForward() const { return true; }
81  bool isHGCTrigger() const { return true; }
84 
86 
87  static const int kHGCalModuleUOffset = 0;
88  static const int kHGCalModuleUMask = 0xF;
89  static const int kHGCalModuleVOffset = 4;
90  static const int kHGCalModuleVMask = 0xF;
91  static const int kHGCalSectorOffset = 8;
92  static const int kHGCalSectorMask = 0x3;
93  static const int kHGCalLayerOffset = 14;
94  static const int kHGCalLayerMask = 0x1F;
95  static const int kHGCalTypeOffset = 19;
96  static const int kHGCalTypeMask = 0x3;
97  static const int kHGCalZsideOffset = 24;
98  static const int kHGCalZsideMask = 0x1;
99  static const int kHGCalTriggerSubdetOffset = 22;
100  static const int kHGCalTriggerSubdetMask = 0x3;
101  static const int kHGCalTriggerClassIdentifierOffset = 24;
102  static const int kHGCalTriggerClassIdentifierMask = 0x1;
103 };
104 
105 std::ostream& operator<<(std::ostream&, const HGCalTriggerModuleDetId& id);
106 
107 #endif
HGCalTriggerSubdetector
int zside() const
get the z-side of the module (1/-1)
bool isHFNose() const
consistency check : no bits left =&gt; no overhead
static const int kHGCalTriggerSubdetMask
static const int kHGCalTriggerClassIdentifierOffset
HGCalTriggerModuleDetId & operator=(const DetId &id)
static const int kHGCalModuleVOffset
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
static const int kHGCalModuleUOffset
int eta() const
get the scintillator panel eta
int phi() const
get the scintillator panel phi
int sector() const
get the sector #
int layer() const
get the layer #
static const int kHGCalTriggerClassIdentifierMask
int moduleU() const
get the module U
Definition: DetId.h:17
int moduleV() const
get the module V
uint32_t id_
Definition: DetId.h:69
int triggerSubdetId() const
get the trigger sub-detector
int classId() const
get the class
static const HGCalTriggerModuleDetId Undefined
int type() const
get the type
static const int kHGCalTriggerSubdetOffset