CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalTrigTowerDetId.cc
Go to the documentation of this file.
3 
5 
7 }
8 
9 
11 }
12 
14  id_|=((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
15  (iphi&0x7F);
16 }
17 
19  id_|=((depth&0x7)<<14) |
20  ((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
21  (iphi&0x7F);
22 }
23 
25  id_|=((depth&0x7)<<14) |
26  ((ieta>0)?(0x2000|(ieta<<7)):((-ieta)<<7)) |
27  (iphi&0x7F);
28  id_|=((version&0x7)<<17);
29 }
30 
32  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
33  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
34  }
35  id_=gen.rawId();
36 }
37 
39  id_|=((version&0x7)<<17);
40 }
41 
43  if (!gen.null() && (gen.det()!=Hcal || gen.subdetId()!=HcalTriggerTower)) {
44  throw cms::Exception("Invalid DetId") << "Cannot assign HcalTrigTowerDetId from " << std::hex << gen.rawId() << std::dec;
45  }
46  id_=gen.rawId();
47  return *this;
48 }
49 
50 std::ostream& operator<<(std::ostream& s,const HcalTrigTowerDetId& id) {
51  s << "(HcalTrigTower v" << id.version() << ": " << id.ieta() << ',' << id.iphi();
52  if (id.depth()>0) s << ',' << id.depth();
53 
54  return s << ')';
55 }
56 
57 
void setVersion(int version)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
HcalTrigTowerDetId & operator=(const DetId &id)
uint32_t id_
Definition: DetId.h:55
bool null() const
is this a null id ?
Definition: DetId.h:45
static const HcalTrigTowerDetId Undefined
Detector det() const
get the detector field from this detid
Definition: DetId.h:35