diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index 60773d5b9ba..a9f822f0c78 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -425,8 +425,8 @@ class RecoDecay { array momTotal{0., 0., 0.}; // candidate momentum vector double energyTot{0.}; // candidate energy - for (auto iProng = 0; iProng < N; ++iProng) { - for (auto iMom = 0; iMom < 3; ++iMom) { + for (std::size_t iProng = 0; iProng < N; ++iProng) { + for (std::size_t iMom = 0; iMom < 3; ++iMom) { momTotal[iMom] += arrMom[iProng][iMom]; } // loop over momentum components energyTot += E(arrMom[iProng], arrMass[iProng]); @@ -505,7 +505,7 @@ class RecoDecay { auto decLenXY = distanceXY(posPV, posSV); double maxNormDeltaIP{0.}; - for (auto iProng = 0; iProng < N; ++iProng) { + for (std::size_t iProng = 0; iProng < N; ++iProng) { auto prongNormDeltaIP = normImpParMeasMinusExpProng(decLenXY, errDecLenXY, momMother, arrImpPar[iProng], arrErrImpPar[iProng], arrMom[iProng]); if (std::abs(prongNormDeltaIP) > std::abs(maxNormDeltaIP)) { @@ -723,7 +723,7 @@ class RecoDecay *sign = sgn; } // Loop over decay candidate prongs - for (auto iProng = 0; iProng < N; ++iProng) { + for (std::size_t iProng = 0; iProng < N; ++iProng) { auto particleI = arrDaughters[iProng].mcParticle(); // ith daughter particle arrDaughtersIndex[iProng] = particleI.globalIndex(); // Get the list of daughter indices from the mother of the first prong. @@ -746,7 +746,7 @@ class RecoDecay return -1; } // Check that the number of direct daughters is not larger than the number of expected final daughters. - if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > N) { + if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > int(N)) { //Printf("MC Rec: Rejected: too many direct daughters: %d (expected %ld final)", indexDaughterLast - indexDaughterFirst + 1, N); return -1; } @@ -766,7 +766,7 @@ class RecoDecay // Check that the daughter is in the list of final daughters. // (Check that the daughter is not a stepdaughter, i.e. particle pointing to the mother while not being its daughter.) bool isDaughterFound = false; // Is the index of this prong among the remaining expected indices of daughters? - for (auto iD = 0; iD < arrAllDaughtersIndex.size(); ++iD) { + for (std::size_t iD = 0; iD < arrAllDaughtersIndex.size(); ++iD) { if (arrDaughtersIndex[iProng] == arrAllDaughtersIndex[iD]) { arrAllDaughtersIndex[iD] = -1; // Remove this index from the array of expected daughters. (Rejects twin daughters, i.e. particle considered twice as a daughter.) isDaughterFound = true; @@ -781,7 +781,7 @@ class RecoDecay auto PDGParticleI = particleI.pdgCode(); // PDG code of the ith daughter //Printf("MC Rec: Daughter %d PDG: %d", iProng, PDGParticleI); bool isPDGFound = false; // Is the PDG code of this daughter among the remaining expected PDG codes? - for (auto iProngCp = 0; iProngCp < N; ++iProngCp) { + for (std::size_t iProngCp = 0; iProngCp < N; ++iProngCp) { if (PDGParticleI == sgn * arrPDGDaughters[iProngCp]) { arrPDGDaughters[iProngCp] = 0; // Remove this PDG code from the array of expected ones. isPDGFound = true; @@ -866,7 +866,7 @@ class RecoDecay return false; } // Check that the number of direct daughters is not larger than the number of expected final daughters. - if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > N) { + if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > int(N)) { //Printf("MC Gen: Rejected: too many direct daughters: %d (expected %ld final)", indexDaughterLast - indexDaughterFirst + 1, N); return false; } @@ -888,7 +888,7 @@ class RecoDecay auto PDGCandidateDaughterI = candidateDaughterI.pdgCode(); // PDG code of the ith daughter //Printf("MC Gen: Daughter %d PDG: %d", indexDaughterI, PDGCandidateDaughterI); bool isPDGFound = false; // Is the PDG code of this daughter among the remaining expected PDG codes? - for (auto iProngCp = 0; iProngCp < N; ++iProngCp) { + for (std::size_t iProngCp = 0; iProngCp < N; ++iProngCp) { if (PDGCandidateDaughterI == sgn * arrPDGDaughters[iProngCp]) { arrPDGDaughters[iProngCp] = 0; // Remove this PDG code from the array of expected ones. isPDGFound = true; diff --git a/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx b/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx index 25b1edad835..791e38a4b1e 100644 --- a/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx @@ -77,7 +77,7 @@ struct HFCandidateCreator2Prong { } const auto& secondaryVertex = df.getPCACandidate(); auto chi2PCA = df.getChi2AtPCACandidate(); - auto covMatrixPCA = df.calcPCACovMatrix().Array(); + auto covMatrixPCA = df.calcPCACovMatrixFlat(); hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line. auto trackParVar0 = df.getTrack(0); auto trackParVar1 = df.getTrack(1); diff --git a/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx b/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx index d35febb1230..2251addf6e2 100644 --- a/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx @@ -84,7 +84,7 @@ struct HFCandidateCreator3Prong { } const auto& secondaryVertex = df.getPCACandidate(); auto chi2PCA = df.getChi2AtPCACandidate(); - auto covMatrixPCA = df.calcPCACovMatrix().Array(); + auto covMatrixPCA = df.calcPCACovMatrixFlat(); hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line. trackParVar0 = df.getTrack(0); trackParVar1 = df.getTrack(1); diff --git a/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx b/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx index 6f5d0234d95..be6fb5564be 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx @@ -130,7 +130,7 @@ struct HfCandidateCreatorBplus { auto trackD0 = o2::dataformats::V0(vertexD0, momentumD0, pCovMatrixD0, prong0TrackParCov, prong1TrackParCov, {0, 0}, {0, 0}); //loop over tracks for pi selection - auto count = 0; + //auto count = 0; for (auto& track : tracks) { //if(count % 100 == 0){ //LOGF(info, "Col: %d (cand); %d (track)", candidate.collisionId(), track.collisionId()); @@ -168,7 +168,7 @@ struct HfCandidateCreatorBplus { bfitter.getTrack(1).getPxPyPzGlo(pVecBach); //momentum of pi+ at the B+ vertex const auto& BSecVertex = bfitter.getPCACandidate(); auto chi2PCA = bfitter.getChi2AtPCACandidate(); - auto covMatrixPCA = bfitter.calcPCACovMatrix().Array(); + auto covMatrixPCA = bfitter.calcPCACovMatrixFlat(); hCovSVXX->Fill(covMatrixPCA[0]); //FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line. pVecBCand = RecoDecay::PVec(pVecD0, pVecBach); diff --git a/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx b/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx index 2fe0ef0bc1e..6818b79bd7e 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx @@ -48,7 +48,6 @@ using MyBigTracks = aod::BigTracks; /// Reconstruction of heavy-flavour cascade decay candidates struct HFCandidateCreatorCascade { - Produces rowCandidateBase; Configurable bZ{"bZ", 5., "magnetic field"}; @@ -138,7 +137,7 @@ struct HFCandidateCreatorCascade { const auto& secondaryVertex = df.getPCACandidate(); auto chi2PCA = df.getChi2AtPCACandidate(); - auto covMatrixPCA = df.calcPCACovMatrix().Array(); + auto covMatrixPCA = df.calcPCACovMatrixFlat(); hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line. // do I have to call "df.propagateTracksToVertex();"? auto trackParVarV0 = df.getTrack(0); @@ -240,11 +239,10 @@ struct HFCandidateCreatorCascadeMC { LOG(debug) << "\n"; LOG(debug) << "Checking MC for candidate!"; LOG(debug) << "Looking for K0s"; +#ifdef MY_DEBUG auto indexV0DaughPos = trackV0DaughPos.mcParticleId(); auto indexV0DaughNeg = trackV0DaughNeg.mcParticleId(); auto indexBach = bach.mcParticleId(); - -#ifdef MY_DEBUG bool isLc = isLcK0SpFunc(indexBach, indexV0DaughPos, indexV0DaughNeg, indexProton, indexK0Spos, indexK0Sneg); bool isK0SfromLc = isK0SfromLcFunc(indexV0DaughPos, indexV0DaughNeg, indexK0Spos, indexK0Sneg); #endif @@ -275,7 +273,7 @@ struct HFCandidateCreatorCascadeMC { // checking that the final daughters (decay depth = 3) are p, pi+, pi- RecoDecay::getDaughters(particlesMC, particle, &arrDaughLcIndex, arrDaughLcPDGRef, 3); // best would be to check the K0S daughters if (arrDaughLcIndex.size() == 3) { - for (auto iProng = 0; iProng < arrDaughLcIndex.size(); ++iProng) { + for (std::size_t iProng = 0; iProng < arrDaughLcIndex.size(); ++iProng) { auto daughI = particlesMC.iteratorAt(arrDaughLcIndex[iProng]); arrDaughLcPDG[iProng] = daughI.pdgCode(); } diff --git a/PWGHF/TableProducer/HFCandidateCreatorChic.cxx b/PWGHF/TableProducer/HFCandidateCreatorChic.cxx index 6741d2e9aa0..2237dd66f65 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorChic.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorChic.cxx @@ -150,7 +150,7 @@ struct HFCandidateCreatorChic { trackJpsi.propagateToDCA(primaryVertex, magneticField, &impactParameter0); // get uncertainty of the decay length - double phi, theta; + //double phi, theta; // getPointDirection(array{collision.posX(), collision.posY(), collision.posZ()}, ChicsecondaryVertex, phi, theta); //auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); //auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.)); @@ -211,7 +211,7 @@ struct HFCandidateCreatorChicMC { aod::ECALs const& ecals) { int indexRec = -1; - int8_t sign = 0; + //int8_t sign = 0; int8_t flag = 0; int8_t origin = 0; int8_t channel = 0; diff --git a/PWGHF/TableProducer/HFCandidateCreatorLb.cxx b/PWGHF/TableProducer/HFCandidateCreatorLb.cxx index f6e8b670464..6aec59a9f87 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorLb.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorLb.cxx @@ -135,7 +135,7 @@ struct HFCandidateCreatorLb { int index0Lc = track0.globalIndex(); int index1Lc = track1.globalIndex(); int index2Lc = track2.globalIndex(); - int charge = track0.sign() + track1.sign() + track2.sign(); + //int charge = track0.sign() + track1.sign() + track2.sign(); for (auto& trackPion : tracks) { if (trackPion.pt() < ptPionMin) { @@ -159,7 +159,7 @@ struct HFCandidateCreatorLb { // calculate relevant properties const auto& secondaryVertexLb = df2.getPCACandidate(); auto chi2PCA = df2.getChi2AtPCACandidate(); - auto covMatrixPCA = df2.calcPCACovMatrix().Array(); + auto covMatrixPCA = df2.calcPCACovMatrixFlat(); df2.propagateTracksToVertex(); df2.getTrack(0).getPxPyPzGlo(pvecLc); diff --git a/PWGHF/TableProducer/HFCandidateCreatorX.cxx b/PWGHF/TableProducer/HFCandidateCreatorX.cxx index 3fe4524cb30..5f1d3c95ca8 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorX.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorX.cxx @@ -175,7 +175,7 @@ struct HFCandidateCreatorX { // calculate relevant properties const auto& XsecondaryVertex = df3.getPCACandidate(); auto chi2PCA = df3.getChi2AtPCACandidate(); - auto covMatrixPCA = df3.calcPCACovMatrix().Array(); + auto covMatrixPCA = df3.calcPCACovMatrixFlat(); hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line. df3.propagateTracksToVertex(); // propagate the pions and Jpsi to the X vertex diff --git a/PWGHF/TableProducer/HFCandidateCreatorXicc.cxx b/PWGHF/TableProducer/HFCandidateCreatorXicc.cxx index 7226e9b8ba1..a60ef3649ee 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorXicc.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorXicc.cxx @@ -147,7 +147,7 @@ struct HfCandidateCreatorXicc { // calculate relevant properties const auto& secondaryVertexXicc = df2.getPCACandidate(); auto chi2PCA = df2.getChi2AtPCACandidate(); - auto covMatrixPCA = df2.calcPCACovMatrix().Array(); + auto covMatrixPCA = df2.calcPCACovMatrixFlat(); df2.propagateTracksToVertex(); df2.getTrack(0).getPxPyPzGlo(pvecxic); diff --git a/PWGHF/TableProducer/HFD0CandidateSelectorALICE3Forward.cxx b/PWGHF/TableProducer/HFD0CandidateSelectorALICE3Forward.cxx index c5f7165b58b..7fa6a89256f 100644 --- a/PWGHF/TableProducer/HFD0CandidateSelectorALICE3Forward.cxx +++ b/PWGHF/TableProducer/HFD0CandidateSelectorALICE3Forward.cxx @@ -215,8 +215,8 @@ struct HFD0CandidateSelectorALICE3Forward { auto trackPos = candidate.index0_as(); auto trackNeg = candidate.index1_as(); - auto momentumPosTrack = trackPos.p(); - auto momentumNegTrack = trackNeg.p(); + //auto momentumPosTrack = trackPos.p(); + //auto momentumNegTrack = trackNeg.p(); bool topolD0 = selectionTopolConjugate(candidate, trackPos, trackNeg); bool topolD0bar = selectionTopolConjugate(candidate, trackNeg, trackPos); @@ -226,9 +226,9 @@ struct HFD0CandidateSelectorALICE3Forward { continue; } - float nsigmaTOFNegKaon = -5000.0; + //float nsigmaTOFNegKaon = -5000.0; float nsigmaRICHNegKaon = -5000.0; - float nsigmaTOFPosPion = -5000.0; + //float nsigmaTOFPosPion = -5000.0; float nsigmaRICHPosPion = -5000.0; if (trackPos.has_frich()) { @@ -239,8 +239,8 @@ struct HFD0CandidateSelectorALICE3Forward { nsigmaRICHNegKaon = trackNeg.frich().frichNsigmaKa(); } - bool selectPionTOFplusRICH = false; - bool selectKaonTOFplusRICH = false; + //bool selectPionTOFplusRICH = false; + //bool selectKaonTOFplusRICH = false; if (topolD0) { statusD0NoPID = 1; diff --git a/PWGHF/TableProducer/HFD0CandidateSelectorparametrizedPID.cxx b/PWGHF/TableProducer/HFD0CandidateSelectorparametrizedPID.cxx index 0641c3d56e7..1a72754c428 100644 --- a/PWGHF/TableProducer/HFD0CandidateSelectorparametrizedPID.cxx +++ b/PWGHF/TableProducer/HFD0CandidateSelectorparametrizedPID.cxx @@ -217,8 +217,8 @@ struct HFD0CandidateSelectorparametrizedPID { auto trackPos = candidate.index0_as(); auto trackNeg = candidate.index1_as(); - auto momentumPosTrack = trackPos.p(); - auto momentumNegTrack = trackNeg.p(); + //auto momentumPosTrack = trackPos.p(); + //auto momentumNegTrack = trackNeg.p(); auto ptPosTrack = trackPos.pt(); auto ptNegTrack = trackNeg.pt(); auto etaPosTrack = std::abs(trackPos.eta()); diff --git a/PWGHF/TableProducer/HFLcK0sPCandidateSelector.cxx b/PWGHF/TableProducer/HFLcK0sPCandidateSelector.cxx index 92b2bfa3677..d732a113b03 100644 --- a/PWGHF/TableProducer/HFLcK0sPCandidateSelector.cxx +++ b/PWGHF/TableProducer/HFLcK0sPCandidateSelector.cxx @@ -311,7 +311,7 @@ struct HFLcK0sPCandidateSelector { } else { statusTOF = -1; //no PID info } - + if (statusTPC == 2 || statusTOF == 2) { return 1; //what if we have 2 && 0 ? } else if (statusTPC == 1 && statusTOF == 1) { @@ -327,9 +327,9 @@ struct HFLcK0sPCandidateSelector { void process(aod::HfCandCascade const& candidates, MyBigTracks const& tracks) { int statusLc = 0; // final selection flag : 0-rejected 1-accepted - bool topolLc = 0; + //bool topolLc = 0; int pidProton = -1; - int pidLc = -1; + //int pidLc = -1; for (auto& candidate : candidates) { //looping over cascade candidates @@ -352,7 +352,7 @@ struct HFLcK0sPCandidateSelector { } */ - topolLc = true; + //topolLc = true; pidProton = -1; // daughter track validity selection diff --git a/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx b/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx index eb60e00bd28..d13e1274e47 100644 --- a/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx +++ b/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx @@ -336,14 +336,14 @@ struct HfTagSelTracks { MY_DEBUG_MSG(isProtonFromLc, LOG(info) << "\nWe found the proton " << indexBach); int statusProng = BIT(CandidateType::NCandidateTypes) - 1; // selection flag , all bits on - bool cutStatus[CandidateType::NCandidateTypes][nCuts]; - if (debug) { - for (int iCandType = 0; iCandType < CandidateType::NCandidateTypes; iCandType++) { - for (int iCut = 0; iCut < nCuts; iCut++) { - cutStatus[iCandType][iCut] = true; - } - } - } + //bool cutStatus[CandidateType::NCandidateTypes][nCuts]; + //if (debug) { + // for (int iCandType = 0; iCandType < CandidateType::NCandidateTypes; iCandType++) { + // for (int iCut = 0; iCut < nCuts; iCut++) { + // cutStatus[iCandType][iCut] = true; + // } + // } + //} auto trackPt = track.pt(); auto trackEta = track.eta(); @@ -357,7 +357,7 @@ struct HfTagSelTracks { if (trackPt < pTMinTrack2Prong) { CLRBIT(statusProng, CandidateType::Cand2Prong); // set the nth bit to 0 if (debug) { - cutStatus[CandidateType::Cand2Prong][0] = false; + //cutStatus[CandidateType::Cand2Prong][0] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); } @@ -366,7 +366,7 @@ struct HfTagSelTracks { if (trackPt < pTMinTrack3Prong) { CLRBIT(statusProng, CandidateType::Cand3Prong); if (debug) { - cutStatus[CandidateType::Cand3Prong][0] = false; + //cutStatus[CandidateType::Cand3Prong][0] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); } @@ -377,7 +377,7 @@ struct HfTagSelTracks { if (trackPt < ptMinTrackBach) { CLRBIT(statusProng, CandidateType::CandV0bachelor); if (debug) { - cutStatus[CandidateType::CandV0bachelor][0] = false; + //cutStatus[CandidateType::CandV0bachelor][0] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); } @@ -389,7 +389,7 @@ struct HfTagSelTracks { if ((debug || TESTBIT(statusProng, CandidateType::Cand2Prong)) && std::abs(trackEta) > etaMax2Prong) { CLRBIT(statusProng, CandidateType::Cand2Prong); if (debug) { - cutStatus[CandidateType::Cand2Prong][1] = false; + //cutStatus[CandidateType::Cand2Prong][1] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); } @@ -398,7 +398,7 @@ struct HfTagSelTracks { if ((debug || TESTBIT(statusProng, CandidateType::Cand3Prong)) && std::abs(trackEta) > etaMax3Prong) { CLRBIT(statusProng, CandidateType::Cand3Prong); if (debug) { - cutStatus[CandidateType::Cand3Prong][1] = false; + //cutStatus[CandidateType::Cand3Prong][1] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); } @@ -409,7 +409,7 @@ struct HfTagSelTracks { if ((debug || TESTBIT(statusProng, CandidateType::CandV0bachelor)) && std::abs(trackEta) > etaMaxBach) { CLRBIT(statusProng, CandidateType::CandV0bachelor); if (debug) { - cutStatus[CandidateType::CandV0bachelor][1] = false; + //cutStatus[CandidateType::CandV0bachelor][1] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); } @@ -429,7 +429,7 @@ struct HfTagSelTracks { MY_DEBUG_MSG(isProtonFromLc, LOG(info) << "proton " << indexBach << " did not pass clusters cut"); if (debug) { for (int iCandType = 0; iCandType < CandidateType::NCandidateTypes; iCandType++) { - cutStatus[iCandType][2] = false; + //cutStatus[iCandType][2] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * iCandType + iDebugCut); } @@ -445,7 +445,7 @@ struct HfTagSelTracks { if ((debug || TESTBIT(statusProng, CandidateType::Cand2Prong)) && !isSelectedTrack(track, dca, CandidateType::Cand2Prong)) { CLRBIT(statusProng, CandidateType::Cand2Prong); if (debug) { - cutStatus[CandidateType::Cand2Prong][3] = false; + //cutStatus[CandidateType::Cand2Prong][3] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand2Prong + iDebugCut); } @@ -454,7 +454,7 @@ struct HfTagSelTracks { if ((debug || TESTBIT(statusProng, CandidateType::Cand3Prong)) && !isSelectedTrack(track, dca, CandidateType::Cand3Prong)) { CLRBIT(statusProng, CandidateType::Cand3Prong); if (debug) { - cutStatus[CandidateType::Cand3Prong][3] = false; + //cutStatus[CandidateType::Cand3Prong][3] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::Cand3Prong + iDebugCut); } @@ -463,7 +463,7 @@ struct HfTagSelTracks { if ((debug || TESTBIT(statusProng, CandidateType::CandV0bachelor)) && !isSelectedTrack(track, dca, CandidateType::CandV0bachelor)) { CLRBIT(statusProng, CandidateType::CandV0bachelor); if (debug) { - cutStatus[CandidateType::CandV0bachelor][3] = false; + //cutStatus[CandidateType::CandV0bachelor][3] = false; if (fillHistograms) { registry.fill(HIST("hRejTracks"), (nCuts + 1) * CandidateType::CandV0bachelor + iDebugCut); } @@ -645,7 +645,7 @@ struct HfTrackIndexSkimsCreator { } return true; }; - static bool initIndex = cacheIndices(cut2Prong, massMinIndex, massMaxIndex, d0d0Index); + cacheIndices(cut2Prong, massMinIndex, massMaxIndex, d0d0Index); auto arrMom = array{ array{hfTrack0.pxProng(), hfTrack0.pyProng(), hfTrack0.pzProng()}, @@ -724,7 +724,7 @@ struct HfTrackIndexSkimsCreator { } return true; }; - static bool initIndex = cacheIndices(cut3Prong, massMinIndex, massMaxIndex); + cacheIndices(cut3Prong, massMinIndex, massMaxIndex); auto arrMom = array{ array{hfTrack0.pxProng(), hfTrack0.pyProng(), hfTrack0.pzProng()}, @@ -791,7 +791,7 @@ struct HfTrackIndexSkimsCreator { } return true; }; - static bool initIndex = cacheIndices(cut2Prong, cospIndex); + cacheIndices(cut2Prong, cospIndex); for (int iDecay2P = 0; iDecay2P < n2ProngDecays; iDecay2P++) { @@ -842,7 +842,7 @@ struct HfTrackIndexSkimsCreator { } return true; }; - static bool initIndex = cacheIndices(cut3Prong, cospIndex, decLenIndex); + cacheIndices(cut3Prong, cospIndex, decLenIndex); for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { diff --git a/PWGHF/Tasks/HFMCValidation.cxx b/PWGHF/Tasks/HFMCValidation.cxx index b1dd76ed64d..7f12529cfd7 100644 --- a/PWGHF/Tasks/HFMCValidation.cxx +++ b/PWGHF/Tasks/HFMCValidation.cxx @@ -99,14 +99,14 @@ struct ValidationGenLevel { listDaughters.clear(); // Checking the decay of the particles and the momentum conservation - for (int iD = 0; iD < PDGArrayParticle.size(); iD++) { + for (std::size_t iD = 0; iD < PDGArrayParticle.size(); iD++) { if (std::abs(particlePdgCode) == PDGArrayParticle[iD]) { RecoDecay::getDaughters(particlesMC, particle, &listDaughters, arrPDGFinal[iD], -1); - int arrayPDGsize = arrPDGFinal[iD].size() - std::count(arrPDGFinal[iD].begin(), arrPDGFinal[iD].end(), 0); + std::size_t arrayPDGsize = arrPDGFinal[iD].size() - std::count(arrPDGFinal[iD].begin(), arrPDGFinal[iD].end(), 0); if (listDaughters.size() == arrayPDGsize) { counter[iD]++; } - for (int i = 0; i < listDaughters.size(); i++) { + for (std::size_t i = 0; i < listDaughters.size(); i++) { auto daughter = particlesMC.iteratorAt(listDaughters.at(i)); sumPxDau += daughter.px(); sumPyDau += daughter.py(); @@ -166,7 +166,6 @@ struct ValidationRecLevel { void process(soa::Filtered> const& candidates, aod::BigTracksMC const& tracks, aod::McParticles const& particlesMC) { int indexParticle = 0; - double pxDiff, pyDiff, pzDiff, pDiff; double decayLength; for (auto& candidate : candidates) { if (!(candidate.hfflag() & 1 << hf_cand_prong2::DecayType::D0ToPiK)) { diff --git a/PWGHF/Tasks/HFSelOptimisation.cxx b/PWGHF/Tasks/HFSelOptimisation.cxx index 89a1f59c691..f406380ca0a 100644 --- a/PWGHF/Tasks/HFSelOptimisation.cxx +++ b/PWGHF/Tasks/HFSelOptimisation.cxx @@ -184,31 +184,31 @@ struct HfSelOptimisation { histPt2Prong[candOrig][candType]->Fill(pT); - for (int iCospCut{0}; iCospCut < cutsToTestCosp->size(); ++iCospCut) { + for (std::size_t iCospCut{0}; iCospCut < cutsToTestCosp->size(); ++iCospCut) { if (candidate.cpa() > cutsToTestCosp->at(iCospCut)) { histCospVsPt2Prong[candOrig][candType]->Fill(pT, iCospCut + 1); } } - for (int iDecLenCut{0}; iDecLenCut < cutsToTestDecLen->size(); ++iDecLenCut) { + for (std::size_t iDecLenCut{0}; iDecLenCut < cutsToTestDecLen->size(); ++iDecLenCut) { if (candidate.decayLength() > cutsToTestDecLen->at(iDecLenCut)) { histDecLenVsPt2Prong[candOrig][candType]->Fill(pT, iDecLenCut + 1); } } - for (int iImpParProd{0}; iImpParProd < cutsToTestImpParProd->size(); ++iImpParProd) { + for (std::size_t iImpParProd{0}; iImpParProd < cutsToTestImpParProd->size(); ++iImpParProd) { if (candidate.impactParameterProduct() < cutsToTestImpParProd->at(iImpParProd)) { histImpParProdVsPt2Prong[candOrig][candType]->Fill(pT, iImpParProd + 1); } } - for (int iMinDCAxy{0}; iMinDCAxy < cutsToTestMinDCAxy->size(); ++iMinDCAxy) { + for (std::size_t iMinDCAxy{0}; iMinDCAxy < cutsToTestMinDCAxy->size(); ++iMinDCAxy) { if (absDCA[0] > cutsToTestMinDCAxy->at(iMinDCAxy)) { histMinDCAxyVsPt2Prong[candOrig][candType]->Fill(pT, iMinDCAxy + 1); } } - for (int iMinTrackPt{0}; iMinTrackPt < cutsToTestMinTrackPt->size(); ++iMinTrackPt) { + for (std::size_t iMinTrackPt{0}; iMinTrackPt < cutsToTestMinTrackPt->size(); ++iMinTrackPt) { if (ptTrack[0] > cutsToTestMinTrackPt->at(iMinTrackPt)) { histMinTrackPtVsPt2Prong[candOrig][candType]->Fill(pT, iMinTrackPt + 1); } @@ -232,25 +232,25 @@ struct HfSelOptimisation { histPt3Prong[candOrig][candType]->Fill(pT); - for (int iCospCut{0}; iCospCut < cutsToTestCosp->size(); ++iCospCut) { + for (std::size_t iCospCut{0}; iCospCut < cutsToTestCosp->size(); ++iCospCut) { if (candidate.cpa() > cutsToTestCosp->at(iCospCut)) { histCospVsPt3Prong[candOrig][candType]->Fill(pT, iCospCut + 1); } } - for (int iDecLenCut{0}; iDecLenCut < cutsToTestDecLen->size(); ++iDecLenCut) { + for (std::size_t iDecLenCut{0}; iDecLenCut < cutsToTestDecLen->size(); ++iDecLenCut) { if (candidate.decayLength() > cutsToTestDecLen->at(iDecLenCut)) { histDecLenVsPt3Prong[candOrig][candType]->Fill(pT, iDecLenCut + 1); } } - for (int iMinDCAxy{0}; iMinDCAxy < cutsToTestMinDCAxy->size(); ++iMinDCAxy) { + for (std::size_t iMinDCAxy{0}; iMinDCAxy < cutsToTestMinDCAxy->size(); ++iMinDCAxy) { if (absDCA[0] > cutsToTestMinDCAxy->at(iMinDCAxy)) { histMinDCAxyVsPt3Prong[candOrig][candType]->Fill(pT, iMinDCAxy + 1); } } - for (int iMinTrackPt{0}; iMinTrackPt < cutsToTestMinTrackPt->size(); ++iMinTrackPt) { + for (std::size_t iMinTrackPt{0}; iMinTrackPt < cutsToTestMinTrackPt->size(); ++iMinTrackPt) { if (ptTrack[0] > cutsToTestMinTrackPt->at(iMinTrackPt)) { histMinTrackPtVsPt3Prong[candOrig][candType]->Fill(pT, iMinTrackPt + 1); } diff --git a/PWGHF/Tasks/qaPidRejection.cxx b/PWGHF/Tasks/qaPidRejection.cxx index c8a62ca967b..872492f5ec0 100644 --- a/PWGHF/Tasks/qaPidRejection.cxx +++ b/PWGHF/Tasks/qaPidRejection.cxx @@ -377,9 +377,9 @@ struct QaRejectionGeneral { } bool isRICHhpElectron = !(selectorElectron.getStatusTrackPIDRICH(track) == TrackSelectorPID::Status::PIDRejected); - bool isRICHhpPion = !(selectorPion.getStatusTrackPIDRICH(track) == TrackSelectorPID::Status::PIDRejected); - bool isRICHhpKaon = !(selectorKaon.getStatusTrackPIDRICH(track) == TrackSelectorPID::Status::PIDRejected); - bool isRICHhpProton = !(selectorProton.getStatusTrackPIDRICH(track) == TrackSelectorPID::Status::PIDRejected); + //bool isRICHhpPion = !(selectorPion.getStatusTrackPIDRICH(track) == TrackSelectorPID::Status::PIDRejected); + //bool isRICHhpKaon = !(selectorKaon.getStatusTrackPIDRICH(track) == TrackSelectorPID::Status::PIDRejected); + //bool isRICHhpProton = !(selectorProton.getStatusTrackPIDRICH(track) == TrackSelectorPID::Status::PIDRejected); bool isMIDhpMuon = (selectorMuon.getStatusTrackPIDMID(track) == TrackSelectorPID::Status::PIDAccepted); bool isRICHElLoose = isRICHhpElectron; diff --git a/PWGHF/Tasks/taskD0ALICE3Forward.cxx b/PWGHF/Tasks/taskD0ALICE3Forward.cxx index b32c52da9a9..57a98a22e23 100644 --- a/PWGHF/Tasks/taskD0ALICE3Forward.cxx +++ b/PWGHF/Tasks/taskD0ALICE3Forward.cxx @@ -58,7 +58,7 @@ struct TaskD0ALICE3ForwardMC { } auto massD0 = InvMassD0(candidate); - auto massD0bar = InvMassD0bar(candidate); + //auto massD0bar = InvMassD0bar(candidate); auto ptCandidate = candidate.pt(); auto rapidityCandidate = std::abs(YD0(candidate)); diff --git a/PWGHF/Tasks/taskD0parametrizedPID.cxx b/PWGHF/Tasks/taskD0parametrizedPID.cxx index 758499d8183..4fc623c25ab 100644 --- a/PWGHF/Tasks/taskD0parametrizedPID.cxx +++ b/PWGHF/Tasks/taskD0parametrizedPID.cxx @@ -63,9 +63,9 @@ struct TaskD0parametrizedPIDMC { { //float ncontributor = collision.numContrib(); for (auto& candidate : candidates) { - /*if (ncontributor<=centralitySelectionMin && ncontributor>centralitySelectionMax) { - continue; - }*/ + //if (ncontributor<=centralitySelectionMin && ncontributor>centralitySelectionMax) { + // continue; + //} if (!(candidate.hfflag() & 1 << DecayType::D0ToPiK)) { continue; } @@ -74,7 +74,7 @@ struct TaskD0parametrizedPIDMC { } auto massD0 = InvMassD0(candidate); - auto massD0bar = InvMassD0bar(candidate); + //auto massD0bar = InvMassD0bar(candidate); auto ptCandidate = candidate.pt(); auto rapidityCandidate = std::abs(YD0(candidate)); @@ -110,9 +110,9 @@ struct TaskD0parametrizedPIDMC { } for (auto& particle : particlesMC) { - /*if (ncontributor<=centralitySelectionMin && ncontributor>centralitySelectionMax) { - continue; - }*/ + //if (ncontributor<=centralitySelectionMin && ncontributor>centralitySelectionMax) { + // continue; + //} if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::D0ToPiK) { if (std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { continue;