diff --git a/PWGLF/Tasks/Nuspex/dedxPidAnalysis.cxx b/PWGLF/Tasks/Nuspex/dedxPidAnalysis.cxx index 5ff943f2348..a8ff711af76 100644 --- a/PWGLF/Tasks/Nuspex/dedxPidAnalysis.cxx +++ b/PWGLF/Tasks/Nuspex/dedxPidAnalysis.cxx @@ -134,27 +134,37 @@ struct DedxPidAnalysis { // Track secondary lebel enum TrkSecCutLabel { AllSec = 1, - V0Type, V0CosPA, V0DecayRadius, V0Daughters, - TPCRefit, PhiVarCutSec, NClTPCFoundCutSec, NClTPCPIDCutSec, AllK0s, + SingleTrackSelectionK0s, + V0TypeK0s, + DCAtoVtxK0s, + Armenteros, V0RapidityK0s, V0ProperLifetimeK0s, MassCutK0s, AllLambda, + SingleTrackSelectionLambda, + V0TypeLambda, + DCAtoVtxLambda, V0RapidityLambda, V0ProperLifetimeLambda, MassCutLambda, AllAntiLambda, + SingleTrackSelectionAntiLambda, + V0TypeAntiLambda, + DCAtoVtxAntiLambda, V0RapidityAntiLambda, V0ProperLifetimeAntiLambda, MassCutAntiLambda, AllGamma, + SingleTrackSelectionGamma, + V0TypeGamma, V0RapidityGamma, MassCutGamma }; @@ -176,20 +186,26 @@ struct DedxPidAnalysis { Configurable minNCrossedRowsOverFindableClustersTPC{"minNCrossedRowsOverFindableClustersTPC", 0.8f, "Additional cut on the minimum value of the ratio between crossed rows and findable clusters in the TPC"}; Configurable maxDCAz{"maxDCAz", 0.1f, "maxDCAz"}; // v0 cuts - Configurable v0cospaMin{"v0cospaMin", 0.998f, "Minimum V0 CosPA"}; - Configurable minimumV0Radius{"minimumV0Radius", 0.5f, + Configurable v0cospaMin{"v0cospaMin", 0.999f, "Minimum V0 CosPA"}; + Configurable minimumV0Radius{"minimumV0Radius", 1.2f, "Minimum V0 Radius"}; Configurable maximumV0Radius{"maximumV0Radius", 100.0f, "Maximum V0 Radius"}; Configurable dcaV0DaughtersMax{"dcaV0DaughtersMax", 0.5f, "Maximum DCA Daughters"}; + Configurable dcaProtonsFromLambda{"dcaProtonsFromLambda", 0.05f, + "Minimum DCA of protons to vtx for Lambda"}; + Configurable dcaPionsFromLambda{"dcaPionsFromLambda", 0.2f, + "Minimum DCA of pions to vtx for Lambda"}; + Configurable dcaPionsFromK0s{"dcaPionsFromK0s", 0.1f, + "Minimum DCA of pions to vtx for K0s"}; Configurable v0rapidityCut{"v0rapidityCut", 0.5f, "V0 rapidity cut"}; Configurable v0ProperLifetimeCutK0s{"v0ProperLifetimeCutK0s", 20.f, "V0 proper lifetime cut for K0s"}; Configurable v0ProperLifetimeCutLambda{"v0ProperLifetimeCutLambda", 30.f, "V0 proper lifetime cut for Lambda"}; Configurable nsigmaTOFmax{"nsigmaTOFmax", 3.0f, "Maximum nsigma TOF"}; - Configurable invMassCutK0s{"invMassCutK0s", 0.2f, "invariant Mass Cut for K0s"}; - Configurable invMassCutLambda{"invMassCutLambda", 0.1f, "invariant Mass Cut for Lambda"}; - Configurable invMassCutGamma{"invMassCutGamma", 0.1f, "invariant Mass Cut for Gamma"}; + Configurable invMassCutK0s{"invMassCutK0s", 0.015f, "invariant Mass Cut for K0s"}; + Configurable invMassCutLambda{"invMassCutLambda", 0.015f, "invariant Mass Cut for Lambda"}; + Configurable invMassCutGamma{"invMassCutGamma", 0.015f, "invariant Mass Cut for Gamma"}; Configurable calibrationMode{"calibrationMode", false, "calibration mode"}; Configurable phiVarCut{"phiVarCut", true, "phi var cut"}; Configurable nClTPCFoundCut{"nClTPCFoundCut", false, "number of found clusters in TPC cut"}; @@ -200,11 +216,13 @@ struct DedxPidAnalysis { Configurable v0SelectionMode{"v0SelectionMode", 3, "V0 Selection base on TPC: 1, TOF:2 ,Both:3"}; Configurable momentumMode{"momentumMode", 2, "1: TPC inner param, 2: Total momentum p"}; Configurable v0TypeSelection{"v0TypeSelection", 1, "select on a certain V0 type (leave negative if no selection desired)"}; + Configurable v0TypeSelectionGamma{"v0TypeSelectionGamma", 7, "select on a certain V0 type (leave negative if no selection desired)"}; Configurable multiplicityEstimator{"multiplicityEstimator", 9, "Flag to use a multiplicity estimator; No multiplicity: 0, MultFV0A: 1, MultFT0M: 2, MultFDDM: 3 ,MultTracklets: 4,MultTPC: 5,MultNTracksPV: 6 ,MultNTracksPVeta1: 7,CentralityFT0C: 8 ,CentralityFT0M: 9, CentralityFV0A: 10"}; Configurable lowParam1{"lowParam1", 0.119297, "First parameter for low phi cut"}; Configurable lowParam2{"lowParam2", 0.000379693, "Second parameter for low phi cut"}; Configurable highParam1{"highParam1", 0.16685, "First parameter for high phi cut"}; Configurable highParam2{"highParam2", 0.00981942, "Second parameter for high phi cut"}; + Configurable armPodCut{"armPodCut", 5.0f, "pT * (cut) > |alpha|"}; // Histograms names static constexpr std::string_view DedxvsMomentumPos[ParticlesType] = {"dEdx_vs_Momentum_all_Pos", "dEdx_vs_Momentum_Pi_v0_Pos", "dEdx_vs_Momentum_Pr_v0_Pos", "dEdx_vs_Momentum_El_v0_Pos"}; static constexpr std::string_view DedxvsMomentumNeg[ParticlesType] = {"dEdx_vs_Momentum_all_Neg", "dEdx_vs_Momentum_Pi_v0_Neg", "dEdx_vs_Momentum_Pr_v0_Neg", "dEdx_vs_Momentum_El_v0_Neg"}; @@ -648,34 +666,43 @@ struct DedxPidAnalysis { xAll->SetBinLabel(NClTPCPIDCutPri, "NClTPCPIDCutPri"); xAll->SetBinLabel(NClTPCFoundCutPri, "NClTPCFoundCutPri"); - registryDeDx.add("trackselSec", "track selected sec particles", HistType::kTH1F, {{24, 0.5, 24.5, ""}}); + registryDeDx.add("trackselSec", "track selected sec particles", HistType::kTH1F, {{34, 0.5, 34.5, ""}}); auto htrackSec = registryDeDx.get(HIST("trackselSec")); auto* xSec = htrackSec->GetXaxis(); xSec->SetBinLabel(AllSec, "AllSec"); - xSec->SetBinLabel(V0Type, "V0Type"); xSec->SetBinLabel(V0CosPA, "V0CosPA"); xSec->SetBinLabel(V0DecayRadius, "V0DecayRadius"); xSec->SetBinLabel(V0Daughters, "V0Daughters"); - xSec->SetBinLabel(TPCRefit, "TPCRefit"); xSec->SetBinLabel(PhiVarCutSec, "PhiVarCutSec"); xSec->SetBinLabel(NClTPCFoundCutSec, "NClTPCFoundCutSec"); xSec->SetBinLabel(NClTPCPIDCutSec, "NClTPCPIDCutSec"); xSec->SetBinLabel(AllK0s, "AllK0s"); + xSec->SetBinLabel(SingleTrackSelectionK0s, "SingleTrackSelectionK0s"); + xSec->SetBinLabel(V0TypeK0s, "V0TypeK0s"); + xSec->SetBinLabel(DCAtoVtxK0s, "DCAtoVtxK0s"); + xSec->SetBinLabel(Armenteros, "Armenteros"); xSec->SetBinLabel(V0RapidityK0s, "V0RapidityK0s"); xSec->SetBinLabel(V0ProperLifetimeK0s, "V0ProperLifetimeK0s"); xSec->SetBinLabel(MassCutK0s, "MassCutK0s"); xSec->SetBinLabel(AllLambda, "AllLambda"); + xSec->SetBinLabel(SingleTrackSelectionLambda, "SingleTrackSelectionLambda"); + xSec->SetBinLabel(V0TypeLambda, "V0TypeLambda"); + xSec->SetBinLabel(DCAtoVtxLambda, "DCAtoVtxLambda"); xSec->SetBinLabel(V0RapidityLambda, "V0RapidityLambda"); xSec->SetBinLabel(V0ProperLifetimeLambda, "V0ProperLifetimeLambda"); xSec->SetBinLabel(MassCutLambda, "MassCutLambda"); xSec->SetBinLabel(AllAntiLambda, "AllAntiLambda"); + xSec->SetBinLabel(SingleTrackSelectionAntiLambda, "SingleTrackSelectionAntiLambda"); + xSec->SetBinLabel(V0TypeAntiLambda, "V0TypeAntiLambda"); + xSec->SetBinLabel(DCAtoVtxAntiLambda, "DCAtoVtxAntiLambda"); xSec->SetBinLabel(V0RapidityAntiLambda, "V0RapidityAntiLambda"); xSec->SetBinLabel(V0ProperLifetimeAntiLambda, "V0ProperLifetimeAntiLambda"); xSec->SetBinLabel(MassCutAntiLambda, "MassCutAntiLambda"); xSec->SetBinLabel(AllGamma, "AllGamma"); + xSec->SetBinLabel(SingleTrackSelectionGamma, "SingleTrackSelectionGamma"); + xSec->SetBinLabel(V0TypeGamma, "V0TypeGamma"); xSec->SetBinLabel(V0RapidityGamma, "V0RapidityGamma"); xSec->SetBinLabel(MassCutGamma, "MassCutGamma"); - mySelectionPrim = myTrackSelection(); } @@ -684,12 +711,12 @@ struct DedxPidAnalysis { bool passedSingleTrackSelection(const T1& track, const C& /*collision*/) { // Single-Track Selections - if (!track.hasTPC()) - return false; + // if (!track.hasTPC()) + // return false; if (track.tpcNClsCrossedRows() < minNCrossedRowsTPC) return false; - if (track.tpcChi2NCl() > maxChi2TPC) - return false; + // if (track.tpcChi2NCl() > maxChi2TPC) + // return false; if (track.eta() < etaMin || track.eta() > etaMax) return false; @@ -727,12 +754,15 @@ struct DedxPidAnalysis { bool passedK0Selection(const T1& v0, const T2& ntrack, const T2& ptrack, const C& collision) { + + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllK0s); // Single-Track Selections if (!passedSingleTrackSelection(ptrack, collision)) return false; if (!passedSingleTrackSelection(ntrack, collision)) return false; - double sigmap = 0.0; + /*double sigmap = 0.0; double sigman = 0.0; if (v0SelectionMode == V0TPC) { @@ -758,23 +788,37 @@ struct DedxPidAnalysis { return false; if (std::abs(sigman) > nsigmaTOFmax) return false; - } + }*/ if (fillHist) - registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllK0s); + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::SingleTrackSelectionK0s); - if (std::abs(v0.yK0Short()) > v0rapidityCut) + if (v0.v0Type() != v0TypeSelection) // V0 type selection + return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0TypeK0s); + + if (std::fabs(v0.dcapostopv()) < dcaPionsFromK0s && std::fabs(v0.dcanegtopv()) < dcaPionsFromK0s) // DCA selection + return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::DCAtoVtxK0s); + + if (armPodCut * v0.qtarm() < std::abs(v0.alpha())) // Armenteros-Podolanski cut + return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::Armenteros); + + if (std::abs(v0.yK0Short()) > v0rapidityCut) // Rapidity selection return false; if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0RapidityK0s); float properLifetime = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; - - if (properLifetime > v0ProperLifetimeCutK0s) + if (properLifetime > v0ProperLifetimeCutK0s) // Proper lifetime return false; if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0ProperLifetimeK0s); - if (std::abs(v0.mK0Short() - MassK0Short) > invMassCutK0s) + if (std::abs(v0.mK0Short() - MassK0Short) > invMassCutK0s) // Invarian mass return false; if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::MassCutK0s); @@ -787,13 +831,16 @@ struct DedxPidAnalysis { bool passedLambdaSelection(const T1& v0, const T2& ntrack, const T2& ptrack, const C& collision) { + + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllLambda); // Single-Track Selections if (!passedSingleTrackSelection(ptrack, collision)) return false; if (!passedSingleTrackSelection(ntrack, collision)) return false; - double sigmap = 0.0; + /*double sigmap = 0.0; double sigman = 0.0; if (v0SelectionMode == V0TPC) { @@ -819,26 +866,34 @@ struct DedxPidAnalysis { return false; if (std::abs(sigman) > nsigmaTOFmax) return false; - } + }*/ + if (fillHist) - registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllLambda); + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::SingleTrackSelectionLambda); - if (std::abs(v0.yLambda()) > v0rapidityCut) + if (v0.v0Type() != v0TypeSelection) // V0 type selection return false; if (fillHist) - registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0RapidityLambda); + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0TypeLambda); - float properLifetime = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassLambda; + if (std::fabs(v0.dcapostopv()) < dcaProtonsFromLambda && std::fabs(v0.dcanegtopv()) < dcaPionsFromLambda) // DCA selection + return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::DCAtoVtxLambda); - if (properLifetime > v0ProperLifetimeCutLambda) + if (std::abs(v0.yLambda()) > v0rapidityCut) // Rapidity selection return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0RapidityLambda); + float properLifetime = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassLambda; + if (properLifetime > v0ProperLifetimeCutLambda) // Proper lifetime + return false; if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0ProperLifetimeLambda); - if (std::abs(v0.mLambda() - MassLambda) > invMassCutLambda) { + if (std::abs(v0.mLambda() - MassLambda) > invMassCutLambda) // Invarian mass return false; - } if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::MassCutLambda); @@ -850,13 +905,15 @@ struct DedxPidAnalysis { bool passedAntiLambdaSelection(const T1& v0, const T2& ntrack, const T2& ptrack, const C& collision) { + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllAntiLambda); // Single-Track Selections if (!passedSingleTrackSelection(ptrack, collision)) return false; if (!passedSingleTrackSelection(ntrack, collision)) return false; - double sigmap = 0.0; + /*double sigmap = 0.0; double sigman = 0.0; if (v0SelectionMode == V0TPC) { @@ -881,27 +938,35 @@ struct DedxPidAnalysis { return false; if (std::abs(sigman) > nsigmaTOFmax) return false; - } + }*/ + if (fillHist) - registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllAntiLambda); + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::SingleTrackSelectionAntiLambda); - if (std::abs(v0.yLambda()) > v0rapidityCut) + // Select V0 type + if (v0.v0Type() != v0TypeSelection) // V0 type selection return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0TypeAntiLambda); + if (std::fabs(v0.dcapostopv()) < dcaPionsFromLambda && std::fabs(v0.dcanegtopv()) < dcaProtonsFromLambda) // DCA selection + return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::DCAtoVtxAntiLambda); + + if (std::abs(v0.yLambda()) > v0rapidityCut) // Rapidity selection + return false; if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0RapidityAntiLambda); float properLifetime = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassLambda; - - if (properLifetime > v0ProperLifetimeCutLambda) + if (properLifetime > v0ProperLifetimeCutLambda) // Proper lifetime return false; - if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0ProperLifetimeAntiLambda); - if (std::abs(v0.mAntiLambda() - MassLambda) > invMassCutLambda) + if (std::abs(v0.mAntiLambda() - MassLambda) > invMassCutLambda) // Invarian mass return false; - if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::MassCutAntiLambda); @@ -913,13 +978,16 @@ struct DedxPidAnalysis { bool passedGammaSelection(const T1& v0, const T2& ntrack, const T2& ptrack, const C& collision) { + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllGamma); + // Single-Track Selections if (!passedSingleTrackSelection(ptrack, collision)) return false; if (!passedSingleTrackSelection(ntrack, collision)) return false; - double sigmap = 0.0; + /*double sigmap = 0.0; double sigman = 0.0; if (v0SelectionMode == V0TPC) { @@ -945,23 +1013,25 @@ struct DedxPidAnalysis { return false; if (std::abs(sigman) > nsigmaTOFmax) return false; - } + }*/ const float gammaMass = 2 * MassElectron; // GeV/c^2 if (fillHist) - registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllGamma); - - const float yGamma = RecoDecay::y(std::array{v0.px(), v0.py(), v0.pz()}, MassGamma); + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::SingleTrackSelectionGamma); - if (std::abs(yGamma) > v0rapidityCut) + if (v0.v0Type() != v0TypeSelectionGamma) // V0 type selection return false; + if (fillHist) + registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0TypeGamma); + const float yGamma = RecoDecay::y(std::array{v0.px(), v0.py(), v0.pz()}, MassGamma); + if (std::abs(yGamma) > v0rapidityCut) // Rapidity selection + return false; if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0RapidityGamma); - if (std::abs(v0.mGamma() - gammaMass) > invMassCutGamma) + if (std::abs(v0.mGamma() - gammaMass) > invMassCutGamma) // Invarian mass return false; - if (fillHist) registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::MassCutGamma); @@ -1539,12 +1609,6 @@ struct DedxPidAnalysis { // Standard V0 Selections registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::AllSec); - // Select V0 type - if (v0.v0Type() != v0TypeSelection) - continue; - - registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::V0Type); - if (!passedV0Selection(v0, collision)) { continue; } @@ -1553,13 +1617,13 @@ struct DedxPidAnalysis { const auto& posTrack = v0.posTrack_as(); const auto& negTrack = v0.negTrack_as(); - if (!posTrack.passedTPCRefit()) + /*if (!posTrack.passedTPCRefit()) continue; if (!negTrack.passedTPCRefit()) - continue; + continue;*/ - registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::TPCRefit); - // phi and Ncl cut + // registryDeDx.fill(HIST("trackselSec"), TrkSecCutLabel::TPCRefit); + // phi and Ncl cut if (phiVarCut) { if (!passedPhiCutSecondaries(posTrack, magField, *fphiCutLow, *fphiCutHigh)) continue;