From 7d67e275b127993ee6c4c17440bf39ff63c9da08 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 8 Oct 2024 10:02:04 -0500 Subject: [PATCH] Fix uninitialized values in HcalTopology --- Geometry/CaloTopology/src/HcalTopology.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Geometry/CaloTopology/src/HcalTopology.cc b/Geometry/CaloTopology/src/HcalTopology.cc index c550077058b81..9f2f60953418a 100644 --- a/Geometry/CaloTopology/src/HcalTopology.cc +++ b/Geometry/CaloTopology/src/HcalTopology.cc @@ -72,7 +72,8 @@ HcalTopology::HcalTopology(const HcalDDDRecConstants* hcons, const bool mergePos HFSize_ = kHFSizePreLS1; // ieta * iphi * depth * 2 CALIBSize_ = kCALIBSizePreLS1; numberOfShapes_ = 87; - } else if (mode_ == HcalTopologyMode::SLHC) { // need to know more eventually + } else if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::Run3) || + (mode_ == HcalTopologyMode::Run4)) { // need to know more eventually topoVersion_ = 10; HBSize_ = nEtaHB_ * IPHI_MAX * maxDepthHB_ * 2; HESize_ = nEtaHE_ * maxPhiHE_ * maxDepthHE_ * 2; @@ -80,7 +81,10 @@ HcalTopology::HcalTopology(const HcalDDDRecConstants* hcons, const bool mergePos HFSize_ = (lastHFRing_ - firstHFRing_ + 1) * IPHI_MAX * maxDepthHF_ * 2; // ieta * iphi * depth * 2 CALIBSize_ = kOffCalibHFX_; numberOfShapes_ = (maxPhiHE_ > 72) ? 1200 : 500; + } else { + throw cms::Exception("UnknownTopologyMode") << "The mode value " << mode_ << "is unknown"; } + maxEta_ = (lastHERing_ > lastHFRing_) ? lastHERing_ : lastHFRing_; if (triggerMode_ == HcalTopologyMode::TriggerMode_2009) { HTSize_ = kHTSizePreLS1;