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
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Nuspex/he3HadronFemto.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/Nuspex/he3HadronFemto.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 @@ -169,7 +169,7 @@
static const std::vector<std::string> kDCAResParNames{"res0", "res1", "res2", "mean"};

constexpr double kHePidTrkPtParamsHeDefault[3] = {0.3101, -0.1759, 0.0262};
constexpr double kHePidTrkPParamsHeDefault[3] = {1.1157, -0.9171, 0.1987};

Check failure on line 172 in PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.

} // namespace

Expand Down Expand Up @@ -282,7 +282,7 @@
Configurable<float> settingCutNsigmaTOF{"settingCutNsigmaTOF", 3.0f, "Value of the TOF Nsigma cut"};
} cutSettings;

Configurable<LabeledArray<int>> settingEventSelections{"settingEventSelections", {nuclei::EvSelDefault[0], 8, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
Configurable<LabeledArray<int>> settingEventSelections{"settingEventSelections", {nuclei::EvSelDefault[0], nuclei::evSel::kNevSels, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
Configurable<int> settingNoMixedEvents{"settingNoMixedEvents", 5, "Number of mixed events per event"};
Configurable<bool> settingEnableBkgUS{"settingEnableBkgUS", false, "Enable US background"};
Configurable<bool> settingEnableDCAfitter{"settingEnableDCAfitter", false, "Enable DCA fitter"};
Expand Down Expand Up @@ -446,16 +446,16 @@
for (int iSpecies = 0; iSpecies < static_cast<int>(Species::kAllSpecies); iSpecies++) {

for (int i = 0; i < nItsParameters; i++) {
mHe3HadronParams.itsParams[iSpecies][i] = i < 3 ? settingItsParams->get(Species(iSpecies), Form("p%i", i)) : settingItsParams->get(Species(iSpecies), Form("res%i", i - 3));

Check failure on line 449 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
}

for (int i = 0; i < nDCAResParameters; i++) {
mHe3HadronParams.dcaxyResParams[iSpecies][i] = settingDCAxyResParams->get(Species(iSpecies), i < 3 ? Form("res%i", i) : "mean");

Check failure on line 453 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
mHe3HadronParams.dcazResParams[iSpecies][i] = settingDCAzResParams->get(Species(iSpecies), i < 3 ? Form("res%i", i) : "mean");

Check failure on line 454 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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 (mHe3HadronParams.itsParams[Species::kHe3][0] > -1e31) {

Check failure on line 458 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
mResponseITS.setParameters(mHe3HadronParams.itsParams[Species::kHad][0], mHe3HadronParams.itsParams[Species::kHad][1], mHe3HadronParams.itsParams[Species::kHad][2],
mHe3HadronParams.itsParams[Species::kHe3][0], mHe3HadronParams.itsParams[Species::kHe3][1], mHe3HadronParams.itsParams[Species::kHe3][2],
mHe3HadronParams.itsParams[Species::kHad][3], mHe3HadronParams.itsParams[Species::kHad][4], mHe3HadronParams.itsParams[Species::kHad][5],
Expand Down Expand Up @@ -572,7 +572,7 @@

float correctPtHe3TrackedAsTriton(const float pt, const uint32_t pidForTracking)
{
if (pt < 2.5 && pidForTracking == o2::track::PID::Triton)

Check failure on line 575 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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 pt * (1. - mHe3HadronParams.hePidTrkPtParams[0] - mHe3HadronParams.hePidTrkPtParams[1] * pt - mHe3HadronParams.hePidTrkPtParams[2] * pt * pt);

return pt;
Expand All @@ -584,7 +584,7 @@
float correctedTPCinnerParam = (heliumPID && settingCompensatePIDinTracking) ? tpcInnerParam / 2.f : tpcInnerParam;

correctedTPCinnerParam *= 2.f; // rigidity to momentum
if (correctedTPCinnerParam < 2.5 && pidForTracking == o2::track::PID::Triton)

Check failure on line 587 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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 correctedTPCinnerParam * (1. - mHe3HadronParams.hePidTrkPParams[0] - mHe3HadronParams.hePidTrkPParams[1] * correctedTPCinnerParam - mHe3HadronParams.hePidTrkPParams[2] * correctedTPCinnerParam * correctedTPCinnerParam);

return correctedTPCinnerParam;
Expand Down Expand Up @@ -762,7 +762,7 @@
std::array<float, 3> collisionVertex = getCollisionVertex(collisions, collIdx);
const auto& pca = mFitter.getPCACandidate();
float distance = defaultTodistance;
for (int i = 0; i < 3; i++) {

Check failure on line 765 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
distance += (pca[i] - collisionVertex[i]) * (pca[i] - collisionVertex[i]);
}
if (distanceMin < 0 || distance < distanceMin) {
Expand All @@ -784,7 +784,7 @@
std::array<float, 3> collisionVertex = getCollisionVertex(collisions, he3Hadcand.collisionID);

he3Hadcand.momHe3 = std::array{trackHe3.px(), trackHe3.py(), trackHe3.pz()};
for (int i = 0; i < 3; i++)

Check failure on line 787 in PWGLF/TableProducer/Nuspex/he3HadronFemto.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.
he3Hadcand.momHe3[i] = he3Hadcand.momHe3[i] * 2;
he3Hadcand.momHad = std::array{trackHad.px(), trackHad.py(), trackHad.pz()};
float invMass = CommonInite;
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Nuspex/nucleiFlowTree.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct nucleiFlowTree {
Configurable<float> cfgCutPtMinTree{"cfgCutPtMinTree", 0.2f, "Minimum track transverse momentum for tree saving"};
Configurable<float> cfgCutPtMaxTree{"cfgCutPtMaxTree", 15.0f, "Maximum track transverse momentum for tree saving"};

Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], 8, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], nuclei::evSel::kNevSels, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};

Configurable<LabeledArray<double>> cfgMomentumScalingBetheBloch{"cfgMomentumScalingBetheBloch", {nuclei::bbMomScalingDefault[0], 5, 2, nuclei::names, nuclei::chargeLabelNames}, "TPC Bethe-Bloch momentum scaling for light nuclei"};
Configurable<LabeledArray<double>> cfgBetheBlochParams{"cfgBetheBlochParams", {nuclei::betheBlochDefault[0], 5, 6, nuclei::names, nuclei::betheBlochParNames}, "TPC Bethe-Bloch parameterisation for light nuclei"};
Expand Down
3 changes: 2 additions & 1 deletion PWGLF/TableProducer/QC/nucleiQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

#include <fmt/format.h>

#include <algorithm>
#include <array>
#include <cmath>
#include <cstddef>
Expand Down Expand Up @@ -100,7 +101,7 @@ struct nucleiQC {
Configurable<bool> cfgSkipNonReconstructedCollisions{"cfgSkipNonReconstructedCollisions", true, "Should you skip collisions for which no particle is reconstructed?"};
Configurable<bool> cfgFillOnlyPhysicalPrimaries{"cfgFillOnlyPhysicalPrimaries", true, "Should you only select physical primary particles?"};
Configurable<LabeledArray<int>> cfgSpeciesToProcess{"cfgSpeciesToProcess", {nuclei::speciesToProcessDefault[0], nuclei::Species::kNspecies, 1, nuclei::names, {"processNucleus"}}, "Nuclei to process"};
Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], 8, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], nuclei::evSel::kNevSels, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
Configurable<int> cfgCentralityEstimator{"cfgCentralityEstimator", 0, "Centrality estimator (FV0A: 0, FT0M: 1, FT0A: 2, FT0C: 3)"};
Configurable<bool> cfgPerformPidSelectionInIts{"cfgPerformPidSelectionInIts", false, "Perform PID selections in ITS"};
Configurable<bool> cfgPerformPidSelectionInTpc{"cfgPerformPidSelectionInTpc", false, "Perform PID selections in TPC"};
Expand Down
26 changes: 24 additions & 2 deletions PWGLF/Utils/nucleiUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,20 +307,26 @@ enum evSel {
kIsGoodZvtxFT0vsPV,
kIsGoodITSLayersAll,
kIsEPtriggered,
kNoCollInRofStandard,
kNoHighMultCollInPrevRof,
kNoCollInTimeRangeStandard,
kNevSels
};

static const std::vector<std::string> eventSelectionTitle{"Event selections"};
static const std::vector<std::string> eventSelectionLabels{"TVX", "Z vtx", "TF border", "ITS ROF border", "No same-bunch pile-up", "kIsGoodZvtxFT0vsPV", "isGoodITSLayersAll", "isEPtriggered"};
static const std::vector<std::string> eventSelectionLabels{"TVX", "Z vtx", "TF border", "ITS ROF border", "No same-bunch pile-up", "kIsGoodZvtxFT0vsPV", "isGoodITSLayersAll", "isEPtriggered", "No collision in ROF standard", "No high-multiplicity collision in previous ROF", "No collision in time range standard"};

constexpr int EvSelDefault[8][1]{
constexpr int EvSelDefault[evSel::kNevSels][1]{
{1},
{1},
{0},
{0},
{0},
{0},
{0},
{0},
{0},
{0},
{0}};

template <typename Tcollision> // move to nucleiUtils
Expand Down Expand Up @@ -382,6 +388,22 @@ bool eventSelection(const Tcollision& collision, o2::framework::HistogramRegistr
}
registry.fill(HIST("hEventSelections"), evSel::kIsEPtriggered + 1);
}

if (eventSelections.get(evSel::kNoCollInRofStandard) && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
return false;
}
registry.fill(HIST("hEventSelections"), evSel::kNoCollInRofStandard + 1);

if (eventSelections.get(evSel::kNoHighMultCollInPrevRof) && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) {
return false;
}
registry.fill(HIST("hEventSelections"), evSel::kNoHighMultCollInPrevRof + 1);

if (eventSelections.get(evSel::kNoCollInTimeRangeStandard) && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
return false;
}
registry.fill(HIST("hEventSelections"), evSel::kNoCollInTimeRangeStandard + 1);

registry.fill(HIST("hVtxZ"), collision.posZ());

return true;
Expand Down
Loading