Skip to content

Commit

Permalink
Merge pull request #30736 from gpetruc/Fix_L1PF-from-CMSSW_11_2_X
Browse files Browse the repository at this point in the history
Fix bug introduced in the L1T PF code cleanup for release integration
  • Loading branch information
cmsbuild committed Jul 16, 2020
2 parents 4834771 + f352791 commit 4047512
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions L1Trigger/Phase2L1ParticleFlow/plugins/L1TPFCaloProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ void L1TPFCaloProducer::readPhase2BarrelCaloTowers_(edm::Event &event, const edm
continue;
if (debug_ && (t.hcalTowerEt() > 0 || t.ecalTowerEt() > 0)) {
edm::LogWarning("L1TPFCaloProducer")
<< "adding phase2 L1 CaloTower eta " << t.towerEta() << " phi " << t.towerIPhi() << " ieta "
<< "adding phase2 L1 CaloTower eta " << t.towerEta() << " phi " << t.towerPhi() << " ieta "
<< t.towerIEta() << " iphi " << t.towerIPhi() << " ecal " << t.ecalTowerEt() << " hcal "
<< t.hcalTowerEt() << "\n";
}
hcalClusterer_.add(t.hcalTowerEt(), t.towerEta(), t.towerIPhi());
ecalClusterer_.add(t.ecalTowerEt(), t.towerEta(), t.towerIPhi());
hcalClusterer_.add(t.hcalTowerEt(), t.towerEta(), t.towerPhi());
ecalClusterer_.add(t.ecalTowerEt(), t.towerEta(), t.towerPhi());
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions L1Trigger/Phase2L1ParticleFlow/src/CaloClusterer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ l1tpf_calo::Phase1GridBase::Phase1GridBase(
continue;
ieta_[icell] = ie;
iphi_[icell] = iph;
eta_[icell] = (ie > 0 ? 0.5 : -0.5) * (towerEtas_[absie - 1] + towerEtas_[absie]);
etaWidth_[icell] = (towerEtas_[absie] - towerEtas_[absie - 1]);
float etaLo = (absie < nEta_ ? towerEtas_[absie - 1] : towerEtas_[absie - 2]);
float etaHi = (absie < nEta_ ? towerEtas_[absie] : towerEtas_[absie - 1]);
eta_[icell] = (ie > 0 ? 0.5 : -0.5) * (etaLo + etaHi);
etaWidth_[icell] = (etaHi - etaLo);
phiWidth_[icell] = 2 * M_PI / nPhi_;
if (absie >= ietaVeryCoarse_)
phiWidth_[icell] *= 4;
Expand Down

0 comments on commit 4047512

Please sign in to comment.