Skip to content

Commit f091e18

Browse files
committed
fix cpp issue
1 parent 3e939b4 commit f091e18

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

PWGHF/TableProducer/treeCreatorOmegacSt.cxx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ struct HfTreeCreatorOmegacSt {
338338
int decayChannel = -1; // flag for different decay channels
339339
const int nProngs = 2;
340340
bool isMatched = false;
341+
static constexpr int nDaughters = 2;
341342

342343
void processMc(aod::McCollisions const&,
343344
aod::McParticles const& mcParticles)
@@ -504,7 +505,7 @@ struct HfTreeCreatorOmegacSt {
504505
}
505506
hCandidatesPrPi->Fill(SVFitting::FitOk);
506507

507-
std::array<double, nProngs> massesV0Daughters{o2::constants::physics::MassProton, o2::constants::physics::MassPiMinus};
508+
std::array<double, nDaughters> massesV0Daughters{o2::constants::physics::MassProton, o2::constants::physics::MassPiMinus};
508509
std::array<std::array<float, 3>, 2> momentaV0Daughters;
509510
o2::track::TrackPar trackParV0Pr = df2.getTrackParamAtPCA(0);
510511
trackParV0Pr.getPxPyPzGlo(momentaV0Daughters[0]);
@@ -539,9 +540,9 @@ struct HfTreeCreatorOmegacSt {
539540
const auto cpaCasc = RecoDecay::cpa(primaryVertexPos, df2.getPCACandidate(), pCasc);
540541
const auto cpaXYCasc = RecoDecay::cpaXY(primaryVertexPos, df2.getPCACandidate(), pCasc);
541542

542-
std::array<double, nProngs> massesXiDaughters = {o2::constants::physics::MassLambda0, o2::constants::physics::MassPiPlus};
543+
std::array<double, nDaughters> massesXiDaughters = {o2::constants::physics::MassLambda0, o2::constants::physics::MassPiPlus};
543544
const auto massXi = RecoDecay::m(momentaCascDaughters, massesXiDaughters);
544-
std::array<double, nProngs> massesOmegaDaughters = {o2::constants::physics::MassLambda0, o2::constants::physics::MassKPlus};
545+
std::array<double, nDaughters> massesOmegaDaughters = {o2::constants::physics::MassLambda0, o2::constants::physics::MassKPlus};
545546
const auto massOmega = RecoDecay::m(momentaCascDaughters, massesOmegaDaughters);
546547

547548
registry.fill(HIST("hDca"), std::sqrt(impactParameterCasc.getR2()));
@@ -559,9 +560,9 @@ struct HfTreeCreatorOmegacSt {
559560
(std::abs(v0TrackPr.tpcNSigmaPr()) < maxNSigmaV0Pr) &&
560561
(std::abs(v0TrackPi.tpcNSigmaPi()) < maxNSigmaV0Pi)) {
561562

562-
std::array<double, nProngs> massesOmegacToOmegaPi{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassPiPlus};
563-
std::array<double, nProngs> massesOmegacToOmegaK{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassKPlus};
564-
std::array<double, nProngs> massesXicDaughters{o2::constants::physics::MassXiMinus, o2::constants::physics::MassPiPlus};
563+
std::array<double, nDaughters> massesOmegacToOmegaPi{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassPiPlus};
564+
std::array<double, nDaughters> massesOmegacToOmegaK{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassKPlus};
565+
std::array<double, nDaughters> massesXicDaughters{o2::constants::physics::MassXiMinus, o2::constants::physics::MassPiPlus};
565566
std::array<std::array<float, 3>, 2> momenta;
566567

567568
auto trackParCovPr = getTrackParCov(v0TrackPr);
@@ -857,7 +858,7 @@ struct HfTreeCreatorOmegacSt {
857858
LOG(debug) << "cascade with PDG code: " << pdgCode;
858859
if (std::abs(pdgCode) == kOmegaMinus) {
859860
LOG(debug) << "found Omega, looking for pions";
860-
std::array<double, nProngs> masses{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassPiPlus};
861+
std::array<double, nDaughters> masses{o2::constants::physics::MassOmegaMinus, o2::constants::physics::MassPiPlus};
861862
std::array<std::array<float, 3>, 2> momenta;
862863
std::array<double, 3> primaryVertexPos = {primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()};
863864
const auto& mcColl = mother.mcCollision();

0 commit comments

Comments
 (0)