Skip to content

Commit 9111ce9

Browse files
committed
resolve conflict kfPV: apply mass and topo constraints
1 parent 4582884 commit 9111ce9

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ struct HfCandidateCreator3Prong {
8585
Configurable<bool> createDs{"createDs", false, "enable Ds+/- candidate creation"};
8686
Configurable<bool> createLc{"createLc", false, "enable Lc+/- candidate creation"};
8787
Configurable<bool> createXic{"createXic", false, "enable Xic+/- candidate creation"};
88+
// KF
89+
Configurable<bool> applyTopoConstraint{"applyTopoConstraint", false, "apply origin from PV hypothesis for created candidate, works only in KF mode"};
90+
Configurable<bool> applyInvMassConstraint{"applyInvMassConstraint", false, "apply particle type hypothesis to recalculate created candidate's momentum, works only in KF mode"};
8891

8992
HfEventSelection hfEvSel; // event selection and monitoring
9093
o2::vertexing::DCAFitterN<3> df; // 3-prong vertex fitter
@@ -149,6 +152,10 @@ struct HfCandidateCreator3Prong {
149152
LOGP(fatal, "At least one particle specie should be enabled for the creation.");
150153
}
151154

155+
if(createLc && createXic && applyInvMassConstraint) {
156+
LOGP(fatal, "Unable to apply invariant mass constraint due to ambiguity of mass hypothesis: only one of Lc and Xic can be reconstructed.");
157+
}
158+
152159
// histograms
153160
registry.add("hMass3PKPi", "3-prong candidates;inv. mass (pK#pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{1200, 1.8, 3.0}}});
154161
registry.add("hMass3PiKP", "3-prong candidates;inv. mass (#pi Kp) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{1200, 1.8, 3.0}}});
@@ -487,6 +494,16 @@ struct HfCandidateCreator3Prong {
487494
kfCandPiKK.SetConstructMethod(2);
488495
kfCandPiKK.Construct(kfDaughtersPiKK, 3);
489496

497+
const float chi2topo = kfCalculateChi2ToPrimaryVertex(kfCandPKPi, kfpV);
498+
499+
if(applyTopoConstraint) { // constraints applied after chi2topo getter - to preserve unbiased value of chi2topo
500+
kfCandPKPi.SetProductionVertex(KFPV);
501+
kfCandPiKP.SetProductionVertex(KFPV);
502+
kfCandPiKPi.SetProductionVertex(KFPV);
503+
kfCandKKPi.SetProductionVertex(KFPV);
504+
kfCandPiKK.SetProductionVertex(KFPV);
505+
}
506+
490507
KFParticle kfPairKPi;
491508
const KFParticle* kfDaughtersKPi[3] = {&kfSecondKaon, &kfThirdPion};
492509
kfPairKPi.SetConstructMethod(2);
@@ -505,8 +522,15 @@ struct HfCandidateCreator3Prong {
505522
const float massKPi = kfPairKPi.GetMass();
506523
const float massPiK = kfPairPiK.GetMass();
507524

525+
if(applyInvMassConstraint) { // constraints applied after minv getters - to preserve unbiased values of minv
526+
kfCandPKPi.SetNonLinearMassConstraint(createLc ? MassLambdaCPlus : MassXiCPlus);
527+
kfCandPiKP.SetNonLinearMassConstraint(createLc ? MassLambdaCPlus : MassXiCPlus);
528+
kfCandPiKPi.SetNonLinearMassConstraint(MassDPlus);
529+
kfCandKKPi.SetNonLinearMassConstraint(MassDS);
530+
kfCandPiKK.SetNonLinearMassConstraint(MassDS);
531+
}
532+
508533
const float chi2geo = kfCandPKPi.Chi2() / kfCandPKPi.NDF();
509-
const float chi2topo = kfCalculateChi2ToPrimaryVertex(kfCandPKPi, kfpV);
510534
const std::pair<float, float> ldl = kfCalculateLdL(kfCandPKPi, kfpV);
511535

512536
std::array<float, 3> pProng0 = kfCalculateProngMomentumInSecondaryVertex(kfFirstProton, kfCandPiKP);

0 commit comments

Comments
 (0)