Skip to content

Commit cb26789

Browse files
author
Prottay Das
committed
reduced table size
1 parent 8803236 commit cb26789

1 file changed

Lines changed: 11 additions & 184 deletions

File tree

PWGLF/TableProducer/Resonances/phiflow.cxx

Lines changed: 11 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ struct phiflow {
7575
Configurable<float> cfgCutCharge{"cfgCutCharge", 0.0, "Charge cut on daughter"};
7676
Configurable<float> cfgCutPt{"cfgCutPt", 0.2, "Pt cut on daughter track"};
7777
Configurable<float> cfgCutEta{"cfgCutEta", 0.8, "Eta cut on daughter track"};
78-
Configurable<float> cfgCutDCAxy{"cfgCutDCAxy", 0.2, "DCAxy cut on daughter track"};
79-
Configurable<float> cfgCutDCAz{"cfgCutDCAz", 0.2, "DCAz cut on daughter track"};
78+
Configurable<float> cfgCutDCAxy{"cfgCutDCAxy", 0.1, "DCAxy cut on daughter track"};
79+
Configurable<float> cfgCutDCAz{"cfgCutDCAz", 0.1, "DCAz cut on daughter track"};
8080
Configurable<float> nsigmaCutTPC{"nsigmaCutTPC", 3.0, "Maximum nsigma cut TPC for filtered kaon track"};
8181

8282
// Configs for kaon
@@ -89,14 +89,12 @@ struct phiflow {
8989
Configurable<float> cutDCAxyKaMeson{"cutDCAxyKaMeson", 0.1, "Maximum DCAxy for kaon meson track"};
9090
Configurable<float> cutDCAzKaMeson{"cutDCAzKaMeson", 0.1, "Maximum DCAz for kaon meson track"};
9191
Configurable<float> cutEtaKaMeson{"cutEtaKaMeson", 0.8, "Maximum eta for kaon meson track"};
92-
Configurable<float> cutPTKaMeson{"cutPTKaMeson", 0.8, "Minimum pt for kaon meson track"};
92+
Configurable<float> cutPTKaMeson{"cutPTKaMeson", 0.2, "Minimum pt for kaon meson track"};
9393
Configurable<bool> usePID{"usePID", true, "Flag for using PID selection for kaon meson track"};
9494
Configurable<float> nsigmaCutTPCKaMeson{"nsigmaCutTPCKaMeson", 3.0, "Maximum nsigma cut TPC for kaon meson track"};
9595
Configurable<float> nsigmaCutTOFKaMeson{"nsigmaCutTOFKaMeson", 3.0, "Maximum nsigma cut TOF for kaon meson track"};
9696
Configurable<float> cutTOFBetaKaMeson{"cutTOFBetaKaMeson", 0.5f, "Maximum beta cut for kaon meson track"};
9797
Configurable<float> pSwitchPID{"pSwitchPID", 0.5f, "pT switch for pT-dependent kaon PID"};
98-
Configurable<float> pSwitchAsymPID{"pSwitchAsymPID", 0.7f, "Momentum switch for asymmetric kaon PID"};
99-
Configurable<bool> applyTOFAsymPID{"applyTOFAsymPID", true, "Apply TOF requirement in PID7"};
10098
} grpKaon;
10199

102100
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -105,7 +103,7 @@ struct phiflow {
105103
{
106104
rctChecker.init(rctCut.cfgEvtRCTFlagCheckerLabel, rctCut.cfgEvtRCTFlagCheckerZDCCheck, rctCut.cfgEvtRCTFlagCheckerLimitAcceptAsBad);
107105

108-
histos.add("hCent", "hCent", kTH1F, {{8, 0, 80.0}});
106+
histos.add("hCent", "hCent", kTH1F, {{16, 0, 80.0}});
109107
histos.add("hEvtSelInfo", "hEvtSelInfo", kTH1F, {{5, 0, 5.0}});
110108
histos.add("hTrkSelInfo", "hTrkSelInfo", kTH1F, {{10, 0, 10.0}});
111109
}
@@ -124,56 +122,13 @@ struct phiflow {
124122
}
125123

126124
enum KaonPidBits : uint8_t {
127-
kPID1 = 1u << 0, // TOF-availability-dependent rectangular PID
128-
kPID2 = 1u << 1, // TOF-availability-dependent circular PID
129-
kPID3 = 1u << 2, // pT-dependent circular PID
130-
kPID4 = 1u << 3, // pT-dependent rectangular PID, phi-v2-like
131-
kPID5 = 1u << 4, // TOF-only PID
132-
kPID6 = 1u << 5, // Momentum-dependent asymmetric TOF PID
133-
kPID7 = 1u << 6 // Optional-TOF asymmetric PID
125+
kPID1 = 1u << 0,
126+
kPID2 = 1u << 1,
127+
kPID3 = 1u << 2,
134128
};
135129

136130
template <typename T>
137131
bool selectionPID(const T& candidate)
138-
{
139-
const float nTPC = candidate.tpcNSigmaKa();
140-
141-
// No TOF hit: TPC-only PID at all pT.
142-
if (!candidate.hasTOF()) {
143-
return std::abs(nTPC) < grpKaon.nsigmaCutTPCKaMeson;
144-
}
145-
146-
// TOF hit: require beta, TPC PID, and TOF PID.
147-
if (candidate.beta() <= grpKaon.cutTOFBetaKaMeson) {
148-
return false;
149-
}
150-
151-
return std::abs(nTPC) < grpKaon.nsigmaCutTPCKaMeson &&
152-
std::abs(candidate.tofNSigmaKa()) < grpKaon.nsigmaCutTOFKaMeson;
153-
}
154-
155-
template <typename T>
156-
bool selectionPID2(const T& candidate)
157-
{
158-
const float nTPC = candidate.tpcNSigmaKa();
159-
160-
// No TOF hit: TPC-only PID at all pT.
161-
if (!candidate.hasTOF()) {
162-
return std::abs(nTPC) < grpKaon.nsigmaCutTPCKaMeson;
163-
}
164-
165-
if (candidate.beta() <= grpKaon.cutTOFBetaKaMeson) {
166-
return false;
167-
}
168-
169-
const float nTOF = candidate.tofNSigmaKa();
170-
const float nCombined = std::sqrt(nTPC * nTPC + nTOF * nTOF);
171-
172-
return nCombined < grpKaon.nsigmaCutTOFKaMeson;
173-
}
174-
175-
template <typename T>
176-
bool selectionPID3(const T& candidate)
177132
{
178133
const float pt = candidate.pt();
179134
const float nTPC = candidate.tpcNSigmaKa();
@@ -199,7 +154,7 @@ struct phiflow {
199154
}
200155

201156
template <typename T>
202-
bool selectionPID4(const T& candidate)
157+
bool selectionPID2(const T& candidate)
203158
{
204159
const float pt = candidate.pt();
205160
const float nTPC = candidate.tpcNSigmaKa();
@@ -225,7 +180,7 @@ struct phiflow {
225180
}
226181

227182
template <typename T>
228-
bool selectionPID5(const T& candidate)
183+
bool selectionPID3(const T& candidate)
229184
{
230185
// This matches the TOF-only selection from the other task.
231186
if (!candidate.hasTOF()) {
@@ -240,118 +195,6 @@ struct phiflow {
240195
grpKaon.nsigmaCutTOFKaMeson;
241196
}
242197

243-
template <typename T>
244-
bool selectionPID6(const T& candidate)
245-
{
246-
const float p = candidate.p();
247-
const float nTPC = candidate.tpcNSigmaKa();
248-
249-
// This follows selectionPIDpTdependent2 from the other task.
250-
// Note: it uses total momentum p, not transverse momentum pT.
251-
if (p < grpKaon.pSwitchAsymPID) {
252-
return std::abs(nTPC) < grpKaon.nsigmaCutTPCKaMeson;
253-
}
254-
255-
if (!candidate.hasTOF()) {
256-
return false;
257-
}
258-
259-
if (std::abs(nTPC) >= grpKaon.nsigmaCutTPCKaMeson) {
260-
return false;
261-
}
262-
263-
if (candidate.beta() <= grpKaon.cutTOFBetaKaMeson) {
264-
return false;
265-
}
266-
267-
const float nTOF = candidate.tofNSigmaKa();
268-
269-
if (p < 1.6f) {
270-
return nTOF > -5.0f && nTOF < 10.0f;
271-
}
272-
273-
if (p < 2.0f) {
274-
return nTOF > -3.0f && nTOF < 10.0f;
275-
}
276-
277-
if (p < 2.5f) {
278-
return nTOF > -3.0f && nTOF < 6.0f;
279-
}
280-
281-
if (p < 4.0f) {
282-
return nTOF > -2.5f && nTOF < 4.0f;
283-
}
284-
285-
if (p < 5.0f) {
286-
return nTOF > -4.0f && nTOF < 3.0f;
287-
}
288-
289-
if (p < 6.0f) {
290-
return nTOF > -4.0f && nTOF < 2.5f;
291-
}
292-
293-
return nTOF > -3.0f && nTOF < 3.0f;
294-
}
295-
296-
template <typename T>
297-
bool selectionPID7(const T& candidate)
298-
{
299-
const float p = candidate.p();
300-
const float nTPC = candidate.tpcNSigmaKa();
301-
302-
// This follows selectionPID22 from the other task.
303-
// If TOF is disabled, use only the TPC kaon selection.
304-
if (!grpKaon.applyTOFAsymPID) {
305-
return std::abs(nTPC) < grpKaon.nsigmaCutTPCKaMeson;
306-
}
307-
308-
// No TOF hit: allow TPC-only PID at all momenta.
309-
if (!candidate.hasTOF()) {
310-
return std::abs(nTPC) < grpKaon.nsigmaCutTPCKaMeson;
311-
}
312-
313-
// For tracks with TOF, asymmetric TOF selection starts above p = 0.5.
314-
if (p <= 0.5f) {
315-
return false;
316-
}
317-
318-
if (std::abs(nTPC) >= grpKaon.nsigmaCutTPCKaMeson) {
319-
return false;
320-
}
321-
322-
if (candidate.beta() <= grpKaon.cutTOFBetaKaMeson) {
323-
return false;
324-
}
325-
326-
const float nTOF = candidate.tofNSigmaKa();
327-
328-
if (p < 1.6f) {
329-
return nTOF > -5.0f && nTOF < 10.0f;
330-
}
331-
332-
if (p < 2.0f) {
333-
return nTOF > -3.0f && nTOF < 10.0f;
334-
}
335-
336-
if (p < 2.5f) {
337-
return nTOF > -3.0f && nTOF < 6.0f;
338-
}
339-
340-
if (p < 4.0f) {
341-
return nTOF > -2.5f && nTOF < 4.0f;
342-
}
343-
344-
if (p < 5.0f) {
345-
return nTOF > -4.0f && nTOF < 3.0f;
346-
}
347-
348-
if (p < 6.0f) {
349-
return nTOF > -4.0f && nTOF < 2.5f;
350-
}
351-
352-
return nTOF > -3.0f && nTOF < 3.0f;
353-
}
354-
355198
template <typename T>
356199
uint8_t kaonPidMask(const T& track)
357200
{
@@ -369,22 +212,6 @@ struct phiflow {
369212
mask |= kPID3;
370213
}
371214

372-
if (selectionPID4(track)) {
373-
mask |= kPID4;
374-
}
375-
376-
if (selectionPID5(track)) {
377-
mask |= kPID5;
378-
}
379-
380-
if (selectionPID6(track)) {
381-
mask |= kPID6;
382-
}
383-
384-
if (selectionPID7(track)) {
385-
mask |= kPID7;
386-
}
387-
388215
return mask;
389216
}
390217

@@ -532,11 +359,11 @@ struct phiflow {
532359
// No selected K+ or K- in this collision:
533360
// not writing a reduced event row.
534361
histos.fill(HIST("hEvtSelInfo"), 3.5);
535-
/*
362+
536363
if (selectedKaons.empty()) {
537364
return;
538365
}
539-
*/
366+
540367
histos.fill(HIST("hEvtSelInfo"), 4.5);
541368

542369
kaonEvent(centrality,

0 commit comments

Comments
 (0)