Skip to content

Commit 545950f

Browse files
authored
[PWGLF] Differentiate online correction for pid on pions with and without TOF (#12093)
1 parent 8dd8c8d commit 545950f

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ struct Phik0shortanalysis {
266266
// Efficiecy maps
267267
TH3F* effMapPhi;
268268
TH3F* effMapK0S;
269-
TH3F* effMapPion;
269+
TH3F* effMapPionTPC;
270+
TH3F* effMapPionTPCTOF;
270271

271272
void init(InitContext&)
272273
{
@@ -616,7 +617,8 @@ struct Phik0shortanalysis {
616617
else {
617618
effMapPhi = nullptr;
618619
effMapK0S = nullptr;
619-
effMapPion = nullptr;
620+
effMapPionTPC = nullptr;
621+
effMapPionTPCTOF = nullptr;
620622
}
621623
}
622624
}
@@ -965,9 +967,14 @@ struct Phik0shortanalysis {
965967
LOG(error) << "Problem getting efficiency map for K0S!";
966968
return;
967969
}
968-
effMapPion = static_cast<TH3F*>(listEfficiencyMaps->FindObject("h3EfficiencyPion"));
969-
if (!effMapPion) {
970-
LOG(error) << "Problem getting efficiency map for Pion!";
970+
effMapPionTPC = static_cast<TH3F*>(listEfficiencyMaps->FindObject("h3EfficiencyPionTPC"));
971+
if (!effMapPionTPC) {
972+
LOG(error) << "Problem getting efficiency map for Pion with TPC!";
973+
return;
974+
}
975+
effMapPionTPCTOF = static_cast<TH3F*>(listEfficiencyMaps->FindObject("h3EfficiencyPionTPCTOF"));
976+
if (!effMapPionTPCTOF) {
977+
LOG(error) << "Problem getting efficiency map for Pion with TPC and TOF!";
971978
return;
972979
}
973980
}
@@ -2578,7 +2585,7 @@ struct Phik0shortanalysis {
25782585

25792586
float efficiencyPhiPion = 1.0f;
25802587
if (applyEfficiency) {
2581-
efficiencyPhiPion = effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPion->Interpolate(multiplicity, track.pt(), track.rapidity(massPi));
2588+
efficiencyPhiPion = track.pt() < trackConfigs.pTToUseTOF ? effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPC->Interpolate(multiplicity, track.pt(), track.rapidity(massPi)) : effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPCTOF->Interpolate(multiplicity, track.pt(), track.rapidity(massPi));
25822589
if (efficiencyPhiPion == 0)
25832590
efficiencyPhiPion = 1.0f;
25842591
}
@@ -2698,7 +2705,7 @@ struct Phik0shortanalysis {
26982705

26992706
float efficiencyPhiPion = 1.0f;
27002707
if (applyEfficiency) {
2701-
efficiencyPhiPion = effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPion->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi));
2708+
efficiencyPhiPion = track.pt() < trackConfigs.pTToUseTOF ? effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPC->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi)) : effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPCTOF->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi));
27022709
if (efficiencyPhiPion == 0)
27032710
efficiencyPhiPion = 1.0f;
27042711
}

0 commit comments

Comments
 (0)