Skip to content

Commit

Permalink
change behavior only for theHOIsUsed==false to keep backwards-compati…
Browse files Browse the repository at this point in the history
…ble; N.B.: I assume towerP4[3]==0 && E_outer>0 should only happen, if theHOIsUsed==false anyway
  • Loading branch information
kirschen committed Sep 2, 2016
1 parent b68cecb commit e7b1b37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc
Expand Up @@ -999,8 +999,9 @@ 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) & (!theHOIsUsed) ) {
collection.emplace_back(id, E_em, E_had, E_outer, -1, -1, CaloTower::PolarLorentzVector(1e-9,hadPoint.eta(), hadPoint.phi(),0), emPoint, hadPoint);
if unlikely ( (towerP4[3]==0) & (E_outer>0) ) {
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 e7b1b37

Please sign in to comment.