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
18 changes: 15 additions & 3 deletions EventFiltering/PWGLF/nucleiFilter.cxx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
// O2 includes

Check warning on line 11 in EventFiltering/PWGLF/nucleiFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check warning on line 11 in EventFiltering/PWGLF/nucleiFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in EventFiltering/PWGLF/nucleiFilter.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include <cmath>
#include <string>
Expand Down Expand Up @@ -121,12 +121,13 @@
struct : ConfigurableGroup {
Configurable<double> d_bz_input{"trgH3L3Body.d_bz", -999, "bz field, -999 is automatic"};
Configurable<float> minCosPA3body{"trgH3L3Body.minCosPA3body", 0.9995, "minCosPA3body"};
Configurable<float> dcavtxdau{"trgH3L3Body.dcavtxdau", 0.04, "meen DCA among Daughters"};
Configurable<float> dcavtxdau{"trgH3L3Body.dcavtxdau", 0.02, "meen DCA among Daughters"};
Configurable<float> dcapiontopv{"trgH3L3Body.dcapiontopv", 0.05, "DCA Pion To PV"};
Configurable<float> tofPIDNSigmaMin{"trgH3L3Body.tofPIDNSigmaMin", -5, "tofPIDNSigmaMin"};
Configurable<float> tofPIDNSigmaMax{"trgH3L3Body.tofPIDNSigmaMax", 5, "tofPIDNSigmaMax"};
Configurable<float> tpcPIDNSigmaCut{"trgH3L3Body.tpcPIDNSigmaCut", 5, "tpcPIDNSigmaCut"};
Configurable<float> lifetimecut{"trgH3L3Body.lifetimecut", 40., "lifetimecut"};
Configurable<float> minDaughtersEta{"trgH3L3Body.minDaughtersEta", 1.f, "minDaughtersEta"};
Configurable<float> minProtonPt{"trgH3L3Body.minProtonPt", 0.3, "minProtonPt"};
Configurable<float> maxProtonPt{"trgH3L3Body.maxProtonPt", 5, "maxProtonPt"};
Configurable<float> minPionPt{"trgH3L3Body.minPionPt", 0.1, "minPionPt"};
Expand All @@ -136,7 +137,7 @@
Configurable<float> minDeuteronPUseTOF{"trgH3L3Body.minDeuteronPUseTOF", 1, "minDeuteronPt Enable TOF PID"};
Configurable<float> h3LMassLowerlimit{"trgH3L3Body.h3LMassLowerlimit", 2.96, "Hypertriton mass lower limit"};
Configurable<float> h3LMassUpperlimit{"trgH3L3Body.h3LMassUpperlimit", 3.04, "Hypertriton mass upper limit"};
Configurable<float> minP3Body{"trgH3L3Body.minP3Body", 0.5, "min P3Body"};
Configurable<float> minP3Body{"trgH3L3Body.minP3Body", 1.5, "min P3Body"};
Configurable<int> mintpcNClsproton{"trgH3L3Body.mintpcNClsproton", 90, "min tpc Nclusters for proton"};
Configurable<int> mintpcNClspion{"trgH3L3Body.mintpcNClspion", 70, "min tpc Nclusters for pion"};
Configurable<int> mintpcNClsdeuteron{"trgH3L3Body.mintpcNClsdeuteron", 100, "min tpc Nclusters for deuteron"};
Expand Down Expand Up @@ -173,6 +174,8 @@
qaHists.add("fDeuTOFNsigma", "Deuteron TOF Nsigma distribution", HistType::kTH2F, {{1200, -6, 6, "#it{p} (GeV/#it{c})"}, {2000, -100, 100, "TOF n#sigma"}});
qaHists.add("fBachDeuTOFNsigma", "Bachelor Deuteron TOF Nsigma distribution", HistType::kTH2F, {{1200, -6, 6, "#it{p} (GeV/#it{c})"}, {2000, -100, 100, "TOF n#sigma"}});
qaHists.add("fH3LMassVsPt", "Hypertrion mass Vs pT", HistType::kTH2F, {{100, 0, 10, "#it{p}_{T} (GeV/#it{c})"}, {80, 2.96, 3.04, "Inv. Mass (GeV/c^{2})"}});
qaHists.add("fH3LDcaVsPt", "DCA vs pT", HistType::kTH2F, {{100, 0, 10, "#it{p}_{T} (GeV/#it{c})"}, {100, 0, 0.05, "DCA (cm)"}});
qaHists.add("fH3LCosPAVsPt", "CosPA vs pT", HistType::kTH2F, {{100, 0, 10, "#it{p}_{T} (GeV/#it{c})"}, {100, 0.999, 1.0, "CosPA"}});
qaHists.add("fExtremeIonisationITS", "ITS clusters for extreme ionisation trigger", HistType::kTH3F, {{4, 3.5, 7.5, "Number of ITS clusters"}, {150, 0, 15, "Average cluster size in ITS x cos#lambda"}, {100, 0.1, 10, "#it{p} (GeV/#it{c})"}});

for (int iN{0}; iN < nNuclei; ++iN) {
Expand Down Expand Up @@ -208,7 +211,7 @@
}

// In case override, don't proceed, please - no CCDB access required
if (trgH3L3Body.d_bz_input > -990) {

Check warning on line 214 in EventFiltering/PWGLF/nucleiFilter.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.
d_bz = trgH3L3Body.d_bz_input;
fitter3body.setBz(d_bz);
o2::parameters::GRPMagField grpmag;
Expand Down Expand Up @@ -243,7 +246,7 @@
// Set magnetic field value once known
fitter3body.setBz(d_bz);

if (trgH3L3Body.useMatCorrType == 2) {

Check warning on line 249 in EventFiltering/PWGLF/nucleiFilter.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.
// setMatLUT only after magfield has been initalized
// (setMatLUT has implicit and problematic init field call if not)
o2::base::Propagator::Instance()->setMatLUT(lut);
Expand Down Expand Up @@ -330,11 +333,11 @@
{charges[1] * cfgMomentumScalingBetheBloch->get(1u, 0u) / masses[1], charges[1] * cfgMomentumScalingBetheBloch->get(1u, 1u) / masses[1]},
{charges[2] * cfgMomentumScalingBetheBloch->get(2u, 0u) / masses[2], charges[2] * cfgMomentumScalingBetheBloch->get(2u, 1u) / masses[2]}};

for (auto& track : tracks) { // start loop over tracks

Check warning on line 336 in EventFiltering/PWGLF/nucleiFilter.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 (track.itsNCls() >= cfgCutNclusExtremeIonisationITS) {
double avgClsSize{0.};
double cosL{std::sqrt(1. / (1. + track.tgl() * track.tgl()))};
for (int iC{0}; iC < 7; ++iC) {

Check warning on line 340 in EventFiltering/PWGLF/nucleiFilter.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.
avgClsSize += track.itsClsSizeInLayer(iC);
}
avgClsSize = avgClsSize * cosL / track.itsNCls();
Expand All @@ -347,7 +350,7 @@
continue;
}

if (std::abs(track.tpcNSigmaDe()) < 5) {

Check warning on line 353 in EventFiltering/PWGLF/nucleiFilter.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.
qaHists.fill(HIST("fDeuTOFNsigma"), track.p() * track.sign(), track.tofNSigmaDe());
}

Expand Down Expand Up @@ -413,6 +416,10 @@
continue;
}

if (std::abs(track0.eta()) > trgH3L3Body.minDaughtersEta || std::abs(track1.eta()) > trgH3L3Body.minDaughtersEta || std::abs(track2.eta()) > trgH3L3Body.minDaughtersEta) {
continue;
}

bool isProton = false, isPion = false, isAntiProton = false, isAntiPion = false;
if (std::abs(track0.tpcNSigmaPr()) < std::abs(track0.tpcNSigmaPi())) {
if (track0.p() >= trgH3L3Body.minProtonPt && track0.p() <= trgH3L3Body.maxProtonPt) {
Expand Down Expand Up @@ -467,7 +474,7 @@

std::array<float, 3> pos = {0.};
const auto& vtxXYZ = fitter3body.getPCACandidate();
for (int i = 0; i < 3; i++) {

Check warning on line 477 in EventFiltering/PWGLF/nucleiFilter.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.
pos[i] = vtxXYZ[i];
}

Expand Down Expand Up @@ -500,7 +507,8 @@
continue;
}

if (fitter3body.getChi2AtPCACandidate() > trgH3L3Body.dcavtxdau) {
float dcaDaughters = fitter3body.getChi2AtPCACandidate();
if (dcaDaughters > trgH3L3Body.dcavtxdau) {
continue;
}

Expand All @@ -521,6 +529,8 @@
if (isProton && isAntiPion && std::abs(track1dca) >= trgH3L3Body.dcapiontopv) {
qaHists.fill(HIST("fH3LMassVsPt"), pt3B, invmassH3L);
qaHists.fill(HIST("fBachDeuTOFNsigma"), track2.p() * track2.sign(), tofNSigmaDeuteron);
qaHists.fill(HIST("fH3LDcaVsPt"), pt3B, dcaDaughters);
qaHists.fill(HIST("fH3LCosPAVsPt"), pt3B, vtxCosPA);
keepEvent[3] = true;
}
}
Expand All @@ -529,6 +539,8 @@
if (isAntiProton && isPion && std::abs(track0dca) >= trgH3L3Body.dcapiontopv) {
qaHists.fill(HIST("fH3LMassVsPt"), pt3B, invmassAntiH3L);
qaHists.fill(HIST("fBachDeuTOFNsigma"), track2.p() * track2.sign(), tofNSigmaDeuteron);
qaHists.fill(HIST("fH3LDcaVsPt"), pt3B, dcaDaughters);
qaHists.fill(HIST("fH3LCosPAVsPt"), pt3B, vtxCosPA);
keepEvent[3] = true;
}
}
Expand Down
Loading