Skip to content

Commit 26a1270

Browse files
committed
Add single track cuts too
1 parent 8395b90 commit 26a1270

1 file changed

Lines changed: 32 additions & 11 deletions

File tree

PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,25 @@ struct HfCandidateCreatorXicToXiPiPi {
237237
/// \param nSigTofPiFromLambda is the TOF n-sigma for the pion track from the Lambda decay with pion hypothesis
238238
/// \param nSigTpcPrFromLambda is the TPC n-sigma for the proton track from the Lambda decay with proton hypothesis
239239
/// \param nSigTofPrFromLambda is the TOF n-sigma for the proton track from the Lambda decay with proton hypothesis
240+
/// \param hasTofBachelorPi is true if the Xi bachelor track has TOF information, otherwise false
241+
/// \param hasTofPiFromLambda is true if the pion track from the Lambda decay has TOF information, otherwise false
242+
/// \param hasTofPrFromLambda is true if the proton track from the Lambda decay has TOF information, otherwise false
243+
/// \param nClsTpc is the array with the number of TPC clusters for each track
244+
/// \param nCrossedRowsTpc is the array with the number of crossed rows in the TPC for each track
245+
/// \param crossedRowsOverFindableClsTpc is the array with the ratio of crossed rows over findable clusters in the TPC for each track
240246
/// \return true if the candidate passes the software trigger selections, otherwise false
241247
template <typename TTrackParCov, typename Coll>
242-
bool isSelectedXicSoftwareTriggers(std::array<float, 3> const& pVecCascade, std::array<TTrackParCov, 2> const& trackParBachelor, Coll const& collision, float nSigTpcBachelorPi, float nSigTofBachelorPi, float nSigTpcPiFromLambda, float nSigTofPiFromLambda, float nSigTpcPrFromLambda, float nSigTofPrFromLambda, bool hasTofBachelorPi, bool hasTofPiFromLambda, bool hasTofPrFromLambda)
248+
bool isSelectedXicSoftwareTriggers(std::array<float, 3> const& pVecCascade, std::array<TTrackParCov, 2> const& trackParBachelor, Coll const& collision, float nSigTpcBachelorPi, float nSigTofBachelorPi, float nSigTpcPiFromLambda, float nSigTofPiFromLambda, float nSigTpcPrFromLambda, float nSigTofPrFromLambda, bool hasTofBachelorPi, bool hasTofPiFromLambda, bool hasTofPrFromLambda, std::array<int16_t, 3>& nClsTpc, std::array<int16_t, 3>& nCrossedRowsTpc, std::array<float, 3>& crossedRowsOverFindableClsTpc)
243249
{
250+
constexpr int16_t numClsTpcMin = 70;
251+
constexpr int16_t numCrossedRowsTpcMin = 70;
252+
constexpr float crossedRowsOverFindableClsTpcMin = 0.8f;
253+
for (int iTrack{0}; iTrack < 3; ++iTrack) {
254+
if (nClsTpc[iTrack] < numClsTpcMin || nCrossedRowsTpc[iTrack] < numCrossedRowsTpcMin || crossedRowsOverFindableClsTpc[iTrack] < crossedRowsOverFindableClsTpcMin) {
255+
return false;
256+
}
257+
}
258+
244259
if (std::abs(nSigTpcBachelorPi) < softTrigCuts.maxNsigmaXiDaus || (hasTofBachelorPi && std::abs(nSigTofBachelorPi) < softTrigCuts.maxNsigmaXiDaus)) {
245260
return false;
246261
}
@@ -378,9 +393,9 @@ struct HfCandidateCreatorXicToXiPiPi {
378393
float pPiFromLambda{}, pPrFromLambda{}, pPionFromXi{}, ptPionFromXi{}, nSigTpcBachelorPi{}, nSigTofBachelorPi{}, nSigTpcPiFromLambda{}, nSigTofPiFromLambda{}, nSigTpcPrFromLambda{}, nSigTofPrFromLambda{};
379394
if (softTrigCuts.applySoftwareTrigSelections) {
380395
// get PID information already here
381-
auto trackPionFromXi = casc.bachelor_as<TracksWCovExtraPidPrPi>();
382-
auto trackPosLambdaDaughter = casc.posTrack_as<TracksWCovExtraPidPrPi>();
383-
auto trackNegLambdaDaughter = casc.negTrack_as<TracksWCovExtraPidPrPi>();
396+
auto const& trackPionFromXi = casc.bachelor_as<TracksWCovExtraPidPrPi>();
397+
auto const& trackPosLambdaDaughter = casc.posTrack_as<TracksWCovExtraPidPrPi>();
398+
auto const& trackNegLambdaDaughter = casc.negTrack_as<TracksWCovExtraPidPrPi>();
384399
nSigTpcBachelorPi = trackPionFromXi.tpcNSigmaPi();
385400
nSigTofBachelorPi = trackPionFromXi.tofNSigmaPi();
386401
pPionFromXi = trackPionFromXi.p();
@@ -403,7 +418,10 @@ struct HfCandidateCreatorXicToXiPiPi {
403418
nSigTpcPrFromLambda = trackNegLambdaDaughter.tpcNSigmaPr();
404419
nSigTofPrFromLambda = trackNegLambdaDaughter.tofNSigmaPr();
405420
}
406-
if (!isSelectedXicSoftwareTriggers(pVecCasc, std::array{trackParCovCharmBachelor0, trackParCovCharmBachelor1}, collision, nSigTpcBachelorPi, nSigTofBachelorPi, nSigTpcPiFromLambda, nSigTofPiFromLambda, nSigTpcPrFromLambda, nSigTofPrFromLambda, hasTofBachelorPi, hasTofPiFromLambda, hasTofPrFromLambda)) {
421+
std::array<int16_t, 3> const nClsTpc = {trackPionFromXi.tpcNClsFound(), trackPosLambdaDaughter.tpcNClsFound(), trackNegLambdaDaughter.tpcNClsFound()};
422+
std::array<int16_t, 3> const nCrossedRowsTpc = {trackPionFromXi.tpcNClsCrossedRows(), trackPosLambdaDaughter.tpcNClsCrossedRows(), trackNegLambdaDaughter.tpcNClsCrossedRows()};
423+
std::array<float, 3> const crossedRowsOverFindableClsTpc = {trackPionFromXi.tpcCrossedRowsOverFindableCls(), trackPosLambdaDaughter.tpcCrossedRowsOverFindableCls(), trackNegLambdaDaughter.tpcCrossedRowsOverFindableCls()};
424+
if (!isSelectedXicSoftwareTriggers(pVecCasc, std::array{trackParCovCharmBachelor0, trackParCovCharmBachelor1}, collision, nSigTpcBachelorPi, nSigTofBachelorPi, nSigTpcPiFromLambda, nSigTofPiFromLambda, nSigTpcPrFromLambda, nSigTofPrFromLambda, hasTofBachelorPi, hasTofPiFromLambda, hasTofPrFromLambda, nClsTpc, nCrossedRowsTpc, crossedRowsOverFindableClsTpc)) {
407425
continue;
408426
}
409427
}
@@ -589,8 +607,8 @@ struct HfCandidateCreatorXicToXiPiPi {
589607
}
590608
auto casc = cascAodElement.kfCascData_as<KFCascFull>();
591609

592-
auto trackCharmBachelor0 = rowTrackIndexXicPlus.prong0_as<TracksWCovExtraPidPrPi>();
593-
auto trackCharmBachelor1 = rowTrackIndexXicPlus.prong1_as<TracksWCovExtraPidPrPi>();
610+
auto const& trackCharmBachelor0 = rowTrackIndexXicPlus.prong0_as<TracksWCovExtraPidPrPi>();
611+
auto const& trackCharmBachelor1 = rowTrackIndexXicPlus.prong1_as<TracksWCovExtraPidPrPi>();
594612

595613
// sign of charm baryon
596614
int8_t const signXic = casc.sign() < 0 ? +1 : -1;
@@ -599,9 +617,9 @@ struct HfCandidateCreatorXicToXiPiPi {
599617
float pPiFromLambda{}, pPrFromLambda{}, pPionFromXi{}, ptPionFromXi{}, nSigTpcBachelorPi{}, nSigTofBachelorPi{}, nSigTpcPiFromLambda{}, nSigTofPiFromLambda{}, nSigTpcPrFromLambda{}, nSigTofPrFromLambda{};
600618
if (softTrigCuts.applySoftwareTrigSelections) {
601619
// get PID information already here
602-
auto trackPionFromXi = casc.bachelor_as<TracksWCovExtraPidPrPi>();
603-
auto trackPosLambdaDaughter = casc.posTrack_as<TracksWCovExtraPidPrPi>();
604-
auto trackNegLambdaDaughter = casc.negTrack_as<TracksWCovExtraPidPrPi>();
620+
auto const& trackPionFromXi = casc.bachelor_as<TracksWCovExtraPidPrPi>();
621+
auto const& trackPosLambdaDaughter = casc.posTrack_as<TracksWCovExtraPidPrPi>();
622+
auto const& trackNegLambdaDaughter = casc.negTrack_as<TracksWCovExtraPidPrPi>();
605623
nSigTpcBachelorPi = trackPionFromXi.tpcNSigmaPi();
606624
nSigTofBachelorPi = trackPionFromXi.tofNSigmaPi();
607625
pPionFromXi = trackPionFromXi.p();
@@ -631,7 +649,10 @@ struct HfCandidateCreatorXicToXiPiPi {
631649
auto trackParCovCharmBachelor0 = getTrackParCov(trackCharmBachelor0);
632650
auto trackParCovCharmBachelor1 = getTrackParCov(trackCharmBachelor1);
633651
std::array<float, 3> const pVecCasc = {casc.px(), casc.py(), casc.pz()};
634-
if (!isSelectedXicSoftwareTriggers(pVecCasc, std::array{trackParCovCharmBachelor0, trackParCovCharmBachelor1}, collision, nSigTpcBachelorPi, nSigTofBachelorPi, nSigTpcPiFromLambda, nSigTofPiFromLambda, nSigTpcPrFromLambda, nSigTofPrFromLambda, hasTofBachelorPi, hasTofPiFromLambda, hasTofPrFromLambda)) {
652+
std::array<int16_t, 3> const nClsTpc = {trackPionFromXi.tpcNClsFound(), trackPosLambdaDaughter.tpcNClsFound(), trackNegLambdaDaughter.tpcNClsFound()};
653+
std::array<int16_t, 3> const nCrossedRowsTpc = {trackPionFromXi.tpcNClsCrossedRows(), trackPosLambdaDaughter.tpcNClsCrossedRows(), trackNegLambdaDaughter.tpcNClsCrossedRows()};
654+
std::array<float, 3> const crossedRowsOverFindableClsTpc = {trackPionFromXi.tpcCrossedRowsOverFindableCls(), trackPosLambdaDaughter.tpcCrossedRowsOverFindableCls(), trackNegLambdaDaughter.tpcCrossedRowsOverFindableCls()};
655+
if (!isSelectedXicSoftwareTriggers(pVecCasc, std::array{trackParCovCharmBachelor0, trackParCovCharmBachelor1}, collision, nSigTpcBachelorPi, nSigTofBachelorPi, nSigTpcPiFromLambda, nSigTofPiFromLambda, nSigTpcPrFromLambda, nSigTofPrFromLambda, hasTofBachelorPi, hasTofPiFromLambda, hasTofPrFromLambda, nClsTpc, nCrossedRowsTpc, crossedRowsOverFindableClsTpc)) {
635656
continue;
636657
}
637658
}

0 commit comments

Comments
 (0)