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
42 changes: 23 additions & 19 deletions PWGHF/D2H/Tasks/taskCd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ namespace full
// Candidate kinematics
DECLARE_SOA_COLUMN(M, m, float); //! Invariant mass of candidate (GeV/c^2)
DECLARE_SOA_COLUMN(Pt, pt, float); //! Transverse momentum of candidate (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! eta of candidate (GeV/c)
DECLARE_SOA_COLUMN(Phi, phi, float); //! phi of candidate (GeV/c)
DECLARE_SOA_COLUMN(PtProng0, ptProng0, float); //! Transverse momentum of prong 0 (GeV/c)
DECLARE_SOA_COLUMN(PtProng1, ptProng1, float); //! Transverse momentum of prong 1 (GeV/c)
DECLARE_SOA_COLUMN(PtProng2, ptProng2, float); //! Transverse momentum of prong 2 (GeV/c)
Expand Down Expand Up @@ -100,6 +102,8 @@ DECLARE_SOA_COLUMN(TimeStamp, timeStamp, int64_t); //! Timestamp fo
DECLARE_SOA_TABLE(HfCandCd, "AOD", "HFCANDCD",
full::M,
full::Pt,
full::Eta,
full::Phi,
full::PtProng0,
full::PtProng1,
full::PtProng2,
Expand All @@ -120,9 +124,7 @@ DECLARE_SOA_TABLE(HfCandCd, "AOD", "HFCANDCD",
full::NTpcSignalsKa,
full::NItsSignalsDe,
full::CandidateSelFlag,
full::Cent,
full::GIndexCol,
full::TimeStamp);
full::Cent);
} // namespace o2::aod

struct HfTaskCd {
Expand Down Expand Up @@ -268,15 +270,17 @@ struct HfTaskCd {
auto thisCollId = collision.globalIndex();
auto groupedCdCandidates = candidates.sliceBy(candCdPerCollision, thisCollId);
auto numPvContributors = collision.numContrib();
auto bc = collision.template bc_as<BcType>();
int64_t timeStamp = bc.timestamp();
// auto bc = collision.template bc_as<BcType>();
// int64_t timeStamp = bc.timestamp();

for (const auto& candidate : groupedCdCandidates) {
if (!TESTBIT(candidate.hfflag(), aod::hf_cand_3prong::DecayType::CdToDeKPi)) {
continue;
}

const auto pt = candidate.pt();
const auto eta = candidate.eta();
const auto phi = candidate.phi();
const auto ptProng0 = candidate.ptProng0();
const auto ptProng1 = candidate.ptProng1();
const auto ptProng2 = candidate.ptProng2();
Expand Down Expand Up @@ -323,10 +327,10 @@ struct HfTaskCd {
registry.fill(HIST("Data/hCPAxyVsPt"), cpaXY, pt);
registry.fill(HIST("Data/hDca2"), chi2PCA);
registry.fill(HIST("Data/hDca2VsPt"), chi2PCA, pt);
registry.fill(HIST("Data/hEta"), candidate.eta());
registry.fill(HIST("Data/hEtaVsPt"), candidate.eta(), pt);
registry.fill(HIST("Data/hPhi"), candidate.phi());
registry.fill(HIST("Data/hPhiVsPt"), candidate.phi(), pt);
registry.fill(HIST("Data/hEta"), eta);
registry.fill(HIST("Data/hEtaVsPt"), eta, pt);
registry.fill(HIST("Data/hPhi"), phi);
registry.fill(HIST("Data/hPhiVsPt"), phi, pt);
registry.fill(HIST("hSelectionStatus"), candidate.isSelCdToDeKPi(), pt);
registry.fill(HIST("hSelectionStatus"), candidate.isSelCdToPiKDe(), pt);
registry.fill(HIST("Data/hImpParErrProng0"), candidate.errorImpactParameter0(), pt);
Expand Down Expand Up @@ -386,8 +390,8 @@ struct HfTaskCd {

if (selDeKPi) {
candFlag = 1;
pSignedDe = prong0.p() * prong0.sign();
pSignedPi = prong2.p() * prong2.sign();
pSignedDe = prong0.tpcInnerParam() * prong0.sign();
pSignedPi = prong2.tpcInnerParam() * prong2.sign();
nSigmaTpcDe = candidate.nSigTpcDe0();
nSigmaTofDe = candidate.nSigTofDe0();
nSigmaTpcPi = candidate.nSigTpcPi2();
Expand All @@ -401,8 +405,8 @@ struct HfTaskCd {
itsSignalsDe = itsSignal(prong0);
} else if (selPiKDe) {
candFlag = -1;
pSignedDe = prong2.p() * prong2.sign();
pSignedPi = prong0.p() * prong0.sign();
pSignedDe = prong2.tpcInnerParam() * prong2.sign();
pSignedPi = prong0.tpcInnerParam() * prong0.sign();
nSigmaTpcDe = candidate.nSigTpcDe2();
nSigmaTofDe = candidate.nSigTofDe2();
nSigmaTpcPi = candidate.nSigTpcPi0();
Expand All @@ -422,16 +426,18 @@ struct HfTaskCd {
registry.fill(HIST("Data/hNsigmaITSDeVsP"), pSignedDe, nSigmaItsDe);
registry.fill(HIST("Data/hTPCSignalDeVsP"), pSignedDe, tpcSignalsDe);
registry.fill(HIST("Data/hTPCSignalPiVsP"), pSignedPi, tpcSignalsPi);
registry.fill(HIST("Data/hTPCSignalKaVsP"), prong1.p() * prong1.sign(), tpcSignalsKa);
registry.fill(HIST("Data/hTPCSignalKaVsP"), prong1.tpcInnerParam() * prong1.sign(), tpcSignalsKa);
registry.fill(HIST("Data/hITSSignalDeVsP"), pSignedDe, itsSignalsDe);
registry.fill(HIST("Data/hNsigmaTPCPiVsP"), pSignedPi, nSigmaTpcPi);
registry.fill(HIST("Data/hNsigmaTOFPiVsP"), pSignedPi, nSigmaTofPi);
registry.fill(HIST("Data/hNsigmaTPCKaVsP"), prong1.p() * prong1.sign(), nSigmaTpcKa);
registry.fill(HIST("Data/hNsigmaTOFKaVsP"), prong1.p() * prong1.sign(), nSigmaTofKa);
registry.fill(HIST("Data/hNsigmaTPCKaVsP"), prong1.tpcInnerParam() * prong1.sign(), nSigmaTpcKa);
registry.fill(HIST("Data/hNsigmaTOFKaVsP"), prong1.tpcInnerParam() * prong1.sign(), nSigmaTofKa);

rowCandCd(
invMassCd,
pt,
eta,
phi,
ptProng0,
ptProng1,
ptProng2,
Expand All @@ -452,9 +458,7 @@ struct HfTaskCd {
tpcSignalsKa,
itsSignalsDe,
candFlag,
cent,
collision.globalIndex(),
timeStamp);
cent);
}
}
}
Expand Down
Loading