Skip to content

Commit 183b905

Browse files
authored
[PWGLF] Few additions for hypertriton 3-body decay reconstruction KFParticle (new) (#9963)
1 parent ab41d66 commit 183b905

File tree

3 files changed

+100
-17
lines changed

3 files changed

+100
-17
lines changed

PWGLF/DataModel/Vtx3BodyTables.h

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,12 @@ DECLARE_SOA_COLUMN(Track2Sign, track2sign, float); //! sign of
388388
DECLARE_SOA_COLUMN(TPCInnerParamTrack0, tpcinnerparamtrack0, float); //! momentum at inner wall of TPC of proton daughter
389389
DECLARE_SOA_COLUMN(TPCInnerParamTrack1, tpcinnerparamtrack1, float); //! momentum at inner wall of TPC of pion daughter
390390
DECLARE_SOA_COLUMN(TPCInnerParamTrack2, tpcinnerparamtrack2, float); //! momentum at inner wall of TPC of deuteron daughter
391+
DECLARE_SOA_COLUMN(TPCNClTrack0, tpcncltrack0, int); //! Number of TPC clusters of proton daughter
392+
DECLARE_SOA_COLUMN(TPCNClTrack1, tpcncltrack1, int); //! Number of TPC clusters of pion daughter
393+
DECLARE_SOA_COLUMN(TPCNClTrack2, tpcncltrack2, int); //! Number of TPC clusters of deuteron daughter
394+
DECLARE_SOA_COLUMN(TPCChi2NClDeuteron, tpcchi2ncldeuteron, float); //! TPC Chi2 / cluster of deuteron daughter
395+
DECLARE_SOA_COLUMN(DeltaPhiDeuteron, deltaphideuteron, float); //! phi before track rotation - phi after track rotation for deuteron track
396+
DECLARE_SOA_COLUMN(DeltaPhiProton, deltaphiproton, float); //! phi before track rotation - phi after track rotation for proton track
391397
// PID
392398
DECLARE_SOA_COLUMN(TPCNSigmaProton, tpcnsigmaproton, float); //! nsigma proton of TPC PID of the proton daughter
393399
DECLARE_SOA_COLUMN(TPCNSigmaPion, tpcnsigmapion, float); //! nsigma pion of TPC PID of the pion daughter
@@ -418,7 +424,10 @@ DECLARE_SOA_COLUMN(GenBachP, genbachp, float); //! generated momentum b
418424
DECLARE_SOA_COLUMN(GenBachPt, genbachpt, float); //! generated transverse momentum bachelor daughter particle
419425
DECLARE_SOA_COLUMN(IsTrueH3L, istrueh3l, bool); //! flag for true hypertriton candidate
420426
DECLARE_SOA_COLUMN(IsTrueAntiH3L, istrueantih3l, bool); //! flag for true anti-hypertriton candidate
421-
DECLARE_SOA_COLUMN(PdgCode, pdgcode, int); //! MC particle PDG code
427+
DECLARE_SOA_COLUMN(PdgCode, pdgcode, int); //! MC particle mother PDG code
428+
DECLARE_SOA_COLUMN(PdgCodeDau0, pdgcodedau0, int); //! MC particle daughter 0 PDG code
429+
DECLARE_SOA_COLUMN(PdgCodeDau1, pdgcodedau1, int); //! MC particle daughter 1 PDG code
430+
DECLARE_SOA_COLUMN(PdgCodeDau2, pdgcodedau2, int); //! MC particle daughter 2 PDG code
422431
DECLARE_SOA_COLUMN(SurvEvSel, survevsel, int); //! flag if reco collision survived event selection
423432
DECLARE_SOA_COLUMN(IsReco, isreco, int); //! flag if candidate was reconstructed
424433

@@ -455,6 +464,9 @@ DECLARE_SOA_TABLE(KFVtx3BodyDatas, "AOD", "KFVTX3BODYDATA",
455464
vtx3body::PxTrack1, vtx3body::PyTrack1, vtx3body::PzTrack1, // pion
456465
vtx3body::PxTrack2, vtx3body::PyTrack2, vtx3body::PzTrack2, // deuteron
457466
kfvtx3body::TPCInnerParamTrack0, kfvtx3body::TPCInnerParamTrack1, kfvtx3body::TPCInnerParamTrack2, // proton, pion, deuteron
467+
kfvtx3body::TPCNClTrack0, kfvtx3body::TPCNClTrack1, kfvtx3body::TPCNClTrack2, // proton, pion, deuteron
468+
kfvtx3body::TPCChi2NClDeuteron,
469+
kfvtx3body::DeltaPhiDeuteron, kfvtx3body::DeltaPhiProton,
458470
kfvtx3body::DCATrack0ToPVKF, kfvtx3body::DCATrack1ToPVKF, kfvtx3body::DCATrack2ToPVKF, kfvtx3body::DCAxyTrack0ToPVKF, kfvtx3body::DCAxyTrack1ToPVKF, kfvtx3body::DCAxyTrack2ToPVKF,
459471
kfvtx3body::DCAxyTrack0ToSVKF, kfvtx3body::DCAxyTrack1ToSVKF, kfvtx3body::DCAxyTrack2ToSVKF,
460472
kfvtx3body::DCATrack0ToTrack1KF, kfvtx3body::DCATrack0ToTrack2KF, kfvtx3body::DCATrack1ToTrack2KF,
@@ -495,21 +507,23 @@ DECLARE_SOA_TABLE(KFVtx3BodyDatasLite, "AOD", "KF3BODYLITE",
495507
kfvtx3body::CTauKFtopo, kfvtx3body::TrackedClSize,
496508

497509
// V0
498-
kfvtx3body::MassV0, kfvtx3body::Chi2MassV0,
510+
kfvtx3body::MassV0,
499511
kfvtx3body::CosPAV0,
500512

501513
// daughters
502514
vtx3body::PxTrack0, vtx3body::PyTrack0, vtx3body::PzTrack0, // proton
503515
vtx3body::PxTrack1, vtx3body::PyTrack1, vtx3body::PzTrack1, // pion
504516
vtx3body::PxTrack2, vtx3body::PyTrack2, vtx3body::PzTrack2, // deuteron
505517
kfvtx3body::TPCInnerParamTrack0, kfvtx3body::TPCInnerParamTrack1, kfvtx3body::TPCInnerParamTrack2, // proton, pion, deuteron
518+
kfvtx3body::TPCNClTrack0, kfvtx3body::TPCNClTrack1, kfvtx3body::TPCNClTrack2, // proton, pion, deuteron
519+
kfvtx3body::TPCChi2NClDeuteron,
520+
kfvtx3body::DeltaPhiDeuteron, kfvtx3body::DeltaPhiProton,
506521
kfvtx3body::DCATrack0ToPVKF, kfvtx3body::DCATrack1ToPVKF, kfvtx3body::DCATrack2ToPVKF, kfvtx3body::DCAxyTrack0ToPVKF, kfvtx3body::DCAxyTrack1ToPVKF, kfvtx3body::DCAxyTrack2ToPVKF,
507522
kfvtx3body::DCAxyTrack0ToSVKF, kfvtx3body::DCAxyTrack1ToSVKF, kfvtx3body::DCAxyTrack2ToSVKF,
508523
kfvtx3body::DCATrack0ToTrack1KF, kfvtx3body::DCATrack0ToTrack2KF, kfvtx3body::DCATrack1ToTrack2KF,
509524
kfvtx3body::DCAVtxDaughtersKF,
510525
kfvtx3body::Track0Sign, kfvtx3body::Track1Sign, kfvtx3body::Track2Sign, // track sing: proton, pion, deuteron
511526
kfvtx3body::TPCNSigmaProton, kfvtx3body::TPCNSigmaPion, kfvtx3body::TPCNSigmaDeuteron, kfvtx3body::TPCNSigmaPionBach,
512-
kfvtx3body::TPCdEdxProton, kfvtx3body::TPCdEdxPion, kfvtx3body::TPCdEdxDeuteron,
513527
kfvtx3body::TOFNSigmaDeuteron,
514528
kfvtx3body::ITSClusSizeDeuteron,
515529
kfvtx3body::PIDTrackingDeuteron);
@@ -542,6 +556,9 @@ DECLARE_SOA_TABLE(McKFVtx3BodyDatas, "AOD", "MCKF3BODYDATAS",
542556
vtx3body::PxTrack1, vtx3body::PyTrack1, vtx3body::PzTrack1, // pion
543557
vtx3body::PxTrack2, vtx3body::PyTrack2, vtx3body::PzTrack2, // deuteron
544558
kfvtx3body::TPCInnerParamTrack0, kfvtx3body::TPCInnerParamTrack1, kfvtx3body::TPCInnerParamTrack2, // proton, pion, deuteron
559+
kfvtx3body::TPCNClTrack0, kfvtx3body::TPCNClTrack1, kfvtx3body::TPCNClTrack2, // proton, pion, deuteron
560+
kfvtx3body::TPCChi2NClDeuteron,
561+
kfvtx3body::DeltaPhiDeuteron, kfvtx3body::DeltaPhiProton,
545562
kfvtx3body::DCATrack0ToPVKF, kfvtx3body::DCATrack1ToPVKF, kfvtx3body::DCATrack2ToPVKF, kfvtx3body::DCAxyTrack0ToPVKF, kfvtx3body::DCAxyTrack1ToPVKF, kfvtx3body::DCAxyTrack2ToPVKF,
546563
kfvtx3body::DCAxyTrack0ToSVKF, kfvtx3body::DCAxyTrack1ToSVKF, kfvtx3body::DCAxyTrack2ToSVKF,
547564
kfvtx3body::DCATrack0ToTrack1KF, kfvtx3body::DCATrack0ToTrack2KF, kfvtx3body::DCATrack1ToTrack2KF,
@@ -567,7 +584,7 @@ DECLARE_SOA_TABLE(McKFVtx3BodyDatas, "AOD", "MCKF3BODYDATAS",
567584
kfvtx3body::GenNegP, kfvtx3body::GenNegPt,
568585
kfvtx3body::GenBachP, kfvtx3body::GenBachPt,
569586
kfvtx3body::IsTrueH3L, kfvtx3body::IsTrueAntiH3L,
570-
kfvtx3body::PdgCode,
587+
kfvtx3body::PdgCode, kfvtx3body::PdgCodeDau0, kfvtx3body::PdgCodeDau1, kfvtx3body::PdgCodeDau2,
571588
kfvtx3body::IsReco,
572589
kfvtx3body::SurvEvSel);
573590

PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,20 @@ struct kfCandidate {
117117
float chi2topoNDF;
118118
float ctau;
119119
float trackedClSize;
120+
float DeltaPhiRotDeuteron;
121+
float DeltaPhiRotProton;
120122
// V0
121123
float massV0;
122124
float chi2massV0;
123125
float cpaV0ToPV;
124-
// daughter momenta at vertex
126+
// daughter momenta
125127
float protonMom[3];
126128
float pionMom[3];
127129
float deuteronMom[3];
128130
float tpcInnerParam[3]; // proton, pion, deuteron
131+
// daughter track quality
132+
int tpcNClDaughters[3]; // proton, pion, deuteron
133+
float tpcChi2NClDeuteron;
129134
// daughter DCAs KF
130135
float DCAdaughterToPV[3]; // proton, pion, deuteron
131136
float DCAdaughterToPVxy[3]; // proton, pion, deuteron
@@ -816,13 +821,17 @@ struct decay3bodyBuilder {
816821
candidate.ctau,
817822
candidate.trackedClSize,
818823
// V0
819-
candidate.massV0, candidate.chi2massV0,
824+
candidate.massV0,
820825
candidate.cpaV0ToPV,
821826
// daughter momenta at vertex
822827
candidate.protonMom[0], candidate.protonMom[1], candidate.protonMom[2],
823828
candidate.pionMom[0], candidate.pionMom[1], candidate.pionMom[2],
824829
candidate.deuteronMom[0], candidate.deuteronMom[1], candidate.deuteronMom[2],
825830
candidate.tpcInnerParam[0], candidate.tpcInnerParam[1], candidate.tpcInnerParam[2], // proton, pion, deuteron
831+
// daughter track quality
832+
candidate.tpcNClDaughters[0], candidate.tpcNClDaughters[1], candidate.tpcNClDaughters[2], // proton, pion, deuteron
833+
candidate.tpcChi2NClDeuteron,
834+
candidate.DeltaPhiRotDeuteron, candidate.DeltaPhiRotProton,
826835
// daughter DCAs KF
827836
candidate.DCAdaughterToPV[0], candidate.DCAdaughterToPV[1], candidate.DCAdaughterToPV[2], // proton, pion, deuteron
828837
candidate.DCAdaughterToPVxy[0], candidate.DCAdaughterToPVxy[1], candidate.DCAdaughterToPVxy[2], // proton, pion, deuteron
@@ -833,7 +842,6 @@ struct decay3bodyBuilder {
833842
candidate.daughterCharge[0], candidate.daughterCharge[1], candidate.daughterCharge[2], // proton, pion, deuteron
834843
// daughter PID
835844
candidate.tpcNsigma[0], candidate.tpcNsigma[1], candidate.tpcNsigma[2], candidate.tpcNsigma[3], // proton, pion, deuteron, bach with pion hyp
836-
candidate.tpcdEdx[0], candidate.tpcdEdx[1], candidate.tpcdEdx[2], // proton, pion, deuteron
837845
candidate.tofNsigmaDeuteron,
838846
candidate.averageClusterSizeDeuteron,
839847
candidate.pidForTrackingDeuteron);
@@ -864,6 +872,10 @@ struct decay3bodyBuilder {
864872
candidate.pionMom[0], candidate.pionMom[1], candidate.pionMom[2],
865873
candidate.deuteronMom[0], candidate.deuteronMom[1], candidate.deuteronMom[2],
866874
candidate.tpcInnerParam[0], candidate.tpcInnerParam[1], candidate.tpcInnerParam[2], // proton, pion, deuteron
875+
// daughter track quality
876+
candidate.tpcNClDaughters[0], candidate.tpcNClDaughters[1], candidate.tpcNClDaughters[2], // proton, pion, deuteron
877+
candidate.tpcChi2NClDeuteron,
878+
candidate.DeltaPhiRotDeuteron, candidate.DeltaPhiRotProton,
867879
// daughter DCAs KF
868880
candidate.DCAdaughterToPV[0], candidate.DCAdaughterToPV[1], candidate.DCAdaughterToPV[2], // proton, pion, deuteron
869881
candidate.DCAdaughterToPVxy[0], candidate.DCAdaughterToPVxy[1], candidate.DCAdaughterToPVxy[2], // proton, pion, deuteron
@@ -1011,13 +1023,25 @@ struct decay3bodyBuilder {
10111023
registry.fill(HIST("Counters/hVtx3BodyCounterKFParticle"), kKfVtxEta);
10121024

10131025
// number of TPC clusters
1026+
int tpcNClProton;
1027+
int tpcNClPion;
1028+
int tpcNClDeuteron = trackBach.tpcNClsFound();
1029+
float tpcChi2NCl = trackBach.tpcChi2NCl();
10141030
if (trackBach.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsBach) {
10151031
return;
10161032
}
1017-
if (isMatter && ((kfparticleConfigurations.useTPCforPion && trackNeg.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsPion) || trackPos.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsProton)) {
1018-
return;
1019-
} else if (!isMatter && ((kfparticleConfigurations.useTPCforPion && trackPos.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsPion) || trackNeg.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsProton)) {
1020-
return;
1033+
if (isMatter) {
1034+
tpcNClPion = trackNeg.tpcNClsFound();
1035+
tpcNClProton = trackPos.tpcNClsFound();
1036+
if ((kfparticleConfigurations.useTPCforPion && trackNeg.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsPion) || trackPos.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsProton) {
1037+
return;
1038+
}
1039+
} else if (!isMatter) {
1040+
tpcNClPion = trackPos.tpcNClsFound();
1041+
tpcNClProton = trackNeg.tpcNClsFound();
1042+
if ((kfparticleConfigurations.useTPCforPion && trackPos.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsPion) || trackNeg.tpcNClsFound() <= kfparticleConfigurations.mintpcNClsProton) {
1043+
return;
1044+
}
10211045
}
10221046
registry.fill(HIST("Counters/hVtx3BodyCounterKFParticle"), kKfVtxTPCNcls);
10231047

@@ -1195,6 +1219,13 @@ struct decay3bodyBuilder {
11951219
kfpDeuteron = createKFParticleFromTrackParCov(trackParCovBach, trackBach.sign() * bachelorcharge, constants::physics::MassDeuteron);
11961220
LOG(debug) << "KFParticle created from deuteron track.";
11971221
float kfpvPos[3] = {kfpv.GetX(), kfpv.GetY(), kfpv.GetZ()};
1222+
// Check phi angle of "default" candidate daughter tracks
1223+
float phiDeuteron_noRotation;
1224+
float phiDeuteronSigma_noRotation;
1225+
float phiProton_noRotation;
1226+
float phiProtonSigma_noRotation;
1227+
kfpDeuteron.GetPhi(phiDeuteron_noRotation, phiDeuteronSigma_noRotation);
1228+
kfpProton.GetPhi(phiProton_noRotation, phiProtonSigma_noRotation);
11981229

11991230
// Construct vertex
12001231
/// BRIEF: Case 1: fully uncorrelated bkg via rotation of proton track
@@ -1340,6 +1371,14 @@ struct decay3bodyBuilder {
13401371
trackedClSize = !fTrackedClSizeVector.empty() ? fTrackedClSizeVector[decay3bodyID] : 0;
13411372
}
13421373

1374+
// get deuteron and proton phi after rotation
1375+
float phiDeuteron_afterRotation;
1376+
float phiDeuteronSigma_afterRotation;
1377+
float phiProton_afterRotation;
1378+
float phiProtonSigma_afterRotation;
1379+
kfDeuteronDaughters[i].GetPhi(phiDeuteron_afterRotation, phiDeuteronSigma_afterRotation);
1380+
kfProtonDaughters[i].GetPhi(phiProton_afterRotation, phiProtonSigma_afterRotation);
1381+
13431382
// candidate filling
13441383
kfCandidate candidate;
13451384
candidate.collisionID = collision.globalIndex();
@@ -1377,6 +1416,8 @@ struct decay3bodyBuilder {
13771416
candidate.chi2topoNDF = chi2topoNDF;
13781417
candidate.ctau = KFHtPV.GetLifeTime();
13791418
candidate.trackedClSize = trackedClSize;
1419+
candidate.DeltaPhiRotDeuteron = phiDeuteron_noRotation - phiDeuteron_afterRotation;
1420+
candidate.DeltaPhiRotProton = phiProton_noRotation - phiProton_afterRotation;
13801421
// V0
13811422
candidate.massV0 = massV0;
13821423
candidate.chi2massV0 = chi2massV0;
@@ -1394,6 +1435,11 @@ struct decay3bodyBuilder {
13941435
candidate.tpcInnerParam[0] = tpcInnerParamProton;
13951436
candidate.tpcInnerParam[1] = tpcInnerParamPion;
13961437
candidate.tpcInnerParam[2] = tpcInnerParamDeuteron;
1438+
// daughter track quality
1439+
candidate.tpcNClDaughters[0] = tpcNClProton;
1440+
candidate.tpcNClDaughters[1] = tpcNClPion;
1441+
candidate.tpcNClDaughters[2] = tpcNClDeuteron;
1442+
candidate.tpcChi2NClDeuteron = tpcChi2NCl;
13971443
// daughter DCAs with KF
13981444
candidate.DCAdaughterToPV[0] = kfProtonDaughters[i].GetDistanceFromVertex(kfpv);
13991445
candidate.DCAdaughterToPV[1] = kfPionDaughters[i].GetDistanceFromVertex(kfpv);

0 commit comments

Comments
 (0)