Skip to content

Commit 56f2c13

Browse files
authored
Add shared TPC clusters to Li4 table (AliceO2Group#3680)
1 parent 0767e2d commit 56f2c13

File tree

2 files changed

+102
-22
lines changed

2 files changed

+102
-22
lines changed

PWGLF/DataModel/LFLithium4Tables.h

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ DECLARE_SOA_COLUMN(He3NSigmaTPC, he3NSigmaTPC, float);
4646
DECLARE_SOA_COLUMN(PrNSigmaTPC, prNSigmaTOF, float);
4747
DECLARE_SOA_COLUMN(He3MassTOF, he3MassTOF, float);
4848
DECLARE_SOA_COLUMN(PrMassTOF, prMassTOF, float);
49+
DECLARE_SOA_COLUMN(SharedClustersHe3, sharedClustersHe3, uint8_t);
50+
DECLARE_SOA_COLUMN(SharedClustersPr, sharedClustersPr, uint8_t);
4951

5052
DECLARE_SOA_COLUMN(IsBkgLS, isBkgLS, bool);
5153
DECLARE_SOA_COLUMN(IsBkgEM, isBkgEM, bool);
@@ -74,6 +76,8 @@ DECLARE_SOA_TABLE(Lithium4Table, "AOD", "LITHIUM4TABLE",
7476
Lithium4TablesNS::PrNSigmaTPC,
7577
Lithium4TablesNS::He3MassTOF,
7678
Lithium4TablesNS::PrMassTOF,
79+
Lithium4TablesNS::SharedClustersHe3,
80+
Lithium4TablesNS::SharedClustersPr,
7781
Lithium4TablesNS::IsBkgLS,
7882
Lithium4TablesNS::IsBkgEM)
7983
DECLARE_SOA_TABLE(Lithium4TableMC, "AOD", "LITHIUM4TABLEMC",
@@ -95,6 +99,8 @@ DECLARE_SOA_TABLE(Lithium4TableMC, "AOD", "LITHIUM4TABLEMC",
9599
Lithium4TablesNS::PrNSigmaTPC,
96100
Lithium4TablesNS::He3MassTOF,
97101
Lithium4TablesNS::PrMassTOF,
102+
Lithium4TablesNS::SharedClustersHe3,
103+
Lithium4TablesNS::SharedClustersPr,
98104
Lithium4TablesNS::IsBkgLS,
99105
Lithium4TablesNS::IsBkgEM,
100106
Lithium4TablesNS::SignedPtMC,

PWGLF/TableProducer/lithium4analysis.cxx

+96-22
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ constexpr int lithium4PDG = 1000030040;
6565
constexpr int protonPDG = 2212;
6666
constexpr int he3PDG = 1000020030;
6767

68+
enum Selections {
69+
kNoCuts = 0,
70+
kGlobalTrack,
71+
kTrackCuts,
72+
kPID,
73+
kAll
74+
};
75+
6876
} // namespace
6977

7078
struct lithium4Candidate {
@@ -94,6 +102,9 @@ struct lithium4Candidate {
94102
float invMass = -10.f;
95103
uint8_t nTPCClustersHe3 = 0u;
96104

105+
uint8_t sharedClustersHe3 = 0u;
106+
uint8_t sharedClustersPr = 0u;
107+
97108
bool isBkgUS = false;
98109
bool isBkgEM = false;
99110
bool isMatter = false;
@@ -135,27 +146,30 @@ struct lithium4analysis {
135146
histos.add("hCentrality", "Centrality distribution", kTH1F, {{2001, -0.5, 2000.5}});
136147
histos.add("hVtxZ", "Vertex distribution in Z;Z (cm)", kTH1F, {{400, -20.0, 20.0}});
137148
histos.add("hNcontributor", "Number of primary vertex contributor", kTH1F, {{2000, 0.0f, 2000.0f}});
138-
histos.add("hHe3Dcaxy", ";DcaXY", kTH1F, {{200, -1.0f, 1.0f}});
139-
histos.add("hHe3Dcaz", ";DcaZ", kTH1F, {{200, -1.0f, 1.0f}});
140-
histos.add("hLitInvMass", "; M(^{3}He + p)", kTH1F, {{50, 3.74f, 3.85f}});
141-
histos.add("hHe3Pt", "Pt distribution", kTH1F, {{200, 0.0f, 6.0f}});
142-
histos.add("hProtonPt", "Pt distribution; Pt", kTH1F, {{200, 0.0f, 3.0f}});
143-
histos.add("h2NsigmaHe3TPC", "NsigmaHe3 TPC distribution; Signed p/z; NsigmaHe3TPC", kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}});
144-
histos.add("h2NsigmaProtonTPC", "NsigmaProton TPC distribution; Signed p/z; NsigmaProtonTPC", kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}});
145-
histos.add("h2NsigmaProtonTOF", "NsigmaProton TOF distribution; pT; NsigmaProtonTOF", kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}});
149+
histos.add("hHe3Dcaxy", ";DCA_{xy} (cm)", kTH1F, {{200, -1.0f, 1.0f}});
150+
histos.add("hHe3Dcaz", ";DCA_{z} (cm)", kTH1F, {{200, -1.0f, 1.0f}});
151+
histos.add("hLitInvMass", "; M(^{3}He + p) (GeV/#it{c}^{2})", kTH1F, {{50, 3.74f, 3.85f}});
152+
histos.add("hHe3Pt", "#it{p}_{T} distribution; #it{p}_{T} (GeV/#it{c})", kTH1F, {{200, 0.0f, 6.0f}});
153+
histos.add("hProtonPt", "Pt distribution; #it{p}_{T} (GeV/#it{c})", kTH1F, {{200, 0.0f, 3.0f}});
154+
histos.add("h2NsigmaHe3TPC", "NsigmaHe3 TPC distribution; Signed #it{p}/#it{z} (GeV/#it{c}); n#sigma_{TPC}({}^{3}He)", kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}});
155+
histos.add("h2NsigmaProtonTPC", "NsigmaProton TPC distribution; Signed #it{p}/#it{z} (GeV/#it{c}); n#sigma_{TPC}(p)", kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}});
156+
histos.add("h2NsigmaProtonTOF", "NsigmaProton TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)", kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}});
157+
histos.add("hTrackSel", "Accepted tracks", kTH1F, {{Selections::kAll, -0.5, Selections::kAll - 0.5}});
146158

