CMS 3D CMS Logo

HcalOtherDetId.cc
Go to the documentation of this file.
3 #include <iostream>
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:44
HcalOtherSubdetector
Definition: HcalAssistant.h:32
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
Definition: DetId.h:18
uint32_t id_
Definition: DetId.h:56
Detector det() const
get the detector field from this detid
Definition: DetId.h:36