Skip to content

Commit 292fb36

Browse files
committed
Feat: update computation of kink kinematis
1 parent 4db1b10 commit 292fb36

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

PWGCF/Femto/Core/kinkBuilder.h

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ struct ConfKinkFilters : o2::framework::ConfigurableGroup {
6464
// selections bits for all kinks
6565
#define KINK_DEFAULT_BITS \
6666
o2::framework::Configurable<std::vector<float>> kinkTopoDcaMax{"kinkTopoDcaMax", {2.0f}, "Maximum kink topological DCA"}; \
67-
o2::framework::Configurable<std::vector<float>> transRadMin{"transRadMin", {0.2f}, "Minimum transverse radius (cm)"}; \
67+
o2::framework::Configurable<std::vector<float>> transRadMin{"transRadMin", {20.f}, "Minimum transverse radius (cm)"}; \
6868
o2::framework::Configurable<std::vector<float>> transRadMax{"transRadMax", {100.f}, "Maximum transverse radius (cm)"}; \
69-
o2::framework::Configurable<std::vector<float>> dauAbsEtaMax{"dauAbsEtaMax", {0.8f}, "Maximum absolute pseudorapidity for daughter track"}; \
70-
o2::framework::Configurable<std::vector<float>> dauDcaPvMin{"dauDcaPvMin", {0.0f}, "Minimum DCA of daughter from primary vertex (cm)"}; \
69+
o2::framework::Configurable<std::vector<float>> dauAbsEtaMax{"dauAbsEtaMax", {1.0f}, "Maximum absolute pseudorapidity for daughter track"}; \
70+
o2::framework::Configurable<std::vector<float>> dauDcaPvMin{"dauDcaPvMin", {0.1f}, "Minimum DCA of daughter from primary vertex (cm)"}; \
7171
o2::framework::Configurable<std::vector<float>> mothDcaPvMax{"mothDcaPvMax", {1.0f}, "Maximum DCA of mother from primary vertex (cm)"}; \
7272
o2::framework::Configurable<std::vector<float>> alphaAPMin{"alphaAPMin", {-1.0f}, "Minimum Alpha_AP for Sigma candidates"}; \
7373
o2::framework::Configurable<std::vector<float>> alphaAPMax{"alphaAPMax", {0.0f}, "Maximum Alpha_AP for Sigma candidates"}; \
@@ -224,8 +224,8 @@ class KinkSelection : public BaseSelection<float, o2::aod::femtodatatypes::KinkM
224224
this->setupContainers<HistName>(registry);
225225
};
226226

227-
template <typename T1, typename T2>
228-
void computeQaVariables(T1 const& kinkCand, T2 const& /*tracks*/)
227+
template <typename T1, typename T2, typename T3>
228+
void computeKinkKinematics(T1 const& kinkCand, T2 const& /*tracks*/, T3 const& col)
229229
{
230230
std::array<float, 3> momMother = {kinkCand.pxMoth(), kinkCand.pyMoth(), kinkCand.pzMoth()};
231231
float kinkMomP = RecoDecay::p(momMother);
@@ -244,7 +244,7 @@ class KinkSelection : public BaseSelection<float, o2::aod::femtodatatypes::KinkM
244244
float p2A = kinkDauP * kinkDauP;
245245
mQtAp = std::sqrt(std::max(0.f, p2A - dp * dp / p2V0));
246246

247-
std::array<float, 3> vMother = {kinkCand.xDecVtx(), kinkCand.yDecVtx(), kinkCand.zDecVtx()};
247+
std::array<float, 3> vMother = {kinkCand.xDecVtx() - col.posX(), kinkCand.yDecVtx() - col.posY(), kinkCand.zDecVtx() - col.posZ()};
248248
float vMotherNorm = std::sqrt(std::inner_product(vMother.begin(), vMother.end(), vMother.begin(), 0.f));
249249
mCosPointingAngle = (vMotherNorm > 0.f && kinkMomP > 0.f) ? (std::inner_product(momMother.begin(), momMother.end(), vMother.begin(), 0.f)) / (kinkMomP * vMotherNorm) : 0.f;
250250
mTransRadius = std::hypot(kinkCand.xDecVtx(), kinkCand.yDecVtx());
@@ -313,13 +313,8 @@ class KinkSelection : public BaseSelection<float, o2::aod::femtodatatypes::KinkM
313313
mKinkMotherPhi = RecoDecay::phi(momMother);
314314

315315
// Recalculate pT using kinematic constraints
316-
float ptRecalc = utils::calcPtnew(momMother[0], momMother[1], momMother[2],
317-
momDaughter[0], momDaughter[1], momDaughter[2]);
318-
if (ptRecalc > 0.f) {
319-
mKinkMotherPt = ptRecalc;
320-
} else {
321-
mKinkMotherPt = -1.f;
322-
}
316+
float ptRecalc = utils::calcPtnew(momMother[0], momMother[1], momMother[2], momDaughter[0], momDaughter[1], momDaughter[2]);
317+
mKinkMotherPt = (ptRecalc > 0.f) ? ptRecalc : std::hypot(momMother[0], momMother[1]);
323318
}
324319

325320
template <typename T>
@@ -450,7 +445,7 @@ class KinkBuilder
450445
continue;
451446
}
452447
// compute qa variables before applying selections
453-
mKinkSelection.computeQaVariables(kink, tracks);
448+
mKinkSelection.computeKinkKinematics(kink, tracks, col);
454449
mKinkSelection.applySelections(kink, tracks);
455450
if (!mKinkSelection.passesAllRequiredSelections()) {
456451
continue;
@@ -484,7 +479,7 @@ class KinkBuilder
484479
continue;
485480
}
486481
// compute qa variables before applying selections
487-
mKinkSelection.computeQaVariables(kink, tracks);
482+
mKinkSelection.computeKinkKinematics(kink, tracks, col);
488483
mKinkSelection.applySelections(kink, tracks);
489484
if (!mKinkSelection.passesAllRequiredSelections()) {
490485
continue;

0 commit comments

Comments
 (0)