diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index be50d7831ab..c938280e865 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -288,8 +288,8 @@ struct RecoDecay { static double cpaRZ(const T& posPV, const U& posSV, const std::array& mom) { // CPARZ = (r . pz)/(|r| |pz|) - auto lineDecay = std::array{sqrtSumOfSquares(posSV[0] - posPV[0], posSV[1] - posPV[1]), posSV[2] - posPV[2]}; - auto momRZ = std::array{sqrtSumOfSquares(mom[0], mom[1]), mom[2]}; + auto lineDecay = std::array{sqrtSumOfSquares(posSV[0] - posPV[0], posSV[1] - posPV[1]), static_cast(posSV[2] - posPV[2])}; + auto momRZ = std::array{sqrtSumOfSquares(mom[0], mom[1]), static_cast(mom[2])}; auto cos = dotProd(lineDecay, momRZ) / std::sqrt(mag2(lineDecay) * mag2(momRZ)); if (cos < -1.) { return -1.;