CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDetIdRelationship.cc
Go to the documentation of this file.
2 
3 bool hcalEqualDetId(uint32_t id, const DetId& fId) {
4  return ((fId.det()==DetId::Hcal && HcalDetId(id) == HcalDetId(fId)) ||
6  (fId.det()!=DetId::Hcal && (fId.det()==DetId::Calo && fId.subdetId()!=HcalZDCDetId::SubdetectorId) && (id == fId.rawId())));
7 }
8 
10  DetId id;
11  if (aid.det()==DetId::Hcal) {
12  HcalDetId hcid(aid);
13  id = HcalDetId(hcid.subdet(),hcid.ieta(),hcid.iphi(),hcid.depth());
14  } else if (aid.det()==DetId::Calo && aid.subdetId()==HcalZDCDetId::SubdetectorId) {
15  HcalZDCDetId hcid(aid);
16  id = HcalZDCDetId(hcid.section(),(hcid.zside()>0),hcid.channel());
17  } else {
18  id = aid;
19  }
20  return id;
21 }
22 
bool hcalEqualDetId(Item *cell, const DetId &fId)
DetId hcalTransformedId(const DetId &aid)
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:45
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:34
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int depth() const
get the tower depth
Definition: HcalDetId.h:55
int ieta() const
get the cell ieta
Definition: HcalDetId.h:51
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Definition: DetId.h:37
Section section() const
get the section
Definition: HcalZDCDetId.h:36
int iphi() const
get the cell iphi
Definition: HcalDetId.h:53
Definition: DetId.h:18
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
int channel() const
get the channel
Definition: HcalZDCDetId.h:40
Detector det() const
get the detector field from this detid
Definition: DetId.h:35