Skip to content

Commit 2eb00bb

Browse files
committed
Add Cd reconstruction workflow into the HF framework
1 parent fe3347d commit 2eb00bb

File tree

13 files changed

+1207
-88
lines changed

13 files changed

+1207
-88
lines changed

Common/Core/TrackSelectorPID.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#include <cstdint>
2626

27+
using namespace o2::constants::physics;
28+
2729
/// Class for track selection using PID detectors
2830

2931
struct TrackSelectorPID {
@@ -127,6 +129,8 @@ class TrackSelectorPidBase
127129
nSigma = track.tpcNSigmaKa();
128130
} else if constexpr (pdg == kProton) {
129131
nSigma = track.tpcNSigmaPr();
132+
} else if constexpr (pdg == kDeuteron) {
133+
nSigma = track.tpcNSigmaDe();
130134
} else {
131135
errorPdg();
132136
}
@@ -221,6 +225,8 @@ class TrackSelectorPidBase
221225
nSigma = track.tofNSigmaKa();
222226
} else if constexpr (pdg == kProton) {
223227
nSigma = track.tofNSigmaPr();
228+
} else if constexpr (pdg == kDeuteron) {
229+
nSigma = track.tofNSigmaDe();
224230
} else {
225231
errorPdg();
226232
}
@@ -551,6 +557,8 @@ class TrackSelectorPidBase
551557
return track.bayesID() == o2::track::PID::Kaon;
552558
} else if constexpr (pdg == kProton) {
553559
return track.bayesID() == o2::track::PID::Proton;
560+
} else if constexpr (pdg == kDeuteron) {
561+
return track.bayesID() == o2::track::PID::Deuteron;
554562
} else {
555563
errorPdg();
556564
return false;
@@ -579,6 +587,8 @@ class TrackSelectorPidBase
579587
prob = track.bayesKa();
580588
} else if constexpr (pdg == kProton) {
581589
prob = track.bayesPr();
590+
} else if constexpr (pdg == kDeuteron) {
591+
prob = track.bayesDe();
582592
} else {
583593
errorPdg();
584594
}
@@ -661,5 +671,6 @@ using TrackSelectorMu = TrackSelectorPidBase<kMuonMinus>; // Mu
661671
using TrackSelectorPi = TrackSelectorPidBase<kPiPlus>; // Pi
662672
using TrackSelectorKa = TrackSelectorPidBase<kKPlus>; // Ka
663673
using TrackSelectorPr = TrackSelectorPidBase<kProton>; // Pr
674+
using TrackSelectorDe = TrackSelectorPidBase<kDeuteron>; // De
664675

665676
#endif // COMMON_CORE_TRACKSELECTORPID_H_

PWGHF/Core/HfHelper.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,20 @@ class HfHelper
410410
return RecoDecay::m(std::array{candidate.pVectorProng2(), candidate.pVectorProng0()}, std::array{o2::constants::physics::MassProton, o2::constants::physics::MassPiPlus});
411411
}
412412

413+
// Cd± → De± K∓ π±
414+
415+
template <typename T>
416+
auto invMassCdToDeKPi(const T& candidate)
417+
{
418+
return candidate.m(std::array{o2::constants::physics::MassDeuteron, o2::constants::physics::MassKPlus, o2::constants::physics::MassPiPlus});
419+
}
420+
421+
template <typename T>
422+
auto invMassCdToPiKDe(const T& candidate)
423+
{
424+
return candidate.m(std::array{o2::constants::physics::MassPiPlus, o2::constants::physics::MassKPlus, o2::constants::physics::MassDeuteron});
425+
}
426+
413427
// Ξc± → p± K∓ π±
414428

415429
template <typename T>

