Skip to content

Commit 47d1a6a

Browse files
authored
Update of the Lc->pKpi selector and task (#5013)
1 parent 84a0e52 commit 47d1a6a

File tree

7 files changed

+202
-98
lines changed

7 files changed

+202
-98
lines changed

Analysis/DataModel/include/AnalysisDataModel/HFCandidateSelectionTables.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ namespace o2::aod
2525
{
2626
namespace hf_selcandidate_lc
2727
{
28-
DECLARE_SOA_COLUMN(IsSelLc, isSelLc, int);
28+
DECLARE_SOA_COLUMN(IsSelLcpKpi, isSelLcpKpi, int);
29+
DECLARE_SOA_COLUMN(IsSelLcpiKp, isSelLcpiKp, int);
2930
} // namespace hf_selcandidate_lc
30-
DECLARE_SOA_TABLE(HFSelLcCandidate, "AOD", "HFSELLCCAND", hf_selcandidate_lc::IsSelLc);
31+
DECLARE_SOA_TABLE(HFSelLcCandidate, "AOD", "HFSELLCCAND", hf_selcandidate_lc::IsSelLcpKpi, hf_selcandidate_lc::IsSelLcpiKp);
3132
} // namespace o2::aod
3233

3334
#endif // O2_ANALYSIS_HFCANDIDATESELECTIONTABLES_H_

Analysis/DataModel/include/AnalysisDataModel/HFSecondaryVertex.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ DECLARE_SOA_TABLE(HfCandProng2Base, "AOD", "HFCANDP2BASE",
234234
hf_cand::ImpactParameter0, hf_cand::ImpactParameter1,
235235
hf_cand::ErrorImpactParameter0, hf_cand::ErrorImpactParameter1,
236236
hf_track_index::Index0Id, hf_track_index::Index1Id,
237+
hf_track_index::HFflag,
237238
/* dynamic columns */
238239
hf_cand_prong2::M<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
239240
hf_cand_prong2::M2<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1>,
@@ -340,10 +341,16 @@ auto ELc(const T& candidate)
340341
}
341342

342343
template <typename T>
343-
auto InvMassLc(const T& candidate)
344+
auto InvMassLcpKpi(const T& candidate)
344345
{
345346
return candidate.m(array{RecoDecay::getMassPDG(kProton), RecoDecay::getMassPDG(kKPlus), RecoDecay::getMassPDG(kPiPlus)});
346347
}
348+
349+
template <typename T>
350+
auto InvMassLcpiKp(const T& candidate)
351+
{
352+
return candidate.m(array{RecoDecay::getMassPDG(kPiPlus), RecoDecay::getMassPDG(kKPlus), RecoDecay::getMassPDG(kProton)});
353+
}
347354
} // namespace hf_cand_prong3
348355

349356
// 3-prong decay candidate table
@@ -357,6 +364,7 @@ DECLARE_SOA_TABLE(HfCandProng3Base, "AOD", "HFCANDP3BASE",
357364
hf_cand::ImpactParameter0, hf_cand::ImpactParameter1, hf_cand::ImpactParameter2,
358365
hf_cand::ErrorImpactParameter0, hf_cand::ErrorImpactParameter1, hf_cand::ErrorImpactParameter2,
359366
hf_track_index::Index0Id, hf_track_index::Index1Id, hf_track_index::Index2Id,
367+
hf_track_index::HFflag,
360368
/* dynamic columns */
361369
hf_cand_prong3::M<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, hf_cand::PxProng2, hf_cand::PyProng2, hf_cand::PzProng2>,
362370
hf_cand_prong3::M2<hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0, hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, hf_cand::PxProng2, hf_cand::PyProng2, hf_cand::PzProng2>,

Analysis/Tasks/PWGHF/HFCandidateCreator2Prong.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ struct HFCandidateCreator2Prong {
115115
pvec1[0], pvec1[1], pvec1[2],
116116
impactParameter0.getY(), impactParameter1.getY(),
117117
std::sqrt(impactParameter0.getSigmaY2()), std::sqrt(impactParameter1.getSigmaY2()),
118-
rowTrackIndexProng2.index0Id(), rowTrackIndexProng2.index1Id());
118+
rowTrackIndexProng2.index0Id(), rowTrackIndexProng2.index1Id(),
119+
rowTrackIndexProng2.hfflag());
119120

