Skip to content

Commit f418000

Browse files
authored
[PWGLF] Changes to accomodate online mult-integrated efficiency correction + electron rejection (AliceO2Group#15770)
1 parent 9ad38d0 commit f418000

3 files changed

Lines changed: 203 additions & 52 deletions

File tree

PWGLF/DataModel/LFPhiStrangeCorrelationTables.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ DECLARE_SOA_COLUMN(Phi, phi, float);
151151
DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool);
152152

153153
DECLARE_SOA_DYNAMIC_COLUMN(InNSigmaRegion, inNSigmaRegion,
154-
[](float nSigmaTPC, float pt, bool hasTOF, float nSigmaTOF, float pidTPCMax, float tofPIDThreshold, float pidTOFMax) -> bool {
154+
[](float nSigmaTPC, bool hasTOF, float nSigmaTOF, float pidTPCMax, float pidTOFMax) -> bool {
155155
if (std::abs(nSigmaTPC) >= pidTPCMax) {
156156
return false; // TPC check failed
157157
}
158-
if (pt >= tofPIDThreshold && hasTOF && std::abs(nSigmaTOF) >= pidTOFMax) {
158+
if (hasTOF && std::abs(nSigmaTOF) >= pidTOFMax) {
159159
return false; // TOF check failed
160160
}
161161
return true;
@@ -171,8 +171,9 @@ DECLARE_SOA_TABLE(PionTracksData, "AOD", "PITRACKSDATA",
171171
lf_selection_pion_track::Y,
172172
lf_selection_pion_track::Phi,
173173
lf_selection_pion_track::HasTOF,
174-
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC, lf_selection_pion_track::Pt,
175-
lf_selection_pion_track::HasTOF, lf_selection_pion_track::NSigmaTOF>);
174+
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC,
175+
lf_selection_pion_track::HasTOF,
176+
lf_selection_pion_track::NSigmaTOF>);
176177

177178
DECLARE_SOA_TABLE(PionTracksMcReco, "AOD", "PITRACKSMCRECO",
178179
soa::Index<>,
@@ -183,8 +184,9 @@ DECLARE_SOA_TABLE(PionTracksMcReco, "AOD", "PITRACKSMCRECO",
183184
lf_selection_pion_track::Y,
184185
lf_selection_pion_track::Phi,
185186
lf_selection_pion_track::HasTOF,
186-
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC, lf_selection_pion_track::Pt,
187-
lf_selection_pion_track::HasTOF, lf_selection_pion_track::NSigmaTOF>);
187+
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC,
188+
lf_selection_pion_track::HasTOF,
189+
lf_selection_pion_track::NSigmaTOF>);
188190
} // namespace o2::aod
189191

190192
#endif // PWGLF_DATAMODEL_LFPHISTRANGECORRELATIONTABLES_H_

PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ struct PionTrackProducer {
573573
using FilteredSimCollisions = soa::Filtered<SimCollisions>;
574574

575575
// Defining the type of the tracks for data and MC
576-
using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
576+
using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullEl, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
577577
using FullMCTracks = soa::Join<FullTracks, aod::McTrackLabels>;
578578

579579
void init(InitContext&)
@@ -633,6 +633,22 @@ struct PionTrackProducer {
633633
template <typename T>
634634
bool pidHypothesesRejection(const T& track)
635635
{
636+
// Electron rejection
637+
auto nSigmaTPCEl = aod::pidutils::tpcNSigma(o2::track::PID::Electron, track);
638+
639+
if (nSigmaTPCEl > -3.0f && nSigmaTPCEl < 5.0f) {
640+
auto nSigmaTPCPi = aod::pidutils::tpcNSigma(o2::track::PID::Pion, track);
641+
auto nSigmaTPCKa = aod::pidutils::tpcNSigma(o2::track::PID::Kaon, track);
642+
auto nSigmaTPCPr = aod::pidutils::tpcNSigma(o2::track::PID::Proton, track);
643+
644+
if (std::abs(nSigmaTPCPi) > 3.0f &&
645+
std::abs(nSigmaTPCKa) > 3.0f &&
646+
std::abs(nSigmaTPCPr) > 3.0f) {
647+
return false;
648+
}
649+
}
650+
651+
// Other hadron species rejection
636652
for (size_t speciesIndex = 0; speciesIndex < trackConfigs.trkPIDspecies->size(); ++speciesIndex) {
637653
auto const& pid = trackConfigs.trkPIDspecies->at(speciesIndex);
638654
auto nSigmaTPC = aod::pidutils::tpcNSigma(pid, track);

0 commit comments

Comments
 (0)