diff --git a/Common/TableProducer/eventSelection.cxx b/Common/TableProducer/eventSelection.cxx index 3c989f1848a..51a6292a02f 100644 --- a/Common/TableProducer/eventSelection.cxx +++ b/Common/TableProducer/eventSelection.cxx @@ -1363,7 +1363,7 @@ struct LumiTask { const char* srun = Form("%d", run); for (const auto& bc : bcs) { - auto& selection = bc.selection_raw(); + auto selection = bc.selection_raw(); if (bcPatternB[bc.globalBC() % nBCsPerOrbit] == 0) // skip non-colliding bcs continue; diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index 69fea11d5c9..9fa2c9d1d5c 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -505,7 +505,7 @@ struct HfCandidateCreatorXicToXiPiPi { // create KFParticle KFParticle kfXi; float massXi = casc.mXi(); - kfXi.Create(parPosMom, casc.kfTrackCovMat(), casc.sign(), massXi); + kfXi.Create(parPosMom, casc.kfTrackCovMat().data(), casc.sign(), massXi); if (useXiMassConstraint) { kfXi.SetNonlinearMassConstraint(MassXiMinus); } diff --git a/PWGHF/TableProducer/derivedDataCreatorB0ToDPi.cxx b/PWGHF/TableProducer/derivedDataCreatorB0ToDPi.cxx index 0dda7288169..cf13e7492de 100644 --- a/PWGHF/TableProducer/derivedDataCreatorB0ToDPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorB0ToDPi.cxx @@ -124,7 +124,7 @@ struct HfDerivedDataCreatorB0ToDPi { template void fillTablesCandidate(const T& candidate, const U& prongCharm, const V& prongBachelor, int candFlag, double invMass, - double ct, double y, int8_t flagMc, int8_t origin, float mlScore, const std::vector& mlScoresCharm) + double ct, double y, int8_t flagMc, int8_t origin, float mlScore, std::vector& mlScoresCharm) { rowsCommon.fillTablesCandidate(candidate, invMass, y); if (fillCandidatePar) { diff --git a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx index abaf1573166..9122addfbe5 100644 --- a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx @@ -124,7 +124,7 @@ struct HfDerivedDataCreatorBplusToD0Pi { template void fillTablesCandidate(const T& candidate, const U& prongCharm, const V& prongBachelor, int candFlag, double invMass, - double ct, double y, int8_t flagMc, int8_t origin, float mlScore, const std::vector& mlScoresCharm) + double ct, double y, int8_t flagMc, int8_t origin, float mlScore, std::vector& mlScoresCharm) { rowsCommon.fillTablesCandidate(candidate, invMass, y); if (fillCandidatePar) { diff --git a/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx index 8ddc3d4464f..54f4d3d7d93 100644 --- a/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx @@ -136,7 +136,7 @@ struct HfDerivedDataCreatorD0ToKPi { template void fillTablesCandidate(const T& candidate, int candFlag, double invMass, double cosThetaStar, double topoChi2, - double ct, double y, int8_t flagMc, int8_t origin, const std::vector& mlScores) + double ct, double y, int8_t flagMc, int8_t origin, std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); if (fillCandidatePar) { diff --git a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx index 6897b30ec0e..bf47279c297 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx @@ -117,7 +117,7 @@ struct HfDerivedDataCreatorDplusToPiKPi { template void fillTablesCandidate(const T& candidate, int candFlag, double invMass, - double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, const std::vector& mlScores) + double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); if (fillCandidatePar) { diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index 7c592e9ccb1..e5f7ad47794 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -113,7 +113,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { template void fillTablesCandidate(const T& candidate, const U& prong0, const U& prong1, const U& prongSoftPi, int candFlag, double invMass, - double y, int8_t flagMc, int8_t origin, const std::vector& mlScores) + double y, int8_t flagMc, int8_t origin, std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); if (fillCandidatePar) { diff --git a/PWGHF/TableProducer/derivedDataCreatorLcToPKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorLcToPKPi.cxx index a956d4ff202..d6993f6c25b 100644 --- a/PWGHF/TableProducer/derivedDataCreatorLcToPKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorLcToPKPi.cxx @@ -117,7 +117,7 @@ struct HfDerivedDataCreatorLcToPKPi { template void fillTablesCandidate(const T& candidate, int candFlag, double invMass, - double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, const std::vector& mlScores) + double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); if (fillCandidatePar) { diff --git a/PWGLF/DataModel/LFStrangenessTables.h b/PWGLF/DataModel/LFStrangenessTables.h index 3ee36c7c54a..28268cd0565 100644 --- a/PWGLF/DataModel/LFStrangenessTables.h +++ b/PWGLF/DataModel/LFStrangenessTables.h @@ -1183,11 +1183,11 @@ DECLARE_SOA_COLUMN(BachX, bachX, float); //! bachelor track X at min // REGULAR COLUMNS FOR CASCCOVS // Saved from finding: covariance matrix of parent track (on request) DECLARE_SOA_DYNAMIC_COLUMN(PositionCovMat, positionCovMat, //! for transparent handling - [](const float covMat[21]) -> std::vector { + [](std::span covMat) -> std::vector { std::vector posCovMat { covMat[0], covMat[1], covMat[2], covMat[3], covMat[4], covMat[5] }; return posCovMat; }); DECLARE_SOA_DYNAMIC_COLUMN(MomentumCovMat, momentumCovMat, //! for transparent handling - [](const float covMat[21]) -> std::vector { + [](std::span covMat) -> std::vector { std::vector momCovMat { covMat[9], covMat[13], covMat[14], covMat[18], covMat[19], covMat[20] }; return momCovMat; }); DECLARE_SOA_COLUMN(KFTrackCovMat, kfTrackCovMat, float[21]); //! covariance matrix elements for KF method (Cascade) diff --git a/PWGUD/Core/UDHelpers.h b/PWGUD/Core/UDHelpers.h index 4b692f7c5c1..da1544e9d87 100644 --- a/PWGUD/Core/UDHelpers.h +++ b/PWGUD/Core/UDHelpers.h @@ -316,16 +316,14 @@ float FT0AmplitudeC(TFT0 ft0) template float FDDAmplitudeA(TFDD fdd) { - std::vector ampsA(fdd.chargeA(), fdd.chargeA() + 8); - return std::accumulate(ampsA.begin(), ampsA.end(), 0); + return std::accumulate(fdd.chargeA().begin(), fdd.chargeA().end(), 0); } // ----------------------------------------------------------------------------- template float FDDAmplitudeC(TFDD fdd) { - std::vector ampsC(fdd.chargeC(), fdd.chargeC() + 8); - return std::accumulate(ampsC.begin(), ampsC.end(), 0); + return std::accumulate(fdd.chargeC().begin(), fdd.chargeC().end(), 0); } // -----------------------------------------------------------------------------