Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

namespace o2::aod
{
namespace hf_selcandidate
namespace hf_selcandidate_d0
{
DECLARE_SOA_COLUMN(IsSelD0, isSelD0, int);
DECLARE_SOA_COLUMN(IsSelD0bar, isSelD0bar, int);
} // namespace hf_selcandidate
DECLARE_SOA_TABLE(HFSelD0Candidate, "AOD", "HFSELD0CAND", hf_selcandidate::IsSelD0, hf_selcandidate::IsSelD0bar);
} // namespace hf_selcandidate_d0
DECLARE_SOA_TABLE(HFSelD0Candidate, "AOD", "HFSELD0CAND", hf_selcandidate_d0::IsSelD0, hf_selcandidate_d0::IsSelD0bar);
} // namespace o2::aod

namespace o2::aod
Expand All @@ -27,7 +27,7 @@ namespace hf_selcandidate_lc
{
DECLARE_SOA_COLUMN(IsSelLc, isSelLc, int);
} // namespace hf_selcandidate_lc
DECLARE_SOA_TABLE(HFSelLcCandidate, "AOD", "HFSELLcCAND", hf_selcandidate_lc::IsSelLc);
DECLARE_SOA_TABLE(HFSelLcCandidate, "AOD", "HFSELLCCAND", hf_selcandidate_lc::IsSelLc);
} // namespace o2::aod

#endif // O2_ANALYSIS_HFCANDIDATESELECTIONTABLES_H_
56 changes: 25 additions & 31 deletions Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ static const int npTBins = 10;
static const int nCutVars = 8;
//temporary until 2D array in configurable is solved - then move to json
//m ptp ptk ptpi DCA sigmavtx dlenght cosp
constexpr double cuts[npTBins][nCutVars] = {{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* pt<1 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 1<pt<2 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 2<pt<3 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 3<pt<4 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 4<pt<5 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 5<pt<6 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 6<pt<8 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 8<pt<12 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 12<pt<24 */
{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}}; /* 24<pt<36 */
constexpr double cuts[npTBins][nCutVars] = {{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* pt<1 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 1<pt<2 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 2<pt<3 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 3<pt<4 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 4<pt<5 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 5<pt<6 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 6<pt<8 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 8<pt<12 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 12<pt<24 */
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}}; /* 24<pt<36 */

/// Struct for applying Lc selection cuts

Expand Down Expand Up @@ -65,8 +65,11 @@ struct HFLcCandidateSelector {
int getpTBin(T candpT)
{
double pTBins[npTBins + 1] = {0, 1., 2., 3., 4., 5., 6., 8., 12., 24., 36.};
if (candpT < pTBins[0] || candpT >= pTBins[npTBins]) {
return -1;
}
for (int i = 0; i < npTBins; i++) {
if (candpT >= pTBins[i] && candpT < pTBins[i + 1]) {
if (candpT < pTBins[i + 1]) {
return i;
}
}
Expand Down Expand Up @@ -187,23 +190,18 @@ struct HFLcCandidateSelector {
template <typename T>
bool selectionPIDTPC(const T& track, int nPDG, int nSigmaCut)
{
double nSigma = 0.0;
double nSigma = 100.0; //arbitarily large value
nPDG = TMath::Abs(nPDG);
if (nPDG == 2212) {
nSigma = track.tpcNSigmaPr();
} else if (nPDG == 321) {
nSigma = track.tpcNSigmaKa();
} else if (nPDG == 111) {
nSigma = track.tpcNSigmaPi();

} else {
return nSigma = 100; //arbitarily large value
}
if (nSigma < nSigmaCut) {
return true;
} else {
return false;
}
return nSigma < nSigmaCut;
}

/// Check if track is compatible with given TOF NSigma cut for a given flavour hypothesis
Expand All @@ -215,22 +213,18 @@ struct HFLcCandidateSelector {
template <typename T>
bool selectionPIDTOF(const T& track, int nPDG, int nSigmaCut)
{
double nSigma = 0.0;
double nSigma = 100.0; //arbitarily large value
nPDG = TMath::Abs(nPDG);
if (nPDG == 2212) {
nSigma = track.tofNSigmaPr();
} else if (nPDG == 321) {
nSigma = track.tofNSigmaKa();
} else if (nPDG == 321) {
nSigma = track.tofNSigmaPi();
} else {
return nSigma = 100; //arbitarily large value
}
if (nSigma < nSigmaCut) {
return true;
} else {
return false;
}
return nSigma < nSigmaCut;
}

/// PID selection on daughter track
Expand Down Expand Up @@ -287,7 +281,7 @@ struct HFLcCandidateSelector {
{
int statusLc; // final selection flag : 0-rejected 1-accepted
bool topolLc;
int pidLc, proton, kMinus, piPlus;
int pidLc, proton, kaonMinus, pionPlus;

for (auto& hfCandProng3 : hfCandProng3s) { //looping over 3 prong candidates

Expand All @@ -299,8 +293,8 @@ struct HFLcCandidateSelector {
topolLc = true;
pidLc = -1;
proton = -1;
kMinus = -1;
piPlus = -1;
kaonMinus = -1;
pionPlus = -1;

// daughter track validity selection
if (!daughterSelection(trackPos1) || !daughterSelection(trackNeg1) || !daughterSelection(trackPos2)) {
Expand All @@ -325,13 +319,13 @@ struct HFLcCandidateSelector {
}

proton = selectionPID(trackPos1, 2212);
kMinus = selectionPID(trackNeg1, 321);
piPlus = selectionPID(trackPos2, 211);
kaonMinus = selectionPID(trackNeg1, 321);
pionPlus = selectionPID(trackPos2, 211);

if (proton == 0 || kMinus == 0 || piPlus == 0) {
if (proton == 0 || kaonMinus == 0 || pionPlus == 0) {
pidLc = 0; //exclude Lc
}
if (proton == 1 && kMinus == 1 && piPlus == 1) {
if (proton == 1 && kaonMinus == 1 && pionPlus == 1) {
pidLc = 1; //accept Lc
}

Expand Down
2 changes: 1 addition & 1 deletion Analysis/Tasks/PWGHF/taskD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct TaskD0 {
Configurable<int> d_selectionFlagD0{"d_selectionFlagD0", 1, "Selection Flag for D0"};
Configurable<int> d_selectionFlagD0bar{"d_selectionFlagD0bar", 1, "Selection Flag for D0bar"};

Filter filterSelectCandidates = (aod::hf_selcandidate::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate::isSelD0bar >= d_selectionFlagD0bar);
Filter filterSelectCandidates = (aod::hf_selcandidate_d0::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate_d0::isSelD0bar >= d_selectionFlagD0bar);

void process(soa::Filtered<soa::Join<aod::HfCandProng2, aod::HFSelD0Candidate>> const& candidates)
{
Expand Down
2 changes: 1 addition & 1 deletion Analysis/Tasks/PWGJE/jetfinderhf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct JetFinderHFTask {
enum pdgCode { pdgD0 = 421 };

Filter trackCuts = (aod::track::pt > 0.15f && aod::track::eta > -0.9f && aod::track::eta < 0.9f);
Filter seltrack = (aod::hf_selcandidate::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate::isSelD0bar >= d_selectionFlagD0bar);
Filter seltrack = (aod::hf_selcandidate_d0::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate_d0::isSelD0bar >= d_selectionFlagD0bar);

void process(aod::Collision const& collision,
soa::Filtered<aod::Tracks> const& tracks,
Expand Down