Skip to content

Commit 54b4548

Browse files
committed
Fix signal check for hypertriton kink
1 parent 5a007a9 commit 54b4548

File tree

2 files changed

+44
-15
lines changed

2 files changed

+44
-15
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: 41 additions & 14 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()};
@@ -862,10 +874,22 @@ struct HyperkinkRecoTask {
862874

863875
// fill kink signals which are not reconstructed
864876
for (auto const& mcparticle : particlesMC) {
865-
auto dChannel = He4SDecay::getDecayChannel<aod::McParticles>(mcparticle, dauIDList);
866-
if (dChannel != He4SDecay::k2body) {
877+
bool isKinkSignal = false;
878+
if (hypoMoth == kHypertriton) {
879+
auto dChannel = H3LDecay::getDecayChannel<aod::McParticles>(mcparticle, dauIDList);
880+
if (dChannel == H3LDecay::k2bodyNeutral) {
881+
isKinkSignal = true;
882+
}
883+
} else if (hypoMoth == kHyperhelium4sigma) {
884+
auto dChannel = He4SDecay::getDecayChannel<aod::McParticles>(mcparticle, dauIDList);
885+
if (dChannel == He4SDecay::k2body) {
886+
isKinkSignal = true;
887+
}
888+
}
889+
if (!isKinkSignal) {
867890
continue;
868891
}
892+
869893
if (std::find(mcPartIndices.begin(), mcPartIndices.end(), mcparticle.globalIndex()) != mcPartIndices.end()) {
870894
continue;
871895
}
@@ -928,6 +952,7 @@ struct HyperkinkQa {
928952

929953
o2::aod::ITSResponse itsResponse;
930954

955+
int charge = 1;
931956
float massMoth = 999.f;
932957
float massChargedDaug = 999.f;
933958
float massNeutralDaug = 999.f;
@@ -941,6 +966,7 @@ struct HyperkinkQa {
941966
itsResponse.setMCDefaultParameters();
942967

943968
if (hypoMoth == kHypertriton) {
969+
charge = 1;
944970
massMoth = o2::constants::physics::MassHyperTriton;
945971
massChargedDaug = o2::constants::physics::MassTriton;
946972
massNeutralDaug = o2::constants::physics::MassPi0;
@@ -949,6 +975,7 @@ struct HyperkinkQa {
949975
pdgDaug[kDaugNeutral] = PDG_t::kPi0;
950976
pidTypeDaug = o2::track::PID::Triton;
951977
} else if (hypoMoth == kHyperhelium4sigma) {
978+
charge = 2;
952979
massMoth = o2::constants::physics::MassHyperHelium4Sigma;
953980
massChargedDaug = o2::constants::physics::MassAlpha;
954981
massNeutralDaug = o2::constants::physics::MassPi0;
@@ -986,8 +1013,8 @@ struct HyperkinkQa {
9861013
hGenHyperMothCounter->GetXaxis()->SetBinLabel(3, "AntiMatter");
9871014
hGenHyperMothCounter->GetXaxis()->SetBinLabel(4, "t + #pi^{0}");
9881015
hGenHyperMothCounter->GetXaxis()->SetBinLabel(5, "#bar{t} + #pi^{0}");
989-
hGenHyperMothCounter->GetXaxis()->SetBinLabel(6, "he3 + #pi^{-}");
990-
hGenHyperMothCounter->GetXaxis()->SetBinLabel(7, "#bar{he3} + #pi^{+}");
1016+
hGenHyperMothCounter->GetXaxis()->SetBinLabel(6, "{}^{3}He + #pi^{-}");
1017+
hGenHyperMothCounter->GetXaxis()->SetBinLabel(7, "{}^{3}#bar{He} + #pi^{+}");
9911018
hGenHyperMothCounter->GetXaxis()->SetBinLabel(8, "d + p + #pi^{-}");
9921019
hGenHyperMothCounter->GetXaxis()->SetBinLabel(9, "#bar{d} + #bar{p} + #pi^{+}");
9931020
hGenHyperMothCounter->GetXaxis()->SetBinLabel(10, "Others");
@@ -1043,7 +1070,7 @@ struct HyperkinkQa {
10431070
hist->GetXaxis()->SetBinLabel(6, "TPC Ncls");
10441071
hist->GetXaxis()->SetBinLabel(7, "TPC n#sigma");
10451072
hist->GetXaxis()->SetBinLabel(8, "ITS hits");
1046-
hist->GetXaxis()->SetBinLabel(9, "has TOF)");
1073+
hist->GetXaxis()->SetBinLabel(9, "has TOF");
10471074
}
10481075

10491076
recoQAHist.add<TH1>("hMothIsPVContributer", "", HistType::kTH1F, {{2, 0.f, 2.f}});
@@ -1279,7 +1306,7 @@ struct HyperkinkQa {
12791306
auto motherTrack = tracks.rawIteratorAt(mcPartIndices[mcparticle.globalIndex()]);
12801307
bool isGoodMother = motherTrackCheck(motherTrack, hMothCounter);
12811308
float svR = RecoDecay::sqrtSumOfSquares(svPos[0], svPos[1]);
1282-
float diffpt = mcparticle.pt() - 2 * motherTrack.pt();
1309+
float diffpt = mcparticle.pt() - charge * motherTrack.pt();
12831310

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

0 commit comments

Comments
 (0)