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
14 changes: 9 additions & 5 deletions PWGLF/TableProducer/Strangeness/sigmaHadCorr.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/sigmaHadCorr.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 @@ -36,7 +36,7 @@
using namespace o2::framework;
using namespace o2::framework::expressions;

using TracksFull = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullPr>;

Check failure on line 39 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
using TracksFullMC = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullPr, aod::McTrackLabels>;
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSel>;
using CollisionsFullMC = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels>;
Expand Down Expand Up @@ -97,7 +97,7 @@
Configurable<float> cutSigmaRadius{"cutSigmaRadius", 20.f, "Minimum radius for Sigma candidates (cm)"};
Configurable<float> cutSigmaMass{"cutSigmaMass", 0.3, "Sigma mass window (GeV/c^2)"};
Configurable<float> alphaAPCut{"alphaAPCut", 0., "Alpha AP cut for Sigma candidates"};
Configurable<float> qtAPCutLow{"qtAPCutLow", 0.15, "Lower qT AP cut for Sigma candidates (GeV/c)"};

Check failure on line 100 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> qtAPCutHigh{"qtAPCutHigh", 0.2, "Upper qT AP cut for Sigma candidates (GeV/c)"};
Configurable<float> cutEtaDaught{"cutEtaDaughter", 0.8f, "Eta cut for daughter tracks"};
Configurable<float> ptMinTOFKinkDau{"ptMinTOFKinkDau", 0.75f, "Minimum pT to require TOF for kink daughter PID (GeV/c)"};
Expand All @@ -111,7 +111,7 @@
Configurable<float> cutNSigmaTOF{"cutNSigmaTOF", 3, "TOF nSigma cut for hadron track"};

Configurable<bool> fillOutputTree{"fillOutputTree", true, "If true, fill the output tree with Sigma-hadron candidates"};
Configurable<bool> fillSparseInvMassKstar{"fillSparseInvMassKstar", false, "If true, fill THn with invmass, k*, sigma charge, proton charge, sigma decay radius, cosPA, sigma pt"};

Check failure on line 114 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

ConfigurableAxis CfgVtxBins{"CfgVtxBins", {10, -10, 10}, "Mixing bins - z-vertex"};
ConfigurableAxis CfgMultBins{"CfgMultBins", {VARIABLE_WIDTH, 0.0, 40.0, 80.0, 500.0}, "Mixing bins - number of contributor"};
Expand All @@ -125,7 +125,7 @@
{
// Axes
const AxisSpec ptAxis{100, -10, 10, "#it{p}_{T} (GeV/#it{c})"};
const AxisSpec massResolutionAxis{100, -0.1, 0.1, "m_{rec} - m_{gen} (GeV/#it{c}^{2})"};

Check failure on line 128 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
const AxisSpec nSigmaHadAxis{100, -5, 5, "n#sigma_{had}"};
const AxisSpec sigmaMassAxis{50, 1.1, 1.3, "m (GeV/#it{c}^{2})"};
const AxisSpec kStarAxis{200, 0.0, 2., "k* (GeV/#it{c})"};
Expand All @@ -145,6 +145,7 @@
// qa histograms
rEventSelection.add("hVertexZRec", "hVertexZRec", {HistType::kTH1F, {vertexZAxis}});
// Dedicated QA folder
rSigmaHad.add("QA/hHadronPt", "Hadron #it{p}_{T}", {HistType::kTH1F, {ptHadAxis}});
rSigmaHad.add("QA/h2TPCNSigmaHadVsPtHad", "TPC n#sigma_{had} vs #it{p}_{T,had}", {HistType::kTH2F, {ptHadAxis, nSigmaHadAxis}});
rSigmaHad.add("QA/h2TOFNSigmaHadVsPtHad", "TOF n#sigma_{had} vs #it{p}_{T,had}", {HistType::kTH2F, {ptHadAxis, nSigmaHadAxis}});
rSigmaHad.add("QA/hSigmaPt", "#Sigma #it{p}_{T}", {HistType::kTH1F, {sigmaPtAxis}});
Expand Down Expand Up @@ -215,7 +216,7 @@
float A = 4.f * (eChDau * eChDau - a * a);
float B = -4.f * a * K;
float C = 4.f * eChDau * eChDau * massSigma * massSigma - K * K;
if (std::abs(A) < 1e-6f) {

Check failure on line 219 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.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 -999.f;
}
float D = B * B - 4.f * A * C;
Expand All @@ -227,7 +228,7 @@
float P2 = (-B - sqrtD) / (2.f * A);
if (P2 < 0.f && P1 < 0.f) {
return -999.f;
}

Check failure on line 231 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.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.
if (P2 < 0.f) {
return P1;
}
Expand Down Expand Up @@ -294,11 +295,11 @@
const float betax = beta * std::cos(trackSum.Phi()) * std::sin(trackSum.Theta());
const float betay = beta * std::sin(trackSum.Phi()) * std::sin(trackSum.Theta());
const float betaz = beta * std::cos(trackSum.Theta());
PartOneCMS.SetXYZM(part1.Px(), part1.Py(), part1.Pz(), part1.M());

Check failure on line 298 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
PartTwoCMS.SetXYZM(part2.Px(), part2.Py(), part2.Pz(), part2.M());
const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz);
PartOneCMS = boostPRF(PartOneCMS);

Check failure on line 301 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
PartTwoCMS = boostPRF(PartTwoCMS);

Check failure on line 302 in PWGLF/TableProducer/Strangeness/sigmaHadCorr.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
trackRelK = PartOneCMS - PartTwoCMS;
return 0.5 * trackRelK.P();
}
Expand All @@ -317,11 +318,13 @@
return false;
}

if (!candidate.hasTOF()) {
return false;
}
if (std::abs(getTOFNSigmaHad(candidate)) > cutNSigmaTOF) {
return false;
if (candidate.pt() >= ptMinTOFHad) {
if (!candidate.hasTOF()) {
return false;
}
if (std::abs(getTOFNSigmaHad(candidate)) > cutNSigmaTOF) {
return false;
}
}
return true; // Track is selected
}
Expand Down Expand Up @@ -446,6 +449,7 @@
continue;
}

rSigmaHad.fill(HIST("QA/hHadronPt"), candidate.ptHad());
rSigmaHad.fill(HIST("QA/h2TPCNSigmaHadVsPtHad"), candidate.ptHad(), candidate.nSigmaTPCHad);
if (hadTrack.hasTOF()) {
rSigmaHad.fill(HIST("QA/h2TOFNSigmaHadVsPtHad"), candidate.ptHad(), candidate.nSigmaTOFHad);
Expand Down
Loading