Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions PWGLF/DataModel/LFPhiStrangeCorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ DECLARE_SOA_COLUMN(Phi, phi, float);
DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool);

DECLARE_SOA_DYNAMIC_COLUMN(InNSigmaRegion, inNSigmaRegion,
[](float nSigmaTPC, float pt, bool hasTOF, float nSigmaTOF, float pidTPCMax, float tofPIDThreshold, float pidTOFMax) -> bool {
[](float nSigmaTPC, bool hasTOF, float nSigmaTOF, float pidTPCMax, float pidTOFMax) -> bool {
if (std::abs(nSigmaTPC) >= pidTPCMax) {
return false; // TPC check failed
}
if (pt >= tofPIDThreshold && hasTOF && std::abs(nSigmaTOF) >= pidTOFMax) {
if (hasTOF && std::abs(nSigmaTOF) >= pidTOFMax) {
return false; // TOF check failed
}
return true;
Expand All @@ -171,8 +171,9 @@ DECLARE_SOA_TABLE(PionTracksData, "AOD", "PITRACKSDATA",
lf_selection_pion_track::Y,
lf_selection_pion_track::Phi,
lf_selection_pion_track::HasTOF,
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC, lf_selection_pion_track::Pt,
lf_selection_pion_track::HasTOF, lf_selection_pion_track::NSigmaTOF>);
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC,
lf_selection_pion_track::HasTOF,
lf_selection_pion_track::NSigmaTOF>);

DECLARE_SOA_TABLE(PionTracksMcReco, "AOD", "PITRACKSMCRECO",
soa::Index<>,
Expand All @@ -183,8 +184,9 @@ DECLARE_SOA_TABLE(PionTracksMcReco, "AOD", "PITRACKSMCRECO",
lf_selection_pion_track::Y,
lf_selection_pion_track::Phi,
lf_selection_pion_track::HasTOF,
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC, lf_selection_pion_track::Pt,
lf_selection_pion_track::HasTOF, lf_selection_pion_track::NSigmaTOF>);
lf_selection_pion_track::InNSigmaRegion<lf_selection_pion_track::NSigmaTPC,
lf_selection_pion_track::HasTOF,
lf_selection_pion_track::NSigmaTOF>);
} // namespace o2::aod

#endif // PWGLF_DATAMODEL_LFPHISTRANGECORRELATIONTABLES_H_
18 changes: 17 additions & 1 deletion PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -573,7 +573,7 @@
using FilteredSimCollisions = soa::Filtered<SimCollisions>;

// Defining the type of the tracks for data and MC
using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
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>;
using FullMCTracks = soa::Join<FullTracks, aod::McTrackLabels>;

void init(InitContext&)
Expand Down Expand Up @@ -633,6 +633,22 @@
template <typename T>
bool pidHypothesesRejection(const T& track)
{
// Electron rejection
auto nSigmaTPCEl = aod::pidutils::tpcNSigma(o2::track::PID::Electron, track);

if (nSigmaTPCEl > -3.0f && nSigmaTPCEl < 5.0f) {

Check failure on line 639 in PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
auto nSigmaTPCPi = aod::pidutils::tpcNSigma(o2::track::PID::Pion, track);
auto nSigmaTPCKa = aod::pidutils::tpcNSigma(o2::track::PID::Kaon, track);
auto nSigmaTPCPr = aod::pidutils::tpcNSigma(o2::track::PID::Proton, track);
Comment thread
scannito marked this conversation as resolved.

if (std::abs(nSigmaTPCPi) > 3.0f &&

Check failure on line 644 in PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(nSigmaTPCKa) > 3.0f &&

Check failure on line 645 in PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(nSigmaTPCPr) > 3.0f) {

Check failure on line 646 in PWGLF/TableProducer/Strangeness/phiStrangeCorrelator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
}
}

// Other hadron species rejection
for (size_t speciesIndex = 0; speciesIndex < trackConfigs.trkPIDspecies->size(); ++speciesIndex) {
auto const& pid = trackConfigs.trkPIDspecies->at(speciesIndex);
auto nSigmaTPC = aod::pidutils::tpcNSigma(pid, track);
Expand Down
Loading
Loading