Skip to content

Commit bb1c103

Browse files
authored
[PWGHF] XicToXiPiPi: Update KF workflow (#10661)
Co-authored-by: pstahlhu <phil.lennart.stahlhut@cern.ch>
1 parent 3bef8f6 commit bb1c103

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

PWGHF/DataModel/CandidateReconstructionTables.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,10 @@ DECLARE_SOA_COLUMN(Chi2TopoXicPlusToPV, chi2TopoXicPlusToPV, float);
16491649
DECLARE_SOA_COLUMN(Chi2TopoXicPlusToPVBeforeConstraint, chi2TopoXicPlusToPVBeforeConstraint, float);
16501650
DECLARE_SOA_COLUMN(Chi2TopoXiToXicPlus, chi2TopoXiToXicPlus, float);
16511651
DECLARE_SOA_COLUMN(Chi2TopoXiToXicPlusBeforeConstraint, chi2TopoXiToXicPlusBeforeConstraint, float);
1652+
DECLARE_SOA_COLUMN(KfDecayLength, kfDecayLength, float);
1653+
DECLARE_SOA_COLUMN(KfDecayLengthNormalised, kfDecayLengthNormalised, float);
1654+
DECLARE_SOA_COLUMN(KfDecayLengthXY, kfDecayLengthXY, float);
1655+
DECLARE_SOA_COLUMN(KfDecayLengthXYNormalised, kfDecayLengthXYNormalised, float);
16521656
// PID
16531657
DECLARE_SOA_COLUMN(NSigTpcPiFromXicPlus0, nSigTpcPiFromXicPlus0, float);
16541658
DECLARE_SOA_COLUMN(NSigTpcPiFromXicPlus1, nSigTpcPiFromXicPlus1, float);
@@ -1743,6 +1747,7 @@ using HfCandXic = HfCandXicExt;
17431747

17441748
DECLARE_SOA_TABLE(HfCandXicKF, "AOD", "HFCANDXICKF",
17451749
cascdata::KFCascadeChi2, cascdata::KFV0Chi2,
1750+
hf_cand_xic_to_xi_pi_pi::KfDecayLength, hf_cand_xic_to_xi_pi_pi::KfDecayLengthNormalised, hf_cand_xic_to_xi_pi_pi::KfDecayLengthXY, hf_cand_xic_to_xi_pi_pi::KfDecayLengthXYNormalised,
17461751
hf_cand_xic_to_xi_pi_pi::Chi2TopoXicPlusToPVBeforeConstraint, hf_cand_xic_to_xi_pi_pi::Chi2TopoXicPlusToPV, hf_cand_xic_to_xi_pi_pi::Chi2TopoXiToXicPlusBeforeConstraint, hf_cand_xic_to_xi_pi_pi::Chi2TopoXiToXicPlus,
17471752
hf_cand_xic_to_xi_pi_pi::DcaXYPi0Pi1, hf_cand_xic_to_xi_pi_pi::DcaXYPi0Xi, hf_cand_xic_to_xi_pi_pi::DcaXYPi1Xi,
17481753
hf_cand_xic_to_xi_pi_pi::DcaPi0Pi1, hf_cand_xic_to_xi_pi_pi::DcaPi0Xi, hf_cand_xic_to_xi_pi_pi::DcaPi1Xi);

PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ struct HfCandidateCreatorXicToXiPiPi {
8080
Configurable<bool> useAbsDCA{"useAbsDCA", false, "Minimise abs. distance rather than chi2"};
8181
Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"};
8282
// KFParticle
83+
Configurable<bool> useXiMassConstraint{"useXiMassConstraint", true, "Use mass constraint for Xi"};
8384
Configurable<bool> constrainXicPlusToPv{"constrainXicPlusToPv", false, "Constrain XicPlus to PV"};
8485
Configurable<bool> constrainXiToXicPlus{"constrainXiToXicPlus", false, "Constrain Xi to XicPlus"};
8586
Configurable<int> kfConstructMethod{"kfConstructMethod", 2, "Construct method of XicPlus: 0 fast mathematics without constraint of fixed daughter particle masses, 2 daughter particle masses stay fixed in construction process"};
@@ -463,7 +464,11 @@ struct HfCandidateCreatorXicToXiPiPi {
463464
}
464465
// create KFParticle
465466
KFParticle kfXi;
466-
kfXi.Create(parPosMom, casc.kfTrackCovMat(), casc.sign(), casc.mXi());
467+
float massXi = casc.mXi();
468+
kfXi.Create(parPosMom, casc.kfTrackCovMat(), casc.sign(), massXi);
469+
if (useXiMassConstraint) {
470+
kfXi.SetNonlinearMassConstraint(MassXiMinus);
471+
}
467472

468473
// create XicPlus as KFParticle object
469474
KFParticle kfXicPlus;
@@ -580,6 +585,14 @@ struct HfCandidateCreatorXicToXiPiPi {
580585
float errMassXiPiPi;
581586
kfXicPlus.GetMass(massXiPiPi, errMassXiPiPi);
582587

588+
// decay length of XicPlus
589+
// use XicPlus constrained to PV (kfXicPlusToPV), since production point must be set before calling GetDecayLength(XY) on KFParticle
590+
float kfDecayLength = 0., errorKfDecayLength = 0., kfDecayLengthXY = 0., errorKfDecayLengthXY = 0.;
591+
kfXicPlusToPV.GetDecayLength(kfDecayLength, errorKfDecayLength);
592+
kfXicPlusToPV.GetDecayLengthXY(kfDecayLengthXY, errorKfDecayLengthXY);
593+
float kfDecayLengthNormalised = ldlFromKF(kfXicPlus, kfPv);
594+
float kfDecayLengthXYNormalised = ldlXYFromKF(kfXicPlus, kfPv);
595+
583596
//--------------------- get PID information-----------------------
584597
float nSigTpcPiFromXicPlus0 = trackCharmBachelor0.tpcNSigmaPi();
585598
float nSigTofPiFromXicPlus0 = trackCharmBachelor0.tofNSigmaPi();
@@ -638,7 +651,7 @@ struct HfCandidateCreatorXicToXiPiPi {
638651
casc.bachelorId(), casc.posTrackId(), casc.negTrackId(),
639652
secondaryVertex[0], secondaryVertex[1], secondaryVertex[2],
640653
kfXicPlus.GetErrX(), kfXicPlus.GetErrY(), kfXicPlus.GetErrZ(),
641-
kfXicPlus.GetErrDecayLength(), kfXicPlus.GetErrDecayLengthXY(),
654+
errorKfDecayLength, errorKfDecayLengthXY,
642655
chi2GeoXicPlus, massXiPiPi, signXic,
643656
kfXi.GetPx(), kfXi.GetPy(), kfXi.GetPz(),
644657
kfCharmBachelor0.GetPx(), kfCharmBachelor0.GetPy(), kfCharmBachelor0.GetPz(),
@@ -648,14 +661,15 @@ struct HfCandidateCreatorXicToXiPiPi {
648661
/*cascade specific columns*/
649662
trackPionFromXi.p(), pPiFromLambda, pPrFromLambda,
650663
cpaXi, cpaXYXi, cpaLambda, cpaXYLambda, cpaLambdaToXi, cpaXYLambdaToXi,
651-
casc.mXi(), casc.mLambda(), massXiPi0, massXiPi1,
664+
massXi, casc.mLambda(), massXiPi0, massXiPi1,
652665
/*DCA information*/
653666
casc.dcacascdaughters(), casc.dcaV0daughters(), casc.dcapostopv(), casc.dcanegtopv(), casc.dcabachtopv(),
654667
casc.dcaXYCascToPV(), casc.dcaZCascToPV(),
655668
/*PID information*/
656669
nSigTpcPiFromXicPlus0, nSigTpcPiFromXicPlus1, nSigTpcBachelorPi, nSigTpcPiFromLambda, nSigTpcPrFromLambda,
657670
nSigTofPiFromXicPlus0, nSigTofPiFromXicPlus1, nSigTofBachelorPi, nSigTofPiFromLambda, nSigTofPrFromLambda);
658671
rowCandidateKF(casc.kfCascadeChi2(), casc.kfV0Chi2(),
672+
kfDecayLength, kfDecayLengthNormalised, kfDecayLengthXY, kfDecayLengthXYNormalised,
659673
chi2topoXicPlusToPVBeforeConstraint, chi2topoXicPlusToPV, chi2topoXiToXicPlusBeforeConstraint, chi2topoXiToXicPlus,
660674
dcaXYPi0Pi1, dcaXYPi0Xi, dcaXYPi1Xi,
661675
dcaPi0Pi1, dcaPi0Xi, dcaPi1Xi);

PWGHF/TableProducer/treeCreatorXicToXiPiPi.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,10 @@ struct HfTreeCreatorXicToXiPiPi {
540540
candidate.invMassXiPi1(),
541541
candidate.chi2PCA(),
542542
candidate.ct(o2::constants::physics::MassXiCPlus),
543-
candidate.decayLength(),
544-
candidate.decayLengthNormalised(),
545-
candidate.decayLengthXY(),
546-
candidate.decayLengthXYNormalised(),
543+
candidate.kfDecayLength(),
544+
candidate.kfDecayLengthNormalised(),
545+
candidate.kfDecayLengthXY(),
546+
candidate.kfDecayLengthXYNormalised(),
547547
candidate.cpa(),
548548
candidate.cpaXY(),
549549
candidate.cosPaXi(),
@@ -592,10 +592,10 @@ struct HfTreeCreatorXicToXiPiPi {
592592
candidate.invMassXiPi1(),
593593
candidate.chi2PCA(),
594594
candidate.ct(o2::constants::physics::MassXiCPlus),
595-
candidate.decayLength(),
596-
candidate.decayLengthNormalised(),
597-
candidate.decayLengthXY(),
598-
candidate.decayLengthXYNormalised(),
595+
candidate.kfDecayLength(),
596+
candidate.kfDecayLengthNormalised(),
597+
candidate.kfDecayLengthXY(),
598+
candidate.kfDecayLengthXYNormalised(),
599599
candidate.cpa(),
600600
candidate.cpaXY(),
601601
candidate.cosPaXi(),

0 commit comments

Comments
 (0)