Skip to content

Commit da338e1

Browse files
authored
[PWGLF] Add kaon hypothesis in PID (#10213)
1 parent d8f9e8d commit da338e1

File tree

1 file changed

+35
-213
lines changed

1 file changed

+35
-213
lines changed

PWGLF/Tasks/Resonances/highmasslambda.cxx

Lines changed: 35 additions & 213 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ struct highmasslambda {
153153

154154
using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::FV0Mults, aod::TPCMults, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0Cs, aod::CentFT0As, aod::EPCalibrationTables, aod::Mults>>;
155155

156-
using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPr, aod::pidTOFFullPr>>;
156+
using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullKa, aod::pidTOFFullKa>>;
157157
using AllTrackCandidates = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi>;
158158
using ResoV0s = aod::V0Datas;
159159

160-
using TrackCandidatesSvx = soa::Filtered<soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPr, aod::pidTOFFullPr>>;
160+
using TrackCandidatesSvx = soa::Filtered<soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullKa, aod::pidTOFFullKa>>;
161161
using AllTrackCandidatesSvx = soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi>;
162162
using ResoV0sSvx = soa::Join<aod::V0Datas, aod::V0Covs, aod::V0DauCovs>;
163163

@@ -179,6 +179,7 @@ struct highmasslambda {
179179
std::vector<double> ptV0Binning = {0.0, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.5, 100.0};
180180
std::vector<double> dcaBetweenV0 = {0.0, 0.05, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0};
181181
std::vector<double> dcaBetweenProtonV0 = {-2.0, -1.0, -0.5, -0.4, -0.3, -0.2, -0.18, -0.16, -0.14, -0.12, -0.1, -0.08, -0.06, -0.05, -0.04, -0.03, -0.025, -0.02, -0.01, -0.005, -0.004, -0.003, -0.003, -0.002, -0.001, 0.0, 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.01, 0.012, 0.014, 0.016, 0.018, 0.02, 0.025, 0.03, 0.04, 0.05, 0.06, 0.08, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.3, 0.4, 0.5, 1.0, 2.0};
182+
std::vector<double> nsigmaKaon = {-0.1, 0.0, 0.005, 0.01, 0.03, 0.05, 0.1, 0.15, 0.2, 0.5, 0.8, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 4.5, 5.0, 6.0, 8.0, 10.0, 20.0, 100.0, 1000.0};
182183
AxisSpec resAxis = {1600, -30, 30, "Res"};
183184
AxisSpec phiAxis = {500, -6.28, 6.28, "phi"};
184185
AxisSpec centAxis = {8, 0, 80, "V0M (%)"};
@@ -209,8 +210,8 @@ struct highmasslambda {
209210
histos.add("hOccupancy", "Occupancy", kTH1F, {{5000, -0.5, 50000.5}});
210211
histos.add("hRotation", "hRotation", kTH1F, {{360, 0.0, 2.0 * TMath::Pi()}});
211212
histos.add("hEta", "Eta distribution", kTH1F, {{200, -1.0f, 1.0f}});
212-
histos.add("hDcaxy", "Dcaxy distribution", kTH1F, {{1000, -0.5f, 0.5f}});
213-
histos.add("hDcaz", "Dcaz distribution", kTH1F, {{1000, -0.5f, 0.5f}});
213+
histos.add("hDcaxy", "Dcaxy distribution", kTH2F, {{1000, -0.5f, 0.5f}, {100, 0.0f, 10.0f}});
214+
histos.add("hDcaz", "Dcaz distribution", kTH2F, {{1000, -0.5f, 0.5f}, {100, 0.0f, 10.0f}});
214215
histos.add("hNsigmaProtonITS", "NsigmaProton ITS distribution", kTH2F, {{100, -5.0f, 5.0f}, {60, 0.0f, 6.0f}});
215216
histos.add("hNsigmaProtonTPC", "NsigmaProton TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {60, 0.0f, 6.0f}});
216217
histos.add("hNsigmaProtonTOF", "NsigmaProton TOF distribution", kTH2F, {{1000, -50.0f, 50.0f}, {60, 0.0f, 6.0f}});
@@ -237,8 +238,8 @@ struct highmasslambda {
237238
histos.add("hSparseV2SAMixedEvent_V2", "hSparseV2SAMixedEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, dcaV0toPVBinning, cpaV0Binning, ptV0Binning, dcaBetweenV0, dcaBetweenProtonV0});
238239
}
239240
if (useKshortOpti == 2) {
240-
histos.add("hSparseV2SASameEvent_V2", "hSparseV2SASameEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDCA, dcaV0toPVBinning});
241-
histos.add("hSparseV2SAMixedEvent_V2", "hSparseV2SAMixedEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDCA, dcaV0toPVBinning});
241+
histos.add("hSparseV2SASameEvent_V2", "hSparseV2SASameEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDCA, nsigmaKaon});
242+
histos.add("hSparseV2SAMixedEvent_V2", "hSparseV2SAMixedEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDCA, nsigmaKaon});
242243
}
243244
// histogram for resolution
244245
histos.add("ResFT0CTPC", "ResFT0CTPC", kTH2F, {centAxis, resAxis});
@@ -269,6 +270,9 @@ struct highmasslambda {
269270
if (!(candidate.isGlobalTrackWoDCA() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsCrossedRows() > cfgTPCcluster)) {
270271
return false;
271272
}
273+
if (std::abs(candidate.dcaXY()) > (0.0105 + (0.035 / TMath::Power(candidate.pt(), 1.1)))) {
274+
return false;
275+
}
272276
if (candidate.pt() > 0.0 && candidate.pt() < 0.5 && std::abs(candidate.dcaXY()) < cfgCutDCAxymin1) {
273277
return false;
274278
}
@@ -292,10 +296,10 @@ struct highmasslambda {
292296
bool selectionPID1(const T& candidate)
293297
{
294298
if (candidate.hasTOF()) {
295-
if (candidate.p() < 0.5 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
299+
if (candidate.pt() < 0.7 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
296300
return true;
297301
}
298-
if (candidate.p() >= 0.5 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
302+
if (candidate.p() >= 0.7 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
299303
return true;
300304
}
301305
}
@@ -306,207 +310,6 @@ struct highmasslambda {
306310
}
307311
return false;
308312
}
309-
310-
// TPC TOF
311-
template <typename T>
312-
bool selectionPID2(const T& candidate)
313-
{
314-
if (candidate.pt() < 0.7 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
315-
return true;
316-
}
317-
if (candidate.pt() >= 0.7 && candidate.pt() < 1.4) {
318-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
319-
return true;
320-
}
321-
if (!candidate.hasTOF()) {
322-
if (candidate.pt() >= 0.7 && candidate.pt() < 0.8 && candidate.tpcNSigmaPr() > -1.8 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
323-
return true;
324-
}
325-
if (candidate.pt() >= 0.8 && candidate.pt() < 0.9 && candidate.tpcNSigmaPr() > -1.7 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
326-
return true;
327-
}
328-
if (candidate.pt() >= 0.9 && candidate.pt() < 1.0 && candidate.tpcNSigmaPr() > -1.6 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
329-
return true;
330-
}
331-
if (candidate.pt() >= 1.0 && candidate.pt() < 1.4 && candidate.tpcNSigmaPr() > -1.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
332-
return true;
333-
}
334-
}
335-
}
336-
if (candidate.pt() >= 1.4) {
337-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
338-
return true;
339-
}
340-
if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
341-
return true;
342-
}
343-
}
344-
return false;
345-
}
346-
347-
// TPC TOF
348-
template <typename T>
349-
bool selectionPID3(const T& candidate)
350-
{
351-
if (candidate.pt() < 0.7 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
352-
return true;
353-
}
354-
if (candidate.pt() >= 0.7 && candidate.pt() < 1.8) {
355-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
356-
return true;
357-
}
358-
if (!candidate.hasTOF()) {
359-
if (candidate.pt() >= 0.7 && candidate.pt() < 0.8 && candidate.tpcNSigmaPr() > -1.8 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
360-
return true;
361-
}
362-
if (candidate.pt() >= 0.8 && candidate.pt() < 0.9 && candidate.tpcNSigmaPr() > -1.7 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
363-
return true;
364-
}
365-
if (candidate.pt() >= 0.9 && candidate.pt() < 1.0 && candidate.tpcNSigmaPr() > -1.6 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
366-
return true;
367-
}
368-
}
369-
}
370-
if (candidate.pt() >= 1.8) {
371-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
372-
return true;
373-
}
374-
if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
375-
return true;
376-
}
377-
}
378-
return false;
379-
}
380-
381-
// TPC TOF
382-
template <typename T>
383-
bool selectionPID4(const T& candidate)
384-
{
385-
if (candidate.pt() < 0.7 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
386-
return true;
387-
}
388-
if (candidate.pt() >= 0.7 && candidate.pt() < 1.4) {
389-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
390-
return true;
391-
}
392-
if (!candidate.hasTOF()) {
393-
if (candidate.pt() >= 0.7 && candidate.pt() < 0.8 && candidate.tpcNSigmaPr() > -1.8 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
394-
return true;
395-
}
396-
if (candidate.pt() >= 0.8 && candidate.pt() < 0.9 && candidate.tpcNSigmaPr() > -1.7 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
397-
return true;
398-
}
399-
if (candidate.pt() >= 0.9 && candidate.pt() < 1.0 && candidate.tpcNSigmaPr() > -1.6 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
400-
return true;
401-
}
402-
if (candidate.pt() >= 1.0 && candidate.pt() < 1.4 && candidate.tpcNSigmaPr() > -1.0 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
403-
return true;
404-
}
405-
}
406-
}
407-
if (candidate.pt() >= 1.4) {
408-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
409-
if (candidate.pt() < 2.5 && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
410-
return true;
411-
}
412-
if (candidate.pt() >= 2.5 && candidate.pt() < 4 && candidate.tofNSigmaPr() > -2.0 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
413-
return true;
414-
}
415-
if (candidate.pt() >= 4 && candidate.pt() < 5 && candidate.tofNSigmaPr() > -1.5 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
416-
return true;
417-
}
418-
if (candidate.pt() >= 5 && candidate.tofNSigmaPr() > -1.0 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
419-
return true;
420-
}
421-
}
422-
if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
423-
return true;
424-
}
425-
}
426-
return false;
427-
}
428-
429-
// TPC TOF
430-
template <typename T>
431-
bool selectionPID5(const T& candidate)
432-
{
433-
if (candidate.pt() < 0.7 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
434-
return true;
435-
}
436-
if (candidate.pt() >= 0.7 && candidate.pt() < 1.8) {
437-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
438-
return true;
439-
}
440-
if (!candidate.hasTOF()) {
441-
if (candidate.pt() >= 0.7 && candidate.pt() < 0.8 && candidate.tpcNSigmaPr() > -1.8 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
442-
return true;
443-
}
444-
if (candidate.pt() >= 0.8 && candidate.pt() < 0.9 && candidate.tpcNSigmaPr() > -1.7 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
445-
return true;
446-
}
447-
if (candidate.pt() >= 0.9 && candidate.pt() < 1.0 && candidate.tpcNSigmaPr() > -1.6 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
448-
return true;
449-
}
450-
}
451-
}
452-
if (candidate.pt() >= 1.8) {
453-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
454-
if (candidate.pt() < 2.5 && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
455-
return true;
456-
}
457-
if (candidate.pt() >= 2.5 && candidate.pt() < 4 && candidate.tofNSigmaPr() > -2.0 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
458-
return true;
459-
}
460-
if (candidate.pt() >= 4 && candidate.pt() < 5 && candidate.tofNSigmaPr() > -1.5 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
461-
return true;
462-
}
463-
if (candidate.pt() >= 5 && candidate.tofNSigmaPr() > -1.0 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
464-
return true;
465-
}
466-
}
467-
if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
468-
return true;
469-
}
470-
}
471-
return false;
472-
}
473-
// TPC TOF
474-
template <typename T>
475-
bool selectionPID6(const T& candidate)
476-
{
477-
if (candidate.pt() < 0.7 && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
478-
return true;
479-
}
480-
if (candidate.pt() >= 0.7) {
481-
if (candidate.hasTOF() && std::abs(candidate.tpcNSigmaPr()) < nsigmaCutTPC) {
482-
if (candidate.pt() < 2.5 && std::abs(candidate.tofNSigmaPr()) < nsigmaCutTOF) {
483-
return true;
484-
}
485-
if (candidate.pt() >= 2.5 && candidate.pt() < 4 && candidate.tofNSigmaPr() > -2.0 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
486-
return true;
487-
}
488-
if (candidate.pt() >= 4 && candidate.pt() < 5 && candidate.tofNSigmaPr() > -1.5 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
489-
return true;
490-
}
491-
if (candidate.pt() >= 5 && candidate.tofNSigmaPr() > -1.0 && candidate.tofNSigmaPr() < nsigmaCutTOF) {
492-
return true;
493-
}
494-
}
495-
if (!candidate.hasTOF()) {
496-
if (candidate.pt() >= 0.7 && candidate.pt() < 0.8 && candidate.tpcNSigmaPr() > -1.8 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
497-
return true;
498-
}
499-
if (candidate.pt() >= 0.8 && candidate.pt() < 0.9 && candidate.tpcNSigmaPr() > -1.7 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
500-
return true;
501-
}
502-
if (candidate.pt() >= 0.9 && candidate.pt() < 1.0 && candidate.tpcNSigmaPr() > -1.6 && candidate.tpcNSigmaPr() < nsigmaCutTPC) {
503-
return true;
504-
}
505-
}
506-
}
507-
return false;
508-
}
509-
510313
// TPC TOF
511314
template <typename T>
512315
bool selectionPID7(const T& candidate)
@@ -650,6 +453,19 @@ struct highmasslambda {
650453
return false;
651454
}
652455

456+
template <typename T>
457+
double combinekaon(const T& candidate)
458+
{
459+
if (candidate.pt() < 0.7) {
460+
return std::abs(candidate.tpcNSigmaKa());
461+
} else if (candidate.pt() >= 0.7 && candidate.hasTOF()) {
462+
return std::sqrt((candidate.tofNSigmaKa() * candidate.tofNSigmaKa() + candidate.tpcNSigmaKa() * candidate.tpcNSigmaKa()) / 2.0);
463+
} else if (candidate.pt() >= 0.7 && !candidate.hasTOF()) {
464+
return std::abs(candidate.tpcNSigmaKa());
465+
}
466+
return -0.1;
467+
}
468+
653469
template <typename Collision, typename V0>
654470
bool SelectionV0(Collision const& collision, V0 const& candidate)
655471
{
@@ -803,9 +619,12 @@ struct highmasslambda {
803619
if (PIDstrategy == 3 && !selectionPID10(track1)) {
804620
continue;
805621
}
622+
if (PIDstrategy == 4 && !selectionPID1(track1)) {
623+
continue;
624+
}
806625
histos.fill(HIST("hEta"), track1.eta());
807-
histos.fill(HIST("hDcaxy"), track1.dcaXY());
808-
histos.fill(HIST("hDcaz"), track1.dcaZ());
626+
histos.fill(HIST("hDcaxy"), track1.dcaXY(), track1.pt());
627+
histos.fill(HIST("hDcaz"), track1.dcaZ(), track1.pt());
809628
histos.fill(HIST("hNsigmaProtonTPC"), track1.tpcNSigmaPr(), track1.pt());
810629
if (track1.hasTOF()) {
811630
histos.fill(HIST("hNsigmaProtonTOF"), track1.tofNSigmaPr(), track1.pt());
@@ -868,7 +687,7 @@ struct highmasslambda {
868687
histos.fill(HIST("hSparseV2SASameEvent_V2"), Lambdac.M(), Lambdac.Pt(), dcaV0toPV, cpaV0, ptV0, dcaV0Daughters, dcaProtonV0);
869688
}
870689
if (useKshortOpti == 2) {
871-
histos.fill(HIST("hSparseV2SASameEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), dcaV0toPV);
690+
histos.fill(HIST("hSparseV2SASameEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), combinekaon(track1));
872691
}
873692
}
874693
if (fillRotation) {
@@ -959,6 +778,9 @@ struct highmasslambda {
959778
if (PIDstrategy == 3 && !selectionPID10(track1)) {
960779
continue;
961780
}
781+
if (PIDstrategy == 4 && !selectionPID1(track1)) {
782+
continue;
783+
}
962784
if (!SelectionV0(collision2, v0)) {
963785
continue;
964786
}
@@ -997,7 +819,7 @@ struct highmasslambda {
997819
histos.fill(HIST("hSparseV2SAMixedEvent_V2"), Lambdac.M(), Lambdac.Pt(), dcaV0toPV, cpaV0, ptV0, dcaV0Daughters, dcaProtonV0);
998820
}
999821
if (useKshortOpti == 2) {
1000-
histos.fill(HIST("hSparseV2SAMixedEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), dcaV0toPV);
822+
histos.fill(HIST("hSparseV2SAMixedEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), combinekaon(track1));
1001823
}
1002824
}
1003825
}

0 commit comments

Comments
 (0)