Skip to content
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion ALICE3/Tasks/alice3-strangeness.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 ALICE3/Tasks/alice3-strangeness.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 @@ -46,7 +46,7 @@

#include <TGenPhaseSpace.h>
#include <TGeoGlobalMagField.h>
#include <TLorentzVector.h>

Check failure on line 49 in ALICE3/Tasks/alice3-strangeness.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.
#include <TPDGCode.h>
#include <TRandom3.h>

Expand All @@ -67,7 +67,7 @@
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};

Configurable<int> idGeometry{"idGeometry", 0, "geometry ID used for propagation"};
struct ConfigurableGroup {
struct : ConfigurableGroup {
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "pt axis for QA histograms"};
ConfigurableAxis axisK0Mass{"axisK0Mass", {200, 0.4f, 0.6f}, ""};
ConfigurableAxis axisLambdaMass{"axisLambdaMass", {200, 1.08f, 1.2f}, ""};
Expand All @@ -81,6 +81,7 @@
} histAxes;

struct : ConfigurableGroup {
std::string prefix = "selectionFlags";
Configurable<bool> applyRapiditySelection{"applyRapiditySelection", true, "apply rapidity selection"};
Configurable<bool> applyDCAdaughterSelection{"applyDCADaughterSelection", true, "apply DCA daughter selection"};
Configurable<bool> applyCosOfPAngleSelection{"applyCosOfPAngleSelection", true, "apply cosine of pointing angle selection"};
Expand All @@ -94,6 +95,7 @@
} selectionFlags;

struct : ConfigurableGroup {
std::string prefix = "selectionValues";
Configurable<float> yK0Selection{"yK0Selection", 0.5f, "rapidity selection for K0"};
Configurable<float> yLambdaSelection{"yLambdaSelection", 0.5f, "rapidity selection for Lambda"};
Configurable<float> dcaDaughterSelection{"dcaDaughterSelection", 1.0f, "DCA daughter selection"};
Expand Down Expand Up @@ -185,19 +187,19 @@
histos.fill(HIST("K0/hSelections"), 0); // all candidates
histos.fill(HIST("K0/hDCANegDaughter"), negV0Daughter.dcaXY());
histos.fill(HIST("K0/hDCAPosDaughter"), posV0Daughter.dcaXY());
if (std::abs(negV0Daughter.dcaXY()) < 0.05)

Check failure on line 190 in ALICE3/Tasks/alice3-strangeness.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.
continue;
histos.fill(HIST("K0/hSelections"), 1); // dcaXY cut
if (std::abs(posV0Daughter.dcaXY()) < 0.05)

Check failure on line 193 in ALICE3/Tasks/alice3-strangeness.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.
continue;
histos.fill(HIST("K0/hSelections"), 2); // dcaXY cut
if (v0Cand.dcaV0Daughters() > 1.0)
continue;
histos.fill(HIST("K0/hSelections"), 3); // dca between daughters
if (v0Cand.v0Radius() < 0.5)

Check failure on line 199 in ALICE3/Tasks/alice3-strangeness.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.
continue;
histos.fill(HIST("K0/hSelections"), 4); // radius cut
if (std::abs(negV0Daughter.eta()) > 0.8 || std::abs(posV0Daughter.eta()) > 0.8)

Check failure on line 202 in ALICE3/Tasks/alice3-strangeness.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.
continue;
histos.fill(HIST("K0/hSelections"), 5); // eta cut
histos.fill(HIST("K0/hMassSelected"), v0Cand.mK0(), v0Cand.pt());
Expand All @@ -210,9 +212,9 @@
// if(collision.lutConfigId()!=idGeometry)
// return;
for (auto const& v0 : v0Candidates) {
bool isK0 = (v0.mK0Short() - o2::constants::physics::MassK0Short) < 0.3;

Check failure on line 215 in ALICE3/Tasks/alice3-strangeness.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.
bool isLambda = (v0.mLambda() - o2::constants::physics::MassLambda0) < 0.2;

Check failure on line 216 in ALICE3/Tasks/alice3-strangeness.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.
bool isAntiLambda = (v0.mAntiLambda() - o2::constants::physics::MassLambda0) < 0.2;

Check failure on line 217 in ALICE3/Tasks/alice3-strangeness.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.

histos.fill(HIST("reconstructedCandidates/hArmeterosBeforeAllSelections"), v0.alpha(), v0.qtarm());
histos.fill(HIST("hV0CandidateCounter"), 1);
Expand Down Expand Up @@ -296,7 +298,7 @@
static_for<0, 5>([&](auto i) {
constexpr int In = i.value;
if (TESTBIT(AppliedSelectionCheckMask, In)) {
if (In == 3)

Check failure on line 301 in ALICE3/Tasks/alice3-strangeness.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.
selectionCheck = selectionCheckPos;
if (isK0)
histos.fill(HIST("reconstructedCandidates/K0/h") + HIST(kSelectionNames[In]), v0.mK0Short(), v0.pt(), selectionCheck);
Expand Down
Loading