CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalOtherDetId.cc
Go to the documentation of this file.
3 
5 }
6 
7 HcalOtherDetId::HcalOtherDetId(uint32_t rawid) : DetId(rawid) {
8 }
9 
11  : DetId(Hcal,HcalOther) {
12  id_|= (int(other_type&0x1F)<<20);
13 }
14 
16  if (gen.det()!=Hcal || gen.subdetId()!=HcalOther) {
17  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalOtherDetId from " << std::hex << gen.rawId() << std::dec;
18  }
19  id_=gen.rawId();
20 }
21 
23  if (gen.det()!=Hcal || gen.subdetId()!=HcalOther) {
24  throw cms::Exception("Invalid DetId") << "Cannot assign HcalOtherDetId from " << std::hex << gen.rawId() << std::dec;
25  }
26  id_=gen.rawId();
27  return *this;
28 }
29 
30 
31 
HcalOtherDetId & operator=(const DetId &id)
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
HcalOtherSubdetector
Definition: HcalAssistant.h:33
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Definition: DetId.h:20
uint32_t id_
Definition: DetId.h:57
Detector det() const
get the detector field from this detid
Definition: DetId.h:37