Skip to content

Commit

Permalink
Added an additional safety check before eigen-value calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
SohamBhattacharya committed Dec 29, 2020
1 parent 1426f18 commit 58c99c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions RecoEgamma/EgammaTools/src/HGCalShowerShapeHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ const HGCalShowerShapeHelper::ShowerWidths HGCalShowerShapeHelper::getPCAWidths(
covMat(0, 2) = covMat(2, 0) = dzdx;
covMat(1, 2) = covMat(2, 1) = dydz;

if (!covMat.Sum()) {
return ShowerWidths();
}

// Get eigen values and vectors
TVectorD eigVals(3);
TMatrixD eigVecMat(3, 3);
Expand Down

0 comments on commit 58c99c2

Please sign in to comment.