diff --git a/PWGLF/DataModel/LFNucleiTables.h b/PWGLF/DataModel/LFNucleiTables.h index f74d3b8ed9d..03366fbd0e6 100644 --- a/PWGLF/DataModel/LFNucleiTables.h +++ b/PWGLF/DataModel/LFNucleiTables.h @@ -33,7 +33,12 @@ DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int); DECLARE_SOA_COLUMN(RunNumber, runNumber, int); DECLARE_SOA_COLUMN(CentFV0M, centFV0M, float); DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); -DECLARE_SOA_DYNAMIC_COLUMN(Selection_Bit, selection_bit, //! Dummy +DECLARE_SOA_COLUMN(MultNTracksPVeta1, multNTracksPVeta1, int); +DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt0, isInelGt0, // is INEL > 0 + [](int multPveta1) -> bool { return multPveta1 > 0; }); +DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt1, isInelGt1, // is INEL > 1 + [](int multPveta1) -> bool { return multPveta1 > 1; }); +DECLARE_SOA_DYNAMIC_COLUMN(Selection_bit, selection_bit, // o2-linter: disable=name/o2-column (temporary fix) [](o2::aod::evsel::EventSelectionFlags /*v*/) -> bool { return true; }); } // namespace fullEvent DECLARE_SOA_TABLE(LfNuclEvents, "AOD", "LFNUCLEvent", @@ -44,66 +49,69 @@ DECLARE_SOA_TABLE(LfNuclEvents, "AOD", "LFNUCLEvent", collision::PosZ, fullEvent::CentFV0M, fullEvent::CentFT0M, + fullEvent::MultNTracksPVeta1, + fullEvent::IsInelGt0, + fullEvent::IsInelGt1, fullEvent::IsEventReject, fullEvent::RunNumber, - fullEvent::Selection_Bit<>); + fullEvent::Selection_bit<>); using LfNuclEvent = LfNuclEvents::iterator; namespace full { DECLARE_SOA_INDEX_COLUMN(LfNuclEvent, lfNuclEvent); DECLARE_SOA_COLUMN(Pt, pt, float); -DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float pt, float eta) -> float { return pt * cosh(eta); }); +DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float pt, float eta) -> float { return pt * std::cosh(eta); }); DECLARE_SOA_COLUMN(Eta, eta, float); DECLARE_SOA_COLUMN(Sign, sign, int16_t); DECLARE_SOA_COLUMN(Phi, phi, float); DECLARE_SOA_COLUMN(IsPVContributor, isPVContributor, bool); DECLARE_SOA_DYNAMIC_COLUMN(Rapidity, rapidity, [](float pt, float eta, float mass) -> float { - const auto p = pt * cosh(eta); - const auto pz = pt * sinh(eta); - const auto energy = sqrt(p * p + mass * mass); - return 0.5f * log((energy + pz) / (energy - pz)); + const auto p = pt * std::cosh(eta); + const auto pz = pt * std::sinh(eta); + const auto energy = std::sqrt(p * p + mass * mass); + return 0.5f * std::log((energy + pz) / (energy - pz)); }); // ITS -DECLARE_SOA_COLUMN(ITSClusterSizes, itsClusterSizes, uint32_t); //! ITS cluster sizes per layer +DECLARE_SOA_COLUMN(ItsClusterSizes, itsClusterSizes, uint32_t); //! ITS cluster sizes per layer // TPC -DECLARE_SOA_COLUMN(TPCNSigmaPi, tpcNSigmaPi, float); -DECLARE_SOA_COLUMN(TPCNSigmaKa, tpcNSigmaKa, float); -DECLARE_SOA_COLUMN(TPCNSigmaPr, tpcNSigmaPr, float); -DECLARE_SOA_COLUMN(TPCNSigmaDe, tpcNSigmaDe, float); -DECLARE_SOA_COLUMN(TPCNSigmaTr, tpcNSigmaTr, float); -DECLARE_SOA_COLUMN(TPCNSigmaHe, tpcNSigmaHe, float); -DECLARE_SOA_COLUMN(TPCNSigmaAl, tpcNSigmaAl, float); +DECLARE_SOA_COLUMN(TpcNSigmaPi, tpcNSigmaPi, float); +DECLARE_SOA_COLUMN(TpcNSigmaKa, tpcNSigmaKa, float); +DECLARE_SOA_COLUMN(TpcNSigmaPr, tpcNSigmaPr, float); +DECLARE_SOA_COLUMN(TpcNSigmaDe, tpcNSigmaDe, float); +DECLARE_SOA_COLUMN(TpcNSigmaTr, tpcNSigmaTr, float); +DECLARE_SOA_COLUMN(TpcNSigmaHe, tpcNSigmaHe, float); +DECLARE_SOA_COLUMN(TpcNSigmaAl, tpcNSigmaAl, float); // TOF -DECLARE_SOA_COLUMN(TOFNSigmaPi, tofNSigmaPi, float); -DECLARE_SOA_COLUMN(TOFNSigmaKa, tofNSigmaKa, float); -DECLARE_SOA_COLUMN(TOFNSigmaPr, tofNSigmaPr, float); -DECLARE_SOA_COLUMN(TOFNSigmaDe, tofNSigmaDe, float); -DECLARE_SOA_COLUMN(TOFNSigmaTr, tofNSigmaTr, float); -DECLARE_SOA_COLUMN(TOFNSigmaHe, tofNSigmaHe, float); -DECLARE_SOA_COLUMN(TOFNSigmaAl, tofNSigmaAl, float); -DECLARE_SOA_COLUMN(TPCExpSignalDiffPr, tpcExpSignalDiffPr, float); -DECLARE_SOA_COLUMN(TPCExpSignalDiffDe, tpcExpSignalDiffDe, float); -DECLARE_SOA_COLUMN(TPCExpSignalDiffHe, tpcExpSignalDiffHe, float); -DECLARE_SOA_COLUMN(TOFExpSignalDiffPr, tofExpSignalDiffPr, float); -DECLARE_SOA_COLUMN(TOFExpSignalDiffDe, tofExpSignalDiffDe, float); -DECLARE_SOA_COLUMN(TOFExpSignalDiffHe, tofExpSignalDiffHe, float); +DECLARE_SOA_COLUMN(TofNSigmaPi, tofNSigmaPi, float); +DECLARE_SOA_COLUMN(TofNSigmaKa, tofNSigmaKa, float); +DECLARE_SOA_COLUMN(TofNSigmaPr, tofNSigmaPr, float); +DECLARE_SOA_COLUMN(TofNSigmaDe, tofNSigmaDe, float); +DECLARE_SOA_COLUMN(TofNSigmaTr, tofNSigmaTr, float); +DECLARE_SOA_COLUMN(TofNSigmaHe, tofNSigmaHe, float); +DECLARE_SOA_COLUMN(TofNSigmaAl, tofNSigmaAl, float); +DECLARE_SOA_COLUMN(TpcExpSignalDiffPr, tpcExpSignalDiffPr, float); +DECLARE_SOA_COLUMN(TpcExpSignalDiffDe, tpcExpSignalDiffDe, float); +DECLARE_SOA_COLUMN(TpcExpSignalDiffHe, tpcExpSignalDiffHe, float); +DECLARE_SOA_COLUMN(TofExpSignalDiffPr, tofExpSignalDiffPr, float); +DECLARE_SOA_COLUMN(TofExpSignalDiffDe, tofExpSignalDiffDe, float); +DECLARE_SOA_COLUMN(TofExpSignalDiffHe, tofExpSignalDiffHe, float); DECLARE_SOA_COLUMN(IsEvTimeTOF, isEvTimeTOF, bool); DECLARE_SOA_COLUMN(IsEvTimeT0AC, isEvTimeT0AC, bool); DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); DECLARE_SOA_COLUMN(HasTRD, hasTRD, bool); DECLARE_SOA_COLUMN(DcaXY, dcaXY, float); DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); -DECLARE_SOA_COLUMN(TPCInnerParam, tpcInnerParam, float); -DECLARE_SOA_COLUMN(TOFExpMom, tofExpMom, float); -DECLARE_SOA_COLUMN(TPCSignal, tpcSignal, float); +DECLARE_SOA_COLUMN(TpcInnerParam, tpcInnerParam, float); +DECLARE_SOA_COLUMN(TofExpMom, tofExpMom, float); +DECLARE_SOA_COLUMN(TpcSignal, tpcSignal, float); DECLARE_SOA_COLUMN(Beta, beta, float); // TPC and ITS QA -DECLARE_SOA_COLUMN(PIDForTracking, pidForTracking, uint8_t); -DECLARE_SOA_COLUMN(ITSNCls, itsNCls, int16_t); -DECLARE_SOA_COLUMN(TPCChi2Ncl, tpcChi2NCl, float); -DECLARE_SOA_COLUMN(ITSChi2NCl, itsChi2NCl, float); +DECLARE_SOA_COLUMN(PidForTracking, pidForTracking, uint8_t); +DECLARE_SOA_COLUMN(ItsNCls, itsNCls, int16_t); +DECLARE_SOA_COLUMN(TpcChi2NCl, tpcChi2NCl, float); +DECLARE_SOA_COLUMN(ItsChi2NCl, itsChi2NCl, float); DECLARE_SOA_COLUMN(TpcPassed, tpcPassed, bool); DECLARE_SOA_COLUMN(ItsPassed, itsPassed, bool); DECLARE_SOA_COLUMN(FakeHitsFlag, fakeHitsFlag, bool); @@ -116,79 +124,71 @@ DECLARE_SOA_COLUMN(GetProcess, getProcess, int); } // namespace full namespace dummy { -DECLARE_SOA_DYNAMIC_COLUMN(TPCNSigmaPi, tpcNSigmaPi, +DECLARE_SOA_DYNAMIC_COLUMN(TpcNSigmaPi, tpcNSigmaPi, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCNSigmaKa, tpcNSigmaKa, +DECLARE_SOA_DYNAMIC_COLUMN(TpcNSigmaKa, tpcNSigmaKa, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCNSigmaPr, tpcNSigmaPr, +DECLARE_SOA_DYNAMIC_COLUMN(TpcNSigmaPr, tpcNSigmaPr, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCNSigmaTr, tpcNSigmaTr, +DECLARE_SOA_DYNAMIC_COLUMN(TpcNSigmaTr, tpcNSigmaTr, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCNSigmaAl, tpcNSigmaAl, +DECLARE_SOA_DYNAMIC_COLUMN(TpcNSigmaAl, tpcNSigmaAl, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFNSigmaPi, tofNSigmaPi, +DECLARE_SOA_DYNAMIC_COLUMN(TofNSigmaPi, tofNSigmaPi, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFNSigmaKa, tofNSigmaKa, +DECLARE_SOA_DYNAMIC_COLUMN(TofNSigmaKa, tofNSigmaKa, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFNSigmaPr, tofNSigmaPr, +DECLARE_SOA_DYNAMIC_COLUMN(TofNSigmaPr, tofNSigmaPr, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFNSigmaTr, tofNSigmaTr, +DECLARE_SOA_DYNAMIC_COLUMN(TofNSigmaTr, tofNSigmaTr, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFNSigmaAl, tofNSigmaAl, +DECLARE_SOA_DYNAMIC_COLUMN(TofNSigmaAl, tofNSigmaAl, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffPr, tpcExpSignalDiffPr, +DECLARE_SOA_DYNAMIC_COLUMN(TpcExpSignalDiffPr, tpcExpSignalDiffPr, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffDe, tpcExpSignalDiffDe, +DECLARE_SOA_DYNAMIC_COLUMN(TpcExpSignalDiffDe, tpcExpSignalDiffDe, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffHe, tpcExpSignalDiffHe, +DECLARE_SOA_DYNAMIC_COLUMN(TpcExpSignalDiffHe, tpcExpSignalDiffHe, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffPr, tofExpSignalDiffPr, +DECLARE_SOA_DYNAMIC_COLUMN(TofExpSignalDiffPr, tofExpSignalDiffPr, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffDe, tofExpSignalDiffDe, +DECLARE_SOA_DYNAMIC_COLUMN(TofExpSignalDiffDe, tofExpSignalDiffDe, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffHe, tofExpSignalDiffHe, +DECLARE_SOA_DYNAMIC_COLUMN(TofExpSignalDiffHe, tofExpSignalDiffHe, [](bool /*b*/) -> float { return 0.f; }); -DECLARE_SOA_DYNAMIC_COLUMN(TOFExpMom, tofExpMom, +DECLARE_SOA_DYNAMIC_COLUMN(TofExpMom, tofExpMom, [](bool /*b*/) -> float { return 0.f; }); } // namespace dummy -/* -namespace fullMC -{ -DECLARE_SOA_INDEX_COLUMN(LfNuclEvent, lfCandNucleusFullEvent); -DECLARE_SOA_COLUMN(PdgCode, pdgCode, int); -} -*/ - DECLARE_SOA_TABLE(LfCandNucleus, "AOD", "LFNUCL", o2::soa::Index<>, full::LfNuclEventId, full::DcaXY, full::DcaZ, - full::TPCNSigmaDe, full::TPCNSigmaHe, - full::TOFNSigmaDe, full::TOFNSigmaHe, + full::TpcNSigmaDe, full::TpcNSigmaHe, + full::TofNSigmaDe, full::TofNSigmaHe, full::IsEvTimeTOF, full::IsEvTimeT0AC, full::HasTOF, full::HasTRD, - full::TPCInnerParam, + full::TpcInnerParam, full::Beta, - full::PIDForTracking, - full::TPCSignal, + full::PidForTracking, + full::TpcSignal, full::Pt, full::Eta, full::Phi, full::Sign, - full::ITSNCls, + full::ItsNCls, track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, - full::TPCChi2Ncl, - full::ITSChi2NCl, + full::TpcChi2NCl, + full::ItsChi2NCl, track::ITSClusterMap, full::IsPVContributor, full::P, full::Rapidity, - full::ITSClusterSizes, + full::ItsClusterSizes, track::TPCNClsFound, track::TPCNClsCrossedRows, track::TPCCrossedRowsOverFindableCls, @@ -197,37 +197,37 @@ DECLARE_SOA_TABLE_VERSIONED(LfCandNucleusDummy, "AOD", "LFNUCL", 1, o2::soa::Index<>, full::LfNuclEventId, full::DcaXY, full::DcaZ, - full::TPCNSigmaDe, full::TPCNSigmaHe, - full::TOFNSigmaDe, full::TOFNSigmaHe, + full::TpcNSigmaDe, full::TpcNSigmaHe, + full::TofNSigmaDe, full::TofNSigmaHe, full::IsEvTimeTOF, full::IsEvTimeT0AC, full::HasTOF, full::HasTRD, - full::TPCInnerParam, + full::TpcInnerParam, full::Beta, - full::PIDForTracking, - full::TPCSignal, + full::PidForTracking, + full::TpcSignal, full::Pt, full::Eta, full::Phi, full::Sign, - full::ITSNCls, + full::ItsNCls, track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, - full::TPCChi2Ncl, - full::ITSChi2NCl, + full::TpcChi2NCl, + full::ItsChi2NCl, track::ITSClusterMap, full::IsPVContributor, full::P, - full::ITSClusterSizes, - dummy::TPCNSigmaPi, dummy::TPCNSigmaKa, dummy::TPCNSigmaPr, - dummy::TPCNSigmaTr, dummy::TPCNSigmaAl, - dummy::TOFNSigmaPi, dummy::TOFNSigmaKa, dummy::TOFNSigmaPr, - dummy::TOFNSigmaTr, dummy::TOFNSigmaAl, - dummy::TPCExpSignalDiffPr, dummy::TPCExpSignalDiffDe, dummy::TPCExpSignalDiffHe, - dummy::TOFExpSignalDiffPr, dummy::TOFExpSignalDiffDe, dummy::TOFExpSignalDiffHe, - dummy::TOFExpMom, + full::ItsClusterSizes, + dummy::TpcNSigmaPi, dummy::TpcNSigmaKa, dummy::TpcNSigmaPr, + dummy::TpcNSigmaTr, dummy::TpcNSigmaAl, + dummy::TofNSigmaPi, dummy::TofNSigmaKa, dummy::TofNSigmaPr, + dummy::TofNSigmaTr, dummy::TofNSigmaAl, + dummy::TpcExpSignalDiffPr, dummy::TpcExpSignalDiffDe, dummy::TpcExpSignalDiffHe, + dummy::TofExpSignalDiffPr, dummy::TofExpSignalDiffDe, dummy::TofExpSignalDiffHe, + dummy::TofExpMom, full::Rapidity, track::TPCNClsFound, track::TPCNClsCrossedRows, @@ -235,13 +235,13 @@ DECLARE_SOA_TABLE_VERSIONED(LfCandNucleusDummy, "AOD", "LFNUCL", 1, track::TPCFoundOverFindableCls); DECLARE_SOA_TABLE(LfCandNucleusExtra, "AOD", "LFNUCLEXTRA", - full::TPCNSigmaPi, full::TPCNSigmaKa, full::TPCNSigmaPr, - full::TPCNSigmaTr, full::TPCNSigmaAl, - full::TOFNSigmaPi, full::TOFNSigmaKa, full::TOFNSigmaPr, - full::TOFNSigmaTr, full::TOFNSigmaAl, - full::TPCExpSignalDiffPr, full::TPCExpSignalDiffDe, full::TPCExpSignalDiffHe, - full::TOFExpSignalDiffPr, full::TOFExpSignalDiffDe, full::TOFExpSignalDiffHe, - full::TOFExpMom); + full::TpcNSigmaPi, full::TpcNSigmaKa, full::TpcNSigmaPr, + full::TpcNSigmaTr, full::TpcNSigmaAl, + full::TofNSigmaPi, full::TofNSigmaKa, full::TofNSigmaPr, + full::TofNSigmaTr, full::TofNSigmaAl, + full::TpcExpSignalDiffPr, full::TpcExpSignalDiffDe, full::TpcExpSignalDiffHe, + full::TofExpSignalDiffPr, full::TofExpSignalDiffDe, full::TofExpSignalDiffHe, + full::TofExpMom); DECLARE_SOA_TABLE(LfCandNucleusMC, "AOD", "LFNUCLMC", mcparticle::PdgCode, diff --git a/PWGLF/TableProducer/Nuspex/CMakeLists.txt b/PWGLF/TableProducer/Nuspex/CMakeLists.txt index 40ac3c39879..1851643ae9a 100644 --- a/PWGLF/TableProducer/Nuspex/CMakeLists.txt +++ b/PWGLF/TableProducer/Nuspex/CMakeLists.txt @@ -30,7 +30,7 @@ o2physics_add_dpl_workflow(lnn-reco-task COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(nucleustreecreator - SOURCES LFTreeCreatorNuclei.cxx + SOURCES lfTreeCreatorNuclei.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) diff --git a/PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx b/PWGLF/TableProducer/Nuspex/lfTreeCreatorNuclei.cxx similarity index 89% rename from PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx rename to PWGLF/TableProducer/Nuspex/lfTreeCreatorNuclei.cxx index 4a255202ea5..238ab1a0afb 100644 --- a/PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx +++ b/PWGLF/TableProducer/Nuspex/lfTreeCreatorNuclei.cxx @@ -10,22 +10,23 @@ // or submit itself to any jurisdiction. /// -/// \file LFTreeCreatorNuclei.cxx +/// \file lfTreeCreatorNuclei.cxx /// \brief Writer of the nuclei candidates in the form of flat tables to be stored in TTrees. /// Intended for debug or for the local optimization of analysis on small samples. /// In this file are defined and filled the output tables /// /// \author Nicolò Jacazio and Francesca Bellini -/// #include "PWGLF/DataModel/LFNucleiTables.h" #include "PWGLF/DataModel/LFParticleIdentification.h" +#include "PWGLF/Utils/inelGt.h" #include "Common/CCDB/EventSelectionParams.h" #include "Common/Core/TrackSelection.h" #include "Common/Core/TrackSelectionDefaults.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/PIDResponseTOF.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -92,7 +93,7 @@ struct LfTreeCreatorNuclei { Configurable cfgHighCutVertex{"cfgHighCutVertex", 10.0f, "Accepted z-vertex range"}; Configurable cfgLowCutVertex{"cfgLowCutVertex", -10.0f, "Accepted z-vertex range"}; Configurable useSel8{"useSel8", true, "Use Sel8 for run3 Event Selection"}; - Configurable TVXtrigger{"TVXtrigger", false, "Use TVX for Event Selection (default w/ Sel8)"}; + Configurable useTVXtrigger{"useTVXtrigger", false, "Use TVX for Event Selection (default w/ Sel8)"}; Configurable removeTFBorder{"removeTFBorder", false, "Remove TimeFrame border (default w/ Sel8)"}; Configurable removeITSROFBorder{"removeITSROFBorder", false, "Remove ITS Read-Out Frame border (default w/ Sel8)"}; @@ -113,12 +114,12 @@ struct LfTreeCreatorNuclei { Filter collisionFilter = (aod::collision::posZ < cfgHighCutVertex && aod::collision::posZ > cfgLowCutVertex); Filter etaFilter = (nabs(aod::track::eta) < cfgCutEta); - Filter trackFilter = (trackSelType.value == 0 && requireGlobalTrackWoDCAInFilter()) || - (trackSelType.value == 1 && requireGlobalTrackInFilter()) || - (trackSelType.value == 2) || - (trackSelType.value == 3); - Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz); - using EventCandidates = soa::Join; + Filter trackFilter = (trackSelType.value == 0 && requireGlobalTrackWoDCAInFilter()) || // o2-linter: disable=magic-number (filters) + (trackSelType.value == 1 && requireGlobalTrackInFilter()) || // o2-linter: disable=magic-number (filters) + (trackSelType.value == 2) || // o2-linter: disable=magic-number (filters) + (trackSelType.value == 3); // o2-linter: disable=magic-number (filters) + Filter dcaFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz); + using EventCandidates = soa::Join; using TrackCandidates = soa::Join ptcutHigh.value)) { continue; } - if ((TMath::Abs(track.tpcNSigmaDe()) > filterDeTPC.value) && (TMath::Abs(track.tpcNSigmaHe()) > filterHeTPC.value)) { + if ((std::abs(track.tpcNSigmaDe()) > filterDeTPC.value) && (std::abs(track.tpcNSigmaHe()) > filterHeTPC.value)) { continue; } out = kTRUE; @@ -202,6 +203,7 @@ struct LfTreeCreatorNuclei { collision.posZ(), collision.centFV0A(), collision.centFT0M(), + collision.multNTracksPVeta1(), collision.sel8(), collision.bc().runNumber()); @@ -211,26 +213,26 @@ struct LfTreeCreatorNuclei { if constexpr (isMC) { tableCandidateMC.reserve(tracks.size()); } - for (auto& track : tracks) { + for (const auto& track : tracks) { if (track.itsNClsInnerBarrel() < nITSInnerBarrelHits) { continue; } - if (trackSelType.value == 2) { // custom track selection mode + if (trackSelType.value == 2) { // custom track selection mode // o2-linter: disable=magic-number (filters) if (!customTrackSelection.IsSelected(track)) { continue; } } - if (trackSelType.value == 3) { // Filtering mode + if (trackSelType.value == 3) { // Filtering mode // o2-linter: disable=magic-number (filters) if (!track.hasTPC()) { continue; } - if (track.tpcNClsCrossedRows() < 90) { + if (track.tpcNClsCrossedRows() < 90) { // o2-linter: disable=magic-number (filters) continue; } if ((track.pt() < ptcutLow.value) || (track.pt() > ptcutHigh.value)) { continue; } - if ((TMath::Abs(track.tpcNSigmaDe()) > filterDeTPC.value) && (TMath::Abs(track.tpcNSigmaHe()) > filterHeTPC.value)) { + if ((std::abs(track.tpcNSigmaDe()) > filterDeTPC.value) && (std::abs(track.tpcNSigmaHe()) > filterHeTPC.value)) { continue; } } @@ -250,7 +252,6 @@ struct LfTreeCreatorNuclei { track.tpcSignal(), track.pt(), track.eta(), track.phi(), track.sign(), - track.itsClusterSizes(), track.itsNCls(), track.tpcNClsFindable(), track.tpcNClsFindableMinusFound(), @@ -258,7 +259,8 @@ struct LfTreeCreatorNuclei { track.tpcChi2NCl(), track.itsChi2NCl(), track.itsClusterMap(), - track.isPVContributor()); + track.isPVContributor(), + track.itsClusterSizes()); tableCandidateExtra( track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(), @@ -274,7 +276,7 @@ struct LfTreeCreatorNuclei { bool itsPassed = isITStrack(track); bool tpcPassed = isTPCtrack(track); bool hasFakeHit = false; - for (int i = 0; i < 10; i++) { // From ITS to TPC + for (int i = 0; i < 10; i++) { // From ITS to TPC // o2-linter: disable=magic-number (fake hit loop) if (track.mcMask() & 1 << i) { hasFakeHit = true; break; @@ -310,7 +312,7 @@ struct LfTreeCreatorNuclei { hEvents.fill(HIST("eventSelection"), 0); if (!collision.selection_bit(aod::evsel::kIsTriggerTVX)) { - if (TVXtrigger) + if (useTVXtrigger) continue; } else { hEvents.fill(HIST("eventSelection"), 1); @@ -346,11 +348,11 @@ struct LfTreeCreatorNuclei { hEvents.fill(HIST("eventSelection"), 6); // Fill the norm. column with good events with |z| < 10 cm before skimming - if (collision.posZ() < 10 && collision.posZ() > -10) { + if (collision.posZ() < cfgHighCutVertex && collision.posZ() > cfgLowCutVertex) { hEvents.fill(HIST("eventSelection"), 7); } - if (doSkim && (trackSelType.value == 3) && !checkQuality(collision, tracksInCollision)) + if (doSkim && (trackSelType.value == 3) && !checkQuality(collision, tracksInCollision)) // o2-linter: disable=magic-number (filters) continue; fillForOneEvent(collision, tracksInCollision); hEvents.fill(HIST("eventSelection"), 8); @@ -368,7 +370,7 @@ struct LfTreeCreatorNuclei { hEvents.fill(HIST("eventSelection"), 0); if (!collision.selection_bit(aod::evsel::kIsTriggerTVX)) { - if (TVXtrigger) + if (useTVXtrigger) continue; } else { hEvents.fill(HIST("eventSelection"), 1); @@ -399,7 +401,7 @@ struct LfTreeCreatorNuclei { hEvents.fill(HIST("eventSelection"), 5); // Fill the norm. column with good events with |z| < 10 cm before skimming - if (collision.posZ() < 10 && collision.posZ() > -10) { + if (collision.posZ() < cfgHighCutVertex && collision.posZ() > cfgLowCutVertex) { hEvents.fill(HIST("eventSelection"), 7); } diff --git a/PWGLF/Tasks/Nuspex/CMakeLists.txt b/PWGLF/Tasks/Nuspex/CMakeLists.txt index 71a38eb1c9f..91617ea0567 100644 --- a/PWGLF/Tasks/Nuspex/CMakeLists.txt +++ b/PWGLF/Tasks/Nuspex/CMakeLists.txt @@ -10,7 +10,7 @@ # or submit itself to any jurisdiction. o2physics_add_dpl_workflow(nuclei-batask - SOURCES LFNucleiBATask.cxx + SOURCES lfNucleiBATask.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils COMPONENT_NAME Analysis) diff --git a/PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx b/PWGLF/Tasks/Nuspex/lfNucleiBATask.cxx similarity index 99% rename from PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx rename to PWGLF/Tasks/Nuspex/lfNucleiBATask.cxx index 17173fe5276..8e01eb0ca50 100644 --- a/PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/Nuspex/lfNucleiBATask.cxx @@ -10,12 +10,11 @@ // or submit itself to any jurisdiction. /// -/// \file LFNucleiBATask.cxx +/// \file lfNucleiBATask.cxx /// /// \brief Analysis task for the measurement of the coalescence parameter B2/B3 in pp collisions for (anti)deuteron/(anti)helium-3 /// /// \author Giovanni Malfattore and Rutuparna Rath -/// #include "PWGLF/DataModel/LFNucleiTables.h" #include "PWGLF/DataModel/LFParticleIdentification.h" @@ -66,7 +65,7 @@ using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; -struct LFNucleiBATask { +struct lfNucleiBATask { Service ccdb; Service pdgDB; @@ -92,8 +91,8 @@ struct LFNucleiBATask { Configurable enableHe{"enableHe", true, "Flag to enable helium-3 analysis."}; Configurable enableAl{"enableAl", true, "Flag to enable alpha analysis."}; - Configurable enableTrackingEff{"enableTrackingEff", 0, "Flag to enable tracking efficiency histos."}; - Configurable ccdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + Configurable enableTrackingEff{"enableTrackingEff", false, "Flag to enable tracking efficiency histos."}; + Configurable ccdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; // o2-linter: disable=name/configurable (fast fix) // Set the triggered events skimming scheme struct : ConfigurableGroup { @@ -238,14 +237,15 @@ struct LFNucleiBATask { Configurable enablePtShiftPID{"enablePtShiftPID", true, "Flag to enable wrong PID in tracking pT correction shift"}; Configurable> parShiftPtPID{"parShiftPtPID", {0.0f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f}, "Parameters for helium3-Pt wrong pid shift (if enabled)."}; + Configurable cfgPtShiftPID{"cfgPtShiftPID", 1.25f, "Default upper limit for PID pt-shift correction"}; Configurable enableCentrality{"enableCentrality", true, "Flag to enable centrality 3D histos)"}; // ITS to TPC - Fake hit loop - static constexpr int kFakeLoop = 10; // Fixed O2Linter error + static constexpr int IntFakeLoop = 10; // Fixed O2Linter error // TPC low/high momentum range - static constexpr float kCfgTpcClasses[] = {0.5f, 0.1f}; - static constexpr float kCfgKaonCut = 5.f; + static constexpr float CfgTpcClasses[] = {0.5f, 0.1f}; + static constexpr float CfgKaonCut = 5.f; // PDG codes and masses used in this analysis static constexpr int PDGPion = PDG_t::kPiPlus; @@ -263,7 +263,7 @@ struct LFNucleiBATask { static constexpr float MassAlphaVal = o2::constants::physics::MassAlpha; // PDG of Mothers - static constexpr int kPdgMotherList[] = { + static constexpr int PdgMotherList[] = { PDG_t::kPiPlus, PDG_t::kKPlus, PDG_t::kK0Short, @@ -276,9 +276,9 @@ struct LFNucleiBATask { o2::constants::physics::Pdg::kHyperTriton, o2::constants::physics::Pdg::kAlpha}; - static constexpr int kNumMotherList = sizeof(kPdgMotherList) / sizeof(kPdgMotherList[0]); + static constexpr int NumMotherList = sizeof(PdgMotherList) / sizeof(PdgMotherList[0]); - static constexpr const char* kMotherNames[kNumMotherList] = { + static constexpr const char* kMotherNames[NumMotherList] = { "#pi^{+}", "K^{+}", "K^{0}_{S}", @@ -497,7 +497,7 @@ struct LFNucleiBATask { hSkim->GetXaxis()->SetBinLabel(2, "Skimmed events"); if (enableCentrality) { - histos.add("event/eventSelection", "eventSelection", HistType::kTH2D, {{8, -0.5, 7.5}, {binsPercentile, "Centrality FT0M"}}); + histos.add("event/eventSelection", "eventSelection", HistType::kTH2D, {{11, -0.5, 10.5}, {binsPercentile, "Centrality FT0M"}}); auto h2d = histos.get(HIST("event/eventSelection")); if (skimmingOptions.applySkimming) h2d->GetXaxis()->SetBinLabel(1, "Skimmed events"); @@ -511,8 +511,11 @@ struct LFNucleiBATask { h2d->GetXaxis()->SetBinLabel(6, "Sel8 cut"); h2d->GetXaxis()->SetBinLabel(7, "Z-vert Cut"); h2d->GetXaxis()->SetBinLabel(8, "Multiplicity cut"); + h2d->GetXaxis()->SetBinLabel(9, "INEL"); + h2d->GetXaxis()->SetBinLabel(10, "INEL > 0"); + h2d->GetXaxis()->SetBinLabel(11, "INEL > 1"); } else { - histos.add("event/eventSelection", "eventSelection", HistType::kTH1D, {{8, -0.5, 7.5}}); + histos.add("event/eventSelection", "eventSelection", HistType::kTH1D, {{11, -0.5, 10.5}}); auto h1d = histos.get(HIST("event/eventSelection")); if (skimmingOptions.applySkimming) h1d->GetXaxis()->SetBinLabel(1, "Skimmed events"); @@ -526,6 +529,9 @@ struct LFNucleiBATask { h1d->GetXaxis()->SetBinLabel(6, "Sel8 cut"); h1d->GetXaxis()->SetBinLabel(7, "Z-vert Cut"); h1d->GetXaxis()->SetBinLabel(8, "Multiplicity cut"); + h1d->GetXaxis()->SetBinLabel(9, "INEL"); + h1d->GetXaxis()->SetBinLabel(10, "INEL > 0"); + h1d->GetXaxis()->SetBinLabel(11, "INEL > 1"); } if (enableCentrality) @@ -1078,7 +1084,7 @@ struct LFNucleiBATask { histos.add("tracks/proton/dca/before/hDCAxyVsPtProtonTrueMaterial", "DCAxy vs Pt (p); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptAxis}, {dcaxyAxis}}); histos.add("tracks/proton/dca/before/hNumMothers", "N mothers per particle; N mothers;counts", HistType::kTH1I, {{7, 1.0, 8.0}}); - histos.add("tracks/proton/dca/before/hMomTrueMaterial", "MC mothers;mother index;mother type; mother #it{p}_{T}", HistType::kTH3F, {{2, -2.0, 2.0}, {kNumMotherList + 2, -1.5, static_cast(kNumMotherList) + 0.5}, {150, 0.0, 15.0}}); + histos.add("tracks/proton/dca/before/hMomTrueMaterial", "MC mothers;mother index;mother type; mother #it{p}_{T}", HistType::kTH3F, {{2, -2.0, 2.0}, {NumMotherList + 2, -1.5, static_cast(NumMotherList) + 0.5}, {150, 0.0, 15.0}}); std::shared_ptr hTempPr = histos.get(HIST("tracks/proton/dca/before/hMomTrueMaterial")); TH3* hPdgPr = hTempPr.get(); @@ -1090,7 +1096,7 @@ struct LFNucleiBATask { TAxis* ayPdgPr = hPdgPr->GetYaxis(); ayPdgPr->SetBinLabel(1, "undef."); ayPdgPr->SetBinLabel(2, "other"); - for (int i = 0; i < kNumMotherList; i++) { + for (int i = 0; i < NumMotherList; i++) { ayPdgPr->SetBinLabel(i + 3, kMotherNames[i]); } @@ -1150,7 +1156,7 @@ struct LFNucleiBATask { histos.add("tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueMaterial", "DCAxy vs Pt (d); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptAxis}, {dcaxyAxis}}); histos.add("tracks/deuteron/dca/before/hNumMothers", "N mothers per particle; N mothers;counts", HistType::kTH1I, {{7, 1.0, 8.0}}); - histos.add("tracks/deuteron/dca/before/hMomTrueMaterial", "MC mothers;mother index;mother type; mother #it{p}_{T}", HistType::kTH3F, {{2, -2.0, 2.0}, {kNumMotherList + 2, -1.5, static_cast(kNumMotherList) + 0.5}, {150, 0.0, 15.0}}); + histos.add("tracks/deuteron/dca/before/hMomTrueMaterial", "MC mothers;mother index;mother type; mother #it{p}_{T}", HistType::kTH3F, {{2, -2.0, 2.0}, {NumMotherList + 2, -1.5, static_cast(NumMotherList) + 0.5}, {150, 0.0, 15.0}}); std::shared_ptr hTempDe = histos.get(HIST("tracks/deuteron/dca/before/hMomTrueMaterial")); TH3* hPdgDe = hTempDe.get(); @@ -1162,7 +1168,7 @@ struct LFNucleiBATask { TAxis* ayPdgDe = hPdgDe->GetYaxis(); ayPdgDe->SetBinLabel(1, "undef."); ayPdgDe->SetBinLabel(2, "other"); - for (int i = 0; i < kNumMotherList; i++) { + for (int i = 0; i < NumMotherList; i++) { ayPdgDe->SetBinLabel(i + 3, kMotherNames[i]); } @@ -1324,7 +1330,7 @@ struct LFNucleiBATask { histos.add("tracks/helium/dca/before/hDCAxyVsPtHeliumTrueMaterial", "DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptZHeAxis}, {dcaxyAxis}}); histos.add("tracks/helium/dca/before/hNumMothers", "N mothers per particle; N mothers;counts", HistType::kTH1I, {{7, 1.0, 8.0}}); - histos.add("tracks/helium/dca/before/hMomTrueMaterial", "MC mothers;mother index;mother type; mother #it{p}_{T}", HistType::kTH3F, {{2, -2.0, 2.0}, {kNumMotherList + 2, -1.5, static_cast(kNumMotherList) + 0.5}, {150, 0.0, 15.0}}); + histos.add("tracks/helium/dca/before/hMomTrueMaterial", "MC mothers;mother index;mother type; mother #it{p}_{T}", HistType::kTH3F, {{2, -2.0, 2.0}, {NumMotherList + 2, -1.5, static_cast(NumMotherList) + 0.5}, {150, 0.0, 15.0}}); // Fix for getting TH3 pointer std::shared_ptr hTempHe = histos.get(HIST("tracks/helium/dca/before/hMomTrueMaterial")); @@ -1337,7 +1343,7 @@ struct LFNucleiBATask { TAxis* ayPdgHe = hPdgHe->GetYaxis(); ayPdgHe->SetBinLabel(1, "undef."); ayPdgHe->SetBinLabel(2, "other"); - for (int i = 0; i < kNumMotherList; i++) { + for (int i = 0; i < NumMotherList; i++) { ayPdgHe->SetBinLabel(i + 3, kMotherNames[i]); } @@ -2161,7 +2167,7 @@ struct LFNucleiBATask { } // To be optimised if (!doprocessMCGen && !doprocessMCReco && !doprocessMCRecoLfPid && !doprocessMCRecoFiltered && !doprocessMCRecoFilteredLight) { - LOG(info) << "Histograms of LFNucleiBATask:"; + LOG(info) << "Histograms of lfNucleiBATask:"; histos.print(); return; } @@ -2300,7 +2306,7 @@ struct LFNucleiBATask { spectraGen.add("alpha/histGenPtantiAlSec", "generated particles", HistType::kTH1F, {ptAxis}); spectraGen.add("alpha/histSecTransportPtantiAl", "generated particles", HistType::kTH1F, {ptAxis}); } - LOG(info) << "Histograms of LFNucleiBATask:"; + LOG(info) << "Histograms of lfNucleiBATask:"; histos.print(); if (doprocessMCGen) spectraGen.print(); @@ -2405,10 +2411,26 @@ struct LFNucleiBATask { if (enableCentrality && (centFT0M <= cfgMultCutLow || centFT0M > cfgMultCutHigh)) { return; } - if (enableCentrality) + if (enableCentrality) { histos.fill(HIST("event/eventSelection"), 7, centFT0M); - else + histos.fill(HIST("event/eventSelection"), 8, centFT0M); + } else { histos.fill(HIST("event/eventSelection"), 7); + histos.fill(HIST("event/eventSelection"), 8); + } + + if (event.isInelGt0()) { + if (enableCentrality) + histos.fill(HIST("event/eventSelection"), 9, centFT0M); + else + histos.fill(HIST("event/eventSelection"), 9); + } + if (event.isInelGt1()) { + if (enableCentrality) + histos.fill(HIST("event/eventSelection"), 10, centFT0M); + else + histos.fill(HIST("event/eventSelection"), 10); + } float gamma = 0., massTOF = 0., massTOFhe = 0., massTOFantihe = 0., heTPCmomentum = 0.f, antiheTPCmomentum = 0.f, heP = 0.f, antiheP = 0.f, hePt = 0.f, antihePt = 0.f, antiDPt = 0.f, DPt = 0.f; bool isTritonTPCpid = false; @@ -2555,7 +2577,7 @@ struct LFNucleiBATask { } if (enablePtShiftPID && fShiftPtPID) { shiftPtPID = fShiftPtPID->Eval(2 * track.pt()); - if (tritonPID && (track.pt() <= 1.25f)) { + if (tritonPID && (track.pt() <= cfgPtShiftPID)) { hePt = track.pt() - shiftPtPID / 2.f; antihePt = track.pt() - shiftPtPID / 2.f; } @@ -3409,7 +3431,7 @@ struct LFNucleiBATask { } genPt = track.mcParticle().pt(); - for (int i = 0; i < kFakeLoop; i++) { // From ITS to TPC + for (int i = 0; i < IntFakeLoop; i++) { // From ITS to TPC if (track.mcMask() & 1 << i) { hasFakeHit = true; break; @@ -3447,8 +3469,8 @@ struct LFNucleiBATask { int motherSpeciesBin = -1; if (pdgMom != -1) { motherSpeciesBin = 0; - for (int j = 0; j < kNumMotherList; j++) { - if (std::abs(kPdgMotherList[j]) == std::abs(pdgMom)) { + for (int j = 0; j < NumMotherList; j++) { + if (std::abs(PdgMotherList[j]) == std::abs(pdgMom)) { motherSpeciesBin = j + 1; break; } @@ -3544,8 +3566,8 @@ struct LFNucleiBATask { int motherSpeciesBin = -1; if (pdgMom != -1) { motherSpeciesBin = 0; - for (int j = 0; j < kNumMotherList; j++) { - if (std::abs(kPdgMotherList[j]) == std::abs(pdgMom)) { + for (int j = 0; j < NumMotherList; j++) { + if (std::abs(PdgMotherList[j]) == std::abs(pdgMom)) { motherSpeciesBin = j + 1; break; } @@ -3703,8 +3725,8 @@ struct LFNucleiBATask { int motherSpeciesBin = -1; if (pdgMom != -1) { motherSpeciesBin = 0; - for (int j = 0; j < kNumMotherList; j++) { - if (std::abs(kPdgMotherList[j]) == std::abs(pdgMom)) { + for (int j = 0; j < NumMotherList; j++) { + if (std::abs(PdgMotherList[j]) == std::abs(pdgMom)) { motherSpeciesBin = j + 1; break; } @@ -4154,26 +4176,26 @@ struct LFNucleiBATask { debugHistos.fill(HIST("debug/qa/h2TPCncrVsPtPos"), track.tpcInnerParam(), track.tpcNClsCrossedRows()); debugHistos.fill(HIST("debug/qa/h2TPCncrVsTPCsignalPos"), track.tpcSignal(), track.tpcNClsCrossedRows()); - if (track.tpcInnerParam() < kCfgTpcClasses[0]) { + if (track.tpcInnerParam() < CfgTpcClasses[0]) { debugHistos.fill(HIST("debug/qa/h1TPCncrLowPPos"), track.tpcNClsCrossedRows()); } - if ((track.tpcInnerParam() >= kCfgTpcClasses[0]) && (track.tpcInnerParam() < kCfgTpcClasses[1])) { + if ((track.tpcInnerParam() >= CfgTpcClasses[0]) && (track.tpcInnerParam() < CfgTpcClasses[1])) { debugHistos.fill(HIST("debug/qa/h1TPCncrMidPPos"), track.tpcNClsCrossedRows()); } - if (track.tpcInnerParam() >= kCfgTpcClasses[1]) { + if (track.tpcInnerParam() >= CfgTpcClasses[1]) { debugHistos.fill(HIST("debug/qa/h1TPCncrHighPPos"), track.tpcNClsCrossedRows()); } } else { debugHistos.fill(HIST("debug/qa/h2TPCncrVsPtNeg"), track.tpcInnerParam(), track.tpcNClsCrossedRows()); debugHistos.fill(HIST("debug/qa/h2TPCncrVsTPCsignalNeg"), track.tpcSignal(), track.tpcNClsCrossedRows()); - if (track.tpcInnerParam() < kCfgTpcClasses[0]) { + if (track.tpcInnerParam() < CfgTpcClasses[0]) { debugHistos.fill(HIST("debug/qa/h1TPCncrLowPNeg"), track.tpcNClsCrossedRows()); } - if ((track.tpcInnerParam() >= kCfgTpcClasses[0]) && (track.tpcInnerParam() < kCfgTpcClasses[1])) { + if ((track.tpcInnerParam() >= CfgTpcClasses[0]) && (track.tpcInnerParam() < CfgTpcClasses[1])) { debugHistos.fill(HIST("debug/qa/h1TPCncrMidPNeg"), track.tpcNClsCrossedRows()); } - if (track.tpcInnerParam() >= kCfgTpcClasses[1]) { + if (track.tpcInnerParam() >= CfgTpcClasses[1]) { debugHistos.fill(HIST("debug/qa/h1TPCncrHighPNeg"), track.tpcNClsCrossedRows()); } } @@ -4186,7 +4208,7 @@ struct LFNucleiBATask { histos.fill(HIST("tracks/eff/h2pVsTPCmomentum"), track.tpcInnerParam(), track.p()); if (filterOptions.enableFiltering) { - if (track.tpcNSigmaKa() < kCfgKaonCut) + if (track.tpcNSigmaKa() < CfgKaonCut) continue; } @@ -5178,7 +5200,7 @@ struct LFNucleiBATask { track.passedTPCRefit() && track.hasTPC(); - for (int i = 0; i < kFakeLoop; i++) { // From ITS to TPC + for (int i = 0; i < IntFakeLoop; i++) { // From ITS to TPC if (track.mcMask() & 1 << i) { hasFakeHit = true; break; @@ -6090,7 +6112,7 @@ struct LFNucleiBATask { } } - using EventCandidates = soa::Join; + using EventCandidates = soa::Join; using EventCandidatesMC = soa::Join; using TrackCandidates0 = soa::Join(event, tracks, true /*dummy*/, event.centFT0M()); } - PROCESS_SWITCH(LFNucleiBATask, processData, "process data", true); + PROCESS_SWITCH(lfNucleiBATask, processData, "process data", true); // Process function that runs on the original AO2D void processDataLfPid(EventCandidates::iterator const& event, @@ -6136,7 +6158,7 @@ struct LFNucleiBATask { { fillHistograms(event, tracks, true /*dummy*/, event.centFT0M()); } - PROCESS_SWITCH(LFNucleiBATask, processDataLfPid, "process data with LF PID", false); + PROCESS_SWITCH(lfNucleiBATask, processDataLfPid, "process data with LF PID", false); // Process function that runs on the filtered data void processDataFiltered(o2::aod::LfNuclEvents::iterator const& event, @@ -6147,7 +6169,7 @@ struct LFNucleiBATask { // Takes as input full AO2Ds fillHistograms(event, tracks, true /*dummy*/, event.centFT0M()); } - PROCESS_SWITCH(LFNucleiBATask, processDataFiltered, "process data on the filtered data", false); + PROCESS_SWITCH(lfNucleiBATask, processDataFiltered, "process data on the filtered data", false); void processDataLight(o2::aod::LfNuclEvents::iterator const& event, o2::aod::LfCandNucleusDummy const& tracks, @@ -6157,7 +6179,7 @@ struct LFNucleiBATask { // Takes as input derived trees fillHistograms(event, tracks, true /*dummy*/, event.centFT0M()); } - PROCESS_SWITCH(LFNucleiBATask, processDataLight, "process data on the derived trees", false); + PROCESS_SWITCH(lfNucleiBATask, processDataLight, "process data on the derived trees", false); ///////////// // MC Reco // @@ -6205,7 +6227,7 @@ struct LFNucleiBATask { fillHistograms(event, tracks, mcParticles, mcCentFT0M); } // CLOSING PROCESS MC RECO - PROCESS_SWITCH(LFNucleiBATask, processMCReco, "process mc reco", false); + PROCESS_SWITCH(lfNucleiBATask, processMCReco, "process mc reco", false); // Process function that runs on the original AO2D (for the MC) with the LfPIDcalibration void processMCRecoLfPid(EventCandidatesMC::iterator const& event, @@ -6246,7 +6268,7 @@ struct LFNucleiBATask { fillHistograms(event, tracks, mcParticles, mcCentFT0M); } // CLOSING PROCESS MC RECO - PROCESS_SWITCH(LFNucleiBATask, processMCRecoLfPid, "process mc reco with LfPid", false); + PROCESS_SWITCH(lfNucleiBATask, processMCRecoLfPid, "process mc reco with LfPid", false); // Process function that runs on the original AO2D (for the MC) with the LfPIDcalibration void processMCRecoLfPidEv(EventCandidatesMC const& collisions, @@ -6358,7 +6380,7 @@ struct LFNucleiBATask { } } // CLOSING PROCESS MC RECO - PROCESS_SWITCH(LFNucleiBATask, processMCRecoLfPidEv, "process mc reco with LfPid w/ Event", false); + PROCESS_SWITCH(lfNucleiBATask, processMCRecoLfPidEv, "process mc reco with LfPid w/ Event", false); // Process function that runs on the filtered AO2D (for the MC) void processMCRecoFiltered(o2::aod::LfNuclEvents::iterator const& event, @@ -6367,7 +6389,7 @@ struct LFNucleiBATask { { fillHistograms(event, tracks, true /*dummy*/, event.centFT0M()); } // CLOSING PROCESS MC RECO ON FILTERED DATA - PROCESS_SWITCH(LFNucleiBATask, processMCRecoFiltered, "process mc reco on the filtered data", false); + PROCESS_SWITCH(lfNucleiBATask, processMCRecoFiltered, "process mc reco on the filtered data", false); void processMCRecoFilteredLight(o2::aod::LfNuclEvents::iterator const& event, soa::Join const& tracks, @@ -6375,7 +6397,7 @@ struct LFNucleiBATask { { fillHistograms(event, tracks, true /*dummy*/, event.centFT0M()); } // CLOSING PROCESS MC RECO ON FILTERED DATA - PROCESS_SWITCH(LFNucleiBATask, processMCRecoFilteredLight, "process mc reco on the derived trees", false); + PROCESS_SWITCH(lfNucleiBATask, processMCRecoFilteredLight, "process mc reco on the derived trees", false); //////////// // MC Gen // @@ -6645,7 +6667,7 @@ struct LFNucleiBATask { } } } // Close processMCGen - PROCESS_SWITCH(LFNucleiBATask, processMCGen, "process MC Generated", true); + PROCESS_SWITCH(lfNucleiBATask, processMCGen, "process MC Generated", true); void processEvSgLossMC(soa::Join::iterator const& mcCollision, aod::McParticles const& mcParticles, @@ -6687,7 +6709,7 @@ struct LFNucleiBATask { for (const auto& mcPart : mcParticles) { if (!mcPart.isPhysicalPrimary()) continue; - if (std::abs(mcPart.y()) >= kCfgTpcClasses[0]) + if (std::abs(mcPart.y()) >= CfgTpcClasses[0]) continue; const float pt = mcPart.pt(); @@ -6731,7 +6753,7 @@ struct LFNucleiBATask { } } } - PROCESS_SWITCH(LFNucleiBATask, processEvSgLossMC, "process MC SignLoss", false); + PROCESS_SWITCH(lfNucleiBATask, processEvSgLossMC, "process MC SignLoss", false); // void processMCGen(soa::Join::iterator const& mcCollision, // aod::McParticles const& mcParticles) @@ -6907,10 +6929,10 @@ struct LFNucleiBATask { } } } - PROCESS_SWITCH(LFNucleiBATask, processMCGenLosses, "process MCGen losses", false); + PROCESS_SWITCH(lfNucleiBATask, processMCGenLosses, "process MCGen losses", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{adaptAnalysisTask(cfgc)}; + return WorkflowSpec{adaptAnalysisTask(cfgc)}; }