Skip to content

Commit 00abbf5

Browse files
committed
Let CTAD deduce types
1 parent e7295f8 commit 00abbf5

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

PWGHF/Core/HfHelper.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,10 @@ struct HfHelper {
708708
} else if (!useJpsiPdgMass && usePhiPdgMass) {
709709
return RecoDecay::m(std::array{pVecMuPos, pVecMuNeg, RecoDecay::pVec(pVecKaPos, pVecKaNeg)},
710710
std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassPhi});
711-
} else {
712-
return RecoDecay::m(std::array{pVecMuPos, pVecMuNeg, pVecKaPos, pVecKaNeg},
713-
std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
714711
}
712+
// Do not use PDG mass for either J/psi or phi
713+
return RecoDecay::m(std::array{pVecMuPos, pVecMuNeg, pVecKaPos, pVecKaNeg},
714+
std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
715715
}
716716

717717
template <typename T>
@@ -937,9 +937,9 @@ struct HfHelper {
937937
{
938938
auto ptCandBp = candBp.pt();
939939
auto mCandBp = invMassBplusToJpsiK(candBp, useJpsiPdgMass);
940-
std::array<float, 3> const pVecMu0 = {candBp.pxProng0(), candBp.pyProng0(), candBp.pzProng0()};
941-
std::array<float, 3> const pVecMu1 = {candBp.pxProng1(), candBp.pyProng1(), candBp.pzProng1()};
942-
std::array<float, 3> const pVecKa = {candBp.pxProng2(), candBp.pyProng2(), candBp.pzProng2()};
940+
std::array const pVecMu0{candBp.pxProng0(), candBp.pyProng0(), candBp.pzProng0()};
941+
std::array const pVecMu1{candBp.pxProng1(), candBp.pyProng1(), candBp.pzProng1()};
942+
std::array const pVecKa{candBp.pxProng2(), candBp.pyProng2(), candBp.pzProng2()};
943943
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
944944
auto ptKa = RecoDecay::pt(pVecKa);
945945
auto candJpsi = candBp.jpsi();
@@ -1127,10 +1127,10 @@ struct HfHelper {
11271127
{
11281128
auto ptCandBs = candBs.pt();
11291129
auto mCandBs = invMassBsToJpsiPhi(candBs, useJpsiPdgMass, usePhiPdgMass);
1130-
std::array<float, 3> const pVecMu0 = {candBs.pxProng0(), candBs.pyProng0(), candBs.pzProng0()};
1131-
std::array<float, 3> const pVecMu1 = {candBs.pxProng1(), candBs.pyProng1(), candBs.pzProng1()};
1132-
std::array<float, 3> const pVecKa0 = {candBs.pxProng2(), candBs.pyProng2(), candBs.pzProng2()};
1133-
std::array<float, 3> const pVecKa1 = {candBs.pxProng3(), candBs.pyProng3(), candBs.pzProng3()};
1130+
std::array const pVecMu0{candBs.pxProng0(), candBs.pyProng0(), candBs.pzProng0()};
1131+
std::array const pVecMu1{candBs.pxProng1(), candBs.pyProng1(), candBs.pzProng1()};
1132+
std::array const pVecKa0{candBs.pxProng2(), candBs.pyProng2(), candBs.pzProng2()};
1133+
std::array const pVecKa1{candBs.pxProng3(), candBs.pyProng3(), candBs.pzProng3()};
11341134
auto mCandPhi = RecoDecay::m(std::array{pVecKa0, pVecKa1}, std::array{o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
11351135
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
11361136
auto ptKa0 = RecoDecay::pt(pVecKa0);

PWGHF/D2H/Tasks/taskBplusToJpsiKReduced.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ struct HfTaskBplusToJpsiKReduced {
343343
auto invMassBplus = HfHelper::invMassBplusToJpsiK(candidate, useJpsiPdgMass);
344344
auto candJpsi = candidate.template jpsi_as<aod::HfRedJpsis>();
345345
auto candKa = candidate.template bachKa_as<aod::HfRedBach0Tracks>();
346-
std::array<float, 3> const pVecMu0 = {candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
347-
std::array<float, 3> const pVecMu1 = {candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
346+
std::array const pVecMu0 = {candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
347+
std::array const pVecMu1 = {candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
348348
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
349349
auto invMassJpsi = RecoDecay::m(std::array{pVecMu0, pVecMu1}, std::array{o2::constants::physics::MassMuonPlus, o2::constants::physics::MassMuonMinus});
350350
uint8_t statusBplus = 0;

PWGHF/D2H/Tasks/taskBsToJpsiPhiReduced.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,10 @@ struct HfTaskBsToJpsiPhiReduced {
374374
auto candJpsi = candidate.template jpsi_as<aod::HfRedJpsis>();
375375
auto candKa0 = candidate.template prong0Phi_as<aod::HfRedBach0Tracks>();
376376
auto candKa1 = candidate.template prong1Phi_as<aod::HfRedBach1Tracks>();
377-
std::array<float, 3> const pVecMu0 = {candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
378-
std::array<float, 3> const pVecMu1 = {candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
379-
std::array<float, 3> const pVecKa0 = {candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()};
380-
std::array<float, 3> const pVecKa1 = {candidate.pxProng3(), candidate.pyProng3(), candidate.pzProng3()};
377+
std::array const pVecMu0 = {candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
378+
std::array const pVecMu1 = {candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
379+
std::array const pVecKa0 = {candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()};
380+
std::array const pVecKa1 = {candidate.pxProng3(), candidate.pyProng3(), candidate.pzProng3()};
381381
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
382382
auto ptPhi = RecoDecay::pt(pVecKa0, pVecKa1);
383383
auto invMassJpsi = RecoDecay::m(std::array{pVecMu0, pVecMu1}, std::array{o2::constants::physics::MassMuonPlus, o2::constants::physics::MassMuonMinus});

0 commit comments

Comments
 (0)