diff --git a/PWGLF/Tasks/Nuspex/spectraTOF.cxx b/PWGLF/Tasks/Nuspex/spectraTOF.cxx index 458ed357b7e..39f48f62dc4 100644 --- a/PWGLF/Tasks/Nuspex/spectraTOF.cxx +++ b/PWGLF/Tasks/Nuspex/spectraTOF.cxx @@ -127,8 +127,10 @@ struct tofSpectra { struct : ConfigurableGroup { Configurable cfgCutEtaMax{"cfgCutEtaMax", 0.8f, "Max eta range for tracks"}; + Configurable cfgCutdcaZMax{"cfgCutdcaZMax", 0.02f, "Max dcaZ range for tracks"}; Configurable cfgCutNsigma{"cfgCutNsigma", 100.0f, "nsigma cut range for tracks"}; Configurable cfgCutEtaMin{"cfgCutEtaMin", -0.8f, "Min eta range for tracks"}; + Configurable cfgCutdcaZMin{"cfgCutdcaZMin", -0.02f, "Min dcaZ range for tracks"}; Configurable cfgCutY{"cfgCutY", 0.5f, "Y range for tracks"}; Configurable lastRequiredTrdCluster{"lastRequiredTrdCluster", 5, "Last cluster to require in TRD for track selection. -1 does not require any TRD cluster"}; Configurable requireTrdOnly{"requireTrdOnly", false, "Require only tracks from TRD"}; @@ -175,7 +177,7 @@ struct tofSpectra { Configurable minChi2PerClusterTPC{"minChi2PerClusterTPC", 0.5f, "Additional cut on the minimum value of the chi2 per cluster in the TPC"}; Configurable maxChi2PerClusterITS{"maxChi2PerClusterITS", 36.f, "Additional cut on the maximum value of the chi2 per cluster in the ITS"}; Configurable maxDcaXYFactor{"maxDcaXYFactor", 1.f, "Additional cut on the maximum value of the DCA xy (multiplicative factor)"}; - Configurable maxDcaZ{"maxDcaZ", 2.f, "Additional cut on the maximum value of the DCA z"}; + Configurable maxDcaZ{"maxDcaZ", 0.02f, "Additional cut on the maximum value of the DCA z"}; Configurable minTPCNClsFound{"minTPCNClsFound", 100.f, "Additional cut on the minimum value of the number of found clusters in the TPC"}; Configurable makeTHnSparseChoice{"makeTHnSparseChoice", false, "choose if produce thnsparse"}; // RD Configurable enableTPCTOFvsEtaHistograms{"enableTPCTOFvsEtaHistograms", false, "choose if produce TPC tof vs Eta"}; @@ -263,7 +265,7 @@ struct tofSpectra { LOG(info) << "\tminITSnClusters=" << minITSnClusters.value; LOG(info) << "\tminTPCNClsFound=" << minTPCNClsFound.value; LOG(info) << "\tmaxChi2PerClusterITS=" << maxChi2PerClusterITS.value; - LOG(info) << "\tmaxDcaZ=" << maxDcaZ.value; + LOG(info) << "\tmaxDcaZ=" << maxDcaZ; LOG(info) << "\tmakeTHnSparseChoice=" << makeTHnSparseChoice.value; customTrackCuts = getGlobalTrackSelectionRun3ITSMatch(itsPattern.value); @@ -278,7 +280,7 @@ struct tofSpectra { customTrackCuts.SetMinNClustersTPC(minTPCNClsFound.value); customTrackCuts.SetMinNCrossedRowsOverFindableClustersTPC(minNCrossedRowsOverFindableClustersTPC.value); customTrackCuts.SetMaxDcaXYPtDep([](float /*pt*/) { return 10000.f; }); // No DCAxy cut will be used, this is done via the member function of the task - customTrackCuts.SetMaxDcaZ(maxDcaZ.value); + customTrackCuts.SetMaxDcaZ(maxDcaZ); customTrackCuts.print(); } // Histograms @@ -757,7 +759,7 @@ struct tofSpectra { if (enableDCAxyzHistograms) { hDcaXYZ[i] = histos.add(Form("dca/%s/%s", (i < Np) ? "pos" : "neg", pN[i % Np]), pTCharge[i], kTH3D, {ptAxis, dcaXyAxis, dcaZAxis}); } else { - histos.add(hdcaxy[i].data(), pTCharge[i], kTH2D, {ptAxis, dcaXyAxis}); + histos.add(hdcaxy[i].data(), pTCharge[i], kTH3D, {ptAxis, dcaXyAxis, multAxis}); histos.add(hdcaz[i].data(), pTCharge[i], kTH2D, {ptAxis, dcaZAxis}); } @@ -1127,7 +1129,7 @@ struct tofSpectra { } } else { if (track.sign() > 0) { - histos.fill(HIST(hdcaxy[id]), track.pt(), track.dcaXY()); + histos.fill(HIST(hdcaxy[id]), track.pt(), track.dcaXY(), multiplicity); histos.fill(HIST(hdcaz[id]), track.pt(), track.dcaZ()); if (isInPtRangeForPhi) { if (enableDCAxyphiHistograms) { @@ -1135,7 +1137,7 @@ struct tofSpectra { } } } else { - histos.fill(HIST(hdcaxy[id + Np]), track.pt(), track.dcaXY()); + histos.fill(HIST(hdcaxy[id + Np]), track.pt(), track.dcaXY(), multiplicity); histos.fill(HIST(hdcaz[id + Np]), track.pt(), track.dcaZ()); if (isInPtRangeForPhi) { if (enableDCAxyphiHistograms) { @@ -1305,6 +1307,9 @@ struct tofSpectra { if (track.eta() < trkselOptions.cfgCutEtaMin || track.eta() > trkselOptions.cfgCutEtaMax) { return false; } + if (track.dcaZ() < trkselOptions.cfgCutdcaZMin || track.dcaZ() > trkselOptions.cfgCutdcaZMax) { + return false; + } if constexpr (fillHistograms) { histos.fill(HIST("tracksel"), 2); if (enableTrackCutHistograms) {