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
45 changes: 43 additions & 2 deletions PWGHF/D2H/Tasks/taskCd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ DECLARE_SOA_COLUMN(NSigmaTpcKa, nSigmaTpcKa, float); //! TPC nσ
DECLARE_SOA_COLUMN(NSigmaTpcPi, nSigmaTpcPi, float); //! TPC nσ for pion hypothesis
DECLARE_SOA_COLUMN(NSigmaItsDe, nSigmaItsDe, float); //! ITS nσ for deuteron hypothesis
DECLARE_SOA_COLUMN(NSigmaTofDe, nSigmaTofDe, float); //! TOF nσ for deuteron hypothesis
DECLARE_SOA_COLUMN(TofBetaDe, tofBetaDe, float); //! TOF beta for deuteron candidate
DECLARE_SOA_COLUMN(TpcInnerParamDe, tpcInnerParamDe, float); //! TPC inner-wall momentum for deuteron candidate (GeV/c)
DECLARE_SOA_COLUMN(TofExpMomDe, tofExpMomDe, float); //! TOF expected momentum for deuteron candidate (GeV/c)
DECLARE_SOA_COLUMN(NSigmaTofKa, nSigmaTofKa, float); //! TOF nσ for kaon hypothesis
DECLARE_SOA_COLUMN(NSigmaTofPi, nSigmaTofPi, float); //! TOF nσ for pion hypothesis
DECLARE_SOA_COLUMN(NItsClusters, nItsClusters, float); //! Number of ITS clusters used in the track fit
Expand Down Expand Up @@ -145,6 +148,9 @@ DECLARE_SOA_TABLE(HfCandCdLite, "AOD", "HFCANDCDLITE",
full::NSigmaTpcPr,
full::NSigmaItsDe,
full::NSigmaTofDe,
full::TofBetaDe,
full::TpcInnerParamDe,
full::TofExpMomDe,
full::CtRec,
full::CandidateSelFlag,
full::CandidateSign,
Expand Down Expand Up @@ -175,6 +181,9 @@ DECLARE_SOA_TABLE(HfCandCdFull, "AOD", "HFCANDCDFULL",
full::NSigmaTpcPr,
full::NSigmaItsDe,
full::NSigmaTofDe,
full::TofBetaDe,
full::TpcInnerParamDe,
full::TofExpMomDe,
full::NSigmaTpcPi,
full::NSigmaTofPi,
full::NSigmaTpcKa,
Expand Down Expand Up @@ -235,8 +244,8 @@ struct HfTaskCd {
using CdCandidates = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelCd, aod::HfCand3ProngWPidPiKaDe>>;
using CdCandidatesMc = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelCd, aod::HfCand3ProngWPidPiKaDe, aod::HfCand3ProngMcRec>>;
using McParticles3ProngMatched = soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>;
using HFTracks = soa::Join<aod::FullTracks, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullDe, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullDe>;
using HFTracksMc = soa::Join<aod::FullTracks, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullDe, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullDe, aod::McTrackLabels>;
using HFTracks = soa::Join<aod::FullTracks, aod::TracksDCA, aod::pidTOFbeta, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullDe, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullDe>;
using HFTracksMc = soa::Join<aod::FullTracks, aod::TracksDCA, aod::pidTOFbeta, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullDe, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullDe, aod::McTrackLabels>;

Filter filterSelectCandidates = aod::hf_sel_candidate_cd::isSelCdToDeKPi >= selectionFlagCd || aod::hf_sel_candidate_cd::isSelCdToPiKDe >= selectionFlagCd;
Preslice<aod::HfCand3Prong> candCdPerCollision = aod::hf_cand::collisionId;
Expand Down Expand Up @@ -518,13 +527,18 @@ struct HfTaskCd {
float nSigmaTpcDe = 0.f, nSigmaTpcKa = 0.f, nSigmaTpcPi = 0.f, nSigmaTpcPr = 0.f;
float nSigmaItsDe = 0.f;
float nSigmaTofDe = 0.f, nSigmaTofKa = 0.f, nSigmaTofPi = 0.f;
float tofBetaDe = -999.f;
float tpcInnerParamDe = -999.f;
float tofExpMomDe = -999.f;

float dcaDeuteron = 0.f, dcaKaon = 0.f, dcaPion = 0.f;

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

auto prong0 = candidate.template prong0_as<HFTracksMc>();
auto prong1 = candidate.template prong1_as<HFTracksMc>();
auto prong2 = candidate.template prong2_as<HFTracksMc>();

auto prong0Its = tracksWithItsPid.iteratorAt(candidate.prong0Id() - tracksWithItsPid.offset());
auto prong2Its = tracksWithItsPid.iteratorAt(candidate.prong2Id() - tracksWithItsPid.offset());
Expand All @@ -540,6 +554,9 @@ struct HfTaskCd {
nSigmaTpcDe = candidate.nSigTpcDe0();
nSigmaTpcPr = candidate.nSigTpcPr0();
nSigmaTofDe = candidate.nSigTofDe0();
tofBetaDe = (prong0.hasTOF() && prong0.beta() > 0.f) ? prong0.beta() : -999.f;
tpcInnerParamDe = prong0.tpcInnerParam();
tofExpMomDe = prong0.hasTOF() ? prong0.tofExpMom() : -999.f;
nSigmaTpcPi = candidate.nSigTpcPi2();
nSigmaTofPi = candidate.nSigTofPi2();
nSigmaItsDe = prong0Its.itsNSigmaDe();
Expand All @@ -553,6 +570,9 @@ struct HfTaskCd {
nSigmaTpcDe = candidate.nSigTpcDe2();
nSigmaTpcPr = candidate.nSigTpcPr2();
nSigmaTofDe = candidate.nSigTofDe2();
tofBetaDe = (prong2.hasTOF() && prong2.beta() > 0.f) ? prong2.beta() : -999.f;
tpcInnerParamDe = prong2.tpcInnerParam();
tofExpMomDe = prong2.hasTOF() ? prong2.tofExpMom() : -999.f;
nSigmaTpcPi = candidate.nSigTpcPi0();
nSigmaTofPi = candidate.nSigTofPi0();
nSigmaItsDe = prong2Its.itsNSigmaDe();
Expand Down Expand Up @@ -591,6 +611,9 @@ struct HfTaskCd {
nSigmaTpcPr,
nSigmaItsDe,
nSigmaTofDe,
tofBetaDe,
tpcInnerParamDe,
tofExpMomDe,
candidate.ct(o2::constants::physics::MassCDeuteron) * cmToMum,
candFlag,
candSign,
Expand Down Expand Up @@ -622,6 +645,9 @@ struct HfTaskCd {
nSigmaTpcPr,
nSigmaItsDe,
nSigmaTofDe,
tofBetaDe,
tpcInnerParamDe,
tofExpMomDe,
nSigmaTpcPi,
nSigmaTofPi,
nSigmaTpcKa,
Expand Down Expand Up @@ -833,6 +859,9 @@ struct HfTaskCd {
float nSigmaTpcDe = 0.f, nSigmaTpcKa = 0.f, nSigmaTpcPi = 0.f, nSigmaTpcPr = 0.f;
float nSigmaItsDe = 0.f;
float nSigmaTofDe = 0.f, nSigmaTofKa = 0.f, nSigmaTofPi = 0.f;
float tofBetaDe = -999.f;
float tpcInnerParamDe = -999.f;
float tofExpMomDe = -999.f;

float dcaDeuteron = 0.f, dcaKaon = 0.f, dcaPion = 0.f;
// int itsNClusterSizeDe = 0;
Expand Down Expand Up @@ -870,6 +899,9 @@ struct HfTaskCd {
nSigmaTpcDe = candidate.nSigTpcDe0();
nSigmaTpcPr = candidate.nSigTpcPr0();
nSigmaTofDe = candidate.nSigTofDe0();
tofBetaDe = (prong0.hasTOF() && prong0.beta() > 0.f) ? prong0.beta() : -999.f;
tpcInnerParamDe = prong0.tpcInnerParam();
tofExpMomDe = prong0.hasTOF() ? prong0.tofExpMom() : -999.f;
nSigmaTpcPi = candidate.nSigTpcPi2();
nSigmaTofPi = candidate.nSigTofPi2();
nSigmaItsDe = prong0Its.itsNSigmaDe();
Expand All @@ -888,6 +920,9 @@ struct HfTaskCd {
nSigmaTpcDe = candidate.nSigTpcDe2();
nSigmaTpcPr = candidate.nSigTpcPr2();
nSigmaTofDe = candidate.nSigTofDe2();
tofBetaDe = (prong2.hasTOF() && prong2.beta() > 0.f) ? prong2.beta() : -999.f;
tpcInnerParamDe = prong2.tpcInnerParam();
tofExpMomDe = prong2.hasTOF() ? prong2.tofExpMom() : -999.f;
nSigmaTpcPi = candidate.nSigTpcPi0();
nSigmaTofPi = candidate.nSigTofPi0();
nSigmaItsDe = prong2Its.itsNSigmaDe();
Expand Down Expand Up @@ -945,6 +980,9 @@ struct HfTaskCd {
nSigmaTpcPr,
nSigmaItsDe,
nSigmaTofDe,
tofBetaDe,
tpcInnerParamDe,
tofExpMomDe,
candidate.ct(o2::constants::physics::MassCDeuteron),
candFlag,
candSign,
Expand Down Expand Up @@ -977,6 +1015,9 @@ struct HfTaskCd {
nSigmaTpcPr,
nSigmaItsDe,
nSigmaTofDe,
tofBetaDe,
tpcInnerParamDe,
tofExpMomDe,
nSigmaTpcPi,
nSigmaTofPi,
nSigmaTpcKa,
Expand Down
Loading