diff --git a/DPG/Tasks/AOTTrack/PID/qaPIDWithV0s.cxx b/DPG/Tasks/AOTTrack/PID/qaPIDWithV0s.cxx index 57552155c43..edde3a941f4 100644 --- a/DPG/Tasks/AOTTrack/PID/qaPIDWithV0s.cxx +++ b/DPG/Tasks/AOTTrack/PID/qaPIDWithV0s.cxx @@ -124,7 +124,7 @@ struct pidQaWithV0s { template bool acceptV0s(const T1& v0, const C& collision) // Apply general selections on V0 { - float cospa = v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + float cospa = v0.v0cosPA(); fillHistogram("beforeselections/cospa", cospa); fillHistogram("beforeselections/decayradius", v0.v0radius()); if (cospa < v0cospa) { diff --git a/DPG/Tasks/AOTTrack/perfK0sResolution.cxx b/DPG/Tasks/AOTTrack/perfK0sResolution.cxx index 4bbd0886a1d..86af7dc8cad 100644 --- a/DPG/Tasks/AOTTrack/perfK0sResolution.cxx +++ b/DPG/Tasks/AOTTrack/perfK0sResolution.cxx @@ -70,7 +70,7 @@ struct perfK0sResolution { // Apply selections on V0 if (TMath::Abs(v0.yK0Short()) > rapidity) return kFALSE; - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0setting_cospa) + if (v0.v0cosPA() < v0setting_cospa) return kFALSE; if (v0.v0radius() < v0setting_radius) return kFALSE; diff --git a/DPG/Tasks/AOTTrack/qaK0sTrackingEfficiency.cxx b/DPG/Tasks/AOTTrack/qaK0sTrackingEfficiency.cxx index 355c9423f9e..c6be7110716 100644 --- a/DPG/Tasks/AOTTrack/qaK0sTrackingEfficiency.cxx +++ b/DPG/Tasks/AOTTrack/qaK0sTrackingEfficiency.cxx @@ -89,7 +89,7 @@ struct qaK0sTrackingEfficiency { bool acceptV0(const T1& v0, const T2& ntrack, const T2& ptrack, const C& collision) { // Apply selections on V0 - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0cospa) + if (v0.v0cosPA() < v0cospa) return kFALSE; if (TMath::Abs(v0.yK0Short()) > rapidity) return kFALSE; diff --git a/DPG/Tasks/TPC/tpcSkimsTableCreator.cxx b/DPG/Tasks/TPC/tpcSkimsTableCreator.cxx index 42fb1bfc2ef..56f7f54d19f 100644 --- a/DPG/Tasks/TPC/tpcSkimsTableCreator.cxx +++ b/DPG/Tasks/TPC/tpcSkimsTableCreator.cxx @@ -82,7 +82,7 @@ struct TreeWriterTpcV0 { const float alpha = v0.alpha(); const float qt = v0.qtarm(); - const float cosPA = v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + const float cosPA = v0.v0cosPA(); const float pT = v0.pt(); const float v0radius = v0.v0radius(); const float gammapsipair = v0.psipair(); diff --git a/EventFiltering/PWGCF/CFFilterAll.cxx b/EventFiltering/PWGCF/CFFilterAll.cxx index 8b1c64a5220..c94413f4cca 100644 --- a/EventFiltering/PWGCF/CFFilterAll.cxx +++ b/EventFiltering/PWGCF/CFFilterAll.cxx @@ -1080,7 +1080,7 @@ struct CFFilter { const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); const float invMassAntiLambda = v0.mAntiLambda(); @@ -1506,7 +1506,7 @@ struct CFFilter { registry.fill(HIST("TrackCuts/V0Before/fInvMassLambdavsAntiLambda"), v0.mLambda(), v0.mAntiLambda()); registry.fill(HIST("TrackCuts/V0Before/fInvMassV0BeforeKaonvsV0Before"), v0.mK0Short(), v0.mLambda()); registry.fill(HIST("TrackCuts/V0Before/fV0DCADaugh"), v0.dcaV0daughters()); - registry.fill(HIST("TrackCuts/V0Before/fV0CPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + registry.fill(HIST("TrackCuts/V0Before/fV0CPA"), v0.v0cosPA()); registry.fill(HIST("TrackCuts/V0Before/fV0TranRad"), v0.v0radius()); registry.fill(HIST("TrackCuts/V0Before/f0DecVtxX"), v0.x()); registry.fill(HIST("TrackCuts/V0Before/f0DecVtxY"), v0.y()); @@ -1540,7 +1540,7 @@ struct CFFilter { registry.fill(HIST("TrackCuts/Lambda/fInvMassLambda"), v0.mLambda()); registry.fill(HIST("TrackCuts/Lambda/fInvMassLambdaKaonvsLambda"), v0.mK0Short(), v0.mLambda()); registry.fill(HIST("TrackCuts/Lambda/fV0DCADaugh"), v0.dcaV0daughters()); - registry.fill(HIST("TrackCuts/Lambda/fV0CPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + registry.fill(HIST("TrackCuts/Lambda/fV0CPA"), v0.v0cosPA()); registry.fill(HIST("TrackCuts/Lambda/fV0TranRad"), v0.v0radius()); registry.fill(HIST("TrackCuts/Lambda/f0DecVtxX"), v0.x()); registry.fill(HIST("TrackCuts/Lambda/f0DecVtxY"), v0.y()); @@ -1566,7 +1566,7 @@ struct CFFilter { registry.fill(HIST("TrackCuts/AntiLambda/fInvMassAntiLambda"), v0.mAntiLambda()); registry.fill(HIST("TrackCuts/AntiLambda/fInvMassAntiLambdaKaonvsAntiLambda"), v0.mK0Short(), v0.mAntiLambda()); registry.fill(HIST("TrackCuts/AntiLambda/fV0DCADaugh"), v0.dcaV0daughters()); - registry.fill(HIST("TrackCuts/AntiLambda/fV0CPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + registry.fill(HIST("TrackCuts/AntiLambda/fV0CPA"), v0.v0cosPA()); registry.fill(HIST("TrackCuts/AntiLambda/fV0TranRad"), v0.v0radius()); registry.fill(HIST("TrackCuts/AntiLambda/f0DecVtxX"), v0.x()); registry.fill(HIST("TrackCuts/AntiLambda/f0DecVtxY"), v0.y()); diff --git a/EventFiltering/PWGCF/CFFilterQA.cxx b/EventFiltering/PWGCF/CFFilterQA.cxx index e4bb29dc86d..e89a53df3c3 100644 --- a/EventFiltering/PWGCF/CFFilterQA.cxx +++ b/EventFiltering/PWGCF/CFFilterQA.cxx @@ -934,7 +934,7 @@ struct CFFilterQA { const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); const float invMassAntiLambda = v0.mAntiLambda(); @@ -1293,7 +1293,7 @@ struct CFFilterQA { registry.fill(HIST("TrackCuts/V0Before/fInvMassLambdavsAntiLambda"), v0.mLambda(), v0.mAntiLambda()); registry.fill(HIST("TrackCuts/V0Before/fInvMassV0BeforeKaonvsV0Before"), v0.mK0Short(), v0.mLambda()); registry.fill(HIST("TrackCuts/V0Before/fV0DCADaugh"), v0.dcaV0daughters()); - registry.fill(HIST("TrackCuts/V0Before/fV0CPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + registry.fill(HIST("TrackCuts/V0Before/fV0CPA"), v0.v0cosPA()); registry.fill(HIST("TrackCuts/V0Before/fV0TranRad"), v0.v0radius()); registry.fill(HIST("TrackCuts/V0Before/f0DecVtxX"), v0.x()); registry.fill(HIST("TrackCuts/V0Before/f0DecVtxY"), v0.y()); @@ -1327,7 +1327,7 @@ struct CFFilterQA { registry.fill(HIST("TrackCuts/Lambda/fInvMassLambda"), v0.mLambda()); registry.fill(HIST("TrackCuts/Lambda/fInvMassLambdaKaonvsLambda"), v0.mK0Short(), v0.mLambda()); registry.fill(HIST("TrackCuts/Lambda/fV0DCADaugh"), v0.dcaV0daughters()); - registry.fill(HIST("TrackCuts/Lambda/fV0CPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + registry.fill(HIST("TrackCuts/Lambda/fV0CPA"), v0.v0cosPA()); registry.fill(HIST("TrackCuts/Lambda/fV0TranRad"), v0.v0radius()); registry.fill(HIST("TrackCuts/Lambda/f0DecVtxX"), v0.x()); registry.fill(HIST("TrackCuts/Lambda/f0DecVtxY"), v0.y()); @@ -1354,7 +1354,7 @@ struct CFFilterQA { registry.fill(HIST("TrackCuts/AntiLambda/fInvMassAntiLambda"), v0.mAntiLambda()); registry.fill(HIST("TrackCuts/AntiLambda/fInvMassAntiLambdaKaonvsAntiLambda"), v0.mK0Short(), v0.mAntiLambda()); registry.fill(HIST("TrackCuts/AntiLambda/fV0DCADaugh"), v0.dcaV0daughters()); - registry.fill(HIST("TrackCuts/AntiLambda/fV0CPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + registry.fill(HIST("TrackCuts/AntiLambda/fV0CPA"), v0.v0cosPA()); registry.fill(HIST("TrackCuts/AntiLambda/fV0TranRad"), v0.v0radius()); registry.fill(HIST("TrackCuts/AntiLambda/f0DecVtxX"), v0.x()); registry.fill(HIST("TrackCuts/AntiLambda/f0DecVtxY"), v0.y()); diff --git a/EventFiltering/PWGHF/HFFilterHelpers.h b/EventFiltering/PWGHF/HFFilterHelpers.h index 79e12348d39..1123d8c0196 100644 --- a/EventFiltering/PWGHF/HFFilterHelpers.h +++ b/EventFiltering/PWGHF/HFFilterHelpers.h @@ -845,7 +845,7 @@ inline int8_t HfFilterHelper::isSelectedV0(const V0& v0, const std::array& } } - auto v0CosinePa = v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + auto v0CosinePa = v0.v0cosPA(); // cosine of pointing angle if (TESTBIT(isSelected, kPhoton) && v0CosinePa < mMinGammaCosinePa) { CLRBIT(isSelected, kPhoton); @@ -890,7 +890,7 @@ inline int8_t HfFilterHelper::isSelectedV0(const V0& v0, const std::array& // DCA V0 and V0 daughters for (int iV0{kK0S}; iV0 < kNV0; ++iV0) { - if (TESTBIT(isSelected, iV0) && v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > 0.1f) { // we want only primary V0s + if (TESTBIT(isSelected, iV0) && v0.dcav0topv() > 0.1f) { // we want only primary V0s CLRBIT(isSelected, iV0); if (activateQA > 1) { hV0Selected->Fill(5., iV0); diff --git a/EventFiltering/PWGLF/filterf1proton.cxx b/EventFiltering/PWGLF/filterf1proton.cxx index 1be0ae2bc8b..a81973b84ee 100644 --- a/EventFiltering/PWGLF/filterf1proton.cxx +++ b/EventFiltering/PWGLF/filterf1proton.cxx @@ -306,7 +306,7 @@ struct filterf1proton { template bool SelectionV0(Collision const& collision, V0 const& candidate) { - if (fabs(candidate.dcav0topv(collision.posX(), collision.posY(), collision.posZ())) > cMaxV0DCA) { + if (fabs(candidate.dcav0topv()) > cMaxV0DCA) { return false; } @@ -314,7 +314,7 @@ struct filterf1proton { const std::vector decVtx = {candidate.x(), candidate.y(), candidate.z()}; const float tranRad = candidate.v0radius(); const float dcaDaughv0 = candidate.dcaV0daughters(); - const float cpav0 = candidate.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + const float cpav0 = candidate.v0cosPA(); float CtauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassK0Short; float lowmasscutks0 = 0.497 - 2.0 * cSigmaMassKs0; diff --git a/PWGCF/FemtoDream/FemtoDreamV0Selection.h b/PWGCF/FemtoDream/FemtoDreamV0Selection.h index 9bfe3cb652f..6ba357dceab 100644 --- a/PWGCF/FemtoDream/FemtoDreamV0Selection.h +++ b/PWGCF/FemtoDream/FemtoDreamV0Selection.h @@ -415,7 +415,7 @@ bool FemtoDreamV0Selection::isSelectedMinimal(C const& col, V const& v0, const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); const float invMassAntiLambda = v0.mAntiLambda(); @@ -498,7 +498,7 @@ void FemtoDreamV0Selection::fillLambdaQA(C const& col, V const& v0, const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); @@ -587,7 +587,7 @@ std::array const auto eta = v0.eta(); const auto tranRad = v0.v0radius(); const auto dcaDaughv0 = v0.dcaV0daughters(); - const auto cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const auto cpav0 = v0.v0cosPA(); const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; float observable = 0.; @@ -680,11 +680,11 @@ void FemtoDreamV0Selection::fillQA(C const& col, V const& v0, T const& posTrack, mQAHistogramRegistry->fill( HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/hCPA"), - v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + v0.v0cosPA()); mQAHistogramRegistry->fill( HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/hCPAvsPt"), - v0.pt(), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + v0.pt(), v0.v0cosPA()); mQAHistogramRegistry->fill( HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/hInvMassLambda"), diff --git a/PWGCF/FemtoDream/femtoDreamProducerTask.cxx b/PWGCF/FemtoDream/femtoDreamProducerTask.cxx index 033d9590f2e..3bf67e81b12 100644 --- a/PWGCF/FemtoDream/femtoDreamProducerTask.cxx +++ b/PWGCF/FemtoDream/femtoDreamProducerTask.cxx @@ -483,7 +483,7 @@ struct femtoDreamProducerTask { aod::femtodreamparticle::ParticleType::kV0, cutContainerV0.at(femtoDreamV0Selection::V0ContainerPosition::kV0), 0, - v0.v0cosPA(col.posX(), col.posY(), col.posZ()), + v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda()); diff --git a/PWGCF/FemtoDream/femtoDreamProducerTaskV0Only.cxx b/PWGCF/FemtoDream/femtoDreamProducerTaskV0Only.cxx index be711d73065..081c7855846 100644 --- a/PWGCF/FemtoDream/femtoDreamProducerTaskV0Only.cxx +++ b/PWGCF/FemtoDream/femtoDreamProducerTaskV0Only.cxx @@ -442,7 +442,7 @@ struct femtoDreamProducerTaskV0Only { aod::femtodreamparticle::ParticleType::kV0, cutContainerV0.at( femtoDreamV0Selection::V0ContainerPosition::kV0), - 0, v0.v0cosPA(col.posX(), col.posY(), col.posZ()), + 0, v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda()); if (ConfDebugOutput) { outputDebugParts( diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h index 10cbfb31ce0..6222174f426 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h @@ -415,7 +415,7 @@ bool FemtoUniverseV0Selection::isSelectedMinimal(C const& col, V const& v0, const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); const float invMassAntiLambda = v0.mAntiLambda(); @@ -498,7 +498,7 @@ void FemtoUniverseV0Selection::fillLambdaQA(C const& col, V const& v0, const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); @@ -587,7 +587,7 @@ std::array const auto eta = v0.eta(); const auto tranRad = v0.v0radius(); const auto dcaDaughv0 = v0.dcaV0daughters(); - const auto cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const auto cpav0 = v0.v0cosPA(); const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; float observable = 0.; @@ -680,11 +680,11 @@ void FemtoUniverseV0Selection::fillQA(C const& col, V const& v0, T const& posTra mHistogramRegistry->fill( HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/hCPA"), - v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + v0.v0cosPA()); mHistogramRegistry->fill( HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/hCPAvsPt"), - v0.pt(), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + v0.pt(), v0.v0cosPA()); mHistogramRegistry->fill( HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/hInvMassLambda"), diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx index 0f63319b5b1..7dea5b7ddda 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx @@ -664,7 +664,7 @@ struct femtoUniverseProducerTask { aod::femtouniverseparticle::ParticleType::kV0, cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kV0), 0, - v0.v0cosPA(col.posX(), col.posY(), col.posZ()), + v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda()); @@ -780,7 +780,7 @@ struct femtoUniverseProducerTask { aod::femtouniverseparticle::ParticleType::kPhi, -999, // cutContainerV0.at(femtoUniverseV0Selection::V0ContainerPosition::kV0), 0, - phiM, // v0.v0cosPA(col.posX(), col.posY(), col.posZ()), + phiM, // v0.v0cosPA(), indexChildID, phiM, // phi.mLambda(), //for now it will have a mLambda getter, maybe we will change it in the future so it's more logical -999); // v0.mAntiLambda() diff --git a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx index aa813a10080..c4cc6a67835 100644 --- a/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx +++ b/PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTaskV0Only.cxx @@ -459,7 +459,7 @@ struct femtoUniverseProducerTaskV0Only { aod::femtouniverseparticle::ParticleType::kV0, cutContainerV0.at( femtoUniverseV0Selection::V0ContainerPosition::kV0), - 0, v0.v0cosPA(col.posX(), col.posY(), col.posZ()), + 0, v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda()); if (ConfDebugOutput) { outputDebugParts( diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldPhiSelection.h b/PWGCF/FemtoWorld/Core/FemtoWorldPhiSelection.h index 989a4db6592..b08df0303b1 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldPhiSelection.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldPhiSelection.h @@ -400,7 +400,7 @@ bool FemtoWorldPhiSelection::isSelectedMinimal(C const& col, V const& v0, T cons const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaPhidaughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassPhi = v0.mPhi(); const float invMassAntiPhi = v0.mAntiPhi(); @@ -472,7 +472,7 @@ void FemtoWorldPhiSelection::fillPhiQA(C const& col, V const& v0, T const& posTr const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaPhidaughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassPhi = v0.mPhi(); @@ -570,7 +570,7 @@ std::array FemtoWorldPhiSelection::getCutContainer(C const& const auto pT = sumVec.Pt(); // const auto tranRad = v0.v0radius(); // const auto dcaDaughv0 = v0.dcaPhidaughters(); - // const auto cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + // const auto cpav0 = v0.v0cosPA(); const std::vector decVtx = {posTrack.x(), posTrack.y(), posTrack.z()}; float observable = 0.; @@ -663,8 +663,8 @@ void FemtoWorldPhiSelection::fillQAPhi(C const& col, V const& v0, T const& posTr // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hDecayVtxX"), v0.x()); // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hDecayVtxY"), v0.y()); // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hDecayVtxZ"), v0.z()); - // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); - // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPAvsPt"), v0.pt(), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPA"), v0.v0cosPA()); + // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPAvsPt"), v0.pt(), v0.v0cosPA()); // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hInvMassPhi"), v0.mPhi()); // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hInvMassAntiPhi"), v0.mAntiPhi()); // mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hInvMassPhiAntiPhi"), v0.mPhi(), v0.mAntiPhi()); diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h b/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h index b78ece92eec..a1b643f83c3 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h @@ -328,7 +328,7 @@ bool FemtoWorldV0Selection::isSelectedMinimal(C const& col, V const& v0, T const const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); const float invMassAntiLambda = v0.mAntiLambda(); @@ -400,7 +400,7 @@ void FemtoWorldV0Selection::fillLambdaQA(C const& col, V const& v0, T const& pos const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; const float tranRad = v0.v0radius(); const float dcaDaughv0 = v0.dcaV0daughters(); - const float cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const float cpav0 = v0.v0cosPA(); const float invMassLambda = v0.mLambda(); @@ -476,7 +476,7 @@ std::array FemtoWorldV0Selection::getCutContainer(C const& const auto pT = v0.pt(); const auto tranRad = v0.v0radius(); const auto dcaDaughv0 = v0.dcaV0daughters(); - const auto cpav0 = v0.v0cosPA(col.posX(), col.posY(), col.posZ()); + const auto cpav0 = v0.v0cosPA(); const std::vector decVtx = {v0.x(), v0.y(), v0.z()}; float observable = 0.; @@ -531,8 +531,8 @@ void FemtoWorldV0Selection::fillQA(C const& col, V const& v0, T const& posTrack, mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hDecayVtxX"), v0.x()); mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hDecayVtxY"), v0.y()); mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hDecayVtxZ"), v0.z()); - mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPA"), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); - mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPAvsPt"), v0.pt(), v0.v0cosPA(col.posX(), col.posY(), col.posZ())); + mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPA"), v0.v0cosPA()); + mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hCPAvsPt"), v0.pt(), v0.v0cosPA()); mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hInvMassLambda"), v0.mLambda()); mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hInvMassAntiLambda"), v0.mAntiLambda()); mHistogramRegistry->fill(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/hInvMassLambdaAntiLambda"), v0.mLambda(), v0.mAntiLambda()); diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx index 68ae2444568..3187669fd69 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTask.cxx @@ -691,7 +691,7 @@ struct femtoWorldProducerTask { aod::femtoworldparticle::ParticleType::kV0, cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, - v0.v0cosPA(col.posX(), col.posY(), col.posZ()), + v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda(), @@ -999,7 +999,7 @@ struct femtoWorldProducerTask { aod::femtoworldparticle::ParticleType::kPhi, cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, - 0, // p1.v0cosPA(col.posX(), col.posY(), col.posZ()), + 0, // p1.v0cosPA(), indexChildID, 0, // v0.mLambda(), 0, // v0.mAntiLambda(), @@ -1284,7 +1284,7 @@ struct femtoWorldProducerTask { aod::femtoworldparticle::ParticleType::kD0D0bar, 0., // cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, - 0, // p1.v0cosPA(col.posX(), col.posY(), col.posZ()), + 0, // p1.v0cosPA(), indexChildID, -999, // v0.mLambda(), -999, // v0.mAntiLambda(), @@ -1650,7 +1650,7 @@ struct femtoWorldProducerTask { aod::femtoworldparticle::ParticleType::kV0, cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, - v0.v0cosPA(col.posX(), col.posY(), col.posZ()), + v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda(), @@ -1959,7 +1959,7 @@ struct femtoWorldProducerTask { aod::femtoworldparticle::ParticleType::kPhi, cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, - 0, // p1.v0cosPA(col.posX(), col.posY(), col.posZ()), + 0, // p1.v0cosPA(), indexChildID, 0, // v0.mLambda(), 0, // v0.mAntiLambda(), @@ -2233,7 +2233,7 @@ struct femtoWorldProducerTask { aod::femtoworldparticle::ParticleType::kD0D0bar, 0., // cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, - 0, // p1.v0cosPA(col.posX(), col.posY(), col.posZ()), + 0, // p1.v0cosPA(), indexChildID, -999, // v0.mLambda(), -999, // v0.mAntiLambda(), diff --git a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx index 94cfef6359e..b576f2c125b 100644 --- a/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx +++ b/PWGCF/FemtoWorld/TableProducer/femtoWorldProducerTaskV0Only.cxx @@ -265,7 +265,7 @@ struct femtoWorldProducerTaskV0Only { outputParts(outputCollision.lastIndex(), v0.negativept(), v0.negativeeta(), v0.negativephi(), aod::femtoworldparticle::ParticleType::kV0Child, cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kNegCuts), cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kNegPID), 0., childIDs, 0, 0); const int rowOfNegTrack = outputParts.lastIndex(); int indexChildID[2] = {rowOfPosTrack, rowOfNegTrack}; - outputParts(outputCollision.lastIndex(), v0.pt(), v0.eta(), v0.phi(), aod::femtoworldparticle::ParticleType::kV0, cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, v0.v0cosPA(col.posX(), col.posY(), col.posZ()), indexChildID, v0.mLambda(), v0.mAntiLambda()); + outputParts(outputCollision.lastIndex(), v0.pt(), v0.eta(), v0.phi(), aod::femtoworldparticle::ParticleType::kV0, cutContainerV0.at(femtoWorldV0Selection::V0ContainerPosition::kV0), 0, v0.v0cosPA(), indexChildID, v0.mLambda(), v0.mAntiLambda()); if (ConfDebugOutput) { outputDebugParts(postrack.sign(), (uint8_t)postrack.tpcNClsFound(), diff --git a/PWGDQ/Tasks/v0selector.cxx b/PWGDQ/Tasks/v0selector.cxx index 0010d119e11..79f38584d8e 100644 --- a/PWGDQ/Tasks/v0selector.cxx +++ b/PWGDQ/Tasks/v0selector.cxx @@ -218,14 +218,14 @@ struct v0selector { // continue; // } - auto const& collision = V0.collision_as(); + // auto const& collision = V0.collision_as(); // if (V0.collisionId() != collision.globalIndex()) { // continue; // } float V0dca = V0.dcaV0daughters(); - float V0CosinePA = V0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + float V0CosinePA = V0.v0cosPA(); float V0radius = V0.v0radius(); if (V0dca > dcav0dau) { diff --git a/PWGEM/PhotonMeson/TableProducer/createPCM.cxx b/PWGEM/PhotonMeson/TableProducer/createPCM.cxx index edab39e5abf..d5d31c3b924 100644 --- a/PWGEM/PhotonMeson/TableProducer/createPCM.cxx +++ b/PWGEM/PhotonMeson/TableProducer/createPCM.cxx @@ -100,6 +100,11 @@ struct createPCM { // Material correction in the DCA fitter o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; + float calculateDCAStraightToPV(float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) + { + 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)); + } + void init(InitContext& context) { mRunNumber = 0; @@ -278,6 +283,7 @@ struct createPCM { float v0dca = std::sqrt(fitter.getChi2AtPCACandidate()); // distance between 2 legs. float v0CosinePA = RecoDecay::cpa(pVtx, svpos, pvxyz); float v0radius = RecoDecay::sqrtSumOfSquares(svpos[0], svpos[1]); + float dcaV0toPV = calculateDCAStraightToPV(svpos[0], svpos[1], svpos[2], pvxyz[0], pvxyz[1], pvxyz[2], pVtx[0], pVtx[1], pVtx[2]); if (v0dca > maxdcav0dau) { return; @@ -299,7 +305,8 @@ struct createPCM { svpos[0], svpos[1], svpos[2], pvec0[0], pvec0[1], pvec0[2], pvec1[0], pvec1[1], pvec1[2], - v0dca, pos.dcaXY(), ele.dcaXY()); + v0dca, pos.dcaXY(), ele.dcaXY(), + v0CosinePA, dcaV0toPV); } else { // LOGF(info, "storing: collision.globalIndex() = %d , pos.globalIndex() = %d , ele.globalIndex() = %d, cospa = %f", collision.globalIndex(), pos.globalIndex(), ele.globalIndex(), v0CosinePA); diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index 86ac3c092c9..98c0aa55acf 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -605,6 +605,7 @@ DECLARE_SOA_TABLE(HfCandCascBase, "AOD", "HFCANDCASCBASE", //! v0data::DCAV0Daughters, v0data::DCAPosToPV, // this is the impact param wrt prim vtx in xy! v0data::DCANegToPV, // this is the impact param wrt prim vtx in xy! + v0data::V0CosPA, /* dynamic columns */ hf_cand_2prong::M, hf_cand_2prong::M2, @@ -631,7 +632,6 @@ DECLARE_SOA_TABLE(HfCandCascBase, "AOD", "HFCANDCASCBASE", //! hf_cand_casc::PtV0Pos, // pT of positive V0 daughter hf_cand_casc::PtV0Neg, // pT of negative V0 daughter v0data::V0Radius, - v0data::V0CosPA, v0data::MLambda, v0data::MAntiLambda, v0data::MK0Short, diff --git a/PWGHF/TableProducer/candidateCreatorCascade.cxx b/PWGHF/TableProducer/candidateCreatorCascade.cxx index 3a02506b1ee..d7da1b02456 100644 --- a/PWGHF/TableProducer/candidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/candidateCreatorCascade.cxx @@ -239,7 +239,8 @@ struct HfCandidateCreatorCascade { v0.pxneg(), v0.pyneg(), v0.pzneg(), v0.dcaV0daughters(), v0.dcapostopv(), - v0.dcanegtopv()); + v0.dcanegtopv(), + v0.v0cosPA()); // fill histograms if (fillHistograms) { diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 7b31bbe5bea..4e42589dc31 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2843,8 +2843,8 @@ struct HfTrackIndexSkimCreatorCascades { } // V0 cosPointingAngle selection - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < cpaV0Min) { - MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "K0S with daughters " << indexV0DaughPos << " and " << indexV0DaughNeg << ": rejected due to cosPA --> " << v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) << " (cut " << cpaV0Min << ")"); + if (v0.v0cosPA() < cpaV0Min) { + MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "K0S with daughters " << indexV0DaughPos << " and " << indexV0DaughNeg << ": rejected due to cosPA --> " << v0.v0cosPA() << " (cut " << cpaV0Min << ")"); continue; } diff --git a/PWGLF/DataModel/LFStrangenessTables.h b/PWGLF/DataModel/LFStrangenessTables.h index 09f6e07d2ae..16fe5ce5e8f 100644 --- a/PWGLF/DataModel/LFStrangenessTables.h +++ b/PWGLF/DataModel/LFStrangenessTables.h @@ -43,6 +43,8 @@ DECLARE_SOA_COLUMN(Z, z, float); //! decay position Z DECLARE_SOA_COLUMN(DCAV0Daughters, dcaV0daughters, float); //! DCA between V0 daughters DECLARE_SOA_COLUMN(DCAPosToPV, dcapostopv, float); //! DCA positive prong to PV DECLARE_SOA_COLUMN(DCANegToPV, dcanegtopv, float); //! DCA negative prong to PV +DECLARE_SOA_COLUMN(V0CosPA, v0cosPA, float); //! DCA negative prong to PV +DECLARE_SOA_COLUMN(DCAV0ToPV, dcav0topv, float); //! DCA negative prong to PV // Saved from finding: covariance matrix of parent track (on request) DECLARE_SOA_COLUMN(PositionCovMat, positionCovMat, float[6]); //! covariance matrix elements @@ -69,12 +71,6 @@ DECLARE_SOA_DYNAMIC_COLUMN(DistOverTotMom, distovertotmom, //! PV to V0decay dis return std::sqrt(std::pow(X - pvX, 2) + std::pow(Y - pvY, 2) + std::pow(Z - pvZ, 2)) / (P + 1E-10); }); -// 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(std::array{pvX, pvY, pvZ}, std::array{X, Y, Z}, std::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) { @@ -221,14 +217,13 @@ DECLARE_SOA_TABLE_FULL(StoredV0Datas, "V0Datas", "AOD", "V0DATA", //! v0data::PxPos, v0data::PyPos, v0data::PzPos, v0data::PxNeg, v0data::PyNeg, v0data::PzNeg, v0data::DCAV0Daughters, v0data::DCAPosToPV, v0data::DCANegToPV, + v0data::V0CosPA, v0data::DCAV0ToPV, // Dynamic columns v0data::PtHypertriton, v0data::PtAntiHypertriton, v0data::V0Radius, v0data::DistOverTotMom, - v0data::V0CosPA, - v0data::DCAV0ToPV, v0data::Alpha, v0data::QtArm, v0data::PsiPair, diff --git a/PWGLF/TableProducer/LFResonanceInitializer.cxx b/PWGLF/TableProducer/LFResonanceInitializer.cxx index 8a9ef420335..ec7362c269f 100644 --- a/PWGLF/TableProducer/LFResonanceInitializer.cxx +++ b/PWGLF/TableProducer/LFResonanceInitializer.cxx @@ -233,7 +233,7 @@ struct reso2initializer { return false; if (ConfFillQA) qaRegistry.fill(HIST("hGoodV0Indices"), 3.5); - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < cMinV0CosPA) + if (v0.v0cosPA() < cMinV0CosPA) return false; if (ConfFillQA) qaRegistry.fill(HIST("hGoodV0Indices"), 4.5); @@ -471,7 +471,7 @@ struct reso2initializer { v0.eta(), v0.phi(), childIDs, - v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()), + v0.v0cosPA(), v0.dcaV0daughters(), v0.mLambda(), v0.mAntiLambda(), v0.v0radius(), v0.x(), v0.y(), v0.z()); if constexpr (isMC) { diff --git a/PWGLF/TableProducer/cascadefinder.cxx b/PWGLF/TableProducer/cascadefinder.cxx index f4d3e9aef37..a7949c4ab95 100644 --- a/PWGLF/TableProducer/cascadefinder.cxx +++ b/PWGLF/TableProducer/cascadefinder.cxx @@ -109,10 +109,10 @@ struct cascadeprefilter { cascGoodNegTracks(t0.globalIndex(), t0.collisionId(), -t0.dcaXY()); } for (auto& v0 : goodV0s) { - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < cospaV0) { + if (v0.v0cosPA() < cospaV0) { continue; } - if (v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) < dcav0topv) { + if (v0.dcav0topv() < dcav0topv) { continue; } if (v0.dcaV0daughters() > dcav0dau) { diff --git a/PWGLF/TableProducer/f1protonInitializer.cxx b/PWGLF/TableProducer/f1protonInitializer.cxx index df70b9729c0..a39b6678cbe 100644 --- a/PWGLF/TableProducer/f1protonInitializer.cxx +++ b/PWGLF/TableProducer/f1protonInitializer.cxx @@ -178,7 +178,7 @@ struct f1protoninitializer { template bool SelectionV0(Collision const& collision, V0 const& candidate) { - if (fabs(candidate.dcav0topv(collision.posX(), collision.posY(), collision.posZ())) > cMaxV0DCA) { + if (fabs(candidate.dcav0topv()) > cMaxV0DCA) { return false; } float CtauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassK0Short; diff --git a/PWGLF/TableProducer/f1protonreducedtable.cxx b/PWGLF/TableProducer/f1protonreducedtable.cxx index 2e9ebaea376..28260f6d80e 100644 --- a/PWGLF/TableProducer/f1protonreducedtable.cxx +++ b/PWGLF/TableProducer/f1protonreducedtable.cxx @@ -316,7 +316,7 @@ struct f1protonreducedtable { template bool SelectionV0(Collision const& collision, V0 const& candidate) { - if (fabs(candidate.dcav0topv(collision.posX(), collision.posY(), collision.posZ())) > cMaxV0DCA) { + if (fabs(candidate.dcav0topv()) > cMaxV0DCA) { return false; } @@ -324,7 +324,7 @@ struct f1protonreducedtable { const std::vector decVtx = {candidate.x(), candidate.y(), candidate.z()}; const float tranRad = candidate.v0radius(); const float dcaDaughv0 = candidate.dcaV0daughters(); - const float cpav0 = candidate.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + const float cpav0 = candidate.v0cosPA(); float CtauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * TDatabasePDG::Instance()->GetParticle(kK0Short)->Mass(); // FIXME: Get from the common header float lowmasscutks0 = 0.497 - 2.0 * cSigmaMassKs0; diff --git a/PWGLF/TableProducer/filterf1proton.cxx b/PWGLF/TableProducer/filterf1proton.cxx index ccc6adce183..4783829ca5a 100644 --- a/PWGLF/TableProducer/filterf1proton.cxx +++ b/PWGLF/TableProducer/filterf1proton.cxx @@ -306,7 +306,7 @@ struct filterf1proton { template bool SelectionV0(Collision const& collision, V0 const& candidate) { - if (fabs(candidate.dcav0topv(collision.posX(), collision.posY(), collision.posZ())) > cMaxV0DCA) { + if (fabs(candidate.dcav0topv()) > cMaxV0DCA) { return false; } @@ -314,7 +314,7 @@ struct filterf1proton { const std::vector decVtx = {candidate.x(), candidate.y(), candidate.z()}; const float tranRad = candidate.v0radius(); const float dcaDaughv0 = candidate.dcaV0daughters(); - const float cpav0 = candidate.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + const float cpav0 = candidate.v0cosPA(); float CtauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassK0Short; float lowmasscutks0 = 0.497 - 2.0 * cSigmaMassKs0; diff --git a/PWGLF/TableProducer/hStrangeCorrelationFilter.cxx b/PWGLF/TableProducer/hStrangeCorrelationFilter.cxx index 2ba170998c9..bbbc3f8c3de 100644 --- a/PWGLF/TableProducer/hStrangeCorrelationFilter.cxx +++ b/PWGLF/TableProducer/hStrangeCorrelationFilter.cxx @@ -282,7 +282,7 @@ struct hstrangecorrelationfilter { /// _________________________________________________ /// Populate table with associated V0s for (auto const& v0 : V0s) { - if (v0.v0radius() < v0RadiusMin || v0.v0radius() > v0RadiusMax || v0.eta() > assocEtaMax || v0.eta() < assocEtaMin || v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0Cospa) { + if (v0.v0radius() < v0RadiusMin || v0.v0radius() > v0RadiusMax || v0.eta() > assocEtaMax || v0.eta() < assocEtaMin || v0.v0cosPA() < v0Cospa) { continue; } // check dE/dx compatibility @@ -303,12 +303,12 @@ struct hstrangecorrelationfilter { compatibleK0Short = true; } if (TMath::Abs(posdau.tpcNSigmaPr()) < strangedEdxNSigma && TMath::Abs(negdau.tpcNSigmaPi()) < strangedEdxNSigma) { - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > lambdaCospa) { + if (v0.v0cosPA() > lambdaCospa) { compatibleLambda = true; } } if (TMath::Abs(posdau.tpcNSigmaPi()) < strangedEdxNSigma && TMath::Abs(negdau.tpcNSigmaPr()) < strangedEdxNSigma) { - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > lambdaCospa) { + if (v0.v0cosPA() > lambdaCospa) { compatibleAntiLambda = true; } } diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index 283f7894a18..76935d57284 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -188,6 +188,7 @@ struct lambdakzeroBuilder { float posDCAxy; float negDCAxy; float cosPA; + float dcav0topv; float V0radius; float lambdaMass; float antilambdaMass; @@ -210,6 +211,11 @@ struct lambdakzeroBuilder { {"hNegativeITSClusters", "hNegativeITSClusters", {HistType::kTH1F, {{10, -0.5f, 9.5f}}}}, {"hV0Criteria", "hV0Criteria", {HistType::kTH1F, {{10, -0.5f, 9.5f}}}}}}; + float CalculateDCAStraightToPV(float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) + { + 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)); + } + void resetHistos() { statisticsRegistry.exceptions = 0; @@ -579,6 +585,13 @@ struct lambdakzeroBuilder { return false; } + v0candidate.dcav0topv = CalculateDCAStraightToPV( + v0candidate.pos[0], v0candidate.pos[1], v0candidate.pos[2], + v0candidate.posP[0] + v0candidate.negP[0], + v0candidate.posP[1] + v0candidate.negP[1], + v0candidate.posP[2] + v0candidate.negP[2], + primaryVertex.getX(), primaryVertex.getY(), primaryVertex.getZ()); + // Passes CosPA check statisticsRegistry.v0stats[kV0CosPA]++; @@ -693,7 +706,9 @@ struct lambdakzeroBuilder { v0candidate.negP[0], v0candidate.negP[1], v0candidate.negP[2], v0candidate.dcaV0dau, v0candidate.posDCAxy, - v0candidate.negDCAxy); + v0candidate.negDCAxy, + v0candidate.cosPA, + v0candidate.dcav0topv); // populate V0 covariance matrices if required by any other task if (createV0CovMats) { diff --git a/PWGLF/TableProducer/lambdakzerofinder.cxx b/PWGLF/TableProducer/lambdakzerofinder.cxx index 29951f73637..70184abe393 100644 --- a/PWGLF/TableProducer/lambdakzerofinder.cxx +++ b/PWGLF/TableProducer/lambdakzerofinder.cxx @@ -264,6 +264,7 @@ struct lambdakzerofinder { // Attempt collision association on pure geometrical basis // FIXME this can of course be far better float smallestDCA = 1e+3; + float cosPA = -1; int collisionIndex = -1; // float getDCAtoPV(float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ){ for (auto const& collision : collisions) { @@ -271,10 +272,12 @@ struct lambdakzerofinder { if (thisDCA < smallestDCA) { collisionIndex = collision.globalIndex(); smallestDCA = thisDCA; + cosPA = RecoDecay::cpa(std::array{collision.posX(), collision.posY(), collision.posY()}, array{vtx[0], vtx[1], vtx[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]}); } } if (smallestDCA > maxV0DCAtoPV) return 0; // unassociated + v0(collisionIndex, t1.globalIndex(), t2.globalIndex()); v0data(t1.globalIndex(), t2.globalIndex(), collisionIndex, 0, fitter.getTrack(0).getX(), fitter.getTrack(1).getX(), @@ -282,7 +285,7 @@ struct lambdakzerofinder { pvec0[0], pvec0[1], pvec0[2], pvec1[0], pvec1[1], pvec1[2], TMath::Sqrt(fitter.getChi2AtPCACandidate()), - t1.dcaXY(), t2.dcaXY()); + t1.dcaXY(), t2.dcaXY(), cosPA, smallestDCA); v0datalink(v0data.lastIndex()); return 1; } @@ -367,9 +370,9 @@ struct lambdakzerofinderQa { Long_t lNCand = 0; for (auto& v0 : fullV0s) { - if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { registry.fill(HIST("hV0Radius"), v0.v0radius()); - registry.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + registry.fill(HIST("hV0CosPA"), v0.v0cosPA()); registry.fill(HIST("hDCAPosToPV"), v0.dcapostopv()); registry.fill(HIST("hDCANegToPV"), v0.dcanegtopv()); registry.fill(HIST("hDCAV0Dau"), v0.dcaV0daughters()); @@ -400,9 +403,9 @@ struct lambdakzerofinderQa { Long_t lNCand = 0; for (auto& v0 : fullV0s) { - if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { registry.fill(HIST("hV0Radius"), v0.v0radius()); - registry.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + registry.fill(HIST("hV0CosPA"), v0.v0cosPA()); registry.fill(HIST("hDCAPosToPV"), v0.dcapostopv()); registry.fill(HIST("hDCANegToPV"), v0.dcanegtopv()); registry.fill(HIST("hDCAV0Dau"), v0.dcaV0daughters()); diff --git a/PWGLF/TableProducer/v0qaanalysis.cxx b/PWGLF/TableProducer/v0qaanalysis.cxx index 443fd043ff1..a7d1f6214dc 100644 --- a/PWGLF/TableProducer/v0qaanalysis.cxx +++ b/PWGLF/TableProducer/v0qaanalysis.cxx @@ -110,14 +110,14 @@ struct v0qaanalysis { bool isPhysicalPrimary = isMC; if (v0.v0radius() > v0radius && - v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa && + v0.v0cosPA() > v0cospa && TMath::Abs(v0.posTrack_as().eta()) < etadau && TMath::Abs(v0.negTrack_as().eta()) < etadau) { // Fill table myv0s(v0.globalIndex(), v0.pt(), v0.yLambda(), v0.yK0Short(), v0.mLambda(), v0.mAntiLambda(), v0.mK0Short(), - v0.v0radius(), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()), + v0.v0radius(), v0.v0cosPA(), v0.dcapostopv(), v0.dcanegtopv(), v0.dcaV0daughters(), v0.posTrack_as().eta(), v0.negTrack_as().eta(), v0.posTrack_as().phi(), v0.negTrack_as().phi(), @@ -201,7 +201,7 @@ struct v0qaanalysis { float ctauK0s = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassK0Short; if (v0.v0radius() > v0radius && - v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa && + v0.v0cosPA() > v0cospa && TMath::Abs(v0.posTrack_as().eta()) < etadau && TMath::Abs(v0.negTrack_as().eta()) < etadau // && ) { @@ -211,7 +211,7 @@ struct v0qaanalysis { // Fill table myv0s(v0.globalIndex(), v0.pt(), v0.yLambda(), v0.yK0Short(), v0.mLambda(), v0.mAntiLambda(), v0.mK0Short(), - v0.v0radius(), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()), + v0.v0radius(), v0.v0cosPA(), v0.dcapostopv(), v0.dcanegtopv(), v0.dcaV0daughters(), v0.posTrack_as().eta(), v0.negTrack_as().eta(), v0.posTrack_as().phi(), v0.negTrack_as().phi(), diff --git a/PWGLF/Tasks/QC/straRecoStudy.cxx b/PWGLF/Tasks/QC/straRecoStudy.cxx index c348fd4f6cf..3ed39fafe59 100644 --- a/PWGLF/Tasks/QC/straRecoStudy.cxx +++ b/PWGLF/Tasks/QC/straRecoStudy.cxx @@ -520,20 +520,20 @@ struct straRecoStudy { histos.fill(HIST("h2dK0ShortQADCAV0Dau"), v0.pt(), v0.dcaV0daughters()); histos.fill(HIST("h2dK0ShortQADCAPosToPV"), v0.pt(), v0.posTrack_as().dcaXY()); histos.fill(HIST("h2dK0ShortQADCANegToPV"), v0.pt(), v0.negTrack_as().dcaXY()); - histos.fill(HIST("h2dK0ShortQADCAToPV"), v0.pt(), v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ())); - histos.fill(HIST("h2dK0ShortQAPointingAngle"), v0.pt(), TMath::ACos(v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()))); + histos.fill(HIST("h2dK0ShortQADCAToPV"), v0.pt(), v0.dcav0topv()); + histos.fill(HIST("h2dK0ShortQAPointingAngle"), v0.pt(), TMath::ACos(v0.v0cosPA())); } if (v0mc.pdgCode() == 3122) { histos.fill(HIST("h2dLambdaQAV0Radius"), v0.pt(), v0.v0radius()); histos.fill(HIST("h2dLambdaQADCAV0Dau"), v0.pt(), v0.dcaV0daughters()); histos.fill(HIST("h2dLambdaQADCAPosToPV"), v0.pt(), v0.posTrack_as().dcaXY()); histos.fill(HIST("h2dLambdaQADCANegToPV"), v0.pt(), v0.negTrack_as().dcaXY()); - histos.fill(HIST("h2dLambdaQADCAToPV"), v0.pt(), v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ())); - histos.fill(HIST("h2dLambdaQAPointingAngle"), v0.pt(), TMath::ACos(v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()))); + histos.fill(HIST("h2dLambdaQADCAToPV"), v0.pt(), v0.dcav0topv()); + histos.fill(HIST("h2dLambdaQAPointingAngle"), v0.pt(), TMath::ACos(v0.v0cosPA())); } if (v0.v0radius() > v0setting_radius && v0.v0radius() < maxV0Radius) { - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0setting_cospa) { + if (v0.v0cosPA() > v0setting_cospa) { if (v0.dcaV0daughters() < v0setting_dcav0dau) { //*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* // Fill invariant masses @@ -577,7 +577,7 @@ struct straRecoStudy { continue; if (v0.v0radius() > v0setting_radius && v0.v0radius() < maxV0Radius) { - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0setting_cospa) { + if (v0.v0cosPA() > v0setting_cospa) { if (v0.dcaV0daughters() < v0setting_dcav0dau) { //*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+* // Fill invariant masses diff --git a/PWGLF/Tasks/QC/tpc_dEdx_postcalibration.cxx b/PWGLF/Tasks/QC/tpc_dEdx_postcalibration.cxx index 4edc56cb5d1..fbc0fc50c45 100644 --- a/PWGLF/Tasks/QC/tpc_dEdx_postcalibration.cxx +++ b/PWGLF/Tasks/QC/tpc_dEdx_postcalibration.cxx @@ -233,7 +233,7 @@ struct tpc_dEdx_postcalibration { template bool passedV0Selection(const T1& v0, const C& collision) { - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0cospaMin) + if (v0.v0cosPA() < v0cospaMin) return false; if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius) return false; diff --git a/PWGLF/Tasks/QC/tpc_dedx_qa.cxx b/PWGLF/Tasks/QC/tpc_dedx_qa.cxx index 749a9611fda..a6560614dfd 100644 --- a/PWGLF/Tasks/QC/tpc_dedx_qa.cxx +++ b/PWGLF/Tasks/QC/tpc_dedx_qa.cxx @@ -331,7 +331,7 @@ struct tpc_dedx_qa { template bool passedV0Selection(const T1& v0, const C& collision) { - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0cospaMin) + if (v0.v0cosPA() < v0cospaMin) return false; if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius) return false; diff --git a/PWGLF/Tasks/QC/v0cascadesqa.cxx b/PWGLF/Tasks/QC/v0cascadesqa.cxx index 86e9723ab58..f6f5723b18b 100644 --- a/PWGLF/Tasks/QC/v0cascadesqa.cxx +++ b/PWGLF/Tasks/QC/v0cascadesqa.cxx @@ -380,7 +380,7 @@ struct v0cascadesQA { } } - histos_V0.fill(HIST("CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + histos_V0.fill(HIST("CosPA"), v0.v0cosPA()); histos_V0.fill(HIST("V0Radius"), v0.v0radius()); histos_V0.fill(HIST("V0DCANegToPV"), v0.dcanegtopv()); histos_V0.fill(HIST("V0DCAPosToPV"), v0.dcapostopv()); @@ -392,7 +392,7 @@ struct v0cascadesQA { float CtauLambda = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassLambda0; float CtauK0s = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassK0Short; - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > V0_cosPA && + if (v0.v0cosPA() > V0_cosPA && v0.v0radius() > V0_radius && v0.dcaV0daughters() < V0_dcav0dau && TMath::Abs(v0.dcapostopv()) > V0_dcapostopv && TMath::Abs(v0.dcanegtopv()) > V0_dcanegtopv) { @@ -405,8 +405,8 @@ struct v0cascadesQA { histos_V0.fill(HIST("CtauK0s"), CtauK0s); histos_V0.fill(HIST("DecayLengthK0s"), decayLength); histos_V0.fill(HIST("InvMassK0S"), v0.pt(), v0.mK0Short()); - histos_V0.fill(HIST("InvMassK0SVsPtVsPA"), v0.pt(), TMath::ACos(v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())), v0.mK0Short()); - histos_V0.fill(HIST("V0DCAV0ToPVK0S"), v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ())); + histos_V0.fill(HIST("InvMassK0SVsPtVsPA"), v0.pt(), TMath::ACos(v0.v0cosPA()), v0.mK0Short()); + histos_V0.fill(HIST("V0DCAV0ToPVK0S"), v0.dcav0topv()); if (doextraanalysis) { histos_V0.fill(HIST("InvMassK0S_Radius"), v0.v0radius(), v0.mK0Short()); histos_V0.fill(HIST("InvMassK0S_PtRadius"), v0.pt(), v0.v0radius(), v0.mK0Short()); @@ -425,9 +425,9 @@ struct v0cascadesQA { histos_V0.fill(HIST("CtauLambda"), CtauLambda); histos_V0.fill(HIST("InvMassLambda"), v0.pt(), v0.mLambda()); if (doextraanalysis) - histos_V0.fill(HIST("InvMassLambdaVsPtVsPA"), v0.pt(), TMath::ACos(v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())), v0.mLambda()); - histos_V0.fill(HIST("V0DCAV0ToPVLambda"), v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ())); - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > 0.999 && v0.dcaV0daughters() < 1 && TMath::Abs(v0.mK0Short() - o2::analysis::pdg::MassK0Short) > 0.012 && TMath::Abs(v0.mAntiLambda() - o2::analysis::pdg::MassLambda0) > 0.08 && TMath::Abs(v0.mLambda() - o2::analysis::pdg::MassLambda0) < 0.002) { + histos_V0.fill(HIST("InvMassLambdaVsPtVsPA"), v0.pt(), TMath::ACos(v0.v0cosPA()), v0.mLambda()); + histos_V0.fill(HIST("V0DCAV0ToPVLambda"), v0.dcav0topv()); + if (v0.v0cosPA() > 0.999 && v0.dcaV0daughters() < 1 && TMath::Abs(v0.mK0Short() - o2::analysis::pdg::MassK0Short) > 0.012 && TMath::Abs(v0.mAntiLambda() - o2::analysis::pdg::MassLambda0) > 0.08 && TMath::Abs(v0.mLambda() - o2::analysis::pdg::MassLambda0) < 0.002) { histos_V0.fill(HIST("ResponsePionFromLambda"), v0.pt(), negdau.tpcNSigmaPi()); histos_V0.fill(HIST("ResponseProtonFromLambda"), v0.pt(), posdau.tpcNSigmaPr()); } @@ -450,8 +450,8 @@ struct v0cascadesQA { histos_V0.fill(HIST("CtauAntiLambda"), CtauLambda); histos_V0.fill(HIST("InvMassAntiLambda"), v0.pt(), v0.mAntiLambda()); if (doextraanalysis) - histos_V0.fill(HIST("InvMassAntiLambdaVsPtVsPA"), v0.pt(), TMath::ACos(v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())), v0.mAntiLambda()); - histos_V0.fill(HIST("V0DCAV0ToPVAntiLambda"), v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ())); + histos_V0.fill(HIST("InvMassAntiLambdaVsPtVsPA"), v0.pt(), TMath::ACos(v0.v0cosPA()), v0.mAntiLambda()); + histos_V0.fill(HIST("V0DCAV0ToPVAntiLambda"), v0.dcav0topv()); if (doextraanalysis) { histos_V0.fill(HIST("InvMassAntiLambda_Radius"), v0.v0radius(), v0.mAntiLambda()); histos_V0.fill(HIST("InvMassAntiLambda_PtRadius"), v0.pt(), v0.v0radius(), v0.mAntiLambda()); @@ -490,7 +490,7 @@ struct v0cascadesQA { float CtauLambda = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassLambda0; float CtauK0s = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::analysis::pdg::MassK0Short; - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > V0_cosPA && + if (v0.v0cosPA() > V0_cosPA && v0.v0radius() > V0_radius && v0.dcaV0daughters() < V0_dcav0dau && TMath::Abs(v0.dcapostopv()) > V0_dcapostopv && diff --git a/PWGLF/Tasks/hyperon-reco-test.cxx b/PWGLF/Tasks/hyperon-reco-test.cxx index c112f0322b3..e866c194486 100644 --- a/PWGLF/Tasks/hyperon-reco-test.cxx +++ b/PWGLF/Tasks/hyperon-reco-test.cxx @@ -101,7 +101,7 @@ struct myLambda { TMath::Abs(posdau.eta()) < rapidity && TMath::Abs(negdau.eta()) < rapidity && posdau.tpcNClsCrossedRows() > tpcNcl && negdau.tpcNClsCrossedRows() > tpcNcl && TMath::Abs(posdau.tpcNSigmaPr()) < tpcsigma && TMath::Abs(negdau.tpcNSigmaPi()) < tpcsigma && // V0 cuts - v0.pt() > minpt && v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa && TMath::Abs(v0.mK0Short() - o2::analysis::pdg::MassK0Short) > removeKs) { + v0.pt() > minpt && v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa && TMath::Abs(v0.mK0Short() - o2::analysis::pdg::MassK0Short) > removeKs) { registry.fill(HIST("hReduction"), 1.5); registry.fill(HIST("hmyLambda_after"), v0.mLambda(), v0.pt()); registry.fill(HIST("hmyLambda_after_b"), v0.mLambda()); @@ -187,7 +187,7 @@ struct myXi { TMath::Abs(posdau.eta()) < rapidity && TMath::Abs(negdau.eta()) < rapidity && TMath::Abs(bachelor.eta()) < rapidity && posdau.tpcNClsCrossedRows() > mincrossedrow && negdau.tpcNClsCrossedRows() > mincrossedrow && bachelor.tpcNClsCrossedRows() > mincrossedrow && posdau.pt() > minpt && negdau.pt() > minpt && bachelor.pt() > minpt && TMath::Abs(casc.dcapostopv()) > dcatopv && TMath::Abs(casc.dcanegtopv()) > dcatopv && TMath::Abs(casc.dcabachtopv()) > dcatopv && TMath::Abs(posdau.tpcNSigmaPr()) < tpcsigma && TMath::Abs(negdau.tpcNSigmaPi()) < tpcsigma && TMath::Abs(bachelor.tpcNSigmaPi()) < tpcsigma && bachelor.sign() < 0 && // V0 cuts - casc.v0radius() > v0radius && casc.dcaV0daughters() < dcav0dau && v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > dcav0topv && casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + casc.v0radius() > v0radius && casc.dcaV0daughters() < dcav0dau && v0.dcav0topv() > dcav0topv && casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { registry.fill(HIST("hmyLambda"), v0.mLambda()); if (TMath::Abs(v0.mLambda() - o2::analysis::pdg::MassLambda0) < v0masswindow && @@ -285,7 +285,7 @@ struct myOmega { TMath::Abs(posdau.eta()) < rapidity && TMath::Abs(negdau.eta()) < rapidity && TMath::Abs(bachelor.eta()) < rapidity && posdau.tpcNClsCrossedRows() > mincrossedrow && negdau.tpcNClsCrossedRows() > mincrossedrow && bachelor.tpcNClsCrossedRows() > mincrossedrow && posdau.pt() > minpt && negdau.pt() > minpt && bachelor.pt() > minpt && TMath::Abs(casc.dcapostopv()) > dcatopv && TMath::Abs(casc.dcanegtopv()) > dcatopv && TMath::Abs(casc.dcabachtopv()) > dcatopv && TMath::Abs(posdau.tpcNSigmaPr()) < tpcsigma && TMath::Abs(negdau.tpcNSigmaPi()) < tpcsigma && TMath::Abs(bachelor.tpcNSigmaKa()) < tpcsigma && bachelor.sign() < 0 && // V0 cuts - casc.v0radius() > v0radius && casc.dcaV0daughters() < dcav0dau && v0.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > dcav0topv && casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + casc.v0radius() > v0radius && casc.dcaV0daughters() < dcav0dau && v0.dcav0topv() > dcav0topv && casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { registry.fill(HIST("hmyLambda"), v0.mLambda()); if (TMath::Abs(v0.mLambda() - o2::analysis::pdg::MassLambda0) < v0masswindow && diff --git a/PWGLF/Tasks/hypertritonAnalysis.cxx b/PWGLF/Tasks/hypertritonAnalysis.cxx index 7528ce42544..cf2ca014c8d 100644 --- a/PWGLF/Tasks/hypertritonAnalysis.cxx +++ b/PWGLF/Tasks/hypertritonAnalysis.cxx @@ -254,7 +254,7 @@ struct hypertritonAnalysis { v0.posTrack_as().tpcNSigmaPi()); if (v0.v0radius() > v0radius) { stats[kHypRadius]++; - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0cosPA() > v0cospa) { stats[kHypCosPA]++; if (v0.dcaV0daughters() < dcav0dau) { stats[kHypDCADaughters]++; @@ -375,7 +375,7 @@ struct hypertritonAnalysis { TMath::Sqrt(v0.pxpos() * v0.pxpos() + v0.pypos() * v0.pypos() + v0.pzpos() * v0.pzpos()), v0.posTrack_as().tpcNSigmaPi()); stats[kHypRadius]++; - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0cosPA() > v0cospa) { stats[kHypCosPA]++; if (v0.dcaV0daughters() < dcav0dau) { stats[kHypDCADaughters]++; diff --git a/PWGLF/Tasks/lambdakzeroanalysis.cxx b/PWGLF/Tasks/lambdakzeroanalysis.cxx index ccf52d3fb4f..6b8208d119c 100644 --- a/PWGLF/Tasks/lambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/lambdakzeroanalysis.cxx @@ -85,7 +85,7 @@ struct lambdakzeroQa { registry.fill(HIST("hMassAntiLambda"), v0.mAntiLambda()); registry.fill(HIST("hV0Radius"), v0.v0radius()); - registry.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + registry.fill(HIST("hV0CosPA"), v0.v0cosPA()); registry.fill(HIST("hDCAPosToPV"), v0.dcapostopv()); registry.fill(HIST("hDCANegToPV"), v0.dcanegtopv()); registry.fill(HIST("hDCAV0Dau"), v0.dcaV0daughters()); @@ -178,7 +178,7 @@ struct lambdakzeroAnalysis { for (auto& v0 : fullV0s) { // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) registry.fill(HIST("V0loopFiltersCounts"), 0.5); - if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { registry.fill(HIST("V0loopFiltersCounts"), 1.5); if (TMath::Abs(v0.yLambda()) < rapidity) { registry.fill(HIST("V0loopFiltersCounts"), 3.5); @@ -245,7 +245,7 @@ struct lambdakzeroAnalysis { for (auto& v0 : fullV0s) { // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) registry.fill(HIST("V0loopFiltersCounts"), 0.5); - if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { registry.fill(HIST("V0loopFiltersCounts"), 1.5); if (TMath::Abs(v0.yLambda()) < rapidity) { registry.fill(HIST("V0loopFiltersCounts"), 3.5); diff --git a/PWGLF/Tasks/lambdakzeroanalysisMC.cxx b/PWGLF/Tasks/lambdakzeroanalysisMC.cxx index 903657ff3b2..4134167d389 100644 --- a/PWGLF/Tasks/lambdakzeroanalysisMC.cxx +++ b/PWGLF/Tasks/lambdakzeroanalysisMC.cxx @@ -93,7 +93,7 @@ struct lambdakzeroQa { registry.fill(HIST("hMassAntiLambda"), v0.mAntiLambda()); registry.fill(HIST("hV0Radius"), v0.v0radius()); - registry.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + registry.fill(HIST("hV0CosPA"), v0.v0cosPA()); registry.fill(HIST("hDCAPosToPV"), v0.dcapostopv()); registry.fill(HIST("hDCANegToPV"), v0.dcanegtopv()); registry.fill(HIST("hDCAV0Dau"), v0.dcaV0daughters()); @@ -224,7 +224,7 @@ struct lambdakzeroAnalysisMc { for (auto& v0 : fullV0s) { // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) registry.fill(HIST("V0loopFiltersCounts"), 0.5); - if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { registry.fill(HIST("V0loopFiltersCounts"), 1.5); auto reconegtrack = v0.negTrack_as(); @@ -359,7 +359,7 @@ struct lambdakzeroAnalysisMc { for (auto& v0 : fullV0s) { // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) registry.fill(HIST("V0loopFiltersCounts"), 0.5); - if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { + if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { registry.fill(HIST("V0loopFiltersCounts"), 1.5); auto reconegtrack = v0.negTrack_as(); diff --git a/PWGLF/Tasks/vzero_cascade_absorption.cxx b/PWGLF/Tasks/vzero_cascade_absorption.cxx index 1778fd4a5b6..f1b9f3f9b53 100644 --- a/PWGLF/Tasks/vzero_cascade_absorption.cxx +++ b/PWGLF/Tasks/vzero_cascade_absorption.cxx @@ -206,7 +206,7 @@ struct vzero_cascade_absorption { return false; // V0 Selections - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0cospaMin) + if (v0.v0cosPA() < v0cospaMin) return false; if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius) return false; @@ -256,7 +256,7 @@ struct vzero_cascade_absorption { return false; // V0 Selections - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0cospaMin) + if (v0.v0cosPA() < v0cospaMin) return false; if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius) return false; @@ -306,7 +306,7 @@ struct vzero_cascade_absorption { return false; // V0 Selections - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0cospaMin) + if (v0.v0cosPA() < v0cospaMin) return false; if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius) return false; diff --git a/PWGMM/Mult/Tasks/dndeta-hi.cxx b/PWGMM/Mult/Tasks/dndeta-hi.cxx index b99b34a883b..aee7468ee12 100644 --- a/PWGMM/Mult/Tasks/dndeta-hi.cxx +++ b/PWGMM/Mult/Tasks/dndeta-hi.cxx @@ -834,7 +834,7 @@ struct MultiplicityCounter { auto nTrack = v0.template negTrack_as(); if (v0.v0radius() > v0radius && - v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa && + v0.v0cosPA() > v0cospa && abs(pTrack.eta()) < etadau && abs(nTrack.eta()) < etadau && fabs(z) < 10 && fabs(v0.eta()) < 0.5) { @@ -879,7 +879,7 @@ struct MultiplicityCounter { auto nTrack = v0.template negTrack_as(); if (0 && v0.v0radius() > v0radius && - v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa && + v0.v0cosPA() > v0cospa && abs(pTrack.eta()) < etadau && abs(nTrack.eta()) < etadau) { diff --git a/Tutorials/PWGLF/Strangeness/strangeness_step1.cxx b/Tutorials/PWGLF/Strangeness/strangeness_step1.cxx index 4c388e36768..70748658778 100644 --- a/Tutorials/PWGLF/Strangeness/strangeness_step1.cxx +++ b/Tutorials/PWGLF/Strangeness/strangeness_step1.cxx @@ -86,14 +86,14 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hMassK0Short"), v0.mK0Short()); // Cut on dynamic columns - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0setting_cospa) + if (v0.v0cosPA() < v0setting_cospa) continue; if (v0.v0radius() < v0setting_radius) continue; rKzeroShort.fill(HIST("hMassK0ShortSelected"), v0.mK0Short()); rKzeroShort.fill(HIST("hDCAV0Daughters"), v0.dcaV0daughters()); - rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA()); } } }; diff --git a/Tutorials/PWGLF/Strangeness/strangeness_step2.cxx b/Tutorials/PWGLF/Strangeness/strangeness_step2.cxx index 2aaf6a3a04c..9701410db1b 100644 --- a/Tutorials/PWGLF/Strangeness/strangeness_step2.cxx +++ b/Tutorials/PWGLF/Strangeness/strangeness_step2.cxx @@ -103,7 +103,7 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hMassK0Short"), v0.mK0Short()); // Cut on dynamic columns - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0setting_cospa) + if (v0.v0cosPA() < v0setting_cospa) continue; if (v0.v0radius() < v0setting_radius) continue; @@ -117,7 +117,7 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hMassK0ShortSelected"), v0.mK0Short()); rKzeroShort.fill(HIST("hDCAV0Daughters"), v0.dcaV0daughters()); - rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA()); // Filling the PID of the V0 daughters in the region of the K0 peak if (0.45 < v0.mK0Short() && v0.mK0Short() < 0.55) { diff --git a/Tutorials/PWGLF/Strangeness/strangeness_step3.cxx b/Tutorials/PWGLF/Strangeness/strangeness_step3.cxx index cb370345002..6121831fadb 100644 --- a/Tutorials/PWGLF/Strangeness/strangeness_step3.cxx +++ b/Tutorials/PWGLF/Strangeness/strangeness_step3.cxx @@ -117,7 +117,7 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hMassK0Short"), v0.mK0Short()); // Cut on dynamic columns - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0setting_cospa) + if (v0.v0cosPA() < v0setting_cospa) continue; if (v0.v0radius() < v0setting_radius) continue; @@ -133,7 +133,7 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hPtK0ShortSelected"), v0.pt()); rKzeroShort.fill(HIST("hDCAV0Daughters"), v0.dcaV0daughters()); - rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA()); // Filling the PID of the V0 daughters in the region of the K0 peak if (0.45 < v0.mK0Short() && v0.mK0Short() < 0.55) { diff --git a/Tutorials/PWGLF/Strangeness/strangeness_step4.cxx b/Tutorials/PWGLF/Strangeness/strangeness_step4.cxx index 7f20727132b..59e6c9d86aa 100644 --- a/Tutorials/PWGLF/Strangeness/strangeness_step4.cxx +++ b/Tutorials/PWGLF/Strangeness/strangeness_step4.cxx @@ -158,7 +158,7 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hMassK0Short"), v0.mK0Short()); // Cut on dynamic columns - if (v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < v0setting_cospa) + if (v0.v0cosPA() < v0setting_cospa) continue; if (v0.v0radius() < v0setting_radius) continue; @@ -174,7 +174,7 @@ struct strangeness_tutorial { rKzeroShort.fill(HIST("hPtK0ShortSelected"), v0.pt()); rKzeroShort.fill(HIST("hDCAV0Daughters"), v0.dcaV0daughters()); - rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + rKzeroShort.fill(HIST("hV0CosPA"), v0.v0cosPA()); // Filling the PID of the V0 daughters in the region of the K0 peak if (0.45 < v0.mK0Short() && v0.mK0Short() < 0.55) {