Skip to content

Commit 08bbc75

Browse files
authored
[PWGLF] TPC PID info in f1 table, improved PID and background for f1 (#9033)
1 parent 928f4b6 commit 08bbc75

File tree

3 files changed

+87
-24
lines changed

3 files changed

+87
-24
lines changed

PWGLF/DataModel/ReducedF1ProtonTables.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ DECLARE_SOA_COLUMN(F1d3Py, f1d3Py, float); //! F
6060
DECLARE_SOA_COLUMN(F1d3Pz, f1d3Pz, float); //! F1 d3 Pz
6161
DECLARE_SOA_COLUMN(F1d1TOFHit, f1d1TOFHit, int); //! TOF hit pion
6262
DECLARE_SOA_COLUMN(F1d2TOFHit, f1d2TOFHit, int); //! TOF hit pion
63+
DECLARE_SOA_COLUMN(F1d1TPC, f1d1TPC, float); //! TPC nsigma pion
64+
DECLARE_SOA_COLUMN(F1d2TPC, f1d2TPC, float); //! TPC nsigma kaon
6365
DECLARE_SOA_COLUMN(F1Mass, f1Mass, float); //! F1 mass
6466
DECLARE_SOA_COLUMN(F1MassKaonKshort, f1MassKaonKshort, float); //! F1 mass kaon kshort
6567
DECLARE_SOA_COLUMN(F1PionIndex, f1PionIndex, int64_t); //! F1 pion index
@@ -93,6 +95,8 @@ DECLARE_SOA_TABLE(F1Tracks, "AOD", "F1TRACK",
9395
f1protondaughter::F1d3Pz,
9496
f1protondaughter::F1d1TOFHit,
9597
f1protondaughter::F1d2TOFHit,
98+
f1protondaughter::F1d1TPC,
99+
f1protondaughter::F1d2TPC,
96100
f1protondaughter::F1Mass,
97101
f1protondaughter::F1MassKaonKshort,
98102
f1protondaughter::F1PionIndex,

PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,14 @@ struct f1protonreducedtable {
530530
// keep TOF Hit of pion
531531
std::vector<int> PionTOFHit = {};
532532
std::vector<int> PionTOFHitFinal = {};
533+
std::vector<float> PionTPC = {};
534+
std::vector<float> PionTPCFinal = {};
533535

534536
// keep TOF Hit of kaon
535537
std::vector<int> KaonTOFHit = {};
536538
std::vector<int> KaonTOFHitFinal = {};
539+
std::vector<float> KaonTPC = {};
540+
std::vector<float> KaonTPCFinal = {};
537541

538542
// keep kaon-kshort mass of f1resonance
539543
std::vector<float> f1kaonkshortmass = {};
@@ -618,9 +622,11 @@ struct f1protonreducedtable {
618622
auto PionTOF = 0;
619623
if (track.sign() > 0) {
620624
qaRegistry.fill(HIST("hNsigmaPtpionTPC"), nTPCSigmaP[0], track.pt());
625+
PionTPC.push_back(nTPCSigmaP[0]);
621626
}
622627
if (track.sign() < 0) {
623628
qaRegistry.fill(HIST("hNsigmaPtpionTPC"), nTPCSigmaN[0], track.pt());
629+
PionTPC.push_back(nTPCSigmaN[0]);
624630
}
625631
if (track.hasTOF()) {
626632
qaRegistry.fill(HIST("hNsigmaPtpionTOF"), track.tofNSigmaPi(), track.pt());
@@ -637,9 +643,11 @@ struct f1protonreducedtable {
637643
auto KaonTOF = 0;
638644
if (track.sign() > 0) {
639645
qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), nTPCSigmaP[1], track.pt());
646+
KaonTPC.push_back(nTPCSigmaP[1]);
640647
}
641648
if (track.sign() < 0) {
642649
qaRegistry.fill(HIST("hNsigmaPtkaonTPC"), nTPCSigmaN[1], track.pt());
650+
KaonTPC.push_back(nTPCSigmaN[1]);
643651
}
644652
if (track.hasTOF()) {
645653
qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track.tofNSigmaKa(), track.pt());
@@ -742,6 +750,8 @@ struct f1protonreducedtable {
742750
F1KshortDaughterNegativeIndex.push_back(KshortNegDaughIndex.at(i3));
743751
PionTOFHitFinal.push_back(PionTOFHit.at(i1)); // Pion TOF Hit
744752
KaonTOFHitFinal.push_back(KaonTOFHit.at(i2)); // Kaon TOF Hit
753+
PionTPCFinal.push_back(PionTPC.at(i1)); // Pion TPC
754+
KaonTPCFinal.push_back(KaonTPC.at(i2)); // Kaon TPC
745755
if (pairsign == 1) {
746756
qaRegistry.fill(HIST("hInvMassf1"), F1Vector.M(), F1Vector.Pt());
747757
numberF1 = numberF1 + 1;
@@ -798,7 +808,7 @@ struct f1protonreducedtable {
798808
F1d1dummy = f1resonanced1.at(i5);
799809
F1d2dummy = f1resonanced2.at(i5);
800810
F1d3dummy = f1resonanced3.at(i5);
801-
f1track(indexEvent, f1signal.at(i5), F1VectorDummy.Px(), F1VectorDummy.Py(), F1VectorDummy.Pz(), F1d1dummy.Px(), F1d1dummy.Py(), F1d1dummy.Pz(), F1d2dummy.Px(), F1d2dummy.Py(), F1d2dummy.Pz(), F1d3dummy.Px(), F1d3dummy.Py(), F1d3dummy.Pz(), PionTOFHitFinal.at(i5), KaonTOFHitFinal.at(i5), F1VectorDummy.M(), f1kaonkshortmass.at(i5), F1PionIndex.at(i5), F1KaonIndex.at(i5), F1KshortDaughterPositiveIndex.at(i5), F1KshortDaughterNegativeIndex.at(i5));
811+
f1track(indexEvent, f1signal.at(i5), F1VectorDummy.Px(), F1VectorDummy.Py(), F1VectorDummy.Pz(), F1d1dummy.Px(), F1d1dummy.Py(), F1d1dummy.Pz(), F1d2dummy.Px(), F1d2dummy.Py(), F1d2dummy.Pz(), F1d3dummy.Px(), F1d3dummy.Py(), F1d3dummy.Pz(), PionTOFHitFinal.at(i5), KaonTOFHitFinal.at(i5), PionTPCFinal.at(i5), KaonTPCFinal.at(i5), F1VectorDummy.M(), f1kaonkshortmass.at(i5), F1PionIndex.at(i5), F1KaonIndex.at(i5), F1KshortDaughterPositiveIndex.at(i5), F1KshortDaughterNegativeIndex.at(i5));
802812
}
803813
//// Fill track table for proton//////////////////
804814
for (auto iproton = protons.begin(); iproton != protons.end(); ++iproton) {

PWGLF/Tasks/Resonances/f1protoncorrelation.cxx

Lines changed: 72 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ struct f1protoncorrelation {
4141
Configurable<float> nsigmaCutCombined{"nsigmaCutCombined", 3.0, "Value of the TOF Nsigma cut"};
4242
// PID selection
4343
Configurable<bool> fillRotation{"fillRotation", 1, "Fill rotation"};
44+
Configurable<bool> pdepPID{"pdepPID", 1, "Momentum dependent pi, k PID"};
4445
Configurable<int> strategyPIDPion{"strategyPIDPion", 0, "PID strategy Pion"};
4546
Configurable<int> strategyPIDKaon{"strategyPIDKaon", 0, "PID strategy Kaon"};
4647
Configurable<float> maxKKS0Mass{"maxKKS0Mass", 1.025, "Maximum kaon kshort mass"};
4748
Configurable<float> maxMomentumPion{"maxMomentumPion", 4.0, "Maximum momentum Pion"};
4849
Configurable<float> maxMomentumKaon{"maxMomentumKaon", 4.0, "Maximum momentum Kaon"};
49-
Configurable<float> momentumTOFPion{"momentumTOFPion", 0.8, "Pion momentum TOF"};
50-
Configurable<float> momentumTOFKaon{"momentumTOFKaon", 0.8, "Kaon momentum TOF"};
50+
Configurable<float> momentumTOFPionMin{"momentumTOFPionMin", 0.8, "Pion momentum TOF Min"};
51+
Configurable<float> momentumTOFKaonMin{"momentumTOFKaonMin", 0.8, "Kaon momentum TOF Min"};
52+
Configurable<float> momentumTOFPionMax{"momentumTOFPionMax", 1.2, "Pion momentum TOF Max"};
53+
Configurable<float> momentumTOFKaonMax{"momentumTOFKaonMax", 1.2, "Kaon momentum TOF Max"};
5154
Configurable<float> momentumTOFProton{"momentumTOFProton", 0.7, "Proton momentum TOF"};
5255
Configurable<float> lowPtF1{"lowPtF1", 1.0, "PT cut F1"};
5356
// Event Mixing
@@ -59,8 +62,10 @@ struct f1protoncorrelation {
5962
void init(o2::framework::InitContext&)
6063
{
6164
// register histograms
62-
histos.add("hNsigmaProtonTPCSE", "Nsigma Proton TPC distribution same event", kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 1.0f}});
63-
histos.add("hNsigmaProtonTPCME", "Nsigma Proton TPC distribution mixed event", kTH2F, {{200, -10.0f, 10.0f}, {100, 0.0f, 1.0f}});
65+
histos.add("hNsigmaProtonTPC", "Nsigma Proton TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}});
66+
histos.add("hNsigmaKaonTPC", "Nsigma Kaon TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}});
67+
histos.add("hNsigmaPionTPC", "Nsigma Pion TPC distribution", kTH2F, {{100, -5.0f, 5.0f}, {100, 0.0f, 10.0f}});
68+
histos.add("hNsigmaPionKaonTPC", "Nsigma Pion Kaon TPC correlation", kTH2F, {{100, -5.0f, 5.0f}, {100, -5.0f, 5.0f}});
6469
histos.add("h2SameEventPtCorrelation", "Pt correlation of F1 and proton", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {100, 0.0, 10.0}});
6570

6671
histos.add("h2SameEventInvariantMassUnlike_mass", "Unlike Sign Invariant mass of f1 same event", kTH3F, {{100, 0.0f, 1.0f}, {100, 0.0, 10.0}, {800, 1.0, 1.8}});
@@ -96,7 +101,7 @@ struct f1protoncorrelation {
96101
}
97102

98103
TLorentzVector F1, Proton, F1ProtonPair, Pion, Kaon, Kshort;
99-
TLorentzVector F1Rot, PionRot, KaonKshortPair;
104+
TLorentzVector F1Rot, PionRot, KaonKshortPair, KaonKshortPairRot;
100105
// Process the data in same event
101106
void process(aod::RedF1PEvents::iterator const& /*collision*/, aod::F1Tracks const& f1tracks, aod::ProtonTracks const& protontracks)
102107
{
@@ -109,15 +114,38 @@ struct f1protoncorrelation {
109114
Kaon.SetXYZM(f1track.f1d2Px(), f1track.f1d2Py(), f1track.f1d2Pz(), 0.493);
110115
Kshort.SetXYZM(f1track.f1d3Px(), f1track.f1d3Py(), f1track.f1d3Pz(), 0.497);
111116
KaonKshortPair = Kaon + Kshort;
112-
if (Pion.P() > maxMomentumPion || Kaon.P() > maxMomentumKaon) {
117+
if (Pion.Pt() > maxMomentumPion || Kaon.Pt() > maxMomentumKaon) {
113118
continue;
114119
}
115-
if (strategyPIDPion == 1 && Pion.P() > momentumTOFPion && f1track.f1d1TOFHit() != 1) {
120+
if (pdepPID) {
121+
if (Kaon.Pt() <= 0.5 && (f1track.f1d2TPC() < -2.5 || f1track.f1d2TPC() > 2.5)) {
122+
continue;
123+
}
124+
if (Kaon.Pt() > 0.5 && Kaon.Pt() <= 0.7 && (f1track.f1d2TPC() < -1.5 || f1track.f1d2TPC() > 2.5)) {
125+
continue;
126+
}
127+
if (Kaon.Pt() > 0.7 && Kaon.Pt() <= 1.0 && (f1track.f1d2TPC() < -1.0 || f1track.f1d2TPC() > 2.5)) {
128+
continue;
129+
}
130+
if (Kaon.Pt() > 1.0 && (f1track.f1d2TPC() < -2.0 || f1track.f1d2TPC() > 2.0)) {
131+
continue;
132+
}
133+
if (Pion.Pt() < 2.0 && (f1track.f1d1TPC() < -2.5 || f1track.f1d1TPC() > 2.5)) {
134+
continue;
135+
}
136+
if (Pion.Pt() > 2.0 && (f1track.f1d1TPC() < -2.0 || f1track.f1d1TPC() > 2.0)) {
137+
continue;
138+
}
139+
}
140+
if (strategyPIDPion == 1 && Pion.Pt() > momentumTOFPionMin && Pion.Pt() <= momentumTOFPionMax && f1track.f1d1TOFHit() != 1) {
116141
continue;
117142
}
118-
if (strategyPIDKaon == 1 && Kaon.P() > momentumTOFKaon && f1track.f1d2TOFHit() != 1) {
143+
if (strategyPIDKaon == 1 && Kaon.Pt() > momentumTOFKaonMin && Kaon.Pt() <= momentumTOFKaonMax && f1track.f1d2TOFHit() != 1) {
119144
continue;
120145
}
146+
histos.fill(HIST("hNsigmaKaonTPC"), f1track.f1d2TPC(), Kaon.Pt());
147+
histos.fill(HIST("hNsigmaPionTPC"), f1track.f1d1TPC(), Pion.Pt());
148+
histos.fill(HIST("hNsigmaPionKaonTPC"), f1track.f1d1TPC(), f1track.f1d2TPC());
121149
for (auto protontrack : protontracks) {
122150
Proton.SetXYZM(protontrack.protonPx(), protontrack.protonPy(), protontrack.protonPz(), 0.938);
123151
if (Proton.P() < momentumTOFProton && TMath::Abs(protontrack.protonNsigmaTPC()) > 3) {
@@ -130,10 +158,12 @@ struct f1protoncorrelation {
130158
continue;
131159
}
132160
auto relative_momentum = getkstar(F1, Proton);
161+
if (relative_momentum <= 0.5) {
162+
histos.fill(HIST("hNsigmaProtonTPC"), protontrack.protonNsigmaTPC(), Proton.Pt());
163+
}
133164
histos.fill(HIST("h2SameEventPtCorrelation"), relative_momentum, F1.Pt(), Proton.Pt());
134165
if (f1track.f1SignalStat() == 1) {
135166
histos.fill(HIST("h2SameEventInvariantMassUnlike_mass"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like
136-
histos.fill(HIST("hNsigmaProtonTPCSE"), protontrack.protonNsigmaTPC(), relative_momentum);
137167
}
138168
if (f1track.f1SignalStat() == -1) {
139169
histos.fill(HIST("h2SameEventInvariantMassLike_mass"), relative_momentum, F1.Pt(), F1.M());
@@ -144,10 +174,10 @@ struct f1protoncorrelation {
144174
auto angleend = 7.0 * TMath::Pi() / 6.0;
145175
auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0));
146176
auto rotangle = anglestart + nrotbkg * anglestep;
147-
auto rotPionPx = f1track.f1d1Px() * std::cos(rotangle) - f1track.f1d1Py() * std::sin(rotangle);
148-
auto rotPionPy = f1track.f1d1Px() * std::sin(rotangle) + f1track.f1d1Py() * std::cos(rotangle);
149-
PionRot.SetXYZM(rotPionPx, rotPionPy, f1track.f1d1Pz(), 0.139);
150-
F1Rot = PionRot + KaonKshortPair;
177+
auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle);
178+
auto rotKKPy = KaonKshortPair.Px() * std::sin(rotangle) + KaonKshortPair.Py() * std::cos(rotangle);
179+
KaonKshortPairRot.SetXYZM(rotKKPx, rotKKPy, KaonKshortPair.Pz(), KaonKshortPair.M());
180+
F1Rot = Pion + KaonKshortPairRot;
151181
auto relative_momentum_rot = getkstar(F1Rot, Proton);
152182
if (f1track.f1SignalStat() == 1) {
153183
histos.fill(HIST("h2SameEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M());
@@ -195,13 +225,33 @@ struct f1protoncorrelation {
195225
Kaon.SetXYZM(t1.f1d2Px(), t1.f1d2Py(), t1.f1d2Pz(), 0.493);
196226
Kshort.SetXYZM(t1.f1d3Px(), t1.f1d3Py(), t1.f1d3Pz(), 0.497);
197227
KaonKshortPair = Kaon + Kshort;
198-
if (Pion.P() > maxMomentumPion || Kaon.P() > maxMomentumKaon) {
228+
if (Pion.Pt() > maxMomentumPion || Kaon.Pt() > maxMomentumKaon) {
199229
continue;
200230
}
201-
if (strategyPIDPion == 1 && Pion.P() > momentumTOFPion && t1.f1d1TOFHit() != 1) {
231+
if (pdepPID) {
232+
if (Kaon.Pt() <= 0.5 && (t1.f1d2TPC() < -2.5 || t1.f1d2TPC() > 2.5)) {
233+
continue;
234+
}
235+
if (Kaon.Pt() > 0.5 && Kaon.Pt() <= 0.7 && (t1.f1d2TPC() < -1.5 || t1.f1d2TPC() > 2.5)) {
236+
continue;
237+
}
238+
if (Kaon.Pt() > 0.7 && Kaon.Pt() <= 1.0 && (t1.f1d2TPC() < -1.0 || t1.f1d2TPC() > 2.5)) {
239+
continue;
240+
}
241+
if (Kaon.Pt() > 1.0 && (t1.f1d2TPC() < -2.0 || t1.f1d2TPC() > 2.0)) {
242+
continue;
243+
}
244+
if (Pion.Pt() < 2.0 && (t1.f1d1TPC() < -2.5 || t1.f1d1TPC() > 2.5)) {
245+
continue;
246+
}
247+
if (Pion.Pt() > 2.0 && (t1.f1d1TPC() < -2.0 || t1.f1d1TPC() > 2.0)) {
248+
continue;
249+
}
250+
}
251+
if (strategyPIDPion == 1 && Pion.Pt() > momentumTOFPionMin && Pion.Pt() <= momentumTOFPionMax && t1.f1d1TOFHit() != 1) {
202252
continue;
203253
}
204-
if (strategyPIDKaon == 1 && Kaon.P() > momentumTOFKaon && t1.f1d2TOFHit() != 1) {
254+
if (strategyPIDKaon == 1 && Kaon.Pt() > momentumTOFKaonMin && Kaon.Pt() <= momentumTOFKaonMax && t1.f1d2TOFHit() != 1) {
205255
continue;
206256
}
207257
Proton.SetXYZM(t2.protonPx(), t2.protonPy(), t2.protonPz(), 0.938);
@@ -213,22 +263,21 @@ struct f1protoncorrelation {
213263
}
214264
auto relative_momentum = getkstar(F1, Proton);
215265
if (t1.f1SignalStat() == 1) {
216-
histos.fill(HIST("h2MixEventInvariantMassUnlike_mass104"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like
217-
histos.fill(HIST("hNsigmaProtonTPCME"), t2.protonNsigmaTPC(), relative_momentum);
266+
histos.fill(HIST("h2MixEventInvariantMassUnlike_mass"), relative_momentum, F1.Pt(), F1.M()); // F1 sign = 1 unlike, F1 sign = -1 like
218267
}
219268
if (t1.f1SignalStat() == -1) {
220-
histos.fill(HIST("h2MixEventInvariantMassLike_mass104"), relative_momentum, F1.Pt(), F1.M());
269+
histos.fill(HIST("h2MixEventInvariantMassLike_mass"), relative_momentum, F1.Pt(), F1.M());
221270
}
222271
if (fillRotation) {
223272
for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) {
224273
auto anglestart = 5.0 * TMath::Pi() / 6.0;
225274
auto angleend = 7.0 * TMath::Pi() / 6.0;
226275
auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0));
227276
auto rotangle = anglestart + nrotbkg * anglestep;
228-
auto rotPionPx = t1.f1d1Px() * std::cos(rotangle) - t1.f1d1Py() * std::sin(rotangle);
229-
auto rotPionPy = t1.f1d1Px() * std::sin(rotangle) + t1.f1d1Py() * std::cos(rotangle);
230-
PionRot.SetXYZM(rotPionPx, rotPionPy, t1.f1d1Pz(), 0.139);
231-
F1Rot = PionRot + KaonKshortPair;
277+
auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle);
278+
auto rotKKPy = KaonKshortPair.Px() * std::sin(rotangle) + KaonKshortPair.Py() * std::cos(rotangle);
279+
KaonKshortPairRot.SetXYZM(rotKKPx, rotKKPy, KaonKshortPair.Pz(), KaonKshortPair.M());
280+
F1Rot = Pion + KaonKshortPairRot;
232281
auto relative_momentum_rot = getkstar(F1Rot, Proton);
233282
if (t1.f1SignalStat() == 1) {
234283
histos.fill(HIST("h2MixEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M());

0 commit comments

Comments
 (0)