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
19 changes: 12 additions & 7 deletions PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.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/doubleOmegaTreeCreator.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 @@ -49,6 +49,7 @@
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <string>
#include <vector>

using namespace o2;
Expand Down Expand Up @@ -132,7 +133,7 @@
Produces<aod::DoubleOmegaTableMC> doubleOmegaTableMC;
Service<o2::ccdb::BasicCCDBManager> ccdb{};

static constexpr int kDoubleOmegaPdg = 1060020020;

Check failure on line 136 in PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
enum FindabilityStep : uint8_t {
kAllGenerated,
kOmegaLambdaKaon,
Expand All @@ -158,14 +159,15 @@
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", false, "Skimmed dataset processing"};
Configurable<bool> cfgApplyEventSelection{"cfgApplyEventSelection", true, "Apply the standard collision event selection"};
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 163 in PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.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<int> cfgMaterialCorrection{"cfgMaterialCorrection", static_cast<int>(o2::base::Propagator::MatCorrType::USEMatCorrLUT), "Material correction for the raw V0/cascade fits"};

ConfigurableAxis zVtxAxis{"zVtxBins", {100, -20.f, 20.f}, "Binning for the vertex z in cm"};

Check failure on line 166 in PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.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 massOmegaAxis{"massOmegaAxis", {400, o2::constants::physics::MassOmegaMinus - 0.05f, o2::constants::physics::MassOmegaMinus + 0.05f}, "binning for the Omega invariant-mass"};
ConfigurableAxis massXiAxis{"massXiAxis", {400, o2::constants::physics::MassXiMinus - 0.05f, o2::constants::physics::MassXiMinus + 0.05f}, "binning for the Xi invariant-mass"};
ConfigurableAxis massLambdaAxis{"massLambdaAxis", {400, o2::constants::physics::MassLambda0 - 0.05f, o2::constants::physics::MassLambda0 + 0.05f}, "binning for the Lambda invariant-mass"};
ConfigurableAxis momAxis{"momAxisFine", {5.e2, 0.f, 5.f}, "momentum axis binning"};

Check failure on line 170 in PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.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> zVtxMax{"zVtxMax", 10.0f, "maximum z position of the primary vertex"};
Configurable<float> etaMax{"etaMax", 0.9f, "maximum eta"};
Expand All @@ -188,6 +190,7 @@
Configurable<float> mXiWindow{"mXiWindow", 0.02f, "Xi mass window used by the cascade compatibility mode"};
Configurable<float> mOmegaWindow{"mOmegaWindow", 0.01f, "Omega mass window"};
Configurable<float> mLambdaWindow{"mLambdaWindow", 0.01f, "Lambda mass window"};
Configurable<float> maxDoubleOmegaMass{"maxDoubleOmegaMass", 3.6f, "Maximum double-Omega invariant mass (GeV/c^2)"};
Configurable<float> minCosPAOmega{"minCosPAOmega", -1.f, "Minimum Omega cosPA relative to the double-Omega decay vertex"};
Configurable<float> minCosPADirectLambda{"minCosPADirectLambda", -1.f, "Minimum direct-Lambda cosPA relative to the double-Omega decay vertex"};
Configurable<float> minCosPADoubleOmega{"minCosPADoubleOmega", -1.f, "Minimum double-Omega cosPA relative to the primary vertex"};
Expand All @@ -204,7 +207,7 @@
if (track.itsNCls() < minNITSClus ||
track.tpcNClsFound() < minNTPCClus ||
track.tpcNClsCrossedRows() < minNCrossedRows ||
track.tpcNClsCrossedRows() < 0.8f * track.tpcNClsFindable() ||

Check failure on line 210 in PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.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() > maxNSharedTPCClus) {
return false;
}
Expand Down Expand Up @@ -586,16 +589,17 @@
cand.dcaZDirectLambdaToPV = dcaDirectLambda[1];
cand.dcaXYDirectKaonToPV = dcaDirectKaon[0];
cand.dcaZDirectKaonToPV = dcaDirectKaon[1];
cand.mass = std::sqrt(std::max(0.f, massSquared));
if (cand.cosPAOmega < minCosPAOmega ||
cand.cosPADirectLambda < minCosPADirectLambda ||
cand.cosPADoubleOmega < minCosPADoubleOmega ||
std::hypot(decayVertex[0], decayVertex[1]) < minDoubleOmegaDecayRadius ||
std::abs(cand.dcaXYOmegaToPV) < dcaOmegaToPV ||
std::abs(cand.dcaXYDirectLambdaToPV) < dcaDirectLambdaToPV ||
std::abs(cand.dcaXYDirectKaonToPV) < dcaKaonToPV) {
std::abs(cand.dcaXYDirectKaonToPV) < dcaKaonToPV ||
cand.mass > maxDoubleOmegaMass) {
return false;
}
cand.mass = std::sqrt(std::max(0.f, massSquared));
cand.massOmega = omega.massOmega;
cand.massXi = omega.massXi;
return true;
Expand Down Expand Up @@ -899,7 +903,7 @@
const std::array<int64_t, 3> sourceTrackIds{
lambdaKaonSource.posTrackId(), lambdaKaonSource.negTrackId(), lambdaKaonSource.bachelorId()};
bool sharesTrack = false;
for (const auto omegaTrackId : omegaTrackIds) {
for (const auto& omegaTrackId : omegaTrackIds) {
if (std::find(sourceTrackIds.begin(), sourceTrackIds.end(), omegaTrackId) != sourceTrackIds.end()) {
sharesTrack = true;
break;
Expand Down Expand Up @@ -932,10 +936,11 @@
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);

if (!collision.sel8() ||
std::abs(collision.posZ()) > zVtxMax ||
!collision.selection_bit(aod::evsel::kNoITSROFrameBorder) ||
!collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) {
if (cfgApplyEventSelection &&
(!collision.sel8() ||
std::abs(collision.posZ()) > zVtxMax ||
!collision.selection_bit(aod::evsel::kNoITSROFrameBorder) ||
!collision.selection_bit(aod::evsel::kNoTimeFrameBorder))) {
return false;
}
if (cfgSkimmedProcessing) {
Expand Down Expand Up @@ -1107,7 +1112,7 @@
const std::array<int64_t, 3> cascadeTrackIds{
cascadeV0.posTrackId(), cascadeV0.negTrackId(), cascade.bachelorId()};
bool allOmegaTracksInCascade = true;
for (std::size_t iDaughter = 0; iDaughter < 3; ++iDaughter) {

Check failure on line 1115 in PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.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 (std::find(cascadeTrackIds.begin(), cascadeTrackIds.end(), daughterTrackIds[iDaughter]) == cascadeTrackIds.end()) {
allOmegaTracksInCascade = false;
break;
Expand All @@ -1123,7 +1128,7 @@
for (const auto& v0 : v0s) {
const std::array<int64_t, 2> v0TrackIds{v0.posTrackId(), v0.negTrackId()};
bool allDirectLambdaTracksInV0 = true;
for (std::size_t iDaughter = 3; iDaughter < 5; ++iDaughter) {

Check failure on line 1131 in PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.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 (std::find(v0TrackIds.begin(), v0TrackIds.end(), daughterTrackIds[iDaughter]) == v0TrackIds.end()) {
allDirectLambdaTracksInV0 = false;
break;
Expand Down
Loading