Skip to content
Merged
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
11 changes: 7 additions & 4 deletions PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include "TDatabasePDG.h"

Check failure on line 45 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include "TPDGCode.h"

#include <cstdint>
Expand Down Expand Up @@ -241,6 +241,7 @@
{"photon_radiusV0", "Photon conversion radius (xy) V0; radius (cm); counts", {HistType::kTH1F, {{100, 0., 100.}}}},
{"photon_conversion_position", "Photon conversion position; x (cm); y (cm)", {HistType::kTH2F, {{250, -5.f, 5.f}, {250, -5.f, 5.f}}}},
{"photon_conversion_position_layer", "Photon conversion position (ITS layers); x (cm); y (cm)", {HistType::kTH2F, {{100, -5.f, 5.f}, {100, -5.f, 5.f}}}},
{"casc_dca_daughter_pairs", "DCA (xy) for cascade daughter pairs; DCAxy (cm); counts", {HistType::kTH1F, {{100, -0.1, 0.1}}}},
{"Xi_vs_Omega", "Mass Xi vs Omega; mass Omega (GeV/#it{c}^{2}); mass Xi (GeV/#it{c}^{2})", {HistType::kTH2F, {{50, 1.f, 2.f}, {50, 1.f, 2.f}}}},
{"massOmega", "Mass #Omega; signed #it{p}_{T} (GeV/#it{c}); mass (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, -5.f, 5.f}, {100, 1.62f, 1.72f}}}},
{"massOmegaWithBkg", "Mass Omega with Background; mass Omega (GeV/#it{c}^{2}); counts", {HistType::kTH1F, {{100, 1.62f, 1.72f}}}},
Expand Down Expand Up @@ -394,7 +395,7 @@
if (track.itsNCls() < track_nClsItsMin ||
track.tpcNClsFound() < track_nClsTpcMin ||
track.tpcNClsCrossedRows() < track_nClsTpcMin ||
track.tpcNClsCrossedRows() < 0.8 * track.tpcNClsFindable() ||

Check failure on line 398 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.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.
track.tpcNClsShared() > track_nClsTpcMaxShared) {
return false;
}
Expand All @@ -420,6 +421,7 @@

bool qualitySelectionCascade(const double dcaCascDaughters, const double cosPA)
{
m_hAnalysis.fill(HIST("casc_dca_daughter_pairs"), dcaCascDaughters);
if (std::abs(dcaCascDaughters) > cascsetting_dcaCascDaughters) {
return false;
}
Expand Down Expand Up @@ -585,7 +587,7 @@
template <typename T>
bool nucleiTrackSelection(const T& track)
{
if (track.tpcNClsFound() < 90) {

Check failure on line 590 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.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;
}
return true;
Expand Down Expand Up @@ -616,7 +618,7 @@
{
float beta = o2::pid::tof::Beta::GetBeta(candidate);
beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta)); /// sometimes beta > 1 or < 0, to be checked
return candidate.tpcInnerParam() * 2.f * std::sqrt(1.f / (beta * beta) - 1.f);
return candidate.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f);
}

// =========================================================================================================
Expand Down Expand Up @@ -816,6 +818,7 @@
return;
}

m_v0TrackParCovs.emplace_back(v0TrackParCov);
float massV0 = fillHistogramsV0(massLambdaV0, massAntiLambdaV0, momMother, candidatePos, candidateNeg, alphaAP, qtAP, radiusV0, v0Bitmask);
candidatePos.massMother = massV0;
candidateNeg.massMother = massV0;
Expand Down Expand Up @@ -942,15 +945,15 @@
return;
}
m_hAnalysis.fill(HIST("de_selections"), DeSelections::kDeNClsIts);
if (!selectionPIDtpcDe(track)) {
if (std::abs(track.tpcNSigmaDe()) > desetting_nsigmatpc) {
return;
}
m_hAnalysis.fill(HIST("de_selections"), DeSelections::kDePIDtpc);
if (!track.hasTOF() || std::abs(track.tofNSigmaDe()) > desetting_nsigmatof) {
return;
}
m_hAnalysis.fill(HIST("de_selections"), DeSelections::kDePIDtof);
m_hAnalysis.fill(HIST("nSigmaTPCDe"), track.p() * track.sign(), computeNSigmaDe(track));
m_hAnalysis.fill(HIST("nSigmaTPCDe"), track.p() * track.sign(), track.tpcNSigmaDe());
m_hAnalysis.fill(HIST("nSigmaITSDe"), track.p() * track.sign(), m_responseITS.nSigmaITS<o2::track::PID::Deuteron>(track.itsClusterSizes(), track.p(), track.eta()));
m_hAnalysis.fill(HIST("nSigmaTOFDe"), track.p() * track.sign(), track.tofNSigmaDe());
m_hAnalysis.fill(HIST("TOFmassDe"), track.p() * track.sign(), computeTOFmassDe<isMC>(track));
Expand All @@ -968,7 +971,7 @@
m_ClusterStudiesTableExtra(
track.tpcInnerParam() * track.sign(), // pTPC_De,
track.pidForTracking(), // PIDinTrk_De,
computeNSigmaDe(track), // TpcNSigma_De,
track.tpcNSigmaDe(), // TpcNSigma_De,
track.tofNSigmaDe(), // TofNSigma_De,
computeTOFmassDe<isMC>(track), // TofMass_De,
-999.f, // cosPA,
Expand Down Expand Up @@ -1108,12 +1111,12 @@

if (setting_fillV0 || setting_fillK) {
m_v0TrackParCovs.clear();
for (auto& v0 : v0Table_thisCollision) {

Check failure on line 1114 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fillV0Cand</*isMC*/ false>(PV, v0, tracks);
}
}
if (setting_fillK) { // the v0 loops are needed for the Ks
for (auto& cascade : cascTable_thisCollision) {

Check failure on line 1119 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fillKCand</*isMC*/ false>(PV, cascade, tracks);
}
}
Expand All @@ -1134,7 +1137,7 @@
auto TrackTable_thisCollision = tracks.sliceBy(m_perCol, collIdx);
TrackTable_thisCollision.bindExternalIndices(&tracks);

for (auto track : TrackTable_thisCollision) {

Check failure on line 1140 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!nucleiTrackSelection(track)) {
continue;
}
Expand Down Expand Up @@ -1164,7 +1167,7 @@
auto TrackTable_thisCollision = tracks.sliceBy(m_perCol, collIdx);
TrackTable_thisCollision.bindExternalIndices(&tracks);

for (auto track : TrackTable_thisCollision) {

Check failure on line 1170 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!qualityTrackSelection(track)) {
continue;
}
Expand Down Expand Up @@ -1198,13 +1201,13 @@

m_v0TrackParCovs.clear();
if (setting_fillV0 || setting_fillK) {
for (auto& v0 : v0Table_thisCollision) {

Check failure on line 1204 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fillV0Cand</*isMC*/ true>(PV, v0, tracks);
}
}

if (setting_fillK) { // the v0 loops are needed for the Ks
for (auto& cascade : cascTable_thisCollision) {

Check failure on line 1210 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fillKCand</*isMC*/ true>(PV, cascade, tracks);
}
}
Expand All @@ -1225,7 +1228,7 @@
auto TrackTable_thisCollision = tracks.sliceBy(m_perColMC, collIdx);
TrackTable_thisCollision.bindExternalIndices(&tracks);

for (auto track : TrackTable_thisCollision) {

Check failure on line 1231 in PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!nucleiTrackSelection(track)) {
continue;
}
Expand Down
Loading