From 18bd6e635feacaa1f725b9431c7df0fe4de64de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Mon, 11 Nov 2024 15:11:48 +0100 Subject: [PATCH] Fix compilation warnings --- .../D2H/TableProducer/candidateCreatorCharmResoReduced.cxx | 2 +- .../D2H/TableProducer/candidateSelectorBsToDsPiReduced.cxx | 2 +- PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx | 2 +- PWGHF/D2H/Tasks/taskCharmResoReduced.cxx | 3 +-- PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx | 2 +- PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx | 2 +- PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx | 2 +- PWGHF/Tasks/taskMcValidation.cxx | 6 +++--- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx b/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx index 27314813edb..93d8accfe84 100644 --- a/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx @@ -279,7 +279,7 @@ struct HfCandidateCreatorCharmResoReduced { invMassD0 = candD.invMassD0Bar(); } std::array pVecD = {candD.px(), candD.py(), candD.pz()}; - std::array dDaughtersIds = {candD.prong0Id(), candD.prong1Id(), candD.prong2Id()}; + // loop on V0 or track candidates bool alreadyCounted{false}; for (const auto& candV0Tr : candsV0Tr) { diff --git a/PWGHF/D2H/TableProducer/candidateSelectorBsToDsPiReduced.cxx b/PWGHF/D2H/TableProducer/candidateSelectorBsToDsPiReduced.cxx index 2c26a329243..6161e31774d 100644 --- a/PWGHF/D2H/TableProducer/candidateSelectorBsToDsPiReduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateSelectorBsToDsPiReduced.cxx @@ -139,7 +139,7 @@ struct HfCandidateSelectorBsToDsPiReduced { template void runSelection(Cands const& hfCandsBs, TracksPion const&, - HfCandBsConfigs const& configs) + HfCandBsConfigs const&) { for (const auto& hfCandBs : hfCandsBs) { int statusBsToDsPi = 0; diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx index 72a38cbc50a..f850a0a67ce 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx @@ -520,7 +520,7 @@ struct HfDataCreatorCharmResoReduced { std::vector idxBhadMothers{}; float motherPt{-1.f}; int indexRecReso{-1}, indexRecDstar{-1}, indexRecDplus{-1}, indexRecD0{-1}, indexRecK0{-1}; - int indexRecDstarToMu{-1}, indexRecD0ToMu{-1}, indexRecK0ToMu{-1}, indexRecResoToMu{-1}, indexRecResoPartReco{-1}; + int indexRecDstarToMu{-1}, indexRecK0ToMu{-1}, indexRecResoToMu{-1}, indexRecResoPartReco{-1}; if constexpr (decChannel == DecayChannel::DstarV0) { // Ds1 → D* K0 → (D0 π+) K0s → ((K-π+) π+)(π+π-) diff --git a/PWGHF/D2H/Tasks/taskCharmResoReduced.cxx b/PWGHF/D2H/Tasks/taskCharmResoReduced.cxx index 9b343e82514..a39422fed8a 100644 --- a/PWGHF/D2H/Tasks/taskCharmResoReduced.cxx +++ b/PWGHF/D2H/Tasks/taskCharmResoReduced.cxx @@ -192,7 +192,7 @@ struct HfTaskCharmResoReduced { void fillCand(const Cand& candidate, const Coll& collision, const CharmBach& bach0, const V0Bach& bach1) { // Compute quantities to be saved - float invMassReso, pdgMassReso, invMassBach0, invMassBach1, pdgMassBach0, pdgMassBach1, sign, invMassD0, cosThetaStar; + float invMassReso{0}, pdgMassReso, invMassBach0, invMassBach1, pdgMassBach0, pdgMassBach1, sign, invMassD0, cosThetaStar; if (channel == DecayChannel::Ds1ToDstarK0s) { pdgMassReso = MassDS1; pdgMassBach0 = MassDStar; @@ -362,7 +362,6 @@ struct HfTaskCharmResoReduced { for (const auto& particle : mcParticles) { auto ptParticle = particle.ptTrack(); auto yParticle = particle.yTrack(); - auto etaParticle = particle.etaTrack(); auto originParticle = particle.origin(); auto flag = particle.flagMcMatchGen(); if (yCandGenMax >= 0. && std::abs(yParticle) > yCandGenMax) { diff --git a/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx index a550bee58fc..2d9221f7190 100644 --- a/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx @@ -158,7 +158,7 @@ struct HfCorrelatorHfeHadrons { // mix event electron-hadron correlation template - void fillMixCorrelation(CollisionType1 const& c1, CollisionType2 const& c2, ElectronType const& tracks1, TracksType const& tracks2) + void fillMixCorrelation(CollisionType1 const&, CollisionType2 const& c2, ElectronType const& tracks1, TracksType const& tracks2) { if (!(isRun3 ? c2.sel8() : (c2.sel7() && c2.alias_bit(kINT7)))) return; diff --git a/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx b/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx index fe6bb764573..918f06da9bd 100644 --- a/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx +++ b/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx @@ -135,7 +135,7 @@ struct HfTaskElectronWeakBoson { } void process(soa::Filtered::iterator const& collision, - SelectedClusters const& emcClusters, + SelectedClusters const&, TrackEle const& tracks, o2::aod::EMCALMatchedTracks const& matchedtracks) { diff --git a/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx index 455e116d195..488a9fee249 100644 --- a/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx @@ -788,7 +788,7 @@ struct HfTreeCreatorXicToXiPiPi { } PROCESS_SWITCH(HfTreeCreatorXicToXiPiPi, processMcKf, "Process MC with KF Particle reconstruction", false); - void processResiduals(SelectedCandidatesMc const& candidates, + void processResiduals(SelectedCandidatesMc const&, aod::TracksWMc const& tracks, aod::McParticles const& particles) { diff --git a/PWGHF/Tasks/taskMcValidation.cxx b/PWGHF/Tasks/taskMcValidation.cxx index 7bf4fe17595..15bddb23866 100644 --- a/PWGHF/Tasks/taskMcValidation.cxx +++ b/PWGHF/Tasks/taskMcValidation.cxx @@ -715,7 +715,7 @@ struct HfTaskMcValidationRec { histDeltaSecondaryVertexZ[iHad] = registryMesons.add(Form("%s/histDeltaSecondaryVertexZ", particleNames[iHad].data()), Form("Sec. Vertex difference reco - MC (MC matched) - %s; #Delta z (cm); entries", labels[iHad].data()), HistType::kTH1F, {axisDeltaVtx}); histDeltaDecayLength[iHad] = registryMesons.add(Form("%s/histDeltaDecayLength", particleNames[iHad].data()), Form("Decay length difference reco - MC (%s); #Delta L (cm); entries", labels[iHad].data()), HistType::kTH1F, {axisDeltaVtx}); for (auto iOrigin = 0; iOrigin < 2; ++iOrigin) { - histPtCentReco[iHad][iOrigin] = registryMesons.add(Form("%s/histPtCentReco%s", particleNames[iHad].data(), originNames[iOrigin].data()), Form("Pt Cent reco %s %s; #it{p}_{T}^{reco} (GeV/#it{c}); Centrality (%); entries", originNames[iOrigin].data(), labels[iHad].data()), HistType::kTH2F, {axisPtD, axisCent}); + histPtCentReco[iHad][iOrigin] = registryMesons.add(Form("%s/histPtCentReco%s", particleNames[iHad].data(), originNames[iOrigin].data()), Form("Pt Cent reco %s %s; #it{p}_{T}^{reco} (GeV/#it{c}); Centrality (%%); entries", originNames[iOrigin].data(), labels[iHad].data()), HistType::kTH2F, {axisPtD, axisCent}); if (storeOccupancy) { histPtOccReco[iHad][iOrigin] = registryMesons.add(Form("%s/histPtOccReco%s", particleNames[iHad].data(), originNames[iOrigin].data()), Form("Pt Cent reco %s %s; #it{p}_{T}^{reco} (GeV/#it{c}); Occupancy; entries", originNames[iOrigin].data(), labels[iHad].data()), HistType::kTH2F, {axisPtD, axisOcc}); } @@ -735,7 +735,7 @@ struct HfTaskMcValidationRec { histDeltaSecondaryVertexZ[iHad] = registryBaryons.add(Form("%s/histDeltaSecondaryVertexZ", particleNames[iHad].data()), Form("Sec. Vertex difference reco - MC (MC matched) - %s; #Delta z (cm); entries", labels[iHad].data()), HistType::kTH1F, {axisDeltaVtx}); histDeltaDecayLength[iHad] = registryBaryons.add(Form("%s/histDeltaDecayLength", particleNames[iHad].data()), Form("Decay length difference reco - MC (%s); #Delta L (cm); entries", labels[iHad].data()), HistType::kTH1F, {axisDeltaVtx}); for (auto iOrigin = 0; iOrigin < 2; ++iOrigin) { - histPtCentReco[iHad][iOrigin] = registryBaryons.add(Form("%s/histPtCentReco%s", particleNames[iHad].data(), originNames[iOrigin].data()), Form("Pt Cent reco %s %s; #it{p}_{T}^{reco} (GeV/#it{c}); Centrality (%); entries", originNames[iOrigin].data(), labels[iHad].data()), HistType::kTH2F, {axisPtD, axisCent}); + histPtCentReco[iHad][iOrigin] = registryBaryons.add(Form("%s/histPtCentReco%s", particleNames[iHad].data(), originNames[iOrigin].data()), Form("Pt Cent reco %s %s; #it{p}_{T}^{reco} (GeV/#it{c}); Centrality (%%); entries", originNames[iOrigin].data(), labels[iHad].data()), HistType::kTH2F, {axisPtD, axisCent}); if (storeOccupancy) { histPtOccReco[iHad][iOrigin] = registryBaryons.add(Form("%s/histPtOccReco%s", particleNames[iHad].data(), originNames[iOrigin].data()), Form("Pt Cent reco %s %s; #it{p}_{T}^{reco} (GeV/#it{c}); Occupancy; entries", originNames[iOrigin].data(), labels[iHad].data()), HistType::kTH2F, {axisPtD, axisOcc}); } @@ -999,7 +999,7 @@ struct HfTaskMcValidationRec { // apply event selection float centrality{105.f}; int occupancy = collision.trackOccupancyInTimeRange(); - const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); // only needed to update centrality, no bitmask selection applied + hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); // only needed to update centrality, no bitmask selection applied if (!collision.has_mcCollision()) { return; }