Skip to content

Commit 30f81d0

Browse files
authored
[PWGLF] Fix signal check for hypertriton kink and add column for datamodel (#12422)
1 parent bbf9857 commit 30f81d0

File tree

2 files changed

+47
-17
lines changed

2 files changed

+47
-17
lines changed

PWGLF/DataModel/LFHyperNucleiKinkTables.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ DECLARE_SOA_TABLE(HypKinkCand, "AOD", "HYPKINKCANDS",
9595
hyperkink::PxDaugSV, hyperkink::PyDaugSV, hyperkink::PzDaugSV,
9696
hyperkink::DcaMothPv, hyperkink::DcaDaugPv, hyperkink::DcaKinkTopo,
9797
hyperkink::ItsChi2Moth, hyperkink::ItsClusterSizesMoth, hyperkink::ItsClusterSizesDaug,
98-
hyperkink::NSigmaTPCDaug, hyperkink::NSigmaITSDaug, hyperkink::NSigmaTOFDaug);
98+
hyperkink::NSigmaTPCDaug, hyperkink::NSigmaITSDaug, hyperkink::NSigmaTOFDaug,
99+
hyperkink::PxMothPV, hyperkink::PyMothPV, hyperkink::PzMothPV,
100+
hyperkink::UpdatePxMothPV, hyperkink::UpdatePyMothPV, hyperkink::UpdatePzMothPV);
99101

