Skip to content

Commit a4236ad

Browse files
authored
[PWGLF] Join proton PID table for tracks + unified efficiency treatment for pions (#14487)
1 parent 30e844d commit a4236ad

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ static constexpr std::array<std::string_view, 2> phiMassRegionLabels{"Signal", "
7878
enum ParticleOfInterest {
7979
Phi = 0,
8080
K0S,
81-
PionTPC,
82-
PionTPCTOF
81+
Pion,
82+
/*PionTPC,
83+
PionTPCTOF*/
84+
ParticleOfInterestSize
8385
};
8486

85-
static constexpr std::array<std::string_view, 4> particleOfInterestLabels{"Phi", "K0S", "PionTPC", "PionTPCTOF"};
87+
static constexpr std::array<std::string_view, ParticleOfInterestSize> particleOfInterestLabels{"Phi", "K0S", "Pion" /*"PionTPC", "PionTPCTOF"*/};
8688

8789
/*
8890
#define LIST_OF_PARTICLES_OF_INTEREST \
@@ -180,8 +182,8 @@ struct PhiStrangenessCorrelation {
180182
Configurable<bool> forceTOF{"forceTOF", false, "force the TOF signal for the PID"};
181183
Configurable<float> tofPIDThreshold{"tofPIDThreshold", 0.5, "minimum pT after which TOF PID is applicable"};
182184
Configurable<std::vector<int>> trkPIDspecies{"trkPIDspecies", std::vector<int>{o2::track::PID::Pion, o2::track::PID::Kaon, o2::track::PID::Proton}, "Trk sel: Particles species for PID, proton, pion, kaon"};
183-
Configurable<std::vector<float>> pidTPCMax{"pidTPCMax", std::vector<float>{2., 0., 0.}, "maximum nSigma TPC"};
184-
Configurable<std::vector<float>> pidTOFMax{"pidTOFMax", std::vector<float>{2., 0., 0.}, "maximum nSigma TOF"};
185+
Configurable<std::vector<float>> pidTPCMax{"pidTPCMax", std::vector<float>{2.0f, 2.0f, 2.0f}, "maximum nSigma TPC"};
186+
Configurable<std::vector<float>> pidTOFMax{"pidTOFMax", std::vector<float>{2.0f, 2.0f, 2.0f}, "maximum nSigma TOF"};
185187
} trackConfigs;
186188

187189
// Configurables on phi selection
@@ -261,7 +263,7 @@ struct PhiStrangenessCorrelation {
261263
using V0DauMCTracks = soa::Join<V0DauTracks, aod::McTrackLabels>;
262264

263265
// Defining the type of the tracks for data and MC
264-
using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTOFFullPi, aod::pidTOFFullKa>;
266+
using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
265267
using FullMCTracks = soa::Join<FullTracks, aod::McTrackLabels>;
266268

267269
// using FilteredTracks = soa::Filtered<FullTracks>;
@@ -286,7 +288,7 @@ struct PhiStrangenessCorrelation {
286288
std::shared_ptr<TH3> effMapPionTPC = nullptr;
287289
std::shared_ptr<TH3> effMapPionTPCTOF = nullptr;*/
288290

289-
std::array<std::shared_ptr<TH3>, 4> effMaps{};
291+
std::array<std::shared_ptr<TH3>, ParticleOfInterestSize> effMaps{};
290292

291293
void init(InitContext&)
292294
{
@@ -344,7 +346,7 @@ struct PhiStrangenessCorrelation {
344346
ccdb->setLocalObjectValidityChecking();
345347
ccdb->setFatalWhenNull(false);
346348

347-
for (int i = 0; i < 4; ++i) {
349+
for (int i = 0; i < ParticleOfInterestSize; ++i) {
348350
loadEfficiencyMapFromCCDB(static_cast<ParticleOfInterest>(i));
349351
}
350352
}
@@ -443,7 +445,7 @@ struct PhiStrangenessCorrelation {
443445
if (std::abs(nSigmaTPC) >= trackConfigs.pidTPCMax->at(speciesIndex)) {
444446
return false; // TPC check failed
445447
}
446-
if (trackConfigs.forceTOF || (track.pt() > trackConfigs.tofPIDThreshold && track.hasTOF())) {
448+
if (trackConfigs.forceTOF || (track.pt() >= trackConfigs.tofPIDThreshold && track.hasTOF())) {
447449
auto nSigmaTOF = aod::pidutils::tofNSigma(pid, track);
448450
if (std::abs(nSigmaTOF) >= trackConfigs.pidTOFMax->at(speciesIndex)) {
449451
return false; // TOF check failed
@@ -553,7 +555,7 @@ struct PhiStrangenessCorrelation {
553555
if (!selectionPion(track))
554556
continue;
555557

556-
auto Pion = track.pt() < trackConfigs.tofPIDThreshold ? PionTPC : PionTPCTOF;
558+
// auto Pion = track.pt() < trackConfigs.tofPIDThreshold ? PionTPC : PionTPCTOF;
557559

558560
float weightPhiPion = computeWeight(BoundEfficiencyMap(effMaps[Phi], multiplicity, phiCand.pt(), phiCand.y()),
559561
BoundEfficiencyMap(effMaps[Pion], multiplicity, track.pt(), track.rapidity(massPi)));

0 commit comments

Comments
 (0)