diff --git a/Common/Core/RecoDecay.h b/Common/Core/RecoDecay.h index bc8a93efa5c..d889620c933 100644 --- a/Common/Core/RecoDecay.h +++ b/Common/Core/RecoDecay.h @@ -170,13 +170,13 @@ class RecoDecay /// \param mom 3-momentum array /// \return pseudorapidity template - static double Eta(const array& mom) + static double eta(const array& mom) { // eta = arctanh(pz/p) if (std::abs(mom[0]) < Almost0 && std::abs(mom[1]) < Almost0) { // very small px and py return (double)(mom[2] > 0 ? VeryBig : -VeryBig); } - return (double)(std::atanh(mom[2] / P(mom))); + return (double)(std::atanh(mom[2] / p(mom))); } /// Calculates rapidity. @@ -184,17 +184,17 @@ class RecoDecay /// \param mass mass /// \return rapidity template - static double Y(const array& mom, U mass) + static double y(const array& mom, U mass) { // y = arctanh(pz/E) - return std::atanh(mom[2] / E(mom, mass)); + return std::atanh(mom[2] / e(mom, mass)); } /// Calculates azimuth from x and y components. /// \param x,y {x, y} components /// \return azimuth within [0, 2π] template - static double Phi(T x, U y) + static double phi(T x, U y) { // conversion from [-π, +π] returned by atan2 to [0, 2π] return std::atan2((double)(-y), (double)(-x)) + o2::constants::math::PI; @@ -205,9 +205,9 @@ class RecoDecay /// \param vec vector (container of elements accessible by index) /// \return azimuth within [0, 2π] template - static double Phi(const T& vec) + static double phi(const T& vec) { - return Phi(vec[0], vec[1]); + return phi(vec[0], vec[1]); } /// Constrains angle to be within a range. @@ -233,7 +233,7 @@ class RecoDecay /// \param mom 3-momentum array /// \return cosine of pointing angle template - static double CPA(const T& posPV, const U& posSV, const array& mom) + static double cpa(const T& posPV, const U& posSV, const array& mom) { // CPA = (l . p)/(|l| |p|) auto lineDecay = array{posSV[0] - posPV[0], posSV[1] - posPV[1], posSV[2] - posPV[2]}; @@ -253,7 +253,7 @@ class RecoDecay /// \param mom {x, y, z} or {x, y} momentum array /// \return cosine of pointing angle in {x, y} template - static double CPAXY(const T& posPV, const U& posSV, const array& mom) + static double cpaXY(const T& posPV, const U& posSV, const array& mom) { // CPAXY = (r . pT)/(|r| |pT|) auto lineDecay = array{posSV[0] - posPV[0], posSV[1] - posPV[1]}; @@ -275,10 +275,10 @@ class RecoDecay /// \param length decay length /// \return proper lifetime times c template - static double Ct(const array& mom, U length, V mass) + static double ct(const array& mom, U length, V mass) { // c t = l m c^2/(p c) - return (double)length * (double)mass / P(mom); + return (double)length * (double)mass / p(mom); } /// Calculates cosine of θ* (theta star). @@ -289,11 +289,11 @@ class RecoDecay /// \param iProng index of the prong /// \return cosine of θ* of the i-th prong under the assumption of the invariant mass template - static double CosThetaStar(const array, 2>& arrMom, const array& arrMass, V mTot, int iProng) + static double cosThetaStar(const array, 2>& arrMom, const array& arrMass, V mTot, int iProng) { - auto pVecTot = PVec(arrMom[0], arrMom[1]); // momentum of the mother particle - auto pTot = P(pVecTot); // magnitude of the momentum of the mother particle - auto eTot = E(pTot, mTot); // energy of the mother particle + auto pVecTot = pVec(arrMom[0], arrMom[1]); // momentum of the mother particle + auto pTot = p(pVecTot); // magnitude of the momentum of the mother particle + auto eTot = e(pTot, mTot); // energy of the mother particle auto gamma = eTot / mTot; // γ, Lorentz gamma factor of the mother particle auto beta = pTot / eTot; // β, velocity of the mother particle auto pStar = std::sqrt(sq(sq(mTot) - sq(arrMass[0]) - sq(arrMass[1])) - sq(2 * arrMass[0] * arrMass[1])) / (2 * mTot); // p*, prong momentum in the rest frame of the mother particle @@ -302,14 +302,14 @@ class RecoDecay // p_L,i = γ (p*_L,i + β E*_i) // p*_L,i = p_L,i/γ - β E*_i // cos(θ*_i) = (p_L,i/γ - β E*_i)/p* - return (dotProd(arrMom[iProng], pVecTot) / (pTot * gamma) - beta * E(pStar, arrMass[iProng])) / pStar; + return (dotProd(arrMom[iProng], pVecTot) / (pTot * gamma) - beta * e(pStar, arrMass[iProng])) / pStar; } /// Sums 3-momenta. /// \param args pack of 3-momentum arrays /// \return total 3-momentum array template - static auto PVec(const array&... args) + static auto pVec(const array&... args) { return sumOfVec(args...); } @@ -317,7 +317,7 @@ class RecoDecay /// Calculates momentum squared from momentum components. /// \param px,py,pz {x, y, z} momentum components /// \return momentum squared - static double P2(double px, double py, double pz) + static double p2(double px, double py, double pz) { return sumOfSquares(px, py, pz); } @@ -326,7 +326,7 @@ class RecoDecay /// \param args pack of 3-momentum arrays /// \return total momentum squared template - static double P2(const array&... args) + static double p2(const array&... args) { return sumOfSquares(getElement(0, args...), getElement(1, args...), getElement(2, args...)); } @@ -335,15 +335,15 @@ class RecoDecay /// \param args {x, y, z} momentum components or pack of 3-momentum arrays /// \return (total) momentum magnitude template - static double P(const T&... args) + static double p(const T&... args) { - return std::sqrt(P2(args...)); + return std::sqrt(p2(args...)); } /// Calculates transverse momentum squared from momentum components. /// \param px,py {x, y} momentum components /// \return transverse momentum squared - static double Pt2(double px, double py) + static double pt2(double px, double py) { return sumOfSquares(px, py); } @@ -352,7 +352,7 @@ class RecoDecay /// \param args pack of 3-(or 2-)momentum arrays /// \return total transverse momentum squared template - static double Pt2(const array&... args) + static double pt2(const array&... args) { return sumOfSquares(getElement(0, args...), getElement(1, args...)); } @@ -361,9 +361,9 @@ class RecoDecay /// \param args {x, y} momentum components or pack of 3-(or 2-)momentum arrays /// \return (total) transverse momentum template - static double Pt(const T&... args) + static double pt(const T&... args) { - return std::sqrt(Pt2(args...)); + return std::sqrt(pt2(args...)); } /// Calculates energy squared from momentum and mass. @@ -371,7 +371,7 @@ class RecoDecay /// \param args {x, y, z} momentum components, mass /// \return energy squared template - static double E2(T... args) + static double e2(T... args) { return sumOfSquares(args...); } @@ -381,9 +381,9 @@ class RecoDecay /// \param mass mass /// \return energy squared template - static double E2(const array& mom, U mass) + static double e2(const array& mom, U mass) { - return E2(mom[0], mom[1], mom[2], mass); + return e2(mom[0], mom[1], mom[2], mass); } /// Calculates energy from momentum and mass. @@ -392,16 +392,16 @@ class RecoDecay /// \param args 3-momentum array, mass /// \return energy template - static double E(const T&... args) + static double e(const T&... args) { - return std::sqrt(E2(args...)); + return std::sqrt(e2(args...)); } /// Calculates invariant mass squared from momentum magnitude and energy. /// \param mom momentum magnitude /// \param energy energy /// \return invariant mass squared - static double M2(double mom, double energy) + static double m2(double mom, double energy) { return energy * energy - mom * mom; } @@ -411,9 +411,9 @@ class RecoDecay /// \param energy energy /// \return invariant mass squared template - static double M2(const array& mom, double energy) + static double m2(const array& mom, double energy) { - return energy * energy - P2(mom); + return energy * energy - p2(mom); } /// Calculates invariant mass squared from momenta and masses of several particles (prongs). @@ -422,7 +422,7 @@ class RecoDecay /// \param arrMass array of N masses (in the same order as arrMom) /// \return invariant mass squared template - static double M2(const array, N>& arrMom, const array& arrMass) + static double m2(const array, N>& arrMom, const array& arrMass) { array momTotal{0., 0., 0.}; // candidate momentum vector double energyTot{0.}; // candidate energy @@ -430,9 +430,9 @@ class RecoDecay for (std::size_t iMom = 0; iMom < 3; ++iMom) { momTotal[iMom] += arrMom[iProng][iMom]; } // loop over momentum components - energyTot += E(arrMom[iProng], arrMass[iProng]); + energyTot += e(arrMom[iProng], arrMass[iProng]); } // loop over prongs - return energyTot * energyTot - P2(momTotal); + return energyTot * energyTot - p2(momTotal); } /// Calculates invariant mass. @@ -441,9 +441,9 @@ class RecoDecay /// \param args array of momenta, array of masses /// \return invariant mass template - static double M(const T&... args) + static double m(const T&... args) { - return std::sqrt(M2(args...)); + return std::sqrt(m2(args...)); } // Calculation of topological quantities @@ -454,11 +454,11 @@ class RecoDecay /// \param mom {x, y, z} particle momentum array /// \return impact parameter in {x, y} template - static double ImpParXY(const T& point, const U& posSV, const array& mom) + static double impParXY(const T& point, const U& posSV, const array& mom) { // Ported from AliAODRecoDecay::ImpParXY auto flightLineXY = array{posSV[0] - point[0], posSV[1] - point[1]}; - auto k = dotProd(flightLineXY, array{mom[0], mom[1]}) / Pt2(mom); + auto k = dotProd(flightLineXY, array{mom[0], mom[1]}) / pt2(mom); auto dx = flightLineXY[0] - k * (double)mom[0]; auto dy = flightLineXY[1] - k * (double)mom[1]; auto absImpPar = sqrtSumOfSquares(dx, dy); @@ -482,7 +482,7 @@ class RecoDecay { // Ported from AliAODRecoDecayHF::Getd0MeasMinusExpProng adding normalization directly in the function auto sinThetaP = ((double)momProng[0] * (double)momMother[1] - (double)momProng[1] * (double)momMother[0]) / - (Pt(momProng) * Pt(momMother)); + (pt(momProng) * pt(momMother)); auto diff = impParProng - (double)decLenXY * sinThetaP; auto errImpParExpProng = (double)errDecLenXY * sinThetaP; auto errDiff = sqrtSumOfSquares(errImpParProng, errImpParExpProng); diff --git a/Common/DataModel/StrangenessTables.h b/Common/DataModel/StrangenessTables.h index 1bb9d013011..5f96c139c2c 100644 --- a/Common/DataModel/StrangenessTables.h +++ b/Common/DataModel/StrangenessTables.h @@ -61,14 +61,14 @@ DECLARE_SOA_DYNAMIC_COLUMN(DistOverTotMom, distovertotmom, //! PV to V0decay dis // CosPA DECLARE_SOA_DYNAMIC_COLUMN(V0CosPA, v0cosPA, //! V0 CosPA - [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) -> float { return RecoDecay::CPA(array{pvX, pvY, pvZ}, array{X, Y, Z}, array{Px, Py, Pz}); }); + [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) -> float { return RecoDecay::cpa(array{pvX, pvY, pvZ}, array{X, Y, Z}, array{Px, Py, Pz}); }); DECLARE_SOA_DYNAMIC_COLUMN(DCAV0ToPV, dcav0topv, //! DCA of V0 to PV [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) -> float { return std::sqrt((std::pow((pvY - Y) * Pz - (pvZ - Z) * Py, 2) + std::pow((pvX - X) * Pz - (pvZ - Z) * Px, 2) + std::pow((pvX - X) * Py - (pvY - Y) * Px, 2)) / (Px * Px + Py * Py + Pz * Pz)); }); // Armenteros-Podolanski variables DECLARE_SOA_DYNAMIC_COLUMN(Alpha, alpha, //! Armenteros Alpha [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) { - float momTot = RecoDecay::P(pxpos + pxneg, pypos + pyneg, pzpos + pzneg); + float momTot = RecoDecay::p(pxpos + pxneg, pypos + pyneg, pzpos + pzneg); float lQlNeg = RecoDecay::dotProd(array{pxneg, pyneg, pzneg}, array{pxpos + pxneg, pypos + pyneg, pzpos + pzneg}) / momTot; float lQlPos = RecoDecay::dotProd(array{pxpos, pypos, pzpos}, array{pxpos + pxneg, pypos + pyneg, pzpos + pzneg}) / momTot; return (lQlPos - lQlNeg) / (lQlPos + lQlNeg); // alphav0 @@ -76,16 +76,16 @@ DECLARE_SOA_DYNAMIC_COLUMN(Alpha, alpha, //! Armenteros Alpha DECLARE_SOA_DYNAMIC_COLUMN(QtArm, qtarm, //! Armenteros Qt [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) { - float momTot = RecoDecay::P2(pxpos + pxneg, pypos + pyneg, pzpos + pzneg); + float momTot = RecoDecay::p2(pxpos + pxneg, pypos + pyneg, pzpos + pzneg); float dp = RecoDecay::dotProd(array{pxneg, pyneg, pzneg}, array{pxpos + pxneg, pypos + pyneg, pzpos + pzneg}); - return std::sqrt(RecoDecay::P2(pxneg, pyneg, pzneg) - dp * dp / momTot); // qtarm + return std::sqrt(RecoDecay::p2(pxneg, pyneg, pzneg) - dp * dp / momTot); // qtarm }); // Psi pair angle: angle between the plane defined by the electron and positron momenta and the xy plane DECLARE_SOA_DYNAMIC_COLUMN(PsiPair, psipair, //! psi pair angle [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) { auto clipToPM1 = [](float x) { return x < -1.f ? -1.f : (x > 1.f ? 1.f : x); }; - float ptot2 = RecoDecay::P2(pxpos, pypos, pzpos) * RecoDecay::P2(pxneg, pyneg, pzneg); + float ptot2 = RecoDecay::p2(pxpos, pypos, pzpos) * RecoDecay::p2(pxneg, pyneg, pzneg); float argcos = RecoDecay::dotProd(array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}) / std::sqrt(ptot2); float thetaPos = std::atan2(RecoDecay::sqrtSumOfSquares(pxpos, pypos), pzpos); float thetaNeg = std::atan2(RecoDecay::sqrtSumOfSquares(pxneg, pyneg), pzneg); @@ -95,35 +95,35 @@ DECLARE_SOA_DYNAMIC_COLUMN(PsiPair, psipair, //! psi pair angle // Calculated on the fly with mass assumption + dynamic tables DECLARE_SOA_DYNAMIC_COLUMN(MLambda, mLambda, //! mass under lambda hypothesis - [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)}); }); + [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::m(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)}); }); DECLARE_SOA_DYNAMIC_COLUMN(MAntiLambda, mAntiLambda, //! mass under antilambda hypothesis - [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); }); + [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::m(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); }); DECLARE_SOA_DYNAMIC_COLUMN(MK0Short, mK0Short, //! mass under K0short hypothesis - [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kPiPlus)}); }); + [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::m(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kPiPlus)}); }); DECLARE_SOA_DYNAMIC_COLUMN(MGamma, mGamma, //! mass under gamma hypothesis - [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kElectron), RecoDecay::getMassPDG(kElectron)}); }); + [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::m(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, array{RecoDecay::getMassPDG(kElectron), RecoDecay::getMassPDG(kElectron)}); }); DECLARE_SOA_DYNAMIC_COLUMN(YK0Short, yK0Short, //! V0 y with K0short hypothesis - [](float Px, float Py, float Pz) -> float { return RecoDecay::Y(array{Px, Py, Pz}, RecoDecay::getMassPDG(kK0)); }); + [](float Px, float Py, float Pz) -> float { return RecoDecay::y(array{Px, Py, Pz}, RecoDecay::getMassPDG(kK0)); }); DECLARE_SOA_DYNAMIC_COLUMN(YLambda, yLambda, //! V0 y with lambda or antilambda hypothesis - [](float Px, float Py, float Pz) -> float { return RecoDecay::Y(array{Px, Py, Pz}, RecoDecay::getMassPDG(kLambda0)); }); + [](float Px, float Py, float Pz) -> float { return RecoDecay::y(array{Px, Py, Pz}, RecoDecay::getMassPDG(kLambda0)); }); DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! V0 eta - [](float Px, float Py, float Pz) -> float { return RecoDecay::Eta(array{Px, Py, Pz}); }); + [](float Px, float Py, float Pz) -> float { return RecoDecay::eta(array{Px, Py, Pz}); }); DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! V0 phi - [](float Px, float Py) -> float { return RecoDecay::Phi(Px, Py); }); + [](float Px, float Py) -> float { return RecoDecay::phi(Px, Py); }); DECLARE_SOA_DYNAMIC_COLUMN(NegativePt, negativept, //! negative daughter pT [](float pxneg, float pyneg) -> float { return RecoDecay::sqrtSumOfSquares(pxneg, pyneg); }); DECLARE_SOA_DYNAMIC_COLUMN(PositivePt, positivept, //! positive daughter pT [](float pxpos, float pypos) -> float { return RecoDecay::sqrtSumOfSquares(pxpos, pypos); }); DECLARE_SOA_DYNAMIC_COLUMN(NegativeEta, negativeeta, //! negative daughter eta - [](float PxNeg, float PyNeg, float PzNeg) -> float { return RecoDecay::Eta(array{PxNeg, PyNeg, PzNeg}); }); + [](float PxNeg, float PyNeg, float PzNeg) -> float { return RecoDecay::eta(array{PxNeg, PyNeg, PzNeg}); }); DECLARE_SOA_DYNAMIC_COLUMN(NegativePhi, negativephi, //! negative daughter phi - [](float PxNeg, float PyNeg) -> float { return RecoDecay::Phi(PxNeg, PyNeg); }); + [](float PxNeg, float PyNeg) -> float { return RecoDecay::phi(PxNeg, PyNeg); }); DECLARE_SOA_DYNAMIC_COLUMN(PositiveEta, positiveeta, //! positive daughter eta - [](float PxPos, float PyPos, float PzPos) -> float { return RecoDecay::Eta(array{PxPos, PyPos, PzPos}); }); + [](float PxPos, float PyPos, float PzPos) -> float { return RecoDecay::eta(array{PxPos, PyPos, PzPos}); }); DECLARE_SOA_DYNAMIC_COLUMN(PositivePhi, positivephi, //! positive daughter phi - [](float PxPos, float PyPos) -> float { return RecoDecay::Phi(PxPos, PyPos); }); + [](float PxPos, float PyPos) -> float { return RecoDecay::phi(PxPos, PyPos); }); DECLARE_SOA_EXPRESSION_COLUMN(Px, px, //! V0 px float, 1.f * aod::v0data::pxpos + 1.f * aod::v0data::pxneg); @@ -229,9 +229,9 @@ DECLARE_SOA_DYNAMIC_COLUMN(CascRadius, cascradius, //! // CosPAs DECLARE_SOA_DYNAMIC_COLUMN(V0CosPA, v0cosPA, //! - [](float Xlambda, float Ylambda, float Zlambda, float PxLambda, float PyLambda, float PzLambda, float pvX, float pvY, float pvZ) -> float { return RecoDecay::CPA(array{pvX, pvY, pvZ}, array{Xlambda, Ylambda, Zlambda}, array{PxLambda, PyLambda, PzLambda}); }); + [](float Xlambda, float Ylambda, float Zlambda, float PxLambda, float PyLambda, float PzLambda, float pvX, float pvY, float pvZ) -> float { return RecoDecay::cpa(array{pvX, pvY, pvZ}, array{Xlambda, Ylambda, Zlambda}, array{PxLambda, PyLambda, PzLambda}); }); DECLARE_SOA_DYNAMIC_COLUMN(CascCosPA, casccosPA, //! - [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) -> float { return RecoDecay::CPA(array{pvX, pvY, pvZ}, array{X, Y, Z}, array{Px, Py, Pz}); }); + [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) -> float { return RecoDecay::cpa(array{pvX, pvY, pvZ}, array{X, Y, Z}, array{Px, Py, Pz}); }); DECLARE_SOA_DYNAMIC_COLUMN(DCAV0ToPV, dcav0topv, //! [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) -> float { return std::sqrt((std::pow((pvY - Y) * Pz - (pvZ - Z) * Py, 2) + std::pow((pvX - X) * Pz - (pvZ - Z) * Px, 2) + std::pow((pvX - X) * Py - (pvY - Y) * Px, 2)) / (Px * Px + Py * Py + Pz * Pz)); }); DECLARE_SOA_DYNAMIC_COLUMN(DCACascToPV, dcacasctopv, //! @@ -239,20 +239,20 @@ DECLARE_SOA_DYNAMIC_COLUMN(DCACascToPV, dcacasctopv, //! // Calculated on the fly with mass assumption + dynamic tables DECLARE_SOA_DYNAMIC_COLUMN(MLambda, mLambda, //! - [](int charge, float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::M(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, charge < 0 ? array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)} : array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); }); + [](int charge, float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::m(array{array{pxpos, pypos, pzpos}, array{pxneg, pyneg, pzneg}}, charge < 0 ? array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)} : array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); }); // Calculated on the fly with mass assumption + dynamic tables DECLARE_SOA_DYNAMIC_COLUMN(MXi, mXi, //! - [](float pxbach, float pybach, float pzbach, float PxLambda, float PyLambda, float PzLambda) -> float { return RecoDecay::M(array{array{pxbach, pybach, pzbach}, array{PxLambda, PyLambda, PzLambda}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kLambda0)}); }); + [](float pxbach, float pybach, float pzbach, float PxLambda, float PyLambda, float PzLambda) -> float { return RecoDecay::m(array{array{pxbach, pybach, pzbach}, array{PxLambda, PyLambda, PzLambda}}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kLambda0)}); }); DECLARE_SOA_DYNAMIC_COLUMN(MOmega, mOmega, //! - [](float pxbach, float pybach, float pzbach, float PxLambda, float PyLambda, float PzLambda) -> float { return RecoDecay::M(array{array{pxbach, pybach, pzbach}, array{PxLambda, PyLambda, PzLambda}}, array{RecoDecay::getMassPDG(kKPlus), RecoDecay::getMassPDG(kLambda0)}); }); + [](float pxbach, float pybach, float pzbach, float PxLambda, float PyLambda, float PzLambda) -> float { return RecoDecay::m(array{array{pxbach, pybach, pzbach}, array{PxLambda, PyLambda, PzLambda}}, array{RecoDecay::getMassPDG(kKPlus), RecoDecay::getMassPDG(kLambda0)}); }); DECLARE_SOA_DYNAMIC_COLUMN(YXi, yXi, //! - [](float Px, float Py, float Pz) -> float { return RecoDecay::Y(array{Px, Py, Pz}, 1.32171); }); + [](float Px, float Py, float Pz) -> float { return RecoDecay::y(array{Px, Py, Pz}, 1.32171); }); DECLARE_SOA_DYNAMIC_COLUMN(YOmega, yOmega, //! - [](float Px, float Py, float Pz) -> float { return RecoDecay::Y(array{Px, Py, Pz}, 1.67245); }); + [](float Px, float Py, float Pz) -> float { return RecoDecay::y(array{Px, Py, Pz}, 1.67245); }); DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! - [](float Px, float Py, float Pz) -> float { return RecoDecay::Eta(array{Px, Py, Pz}); }); + [](float Px, float Py, float Pz) -> float { return RecoDecay::eta(array{Px, Py, Pz}); }); } // namespace cascdata namespace cascdataext diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index 5cc9aa09f45..41efb4b7184 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -506,8 +506,8 @@ struct HfFilter { // Main struct for HF triggers template int isSelectedD0InMassRange(const T& pTrackPos, const T& pTrackNeg, const float& ptD) { - auto invMassD0 = RecoDecay::M(std::array{pTrackPos, pTrackNeg}, std::array{massPi, massK}); - auto invMassD0bar = RecoDecay::M(std::array{pTrackPos, pTrackNeg}, std::array{massK, massPi}); + auto invMassD0 = RecoDecay::m(std::array{pTrackPos, pTrackNeg}, std::array{massPi, massK}); + auto invMassD0bar = RecoDecay::m(std::array{pTrackPos, pTrackNeg}, std::array{massK, massPi}); if (activateQA) { hMassVsPtC[kD0]->Fill(ptD, invMassD0); @@ -534,7 +534,7 @@ struct HfFilter { // Main struct for HF triggers template bool isSelectedDplusInMassRange(const T& pTrackSameChargeFirst, const T& pTrackSameChargeSecond, const T& pTrackOppositeCharge, const float& ptD) { - auto invMassDplus = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackSameChargeSecond, pTrackOppositeCharge}, std::array{massPi, massPi, massK}); + auto invMassDplus = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackSameChargeSecond, pTrackOppositeCharge}, std::array{massPi, massPi, massK}); if (activateQA) { hMassVsPtC[kDplus]->Fill(ptD, invMassDplus); } @@ -555,11 +555,11 @@ struct HfFilter { // Main struct for HF triggers template int isSelectedDsInMassRange(const T& pTrackSameChargeFirst, const T& pTrackSameChargeSecond, const T& pTrackOppositeCharge, const float& ptD) { - auto invMassKKFirst = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackOppositeCharge}, std::array{massK, massK}); - auto invMassKKSecond = RecoDecay::M(std::array{pTrackSameChargeSecond, pTrackOppositeCharge}, std::array{massK, massK}); + auto invMassKKFirst = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackOppositeCharge}, std::array{massK, massK}); + auto invMassKKSecond = RecoDecay::m(std::array{pTrackSameChargeSecond, pTrackOppositeCharge}, std::array{massK, massK}); - auto invMassDsToKKPi = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massK, massK, massPi}); - auto invMassDsToPiKK = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massPi, massK, massK}); + auto invMassDsToKKPi = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massK, massK, massPi}); + auto invMassDsToPiKK = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massPi, massK, massK}); if (activateQA) { hMassVsPtC[kDs]->Fill(ptD, invMassDsToKKPi); @@ -592,8 +592,8 @@ struct HfFilter { // Main struct for HF triggers template int isSelectedLcInMassRange(const T& pTrackSameChargeFirst, const T& pTrackSameChargeSecond, const T& pTrackOppositeCharge, const float& ptLc) { - auto invMassLcToPKPi = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massProton, massK, massPi}); - auto invMassLcToPiKP = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massPi, massK, massProton}); + auto invMassLcToPKPi = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massProton, massK, massPi}); + auto invMassLcToPiKP = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massPi, massK, massProton}); if (activateQA) { hMassVsPtC[kLc]->Fill(ptLc, invMassLcToPKPi); @@ -620,8 +620,8 @@ struct HfFilter { // Main struct for HF triggers template int isSelectedXicInMassRange(const T& pTrackSameChargeFirst, const T& pTrackSameChargeSecond, const T& pTrackOppositeCharge, const float& ptXic) { - auto invMassXicToPKPi = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massProton, massK, massPi}); - auto invMassXicToPiKP = RecoDecay::M(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massPi, massK, massProton}); + auto invMassXicToPKPi = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massProton, massK, massPi}); + auto invMassXicToPiKP = RecoDecay::m(std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond}, std::array{massPi, massK, massProton}); if (activateQA) { hMassVsPtC[kXic]->Fill(ptXic, invMassXicToPKPi); @@ -728,8 +728,8 @@ struct HfFilter { // Main struct for HF triggers continue; } - auto pVec2Prong = RecoDecay::PVec(pVecPos, pVecNeg); - auto pt2Prong = RecoDecay::Pt(pVec2Prong); + auto pVec2Prong = RecoDecay::pVec(pVecPos, pVecNeg); + auto pt2Prong = RecoDecay::pt(pVec2Prong); auto selD0 = isSelectedD0InMassRange(pVecPos, pVecNeg, pt2Prong); @@ -754,9 +754,9 @@ struct HfFilter { // Main struct for HF triggers if (!keepEvent[kBeauty] && isBeautyTagged) { int isTrackSelected = isSelectedTrackForBeauty(track, kBeauty3Prong); if (isTrackSelected && (((selD0 == 1 || selD0 == 3) && track.signed1Pt() < 0) || (selD0 >= 2 && track.signed1Pt() > 0))) { - auto massCand = RecoDecay::M(std::array{pVec2Prong, pVecThird}, std::array{massD0, massPi}); - auto pVecBeauty3Prong = RecoDecay::PVec(pVec2Prong, pVecThird); - auto ptCand = RecoDecay::Pt(pVecBeauty3Prong); + auto massCand = RecoDecay::m(std::array{pVec2Prong, pVecThird}, std::array{massD0, massPi}); + auto pVecBeauty3Prong = RecoDecay::pVec(pVec2Prong, pVecThird); + auto ptCand = RecoDecay::pt(pVecBeauty3Prong); if (isTrackSelected == kRegular && std::abs(massCand - massBPlus) <= deltaMassBPlus) { keepEvent[kBeauty] = true; if (activateQA) { @@ -769,12 +769,12 @@ struct HfFilter { // Main struct for HF triggers for (const auto& trackB : tracks) { // start loop over tracks if (track.signed1Pt() * trackB.signed1Pt() < 0 && isSelectedTrackForBeauty(trackB, kBeauty3Prong) == kRegular) { std::array pVecFourth = {trackB.px(), trackB.py(), trackB.pz()}; - auto massCandB0 = RecoDecay::M(std::array{pVec2Prong, pVecThird, pVecFourth}, std::array{massD0, massPi, massPi}); + auto massCandB0 = RecoDecay::m(std::array{pVec2Prong, pVecThird, pVecFourth}, std::array{massD0, massPi, massPi}); if (std::abs(massCandB0 - massB0) <= deltaMassB0) { keepEvent[kBeauty] = true; if (activateQA) { - auto pVecBeauty4Prong = RecoDecay::PVec(pVec2Prong, pVecThird, pVecFourth); - auto ptCandBeauty4Prong = RecoDecay::Pt(pVecBeauty4Prong); + auto pVecBeauty4Prong = RecoDecay::pVec(pVec2Prong, pVecThird, pVecFourth); + auto ptCandBeauty4Prong = RecoDecay::pt(pVecBeauty4Prong); hMassVsPtB[kB0toDStar]->Fill(ptCandBeauty4Prong, massCandB0); } } @@ -865,8 +865,8 @@ struct HfFilter { // Main struct for HF triggers float sign3Prong = trackFirst.signed1Pt() * trackSecond.signed1Pt() * trackThird.signed1Pt(); - auto pVec3Prong = RecoDecay::PVec(pVecFirst, pVecSecond, pVecThird); - auto pt3Prong = RecoDecay::Pt(pVec3Prong); + auto pVec3Prong = RecoDecay::pVec(pVecFirst, pVecSecond, pVecThird); + auto pt3Prong = RecoDecay::pt(pVec3Prong); std::array is3ProngInMass{}; if (is3Prong[0]) { @@ -907,12 +907,12 @@ struct HfFilter { // Main struct for HF triggers if (track.signed1Pt() * sign3Prong < 0 && isSelectedTrackForBeauty(track, kBeauty4Prong) == kRegular) { for (int iHypo{0}; iHypo < kNBeautyParticles - 2 && !keepEvent[kBeauty]; ++iHypo) { if (isBeautyTagged[iHypo] && ((iHypo != 1 && is3ProngInMass[iHypo] > 0) || (iHypo == 1 && ((TESTBIT(is3ProngInMass[iHypo], 0) && TESTBIT(is3ProngInMass[iHypo], 2)) || (TESTBIT(is3ProngInMass[iHypo], 1) && TESTBIT(is3ProngInMass[iHypo], 3)))))) { - auto massCandB = RecoDecay::M(std::array{pVec3Prong, pVecFourth}, std::array{massCharmHypos[iHypo], massPi}); + auto massCandB = RecoDecay::m(std::array{pVec3Prong, pVecFourth}, std::array{massCharmHypos[iHypo], massPi}); if (std::abs(massCandB - massBeautyHypos[iHypo]) <= deltaMassHypos[iHypo]) { keepEvent[kBeauty] = true; if (activateQA) { - auto pVecBeauty4Prong = RecoDecay::PVec(pVec3Prong, pVecFourth); - auto ptCandBeauty4Prong = RecoDecay::Pt(pVecBeauty4Prong); + auto pVecBeauty4Prong = RecoDecay::pVec(pVec3Prong, pVecFourth); + auto ptCandBeauty4Prong = RecoDecay::pt(pVecBeauty4Prong); hMassVsPtB[iHypo + 2]->Fill(ptCandBeauty4Prong, massCandB); } } diff --git a/PWGDQ/Tasks/v0selector.cxx b/PWGDQ/Tasks/v0selector.cxx index b3d51d8d1fd..f9a2ed3298a 100644 --- a/PWGDQ/Tasks/v0selector.cxx +++ b/PWGDQ/Tasks/v0selector.cxx @@ -65,7 +65,7 @@ struct v0selector { float alphav0(const array& ppos, const array& pneg) { std::array pv0 = {ppos[0] + pneg[0], ppos[1] + pneg[1], ppos[2] + pneg[2]}; - float momTot = RecoDecay::P(pv0); + float momTot = RecoDecay::p(pv0); float lQlNeg = RecoDecay::dotProd(pneg, pv0) / momTot; float lQlPos = RecoDecay::dotProd(ppos, pv0) / momTot; return (lQlPos - lQlNeg) / (lQlPos + lQlNeg); // longitudinal momentum asymmetry @@ -74,9 +74,9 @@ struct v0selector { float qtarmv0(const array& ppos, const array& pneg) { std::array pv0 = {ppos[0] + pneg[0], ppos[1] + pneg[1], ppos[2] + pneg[2]}; - float momTot2 = RecoDecay::P2(pv0); + float momTot2 = RecoDecay::p2(pv0); float dp = RecoDecay::dotProd(pneg, pv0); - return std::sqrt(RecoDecay::P2(pneg) - dp * dp / momTot2); // qtarm + return std::sqrt(RecoDecay::p2(pneg) - dp * dp / momTot2); // qtarm } float phivv0(const array& ppos, const array& pneg, const int cpos, const int cneg, const float bz) @@ -107,18 +107,18 @@ struct v0selector { } // unit vector of pep X pem - float vx = vpx / RecoDecay::P(array{vpx, vpy, vpz}); - float vy = vpy / RecoDecay::P(array{vpx, vpy, vpz}); - float vz = vpz / RecoDecay::P(array{vpx, vpy, vpz}); + float vx = vpx / RecoDecay::p(array{vpx, vpy, vpz}); + float vy = vpy / RecoDecay::p(array{vpx, vpy, vpz}); + float vz = vpz / RecoDecay::p(array{vpx, vpy, vpz}); float px = ppos[0] + pneg[0]; float py = ppos[1] + pneg[1]; float pz = ppos[2] + pneg[2]; // unit vector of (pep+pem) - float ux = px / RecoDecay::P(array{px, py, pz}); - float uy = py / RecoDecay::P(array{px, py, pz}); - float uz = pz / RecoDecay::P(array{px, py, pz}); + float ux = px / RecoDecay::p(array{px, py, pz}); + float uy = py / RecoDecay::p(array{px, py, pz}); + float uz = pz / RecoDecay::p(array{px, py, pz}); float ax = uy / RecoDecay::sqrtSumOfSquares(ux, uy); float ay = -ux / RecoDecay::sqrtSumOfSquares(ux, uy); @@ -134,8 +134,8 @@ struct v0selector { { // Following idea to use opening of colinear pairs in magnetic field from e.g. PHENIX to ID conversions. float deltat = TMath::ATan(pneg[2] / (TMath::Sqrt(pneg[0] * pneg[0] + pneg[1] * pneg[1]))) - TMath::ATan(ppos[2] / (TMath::Sqrt(ppos[0] * ppos[0] + ppos[1] * ppos[1]))); // difference of angles of the two daughter tracks with z-axis - float pEle = RecoDecay::P(pneg); // absolute momentum val - float pPos = RecoDecay::P(ppos); // absolute momentum val + float pEle = RecoDecay::p(pneg); // absolute momentum val + float pPos = RecoDecay::p(ppos); // absolute momentum val float chipair = TMath::ACos(RecoDecay::dotProd(ppos, pneg) / (pEle * pPos)); // Angle between daughter tracks return TMath::Abs(TMath::ASin(deltat / chipair)); // psipair in [0,pi/2] } @@ -352,11 +352,11 @@ struct v0selector { auto py = pvec0[1] + pvec1[1]; auto pz = pvec0[2] + pvec1[2]; auto pt = RecoDecay::sqrtSumOfSquares(pvec0[0] + pvec1[0], pvec0[1] + pvec1[1]); - auto eta = RecoDecay::Eta(array{px, py, pz}); - auto phi = RecoDecay::Phi(px, py); + auto eta = RecoDecay::eta(array{px, py, pz}); + auto phi = RecoDecay::phi(px, py); auto V0dca = fitter.getChi2AtPCACandidate(); // distance between 2 legs. - auto V0CosinePA = RecoDecay::CPA(pVtx, array{pos[0], pos[1], pos[2]}, array{px, py, pz}); + auto V0CosinePA = RecoDecay::cpa(pVtx, array{pos[0], pos[1], pos[2]}, array{px, py, pz}); auto V0radius = RecoDecay::sqrtSumOfSquares(pos[0], pos[1]); registry.fill(HIST("hV0Pt"), pt); @@ -389,10 +389,10 @@ struct v0selector { registry.fill(HIST("hV0PhiV"), phiv); registry.fill(HIST("hV0Psi"), psipair); - float mGamma = RecoDecay::M(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kElectron), RecoDecay::getMassPDG(kElectron)}); - float mK0S = RecoDecay::M(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kPiPlus)}); - float mLambda = RecoDecay::M(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)}); - float mAntiLambda = RecoDecay::M(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); + float mGamma = RecoDecay::m(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kElectron), RecoDecay::getMassPDG(kElectron)}); + float mK0S = RecoDecay::m(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kPiPlus)}); + float mLambda = RecoDecay::m(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)}); + float mAntiLambda = RecoDecay::m(array{pvec0, pvec1}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); registry.fill(HIST("hMassGamma"), mGamma); registry.fill(HIST("hMassK0S"), mK0S); @@ -529,7 +529,7 @@ struct v0selector { std::array pVtx = {collision.posX(), collision.posY(), collision.posZ()}; const std::array vertex = {(float)v0vtx[0], (float)v0vtx[1], (float)v0vtx[2]}; const std::array pvecv0 = {pvecpos[0] + pvecneg[0], pvecpos[1] + pvecneg[1], pvecpos[2] + pvecneg[2]}; - auto V0CosinePA = RecoDecay::CPA(pVtx, array{pos[0], pos[1], pos[2]}, pvecv0); + auto V0CosinePA = RecoDecay::cpa(pVtx, array{pos[0], pos[1], pos[2]}, pvecv0); registry.fill(HIST("hV0CosPA_Casc"), V0CosinePA); // if (V0CosinePA < 0.97) { // continue; @@ -553,16 +553,16 @@ struct v0selector { // } const auto& cascvtx = fitterCasc.getPCACandidate(); - auto CascCosinePA = RecoDecay::CPA(pVtx, array{cascvtx[0], cascvtx[1], cascvtx[2]}, pvecbach); + auto CascCosinePA = RecoDecay::cpa(pVtx, array{cascvtx[0], cascvtx[1], cascvtx[2]}, pvecbach); registry.fill(HIST("hCascCosPA"), CascCosinePA); // if(CascCosinePA < 0.998){ // continue; // } - float mLambda = RecoDecay::M(array{pvecpos, pvecneg}, array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)}); - float mAntiLambda = RecoDecay::M(array{pvecpos, pvecneg}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); - float mXi = RecoDecay::M(array{pvecv0, pvecbach}, array{RecoDecay::getMassPDG(kLambda0), RecoDecay::getMassPDG(kPiPlus)}); - float mOmega = RecoDecay::M(array{pvecv0, pvecbach}, array{RecoDecay::getMassPDG(kLambda0), RecoDecay::getMassPDG(kKPlus)}); + float mLambda = RecoDecay::m(array{pvecpos, pvecneg}, array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kPiPlus)}); + float mAntiLambda = RecoDecay::m(array{pvecpos, pvecneg}, array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kProton)}); + float mXi = RecoDecay::m(array{pvecv0, pvecbach}, array{RecoDecay::getMassPDG(kLambda0), RecoDecay::getMassPDG(kPiPlus)}); + float mOmega = RecoDecay::m(array{pvecv0, pvecbach}, array{RecoDecay::getMassPDG(kLambda0), RecoDecay::getMassPDG(kKPlus)}); registry.fill(HIST("hMassLambda_Casc"), mLambda); registry.fill(HIST("hMassAntiLambda_Casc"), mAntiLambda); diff --git a/PWGHF/DataModel/HFSecondaryVertex.h b/PWGHF/DataModel/HFSecondaryVertex.h index 129712d3f1e..0a9daa767f3 100644 --- a/PWGHF/DataModel/HFSecondaryVertex.h +++ b/PWGHF/DataModel/HFSecondaryVertex.h @@ -216,9 +216,9 @@ DECLARE_SOA_COLUMN(PxProng0, pxProng0, float); //! DECLARE_SOA_COLUMN(PyProng0, pyProng0, float); //! DECLARE_SOA_COLUMN(PzProng0, pzProng0, float); //! DECLARE_SOA_DYNAMIC_COLUMN(PtProng0, ptProng0, //! - [](float px, float py) -> float { return RecoDecay::Pt(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(Pt2Prong0, pt2Prong0, //! - [](float px, float py) -> float { return RecoDecay::Pt2(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt2(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(PVectorProng0, pVectorProng0, //! [](float px, float py, float pz) -> array { return array{px, py, pz}; }); DECLARE_SOA_COLUMN(ImpactParameter0, impactParameter0, float); //! @@ -229,9 +229,9 @@ DECLARE_SOA_COLUMN(PxProng1, pxProng1, float); //! DECLARE_SOA_COLUMN(PyProng1, pyProng1, float); //! DECLARE_SOA_COLUMN(PzProng1, pzProng1, float); //! DECLARE_SOA_DYNAMIC_COLUMN(PtProng1, ptProng1, //! - [](float px, float py) -> float { return RecoDecay::Pt(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(Pt2Prong1, pt2Prong1, //! - [](float px, float py) -> float { return RecoDecay::Pt2(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt2(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(PVectorProng1, pVectorProng1, //! [](float px, float py, float pz) -> array { return array{px, py, pz}; }); DECLARE_SOA_COLUMN(ImpactParameter1, impactParameter1, float); //! @@ -242,9 +242,9 @@ DECLARE_SOA_COLUMN(PxProng2, pxProng2, float); //! DECLARE_SOA_COLUMN(PyProng2, pyProng2, float); //! DECLARE_SOA_COLUMN(PzProng2, pzProng2, float); //! DECLARE_SOA_DYNAMIC_COLUMN(PtProng2, ptProng2, //! - [](float px, float py) -> float { return RecoDecay::Pt(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(Pt2Prong2, pt2Prong2, //! - [](float px, float py) -> float { return RecoDecay::Pt2(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt2(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(PVectorProng2, pVectorProng2, //! [](float px, float py, float pz) -> array { return array{px, py, pz}; }); DECLARE_SOA_COLUMN(ImpactParameter2, impactParameter2, float); //! @@ -253,25 +253,25 @@ DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterNormalised2, impactParameterNormalised [](float dca, float err) -> float { return dca / err; }); // candidate properties DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! - [](float px, float py) -> float { return RecoDecay::Pt(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(Pt2, pt2, //! - [](float px, float py) -> float { return RecoDecay::Pt2(px, py); }); + [](float px, float py) -> float { return RecoDecay::pt2(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! - [](float px, float py, float pz) -> float { return RecoDecay::P(px, py, pz); }); + [](float px, float py, float pz) -> float { return RecoDecay::p(px, py, pz); }); DECLARE_SOA_DYNAMIC_COLUMN(P2, p2, //! - [](float px, float py, float pz) -> float { return RecoDecay::P2(px, py, pz); }); + [](float px, float py, float pz) -> float { return RecoDecay::p2(px, py, pz); }); DECLARE_SOA_DYNAMIC_COLUMN(PVector, pVector, //! [](float px, float py, float pz) -> array { return array{px, py, pz}; }); DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! - [](float px, float py, float pz) -> float { return RecoDecay::Eta(array{px, py, pz}); }); + [](float px, float py, float pz) -> float { return RecoDecay::eta(array{px, py, pz}); }); DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! - [](float px, float py) -> float { return RecoDecay::Phi(px, py); }); + [](float px, float py) -> float { return RecoDecay::phi(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(Y, y, //! - [](float px, float py, float pz, double m) -> float { return RecoDecay::Y(array{px, py, pz}, m); }); + [](float px, float py, float pz, double m) -> float { return RecoDecay::y(array{px, py, pz}, m); }); DECLARE_SOA_DYNAMIC_COLUMN(E, e, //! - [](float px, float py, float pz, double m) -> float { return RecoDecay::E(px, py, pz, m); }); + [](float px, float py, float pz, double m) -> float { return RecoDecay::e(px, py, pz, m); }); DECLARE_SOA_DYNAMIC_COLUMN(E2, e2, //! - [](float px, float py, float pz, double m) -> float { return RecoDecay::E2(px, py, pz, m); }); + [](float px, float py, float pz, double m) -> float { return RecoDecay::e2(px, py, pz, m); }); DECLARE_SOA_DYNAMIC_COLUMN(DecayLength, decayLength, //! [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS) -> float { return RecoDecay::distance(array{xVtxP, yVtxP, zVtxP}, array{xVtxS, yVtxS, zVtxS}); }); DECLARE_SOA_DYNAMIC_COLUMN(DecayLengthXY, decayLengthXY, //! @@ -283,13 +283,13 @@ DECLARE_SOA_DYNAMIC_COLUMN(DecayLengthXYNormalised, decayLengthXYNormalised, //! DECLARE_SOA_COLUMN(ErrorDecayLength, errorDecayLength, float); //! DECLARE_SOA_COLUMN(ErrorDecayLengthXY, errorDecayLengthXY, float); //! DECLARE_SOA_DYNAMIC_COLUMN(CPA, cpa, //! - [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz) -> float { return RecoDecay::CPA(array{xVtxP, yVtxP, zVtxP}, array{xVtxS, yVtxS, zVtxS}, array{px, py, pz}); }); + [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz) -> float { return RecoDecay::cpa(array{xVtxP, yVtxP, zVtxP}, array{xVtxS, yVtxS, zVtxS}, array{px, py, pz}); }); DECLARE_SOA_DYNAMIC_COLUMN(CPAXY, cpaXY, //! - [](float xVtxP, float yVtxP, float xVtxS, float yVtxS, float px, float py) -> float { return RecoDecay::CPAXY(array{xVtxP, yVtxP}, array{xVtxS, yVtxS}, array{px, py}); }); + [](float xVtxP, float yVtxP, float xVtxS, float yVtxS, float px, float py) -> float { return RecoDecay::cpaXY(array{xVtxP, yVtxP}, array{xVtxS, yVtxS}, array{px, py}); }); DECLARE_SOA_DYNAMIC_COLUMN(Ct, ct, //! - [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz, double m) -> float { return RecoDecay::Ct(array{px, py, pz}, RecoDecay::distance(array{xVtxP, yVtxP, zVtxP}, array{xVtxS, yVtxS, zVtxS}), m); }); + [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz, double m) -> float { return RecoDecay::ct(array{px, py, pz}, RecoDecay::distance(array{xVtxP, yVtxP, zVtxP}, array{xVtxS, yVtxS, zVtxS}), m); }); DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterXY, impactParameterXY, //! - [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz) -> float { return RecoDecay::ImpParXY(array{xVtxP, yVtxP, zVtxP}, array{xVtxS, yVtxS, zVtxS}, array{px, py, pz}); }); + [](float xVtxP, float yVtxP, float zVtxP, float xVtxS, float yVtxS, float zVtxS, float px, float py, float pz) -> float { return RecoDecay::impParXY(array{xVtxP, yVtxP, zVtxP}, array{xVtxS, yVtxS, zVtxS}, array{px, py, pz}); }); // mapping of origin type enum OriginType { Prompt = 1, @@ -308,11 +308,11 @@ DECLARE_SOA_EXPRESSION_COLUMN(Pz, pz, //! DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterProduct, impactParameterProduct, //! [](float dca1, float dca2) -> float { return dca1 * dca2; }); DECLARE_SOA_DYNAMIC_COLUMN(M, m, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const array& m) -> float { return RecoDecay::M(array{array{px0, py0, pz0}, array{px1, py1, pz1}}, m); }); + [](float px0, float py0, float pz0, float px1, float py1, float pz1, const array& m) -> float { return RecoDecay::m(array{array{px0, py0, pz0}, array{px1, py1, pz1}}, m); }); DECLARE_SOA_DYNAMIC_COLUMN(M2, m2, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const array& m) -> float { return RecoDecay::M2(array{array{px0, py0, pz0}, array{px1, py1, pz1}}, m); }); + [](float px0, float py0, float pz0, float px1, float py1, float pz1, const array& m) -> float { return RecoDecay::m2(array{array{px0, py0, pz0}, array{px1, py1, pz1}}, m); }); DECLARE_SOA_DYNAMIC_COLUMN(CosThetaStar, cosThetaStar, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, const array& m, double mTot, int iProng) -> float { return RecoDecay::CosThetaStar(array{array{px0, py0, pz0}, array{px1, py1, pz1}}, m, mTot, iProng); }); + [](float px0, float py0, float pz0, float px1, float py1, float pz1, const array& m, double mTot, int iProng) -> float { return RecoDecay::cosThetaStar(array{array{px0, py0, pz0}, array{px1, py1, pz1}}, m, mTot, iProng); }); DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterProngSqSum, impactParameterProngSqSum, //! [](float impParProng0, float impParProng1) -> float { return RecoDecay::sumOfSquares(impParProng0, impParProng1); }); DECLARE_SOA_DYNAMIC_COLUMN(MaxNormalisedDeltaIP, maxNormalisedDeltaIP, //! @@ -495,9 +495,9 @@ DECLARE_SOA_EXPRESSION_COLUMN(Pz, pz, //! float, 1.f * aod::hf_cand::pzProng0 + 1.f * aod::hf_cand::pzProng1); // DECLARE_SOA_DYNAMIC_COLUMN(M, m, [](float px0, float py0, float pz0, float px1, float py1, float pz1, const array& m) { return RecoDecay::M(array{array{px0, py0, pz0}, array{px1, py1, pz1}}, m); }); DECLARE_SOA_DYNAMIC_COLUMN(PtV0Pos, ptV0Pos, //! - [](float px, float py) { return RecoDecay::Pt(px, py); }); + [](float px, float py) { return RecoDecay::pt(px, py); }); DECLARE_SOA_DYNAMIC_COLUMN(PtV0Neg, ptV0Neg, //! - [](float px, float py) { return RecoDecay::Pt(px, py); }); + [](float px, float py) { return RecoDecay::pt(px, py); }); DECLARE_SOA_COLUMN(FlagMCMatchRec, flagMCMatchRec, int8_t); //! reconstruction level DECLARE_SOA_COLUMN(FlagMCMatchGen, flagMCMatchGen, int8_t); //! generator level @@ -682,9 +682,9 @@ DECLARE_SOA_EXPRESSION_COLUMN(Py, py, //! DECLARE_SOA_EXPRESSION_COLUMN(Pz, pz, //! float, 1.f * aod::hf_cand::pzProng0 + 1.f * aod::hf_cand::pzProng1 + 1.f * aod::hf_cand::pzProng2); DECLARE_SOA_DYNAMIC_COLUMN(M, m, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2, const array& m) -> float { return RecoDecay::M(array{array{px0, py0, pz0}, array{px1, py1, pz1}, array{px2, py2, pz2}}, m); }); + [](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2, const array& m) -> float { return RecoDecay::m(array{array{px0, py0, pz0}, array{px1, py1, pz1}, array{px2, py2, pz2}}, m); }); DECLARE_SOA_DYNAMIC_COLUMN(M2, m2, //! - [](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2, const array& m) -> float { return RecoDecay::M2(array{array{px0, py0, pz0}, array{px1, py1, pz1}, array{px2, py2, pz2}}, m); }); + [](float px0, float py0, float pz0, float px1, float py1, float pz1, float px2, float py2, float pz2, const array& m) -> float { return RecoDecay::m2(array{array{px0, py0, pz0}, array{px1, py1, pz1}, array{px2, py2, pz2}}, m); }); DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterProngSqSum, impactParameterProngSqSum, //! [](float impParProng0, float impParProng1, float impParProng2) -> float { return RecoDecay::sumOfSquares(impParProng0, impParProng1, impParProng2); }); DECLARE_SOA_DYNAMIC_COLUMN(MaxNormalisedDeltaIP, maxNormalisedDeltaIP, //! @@ -909,7 +909,7 @@ auto QX(const T& candidate) double massPi = RecoDecay::getMassPDG(kPiPlus); auto arrayMomenta = array{piVec1, piVec2}; - double massPiPi = RecoDecay::M(arrayMomenta, array{massPi, massPi}); + double massPiPi = RecoDecay::m(arrayMomenta, array{massPi, massPi}); // PDG mass, as reported in CMS paper https://arxiv.org/pdf/1302.3968.pdf double massJpsi = RecoDecay::getMassPDG(o2::analysis::pdg::kJpsi); @@ -922,17 +922,17 @@ auto QX(const T& candidate) template auto DRX(const T& candidate, int numPi) { - double etaJpsi = RecoDecay::Eta(array{candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()}); - double phiJpsi = RecoDecay::Phi(candidate.pxProng0(), candidate.pyProng0()); + double etaJpsi = RecoDecay::eta(array{candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()}); + double phiJpsi = RecoDecay::phi(candidate.pxProng0(), candidate.pyProng0()); double etaPi, phiPi; if (numPi <= 1) { - etaPi = RecoDecay::Eta(array{candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()}); - phiPi = RecoDecay::Phi(candidate.pxProng1(), candidate.pyProng1()); + etaPi = RecoDecay::eta(array{candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()}); + phiPi = RecoDecay::phi(candidate.pxProng1(), candidate.pyProng1()); } else { - etaPi = RecoDecay::Eta(array{candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()}); - phiPi = RecoDecay::Phi(candidate.pxProng2(), candidate.pyProng2()); + etaPi = RecoDecay::eta(array{candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()}); + phiPi = RecoDecay::phi(candidate.pxProng2(), candidate.pyProng2()); } double deltaEta = etaJpsi - etaPi; @@ -945,8 +945,8 @@ auto DRX(const T& candidate, int numPi) template auto PiBalanceX(const T& candidate) { - double ptPi1 = RecoDecay::Pt(candidate.pxProng1(), candidate.pyProng1()); - double ptPi2 = RecoDecay::Pt(candidate.pxProng2(), candidate.pyProng2()); + double ptPi1 = RecoDecay::pt(candidate.pxProng1(), candidate.pyProng1()); + double ptPi2 = RecoDecay::pt(candidate.pxProng2(), candidate.pyProng2()); return std::abs(ptPi1 - ptPi2) / (ptPi1 + ptPi2); } // declare dedicated X candidate table diff --git a/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx b/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx index 64b7492ad53..35a0fe485b7 100644 --- a/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx @@ -146,8 +146,8 @@ struct HFCandidateCreator2Prong { if (b_dovalplots) { // calculate invariant masses auto arrayMomenta = array{pvec0, pvec1}; - massPiK = RecoDecay::M(arrayMomenta, array{massPi, massK}); - massKPi = RecoDecay::M(arrayMomenta, array{massK, massPi}); + massPiK = RecoDecay::m(arrayMomenta, array{massPi, massK}); + massKPi = RecoDecay::m(arrayMomenta, array{massK, massPi}); hmass2->Fill(massPiK); hmass2->Fill(massKPi); } diff --git a/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx b/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx index 54e744d0220..bcd3fb4cc09 100644 --- a/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/HFCandidateCreator3Prong.cxx @@ -161,7 +161,7 @@ struct HFCandidateCreator3Prong { if (b_dovalplots) { // calculate invariant mass auto arrayMomenta = array{pvec0, pvec1, pvec2}; - massPiKPi = RecoDecay::M(std::move(arrayMomenta), array{massPi, massK, massPi}); + massPiKPi = RecoDecay::m(std::move(arrayMomenta), array{massPi, massK, massPi}); hmass3->Fill(massPiKPi); } } diff --git a/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx b/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx index 6c0c96bf3df..20070103c23 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx @@ -172,7 +172,7 @@ struct HfCandidateCreatorBplus { auto covMatrixPCA = bfitter.calcPCACovMatrixFlat(); hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line. - pVecBCand = RecoDecay::PVec(pVecD0, pVecBach); + pVecBCand = RecoDecay::pVec(pVecD0, pVecBach); // get track impact parameters // This modifies track momenta! diff --git a/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx b/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx index dd3d7af1a58..e998922c992 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorCascade.cxx @@ -200,7 +200,7 @@ struct HFCandidateCreatorCascade { // fill histograms if (doValPlots) { // calculate invariant masses - mass2K0sP = RecoDecay::M(array{pVecBach, pVecV0}, array{massP, massK0s}); + mass2K0sP = RecoDecay::m(array{pVecBach, pVecV0}, array{massP, massK0s}); hmass2->Fill(mass2K0sP); } } diff --git a/PWGHF/TableProducer/HFCandidateCreatorChic.cxx b/PWGHF/TableProducer/HFCandidateCreatorChic.cxx index 74d2d7f72f6..2b8a9255bee 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorChic.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorChic.cxx @@ -132,7 +132,7 @@ struct HFCandidateCreatorChic { if (ecal.e() < eneGammaMin) { continue; } - auto etagamma = RecoDecay::Eta(array{ecal.px(), ecal.py(), ecal.pz()}); + auto etagamma = RecoDecay::eta(array{ecal.px(), ecal.py(), ecal.pz()}); if (etagamma < etaGammaMin || etagamma > etaGammaMax) { // calcolare la pseudorapidità da posz continue; } @@ -178,7 +178,7 @@ struct HFCandidateCreatorChic { // calculate invariant mass auto arrayMomenta = array{pvecJpsi, pvecGamma}; - massJpsiGamma = RecoDecay::M(std::move(arrayMomenta), array{massJpsi, 0.}); + massJpsiGamma = RecoDecay::m(std::move(arrayMomenta), array{massJpsi, 0.}); if (jpsiCand.isSelJpsiToEE() > 0) { hMassChicToJpsiToEEGamma->Fill(massJpsiGamma); } diff --git a/PWGHF/TableProducer/HFCandidateCreatorLb.cxx b/PWGHF/TableProducer/HFCandidateCreatorLb.cxx index 4919e83ec0d..46b0578df37 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorLb.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorLb.cxx @@ -198,7 +198,7 @@ struct HFCandidateCreatorLb { // calculate invariant mass auto arrayMomenta = array{pvecLc, pvecPion}; - massLcPi = RecoDecay::M(std::move(arrayMomenta), array{massLc, massPi}); + massLcPi = RecoDecay::m(std::move(arrayMomenta), array{massLc, massPi}); if (lcCand.isSelLcpKpi() > 0) { hMassLbToLcPi->Fill(massLcPi); } diff --git a/PWGHF/TableProducer/HFCandidateCreatorX.cxx b/PWGHF/TableProducer/HFCandidateCreatorX.cxx index cdf0ceeada1..b76c3c29fef 100644 --- a/PWGHF/TableProducer/HFCandidateCreatorX.cxx +++ b/PWGHF/TableProducer/HFCandidateCreatorX.cxx @@ -230,7 +230,7 @@ struct HFCandidateCreatorX { // calculate invariant mass auto arrayMomenta = array{pvecJpsi, pvecPos, pvecNeg}; - massJpsiPiPi = RecoDecay::M(std::move(arrayMomenta), array{massJpsi, massPi, massPi}); + massJpsiPiPi = RecoDecay::m(std::move(arrayMomenta), array{massJpsi, massPi, massPi}); if (jpsiCand.isSelJpsiToEE() > 0) { hMassXToJpsiToEEPiPi->Fill(massJpsiPiPi); } diff --git a/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx b/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx index 203a28bef7e..6fb298665f4 100644 --- a/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx +++ b/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx @@ -992,7 +992,7 @@ struct HfTrackIndexSkimsCreator { array{hfTrack0.pxProng(), hfTrack0.pyProng(), hfTrack0.pzProng()}, array{hfTrack1.pxProng(), hfTrack1.pyProng(), hfTrack1.pzProng()}}; - auto pT = RecoDecay::Pt(arrMom[0], arrMom[1]) + pTTolerance; // add tolerance because of no reco decay vertex + auto pT = RecoDecay::pt(arrMom[0], arrMom[1]) + pTTolerance; // add tolerance because of no reco decay vertex for (int iDecay2P = 0; iDecay2P < n2ProngDecays; iDecay2P++) { @@ -1014,8 +1014,8 @@ struct HfTrackIndexSkimsCreator { double max2 = pow(cut2Prong[iDecay2P].get(pTBin, massMaxIndex[iDecay2P]), 2); if ((debug || TESTBIT(isSelected, iDecay2P)) && cut2Prong[iDecay2P].get(pTBin, massMinIndex[iDecay2P]) >= 0. && cut2Prong[iDecay2P].get(pTBin, massMaxIndex[iDecay2P]) > 0.) { - massHypos[0] = RecoDecay::M2(arrMom, arrMass2Prong[iDecay2P][0]); - massHypos[1] = RecoDecay::M2(arrMom, arrMass2Prong[iDecay2P][1]); + massHypos[0] = RecoDecay::m2(arrMom, arrMass2Prong[iDecay2P][0]); + massHypos[1] = RecoDecay::m2(arrMom, arrMass2Prong[iDecay2P][1]); if (massHypos[0] < min2 || massHypos[0] >= max2) { whichHypo[iDecay2P] -= 1; } @@ -1075,7 +1075,7 @@ struct HfTrackIndexSkimsCreator { array{hfTrack1.pxProng(), hfTrack1.pyProng(), hfTrack1.pzProng()}, array{hfTrack2.pxProng(), hfTrack2.pyProng(), hfTrack2.pzProng()}}; - auto pT = RecoDecay::Pt(arrMom[0], arrMom[1], arrMom[2]) + pTTolerance; // add tolerance because of no reco decay vertex + auto pT = RecoDecay::pt(arrMom[0], arrMom[1], arrMom[2]) + pTTolerance; // add tolerance because of no reco decay vertex for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { @@ -1097,8 +1097,8 @@ struct HfTrackIndexSkimsCreator { double max2 = pow(cut3Prong[iDecay3P].get(pTBin, massMaxIndex[iDecay3P]), 2); if ((debug || TESTBIT(isSelected, iDecay3P)) && cut3Prong[iDecay3P].get(pTBin, massMinIndex[iDecay3P]) >= 0. && cut3Prong[iDecay3P].get(pTBin, massMaxIndex[iDecay3P]) > 0.) { // no need to check isSelected but to avoid mistakes - massHypos[0] = RecoDecay::M2(arrMom, arrMass3Prong[iDecay3P][0]); - massHypos[1] = RecoDecay::M2(arrMom, arrMass3Prong[iDecay3P][1]); + massHypos[0] = RecoDecay::m2(arrMom, arrMass3Prong[iDecay3P][0]); + massHypos[1] = RecoDecay::m2(arrMom, arrMass3Prong[iDecay3P][1]); if (massHypos[0] < min2 || massHypos[0] >= max2) { whichHypo[iDecay3P] -= 1; } @@ -1140,7 +1140,7 @@ struct HfTrackIndexSkimsCreator { for (int iDecay2P = 0; iDecay2P < n2ProngDecays; iDecay2P++) { // pT - auto pTBin = findBin(&pTBins2Prong[iDecay2P], RecoDecay::Pt(pVecCand)); + auto pTBin = findBin(&pTBins2Prong[iDecay2P], RecoDecay::pt(pVecCand)); if (pTBin == -1) { // cut if it is outside the defined pT bins CLRBIT(isSelected, iDecay2P); if (debug) { @@ -1151,7 +1151,7 @@ struct HfTrackIndexSkimsCreator { // cosp if (debug || TESTBIT(isSelected, iDecay2P)) { - auto cpa = RecoDecay::CPA(primVtx, secVtx, pVecCand); + auto cpa = RecoDecay::cpa(primVtx, secVtx, pVecCand); if (cpa < cut2Prong[iDecay2P].get(pTBin, cospIndex[iDecay2P])) { CLRBIT(isSelected, iDecay2P); if (debug) { @@ -1191,7 +1191,7 @@ struct HfTrackIndexSkimsCreator { for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { // pT - auto pTBin = findBin(&pTBins3Prong[iDecay3P], RecoDecay::Pt(pVecCand)); + auto pTBin = findBin(&pTBins3Prong[iDecay3P], RecoDecay::pt(pVecCand)); if (pTBin == -1) { // cut if it is outside the defined pT bins CLRBIT(isSelected, iDecay3P); if (debug) { @@ -1202,7 +1202,7 @@ struct HfTrackIndexSkimsCreator { // cosp if ((debug || TESTBIT(isSelected, iDecay3P))) { - auto cpa = RecoDecay::CPA(primVtx, secVtx, pVecCand); + auto cpa = RecoDecay::cpa(primVtx, secVtx, pVecCand); if (cpa < cut3Prong[iDecay3P].get(pTBin, cospIndex[iDecay3P])) { CLRBIT(isSelected, iDecay3P); if (debug) { @@ -1583,7 +1583,7 @@ struct HfTrackIndexSkimsCreator { } } - auto pVecCandProng2 = RecoDecay::PVec(pvec0, pvec1); + auto pVecCandProng2 = RecoDecay::pVec(pvec0, pvec1); // 2-prong selections after secondary vertex array pvCoord2Prong = {collision.posX(), collision.posY(), collision.posZ()}; if (doPvRefit) { @@ -1623,7 +1623,7 @@ struct HfTrackIndexSkimsCreator { for (int iDecay2P = 0; iDecay2P < n2ProngDecays; iDecay2P++) { if (TESTBIT(isSelected2ProngCand, iDecay2P)) { if (whichHypo2Prong[iDecay2P] == 1 || whichHypo2Prong[iDecay2P] == 3) { - auto mass2Prong = RecoDecay::M(arrMom, arrMass2Prong[iDecay2P][0]); + auto mass2Prong = RecoDecay::m(arrMom, arrMass2Prong[iDecay2P][0]); switch (iDecay2P) { case hf_cand_prong2::DecayType::D0ToPiK: registry.fill(HIST("hmassD0ToPiK"), mass2Prong); @@ -1637,7 +1637,7 @@ struct HfTrackIndexSkimsCreator { } } if (whichHypo2Prong[iDecay2P] >= 2) { - auto mass2Prong = RecoDecay::M(arrMom, arrMass2Prong[iDecay2P][1]); + auto mass2Prong = RecoDecay::m(arrMom, arrMass2Prong[iDecay2P][1]); if (iDecay2P == hf_cand_prong2::DecayType::D0ToPiK) { registry.fill(HIST("hmassD0ToPiK"), mass2Prong); } @@ -1782,7 +1782,7 @@ struct HfTrackIndexSkimsCreator { } } - auto pVecCandProng3Pos = RecoDecay::PVec(pvec0, pvec1, pvec2); + auto pVecCandProng3Pos = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex array pvCoord3Prong2Pos1Neg = {collision.posX(), collision.posY(), collision.posZ()}; if (doPvRefit) { @@ -1825,7 +1825,7 @@ struct HfTrackIndexSkimsCreator { for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { if (TESTBIT(isSelected3ProngCand, iDecay3P)) { if (whichHypo3Prong[iDecay3P] == 1 || whichHypo3Prong[iDecay3P] == 3) { - auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][0]); + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P][0]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DPlusToPiKPi: registry.fill(HIST("hmassDPlusToPiKPi"), mass3Prong); @@ -1842,7 +1842,7 @@ struct HfTrackIndexSkimsCreator { } } if (whichHypo3Prong[iDecay3P] >= 2) { - auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][1]); + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P][1]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DsToPiKK: registry.fill(HIST("hmassDsToPiKK"), mass3Prong); @@ -1985,7 +1985,7 @@ struct HfTrackIndexSkimsCreator { } } - auto pVecCandProng3Neg = RecoDecay::PVec(pvec0, pvec1, pvec2); + auto pVecCandProng3Neg = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex array pvCoord3Prong1Pos2Neg = {collision.posX(), collision.posY(), collision.posZ()}; if (doPvRefit) { @@ -2028,7 +2028,7 @@ struct HfTrackIndexSkimsCreator { for (int iDecay3P = 0; iDecay3P < n3ProngDecays; iDecay3P++) { if (TESTBIT(isSelected3ProngCand, iDecay3P)) { if (whichHypo3Prong[iDecay3P] == 1 || whichHypo3Prong[iDecay3P] == 3) { - auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][0]); + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P][0]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DPlusToPiKPi: registry.fill(HIST("hmassDPlusToPiKPi"), mass3Prong); @@ -2045,7 +2045,7 @@ struct HfTrackIndexSkimsCreator { } } if (whichHypo3Prong[iDecay3P] >= 2) { - auto mass3Prong = RecoDecay::M(arr3Mom, arrMass3Prong[iDecay3P][1]); + auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[iDecay3P][1]); switch (iDecay3P) { case hf_cand_prong3::DecayType::DsToPiKK: registry.fill(HIST("hmassDsToPiKK"), mass3Prong); @@ -2285,7 +2285,7 @@ struct HfTrackIndexSkimsCreatorCascades { // invariant-mass cut: we do it here, before updating the momenta of bach and V0 during the fitting to save CPU // TODO: but one should better check that the value here and after the fitter do not change significantly!!! - mass2K0sP = RecoDecay::M(array{array{bach.px(), bach.py(), bach.pz()}, momentumV0}, array{massP, massK0s}); + mass2K0sP = RecoDecay::m(array{array{bach.px(), bach.py(), bach.pz()}, momentumV0}, array{massP, massK0s}); if ((cutCascInvMassLc >= 0.) && (std::abs(mass2K0sP - massLc) > cutCascInvMassLc)) { MY_DEBUG_MSG(isK0SfromLc && isProtonFromLc, LOG(info) << "True Lc from proton " << indexBach << " and K0S pos " << indexV0DaughPos << " and neg " << indexV0DaughNeg << " rejected due to invMass cut: " << mass2K0sP << ", mass Lc " << massLc << " (cut " << cutCascInvMassLc << ")"); continue; @@ -2316,7 +2316,7 @@ struct HfTrackIndexSkimsCreatorCascades { fitter.getTrack(1).getPxPyPzGlo(pVecBach); // cascade candidate pT cut - auto ptCascCand = RecoDecay::Pt(pVecBach, pVecV0); + auto ptCascCand = RecoDecay::pt(pVecBach, pVecV0); if (ptCascCand < cutCascPtCandMin) { MY_DEBUG_MSG(isK0SfromLc && isProtonFromLc, LOG(info) << "True Lc from proton " << indexBach << " and K0S pos " << indexV0DaughPos << " and neg " << indexV0DaughNeg << " rejected due to pt cut: " << ptCascCand << " (cut " << cutCascPtCandMin << ")"); continue; @@ -2324,7 +2324,7 @@ struct HfTrackIndexSkimsCreatorCascades { // invariant mass // re-calculate invariant masses with updated momenta, to fill the histogram - mass2K0sP = RecoDecay::M(array{pVecBach, pVecV0}, array{massP, massK0s}); + mass2K0sP = RecoDecay::m(array{pVecBach, pVecV0}, array{massP, massK0s}); std::array posCasc = {0., 0., 0.}; const auto& cascVtx = fitter.getPCACandidate(); diff --git a/PWGHF/TableProducer/HFTreeCreatorBplusToD0Pi.cxx b/PWGHF/TableProducer/HFTreeCreatorBplusToD0Pi.cxx index 174e85f2ea5..a084b7c4026 100644 --- a/PWGHF/TableProducer/HFTreeCreatorBplusToD0Pi.cxx +++ b/PWGHF/TableProducer/HFTreeCreatorBplusToD0Pi.cxx @@ -240,9 +240,9 @@ struct HfTreeCreatorBplusToD0Pi { rowCandidateFull( candidate.rSecondaryVertex(), candidate.ptProng0(), - RecoDecay::P(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), candidate.ptProng1(), - RecoDecay::P(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), //1 << CandFlag, FunctionInvMass, candidate.pt(), @@ -315,7 +315,7 @@ struct HfTreeCreatorBplusToD0Pi { particle.pt(), particle.eta(), particle.phi(), - RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), + RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), particle.flagMCMatchGen()); } } diff --git a/PWGHF/TableProducer/HFTreeCreatorChicToJpsiGamma.cxx b/PWGHF/TableProducer/HFTreeCreatorChicToJpsiGamma.cxx index 905afcbe0e7..63376da5cbb 100644 --- a/PWGHF/TableProducer/HFTreeCreatorChicToJpsiGamma.cxx +++ b/PWGHF/TableProducer/HFTreeCreatorChicToJpsiGamma.cxx @@ -151,8 +151,8 @@ struct HfTreeCreatorChicToJpsiGamma { array pvecChic = {candidate.px(), candidate.py(), candidate.pz()}; array pvecJpsi = {candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()}; array pvecGamma = {candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()}; - auto pchic = RecoDecay::P(pvecChic); - auto pjpsi = RecoDecay::P(pvecJpsi); + auto pchic = RecoDecay::p(pvecChic); + auto pjpsi = RecoDecay::p(pvecJpsi); auto pl1 = std::abs(RecoDecay::dotProd(pvecChic, pvecJpsi)) / pchic; auto pl2 = std::abs(RecoDecay::dotProd(pvecChic, pvecGamma)) / pchic; auto alpha = (pl1 - pl2) / (pl1 + pl2); @@ -176,9 +176,9 @@ struct HfTreeCreatorChicToJpsiGamma { candidate.decayLength(), candidate.decayLengthXY(), candidate.ptProng0(), - RecoDecay::P(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), candidate.ptProng1(), - RecoDecay::P(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), alpha, qt, candidate.chi2PCA(), @@ -211,7 +211,7 @@ struct HfTreeCreatorChicToJpsiGamma { particle.pt(), particle.eta(), particle.phi(), - RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, massChic), + RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, massChic), 0., // put here the jpsi mass particle.flagMCMatchGen()); } diff --git a/PWGHF/TableProducer/HFTreeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/HFTreeCreatorD0ToKPi.cxx index 8adc7e7c54c..0ca72106323 100644 --- a/PWGHF/TableProducer/HFTreeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/HFTreeCreatorD0ToKPi.cxx @@ -205,10 +205,10 @@ struct CandidateTreeWriter { candidate.decayLengthXYNormalised(), candidate.impactParameterNormalised0(), candidate.ptProng0(), - RecoDecay::P(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), candidate.impactParameterNormalised1(), candidate.ptProng1(), - RecoDecay::P(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0(), @@ -257,7 +257,7 @@ struct CandidateTreeWriter { particle.pt(), particle.eta(), particle.phi(), - RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), + RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), particle.flagMCMatchGen()); } } diff --git a/PWGHF/TableProducer/HFTreeCreatorLcToPKPi.cxx b/PWGHF/TableProducer/HFTreeCreatorLcToPKPi.cxx index 41ba2bf9981..3aa14175295 100644 --- a/PWGHF/TableProducer/HFTreeCreatorLcToPKPi.cxx +++ b/PWGHF/TableProducer/HFTreeCreatorLcToPKPi.cxx @@ -239,13 +239,13 @@ struct CandidateTreeWriter { candidate.decayLengthXYNormalised(), candidate.impactParameterNormalised0(), candidate.ptProng0(), - RecoDecay::P(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), candidate.impactParameterNormalised1(), candidate.ptProng1(), - RecoDecay::P(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), candidate.impactParameterNormalised2(), candidate.ptProng2(), - RecoDecay::P(candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()), + RecoDecay::p(candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()), candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0(), @@ -308,7 +308,7 @@ struct CandidateTreeWriter { particle.pt(), particle.eta(), particle.phi(), - RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), + RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), particle.flagMCMatchGen()); } } @@ -366,13 +366,13 @@ struct CandidateTreeWriter { candidate.decayLengthXYNormalised(), candidate.impactParameterNormalised0(), candidate.ptProng0(), - RecoDecay::P(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), candidate.impactParameterNormalised1(), candidate.ptProng1(), - RecoDecay::P(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), candidate.impactParameterNormalised2(), candidate.ptProng2(), - RecoDecay::P(candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()), + RecoDecay::p(candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()), candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0(), diff --git a/PWGHF/TableProducer/HFTreeCreatorXToJpsiPiPi.cxx b/PWGHF/TableProducer/HFTreeCreatorXToJpsiPiPi.cxx index 7cfcfd502bf..cee066d83e4 100644 --- a/PWGHF/TableProducer/HFTreeCreatorXToJpsiPiPi.cxx +++ b/PWGHF/TableProducer/HFTreeCreatorXToJpsiPiPi.cxx @@ -196,12 +196,12 @@ struct HfTreeCreatorXTojpsipipi { candidate.decayLengthXY(), candidate.impactParameterNormalised0(), candidate.ptProng0(), - RecoDecay::P(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), candidate.impactParameterNormalised1(), candidate.ptProng1(), - RecoDecay::P(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), candidate.ptProng2(), - RecoDecay::P(candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()), + RecoDecay::p(candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()), candidate.impactParameter0(), candidate.impactParameter1(), candidate.impactParameter2(), @@ -242,7 +242,7 @@ struct HfTreeCreatorXTojpsipipi { particle.pt(), particle.eta(), particle.phi(), - RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, massX), + RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, massX), particle.flagMCMatchGen()); } } diff --git a/PWGHF/TableProducer/HFTreeCreatorXiccToPKPiPi.cxx b/PWGHF/TableProducer/HFTreeCreatorXiccToPKPiPi.cxx index d18011eb379..f5a23dd7e23 100644 --- a/PWGHF/TableProducer/HFTreeCreatorXiccToPKPiPi.cxx +++ b/PWGHF/TableProducer/HFTreeCreatorXiccToPKPiPi.cxx @@ -204,10 +204,10 @@ struct HfTreeCreatorXiccTopkpipi { candidate.decayLengthXYNormalised(), candidate.impactParameterNormalised0(), candidate.ptProng0(), - RecoDecay::P(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), candidate.impactParameterNormalised1(), candidate.ptProng1(), - RecoDecay::P(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0(), @@ -263,7 +263,7 @@ struct HfTreeCreatorXiccTopkpipi { particle.pt(), particle.eta(), particle.phi(), - RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), + RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), particle.flagMCMatchGen()); } } diff --git a/PWGHF/TableProducer/candidateCreatorDstar.cxx b/PWGHF/TableProducer/candidateCreatorDstar.cxx index d0560f53b3a..e15efebc1d8 100644 --- a/PWGHF/TableProducer/candidateCreatorDstar.cxx +++ b/PWGHF/TableProducer/candidateCreatorDstar.cxx @@ -59,16 +59,16 @@ struct HfCandidateCreatorDstar { std::array pVecPi = {trackPi.px(), trackPi.py(), trackPi.pz()}; std::array pVecD0Prong0 = {trackD0Prong0.px(), trackD0Prong0.py(), trackD0Prong0.pz()}; std::array pVecD0Prong1 = {trackD0Prong1.px(), trackD0Prong1.py(), trackD0Prong1.pz()}; - auto pVecD0 = RecoDecay::PVec(pVecD0Prong0, pVecD0Prong1); + auto pVecD0 = RecoDecay::pVec(pVecD0Prong0, pVecD0Prong1); // fill histograms if (fillHistograms) { - hPtPi->Fill(RecoDecay::Pt(pVecPi)); - hPtD0->Fill(RecoDecay::Pt(pVecD0)); - hPtD0Prong0->Fill(RecoDecay::Pt(pVecD0Prong0)); - hPtD0Prong1->Fill(RecoDecay::Pt(pVecD0Prong1)); + hPtPi->Fill(RecoDecay::pt(pVecPi)); + hPtD0->Fill(RecoDecay::pt(pVecD0)); + hPtD0Prong0->Fill(RecoDecay::pt(pVecD0Prong0)); + hPtD0Prong1->Fill(RecoDecay::pt(pVecD0Prong1)); // calculate invariant mass - auto mass = RecoDecay::M(std::array{pVecPi, pVecD0}, std::array{massPi, massD0}); + auto mass = RecoDecay::m(std::array{pVecPi, pVecD0}, std::array{massPi, massD0}); hMass->Fill(mass); } } diff --git a/PWGHF/Tasks/HFCorrelatorD0D0bar.cxx b/PWGHF/Tasks/HFCorrelatorD0D0bar.cxx index a2f409857df..01b4945f63a 100644 --- a/PWGHF/Tasks/HFCorrelatorD0D0bar.cxx +++ b/PWGHF/Tasks/HFCorrelatorD0D0bar.cxx @@ -385,7 +385,7 @@ struct HfCorrelatorD0D0bar { if (std::abs(particle1.pdgCode()) != pdg::Code::kD0) { continue; } - double yD = RecoDecay::Y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); + double yD = RecoDecay::y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); if (cutYCandMax >= 0. && std::abs(yD) > cutYCandMax) { continue; } @@ -408,7 +408,7 @@ struct HfCorrelatorD0D0bar { if (particle2.pdgCode() != pdg::Code::kD0bar) { // check that inner particle is D0bar continue; } - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { continue; } if (cutPtCandMin >= 0. && particle2.pt() < cutPtCandMin) { @@ -482,7 +482,7 @@ struct HfCorrelatorD0D0bar { continue; } counterCCbarBeforeEtasel++; // count c or cbar (before kinematic selection) - double yC = RecoDecay::Y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); + double yC = RecoDecay::y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); if (cutYCandMax >= 0. && std::abs(yC) > cutYCandMax) { continue; } @@ -506,7 +506,7 @@ struct HfCorrelatorD0D0bar { if (particle2.pdgCode() != PDG_t::kCharmBar) { // check that inner particle is a cbar continue; } - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { continue; } if (cutPtCandMin >= 0. && particle2.pt() < cutPtCandMin) { diff --git a/PWGHF/Tasks/HFCorrelatorD0D0barBarrelFullPID.cxx b/PWGHF/Tasks/HFCorrelatorD0D0barBarrelFullPID.cxx index 89c2e7a5368..5aa980a6fac 100644 --- a/PWGHF/Tasks/HFCorrelatorD0D0barBarrelFullPID.cxx +++ b/PWGHF/Tasks/HFCorrelatorD0D0barBarrelFullPID.cxx @@ -385,7 +385,7 @@ struct HfCorrelatorD0D0barBarrelFullPid { if (std::abs(particle1.pdgCode()) != pdg::Code::kD0) { continue; } - double yD = RecoDecay::Y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); + double yD = RecoDecay::y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); if (cutYCandMax >= 0. && std::abs(yD) > cutYCandMax) { continue; } @@ -408,7 +408,7 @@ struct HfCorrelatorD0D0barBarrelFullPid { if (particle2.pdgCode() != pdg::Code::kD0bar) { // check that inner particle is D0bar continue; } - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { continue; } if (cutPtCandMin >= 0. && particle2.pt() < cutPtCandMin) { @@ -482,7 +482,7 @@ struct HfCorrelatorD0D0barBarrelFullPid { continue; } counterCCbarBeforeEtasel++; // count c or cbar (before kinematic selection) - double yC = RecoDecay::Y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); + double yC = RecoDecay::y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); if (cutYCandMax >= 0. && std::abs(yC) > cutYCandMax) { continue; } @@ -506,7 +506,7 @@ struct HfCorrelatorD0D0barBarrelFullPid { if (particle2.pdgCode() != PDG_t::kCharmBar) { // check that inner particle is a cbar continue; } - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { continue; } if (cutPtCandMin >= 0. && particle2.pt() < cutPtCandMin) { diff --git a/PWGHF/Tasks/HFCorrelatorDplusDminus.cxx b/PWGHF/Tasks/HFCorrelatorDplusDminus.cxx index 97441c8f59f..2a248f57091 100644 --- a/PWGHF/Tasks/HFCorrelatorDplusDminus.cxx +++ b/PWGHF/Tasks/HFCorrelatorDplusDminus.cxx @@ -369,7 +369,7 @@ struct HfCorrelatorDplusDminus { if (std::abs(particle1.pdgCode()) != pdg::Code::kDPlus) { continue; } - double yD = RecoDecay::Y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); + double yD = RecoDecay::y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); if (cutYCandMax >= 0. && std::abs(yD) > cutYCandMax) { continue; } @@ -392,7 +392,7 @@ struct HfCorrelatorDplusDminus { if (particle2.pdgCode() != -pdg::Code::kDPlus) { // check that inner particle is a Dminus continue; } - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { continue; } if (cutPtCandMin >= 0. && particle2.pt() < cutPtCandMin) { @@ -466,7 +466,7 @@ struct HfCorrelatorDplusDminus { continue; } counterCCbarBeforeEtasel++; // count c or cbar (before kinematic selection) - double yC = RecoDecay::Y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); + double yC = RecoDecay::y(array{particle1.px(), particle1.py(), particle1.pz()}, RecoDecay::getMassPDG(particle1.pdgCode())); if (cutYCandMax >= 0. && std::abs(yC) > cutYCandMax) { continue; } @@ -490,7 +490,7 @@ struct HfCorrelatorDplusDminus { if (particle2.pdgCode() != PDG_t::kCharmBar) { continue; } - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle2.px(), particle2.py(), particle2.pz()}, RecoDecay::getMassPDG(particle2.pdgCode()))) > cutYCandMax) { continue; } if (cutPtCandMin >= 0. && particle2.pt() < cutPtCandMin) { diff --git a/PWGHF/Tasks/HFMCValidation.cxx b/PWGHF/Tasks/HFMCValidation.cxx index 67958342c0a..26132cfb14e 100644 --- a/PWGHF/Tasks/HFMCValidation.cxx +++ b/PWGHF/Tasks/HFMCValidation.cxx @@ -172,8 +172,8 @@ struct ValidationGenLevel { if (std::abs(pxDiff) > 0.001 || std::abs(pyDiff) > 0.001 || std::abs(pzDiff) > 0.001) { momentumCheck = false; } - double pDiff = RecoDecay::P(pxDiff, pyDiff, pzDiff); - double ptDiff = RecoDecay::Pt(pxDiff, pyDiff); + double pDiff = RecoDecay::p(pxDiff, pyDiff, pzDiff); + double ptDiff = RecoDecay::pt(pxDiff, pyDiff); //Filling histograms with per-component momentum conservation registry.fill(HIST("hMomentumCheck"), float(momentumCheck)); registry.fill(HIST("hPxDiffMotherDaughterGen"), pxDiff); @@ -303,11 +303,11 @@ struct ValidationRecLevel { std::array momDau1 = {cand2Prong.pxProng1(), cand2Prong.pyProng1(), cand2Prong.pzProng1()}; - histPtDau[whichHad][whichOrigin][0]->Fill(RecoDecay::Pt(momDau0)); - histEtaDau[whichHad][whichOrigin][0]->Fill(RecoDecay::Eta(momDau0)); + histPtDau[whichHad][whichOrigin][0]->Fill(RecoDecay::pt(momDau0)); + histEtaDau[whichHad][whichOrigin][0]->Fill(RecoDecay::eta(momDau0)); histImpactParameterDau[whichHad][whichOrigin][0]->Fill(cand2Prong.impactParameter0()); - histPtDau[whichHad][whichOrigin][1]->Fill(RecoDecay::Pt(momDau1)); - histEtaDau[whichHad][whichOrigin][1]->Fill(RecoDecay::Eta(momDau1)); + histPtDau[whichHad][whichOrigin][1]->Fill(RecoDecay::pt(momDau1)); + histEtaDau[whichHad][whichOrigin][1]->Fill(RecoDecay::eta(momDau1)); histImpactParameterDau[whichHad][whichOrigin][1]->Fill(cand2Prong.impactParameter1()); } } //end loop on 2-prong candidates @@ -370,14 +370,14 @@ struct ValidationRecLevel { std::array momDau2 = {cand3Prong.pxProng2(), cand3Prong.pyProng2(), cand3Prong.pzProng2()}; - histPtDau[whichHad][whichOrigin][0]->Fill(RecoDecay::Pt(momDau0)); - histEtaDau[whichHad][whichOrigin][0]->Fill(RecoDecay::Eta(momDau0)); + histPtDau[whichHad][whichOrigin][0]->Fill(RecoDecay::pt(momDau0)); + histEtaDau[whichHad][whichOrigin][0]->Fill(RecoDecay::eta(momDau0)); histImpactParameterDau[whichHad][whichOrigin][0]->Fill(cand3Prong.impactParameter0()); - histPtDau[whichHad][whichOrigin][1]->Fill(RecoDecay::Pt(momDau1)); - histEtaDau[whichHad][whichOrigin][1]->Fill(RecoDecay::Eta(momDau1)); + histPtDau[whichHad][whichOrigin][1]->Fill(RecoDecay::pt(momDau1)); + histEtaDau[whichHad][whichOrigin][1]->Fill(RecoDecay::eta(momDau1)); histImpactParameterDau[whichHad][whichOrigin][1]->Fill(cand3Prong.impactParameter1()); - histPtDau[whichHad][whichOrigin][2]->Fill(RecoDecay::Pt(momDau2)); - histEtaDau[whichHad][whichOrigin][2]->Fill(RecoDecay::Eta(momDau2)); + histPtDau[whichHad][whichOrigin][2]->Fill(RecoDecay::pt(momDau2)); + histEtaDau[whichHad][whichOrigin][2]->Fill(RecoDecay::eta(momDau2)); histImpactParameterDau[whichHad][whichOrigin][2]->Fill(cand3Prong.impactParameter2()); } } //end loop on 3-prong candidates diff --git a/PWGHF/Tasks/taskBPlus.cxx b/PWGHF/Tasks/taskBPlus.cxx index c8f8c4b2642..e5d42b4667b 100644 --- a/PWGHF/Tasks/taskBPlus.cxx +++ b/PWGHF/Tasks/taskBPlus.cxx @@ -222,7 +222,7 @@ struct HfTaskBplusMc { for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << hf_cand_bplus::DecayType::BPlusToD0Pi) { - auto yParticle = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(pdg::Code::kBPlus)); + auto yParticle = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(pdg::Code::kBPlus)); if (cutYCandMax >= 0. && std::abs(yParticle) > cutYCandMax) { continue; } @@ -232,7 +232,7 @@ struct HfTaskBplusMc { for (auto& daught : particle.daughters_as()) { ptProngs[counter] = daught.pt(); etaProngs[counter] = daught.eta(); - yProngs[counter] = RecoDecay::Y(array{daught.px(), daught.py(), daught.pz()}, RecoDecay::getMassPDG(daught.pdgCode())); + yProngs[counter] = RecoDecay::y(array{daught.px(), daught.py(), daught.pz()}, RecoDecay::getMassPDG(daught.pdgCode())); counter++; } diff --git a/PWGHF/Tasks/taskChic.cxx b/PWGHF/Tasks/taskChic.cxx index ea91ef2afd0..c4609f57218 100644 --- a/PWGHF/Tasks/taskChic.cxx +++ b/PWGHF/Tasks/taskChic.cxx @@ -202,7 +202,7 @@ struct TaskChicMC { for (auto& particle : particlesMC) { if (particle.flagMCMatchGen() == 1 << decayMode) { auto mchic = RecoDecay::getMassPDG(pdg::Code::kChic1); // chi_c1(1p) - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, mchic)) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, mchic)) > cutYCandMax) { // Printf("MC Gen.: Y rejection: %g", RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, 3.87168)); continue; } diff --git a/PWGHF/Tasks/taskCorrelationDDbar.cxx b/PWGHF/Tasks/taskCorrelationDDbar.cxx index 6208dd18b1e..da5d4e3d726 100644 --- a/PWGHF/Tasks/taskCorrelationDDbar.cxx +++ b/PWGHF/Tasks/taskCorrelationDDbar.cxx @@ -47,7 +47,7 @@ double getDeltaPhi(double phiD, double phiDbar) /// double evaluatePhiByVertex(double xVertex1, double xVertex2, double yVertex1, double yVertex2) { - return RecoDecay::Phi(xVertex2 - xVertex1, yVertex2 - yVertex1); + return RecoDecay::phi(xVertex2 - xVertex1, yVertex2 - yVertex1); } // string definitions, used for histogram axis labels diff --git a/PWGHF/Tasks/taskD0.cxx b/PWGHF/Tasks/taskD0.cxx index 8db11efdded..e8d78519d73 100644 --- a/PWGHF/Tasks/taskD0.cxx +++ b/PWGHF/Tasks/taskD0.cxx @@ -307,11 +307,11 @@ struct TaskD0 { //Printf("MC Particles: %d", particlesMC.size()); for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::D0ToPiK) { - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { continue; } auto ptGen = particle.pt(); - auto yGen = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); + auto yGen = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); registry.fill(HIST("hPtGen"), ptGen); registry.fill(HIST("hPtvsYGen"), ptGen, yGen); if (particle.originMCGen() == OriginType::Prompt) { diff --git a/PWGHF/Tasks/taskD0ALICE3Barrel.cxx b/PWGHF/Tasks/taskD0ALICE3Barrel.cxx index dcddbf623e3..f851c870469 100644 --- a/PWGHF/Tasks/taskD0ALICE3Barrel.cxx +++ b/PWGHF/Tasks/taskD0ALICE3Barrel.cxx @@ -146,11 +146,11 @@ struct TaskD0ALICE3BarrelMC { for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::D0ToPiK) { - if (std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { + if (std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { continue; } auto ptGen = particle.pt(); - auto yGen = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); + auto yGen = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); registry.fill(HIST("hMassGen"), ptGen, std::abs(yGen)); } } diff --git a/PWGHF/Tasks/taskD0ALICE3Forward.cxx b/PWGHF/Tasks/taskD0ALICE3Forward.cxx index 57a98a22e23..864e5143329 100644 --- a/PWGHF/Tasks/taskD0ALICE3Forward.cxx +++ b/PWGHF/Tasks/taskD0ALICE3Forward.cxx @@ -74,11 +74,11 @@ struct TaskD0ALICE3ForwardMC { for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::D0ToPiK) { - if (std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { + if (std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { continue; } auto ptGen = particle.pt(); - auto yGen = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); + auto yGen = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); registry.fill(HIST("hMassGen"), ptGen, std::abs(yGen)); } } diff --git a/PWGHF/Tasks/taskD0parametrizedPID.cxx b/PWGHF/Tasks/taskD0parametrizedPID.cxx index b09039961d0..96d373a4f52 100644 --- a/PWGHF/Tasks/taskD0parametrizedPID.cxx +++ b/PWGHF/Tasks/taskD0parametrizedPID.cxx @@ -121,11 +121,11 @@ struct TaskD0parametrizedPIDMC { float maxFiducialY = 0.8; float minFiducialY = -0.8; if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::D0ToPiK) { - if (std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { + if (std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { continue; } auto ptGen = particle.pt(); - auto yGen = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); + auto yGen = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); registry.fill(HIST("hGenPtVsY"), ptGen, std::abs(yGen)); if (ptGen < 5.0) { maxFiducialY = -0.2 / 15 * ptGen * ptGen + 1.9 / 15 * ptGen + 0.5; diff --git a/PWGHF/Tasks/taskDPlus.cxx b/PWGHF/Tasks/taskDPlus.cxx index 76787c2c2ad..6579493b7b3 100644 --- a/PWGHF/Tasks/taskDPlus.cxx +++ b/PWGHF/Tasks/taskDPlus.cxx @@ -195,7 +195,7 @@ struct TaskDPlus { for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::DPlusToPiKPi) { auto ptGen = particle.pt(); - auto yGen = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); + auto yGen = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); if (cutYCandMax >= 0. && std::abs(yGen) > cutYCandMax) { continue; } diff --git a/PWGHF/Tasks/taskJpsi.cxx b/PWGHF/Tasks/taskJpsi.cxx index d0d67329ca0..7c77bca2ccc 100644 --- a/PWGHF/Tasks/taskJpsi.cxx +++ b/PWGHF/Tasks/taskJpsi.cxx @@ -250,7 +250,7 @@ struct TaskJpsiMC { registry.fill(HIST("hChi2PCASig"), candidate.chi2PCA(), candidate.pt()); registry.fill(HIST("hCtSig"), CtJpsi(candidate), candidate.pt()); registry.fill(HIST("hYSig"), YJpsi(candidate), candidate.pt()); - registry.fill(HIST("hYGenSig"), RecoDecay::Y(array{particleMother.px(), particleMother.py(), particleMother.pz()}, RecoDecay::getMassPDG(particleMother.pdgCode())), particleMother.pt()); + registry.fill(HIST("hYGenSig"), RecoDecay::y(array{particleMother.px(), particleMother.py(), particleMother.pz()}, RecoDecay::getMassPDG(particleMother.pdgCode())), particleMother.pt()); } else { registry.fill(HIST("hPtRecBg"), candidate.pt()); @@ -275,12 +275,12 @@ struct TaskJpsiMC { //Printf("MC Particles: %d", particlesMC.size()); for (auto& particle : particlesMC) { if (particle.flagMCMatchGen() == 1 << decayMode) { - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { continue; } registry.fill(HIST("hPtGen"), particle.pt()); registry.fill(HIST("hEtaGen"), particle.eta()); - registry.fill(HIST("hYGen"), RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), particle.pt()); + registry.fill(HIST("hYGen"), RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), particle.pt()); //registry.fill(HIST("hPtGenProng0"), particle.daughter0_as().pt(), particle.pt()); //registry.fill(HIST("hPtGenProng1"), particle.daughter1_as().pt(), particle.pt()); } diff --git a/PWGHF/Tasks/taskLb.cxx b/PWGHF/Tasks/taskLb.cxx index c7347b6b384..f6f30e9aa85 100644 --- a/PWGHF/Tasks/taskLb.cxx +++ b/PWGHF/Tasks/taskLb.cxx @@ -236,7 +236,7 @@ struct HfTaskLbMc { for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << hf_cand_lb::DecayType::LbToLcPi) { - auto yParticle = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(pdg::Code::kLambdaB0)); + auto yParticle = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(pdg::Code::kLambdaB0)); if (cutYCandMax >= 0. && std::abs(yParticle) > cutYCandMax) { continue; } @@ -246,7 +246,7 @@ struct HfTaskLbMc { for (auto& daught : particle.daughters_as()) { ptProngs[counter] = daught.pt(); etaProngs[counter] = daught.eta(); - yProngs[counter] = RecoDecay::Y(array{daught.px(), daught.py(), daught.pz()}, RecoDecay::getMassPDG(daught.pdgCode())); + yProngs[counter] = RecoDecay::y(array{daught.px(), daught.py(), daught.pz()}, RecoDecay::getMassPDG(daught.pdgCode())); counter++; } diff --git a/PWGHF/Tasks/taskLc.cxx b/PWGHF/Tasks/taskLc.cxx index 898933d389c..cb997b34162 100644 --- a/PWGHF/Tasks/taskLc.cxx +++ b/PWGHF/Tasks/taskLc.cxx @@ -168,7 +168,7 @@ struct TaskLc { // Printf("MC Particles: %d", particlesMC.size()); for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::LcToPKPi) { - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { continue; } auto ptGen = particle.pt(); diff --git a/PWGHF/Tasks/taskLcALICE3.cxx b/PWGHF/Tasks/taskLcALICE3.cxx index 42f2c08c473..df32a71e27e 100644 --- a/PWGHF/Tasks/taskLcALICE3.cxx +++ b/PWGHF/Tasks/taskLcALICE3.cxx @@ -141,11 +141,11 @@ struct TaskLcALICE3MC { for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::LcToPKPi) { - if (std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { + if (std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { continue; } auto ptGen = particle.pt(); - auto yGen = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); + auto yGen = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); registry.fill(HIST("hMassGen"), ptGen, std::abs(yGen)); } } diff --git a/PWGHF/Tasks/taskLcCentrality.cxx b/PWGHF/Tasks/taskLcCentrality.cxx index c81eabb961f..81dc2ba952c 100644 --- a/PWGHF/Tasks/taskLcCentrality.cxx +++ b/PWGHF/Tasks/taskLcCentrality.cxx @@ -177,7 +177,7 @@ struct TaskLcCentralityMC { // Printf("MC Particles: %d", particlesMC.size()); for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::LcToPKPi) { - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { continue; } auto ptGen = particle.pt(); diff --git a/PWGHF/Tasks/taskLcparametrizedPID.cxx b/PWGHF/Tasks/taskLcparametrizedPID.cxx index 7e57ff7ba5b..77e9c7771bd 100644 --- a/PWGHF/Tasks/taskLcparametrizedPID.cxx +++ b/PWGHF/Tasks/taskLcparametrizedPID.cxx @@ -121,11 +121,11 @@ struct TaskLcparametrizedPIDMC { for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::LcToPKPi) { - if (std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { + if (std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > 4.0) { continue; } auto ptGen = particle.pt(); - auto yGen = RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); + auto yGen = RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())); registry.fill(HIST("hMassGen"), ptGen, std::abs(yGen)); } } diff --git a/PWGHF/Tasks/taskX.cxx b/PWGHF/Tasks/taskX.cxx index f2ba5fd5d4b..2daa02f7240 100644 --- a/PWGHF/Tasks/taskX.cxx +++ b/PWGHF/Tasks/taskX.cxx @@ -208,7 +208,7 @@ struct TaskXMC { for (auto& particle : particlesMC) { if (particle.flagMCMatchGen() == 1 << decayMode) { // TODO: add X(3872) mass such that we can use the getMassPDG function instead of hardcoded mass - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, 3.87168)) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, 3.87168)) > cutYCandMax) { // Printf("MC Gen.: Y rejection: %g", RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, 3.87168)); continue; } diff --git a/PWGHF/Tasks/taskXic.cxx b/PWGHF/Tasks/taskXic.cxx index 820f38ffc35..f9abfab9a64 100644 --- a/PWGHF/Tasks/taskXic.cxx +++ b/PWGHF/Tasks/taskXic.cxx @@ -224,7 +224,7 @@ struct HfTaskXicMc { // MC gen. for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::XicToPKPi) { - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { continue; } registry.fill(HIST("hPtGen"), particle.pt()); diff --git a/PWGHF/Tasks/taskXicc.cxx b/PWGHF/Tasks/taskXicc.cxx index 22dd2cc6eff..73efb26c567 100644 --- a/PWGHF/Tasks/taskXicc.cxx +++ b/PWGHF/Tasks/taskXicc.cxx @@ -259,13 +259,13 @@ struct HfTaskXiccMc { //Printf("MC Particles: %d", particlesMC.size()); for (auto& particle : particlesMC) { if (std::abs(particle.flagMCMatchGen()) == 1 << DecayType::XiccToXicPi) { - if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { + if (cutYCandMax >= 0. && std::abs(RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) { continue; } registry.fill(HIST("hPtGen"), particle.pt()); registry.fill(HIST("hEtaGen"), particle.eta()); - registry.fill(HIST("hYGen"), RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))); - registry.fill(HIST("hPtvsEtavsYGen"), particle.pt(), particle.eta(), RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))); + registry.fill(HIST("hYGen"), RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))); + registry.fill(HIST("hPtvsEtavsYGen"), particle.pt(), particle.eta(), RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))); } } // end of loop of MC particles } // end of process function diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index c738a45dfee..0616bdc59d3 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -341,7 +341,7 @@ struct lambdakzeroBuilder { continue; } - auto V0CosinePA = RecoDecay::CPA(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); + auto V0CosinePA = RecoDecay::cpa(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); if (V0CosinePA < v0cospa) { MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack --> " << labelPos << ", negTrack --> " << labelNeg << " will be skipped due to CPA cut"); v0dataLink(-1); @@ -524,7 +524,7 @@ struct lambdakzeroBuilder { continue; } - auto V0CosinePA = RecoDecay::CPA(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); + auto V0CosinePA = RecoDecay::cpa(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); if (V0CosinePA < v0cospa) { MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack --> " << labelPos << ", negTrack --> " << labelNeg << " will be skipped due to CPA cut"); v0dataLink(-1); diff --git a/PWGLF/TableProducer/lambdakzerofinder.cxx b/PWGLF/TableProducer/lambdakzerofinder.cxx index 81bb0a8f92e..a8f64605cf7 100644 --- a/PWGLF/TableProducer/lambdakzerofinder.cxx +++ b/PWGLF/TableProducer/lambdakzerofinder.cxx @@ -229,7 +229,7 @@ struct lambdakzerofinder { fitter.getTrack(0).getPxPyPzGlo(pvec0); fitter.getTrack(1).getPxPyPzGlo(pvec1); - auto thisv0cospa = RecoDecay::CPA(array{collision.posX(), collision.posY(), collision.posZ()}, + auto thisv0cospa = RecoDecay::cpa(array{collision.posX(), collision.posY(), collision.posZ()}, array{vtx[0], vtx[1], vtx[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); if (thisv0cospa < v0cospa) { continue; diff --git a/PWGLF/Tasks/v0cascadesqa.cxx b/PWGLF/Tasks/v0cascadesqa.cxx index 21ebb3b833a..5b1f06cb35d 100644 --- a/PWGLF/Tasks/v0cascadesqa.cxx +++ b/PWGLF/Tasks/v0cascadesqa.cxx @@ -327,7 +327,7 @@ struct v0cascadesQA { histos_Casc.fill(HIST("V0CosPA"), casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()), casc.sign()); // double v0cospatoxi = RecoDecay::CPA(array{casc.x(), casc.y(), casc.z()}, array{casc.xlambda(), casc.ylambda(), casc.zlambda()}, array{v0.px(), v0.py(), v0.pz()}); - double v0cospatoxi = RecoDecay::CPA(array{casc.x(), casc.y(), casc.z()}, array{casc.xlambda(), casc.ylambda(), casc.zlambda()}, array{casc.pxpos() + casc.pxneg(), casc.pypos() + casc.pyneg(), casc.pzpos() + casc.pzneg()}); + double v0cospatoxi = RecoDecay::cpa(array{casc.x(), casc.y(), casc.z()}, array{casc.xlambda(), casc.ylambda(), casc.zlambda()}, array{casc.pxpos() + casc.pxneg(), casc.pypos() + casc.pyneg(), casc.pzpos() + casc.pzneg()}); histos_Casc.fill(HIST("V0CosPAToXi"), v0cospatoxi, casc.sign()); histos_Casc.fill(HIST("CascRadius"), casc.cascradius(), casc.sign());