100102
DECLARE_SOA_TABLE(MCHypKinkCand, "AOD", "MCHYPKINKCANDS",
101103
o2::soa::Index<>,

PWGLF/TableProducer/Nuspex/hyperkinkRecoTask.cxx

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -458,19 +458,22 @@ struct HyperkinkRecoTask {
458458
const AxisSpec vertexZAxis{100, -15., 15., "vtx_{Z} [cm]"};
459459
const AxisSpec ptAxis{50, -10, 10, "#it{p}_{T} (GeV/#it{c})"};
460460
const AxisSpec nSigmaAxis{120, -6.f, 6.f, "n#sigma"};
461-
const AxisSpec massAxis{100, 3.85, 4.25, "m (GeV/#it{c}^{2})"};
461+
AxisSpec massAxis(100, 2.94, 3.2, "m (GeV/#it{c}^{2})");
462+
if (hypoMoth == kHyperhelium4sigma) {
463+
massAxis = AxisSpec{100, 3.85, 4.25, "m (GeV/#it{c}^{2})"};
464+
}
462465
const AxisSpec diffPtAxis{200, -10.f, 10.f, "#Delta #it{p}_{T} (GeV/#it{c})"};
463466
const AxisSpec diffPzAxis{200, -10.f, 10.f, "#Delta #it{p}_{z} (GeV/#it{c})"};
464467
const AxisSpec radiusAxis{40, 0.f, 40.f, "R (cm)"};
465468

466469
registry.add<TH1>("hEventCounter", "hEventCounter", HistType::kTH1F, {{2, 0, 2}});
467470
registry.add<TH1>("hVertexZCollision", "hVertexZCollision", HistType::kTH1F, {vertexZAxis});
468-
registry.add<TH1>("hCandidateCounter", "hCandidateCounter", HistType::kTH1F, {{3, 0, 3}});
471+
registry.add<TH1>("hCandidateCounter", "hCandidateCounter", HistType::kTH1F, {{4, 0, 4}});
469472

470473
if (doprocessMC == true) {
471474
itsResponse.setMCDefaultParameters();
472475

473-
registry.add<TH1>("hTrueCandidateCounter", "hTrueCandidateCounter", HistType::kTH1F, {{3, 0, 3}});
476+
registry.add<TH1>("hTrueCandidateCounter", "hTrueCandidateCounter", HistType::kTH1F, {{4, 0, 4}});
474477
registry.add<TH1>("hDiffSVx", ";#Delta x (cm);", HistType::kTH1F, {{200, -10, 10}});
475478
registry.add<TH1>("hDiffSVy", ";#Delta y (cm);", HistType::kTH1F, {{200, -10, 10}});
476479
registry.add<TH1>("hDiffSVz", ";#Delta z (cm);", HistType::kTH1F, {{200, -10, 10}});
@@ -663,8 +666,6 @@ struct HyperkinkRecoTask {
663666
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
664667
initCCDB(bc);
665668
auto motherTrack = kinkCand.trackMoth_as<FullTracksExtIU>();
666-
HypKinkCandidate hypkinkCand;
667-
fillCandidate(hypkinkCand, collision, kinkCand, motherTrack, daugTrack);
668669
float nSigmaTOF = -999.f;
669670
if (daugTrack.hasTOF() && daugTrack.has_collision()) {
670671
auto originalDaugCol = daugTrack.collision_as<CollisionsFull>();
@@ -673,6 +674,10 @@ struct HyperkinkRecoTask {
673674
if (std::abs(nSigmaTOF) > cutTOFNSigmaDaug) {
674675
continue;
675676
}
677+
678+
registry.fill(HIST("hCandidateCounter"), 2);
679+
HypKinkCandidate hypkinkCand;
680+
fillCandidate(hypkinkCand, collision, kinkCand, motherTrack, daugTrack);
676681
hypkinkCand.nSigmaTOFDaug = nSigmaTOF;
677682

678683
o2::dataformats::VertexBase primaryVtx = {{collision.posX(), collision.posY(), collision.posZ()}, {collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ()}};
@@ -698,7 +703,9 @@ struct HyperkinkRecoTask {
698703
hypkinkCand.momDaugSV[0], hypkinkCand.momDaugSV[1], hypkinkCand.momDaugSV[2],
699704
hypkinkCand.dcaXYMothPv, hypkinkCand.dcaXYDaugPv, hypkinkCand.dcaKinkTopo,
700705
hypkinkCand.chi2ITSMoth, hypkinkCand.itsClusterSizeMoth, hypkinkCand.itsClusterSizeDaug,
701-
hypkinkCand.nSigmaTPCDaug, hypkinkCand.nSigmaITSDaug, hypkinkCand.nSigmaTOFDaug);
706+
hypkinkCand.nSigmaTPCDaug, hypkinkCand.nSigmaITSDaug, hypkinkCand.nSigmaTOFDaug,
707+
hypkinkCand.momMothPV[0], hypkinkCand.momMothPV[1], hypkinkCand.momMothPV[2],
708+
hypkinkCand.updateMomMothPV[0], hypkinkCand.updateMomMothPV[1], hypkinkCand.updateMomMothPV[2]);
702709
}
703710
}
704711
PROCESS_SWITCH(HyperkinkRecoTask, processData, "process data", true);
@@ -773,8 +780,6 @@ struct HyperkinkRecoTask {
773780

774781
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
775782
initCCDB(bc);
776-
HypKinkCandidate hypkinkCand;
777-
fillCandidate(hypkinkCand, collision, kinkCand, motherTrack, daugTrack);
778783
float nSigmaTOF = -999.f;
779784
if (daugTrack.hasTOF() && daugTrack.has_collision()) {
780785
auto originalDaugCol = daugTrack.collision_as<MCLabeledCollisionsFull>();
@@ -791,6 +796,13 @@ struct HyperkinkRecoTask {
791796
if (std::abs(nSigmaTOF) > cutTOFNSigmaDaug) {
792797
continue;
793798
}
799+
registry.fill(HIST("hCandidateCounter"), 3);
800+
if (isKinkSignal) {
801+
registry.fill(HIST("hTrueCandidateCounter"), 3);
802+
}
803+
804+
HypKinkCandidate hypkinkCand;
805+
fillCandidate(hypkinkCand, collision, kinkCand, motherTrack, daugTrack);
794806
hypkinkCand.nSigmaTOFDaug = nSigmaTOF;
795807

796808
std::array<float, 3> posDecVtx = {kinkCand.xDecVtx() + collision.posX(), kinkCand.yDecVtx() + collision.posY(), kinkCand.zDecVtx() + collision.posZ()};
@@ -826,8 +838,6 @@ struct HyperkinkRecoTask {
826838

827839
hypkinkCand.isSignal = true;
828840
hypkinkCand.isSignalReco = true;
829-
hypkinkCand.isCollReco = true;
830-
hypkinkCand.isSurvEvSelection = true;
831841
fillCandidateMCInfo(hypkinkCand, mcMothTrack, mcDaugTrack, mcNeutTrack);
832842
mcPartIndices.push_back(mcMothTrack.globalIndex());
833843

@@ -838,6 +848,9 @@ struct HyperkinkRecoTask {
838848
registry.fill(HIST("hDCAZMothToRecSV"), dcaInfo[1]);
839849
}
840850

851+
hypkinkCand.isCollReco = true;
852+
hypkinkCand.isSurvEvSelection = true;
853+
841854
outputMCTable(
842855
mBz > 0 ? 1 : -1,
843856
hypkinkCand.posPV[0], hypkinkCand.posPV[1], hypkinkCand.posPV[2],
@@ -862,10 +875,22 @@ struct HyperkinkRecoTask {
862875

863876
// fill kink signals which are not reconstructed
864877
for (auto const& mcparticle : particlesMC) {
865-
auto dChannel = He4SDecay::getDecayChannel<aod::McParticles>(mcparticle, dauIDList);
866-
if (dChannel != He4SDecay::k2body) {
878+
bool isKinkSignal = false;
879+
if (hypoMoth == kHypertriton) {
880+
auto dChannel = H3LDecay::getDecayChannel<aod::McParticles>(mcparticle, dauIDList);
881+
if (dChannel == H3LDecay::k2bodyNeutral) {
882+
isKinkSignal = true;
883+
}
884+
} else if (hypoMoth == kHyperhelium4sigma) {
885+
auto dChannel = He4SDecay::getDecayChannel<aod::McParticles>(mcparticle, dauIDList);
886+
if (dChannel == He4SDecay::k2body) {
887+
isKinkSignal = true;
888+
}
889+
}
890+
if (!isKinkSignal) {
867891
continue;
868892
}
893+
869894
if (std::find(mcPartIndices.begin(), mcPartIndices.end(), mcparticle.globalIndex()) != mcPartIndices.end()) {
870895
continue;
871896
}
@@ -928,6 +953,7 @@ struct HyperkinkQa {
928953

929954
o2::aod::ITSResponse itsResponse;
930955

956+
int charge = 1;
931957
float massMoth = 999.f;
932958
float massChargedDaug = 999.f;
933959
float massNeutralDaug = 999.f;
@@ -941,6 +967,7 @@ struct HyperkinkQa {
941967
itsResponse.setMCDefaultParameters();
942968

943969
if (hypoMoth == kHypertriton) {
970+
charge = 1;
944971
massMoth = o2::constants::physics::MassHyperTriton;
945972
massChargedDaug = o2::constants::physics::MassTriton;
946973
massNeutralDaug = o2::constants::physics::MassPi0;
@@ -949,6 +976,7 @@ struct HyperkinkQa {
949976
pdgDaug[kDaugNeutral] = PDG_t::kPi0;
950977
pidTypeDaug = o2::track::PID::Triton;
951978
} else if (hypoMoth == kHyperhelium4sigma) {
979+
charge = 2;
952980
massMoth = o2::constants::physics::MassHyperHelium4Sigma;
953981
massChargedDaug = o2::constants::physics::MassAlpha;
954982
massNeutralDaug = o2::constants::physics::MassPi0;
@@ -986,8 +1014,8 @@ struct HyperkinkQa {
9861014
hGenHyperMothCounter->GetXaxis()->SetBinLabel(3, "AntiMatter");
9871015
hGenHyperMothCounter->GetXaxis()->SetBinLabel(4, "t + #pi^{0}");
9881016
hGenHyperMothCounter->GetXaxis()->SetBinLabel(5, "#bar{t} + #pi^{0}");
989-
hGenHyperMothCounter->GetXaxis()->SetBinLabel(6, "he3 + #pi^{-}");
990-
hGenHyperMothCounter->GetXaxis()->SetBinLabel(7, "#bar{he3} + #pi^{+}");
1017+
hGenHyperMothCounter->GetXaxis()->SetBinLabel(6, "{}^{3}He + #pi^{-}");
1018+
hGenHyperMothCounter->GetXaxis()->SetBinLabel(7, "{}^{3}#bar{He} + #pi^{+}");
9911019
hGenHyperMothCounter->GetXaxis()->SetBinLabel(8, "d + p + #pi^{-}");
9921020
hGenHyperMothCounter->GetXaxis()->SetBinLabel(9, "#bar{d} + #bar{p} + #pi^{+}");
9931021
hGenHyperMothCounter->GetXaxis()->SetBinLabel(10, "Others");
@@ -1043,7 +1071,7 @@ struct HyperkinkQa {
10431071
hist->GetXaxis()->SetBinLabel(6, "TPC Ncls");
10441072
hist->GetXaxis()->SetBinLabel(7, "TPC n#sigma");
10451073
hist->GetXaxis()->SetBinLabel(8, "ITS hits");
1046-
hist->GetXaxis()->SetBinLabel(9, "has TOF)");
1074+
hist->GetXaxis()->SetBinLabel(9, "has TOF");
10471075
}
10481076

10491077
recoQAHist.add<TH1>("hMothIsPVContributer", "", HistType::kTH1F, {{2, 0.f, 2.f}});
@@ -1279,7 +1307,7 @@ struct HyperkinkQa {
12791307
auto motherTrack = tracks.rawIteratorAt(mcPartIndices[mcparticle.globalIndex()]);
12801308
bool isGoodMother = motherTrackCheck(motherTrack, hMothCounter);
12811309
float svR = RecoDecay::sqrtSumOfSquares(svPos[0], svPos[1]);
1282-
float diffpt = mcparticle.pt() - 2 * motherTrack.pt();
1310+
float diffpt = mcparticle.pt() - charge * motherTrack.pt();
12831311

12841312
recoQAHist.fill(HIST("h2TrueMotherDiffPtVsTrueSVR"), svR, diffpt);
12851313
recoQAHist.fill(HIST("h2TrueMotherDiffEtaVsTrueSVR"), svR, mcparticle.eta() - motherTrack.eta());

0 commit comments

Comments
 (0)