From 9fc252806118300bfe5fedb0ed0980cd2efaeeca Mon Sep 17 00:00:00 2001 From: aimeric-landou <46970521+aimeric-landou@users.noreply.github.com> Date: Thu, 21 Jan 2021 08:51:28 +0000 Subject: [PATCH] fix filtering and minor edits (#5245) --- Tasks/PWGLF/lambdakzeroanalysis.cxx | 20 +++++++++++++++----- Tasks/PWGLF/lambdakzerobuilder.cxx | 12 ++++++++---- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Tasks/PWGLF/lambdakzeroanalysis.cxx b/Tasks/PWGLF/lambdakzeroanalysis.cxx index b43d76adee96a..9000636c05e60 100644 --- a/Tasks/PWGLF/lambdakzeroanalysis.cxx +++ b/Tasks/PWGLF/lambdakzeroanalysis.cxx @@ -90,11 +90,12 @@ struct lambdakzeroanalysis { Configurable dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"}; Configurable dcapostopv{"dcapostopv", .1, "DCA Pos To PV"}; Configurable v0radius{"v0radius", 5.0, "v0radius"}; + Configurable rapidity{"rapidity", 0.5, "rapidity"}; - Filter preFilterV0 = aod::v0data::dcapostopv > dcapostopv&& - aod::v0data::dcanegtopv > dcanegtopv&& aod::v0data::dcaV0daughters < dcav0dau; + // Filter preFilterV0 = aod::v0data::dcapostopv > dcapostopv&& + // aod::v0data::dcanegtopv > dcanegtopv&& aod::v0data::dcaV0daughters < dcav0dau; we can use this again once (and if) math expressions can be used there - void process(soa::Join::iterator const& collision, soa::Filtered const& fullV0s) + void process(soa::Join::iterator const& collision, aod::V0DataExt const& fullV0s) { if (!collision.alias()[kINT7]) { return; @@ -106,11 +107,20 @@ struct lambdakzeroanalysis { for (auto& v0 : fullV0s) { //FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) { - if (TMath::Abs(v0.yLambda()) < 0.5) { + if (fabs(v0.dcapostopv()) < dcapostopv) { + continue; + } + if (fabs(v0.dcanegtopv()) < dcanegtopv) { + continue; + } + if (fabs(v0.dcaV0daughters()) > dcav0dau) { + continue; + } + if (TMath::Abs(v0.yLambda()) < rapidity) { h3dMassLambda->Fill(collision.centV0M(), v0.pt(), v0.mLambda()); h3dMassAntiLambda->Fill(collision.centV0M(), v0.pt(), v0.mAntiLambda()); } - if (TMath::Abs(v0.yK0Short()) < 0.5) { + if (TMath::Abs(v0.yK0Short()) < rapidity) { h3dMassK0Short->Fill(collision.centV0M(), v0.pt(), v0.mK0Short()); } } diff --git a/Tasks/PWGLF/lambdakzerobuilder.cxx b/Tasks/PWGLF/lambdakzerobuilder.cxx index 63839bcbe4fdd..448d4735e1b8a 100644 --- a/Tasks/PWGLF/lambdakzerobuilder.cxx +++ b/Tasks/PWGLF/lambdakzerobuilder.cxx @@ -81,7 +81,7 @@ struct lambdakzeroprefilterpairs { Configurable dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"}; Configurable dcapostopv{"dcapostopv", .1, "DCA Pos To PV"}; Configurable mincrossedrows{"mincrossedrows", 70, "min crossed rows"}; - Configurable tpcrefit{"tpcrefit", 1, "demand TPC refit"}; + Configurable tpcrefit{"tpcrefit", 1, "demand TPC refit"}; OutputObj hGoodIndices{TH1F("hGoodIndices", "", 4, 0, 4)}; @@ -132,7 +132,7 @@ struct lambdakzerobuilder { //Configurables Configurable d_bz{"d_bz", -5.0, "bz field"}; - Configurable d_UseAbsDCA{"d_UseAbsDCA", kTRUE, "Use Abs DCAs"}; + // Configurable d_UseAbsDCA{"d_UseAbsDCA", 1, "Use Abs DCAs"}; uncomment this once we want to use the weighted DCA //Selection criteria Configurable v0cospa{"v0cospa", 0.995, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0) @@ -156,7 +156,7 @@ struct lambdakzerobuilder { fitter.setMinRelChi2Change(0.9); fitter.setMaxDZIni(1e9); fitter.setMaxChi2(1e9); - fitter.setUseAbsDCA(d_UseAbsDCA); + fitter.setUseAbsDCA(true); // use d_UseAbsDCA once we want to use the weighted DCA hEventCounter->Fill(0.5); std::array pVtx = {collision.posX(), collision.posY(), collision.posZ()}; @@ -189,11 +189,15 @@ struct lambdakzerobuilder { } 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) { continue; } + auto V0radius = RecoDecay::sqrtSumOfSquares(pos[0], pos[1]); //probably find better name to differentiate the cut from the variable + if (V0radius < v0radius) { + continue; + } + hV0Candidate->Fill(1.5); v0data( V0.posTrack_as().globalIndex(),