Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Run2-hcx180 Fix a bug for HcalDetId which affects DQM of calibration channels" #23739

Merged
merged 1 commit into from Jul 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 4 additions & 25 deletions DataFormats/HcalDetId/src/HcalDetId.cc
Expand Up @@ -8,18 +8,7 @@ const HcalDetId HcalDetId::Undefined(HcalEmpty,0,0,0);
HcalDetId::HcalDetId() : DetId() {
}

HcalDetId::HcalDetId(uint32_t rawid) {
if ((DetId::Detector(rawid>>DetId::kDetOffset)&0xF) != Hcal) {
id_ = rawid;
} else {
HcalSubdetector subdet = (HcalSubdetector)((rawid>>DetId::kSubdetOffset)&0x7);
if ((subdet==HcalBarrel) || (subdet==HcalEndcap) ||
(subdet==HcalOuter) || (subdet==HcalForward)) {
id_ = newForm(rawid);
} else {
id_ = rawid;
}
}
HcalDetId::HcalDetId(uint32_t rawid) : DetId(newForm(rawid)) {
}

HcalDetId::HcalDetId(HcalSubdetector subdet, int tower_ieta, int tower_iphi, int depth) : DetId(Hcal,subdet) {
Expand All @@ -38,12 +27,7 @@ HcalDetId::HcalDetId(const DetId& gen) {
subdet!=HcalTriggerTower && subdet!=HcalOther)) {
throw cms::Exception("Invalid DetId") << "Cannot initialize HcalDetId from " << std::hex << gen.rawId() << std::dec;
}
if ((subdet==HcalBarrel) || (subdet==HcalEndcap) ||
(subdet==HcalOuter) || (subdet==HcalForward)) {
id_ = newForm(gen.rawId());
} else {
id_ = gen.rawId();
}
id_ = newForm(gen.rawId());
} else {
id_ = gen.rawId();
}
Expand All @@ -58,12 +42,7 @@ HcalDetId& HcalDetId::operator=(const DetId& gen) {
subdet!=HcalTriggerTower && subdet!=HcalOther)) {
throw cms::Exception("Invalid DetId") << "Cannot assign HcalDetId from " << std::hex << gen.rawId() << std::dec;
}
if ((subdet==HcalBarrel) || (subdet==HcalEndcap) ||
(subdet==HcalOuter) || (subdet==HcalForward)) {
id_ = newForm(gen.rawId());
} else {
id_ = gen.rawId();
}
id_ = newForm(gen.rawId());
} else {
id_ = gen.rawId();
}
Expand Down Expand Up @@ -257,7 +236,7 @@ std::ostream& operator<<(std::ostream& s,const HcalDetId& id) {
case(HcalForward) : return s << "(HF " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
case(HcalOuter) : return s << "(HO " << id.ieta() << ',' << id.iphi() << ')';
case(HcalTriggerTower) : return s << "(HT " << id.ieta() << ',' << id.iphi() << ')';
default : return s << std::hex << id.rawId() << std::dec;
default : return s << id.rawId();
}
}

Expand Down