Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions PWGHF/D2H/Tasks/taskCd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or submit itself to any jurisdiction.

/// \file taskCd.cxx
/// \brief Cd± → d± K∓ π± analysis task
/// \brief cd± → d± K∓ π± analysis task
/// \author Biao Zhang <biao.zhang@cern.ch>, Heidelberg Universiity

#include "PWGHF/Core/CentralityEstimation.h"
Expand Down Expand Up @@ -175,6 +175,10 @@ struct HfTaskCd {
Configurable<bool> fillTHn{"fillTHn", false, "fill THn"};
Configurable<bool> fillCandLiteTree{"fillCandLiteTree", false, "Flag to fill candiates lite tree"};
Configurable<bool> fillCandFullTree{"fillCandFullTree", false, "Flag to fill candiates full tree"};
Configurable<bool> cfgUseTofPidForDeuteron{"cfgUseTofPidForDeuteron", false, "Use TOF PID for deuteron candidates"};
Configurable<bool> cfgCutOnDeuteronDcaOrdering{"cfgCutOnDeuteronDcaOrdering", false, "Require deuteron DCA to be smaller than kaon and pion DCAs"};
Configurable<float> cfgMinDeuteronDcaPreselection{"cfgMinDeuteronDcaPreselection", 0.004, "Minimum deuteron DCA for preselection (cm)"};
Configurable<float> cfgMaxDeuteronTofPidPreselection{"cfgMaxDeuteronTofPidPreselection", 5, "Maximum |nSigma TOF| for deuteron preselection"};

SliceCache cache;

Expand Down Expand Up @@ -406,6 +410,7 @@ struct HfTaskCd {
float nSigmaItsDe = 0.f;
float nSigmaTofDe = 0.f, nSigmaTofKa = 0.f, nSigmaTofPi = 0.f;

float dcaDeuteron = 0.f, dcaKaon = 0.f, dcaPion = 0.f;
// int itsNClusterSizeDe = 0;

float tpcSignalsDe = 0.f;
Expand All @@ -420,8 +425,8 @@ struct HfTaskCd {
nSigmaTpcKa = candidate.nSigTpcKa1();
nSigmaTofKa = candidate.nSigTofKa1();

const bool selDeKPi = (candidate.isSelCdToDeKPi() >= 1);
const bool selPiKDe = (candidate.isSelCdToPiKDe() >= 1);
const bool selDeKPi = (candidate.isSelCdToDeKPi() >= selectionFlagCd);
const bool selPiKDe = (candidate.isSelCdToPiKDe() >= selectionFlagCd);

auto prong0 = candidate.template prong0_as<TrackType>();
auto prong1 = candidate.template prong1_as<TrackType>();
Expand All @@ -446,6 +451,10 @@ struct HfTaskCd {
tpcSignalsDe = prong0.tpcSignal();
tpcSignalsPi = prong2.tpcSignal();
itsSignalsDe = itsSignal(prong0);

dcaDeuteron = candidate.impactParameter0();
dcaKaon = candidate.impactParameter1();
dcaPion = candidate.impactParameter2();
} else if (selPiKDe) {
candFlag = -1;
pSignedDe = prong2.tpcInnerParam() * prong2.sign();
Expand All @@ -460,6 +469,10 @@ struct HfTaskCd {
tpcSignalsDe = prong2.tpcSignal();
tpcSignalsPi = prong0.tpcSignal();
itsSignalsDe = itsSignal(prong2);

dcaDeuteron = candidate.impactParameter2();
dcaKaon = candidate.impactParameter1();
dcaPion = candidate.impactParameter0();
}

// PID QA
Expand All @@ -476,6 +489,15 @@ struct HfTaskCd {
registry.fill(HIST("Data/hNsigmaTPCKaVsP"), prong1.tpcInnerParam() * prong1.sign(), nSigmaTpcKa);
registry.fill(HIST("Data/hNsigmaTOFKaVsP"), prong1.tpcInnerParam() * prong1.sign(), nSigmaTofKa);

if (cfgUseTofPidForDeuteron && std::abs(nSigmaTofDe) > cfgMaxDeuteronTofPidPreselection) {
continue;
}
if (std::abs(dcaDeuteron) < cfgMinDeuteronDcaPreselection) {
continue;
}
if (cfgCutOnDeuteronDcaOrdering && (std::abs(dcaDeuteron) > std::abs(dcaKaon) || std::abs(dcaDeuteron) > std::abs(dcaPion))) {
continue;
}
if (fillCandLiteTree) {

rowCandCdLite(
Expand Down
Loading