120121
// fill histograms
121122
if (b_dovalplots) {

Analysis/Tasks/PWGHF/HFCandidateCreator3Prong.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ struct HFCandidateCreator3Prong {
121121
pvec2[0], pvec2[1], pvec2[2],
122122
impactParameter0.getY(), impactParameter1.getY(), impactParameter2.getY(),
123123
std::sqrt(impactParameter0.getSigmaY2()), std::sqrt(impactParameter1.getSigmaY2()), std::sqrt(impactParameter2.getSigmaY2()),
124-
rowTrackIndexProng3.index0Id(), rowTrackIndexProng3.index1Id(), rowTrackIndexProng3.index2Id());
124+
rowTrackIndexProng3.index0Id(), rowTrackIndexProng3.index1Id(), rowTrackIndexProng3.index2Id(),
125+
rowTrackIndexProng3.hfflag());
125126

126127
// fill histograms
127128
if (b_dovalplots) {

Analysis/Tasks/PWGHF/HFD0CandidateSelector.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ struct HFD0CandidateSelector {
177177
}
178178
}
179179

180-
if (TMath::Abs(trackPion.pt()) < TMath::Abs(cuts[pTBin][4]) || TMath::Abs(trackKaon.pt()) < TMath::Abs(cuts[pTBin][3])) {
180+
if (trackPion.pt() < cuts[pTBin][4] || trackKaon.pt() < cuts[pTBin][3]) {
181181
return false; //cut on daughter pT
182182
}
183183
if (TMath::Abs(trackPion.dcaPrim0()) > cuts[pTBin][6] || TMath::Abs(trackKaon.dcaPrim0()) > cuts[pTBin][5]) {

Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx

Lines changed: 62 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/// \file HFD0CandidateSelector.cxx
1212
/// \brief Lc->pKpi selection task.
1313
///
14-
/// \author Luigi Dello Stritto <luigi.dellostritto@cern.ch>, CERN
14+
/// \author Luigi Dello Stritto <luigi.dello.stritto@cern.ch>, University and INFN SALERNO
1515
/// \author Nima Zardoshti <nima.zardoshti@cern.ch>, CERN
1616

1717
#include "Framework/runDataProcessing.h"
@@ -27,19 +27,18 @@ static const int npTBins = 10;
2727
static const int nCutVars = 8;
2828
//temporary until 2D array in configurable is solved - then move to json
2929
//m ptp ptk ptpi DCA sigmavtx dlenght cosp
30-
constexpr double cuts[npTBins][nCutVars] = {{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* pt<1 */
31-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 1<pt<2 */
32-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 2<pt<3 */
33-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 3<pt<4 */
34-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 4<pt<5 */
35-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 5<pt<6 */
36-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 6<pt<8 */
37-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 8<pt<12 */
38-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}, /* 12<pt<24 */
39-
{0.5, 0.2, 0.2, 0.2, 0.05, 0.09, 0.005, 0.}}; /* 24<pt<36 */
30+
constexpr double cuts[npTBins][nCutVars] = {{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* pt<1 */
31+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 1<pt<2 */
32+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 2<pt<3 */
33+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 3<pt<4 */
34+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 4<pt<5 */
35+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 5<pt<6 */
36+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 6<pt<8 */
37+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 8<pt<12 */
38+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 12<pt<24 */
39+
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}}; /* 24<pt<36 */
4040

4141
/// Struct for applying Lc selection cuts
42-
4342
struct HFLcCandidateSelector {
4443

4544
Produces<aod::HFSelLcCandidate> hfSelLcCandidate;
@@ -107,15 +106,16 @@ struct HFLcCandidateSelector {
107106
if (candpT < d_pTCandMin || candpT >= d_pTCandMax) {
108107
return false; //check that the candidate pT is within the analysis range
109108
}
109+
110110
if (hfCandProng3.cpa() <= cuts[pTBin][7]) {
111111
return false; //cosine of pointing angle
112112
}
113-
// if (hfCandProng3.dca() > cuts[pTBin][4]) return false; //candidate DCA
114-
if (hfCandProng3.chi2PCA() > cuts[pTBin][5]) { //candidate DCA
113+
114+
/* if (hfCandProng3.chi2PCA() > cuts[pTBin][5]) { //candidate DCA
115115
return false;
116-
}
116+
}*/
117117

118-
if (hfCandProng3.decayLength() * hfCandProng3.decayLength() < cuts[pTBin][6] * cuts[pTBin][6]) {
118+
if (hfCandProng3.decayLength() <= cuts[pTBin][6]) {
119119
return false;
120120
}
121121
return true;
@@ -126,7 +126,6 @@ struct HFLcCandidateSelector {
126126
/// \param trackProton is the track with the proton hypothesis
127127
/// \param trackPion is the track with the pion hypothesis
128128
/// \param trackKaon is the track with the kaon hypothesis
129-
/// \note trackPion = positive and trackKaon = negative for D0 selection and inverse for D0bar
130129
/// \return true if candidate passes all cuts for the given Conjugate
131130
template <typename T1, typename T2>
132131
bool selectionTopolConjugate(const T1& hfCandProng3, const T2& trackProton, const T2& trackKaon, const T2& trackPion)
@@ -138,18 +137,19 @@ struct HFLcCandidateSelector {
138137
return false;
139138
}
140139

141-
//invariant mass cut
142-
if (TMath::Abs(InvMassLc(hfCandProng3) - RecoDecay::getMassPDG(4122)) > cuts[pTBin][0]) {
143-
return false;
144-
}
145-
146-
if (TMath::Abs(trackProton.pt()) < TMath::Abs(cuts[pTBin][1]) || TMath::Abs(trackKaon.pt()) < TMath::Abs(cuts[pTBin][2]) || TMath::Abs(trackPion.pt()) < TMath::Abs(cuts[pTBin][3])) {
140+
if (trackProton.pt() < cuts[pTBin][1] || trackKaon.pt() < cuts[pTBin][2] || trackPion.pt() < cuts[pTBin][3]) {
147141
return false; //cut on daughter pT
148142
}
149143

150-
/* if (TMath::Sqrt( trackProton.dcaPrim0()*trackProton.dcaPrim0() + trackKaon.dcaPrim0()*trackKaon.dcaPrim0() + trackPion.dcaPrim0()*trackPion.dcaPrim0() ) > cuts[pTBin][5]) {
151-
return false; //cut on daughter dca - need to add secondary vertex constraint here
152-
}*/
144+
if (trackProton.globalIndex() == hfCandProng3.index0Id()) {
145+
if (TMath::Abs(InvMassLcpKpi(hfCandProng3) - RecoDecay::getMassPDG(4122)) > cuts[pTBin][0]) {
146+
return false;
147+
}
148+
} else {
149+
if (TMath::Abs(InvMassLcpiKp(hfCandProng3) - RecoDecay::getMassPDG(4122)) > cuts[pTBin][0]) {
150+
return false;
151+
}
152+
}
153153

154154
return true;
155155
}
@@ -190,17 +190,17 @@ struct HFLcCandidateSelector {
190190
template <typename T>
191191
bool selectionPIDTPC(const T& track, int nPDG, int nSigmaCut)
192192
{
193-
double nSigma = 100.0; //arbitarily large value
193+
double nSigma = 1.0; //arbitarily large value
194194
nPDG = TMath::Abs(nPDG);
195-
if (nPDG == 2212) {
195+
/* if (nPDG == 2212) {
196196
nSigma = track.tpcNSigmaPr();
197197
} else if (nPDG == 321) {
198198
nSigma = track.tpcNSigmaKa();
199199
} else if (nPDG == 111) {
200200
nSigma = track.tpcNSigmaPi();
201201
} else {
202202
return false;
203-
}
203+
}*/
204204
return nSigma < nSigmaCut;
205205
}
206206

@@ -213,17 +213,17 @@ struct HFLcCandidateSelector {
213213
template <typename T>
214214
bool selectionPIDTOF(const T& track, int nPDG, int nSigmaCut)
215215
{
216-
double nSigma = 100.0; //arbitarily large value
216+
double nSigma = 1.; //arbitarily large value
217217
nPDG = TMath::Abs(nPDG);
218-
if (nPDG == 2212) {
218+
/* if (nPDG == 2212) {
219219
nSigma = track.tofNSigmaPr();
220220
} else if (nPDG == 321) {
221221
nSigma = track.tofNSigmaKa();
222222
} else if (nPDG == 321) {
223223
nSigma = track.tofNSigmaPi();
224224
} else {
225225
return false;
226-
}
226+
}*/
227227
return nSigma < nSigmaCut;
228228
}
229229

@@ -279,42 +279,53 @@ struct HFLcCandidateSelector {
279279

280280
void process(aod::HfCandProng3 const& hfCandProng3s, aod::BigTracksPID const& tracks)
281281
{
282-
int statusLc; // final selection flag : 0-rejected 1-accepted
283-
bool topolLc;
282+
int statusLcpKpi, statusLcpiKp; // final selection flag : 0-rejected 1-accepted
283+
bool topolLcpKpi, topolLcpiKp;
284284
int pidLc, proton, kaonMinus, pionPlus;
285285

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

288-
auto trackPos1 = hfCandProng3.index0_as<aod::BigTracksPID>(); //positive daughter
289-
auto trackNeg1 = hfCandProng3.index1_as<aod::BigTracksPID>(); //negative daughter
290-
auto trackPos2 = hfCandProng3.index2_as<aod::BigTracksPID>(); //positive daughter
288+
statusLcpKpi = 0;
289+
statusLcpiKp = 0;
290+
int LcFlag = hfCandProng3.hfflag();
291291

292-
statusLc = 0;
293-
topolLc = true;
292+
if (!(LcFlag & 1 << 1)) {
293+
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
294+
continue;
295+
}
296+
297+
auto trackPos1 = hfCandProng3.index0_as<aod::BigTracksPID>(); //positive daughter (negative for the antiparticles)
298+
auto trackNeg1 = hfCandProng3.index1_as<aod::BigTracksPID>(); //negative daughter (positive for the antiparticles)
299+
auto trackPos2 = hfCandProng3.index2_as<aod::BigTracksPID>(); //positive daughter (negative for the antiparticles)
300+
301+
topolLcpKpi = true;
302+
topolLcpiKp = true;
294303
pidLc = -1;
295304
proton = -1;
296305
kaonMinus = -1;
297306
pionPlus = -1;
298307

299308
// daughter track validity selection
300309
if (!daughterSelection(trackPos1) || !daughterSelection(trackNeg1) || !daughterSelection(trackPos2)) {
301-
hfSelLcCandidate(statusLc);
310+
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
302311
continue;
303312
}
304313

305314
//implement filter bit 4 cut - should be done before this task at the track selection level
306315

307316
//conjugate independent topological selection
308317
if (!selectionTopol(hfCandProng3)) {
309-
hfSelLcCandidate(statusLc);
318+
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
310319
continue;
311320
}
312321

313322
//conjugate dependent toplogical selection for Lc
314-
topolLc = selectionTopolConjugate(hfCandProng3, trackPos1, trackNeg1, trackPos2);
315323

316-
if (!topolLc) {
317-
hfSelLcCandidate(statusLc);
324+
topolLcpKpi = selectionTopolConjugate(hfCandProng3, trackPos1, trackNeg1, trackPos2);
325+
topolLcpiKp = selectionTopolConjugate(hfCandProng3, trackPos2, trackNeg1, trackPos1);
326+
327+
if (!topolLcpKpi && !topolLcpiKp) {
328+
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
318329
continue;
319330
}
320331

@@ -330,15 +341,18 @@ struct HFLcCandidateSelector {
330341
}
331342

332343
if (pidLc == 0) {
333-
hfSelLcCandidate(statusLc);
344+
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
334345
continue;
335346
}
336347

337-
if ((pidLc == -1 || pidLc == 1) && topolLc) {
338-
statusLc = 1; //identified as Lc
348+
if ((pidLc == -1 || pidLc == 1) && topolLcpKpi) {
349+
statusLcpKpi = 1; //identified as Lc
350+
}
351+
if ((pidLc == -1 || pidLc == 1) && topolLcpiKp) {
352+
statusLcpiKp = 1; //identified as Lc
339353
}
340354

341-
hfSelLcCandidate(statusLc);
355+
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
342356
}
343357
}
344358
};

0 commit comments

Comments
 (0)