CMS 3D CMS Logo

HGCalTriggerModuleDetId.cc
Go to the documentation of this file.
3 #include <iostream>
4 
6 
8 
10  HGCalTriggerSubdetector subdet, int zp, int type, int layer, int sector, int moduleU, int moduleV)
11  : DetId(Forward, HGCTrigger) {
13  int zside = (zp < 0) ? 1 : 0;
14 
15  id_ |=
21 }
22 
24  if (!gen.null()) {
25  if (gen.det() != Forward) {
26  throw cms::Exception("Invalid DetId")
27  << "Cannot initialize HGCalTriggerModuleDetId from " << std::hex << gen.rawId() << std::dec;
28  }
29  }
30  id_ = gen.rawId();
31 }
32 
34  if (!gen.null()) {
35  if (gen.det() != Forward) {
36  throw cms::Exception("Invalid DetId")
37  << "Cannot assign HGCalTriggerModuleDetId from " << std::hex << gen.rawId() << std::dec;
38  }
39  }
40  id_ = gen.rawId();
41  return (*this);
42 }
43 
44 std::ostream& operator<<(std::ostream& s, const HGCalTriggerModuleDetId& id) {
45  return s << "HGCalTriggerModuleDetId::HFNose:EE:HSil:HScin= " << id.isHFNose() << ":" << id.isEE() << ":"
46  << id.isHSilicon() << ":" << id.isHScintillator() << " type= " << id.type() << " z= " << id.zside()
47  << " layer= " << id.layer() << " sector= " << id.sector() << " module(u,v)= (" << id.moduleU() << ","
48  << id.moduleV() << ")";
49 }
HGCalTriggerSubdetector
int moduleU() const
get the module U
static const int kHGCalTriggerSubdetMask
static const int kHGCalTriggerClassIdentifierOffset
HGCalTriggerModuleDetId & operator=(const DetId &id)
static const int kHGCalModuleVOffset
static const int kHGCalModuleUOffset
static const int kHGCalTriggerClassIdentifierMask
Definition: DetId.h:17
uint32_t id_
Definition: DetId.h:69
std::ostream & operator<<(std::ostream &s, const HGCalTriggerModuleDetId &id)
int moduleV() const
get the module V
int zside() const
get the z-side of the module (1/-1)
int layer() const
get the layer #
int sector() const
get the sector #
static const int kHGCalTriggerSubdetOffset