Skip to content

Commit

Permalink
Merge pull request #15706 from kirschen/CMSSW_8_0_X_Fix_NAN_Eta_CaloT…
Browse files Browse the repository at this point in the history
…owers

fix nan Calo-towers, when HO is deactivated, but has energy deposit (and ECAL/HCAL do not have any energy deposits)
  • Loading branch information
cmsbuild committed Sep 7, 2016
2 parents 689612d + e7b1b37 commit 1bc732b
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -1000,7 +1000,8 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower&

// insert in collection (remove and return if below threshold)
if unlikely ( (towerP4[3]==0) & (E_outer>0) ) {
collection.emplace_back(id, E_em, E_had, E_outer, -1, -1, CaloTower::PolarLorentzVector(0,hadPoint.eta(), hadPoint.phi(),0), emPoint, hadPoint);
float val = theHOIsUsed ? 0 : 1E-9; // to keep backwards compatibility for theHOIsUsed == true
collection.emplace_back(id, E_em, E_had, E_outer, -1, -1, CaloTower::PolarLorentzVector(val,hadPoint.eta(), hadPoint.phi(),0), emPoint, hadPoint);
} else {
collection.emplace_back(id, E_em, E_had, E_outer, -1, -1, GlobalVector(towerP4), towerP4[3], mass2, emPoint, hadPoint);
}
Expand Down

0 comments on commit 1bc732b

Please sign in to comment.