PWGHF/Core/SelectorCuts.h

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ static const std::vector<std::string> labelsCutVarTrack = {"min_dcaxytoprimary",
6868
namespace hf_presel_pid
6969
{
7070
// default values for the PID cuts for protons in the track-index-skim-creator
71-
constexpr float CutsPid[4][6] = {{0.f, 1000.f, 5.f, 0.f, 1000.f, 5.f},
71+
constexpr float CutsPid[5][6] = {{0.f, 1000.f, 5.f, 0.f, 1000.f, 5.f},
72+
{0.f, 1000.f, 5.f, 0.f, 1000.f, 5.f},
7273
{0.f, 1000.f, 5.f, 0.f, 1000.f, 5.f},
7374
{0.f, 1000.f, 5.f, 0.f, 1000.f, 5.f},
7475
{0.f, 1000.f, 5.f, 0.f, 1000.f, 5.f}};
7576
static const std::vector<std::string> labelsCutsPid = {"minPtTpc", "maxPtTpc", "nSigmaMaxTpc", "minPtTof", "maxPtTof", "nSigmaMaxTof"};
76-
static const std::vector<std::string> labelsRowsPid = {"ProtonInLcToPKPi", "ProtonInXicToPKPi", "ProtonInLcToPK0S", "KaonIn3Prongs"};
77+
static const std::vector<std::string> labelsRowsPid = {"ProtonInLcToPKPi", "ProtonInXicToPKPi", "ProtonInLcToPK0S", "KaonIn3Prongs", "DeuteronInCdToDeKPi"};
7778
} // namespace hf_presel_pid
7879

7980
namespace hf_cuts_bdt_multiclass
@@ -1516,6 +1517,53 @@ static const std::vector<std::string> labelsPt = {
15161517
static const std::vector<std::string> labelsCutVar = {"max pKpi mass Lc", "max piKp mass Lc"};
15171518
} // namespace hf_cuts_sigmac_to_p_k_pi
15181519

1520+
namespace hf_cuts_cd_to_de_k_pi
1521+
{
1522+
static constexpr int NBinsPt = 6;
1523+
static constexpr int NCutVars = 11;
1524+
static constexpr int NCutKfVars = 12;
1525+
// default values for the pT bin edges (can be used to configure histogram axis)
1526+
// offset by 1 from the bin numbers in cuts array
1527+
constexpr double BinsPt[NBinsPt + 1] = {
1528+
0.,
1529+
2.,
1530+
4.,
1531+
6.,
1532+
8.,
1533+
12.,
1534+
24.};
1535+
const auto vecBinsPt = std::vector<double>{BinsPt, BinsPt + NBinsPt + 1};
1536+
1537+
// default values for the cuts m, ptP, ptK, ptPi, chi2PCA, dL, cosp, dLXY, NdLXY, ImpParXY, mass(Kpi)
1538+
constexpr double Cuts[NBinsPt][NCutVars] = {{0.4, 0.4, 0.4, 0.4, 0., 0.005, 0., 0., 0., 1e+10, -1.}, /* 0 < pT < 2 */
1539+
{0.4, 0.4, 0.4, 0.4, 0., 0.005, 0., 0., 0., 1e+10, -1.}, /* 2 < pT < 4 */
1540+
{0.4, 0.4, 0.4, 0.4, 0., 0.005, 0., 0., 0., 1e+10, -1.}, /* 4 < pT < 6 */
1541+
{0.4, 0.4, 0.4, 0.4, 0., 0.005, 0., 0., 0., 1e+10, -1.}, /* 6 < pT < 8 */
1542+
{0.4, 0.4, 0.4, 0.4, 0., 0.005, 0., 0., 0., 1e+10, -1.}, /* 8 < pT < 12 */
1543+
{0.4, 0.4, 0.4, 0.4, 0., 0.005, 0., 0., 0., 1e+10, -1.}}; /* 12 < pT < 24 */
1544+
1545+
// default value for the cuts Chi2Prim Chi2Geo DCA, cm Chi2Geo Chi2Topo
1546+
// P K Pi KPi PPi PK KPi PPi PK ↓ LdL ↓
1547+
constexpr double CutsKf[NBinsPt][NCutKfVars] = {{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 0 < pT < 2 */
1548+
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 2 < pT < 4 */
1549+
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 4 < pT < 6 */
1550+
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 6 < pT < 8 */
1551+
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 8 < pT < 12 */
1552+
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}}; /* 12 < pT < 24 */
1553+
1554+
// row labels
1555+
static const std::vector<std::string> labelsPt = {
1556+
"pT bin 0",
1557+
"pT bin 1",
1558+
"pT bin 2",
1559+
"pT bin 3",
1560+
"pT bin 4",
1561+
"pT bin 5"};
1562+
1563+
// column labels
1564+
static const std::vector<std::string> labelsCutVar = {"m", "pT De", "pT K", "pT Pi", "Chi2PCA", "decay length", "cos pointing angle", "decLengthXY", "normDecLXY", "impParXY", "mass (Kpi)"};
1565+
} // namespace hf_cuts_cd_to_de_k_pi
1566+
15191567
} // namespace o2::analysis
15201568

15211569
#endif // PWGHF_CORE_SELECTORCUTS_H_

0 commit comments

Comments
 (0)