147159
for (int i = 0; i < 5; i++) {
148160
mBBparamsHe[i] = cfgBetheBlochParams->get("He3", Form("p%i", i));
149161
}
150162
mBBparamsHe[5] = cfgBetheBlochParams->get("He3", "resolution");
163+
164+
std::vector<std::string> labels = {"All", "Global track", "Track selection", "PID {}^{3}He"};
165+
for (int i = 0; i < Selections::kAll; i++) {
166+
histos.get<TH1>(HIST("hTrackSel"))->GetXaxis()->SetBinLabel(i + 1, labels[i].c_str());
167+
}
151168
}
152169

153170
template <typename T>
154171
bool selectionTrack(const T& candidate)
155172
{
156-
if (!candidate.isGlobalTrack()) {
157-
return false;
158-
}
159173

160174
if (candidate.itsNCls() < 5 ||
161175
candidate.tpcNClsFound() < 70 ||
@@ -236,6 +250,9 @@ struct lithium4analysis {
236250
l4Cand.nSigmaHe3 = computeNSigmaHe3(candidateHe3);
237251
l4Cand.nSigmaPr = candidatePr.tpcNSigmaPr();
238252

253+
l4Cand.sharedClustersHe3 = candidateHe3.tpcNClsShared();
254+
l4Cand.sharedClustersPr = candidatePr.tpcNClsShared();
255+
239256
l4Candidates.push_back(l4Cand);
240257
return true;
241258
}
@@ -289,9 +306,23 @@ struct lithium4analysis {
289306
TrackTable_thisCollision.bindExternalIndices(&tracks);
290307

291308
for (auto track1 : TrackTable_thisCollision) {
292-
if (!selectionTrack(track1) || !selectionPIDHe3(track1)) {
309+
310+
histos.fill(HIST("hTrackSel"), Selections::kNoCuts);
311+
312+
if (!track1.isGlobalTrackWoDCA()) {
293313
continue;
294314
}
315+
histos.fill(HIST("hTrackSel"), Selections::kGlobalTrack);
316+
317+
if (!selectionTrack(track1)) {
318+
continue;
319+
}
320+
histos.fill(HIST("hTrackSel"), Selections::kTrackCuts);
321+
322+
if (!selectionPIDHe3(track1)) {
323+
continue;
324+
}
325+
histos.fill(HIST("hTrackSel"), Selections::kPID);
295326

296327
for (auto track2 : TrackTable_thisCollision) {
297328

@@ -305,7 +336,15 @@ struct lithium4analysis {
305336
}
306337
}
307338

308-
if (!selectionTrack(track2) || !selectionPIDProton(track2)) {
339+
if (!track2.isGlobalTrackWoDCA()) {
340+
continue;
341+
}
342+
343+
if (!selectionTrack(track2)) {
344+
continue;
345+
}
346+
347+
if (!selectionPIDProton(track2)) {
309348
continue;
310349
}
311350

@@ -334,8 +373,8 @@ struct lithium4analysis {
334373
l4Cand.recoPtPr(), l4Cand.recoEtaPr(), l4Cand.recoPhiPr(),
335374
l4Cand.he3DCAXY, l4Cand.he3DCAZ, l4Cand.protonDCAXY, l4Cand.protonDCAZ,
336375
l4Cand.tpcSignalHe3, l4Cand.momHe3TPC, l4Cand.nTPCClustersHe3, l4Cand.nSigmaHe3,
337-
l4Cand.nSigmaPr, l4Cand.massTOFHe3, l4Cand.massTOFPr,
338-
l4Cand.isBkgUS, l4Cand.isBkgEM);
376+
l4Cand.nSigmaPr, l4Cand.massTOFHe3, l4Cand.massTOFPr, l4Cand.sharedClustersHe3,
377+
l4Cand.sharedClustersPr, l4Cand.isBkgUS, l4Cand.isBkgEM);
339378
}
340379
}
341380
PROCESS_SWITCH(lithium4analysis, processSameEvent, "Process Same event", false);
@@ -355,7 +394,19 @@ struct lithium4analysis {
355394

356395
for (auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
357396

358-
if (!selectionTrack(t1) || !selectionTrack(t2)) {
397+
if (!t1.isGlobalTrackWoDCA()) {
398+
continue;
399+
}
400+
401+
if (!selectionTrack(t1)) {
402+
continue;
403+
}
404+
405+
if (!t2.isGlobalTrackWoDCA()) {
406+
continue;
407+
}
408+
409+
if (!selectionTrack(t2)) {
359410
continue;
360411
}
361412

@@ -397,8 +448,8 @@ struct lithium4analysis {
397448
l4Cand.recoPtPr(), l4Cand.recoEtaPr(), l4Cand.recoPhiPr(),
398449
l4Cand.he3DCAXY, l4Cand.he3DCAZ, l4Cand.protonDCAXY, l4Cand.protonDCAZ,
399450
l4Cand.tpcSignalHe3, l4Cand.momHe3TPC, l4Cand.nTPCClustersHe3, l4Cand.nSigmaHe3,
400-
l4Cand.nSigmaPr, l4Cand.massTOFHe3, l4Cand.massTOFPr,
401-
l4Cand.isBkgUS, l4Cand.isBkgEM);
451+
l4Cand.nSigmaPr, l4Cand.massTOFHe3, l4Cand.massTOFPr, l4Cand.sharedClustersHe3,
452+
l4Cand.sharedClustersPr, l4Cand.isBkgUS, l4Cand.isBkgEM);
402453
}
403454
}
404455
PROCESS_SWITCH(lithium4analysis, processMixedEvent, "Process Mixed event", false);
@@ -426,15 +477,38 @@ struct lithium4analysis {
426477
if (!track1.has_mcParticle()) {
427478
continue;
428479
}
429-
if (!selectionTrack(track1) || !selectionPIDHe3(track1)) {
480+
481+
histos.fill(HIST("hTrackSel"), Selections::kNoCuts);
482+
483+
if (!track1.isGlobalTrackWoDCA()) {
430484
continue;
431485
}
486+
histos.fill(HIST("hTrackSel"), Selections::kGlobalTrack);
487+
488+
if (!selectionTrack(track1)) {
489+
continue;
490+
}
491+
histos.fill(HIST("hTrackSel"), Selections::kTrackCuts);
492+
493+
if (!selectionPIDHe3(track1)) {
494+
continue;
495+
}
496+
histos.fill(HIST("hTrackSel"), Selections::kPID);
432497

433498
for (auto track2 : TrackTable_thisCollision) {
434499
if (!track2.has_mcParticle()) {
435500
continue;
436501
}
437-
if (!selectionTrack(track2) || !selectionPIDProton(track2)) {
502+
503+
if (!track2.isGlobalTrackWoDCA()) {
504+
continue;
505+
}
506+
507+
if (!selectionTrack(track2)) {
508+
continue;
509+
}
510+
511+
if (!selectionPIDProton(track2)) {
438512
continue;
439513
}
440514

@@ -528,8 +602,8 @@ struct lithium4analysis {
528602
l4Cand.recoPtPr(), l4Cand.recoEtaPr(), l4Cand.recoPhiPr(),
529603
l4Cand.he3DCAXY, l4Cand.he3DCAZ, l4Cand.protonDCAXY, l4Cand.protonDCAZ,
530604
l4Cand.tpcSignalHe3, l4Cand.momHe3TPC, l4Cand.nTPCClustersHe3, l4Cand.nSigmaHe3,
531-
l4Cand.nSigmaPr, l4Cand.massTOFHe3, l4Cand.massTOFPr,
532-
l4Cand.isBkgUS, l4Cand.isBkgEM,
605+
l4Cand.nSigmaPr, l4Cand.massTOFHe3, l4Cand.massTOFPr, l4Cand.sharedClustersHe3,
606+
l4Cand.sharedClustersPr, l4Cand.isBkgUS, l4Cand.isBkgEM,
533607
l4Cand.l4PtMC, l4Cand.l4MassMC);
534608
}
535609
}

0 commit comments

Comments
 (0)