Skip to content

Commit f9bba61

Browse files
committed
Remove a few dead assignments or initializations
1 parent e21a7ba commit f9bba61

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

Calibration/EcalCalibAlgos/src/ClusterFillMap.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,20 @@ void ClusterFillMap::fillMap(const std::vector<std::pair<DetId, float> >& v1,
3131
itrechit = barrelHitsCollection->find(idsIt->first);
3232
dummy = itrechit->energy();
3333
dummy *= (*m_barrelMap)[idsIt->first];
34-
}
35-
if (idsIt->first.subdetId() == EcalEndcap) {
34+
} else if (idsIt->first.subdetId() == EcalEndcap) {
3635
itrechit = endcapHitsCollection->find(idsIt->first);
3736
dummy = itrechit->energy();
3837
dummy *= (*m_endcapMap)[idsIt->first];
3938
}
40-
int ID = idsIt->first.rawId();
4139
if (edm::isNotFinite(dummy)) {
4240
dummy = 0;
4341
}
4442
if (dummy < m_minEnergyPerCrystal)
4543
continue; //return 1;
4644
if (dummy > m_maxEnergyPerCrystal) {
47-
dummy = 0;
4845
continue;
4946
}
47+
int ID = idsIt->first.rawId();
5048
if (m_xtalRegionId[ID] == RegionNumber)
5149
xtlMap[m_IndexInRegion[ID]] += dummy;
5250
else

Calibration/EcalCalibAlgos/src/MatrixFillMap.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ void MatrixFillMap::fillEEMap(EEDetId EEmax,
101101
curr_y = EEmax.iy() - m_recoWindowSidey / 2 + ij;
102102
if (EEDetId::validDetId(curr_x, curr_y, EEmax.zside())) {
103103
EEDetId det = EEDetId(curr_x, curr_y, EEmax.zside(), EEDetId::XYMODE);
104-
int ID = det.rawId();
105104
EcalRecHitCollection::const_iterator curr_recHit = endcapHitsCollection->find(det);
106105
double dummy = curr_recHit->energy();
107106
if (edm::isNotFinite(dummy)) {
@@ -110,10 +109,10 @@ void MatrixFillMap::fillEEMap(EEDetId EEmax,
110109
if (dummy < m_minEnergyPerCrystal)
111110
continue;
112111
if (dummy > m_maxEnergyPerCrystal) {
113-
dummy = 0;
114112
continue;
115113
}
116114
dummy *= (*m_endcapMap)[det];
115+
int ID = det.rawId();
117116
if (m_xtalRegionId[ID] == EENumberOfRegion)
118117
EExtlMap[m_IndexInRegion[ID]] += dummy;
119118
else

Calibration/IsolatedParticles/plugins/IsoTrackCalibration.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ void IsoTrackCalibration::beginRun(edm::Run const &iRun, edm::EventSetup const &
475475

476476
// check if trigger names in (new) config
477477
if (changed_) {
478-
changed_ = false;
479478
edm::LogInfo("HcalIsoTrack") << "New trigger menu found !!!";
480479
const unsigned int n(hltConfig_.size());
481480
for (unsigned itrig = 0; itrig < trigNames_.size(); itrig++) {

Calibration/Tools/src/HouseholderDecomposition.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -550,20 +550,17 @@ void HouseholderDecomposition::makeRegions(const int& regLength) {
550550
remPhi % numSubRegPhi; // add "addtomore" number of times (addto+-1), remaining times add just (addto)
551551

552552
// now put it all together
553-
int addedLengthEta = 0;
554-
int addedLengthPhi = 0;
555553
int startIndexEta = mineta;
556554
int startIndexPhi;
557-
int endIndexEta = 0;
555+
int endIndexEta;
558556
int endIndexPhi;
559557
for (int i = 0; i < numSubRegEta; i++) {
560-
addedLengthEta = regLength + addtoEta + addtomoreEta / abs(addtomoreEta) * (i < abs(addtomoreEta));
558+
int addedLengthEta = regLength + addtoEta + addtomoreEta / abs(addtomoreEta) * (i < abs(addtomoreEta));
561559
endIndexEta = startIndexEta + addedLengthEta - 1;
562560

563561
startIndexPhi = minphi;
564-
endIndexPhi = 0;
565562
for (int j = 0; j < numSubRegPhi; j++) {
566-
addedLengthPhi = regLength + addtoPhi + addtomorePhi / abs(addtomorePhi) * (j < abs(addtomorePhi));
563+
int addedLengthPhi = regLength + addtoPhi + addtomorePhi / abs(addtomorePhi) * (j < abs(addtomorePhi));
567564
endIndexPhi = startIndexPhi + addedLengthPhi - 1;
568565

569566
regMinPhi.push_back(startIndexPhi - regFrame * (j != 0));

0 commit comments

Comments
 (0)