diff --git a/PWGHF/D2H/TableProducer/candidateCreatorB0Reduced.cxx b/PWGHF/D2H/TableProducer/candidateCreatorB0Reduced.cxx index 49cff73feea..d9cb0879321 100644 --- a/PWGHF/D2H/TableProducer/candidateCreatorB0Reduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateCreatorB0Reduced.cxx @@ -210,7 +210,7 @@ struct HfCandidateCreatorB0Reduced { trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaBachPion); // get uncertainty of the decay length - float phi, theta; + float phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB0, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); @@ -314,7 +314,7 @@ struct HfCandidateCreatorB0Reduced { trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion); // get uncertainty of the decay length - float phi, theta; + float phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB0, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx b/PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx index 444ee4b1afe..6964fc78ee6 100644 --- a/PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx @@ -259,7 +259,7 @@ struct HfCandidateCreatorBToJpsiReduced { trackParCovLf0.propagateToDCA(primaryVertex, bz, &dcaKaon); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBplus, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); @@ -332,7 +332,7 @@ struct HfCandidateCreatorBToJpsiReduced { trackParCovLf1.propagateToDCA(primaryVertex, bz, &dcaTrackLf1); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBs, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx b/PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx index a5f5ba5779b..ac63333e21c 100644 --- a/PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx @@ -184,7 +184,7 @@ struct HfCandidateCreatorBplusReduced { trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBplus, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/D2H/TableProducer/candidateCreatorBsReduced.cxx b/PWGHF/D2H/TableProducer/candidateCreatorBsReduced.cxx index 3317b7383fa..8d49ab9656d 100644 --- a/PWGHF/D2H/TableProducer/candidateCreatorBsReduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateCreatorBsReduced.cxx @@ -184,7 +184,7 @@ struct HfCandidateCreatorBsReduced { trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion); // get uncertainty of the decay length - float phi, theta; + float phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx b/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx index 46fd5998702..b1affb1cbac 100644 --- a/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateCreatorCharmResoReduced.cxx @@ -450,7 +450,7 @@ struct HfCandidateCreatorCharmResoReduced { registry.fill(HIST("hMassV0DauVsPt"), invMassV0Tr, candV0Tr.pt()); } } else if constexpr (DType == DMesonType::Dstar) { - float invMassD0; + float invMassD0{}; if (candD.sign() > 0) { invMassD = candD.invMassDstar(); invMassD0 = candD.invMassD0(); diff --git a/PWGHF/D2H/TableProducer/candidateCreatorLbReduced.cxx b/PWGHF/D2H/TableProducer/candidateCreatorLbReduced.cxx index 77b9457ecb2..17c9948bc5b 100644 --- a/PWGHF/D2H/TableProducer/candidateCreatorLbReduced.cxx +++ b/PWGHF/D2H/TableProducer/candidateCreatorLbReduced.cxx @@ -204,7 +204,7 @@ struct HfCandidateCreatorLbReduced { trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion); // get uncertainty of the decay length - float phi, theta; + float phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexLb, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx index 1975df6dd4d..880fd3f62e5 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx @@ -209,12 +209,12 @@ struct HfDataCreatorCharmHadPiReduced { o2::hf_evsel::HfEventSelectionMc hfEvSelMc; // CCDB service - Service ccdb; + Service ccdb{}; o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; int runNumber{}; // O2DatabasePDG service - Service pdg; + Service pdg{}; double massC{0.}; double massB{0.}; diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoToD0Reduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoToD0Reduced.cxx index 5815c9cbedd..b825a362cad 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoToD0Reduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoToD0Reduced.cxx @@ -102,7 +102,7 @@ struct HfDataCreatorCharmResoToD0Reduced { // CCDB service o2::ccdb::CcdbApi ccdbApi; - Service ccdb; + Service ccdb{}; double bz{0.}; int runNumber{0}; // needed to detect if the run changed and trigger update of calibrations etc. @@ -111,7 +111,7 @@ struct HfDataCreatorCharmResoToD0Reduced { o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; // O2DatabasePDG service - Service pdg; + Service pdg{}; // vertex fitter o2::vertexing::DCAFitterN<2> fitter; diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDplusReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDplusReduced.cxx index 597b49845c1..d0f90836449 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDplusReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDplusReduced.cxx @@ -102,7 +102,7 @@ struct HfDataCreatorCharmResoToDplusReduced { // CCDB service o2::ccdb::CcdbApi ccdbApi; - Service ccdb; + Service ccdb{}; double bz{0.}; int runNumber{0}; // needed to detect if the run changed and trigger update of calibrations etc. @@ -111,7 +111,7 @@ struct HfDataCreatorCharmResoToDplusReduced { o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; // O2DatabasePDG service - Service pdg; + Service pdg{}; // vertex fitter o2::vertexing::DCAFitterN<2> fitter; diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDstarReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDstarReduced.cxx index 785b8986eee..6a3829ec1b6 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDstarReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmResoToDstarReduced.cxx @@ -101,7 +101,7 @@ struct HfDataCreatorCharmResoToDstarReduced { // CCDB service o2::ccdb::CcdbApi ccdbApi; - Service ccdb; + Service ccdb{}; double bz{0.}; int runNumber{0}; // needed to detect if the run changed and trigger update of calibrations etc. @@ -110,7 +110,7 @@ struct HfDataCreatorCharmResoToDstarReduced { o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; // O2DatabasePDG service - Service pdg; + Service pdg{}; // vertex fitter o2::vertexing::DCAFitterN<2> fitter; diff --git a/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx index 7a991f3adad..d86318c7b2a 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx @@ -192,9 +192,9 @@ struct HfDataCreatorJpsiHadReduced { TrackSelectorEl selectorElectron; // CCDB service - Service ccdb; + Service ccdb{}; // O2DatabasePDG service - Service pdg; + Service pdg{}; using TracksPid = soa::Join; using TracksPidWithSel = soa::Join; diff --git a/PWGHF/D2H/Tasks/taskB0.cxx b/PWGHF/D2H/Tasks/taskB0.cxx index 4fe85452d27..ca89758c2b9 100644 --- a/PWGHF/D2H/Tasks/taskB0.cxx +++ b/PWGHF/D2H/Tasks/taskB0.cxx @@ -64,7 +64,7 @@ struct HfTaskB0 { Configurable checkDecayTypeMc{"checkDecayTypeMc", false, "Flag to enable DecayType histogram"}; // O2DatabasePDG service - Service pdg; + Service pdg{}; using TracksWithSel = soa::Join; diff --git a/PWGHF/D2H/Tasks/taskBplus.cxx b/PWGHF/D2H/Tasks/taskBplus.cxx index 75712e018f0..f3223f55eba 100644 --- a/PWGHF/D2H/Tasks/taskBplus.cxx +++ b/PWGHF/D2H/Tasks/taskBplus.cxx @@ -70,7 +70,7 @@ struct HfTaskBplus { Configurable> binsPt{"binsPt", std::vector{hf_cuts_bplus_to_d0_pi::vecBinsPt}, "pT bin limits"}; // O2DatabasePDG service - Service pdg; + Service pdg{}; Partition> selectedBPlusCandidates = aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= selectionFlagBplus; Partition> selectedBPlusCandidatesMC = aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= selectionFlagBplus; diff --git a/PWGHF/D2H/Tasks/taskBs.cxx b/PWGHF/D2H/Tasks/taskBs.cxx index b6beb8844ee..46b4dacec14 100644 --- a/PWGHF/D2H/Tasks/taskBs.cxx +++ b/PWGHF/D2H/Tasks/taskBs.cxx @@ -64,7 +64,7 @@ struct HfTaskBs { // MC checks Configurable checkDecayTypeMc{"checkDecayTypeMc", false, "Flag to enable DecayType histogram"}; - Service pdg; + Service pdg{}; using TracksWithSel = soa::Join; diff --git a/PWGHF/D2H/Tasks/taskCd.cxx b/PWGHF/D2H/Tasks/taskCd.cxx index 266d2612552..1aa5fcb35c1 100644 --- a/PWGHF/D2H/Tasks/taskCd.cxx +++ b/PWGHF/D2H/Tasks/taskCd.cxx @@ -23,9 +23,13 @@ #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/PIDResponseITS.h" +#include "Common/DataModel/PIDResponseTOF.h" +#include "Common/DataModel/PIDResponseTPC.h" +#include "Common/DataModel/TrackSelectionTables.h" #include #include +#include #include #include #include @@ -41,6 +45,7 @@ #include #include +#include #include #include #include // std::vector diff --git a/PWGHF/D2H/Tasks/taskCharmPolarisation.cxx b/PWGHF/D2H/Tasks/taskCharmPolarisation.cxx index b26c8cfc8c2..4d02b0068a1 100644 --- a/PWGHF/D2H/Tasks/taskCharmPolarisation.cxx +++ b/PWGHF/D2H/Tasks/taskCharmPolarisation.cxx @@ -65,6 +65,7 @@ using namespace o2; using namespace o2::aod; using namespace o2::framework; using namespace o2::framework::expressions; +using namespace o2::constants::physics; using namespace o2::hf_centrality; using namespace o2::hf_evsel; using namespace o2::analysis::hf_flow_utils; @@ -144,11 +145,6 @@ DECLARE_SOA_TABLE(HfLcPolBkg, "AOD", "HFLCPOLBKG", struct HfTaskCharmPolarisation { Produces rowCandLcBkg; - float massPi{0.f}; - float massProton{0.f}; - float massKaon{0.f}; - float massDstar{0.f}; - float massLc{0.f}; float bkgRotationAngleStep{0.f}; uint8_t nMassHypos{0u}; @@ -222,7 +218,7 @@ struct HfTaskCharmPolarisation { SliceCache cache; EventPlaneHelper epHelper; // event plane helper HfEventSelection hfEvSel; // event selection and monitoring - o2::framework::Service ccdb; + o2::framework::Service ccdb{}; using CollisionsWithMcLabels = soa::SmallGroups>; using CollisionsWithMcLabelsAndCent = soa::SmallGroups>; @@ -328,11 +324,6 @@ struct HfTaskCharmPolarisation { LOGP(fatal, "No background rotation supported for MC."); } - massPi = o2::constants::physics::MassPiPlus; - massProton = o2::constants::physics::MassProton; - massKaon = o2::constants::physics::MassKaonCharged; - massDstar = o2::constants::physics::MassDStar; - massLc = o2::constants::physics::MassLambdaCPlus; bkgRotationAngleStep = (nBkgRotations > 1) ? (maxRotAngleMultByPi - minRotAngleMultByPi) * constants::math::PI / (nBkgRotations - 1) : 0.; const AxisSpec thnAxisInvMass{configThnAxisInvMass, "#it{M} (GeV/#it{c}^{2})"}; @@ -1438,8 +1429,8 @@ struct HfTaskCharmPolarisation { template bool isInSignalRegion(float invMass) { - float invMassMin; - float invMassMax; + float invMassMin{0.f}; + float invMassMax{0.f}; if constexpr (Channel == charm_polarisation::DecayChannel::DstarToDzeroPi) { // D*+ invMassMin = 0.142f; invMassMax = 0.15f; @@ -1600,7 +1591,7 @@ struct HfTaskCharmPolarisation { // Dstar analysis // polarization measured from the soft-pion daughter (*) - massDau = massPi; // (*) + massDau = MassPiPlus; // (*) const float bkgRotAngle = (bkgRotationId > 0) ? minRotAngleMultByPi * constants::math::PI + bkgRotationAngleStep * (bkgRotationId - 1) : 0; std::array threeVecSoftPi{candidate.pxSoftPi() * std::cos(bkgRotAngle) - candidate.pySoftPi() * std::sin(bkgRotAngle), candidate.pxSoftPi() * std::sin(bkgRotAngle) + candidate.pySoftPi() * std::cos(bkgRotAngle), candidate.pzSoftPi()}; // we rotate the soft pion @@ -1615,13 +1606,13 @@ struct HfTaskCharmPolarisation { pyCharmHad = threeVecSoftPi[1] + threeVecD0Prong0[1] + threeVecD0Prong1[1]; pzCharmHad = threeVecSoftPi[2] + threeVecD0Prong0[2] + threeVecD0Prong1[2]; if (candidate.signSoftPi() > 0) { - invMassCharmHad = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{massPi, massKaon, massPi}); - invMassD0 = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{massPi, massKaon}); + invMassCharmHad = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{MassPiPlus, MassKaonCharged, MassPiPlus}); + invMassD0 = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{MassPiPlus, MassKaonCharged}); } else { - invMassCharmHad = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{massKaon, massPi, massPi}); - invMassD0 = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{massKaon, massPi}); + invMassCharmHad = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{MassKaonCharged, MassPiPlus, MassPiPlus}); + invMassD0 = RecoDecay::m(std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{MassKaonCharged, MassPiPlus}); } - rapidity = RecoDecay::y(std::array{pxCharmHad, pyCharmHad, pzCharmHad}, massDstar); + rapidity = RecoDecay::y(std::array{pxCharmHad, pyCharmHad, pzCharmHad}, MassDStar); } else { isRotatedCandidate = 0; pxDau = candidate.pxSoftPi(); @@ -1637,7 +1628,7 @@ struct HfTaskCharmPolarisation { invMassCharmHad = candidate.invMassAntiDstar(); invMassD0 = candidate.invMassD0Bar(); } - rapidity = candidate.y(massDstar); + rapidity = candidate.y(MassDStar); } invMassCharmHadForSparse = invMassCharmHad - invMassD0; @@ -1677,8 +1668,8 @@ struct HfTaskCharmPolarisation { pyCharmHad = candidate.py(); pzCharmHad = candidate.pz(); } - massDau = massProton; // (*) - rapidity = RecoDecay::y(candidate.pVector(), massLc); + massDau = MassProton; // (*) + rapidity = RecoDecay::y(candidate.pVector(), MassLambdaCPlus); /// mass-hypothesis-dependent variables float invMassPiKPi = 0.f; // bkg. from D+ -> K+pi-pi- @@ -1691,7 +1682,7 @@ struct HfTaskCharmPolarisation { pzDau = candidate.pzProng0(); if (bkgRotationId) { /// rotational background - pt of the kaon track rotated - invMassCharmHad = RecoDecay::m(std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{massProton, massKaon, massPi}); + invMassCharmHad = RecoDecay::m(std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{MassProton, MassKaonCharged, MassPiPlus}); invMassCharmHadForSparse = invMassCharmHad; } else { /// original candidate (kaon track not rotated) @@ -1725,7 +1716,7 @@ struct HfTaskCharmPolarisation { pzDau = candidate.pzProng2(); if (bkgRotationId) { /// rotational background - pt of the kaon track rotated - invMassCharmHad = RecoDecay::m(std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{massPi, massKaon, massProton}); + invMassCharmHad = RecoDecay::m(std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{MassPiPlus, MassKaonCharged, MassProton}); invMassCharmHadForSparse = invMassCharmHad; } else { /// original candidate (kaon track not rotated) @@ -2107,8 +2098,8 @@ struct HfTaskCharmPolarisation { std::array const dauPdgs = {kPiPlus, o2::constants::physics::Pdg::kD0}; RecoDecay::getDaughters(mcParticle, &listDaughters, dauPdgs, 1); - massDau = massPi; - massCharmHad = massDstar; + massDau = MassPiPlus; + massCharmHad = MassDStar; } else if constexpr (Channel == charm_polarisation::DecayChannel::LcToPKPi) { if (std::abs(mcParticle.flagMcMatchGen()) != hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { // this particle is not signal, skip return; @@ -2117,8 +2108,8 @@ struct HfTaskCharmPolarisation { resoChannelLc = mcParticle.flagMcDecayChanGen(); std::array const dauPdgs = {kProton, -kKPlus, kPiPlus}; RecoDecay::getDaughters(mcParticle, &listDaughters, dauPdgs, 2); - massDau = massProton; - massCharmHad = massLc; + massDau = MassProton; + massCharmHad = MassLambdaCPlus; /// electric charge from PDG code int const pdgCode = mcParticle.pdgCode(); diff --git a/PWGHF/D2H/Tasks/taskD0.cxx b/PWGHF/D2H/Tasks/taskD0.cxx index cc1cc58e992..9f4cdd4e01f 100644 --- a/PWGHF/D2H/Tasks/taskD0.cxx +++ b/PWGHF/D2H/Tasks/taskD0.cxx @@ -104,7 +104,7 @@ struct HfTaskD0 { ctpRateFetcher mRateFetcher; SliceCache cache; - Service ccdb; + Service ccdb{}; using D0Candidates = soa::Filtered>; using D0CandidatesMc = soa::Filtered>; @@ -404,7 +404,7 @@ struct HfTaskD0 { continue; } - float massD0, massD0bar; + float massD0{0.f}, massD0bar{0.f}; if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) { massD0 = candidate.kfGeoMassD0(); massD0bar = candidate.kfGeoMassD0bar(); @@ -770,7 +770,7 @@ struct HfTaskD0 { auto bc = collision.template foundBC_as(); ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true) * 1.e-3; // kHz } - float massD0, massD0bar; + float massD0{0.f}, massD0bar{0.f}; if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) { massD0 = candidate.kfGeoMassD0(); massD0bar = candidate.kfGeoMassD0bar(); diff --git a/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx b/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx index 4826a11ded2..aa3c03c7b6d 100644 --- a/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx +++ b/PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx @@ -74,7 +74,7 @@ struct HfTaskDirectedFlowCharmHadrons { EventPlaneHelper epHelper; SliceCache cache; HfEventSelection hfEvSel; // event selection and monitoring - o2::framework::Service ccdb; + o2::framework::Service ccdb{}; using CandDplusDataWMl = soa::Filtered>; using CandDplusData = soa::Filtered>; diff --git a/PWGHF/D2H/Tasks/taskDplus.cxx b/PWGHF/D2H/Tasks/taskDplus.cxx index 38975f2f190..819c5f3891f 100644 --- a/PWGHF/D2H/Tasks/taskDplus.cxx +++ b/PWGHF/D2H/Tasks/taskDplus.cxx @@ -92,7 +92,7 @@ struct HfTaskDplus { HfUpcGapThresholds upcThresholds; // UPC gap determination thresholds ctpRateFetcher mRateFetcher; // interaction rate fetcher - Service ccdb; + Service ccdb{}; using CandDplusData = soa::Filtered>; using CandDplusDataWithMl = soa::Filtered>; diff --git a/PWGHF/D2H/Tasks/taskDs.cxx b/PWGHF/D2H/Tasks/taskDs.cxx index 9101672f65e..d1601fee09d 100644 --- a/PWGHF/D2H/Tasks/taskDs.cxx +++ b/PWGHF/D2H/Tasks/taskDs.cxx @@ -169,7 +169,7 @@ struct HfTaskDs { } ccdbConfig; SliceCache cache; - Service ccdb; + Service ccdb{}; using TH1Ptr = std::shared_ptr; using TH2Ptr = std::shared_ptr; diff --git a/PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx b/PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx index 6c5a2fee257..4fcdf05bb55 100644 --- a/PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx +++ b/PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx @@ -308,7 +308,7 @@ struct HfTaskDstarToD0Pi { hWeights.resize(nWeights); for (int ithWeight = 0; ithWeight < nWeights; ++ithWeight) { std::string const histName = "hMult" + std::to_string(ithWeight + 1) + "_Weight"; - hWeights[ithWeight] = reinterpret_cast(weightFile->Get(histName.c_str())); + hWeights[ithWeight] = dynamic_cast(weightFile->Get(histName.c_str())); if (hWeights[ithWeight] == nullptr) { LOGF(fatal, "Histogram %s not found in weight file!", histName.c_str()); return; @@ -651,8 +651,8 @@ struct HfTaskDstarToD0Pi { } } - float centFT0MGen; - float pvContributors; + float centFT0MGen{0.f}; + float pvContributors{0.f}; // assigning centrality to MC Collision using max FT0M amplitute from Reconstructed collisions if (recCollisions.size() != 0) { std::vector::iterator, int>> tempRecCols; diff --git a/PWGHF/D2H/Tasks/taskFlowCharmHadrons.cxx b/PWGHF/D2H/Tasks/taskFlowCharmHadrons.cxx index 40c253d051d..7ccb8e6f509 100644 --- a/PWGHF/D2H/Tasks/taskFlowCharmHadrons.cxx +++ b/PWGHF/D2H/Tasks/taskFlowCharmHadrons.cxx @@ -129,7 +129,7 @@ struct HfTaskFlowCharmHadrons { EventPlaneHelper epHelper; HfEventSelection hfEvSel; // event selection and monitoring - o2::framework::Service ccdb; + o2::framework::Service ccdb{}; SliceCache cache; using CandDsDataWMl = soa::Filtered>; diff --git a/PWGHF/D2H/Tasks/taskLb.cxx b/PWGHF/D2H/Tasks/taskLb.cxx index ecf0e8f6022..9a605393658 100644 --- a/PWGHF/D2H/Tasks/taskLb.cxx +++ b/PWGHF/D2H/Tasks/taskLb.cxx @@ -72,7 +72,7 @@ struct HfTaskLb { Configurable largeLifetimeBG{"largeLifetimeBG", 0.01, "fraction of strange contribution within 2mm"}; Configurable> binsPt{"binsPt", std::vector{hf_cuts_lb_to_lc_pi::vecBinsPt}, "pT bin limits"}; - Service pdg; + Service pdg{}; using TracksWExt = soa::Join; using TracksWExtMc = soa::Join; diff --git a/PWGHF/D2H/Tasks/taskLc.cxx b/PWGHF/D2H/Tasks/taskLc.cxx index 794e49aa322..e44a4344a1d 100644 --- a/PWGHF/D2H/Tasks/taskLc.cxx +++ b/PWGHF/D2H/Tasks/taskLc.cxx @@ -88,7 +88,7 @@ struct HfTaskLc { HfEventSelection hfEvSel; // event selection and monitoring HfUpcGapThresholds upcThresholds; // UPC gap determination thresholds SliceCache cache; - Service ccdb; + Service ccdb{}; using Collisions = soa::Join; using CollisionsMc = soa::Join; diff --git a/PWGHF/D2H/Tasks/taskXic.cxx b/PWGHF/D2H/Tasks/taskXic.cxx index b45ba158bf0..46dfdd64521 100644 --- a/PWGHF/D2H/Tasks/taskXic.cxx +++ b/PWGHF/D2H/Tasks/taskXic.cxx @@ -67,7 +67,7 @@ struct HfTaskXic { Configurable> binsPt{"binsPt", std::vector{hf_cuts_xic_to_p_k_pi::vecBinsPt}, "pT bin limits"}; Configurable enableTHn{"enableTHn", false, "enable THn for Xic"}; - Service pdg; + Service pdg{}; Filter filterSelectCandidates = (aod::hf_sel_candidate_xic::isSelXicToPKPi >= selectionFlagXic || aod::hf_sel_candidate_xic::isSelXicToPiKP >= selectionFlagXic); diff --git a/PWGHF/D2H/Tasks/taskXic0ToXiPi.cxx b/PWGHF/D2H/Tasks/taskXic0ToXiPi.cxx index c9c09f94859..28e461c815c 100644 --- a/PWGHF/D2H/Tasks/taskXic0ToXiPi.cxx +++ b/PWGHF/D2H/Tasks/taskXic0ToXiPi.cxx @@ -174,7 +174,7 @@ struct HfTaskXic0ToXiPi { if (candidate.resultSelections() != true) { return; } - double yCharmBaryon; + double yCharmBaryon{0.}; if constexpr (UseKfParticle) { yCharmBaryon = candidate.kfRapXic(); } else { @@ -223,7 +223,7 @@ struct HfTaskXic0ToXiPi { if (candidate.resultSelections() != true) { continue; } - double yCharmBaryon; + double yCharmBaryon{0.}; if constexpr (UseKfParticle) { yCharmBaryon = candidate.kfRapXic(); } else { diff --git a/PWGHF/D2H/Tasks/taskXicToXiPiPi.cxx b/PWGHF/D2H/Tasks/taskXicToXiPiPi.cxx index 256fd600a69..b6b709c7c55 100644 --- a/PWGHF/D2H/Tasks/taskXicToXiPiPi.cxx +++ b/PWGHF/D2H/Tasks/taskXicToXiPiPi.cxx @@ -71,7 +71,7 @@ struct HfTaskXicToXiPiPi { static constexpr int NVarsMultiClass{3}; - Service pdg; + Service pdg{}; Filter filterSelectCandidates = (aod::hf_sel_candidate_xic::isSelXicToXiPiPi >= selectionFlagXic); diff --git a/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx b/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx index 474a1d662ad..a1aee46c5bc 100644 --- a/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx @@ -239,9 +239,6 @@ struct HfCorrelatorD0Hadrons { Configurable useCentrality{"useCentrality", false, "Flag for centrality dependent analyses"}; int leadingIndex = 0; - double massD0{0.}; - double massPi{0.}; - double massK{0.}; double softPiMass = 0.14543; // pion mass + Q-value of the D*->D0pi decay SliceCache cache; @@ -274,10 +271,6 @@ struct HfCorrelatorD0Hadrons { void init(InitContext&) { - massD0 = MassD0; - massPi = MassPiPlus; - massK = MassKPlus; - AxisSpec axisMassD = {binsMassD, "inv. mass (#pi K) (GeV/#it{c}^{2})"}; AxisSpec const axisEta = {binsEta, "#it{#eta}"}; AxisSpec const axisPhi = {binsPhi, "#it{#varphi}"}; @@ -415,8 +408,8 @@ struct HfCorrelatorD0Hadrons { } // ========================== Define parameters for soft pion removal ================================ - auto ePiK = RecoDecay::e(candidate.pVectorProng0(), massPi) + RecoDecay::e(candidate.pVectorProng1(), massK); - auto eKPi = RecoDecay::e(candidate.pVectorProng0(), massK) + RecoDecay::e(candidate.pVectorProng1(), massPi); + auto ePiK = RecoDecay::e(candidate.pVectorProng0(), MassPiPlus) + RecoDecay::e(candidate.pVectorProng1(), MassKPlus); + auto eKPi = RecoDecay::e(candidate.pVectorProng0(), MassKPlus) + RecoDecay::e(candidate.pVectorProng1(), MassPiPlus); // ========================== trigger efficiency ================================ double efficiencyWeight = 1.; @@ -479,7 +472,7 @@ struct HfCorrelatorD0Hadrons { // ========== soft pion removal =================================================== double invMassDstar1 = 0., invMassDstar2 = 0.; auto pSum2 = RecoDecay::p2(candidate.pVector(), track.pVector()); - auto ePion = track.energy(massPi); + auto ePion = track.energy(MassPiPlus); invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2); invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2); @@ -655,8 +648,8 @@ struct HfCorrelatorD0Hadrons { entryD0CandGenInfo(isD0Prompt); // ===================== Define parameters for soft pion removal ======================== - auto ePiK = RecoDecay::e(candidate.pVectorProng0(), massPi) + RecoDecay::e(candidate.pVectorProng1(), massK); - auto eKPi = RecoDecay::e(candidate.pVectorProng0(), massK) + RecoDecay::e(candidate.pVectorProng1(), massPi); + auto ePiK = RecoDecay::e(candidate.pVectorProng0(), MassPiPlus) + RecoDecay::e(candidate.pVectorProng1(), MassKPlus); + auto eKPi = RecoDecay::e(candidate.pVectorProng0(), MassKPlus) + RecoDecay::e(candidate.pVectorProng1(), MassPiPlus); // ============== D-h correlation dedicated section ==================================== @@ -684,7 +677,7 @@ struct HfCorrelatorD0Hadrons { double invMassDstar1 = 0, invMassDstar2 = 0; bool isSoftPiD0 = false, isSoftPiD0bar = false; auto pSum2 = RecoDecay::p2(candidate.pVector(), track.pVector()); - auto ePion = track.energy(massPi); + auto ePion = track.energy(MassPiPlus); invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2); invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2); @@ -856,7 +849,7 @@ struct HfCorrelatorD0Hadrons { poolBin, correlationStatus, cent); - entryD0HadronRecoInfo(massD0, massD0, 0); // dummy info + entryD0HadronRecoInfo(MassD0, MassD0, 0); // dummy info entryD0HadronGenInfo(isD0Prompt, particleAssoc.isPhysicalPrimary(), trackOrigin); } // end inner loop (Tracks) } @@ -897,12 +890,12 @@ struct HfCorrelatorD0Hadrons { // soft pion removal, signal status 1,3 for D0 and 2,3 for D0bar (SoftPi removed), signal status 11,13 for D0 and 12,13 for D0bar (only SoftPi) const auto invMassD0 = HfHelper::invMassD0ToPiK(candidate); const auto invMassD0bar = HfHelper::invMassD0barToKPi(candidate); - auto ePiK = RecoDecay::e(candidate.pVectorProng0(), massPi) + RecoDecay::e(candidate.pVectorProng1(), massK); - auto eKPi = RecoDecay::e(candidate.pVectorProng0(), massK) + RecoDecay::e(candidate.pVectorProng1(), massPi); + auto ePiK = RecoDecay::e(candidate.pVectorProng0(), MassPiPlus) + RecoDecay::e(candidate.pVectorProng1(), MassKPlus); + auto eKPi = RecoDecay::e(candidate.pVectorProng0(), MassKPlus) + RecoDecay::e(candidate.pVectorProng1(), MassPiPlus); double invMassDstar1 = 0., invMassDstar2 = 0.; bool isSoftPiD0 = false, isSoftPiD0bar = false; auto pSum2 = RecoDecay::p2(candidate.pVector(), particleAssoc.pVector()); - auto ePion = particleAssoc.energy(massPi); + auto ePion = particleAssoc.energy(MassPiPlus); invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2); invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2); std::vector outputMlD0 = {-1., -1., -1.}; @@ -1004,12 +997,12 @@ struct HfCorrelatorD0Hadrons { // soft pion removal const auto invMassD0 = HfHelper::invMassD0ToPiK(candidate); const auto invMassD0bar = HfHelper::invMassD0barToKPi(candidate); - auto ePiK = RecoDecay::e(candidate.pVectorProng0(), massPi) + RecoDecay::e(candidate.pVectorProng1(), massK); - auto eKPi = RecoDecay::e(candidate.pVectorProng0(), massK) + RecoDecay::e(candidate.pVectorProng1(), massPi); + auto ePiK = RecoDecay::e(candidate.pVectorProng0(), MassPiPlus) + RecoDecay::e(candidate.pVectorProng1(), MassKPlus); + auto eKPi = RecoDecay::e(candidate.pVectorProng0(), MassKPlus) + RecoDecay::e(candidate.pVectorProng1(), MassPiPlus); double invMassDstar1 = 0., invMassDstar2 = 0.; bool isSoftPiD0 = false, isSoftPiD0bar = false; auto pSum2 = RecoDecay::p2(candidate.pVector(), particleAssoc.pVector()); - auto ePion = particleAssoc.energy(massPi); + auto ePion = particleAssoc.energy(MassPiPlus); invMassDstar1 = std::sqrt((ePiK + ePion) * (ePiK + ePion) - pSum2); invMassDstar2 = std::sqrt((eKPi + ePion) * (eKPi + ePion) - pSum2); @@ -1128,7 +1121,7 @@ struct HfCorrelatorD0Hadrons { int trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true); bool isD0Prompt = particleTrigg.originMcGen() == RecoDecay::OriginType::Prompt; entryD0HadronPair(getDeltaPhi(particleAssoc.phi(), particleTrigg.phi()), particleAssoc.eta() - particleTrigg.eta(), particleTrigg.pt(), particleAssoc.pt(), poolBin, correlationStatus, cent); - entryD0HadronRecoInfo(massD0, massD0, 0); // dummy info + entryD0HadronRecoInfo(MassD0, MassD0, 0); // dummy info entryD0HadronGenInfo(isD0Prompt, particleAssoc.isPhysicalPrimary(), trackOrigin); } } diff --git a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx index 7c14da3fe30..77e43224d52 100644 --- a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx @@ -984,9 +984,6 @@ struct HfCorrelatorDMesonPairs { registry.fill(HIST("hInputCheckD0OrD0barMcGen"), nDorDbarevent); } - auto massD = MassD0; - auto massDbar = MassD0Bar; - for (const auto& particle1 : mcParticles) { // check if the particle is D0 or D0bar if (std::abs(particle1.pdgCode()) != Pdg::kD0) { @@ -1112,7 +1109,7 @@ struct HfCorrelatorDMesonPairs { } // Fill pair Selection Status - entryD0PairMcGen(particle1.pt(), particle2.pt(), particle1.y(), particle2.y(), particle1.phi(), particle2.phi(), massD, massDbar, massD, massDbar, pairType, particleType1, particleType2); + entryD0PairMcGen(particle1.pt(), particle2.pt(), particle1.y(), particle2.y(), particle1.phi(), particle2.phi(), MassD0, MassD0Bar, MassD0, MassD0Bar, pairType, particleType1, particleType2); entryD0PairMcGenInfo(originGen1, originGen2, matchedGen1, matchedGen2); } // end inner loop diff --git a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx index 37fdb8acea8..3887f580d96 100644 --- a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx @@ -564,8 +564,9 @@ struct HfCorrelatorDplusHadrons { listDaughters.clear(); RecoDecay::getDaughters(particle1, &listDaughters, arrDaughDplusPDG, 2); int counterDaughters = 0; - if (listDaughters.size() != NDaughters) + if (listDaughters.size() != NDaughters) { continue; + } bool isDaughtersOk = true; for (const auto& dauIdx : listDaughters) { auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset()); @@ -576,8 +577,9 @@ struct HfCorrelatorDplusHadrons { counterDaughters += 1; prongsId[counterDaughters - 1] = daughI.globalIndex(); } - if (!isDaughtersOk) + if (!isDaughtersOk) { continue; // Skip this D+ candidate if any daughter fails eta cut + } counterDplusHadron++; registry.fill(HIST("hDplusBin"), poolBin); diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index 562df81322d..d61026cd3dd 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -53,6 +53,7 @@ #include #include +#include #include #include #include diff --git a/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx index f40cf7d279a..81ead91f3d8 100644 --- a/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx @@ -38,6 +38,7 @@ #include +#include #include #include diff --git a/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx index 62a8ee5bc8d..960c00485b3 100644 --- a/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx @@ -242,7 +242,7 @@ struct HfCorrelatorLcHadrons { Configurable useCentrality{"useCentrality", false, "Flag for centrality dependent analyses"}; SliceCache cache; - Service pdg; + Service pdg{}; int leadingIndex = 0; bool correlationStatus = false; static constexpr std::size_t NDaughters{3u}; diff --git a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx index a0dcfbd9f90..61420b52626 100644 --- a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx @@ -373,7 +373,7 @@ struct HfCorrelatorLcScHadrons { } cfgV0; SliceCache cache; - Service pdg; + Service pdg{}; int8_t chargeCand = 3; int8_t signSoftPion = 0; int leadingIndex = 0; diff --git a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx index f418af0e1fb..bc222987dc6 100644 --- a/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx +++ b/PWGHF/HFC/TableProducer/derivedDataCreatorCorrelationsReduced.cxx @@ -103,7 +103,7 @@ struct HfDerivedDataCreatorCorrelationsReduced { Configurable> binsPtAssoc{"binsPtAssoc", std::vector{0.2, 1., 2., 50.}, "pT bin limits for associated particles"}; HfEventSelection hfEvSel; // event selection and monitoring - o2::framework::Service ccdb; + o2::framework::Service ccdb{}; SliceCache cache; double massCharm{0.}; diff --git a/PWGHF/HFC/TableProducer/producerCharmHadronsTrackFemtoDream.cxx b/PWGHF/HFC/TableProducer/producerCharmHadronsTrackFemtoDream.cxx index 22956fa8d89..83a74e1dabf 100644 --- a/PWGHF/HFC/TableProducer/producerCharmHadronsTrackFemtoDream.cxx +++ b/PWGHF/HFC/TableProducer/producerCharmHadronsTrackFemtoDream.cxx @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -183,7 +184,7 @@ struct HfProducerCharmHadronsTrackFemtoDream { std::vector outputMlPiKP; o2::ccdb::CcdbApi ccdbApi; o2::hf_evsel::HfEventSelection hfEvSel; - Service ccdb; /// Accessing the CCDB + Service ccdb{}; /// Accessing the CCDB o2::base::MatLayerCylSet* lut{}; // if (doPvRefit){ lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get(ccdbPathLut));} //! may be it useful, will check later diff --git a/PWGHF/HFC/TableProducer/producerCharmHadronsV0FemtoDream.cxx b/PWGHF/HFC/TableProducer/producerCharmHadronsV0FemtoDream.cxx index e95ea304bae..a3ea5c88051 100644 --- a/PWGHF/HFC/TableProducer/producerCharmHadronsV0FemtoDream.cxx +++ b/PWGHF/HFC/TableProducer/producerCharmHadronsV0FemtoDream.cxx @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -61,6 +62,7 @@ #include #include +#include #include #include #include @@ -225,7 +227,7 @@ struct HfProducerCharmHadronsV0FemtoDream { std::vector outputMlPiKP; o2::ccdb::CcdbApi ccdbApi; o2::hf_evsel::HfEventSelection hfEvSel; - Service ccdb; /// Accessing the CCDB + Service ccdb{}; /// Accessing the CCDB o2::base::MatLayerCylSet* lut{}; // if (doPvRefit){ lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get(ccdbPathLut));} //! may be it useful, will check later diff --git a/PWGHF/HFC/Tasks/taskCharmHadronsTrackFemtoDream.cxx b/PWGHF/HFC/Tasks/taskCharmHadronsTrackFemtoDream.cxx index 962e8b07c91..b1e05b1491f 100644 --- a/PWGHF/HFC/Tasks/taskCharmHadronsTrackFemtoDream.cxx +++ b/PWGHF/HFC/Tasks/taskCharmHadronsTrackFemtoDream.cxx @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -462,8 +463,9 @@ struct HfTaskCharmHadronsTrackFemtoDream { for (auto const& [p1, p2] : combinations(CombinationsFullIndexPolicy(sliceTrk1, sliceCharmHad))) { if constexpr (Channel == DecayChannel::D0ToPiK) { - if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id()) + if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id()) { continue; + } if (useCPR.value) { if (pairCloseRejectionSE2Prong.isClosePair(p1, p2, parts, col.magField())) { @@ -477,8 +479,9 @@ struct HfTaskCharmHadronsTrackFemtoDream { } if constexpr (Channel == DecayChannel::LcToPKPi || Channel == DecayChannel::DplusToPiKPi) { - if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id()) + if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id()) { continue; + } if (useCPR.value) { if (pairCloseRejectionSE3Prong.isClosePair(p1, p2, parts, col.magField())) { continue; @@ -491,8 +494,9 @@ struct HfTaskCharmHadronsTrackFemtoDream { } if constexpr (Channel == DecayChannel::DstarToD0Pi) { - if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id()) + if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id()) { continue; + } if (useCPR.value) { if (pairCloseRejectionSEDstar.isClosePair(p1, p2, parts, col.magField())) { continue; diff --git a/PWGHF/HFC/Tasks/taskCharmHadronsV0FemtoDream.cxx b/PWGHF/HFC/Tasks/taskCharmHadronsV0FemtoDream.cxx index e75593574b7..57f05fbea1a 100644 --- a/PWGHF/HFC/Tasks/taskCharmHadronsV0FemtoDream.cxx +++ b/PWGHF/HFC/Tasks/taskCharmHadronsV0FemtoDream.cxx @@ -23,8 +23,6 @@ #include "PWGCF/FemtoDream/Core/femtoDreamUtils.h" #include "PWGHF/Core/DecayChannels.h" -#include "Common/Core/RecoDecay.h" - #include #include #include @@ -45,8 +43,8 @@ #include #include +#include #include -#include #include using namespace o2; @@ -416,14 +414,17 @@ struct HfTaskCharmHadronsV0FemtoDream { for (auto const& [p1, p2] : combinations(CombinationsFullIndexPolicy(sliceV01, sliceCharmHad))) { if constexpr (Channel == DecayChannel::D0ToPiK) { - if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id()) + if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id()) { continue; + } } else if constexpr (Channel == DecayChannel::LcToPKPi || Channel == DecayChannel::DplusToPiKPi) { - if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id()) + if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id()) { continue; + } } else if constexpr (Channel == DecayChannel::DstarToD0Pi) { - if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id()) + if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id()) { continue; + } } // v0 daughters selection const auto& posChild = femtoParts.iteratorAt(p1.index() - 2); @@ -453,10 +454,11 @@ struct HfTaskCharmHadronsV0FemtoDream { } float invMassV0 = 0.f; - if (p1.sign() > 0) + if (p1.sign() > 0) { invMassV0 = p1.mLambda(); - else + } else { invMassV0 = p1.mAntiLambda(); + } float chargeV0 = 0.; if ((p1.cut() & p1.sign()) == CutBitChargePositive) { @@ -543,10 +545,11 @@ struct HfTaskCharmHadronsV0FemtoDream { } float invMassV0 = 0.f; - if (p1.sign() > 0) + if (p1.sign() > 0) { invMassV0 = p1.mLambda(); - else + } else { invMassV0 = p1.mAntiLambda(); + } float chargeV0 = 0.; if ((p1.cut() & p1.sign()) == CutBitChargePositive) { @@ -723,8 +726,9 @@ struct HfTaskCharmHadronsV0FemtoDream { FDV0Particles const& parts, CharmPart& charmPart) { - if (!mixSetting.doMixEvent) + if (!mixSetting.doMixEvent) { return; + } auto run = [&](auto& v0Part) { switch (mixSetting.mixingBinPolicy) { case femtodreamcollision::kMult: @@ -741,12 +745,13 @@ struct HfTaskCharmHadronsV0FemtoDream { } }; - if (v0Sel.pdgCodeV0 == kLambda0) + if (v0Sel.pdgCodeV0 == kLambda0) { run(partitionLambda); - else if (v0Sel.pdgCodeV0 == kK0Short) + } else if (v0Sel.pdgCodeV0 == kK0Short) { run(partitionK0Short); - else + } else { LOG(fatal) << "Unsupported V0 PDG: " << v0Sel.pdgCodeV0 << " (allowed: 3122, 310) for mixed-events"; + } } void processDataLcV0(FilteredCollisions const& cols, diff --git a/PWGHF/HFC/Tasks/taskCorrelationDplusHadrons.cxx b/PWGHF/HFC/Tasks/taskCorrelationDplusHadrons.cxx index f374d34a42d..1b412d170e9 100644 --- a/PWGHF/HFC/Tasks/taskCorrelationDplusHadrons.cxx +++ b/PWGHF/HFC/Tasks/taskCorrelationDplusHadrons.cxx @@ -148,7 +148,7 @@ struct HfTaskCorrelationDplusHadrons { Configurable timestampCcdb{"timestampCcdb", -1, "timestamp of the efficiency files used to query in CCDB"}; Configurable ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"}; - Service ccdb; + Service ccdb{}; std::shared_ptr mEfficiencyPrompt = nullptr; std::shared_ptr mEfficiencyFD = nullptr; std::shared_ptr mEfficiencyAssociated = nullptr; diff --git a/PWGHF/HFC/Tasks/taskCorrelationDsHadrons.cxx b/PWGHF/HFC/Tasks/taskCorrelationDsHadrons.cxx index e257beec41e..798047a0dae 100644 --- a/PWGHF/HFC/Tasks/taskCorrelationDsHadrons.cxx +++ b/PWGHF/HFC/Tasks/taskCorrelationDsHadrons.cxx @@ -31,6 +31,8 @@ #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponseTOF.h" +#include "Common/DataModel/PIDResponseTPC.h" #include "Common/DataModel/TrackSelectionTables.h" #include @@ -47,6 +49,7 @@ #include #include #include +#include #include #include @@ -155,7 +158,7 @@ struct HfTaskCorrelationDsHadrons { SliceCache cache; - Service ccdb; + Service ccdb{}; using DsHadronPair = soa::Filtered>; using DsHadronPairFull = soa::Filtered>; diff --git a/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx b/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx index a2e69b2e144..0a71494a202 100644 --- a/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx +++ b/PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx @@ -163,7 +163,7 @@ struct HfTaskCorrelationLcHadrons { std::shared_ptr mEfficiencyFD = nullptr; std::shared_ptr mEfficiencyAssociated = nullptr; - Service ccdb; + Service ccdb{}; enum CandidateStep { kCandidateStepMcGenAll = 0, kCandidateStepMcGenLcToPKPi, diff --git a/PWGHF/HFC/Tasks/taskFlow.cxx b/PWGHF/HFC/Tasks/taskFlow.cxx index d54bfda6956..7bda2ee8dc5 100644 --- a/PWGHF/HFC/Tasks/taskFlow.cxx +++ b/PWGHF/HFC/Tasks/taskFlow.cxx @@ -254,8 +254,8 @@ struct HfTaskFlow { TF1* fPtDepDCAxy = nullptr; SliceCache cache; - Service pdg; - Service ccdb; + Service pdg{}; + Service ccdb{}; std::vector* offsetFT0{}; std::vector* offsetFV0{}; o2::ccdb::CcdbApi ccdbApi; @@ -722,10 +722,12 @@ struct HfTaskFlow { float dPhiStar = phi1 - phi2 - charge1 * fbSign * std::asin(0.075 * radius / pt1) + charge2 * fbSign * std::asin(0.075 * radius / pt2); - if (dPhiStar > constants::math::PI) + if (dPhiStar > constants::math::PI) { dPhiStar = constants::math::TwoPI - dPhiStar; - if (dPhiStar < -constants::math::PI) + } + if (dPhiStar < -constants::math::PI) { dPhiStar = -constants::math::TwoPI - dPhiStar; + } return dPhiStar; } @@ -756,7 +758,7 @@ struct HfTaskFlow { { int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft); - float offsetX, offsetY; + float offsetX{}, offsetY{}; if (isChnoInLeft) { offsetX = (*offsetFV0)[0].getX(); offsetY = (*offsetFV0)[0].getY(); @@ -795,7 +797,7 @@ struct HfTaskFlow { { int const cellsInLeft[] = {0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 40, 33, 41, 34, 42, 35, 43}; bool const isChnoInLeft = std::find(std::begin(cellsInLeft), std::end(cellsInLeft), chno) != std::end(cellsInLeft); - float offsetX, offsetY, offsetZ; + float offsetX{}, offsetY{}, offsetZ{}; if (isChnoInLeft) { offsetX = (*offsetFV0)[0].getX(); offsetY = (*offsetFV0)[0].getY(); @@ -1107,15 +1109,16 @@ struct HfTaskFlow { bool bIsBelow = false; if (std::abs(dPhiStarLow) < kLimit || std::abs(dPhiStarHigh) < kLimit || dPhiStarLow * dPhiStarHigh < 0) { - for (double rad(configCentral.minMergingRadius); rad < configCentral.maxMergingRadius; rad += 0.01) { + for (double rad(configCentral.minMergingRadius); rad < configCentral.maxMergingRadius; rad += 0.01) { // FIXME: Variable 'rad' with floating point type 'double' should not be used as a loop counter. double dPhiStar = getDPhiStar(track1, track2, rad, magneticField); if (std::abs(dPhiStar) < kLimit) { bIsBelow = true; break; } } - if (bIsBelow) + if (bIsBelow) { continue; + } } } } diff --git a/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx b/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx index 65896cb5a10..df4f9b1f1d6 100644 --- a/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx +++ b/PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx @@ -540,13 +540,15 @@ struct HfElectronSelectionWithTpcEmcal { if (isEMcal) { continue; } - if (std::abs(track.tofNSigmaEl()) > tofNSigmaEl) + if (std::abs(track.tofNSigmaEl()) > tofNSigmaEl) { continue; + } registry.fill(HIST("hTofNSigmaVsPt"), track.tofNSigmaEl(), track.pt()); registry.fill(HIST("hTpcNSigmaVsPt"), track.tpcNSigmaEl(), track.pt()); - if ((track.tpcNSigmaEl() < tpcNsigmaElectronMin || track.tpcNSigmaEl() > tpcNsigmaElectronMax)) + if ((track.tpcNSigmaEl() < tpcNsigmaElectronMin || track.tpcNSigmaEl() > tpcNsigmaElectronMax)) { continue; + } nonHfe(track, tracks, false); ///////////////// NonHf electron Selection without Emcal //////////////////////// diff --git a/PWGHF/HFL/TableProducer/treeCreatorElectronDCA.cxx b/PWGHF/HFL/TableProducer/treeCreatorElectronDCA.cxx index a5195d2eb24..28c2e834a43 100644 --- a/PWGHF/HFL/TableProducer/treeCreatorElectronDCA.cxx +++ b/PWGHF/HFL/TableProducer/treeCreatorElectronDCA.cxx @@ -63,7 +63,7 @@ struct HfTreeCreatorElectronDCA { Configurable etaRange{"etaRange", 0.5, "pseudorapidity range"}; Configurable pTMin{"pTMin", 0.5, "min pT"}; - Service pdg; + Service pdg{}; using TracksWExt = soa::Join; using TracksWExtMc = soa::Join; diff --git a/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx b/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx index c3729516004..2bac954d50d 100644 --- a/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx +++ b/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx @@ -138,7 +138,7 @@ struct HfTaskElectronWeakBoson { Configurable enableZeeRecoQA{"enableZeeRecoQA", false, "Enable QA for Z->ee reconstruction"}; Configurable massZMinQA{"massZMinQA", 0.1, "minimum mass cut for Zee Reco QA"}; // CCDB service object - Service ccdb; + Service ccdb{}; struct HfElectronCandidate { float pt, eta, phi, dcaxyTrk, dcazTrk, eop, energyIso, momIso; @@ -166,7 +166,7 @@ struct HfTaskElectronWeakBoson { // pp // using TrackEle = o2::soa::Filtered>; - Filter eventFilter = (applySel8 ? (o2::aod::evsel::sel8 == true) : (o2::aod::evsel::sel8 == o2::aod::evsel::sel8)); + Filter eventFilter = (applySel8 ? (o2::aod::evsel::sel8 == true) : (o2::aod::evsel::sel8 == o2::aod::evsel::sel8)); // FIXME: both sides of overloaded operator are equivalent Filter posZFilter = (nabs(o2::aod::collision::posZ) < vtxZ); Filter etafilter = (aod::track::eta < etaTrMax) && (aod::track::eta > etaTrMin); @@ -442,7 +442,7 @@ struct HfTaskElectronWeakBoson { if (chiSqNdf > chiSqNdfMax) { continue; } - float massZee, massZeeErr; + float massZee{}, massZeeErr{}; zeeKF.GetMass(massZee, massZeeErr); registry.fill(HIST("hKfInvMassZee"), centrality, track.sign() * charge, kfpIsoEle.GetPt(), massZee); // LOG(info) << "Invarimass cal by KF particle mass = " << massZee; diff --git a/PWGHF/HFL/Tasks/taskSingleElectron.cxx b/PWGHF/HFL/Tasks/taskSingleElectron.cxx index 6c4d1f76833..f114a0dd195 100644 --- a/PWGHF/HFL/Tasks/taskSingleElectron.cxx +++ b/PWGHF/HFL/Tasks/taskSingleElectron.cxx @@ -515,8 +515,8 @@ struct HfTaskSingleElectron { histos.fill(HIST("tofNSigPt"), track.pt(), track.tofNSigmaEl()); histos.fill(HIST("tpcNSigPt"), track.pt(), track.tpcNSigmaEl()); - int mpdg; // electron source pdg code - double mpt; // electron source pt + int mpdg{}; // electron source pdg code + double mpt{}; // electron source pt int const source = getElecSource(track, mpt, mpdg); if (source == DirectBeauty || source == BeautyCharm) { diff --git a/PWGHF/TableProducer/candidateCreator2Prong.cxx b/PWGHF/TableProducer/candidateCreator2Prong.cxx index f30f533c17b..df0d083bb5c 100644 --- a/PWGHF/TableProducer/candidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator2Prong.cxx @@ -116,12 +116,12 @@ struct HfCandidateCreator2Prong { HfEventSelection hfEvSel; // event selection and monitoring o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter - Service ccdb; + Service ccdb{}; int runNumber{0}; double bz{0.}; - const float toMicrometers = 10000.; // from cm to µm + static constexpr float CentiToMicro = 10000.; // from cm to µm std::shared_ptr hCandidates; @@ -313,13 +313,13 @@ struct HfCandidateCreator2Prong { o2::dataformats::DCA impactParameter1; trackParVar0.propagateToDCA(primaryVertex, bz, &impactParameter0); trackParVar1.propagateToDCA(primaryVertex, bz, &impactParameter1); - registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0.getY() * toMicrometers); - registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1.getY() * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track0.pt(), impactParameter0.getZ() * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track1.pt(), impactParameter1.getZ() * toMicrometers); + registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0.getY() * CentiToMicro); + registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1.getY() * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track0.pt(), impactParameter0.getZ() * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track1.pt(), impactParameter1.getZ() * CentiToMicro); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, secondaryVertex, 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.)); @@ -439,15 +439,15 @@ struct HfCandidateCreator2Prong { float impactParameter0XY = 0., errImpactParameter0XY = 0., impactParameter1XY = 0., errImpactParameter1XY = 0.; if (!kfPosPion.GetDistanceFromVertexXY(kfpV, impactParameter0XY, errImpactParameter0XY)) { - registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0XY * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track0.pt(), std::sqrt(kfPosPion.GetDistanceFromVertex(kfpV) * kfPosPion.GetDistanceFromVertex(kfpV) - impactParameter0XY * impactParameter0XY) * toMicrometers); + registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0XY * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track0.pt(), std::sqrt(kfPosPion.GetDistanceFromVertex(kfpV) * kfPosPion.GetDistanceFromVertex(kfpV) - impactParameter0XY * impactParameter0XY) * CentiToMicro); } else { registry.fill(HIST("hDcaXYProngs"), track0.pt(), -999.f); registry.fill(HIST("hDcaZProngs"), track0.pt(), -999.f); } if (!kfNegPion.GetDistanceFromVertexXY(kfpV, impactParameter1XY, errImpactParameter1XY)) { - registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1XY * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track1.pt(), std::sqrt(kfNegPion.GetDistanceFromVertex(kfpV) * kfNegPion.GetDistanceFromVertex(kfpV) - impactParameter1XY * impactParameter1XY) * toMicrometers); + registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1XY * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track1.pt(), std::sqrt(kfNegPion.GetDistanceFromVertex(kfpV) * kfNegPion.GetDistanceFromVertex(kfpV) - impactParameter1XY * impactParameter1XY) * CentiToMicro); } else { registry.fill(HIST("hDcaXYProngs"), track1.pt(), -999.f); registry.fill(HIST("hDcaZProngs"), track1.pt(), -999.f); @@ -472,7 +472,7 @@ struct HfCandidateCreator2Prong { auto* covMatrixSV = kfCandD0.CovarianceMatrix(); - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{kfpV.GetX(), kfpV.GetY(), kfpV.GetZ()}, std::array{kfCandD0.GetX(), kfCandD0.GetY(), kfCandD0.GetZ()}, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixSV, phi, theta)); auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixSV, phi, 0.)); diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index bb03518d889..fa8fbd3ec48 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -133,13 +133,13 @@ struct HfCandidateCreator3Prong { HfEventSelection hfEvSel; // event selection and monitoring o2::vertexing::DCAFitterN<3> df; // 3-prong vertex fitter - Service ccdb; + Service ccdb{}; int runNumber{0}; double bz{0.}; - const float toMicrometers = 10000.; // from cm to µm - constexpr static float UndefValueFloat{-999.f}; + static constexpr float CentiToMicro = 10000.; // from cm to µm + static constexpr float UndefValueFloat{-999.f}; using FilteredHf3Prongs = soa::Filtered; using FilteredPvRefitHf3Prongs = soa::Filtered>; @@ -371,15 +371,15 @@ struct HfCandidateCreator3Prong { trackParVar0.propagateToDCA(primaryVertex, bz, &impactParameter0); trackParVar1.propagateToDCA(primaryVertex, bz, &impactParameter1); trackParVar2.propagateToDCA(primaryVertex, bz, &impactParameter2); - registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0.getY() * toMicrometers); - registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1.getY() * toMicrometers); - registry.fill(HIST("hDcaXYProngs"), track2.pt(), impactParameter2.getY() * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track0.pt(), impactParameter0.getZ() * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track1.pt(), impactParameter1.getZ() * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track2.pt(), impactParameter2.getZ() * toMicrometers); + registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0.getY() * CentiToMicro); + registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1.getY() * CentiToMicro); + registry.fill(HIST("hDcaXYProngs"), track2.pt(), impactParameter2.getY() * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track0.pt(), impactParameter0.getZ() * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track1.pt(), impactParameter1.getZ() * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track2.pt(), impactParameter2.getZ() * CentiToMicro); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, secondaryVertex, 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.)); @@ -513,22 +513,22 @@ struct HfCandidateCreator3Prong { float impactParameter0XY = 0., errImpactParameter0XY = 0., impactParameter1XY = 0., errImpactParameter1XY = 0., impactParameter2XY = 0., errImpactParameter2XY = 0.; if (!kfFirstProton.GetDistanceFromVertexXY(kfpV, impactParameter0XY, errImpactParameter0XY)) { - registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0XY * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track0.pt(), std::sqrt(kfFirstProton.GetDistanceFromVertex(kfpV) * kfFirstProton.GetDistanceFromVertex(kfpV) - impactParameter0XY * impactParameter0XY) * toMicrometers); + registry.fill(HIST("hDcaXYProngs"), track0.pt(), impactParameter0XY * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track0.pt(), std::sqrt(kfFirstProton.GetDistanceFromVertex(kfpV) * kfFirstProton.GetDistanceFromVertex(kfpV) - impactParameter0XY * impactParameter0XY) * CentiToMicro); } else { registry.fill(HIST("hDcaXYProngs"), track0.pt(), UndefValueFloat); registry.fill(HIST("hDcaZProngs"), track0.pt(), UndefValueFloat); } if (!kfSecondKaon.GetDistanceFromVertexXY(kfpV, impactParameter1XY, errImpactParameter1XY)) { - registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1XY * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track1.pt(), std::sqrt(kfSecondKaon.GetDistanceFromVertex(kfpV) * kfSecondKaon.GetDistanceFromVertex(kfpV) - impactParameter1XY * impactParameter1XY) * toMicrometers); + registry.fill(HIST("hDcaXYProngs"), track1.pt(), impactParameter1XY * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track1.pt(), std::sqrt(kfSecondKaon.GetDistanceFromVertex(kfpV) * kfSecondKaon.GetDistanceFromVertex(kfpV) - impactParameter1XY * impactParameter1XY) * CentiToMicro); } else { registry.fill(HIST("hDcaXYProngs"), track1.pt(), UndefValueFloat); registry.fill(HIST("hDcaZProngs"), track1.pt(), UndefValueFloat); } if (!kfThirdProton.GetDistanceFromVertexXY(kfpV, impactParameter2XY, errImpactParameter2XY)) { - registry.fill(HIST("hDcaXYProngs"), track2.pt(), impactParameter2XY * toMicrometers); - registry.fill(HIST("hDcaZProngs"), track2.pt(), std::sqrt(kfThirdProton.GetDistanceFromVertex(kfpV) * kfThirdProton.GetDistanceFromVertex(kfpV) - impactParameter2XY * impactParameter2XY) * toMicrometers); + registry.fill(HIST("hDcaXYProngs"), track2.pt(), impactParameter2XY * CentiToMicro); + registry.fill(HIST("hDcaZProngs"), track2.pt(), std::sqrt(kfThirdProton.GetDistanceFromVertex(kfpV) * kfThirdProton.GetDistanceFromVertex(kfpV) - impactParameter2XY * impactParameter2XY) * CentiToMicro); } else { registry.fill(HIST("hDcaXYProngs"), track2.pt(), UndefValueFloat); registry.fill(HIST("hDcaZProngs"), track2.pt(), UndefValueFloat); @@ -624,7 +624,7 @@ struct HfCandidateCreator3Prong { registry.fill(HIST("hCovSVZZ"), kfCandPKPi.Covariance(2, 2)); auto* covMatrixSV = kfCandPKPi.CovarianceMatrix(); - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{kfpV.GetX(), kfpV.GetY(), kfpV.GetZ()}, std::array{kfCandPKPi.GetX(), kfCandPKPi.GetY(), kfCandPKPi.GetZ()}, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixSV, phi, theta)); auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixSV, phi, 0.)); diff --git a/PWGHF/TableProducer/candidateCreatorB0.cxx b/PWGHF/TableProducer/candidateCreatorB0.cxx index 0387acf0b15..3bb33f59ee3 100644 --- a/PWGHF/TableProducer/candidateCreatorB0.cxx +++ b/PWGHF/TableProducer/candidateCreatorB0.cxx @@ -97,14 +97,11 @@ struct HfCandidateCreatorB0 { Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; int runNumber{}; - double massPi{0.}; - double massD{0.}; - double massB0{0.}; double invMass2DPiMin{0.}; double invMass2DPiMax{0.}; double bz{0.}; @@ -136,11 +133,8 @@ struct HfCandidateCreatorB0 { void init(InitContext const&) { // invariant-mass window cut - massPi = MassPiPlus; - massD = MassDMinus; - massB0 = MassB0; - invMass2DPiMin = (massB0 - invMassWindowB0) * (massB0 - invMassWindowB0); - invMass2DPiMax = (massB0 + invMassWindowB0) * (massB0 + invMassWindowB0); + invMass2DPiMin = (MassB0 - invMassWindowB0) * (MassB0 - invMassWindowB0); + invMass2DPiMax = (MassB0 + invMassWindowB0) * (MassB0 + invMassWindowB0); // Initialise fitter for B vertex (2-prong vertex filter) df2.setPropagateToPCA(propagateToPCA); @@ -352,7 +346,7 @@ struct HfCandidateCreatorB0 { df2.getTrack(1).getPxPyPzGlo(pVecPion); // momentum of Pi at the B0 vertex // calculate invariant mass square and apply selection - auto invMass2DPi = RecoDecay::m2(std::array{pVecD, pVecPion}, std::array{massD, massPi}); + auto invMass2DPi = RecoDecay::m2(std::array{pVecD, pVecPion}, std::array{MassDMinus, MassPiPlus}); if ((invMass2DPi < invMass2DPiMin) || (invMass2DPi > invMass2DPiMax)) { continue; } @@ -365,7 +359,7 @@ struct HfCandidateCreatorB0 { trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB0, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/TableProducer/candidateCreatorBplus.cxx b/PWGHF/TableProducer/candidateCreatorBplus.cxx index 20e1536cd7e..cb31d5e2d8a 100644 --- a/PWGHF/TableProducer/candidateCreatorBplus.cxx +++ b/PWGHF/TableProducer/candidateCreatorBplus.cxx @@ -106,7 +106,7 @@ struct HfCandidateCreatorBplus { Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; int runNumber{}; @@ -345,7 +345,7 @@ struct HfCandidateCreatorBplus { trackParCovPi.propagateToDCA(primaryVertex, bz, &impactParameter1); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secVertexBplus, 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.)); diff --git a/PWGHF/TableProducer/candidateCreatorBs.cxx b/PWGHF/TableProducer/candidateCreatorBs.cxx index e73eaa4215a..449a13d6eb4 100644 --- a/PWGHF/TableProducer/candidateCreatorBs.cxx +++ b/PWGHF/TableProducer/candidateCreatorBs.cxx @@ -98,14 +98,11 @@ struct HfCandidateCreatorBs { o2::vertexing::DCAFitterN<2> df2; // 2-prong vertex fitter o2::vertexing::DCAFitterN<3> df3; // 3-prong vertex fitter - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; int runNumber{0}; - double massPi{0.}; - double massDs{0.}; - double massBs{0.}; double massDsPi{0.}; double bz{0.}; @@ -130,10 +127,6 @@ struct HfCandidateCreatorBs { void init(InitContext const&) { - massPi = MassPiPlus; - massDs = MassDSBar; - massBs = MassBS; - // Initialise fitter for Bs vertex (2-prong vertex fitter) df2.setPropagateToPCA(propagateToPCA); df2.setMaxR(maxR); @@ -331,8 +324,8 @@ struct HfCandidateCreatorBs { df2.getTrack(1).getPxPyPzGlo(pVecPion); // momentum of Pi at the Bs vertex // calculate invariant mass and apply selection - massDsPi = RecoDecay::m(std::array{pVecDs, pVecPion}, std::array{massDs, massPi}); - if (std::abs(massDsPi - massBs) > invMassWindowBs) { + massDsPi = RecoDecay::m(std::array{pVecDs, pVecPion}, std::array{MassDSBar, MassPiPlus}); + if (std::abs(massDsPi - MassBS) > invMassWindowBs) { continue; } @@ -343,7 +336,7 @@ struct HfCandidateCreatorBs { trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; // getPointDirection modifies phi and theta getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBs, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/TableProducer/candidateCreatorCascade.cxx b/PWGHF/TableProducer/candidateCreatorCascade.cxx index a0bb58dfd4c..db47c6dcb25 100644 --- a/PWGHF/TableProducer/candidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/candidateCreatorCascade.cxx @@ -92,15 +92,11 @@ struct HfCandidateCreatorCascade { HfEventSelection hfEvSel; // event selection and monitoring o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; int runNumber{0}; - double massP{0.}; - double massK0s{0.}; - double massPi{0.}; - double massLc{0.}; double mass2K0sP{0.}; double bz = 0.; @@ -143,11 +139,6 @@ struct HfCandidateCreatorCascade { // init HF event selection helper hfEvSel.init(registry, &zorroSummary); - massP = MassProton; - massK0s = MassK0Short; - massPi = MassPiPlus; - massLc = MassLambdaCPlus; - // df.setBz(bz); df.setPropagateToPCA(propagateToPCA); df.setMaxR(maxR); @@ -196,10 +187,10 @@ struct HfCandidateCreatorCascade { } int posGlobalIndex = -1, negGlobalIndex = -1; - float v0X, v0Y, v0Z, v0px, v0py, v0pz; - float v0PosPx, v0PosPy, v0PosPz, v0NegPx, v0NegPy, v0NegPz; - float dcaV0dau, dcaPosToPV, dcaNegToPV, v0cosPA; - std::array covV = {0.}; + float v0X{}, v0Y{}, v0Z{}, v0px{}, v0py{}, v0pz{}; + float v0PosPx{}, v0PosPy{}, v0PosPz{}, v0NegPx{}, v0NegPy{}, v0NegPz{}; + float dcaV0dau{}, dcaPosToPV{}, dcaNegToPV{}, v0cosPA{}; + std::array covV{}; auto v0index = casc.template v0_as(); if (v0index.has_v0Data()) { @@ -296,7 +287,7 @@ struct HfCandidateCreatorCascade { trackParVarBach.propagateToDCA(primaryVertex, bz, &impactParameterBach); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertex, 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.)); @@ -324,7 +315,7 @@ struct HfCandidateCreatorCascade { // fill histograms if (fillHistograms) { // calculate invariant masses - mass2K0sP = RecoDecay::m(std::array{pVecBach, pVecV0}, std::array{massP, massK0s}); + mass2K0sP = RecoDecay::m(std::array{pVecBach, pVecV0}, std::array{MassProton, MassK0Short}); registry.fill(HIST("hMass2"), mass2K0sP); } } diff --git a/PWGHF/TableProducer/candidateCreatorDstar.cxx b/PWGHF/TableProducer/candidateCreatorDstar.cxx index 185e5f26206..207c099032d 100644 --- a/PWGHF/TableProducer/candidateCreatorDstar.cxx +++ b/PWGHF/TableProducer/candidateCreatorDstar.cxx @@ -105,15 +105,14 @@ struct HfCandidateCreatorDstar { Configurable useAbsDCA{"useAbsDCA", false, "Minimise abs. distance rather than chi2"}; Configurable useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"}; - HfEventSelection hfEvSel; // event selection and monitoring - Service ccdb; // From utilsBfieldCCDB.h + HfEventSelection hfEvSel; // event selection and monitoring + Service ccdb{}; // From utilsBfieldCCDB.h o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; // D0-prong vertex fitter o2::vertexing::DCAFitterN<2> df; int runNumber{}; double bz{}; static constexpr float CmToMicrometers = 10000.; // from cm to µm - double massPi{}, massK{}, massD0{}; using TracksWCovExtraPidPiKa = soa::Join; @@ -177,9 +176,6 @@ struct HfCandidateCreatorDstar { hfEvSel.init(registry, &zorroSummary); // LOG(info) << "Init Function Invoked"; - massPi = MassPiPlus; - massK = MassKPlus; - massD0 = MassD0; df.setPropagateToPCA(propagateToPCA); df.setMaxR(maxR); @@ -337,7 +333,7 @@ struct HfCandidateCreatorDstar { registry.fill(HIST("QA/hDCAZPi"), trackPi.pt(), impactParameterPi.getZ() * CmToMicrometers); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, secondaryVertex, phi, theta); // Calculates the XX element of a XYZ covariance matrix after rotation of the coordinate system by phi around the z-axis and by minus theta around the new y-axis. auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta)); diff --git a/PWGHF/TableProducer/candidateCreatorLb.cxx b/PWGHF/TableProducer/candidateCreatorLb.cxx index 3cc9716241e..a9433c1a35f 100644 --- a/PWGHF/TableProducer/candidateCreatorLb.cxx +++ b/PWGHF/TableProducer/candidateCreatorLb.cxx @@ -80,8 +80,6 @@ struct HfCandidateCreatorLb { o2::vertexing::DCAFitterN<2> df2; // 2-prong vertex fitter o2::vertexing::DCAFitterN<3> df3; // 3-prong vertex fitter (to rebuild Lc vertex) - double massPi{0.}; - double massLc{0.}; double massLcPi{0.}; Filter filterSelectCandidates = (aod::hf_sel_candidate_lc::isSelLcToPKPi >= selectionFlagLc || aod::hf_sel_candidate_lc::isSelLcToPiKP >= selectionFlagLc); @@ -99,9 +97,6 @@ struct HfCandidateCreatorLb { void init(InitContext const&) { - massPi = MassPiMinus; - massLc = MassLambdaCPlus; - df2.setBz(bz); df2.setPropagateToPCA(propagateToPCA); df2.setMaxR(maxR); @@ -230,7 +225,7 @@ struct HfCandidateCreatorLb { hCovPVXX->Fill(covMatrixPV[0]); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexLb, 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.)); @@ -248,7 +243,7 @@ struct HfCandidateCreatorLb { rowCandidateProngs(lcCand.globalIndex(), trackPion.globalIndex()); // calculate invariant mass auto arrayMomenta = std::array{pvecLc, pvecPion}; - massLcPi = RecoDecay::m(arrayMomenta, std::array{massLc, massPi}); + massLcPi = RecoDecay::m(arrayMomenta, std::array{MassLambdaCPlus, MassPiMinus}); if (lcCand.isSelLcToPKPi() > 0) { hMassLbToLcPi->Fill(massLcPi); } diff --git a/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx b/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx index c482eb702f9..543c98c266b 100644 --- a/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx +++ b/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx @@ -101,7 +101,7 @@ struct HfCandidateCreatorSigmac0plusplus { TrackSelection softPiCuts; // Needed for dcaXY, dcaZ recalculation of soft pions reassigned to a new collision - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; int runNumber{}; diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index b4e2e3f0aa4..effec87820d 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -143,7 +143,7 @@ struct HfCandidateCreatorXic0Omegac0 { HfEventSelection hfEvSel; // event selection and monitoring o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter to build the omegac/xic vertex - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; int runNumber{-1}; @@ -619,7 +619,7 @@ struct HfCandidateCreatorXic0Omegac0 { float const decLenCascade = RecoDecay::distance(coordVtxCharmBaryon, vertexCasc); float const decLenV0 = RecoDecay::distance(vertexCasc, vertexV0); - double phiCharmBaryon, thetaCharmBaryon; + double phiCharmBaryon{}, thetaCharmBaryon{}; getPointDirection(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, coordVtxCharmBaryon, phiCharmBaryon, thetaCharmBaryon); auto errorDecayLengthCharmBaryon = std::sqrt(getRotatedCovMatrixXX(primaryVertex.getCov(), phiCharmBaryon, thetaCharmBaryon) + getRotatedCovMatrixXX(covVtxCharmBaryon, phiCharmBaryon, thetaCharmBaryon)); auto errorDecayLengthXYCharmBaryon = std::sqrt(getRotatedCovMatrixXX(primaryVertex.getCov(), phiCharmBaryon, 0.) + getRotatedCovMatrixXX(covVtxCharmBaryon, phiCharmBaryon, 0.)); @@ -846,7 +846,7 @@ struct HfCandidateCreatorXic0Omegac0 { } // mass window cut on lambda before mass constraint - float massLam, sigLam; + float massLam{}, sigLam{}; kfV0.GetMass(massLam, sigLam); if (std::abs(massLam - MassLambda0) > lambdaMassWindow) { continue; @@ -879,8 +879,8 @@ struct HfCandidateCreatorXic0Omegac0 { LOG(debug) << "Failed to construct Omega or Omega_rej from V0 and bachelor track: " << e.what(); continue; } - float massCasc, sigCasc; - float massCascrej, sigCascrej; + float massCasc{}, sigCasc{}; + float massCascrej{}, sigCascrej{}; kfOmega.GetMass(massCasc, sigCasc); kfOmegarej.GetMass(massCascrej, sigCascrej); // rej // err_massOmega > 0 @@ -920,7 +920,7 @@ struct HfCandidateCreatorXic0Omegac0 { LOG(debug) << "Failed to construct OmegaC0 from Cascade and bachelor pion track: " << e.what(); continue; } - float massOmegaC0, sigOmegaC0; + float massOmegaC0{}, sigOmegaC0{}; kfOmegaC0.GetMass(massOmegaC0, sigOmegaC0); if (sigOmegaC0 <= 0) { continue; @@ -1034,7 +1034,7 @@ struct HfCandidateCreatorXic0Omegac0 { float const decLenCascade = RecoDecay::distance(coordVtxCharmBaryon, vertexCasc); float const decLenV0 = RecoDecay::distance(vertexCasc, vertexV0); - double phiCharmBaryon, thetaCharmBaryon; + double phiCharmBaryon{}, thetaCharmBaryon{}; getPointDirection(std::array{kfV0.GetX(), kfV0.GetY(), kfV0.GetZ()}, coordVtxCharmBaryon, phiCharmBaryon, thetaCharmBaryon); auto errorDecayLengthCharmBaryon = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phiCharmBaryon, thetaCharmBaryon) + getRotatedCovMatrixXX(covVtxCharmBaryon, phiCharmBaryon, thetaCharmBaryon)); auto errorDecayLengthXYCharmBaryon = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phiCharmBaryon, 0.) + getRotatedCovMatrixXX(covVtxCharmBaryon, phiCharmBaryon, 0.)); diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index 2412ca83708..a618360598f 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -112,7 +112,7 @@ struct HfCandidateCreatorXicToXiPiPi { Configurable kfConstructMethod{"kfConstructMethod", 2, "Construct method of XicPlus: 0 fast mathematics without constraint of fixed daughter particle masses, 2 daughter particle masses stay fixed in construction process"}; Configurable rejDiffCollTrack{"rejDiffCollTrack", true, "Reject tracks coming from different collisions (effective only for KFParticle w/o derived data)"}; - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; @@ -345,7 +345,7 @@ struct HfCandidateCreatorXicToXiPiPi { massXiPi1 = RecoDecay::m(arrayMomentaXiPi1, std::array{MassXiMinus, MassPiPlus}); // get uncertainty of the decay length - float phi, theta; + float phi{}, theta{}; getPointDirection(std::array{primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()}, secondaryVertex, phi, theta); auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixSV, phi, theta)); auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixSV, phi, 0.)); @@ -362,7 +362,7 @@ struct HfCandidateCreatorXicToXiPiPi { // Lambda daughters auto trackPosLambdaDaughter = casc.posTrack_as(); auto trackNegLambdaDaughter = casc.negTrack_as(); - float pPiFromLambda, pPrFromLambda, nSigTpcPiFromLambda, nSigTofPiFromLambda, nSigTpcPrFromLambda, nSigTofPrFromLambda; + float pPiFromLambda{}, pPrFromLambda{}, nSigTpcPiFromLambda{}, nSigTofPiFromLambda{}, nSigTpcPrFromLambda{}, nSigTofPrFromLambda{}; if (signXic == +1) { pPiFromLambda = trackNegLambdaDaughter.p(); nSigTpcPiFromLambda = trackNegLambdaDaughter.tpcNSigmaPi(); @@ -591,7 +591,7 @@ struct HfCandidateCreatorXicToXiPiPi { // mass of Xi-Pi0 pair KFParticle kfXiPi0; - float errMassXiPi0; + float errMassXiPi0{}; const KFParticle* kfXiResonanceDaughtersPi0[2] = {&kfXi, &kfCharmBachelor0}; kfXiPi0.SetConstructMethod(kfConstructMethod); try { @@ -603,7 +603,7 @@ struct HfCandidateCreatorXicToXiPiPi { // mass of Xi-Pi1 pair KFParticle kfXiPi1; - float errMassXiPi1; + float errMassXiPi1{}; const KFParticle* kfXiResonanceDaughtersPi1[2] = {&kfXi, &kfCharmBachelor1}; kfXiPi1.SetConstructMethod(kfConstructMethod); try { @@ -614,7 +614,7 @@ struct HfCandidateCreatorXicToXiPiPi { kfXiPi1.GetMass(massXiPi1, errMassXiPi1); // get invariant mass of Xic candidate - float errMassXiPiPi; + float errMassXiPiPi{}; kfXicPlus.GetMass(massXiPiPi, errMassXiPiPi); // decay length of XicPlus @@ -637,7 +637,7 @@ struct HfCandidateCreatorXicToXiPiPi { // Lambda daughters auto trackPosLambdaDaughter = casc.posTrack_as(); auto trackNegLambdaDaughter = casc.negTrack_as(); - float pPiFromLambda, pPrFromLambda, nSigTpcPiFromLambda, nSigTofPiFromLambda, nSigTpcPrFromLambda, nSigTofPrFromLambda; + float pPiFromLambda{}, pPrFromLambda{}, nSigTpcPiFromLambda{}, nSigTofPiFromLambda{}, nSigTpcPrFromLambda{}, nSigTofPrFromLambda{}; if (signXic == +1) { pPiFromLambda = trackNegLambdaDaughter.p(); nSigTpcPiFromLambda = trackNegLambdaDaughter.tpcNSigmaPi(); diff --git a/PWGHF/TableProducer/candidateCreatorXicc.cxx b/PWGHF/TableProducer/candidateCreatorXicc.cxx index cde56b878aa..1a04f8a242a 100644 --- a/PWGHF/TableProducer/candidateCreatorXicc.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicc.cxx @@ -185,7 +185,7 @@ struct HfCandidateCreatorXicc { trackParVarPi.propagateToDCA(primaryVertex, bz, &impactParameter1); // get uncertainty of the decay length - double phi, theta; + double phi{}, theta{}; getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexXicc, 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.)); @@ -225,9 +225,9 @@ struct HfCandidateCreatorXiccMc { aod::TracksWMc const&, aod::McParticles const& mcParticles) { - int8_t sign = 0; - int8_t flag; - int8_t origin; + int8_t sign{}; + int8_t flag{}; + int8_t origin{}; // Match reconstructed candidates. for (const auto& candidate : candidates) { diff --git a/PWGHF/TableProducer/candidateSelectorCd.cxx b/PWGHF/TableProducer/candidateSelectorCd.cxx index eb5173c3570..61c662ada3e 100644 --- a/PWGHF/TableProducer/candidateSelectorCd.cxx +++ b/PWGHF/TableProducer/candidateSelectorCd.cxx @@ -82,7 +82,7 @@ struct HfCandidateSelectorCd { TrackSelectorKa selectorKaon; TrackSelectorDe selectorDeuteron; - const float massCharmDeuteron = 3.23; // possible mass + static constexpr float MassCharmDeuteron{3.23f}; // possible mass using TracksSel = soa::Join; @@ -218,7 +218,7 @@ struct HfCandidateSelectorCd { } // cut on Cd->deKpi, piKde mass values - if (std::abs(massCd - massCharmDeuteron) > cuts->get(binPt, "m")) { + if (std::abs(massCd - MassCharmDeuteron) > cuts->get(binPt, "m")) { return false; } diff --git a/PWGHF/TableProducer/candidateSelectorD0.cxx b/PWGHF/TableProducer/candidateSelectorD0.cxx index 8d72e1c2b3a..791d9c3f6e5 100644 --- a/PWGHF/TableProducer/candidateSelectorD0.cxx +++ b/PWGHF/TableProducer/candidateSelectorD0.cxx @@ -244,7 +244,7 @@ struct HfCandidateSelectorD0 { } // invariant-mass cut - float massD0, massD0bar; + float massD0{}, massD0bar{}; if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) { massD0 = candidate.kfGeoMassD0(); massD0bar = candidate.kfGeoMassD0bar(); diff --git a/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx index 6e9a18014a5..f8e71198d1c 100644 --- a/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx @@ -310,7 +310,7 @@ struct HfDerivedDataCreatorD0ToKPi { double const ct = HfHelper::ctD0(candidate); double const y = HfHelper::yD0(candidate); - float massD0, massD0bar; + float massD0{}, massD0bar{}; float topolChi2PerNdf = -999.; if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) { massD0 = candidate.kfGeoMassD0(); diff --git a/PWGHF/TableProducer/mcPidTof.cxx b/PWGHF/TableProducer/mcPidTof.cxx index d89a7c7144e..8f22f47c7c2 100644 --- a/PWGHF/TableProducer/mcPidTof.cxx +++ b/PWGHF/TableProducer/mcPidTof.cxx @@ -351,7 +351,7 @@ struct TofSignal { HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; // Detector response and input parameters o2::pid::tof::TOFResoParamsV3 mRespParamsV3; - Service ccdb; + Service ccdb{}; struct : ConfigurableGroup { Configurable cfgUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable cfgPathGrpLhcIf{"ccdb-path-grplhcif", "GLO/Config/GRPLHCIF", "Path on the CCDB for the GRPLHCIF object"}; @@ -471,7 +471,7 @@ struct TofEventTime { bool enableTableEvTimeTOFOnly = false; // Detector response and input parameters o2::pid::tof::TOFResoParamsV3 mRespParamsV3; - Service ccdb; + Service ccdb{}; TOFCalibConfig mTOFCalibConfig; // TOF Calib configuration // Event time configurations @@ -737,7 +737,7 @@ struct McPidTof { // Detector response parameters o2::pid::tof::TOFResoParamsV3 mRespParamsV3; - Service ccdb; + Service ccdb{}; TOFCalibConfig mTOFCalibConfig; // TOF Calib configuration Configurable enableQaHistograms{"enableQaHistograms", false, "Flag to enable the QA histograms"}; diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index af82614aa68..bdffd245351 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -130,8 +130,8 @@ struct HfTrackIndexSkimCreatorTagSelCollisions { Configurable fillHistograms{"fillHistograms", true, "fill histograms"}; Configurable triggerClassName{"triggerClassName", "kINT7", "Run 2 trigger class, only for Run 2 converted data"}; - HfEventSelection hfEvSel; // event selection and monitoring - Service ccdb; // needed for evSelection + HfEventSelection hfEvSel; // event selection and monitoring + Service ccdb{}; // needed for evSelection // QA histos HistogramRegistry registry{"registry"}; @@ -321,7 +321,7 @@ struct HfTrackIndexSkimCreatorTagSelTracks { SliceCache cache; // Needed for PV refitting - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; int runNumber{}; @@ -1277,7 +1277,7 @@ struct HfTrackIndexSkimCreator { o2::vertexing::DCAFitterN<2> df2; // 2-prong vertex fitter o2::vertexing::DCAFitterN<3> df3; // 3-prong vertex fitter // Needed for PV refitting - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; int runNumber{}; @@ -3104,7 +3104,7 @@ struct HfTrackIndexSkimCreatorCascades { o2::vertexing::DCAFitterN<2> df2; // 2-prong vertex fitter // Needed for PV refitting - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; @@ -3367,7 +3367,7 @@ struct HfTrackIndexSkimCreatorLfCascades { } config; o2::vertexing::DCAFitterN<2> df2; // 2-prong vertex fitter - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; int runNumber{}; diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 17093c0ef64..7ad269131f9 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -435,7 +435,7 @@ struct HfTreeCreatorD0ToKPi { double const yD = HfHelper::yD0(candidate); double const eD = HfHelper::eD0(candidate); double const ctD = HfHelper::ctD0(candidate); - float massD0, massD0bar; + float massD0{}, massD0bar{}; float topolChi2PerNdf = -999.; if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) { massD0 = candidate.kfGeoMassD0(); @@ -536,7 +536,7 @@ struct HfTreeCreatorD0ToKPi { double const yD = HfHelper::yD0(candidate); double const eD = HfHelper::eD0(candidate); double const ctD = HfHelper::ctD0(candidate); - float massD0, massD0bar; + float massD0{}, massD0bar{}; float topolChi2PerNdf = -999.; if constexpr (ReconstructionType == aod::hf_cand::VertexerType::KfParticle) { massD0 = candidate.kfGeoMassD0(); diff --git a/PWGHF/TableProducer/treeCreatorLcToPKPi.cxx b/PWGHF/TableProducer/treeCreatorLcToPKPi.cxx index c49d09dfc2d..9556001f1f8 100644 --- a/PWGHF/TableProducer/treeCreatorLcToPKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorLcToPKPi.cxx @@ -813,22 +813,22 @@ struct HfTreeCreatorLcToPKPi { int functionSelection, int sigbgstatus) { - float chi2primProton; - float chi2primPion; - float dcaProtonKaon; - float dcaPionKaon; - float chi2GeoProtonKaon; - float chi2GeoPionKaon; - float mass; - float valueTpcNSigmaPr; + float chi2primProton{}; + float chi2primPion{}; + float dcaProtonKaon{}; + float dcaPionKaon{}; + float chi2GeoProtonKaon{}; + float chi2GeoPionKaon{}; + float mass{}; + float valueTpcNSigmaPr{}; const float valueTpcNSigmaKa = candidate.nSigTpcKa1(); - float valueTpcNSigmaPi; - float valueTofNSigmaPr; + float valueTpcNSigmaPi{}; + float valueTofNSigmaPr{}; const float valueTofNSigmaKa = candidate.nSigTofKa1(); - float valueTofNSigmaPi; - float valueTpcTofNSigmaPr; + float valueTofNSigmaPi{}; + float valueTpcTofNSigmaPr{}; const float valueTpcTofNSigmaKa = candidate.tpcTofNSigmaKa1(); - float valueTpcTofNSigmaPi; + float valueTpcTofNSigmaPi{}; if (candFlag == 0) { chi2primProton = candidate.kfChi2PrimProng0(); chi2primPion = candidate.kfChi2PrimProng2(); @@ -953,7 +953,7 @@ struct HfTreeCreatorLcToPKPi { fillKFTable(candidate, collision, candFlag, functionSelection, sigbgstatus); } if (fillCandidateMcTable) { - float p, pt, svX, svY, svZ, pvX, pvY, pvZ, decayLength, lifetime; + float p{}, pt{}, svX{}, svY{}, svZ{}, pvX{}, pvY{}, pvZ{}, decayLength{}, lifetime{}; if (!isMcCandidateSignal) { p = UndefValueFloat; pt = UndefValueFloat; diff --git a/PWGHF/TableProducer/treeCreatorOmegacSt.cxx b/PWGHF/TableProducer/treeCreatorOmegacSt.cxx index b443d8abc5a..448e67f7eec 100644 --- a/PWGHF/TableProducer/treeCreatorOmegacSt.cxx +++ b/PWGHF/TableProducer/treeCreatorOmegacSt.cxx @@ -261,7 +261,7 @@ struct HfTreeCreatorOmegacSt { Configurable cfgTriggersOfInterest{"cfgTriggersOfInterest", "fTrackedOmega,fHfCharmBarToXiBach", "Triggers of interest, comma separated for Zorro"}; SliceCache cache; - Service ccdb; + Service ccdb{}; o2::vertexing::DCAFitterN<2> df2; static constexpr int ItsNClsMin{4}; diff --git a/PWGHF/TableProducer/treeCreatorTccToD0D0Pi.cxx b/PWGHF/TableProducer/treeCreatorTccToD0D0Pi.cxx index e57a9c5c7c0..ea21152f5d2 100644 --- a/PWGHF/TableProducer/treeCreatorTccToD0D0Pi.cxx +++ b/PWGHF/TableProducer/treeCreatorTccToD0D0Pi.cxx @@ -258,7 +258,7 @@ struct HfTreeCreatorTccToD0D0Pi { o2::vertexing::DCAFitterN<2> dfD1; // 2-prong vertex fitter (to rebuild D01 vertex) o2::vertexing::DCAFitterN<2> dfD2; // 2-prong vertex fitter (to rebuild D02 vertex) - Service ccdb; + Service ccdb{}; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; double bz{0.}; diff --git a/PWGHF/Tasks/taskMcEfficiency.cxx b/PWGHF/Tasks/taskMcEfficiency.cxx index 5f706c7bede..dc9b708dfeb 100644 --- a/PWGHF/Tasks/taskMcEfficiency.cxx +++ b/PWGHF/Tasks/taskMcEfficiency.cxx @@ -69,7 +69,7 @@ struct HfTaskMcEfficiency { Configurable mcAcceptancePt{"mcAcceptancePt", 0.1, "MC Acceptance: lower pt limit"}; Configurable mcAcceptanceEta{"mcAcceptanceEta", 0.8, "MC Acceptance: upper eta limit"}; - Service pdg; + Service pdg{}; enum HFStep { kHFStepMC = 0, kHFStepMcInRapidity, // MC mothers in rapidity |y| < 0.5 diff --git a/PWGHF/Tasks/taskMcInjection.cxx b/PWGHF/Tasks/taskMcInjection.cxx index b0377cecc23..b649cf88851 100644 --- a/PWGHF/Tasks/taskMcInjection.cxx +++ b/PWGHF/Tasks/taskMcInjection.cxx @@ -142,19 +142,23 @@ struct HfTaskMcInjection { bool isCharm(int pdg) { - if (std::abs(pdg) / 1000 == PDG_t::kCharm) // o2-linter: disable=magic-number (get thousands digit) + if (std::abs(pdg) / 1000 == PDG_t::kCharm) { // o2-linter: disable=magic-number (get thousands digit) return true; - if (std::abs(pdg) / 100 == PDG_t::kCharm) // o2-linter: disable=magic-number (get hundreds digit) + } + if (std::abs(pdg) / 100 == PDG_t::kCharm) { // o2-linter: disable=magic-number (get hundreds digit) return true; + } return false; } bool isBeauty(int pdg) // if needed in the future { - if (std::abs(pdg) / 1000 == PDG_t::kBottom) // o2-linter: disable=magic-number (get thousands digit) + if (std::abs(pdg) / 1000 == PDG_t::kBottom) { // o2-linter: disable=magic-number (get thousands digit) return true; - if (std::abs(pdg) / 100 == PDG_t::kBottom) // o2-linter: disable=magic-number (get hundreds digit) + } + if (std::abs(pdg) / 100 == PDG_t::kBottom) { // o2-linter: disable=magic-number (get hundreds digit) return true; + } return false; } diff --git a/PWGHF/Tasks/taskMcValidation.cxx b/PWGHF/Tasks/taskMcValidation.cxx index 8f3c5164aa6..4cbb1100766 100644 --- a/PWGHF/Tasks/taskMcValidation.cxx +++ b/PWGHF/Tasks/taskMcValidation.cxx @@ -663,7 +663,7 @@ struct HfTaskMcValidationRec { Preslice cand2ProngPerCollision = aod::hf_cand::collisionId; Preslice cand3ProngPerCollision = aod::hf_cand::collisionId; - Service ccdb; + Service ccdb{}; HfEventSelection hfEvSel; // event selection and monitoring AxisSpec axisDeltaMom{2000, -1., 1.}; @@ -1105,7 +1105,7 @@ struct HfTaskMcValidationRec { if (std::abs(cand2Prong.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) { whichHad = DzeroToKPi; } - int whichOrigin; + int whichOrigin{}; if (cand2Prong.originMcRec() == RecoDecay::OriginType::Prompt) { whichOrigin = 0; } else { @@ -1153,7 +1153,7 @@ struct HfTaskMcValidationRec { } else if (isXicSel && std::abs(cand3Prong.flagMcMatchRec()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::XicToPKPi) { whichHad = XiCplusToPKPi; } - int whichOrigin; + int whichOrigin{}; if (cand3Prong.originMcRec() == RecoDecay::OriginType::Prompt) { whichOrigin = 0; } else { diff --git a/PWGHF/Tasks/taskPidStudies.cxx b/PWGHF/Tasks/taskPidStudies.cxx index e7115cd91d8..3c9bd0de808 100644 --- a/PWGHF/Tasks/taskPidStudies.cxx +++ b/PWGHF/Tasks/taskPidStudies.cxx @@ -22,6 +22,7 @@ #include "PWGLF/DataModel/LFStrangenessTables.h" #include "Common/CCDB/ctpRateFetcher.h" +#include "Common/Core/ZorroSummary.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" #include "Common/DataModel/PIDResponseTOF.h" @@ -212,7 +213,7 @@ struct HfTaskPidStudies { HfEventSelectionMc hfEvSelMc; double interactionRate{-1.}; - o2::framework::Service ccdb; + o2::framework::Service ccdb{}; HistogramRegistry registry{"registry", {}}; OutputObj zorroSummary{"zorroSummary"}; diff --git a/PWGHF/Utils/utilsEvSelHf.h b/PWGHF/Utils/utilsEvSelHf.h index fcf4c389fe0..b3be162359d 100644 --- a/PWGHF/Utils/utilsEvSelHf.h +++ b/PWGHF/Utils/utilsEvSelHf.h @@ -30,8 +30,8 @@ #include "Common/Core/Zorro.h" #include "Common/Core/ZorroSummary.h" -#include "CCDB/BasicCCDBManager.h" -#include "DataFormatsParameters/GRPLHCIFData.h" +#include +#include #include #include #include