From 5b59aa4dfa0ea69eec260a0fb8b3911d109ab73e Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Sat, 4 May 2024 01:45:30 +0000 Subject: [PATCH] Please consider the following formatting changes --- PWGLF/DataModel/LFStrangenessTables.h | 12 +++++------ .../Strangeness/cascadebuilder.cxx | 20 +++++++++---------- .../Strangeness/cascademcbuilder.cxx | 3 ++- .../Strangeness/cascademcfinder.cxx | 2 +- .../Strangeness/lambdakzerobuilder.cxx | 7 +++---- .../Strangeness/strangederivedbuilder.cxx | 12 +++++------ 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/PWGLF/DataModel/LFStrangenessTables.h b/PWGLF/DataModel/LFStrangenessTables.h index cc2e9c3af10..1112ede75be 100644 --- a/PWGLF/DataModel/LFStrangenessTables.h +++ b/PWGLF/DataModel/LFStrangenessTables.h @@ -703,12 +703,12 @@ DECLARE_SOA_TABLE(V0MCRefs, "AOD", "V0MCREF", //! index table when using AO2Ds using V0sLinked = soa::Join; using V0Linked = V0sLinked::iterator; -namespace v0data +namespace v0data { DECLARE_SOA_COLUMN(IsFound, isFound, bool); //! is this FindableV0 actually in the V0s table? } -// Major bypass for simultaneous found vs findable study +// Major bypass for simultaneous found vs findable study DECLARE_SOA_TABLE(FindableV0s, "AOD", "FindableV0", //! Will store findable o2::soa::Index<>, v0::CollisionId, v0::PosTrackId, v0::NegTrackId, @@ -718,7 +718,7 @@ DECLARE_SOA_TABLE(FindableV0s, "AOD", "FindableV0", //! Will store findable v0::IsCollinearV0, o2::soa::Marker<1>); -DECLARE_SOA_TABLE(V0FoundTags, "AOD", "V0FoundTag", //! found or not? +DECLARE_SOA_TABLE(V0FoundTags, "AOD", "V0FoundTag", //! found or not? v0data::IsFound); using FindableV0sLinked = soa::Join; @@ -1260,15 +1260,15 @@ using CascadeLinked = CascadesLinked::iterator; using KFCascadesLinked = soa::Join; using KFCascadeLinked = KFCascadesLinked::iterator; -namespace cascdata +namespace cascdata { DECLARE_SOA_COLUMN(IsFound, isFound, bool); //! is this FindableCascade actually in the Cascades table? } DECLARE_SOA_TABLE(FindableCascades, "AOD", "FINDABLECASCS", //! Run 3 cascade table - o2::soa::Index<>, cascade::CollisionId, cascade::V0Id, cascade::BachelorId, o2::soa::Marker<1>); + o2::soa::Index<>, cascade::CollisionId, cascade::V0Id, cascade::BachelorId, o2::soa::Marker<1>); -DECLARE_SOA_TABLE(CascFoundTags, "AOD", "CascFoundTag", //! found or not? +DECLARE_SOA_TABLE(CascFoundTags, "AOD", "CascFoundTag", //! found or not? cascdata::IsFound); using FindableCascadesLinked = soa::Join; diff --git a/PWGLF/TableProducer/Strangeness/cascadebuilder.cxx b/PWGLF/TableProducer/Strangeness/cascadebuilder.cxx index ba62f010baf..6c71443d74d 100644 --- a/PWGLF/TableProducer/Strangeness/cascadebuilder.cxx +++ b/PWGLF/TableProducer/Strangeness/cascadebuilder.cxx @@ -1986,15 +1986,15 @@ struct cascadePreselector { void init(InitContext const&) { - // //check settings and stop if not viable - // if (doprocessBuildAll == false && doprocessBuildMCAssociated == false && doprocessBuildValiddEdx == false && doprocessBuildValiddEdxMCAssociated == false && doprocessBuildFindableRun3 == false) { - // LOGF(fatal, "No processBuild function enabled. Please choose one."); - // } - - // if (static_cast(doprocessBuildAll) + static_cast(doprocessBuildMCAssociated) + static_cast(doprocessBuildValiddEdx) - // + static_cast(doprocessBuildValiddEdxMCAssociated) + static_cast(doprocessBuildFindableRun3)) { - // LOGF(fatal, "More than one processBuild function enabled. Please choose only one."); - // } + // //check settings and stop if not viable + // if (doprocessBuildAll == false && doprocessBuildMCAssociated == false && doprocessBuildValiddEdx == false && doprocessBuildValiddEdxMCAssociated == false && doprocessBuildFindableRun3 == false) { + // LOGF(fatal, "No processBuild function enabled. Please choose one."); + // } + + // if (static_cast(doprocessBuildAll) + static_cast(doprocessBuildMCAssociated) + static_cast(doprocessBuildValiddEdx) + // + static_cast(doprocessBuildValiddEdxMCAssociated) + static_cast(doprocessBuildFindableRun3)) { + // LOGF(fatal, "More than one processBuild function enabled. Please choose only one."); + // } auto h = histos.add("hPreselectorStatistics", "hPreselectorStatistics", kTH1D, {{5, -0.5f, 4.5f}}); h->GetXaxis()->SetBinLabel(1, "All"); @@ -2325,7 +2325,7 @@ struct cascadeLinkBuilder { } } - // build Cascade -> CascData link table + // build Cascade -> CascData link table void processFindable(aod::FindableCascades const& casctable, aod::CascDatas const& cascdatatable) { std::vector lIndices; diff --git a/PWGLF/TableProducer/Strangeness/cascademcbuilder.cxx b/PWGLF/TableProducer/Strangeness/cascademcbuilder.cxx index d97e0b949b3..92adc8d132d 100644 --- a/PWGLF/TableProducer/Strangeness/cascademcbuilder.cxx +++ b/PWGLF/TableProducer/Strangeness/cascademcbuilder.cxx @@ -56,7 +56,8 @@ struct cascademcbuilder { void init(InitContext const&) {} template - void generateCascadeMCinfo(TCascadeTable cascTable){ + void generateCascadeMCinfo(TCascadeTable cascTable) + { for (auto& casc : cascTable) { int pdgCode = -1, pdgCodeMother = -1; int pdgCodePositive = -1, pdgCodeNegative = -1, pdgCodeBachelor = -1, pdgCodeV0 = -1; diff --git a/PWGLF/TableProducer/Strangeness/cascademcfinder.cxx b/PWGLF/TableProducer/Strangeness/cascademcfinder.cxx index 7a353d41a74..476b84ad172 100644 --- a/PWGLF/TableProducer/Strangeness/cascademcfinder.cxx +++ b/PWGLF/TableProducer/Strangeness/cascademcfinder.cxx @@ -62,7 +62,7 @@ using namespace o2::framework::expressions; using std::array; using namespace ROOT::Math; -// WARNING: the cascade findable uses findable V0s as well +// WARNING: the cascade findable uses findable V0s as well using LabeledTracks = soa::Join; using LabeledFullV0s = soa::Join; diff --git a/PWGLF/TableProducer/Strangeness/lambdakzerobuilder.cxx b/PWGLF/TableProducer/Strangeness/lambdakzerobuilder.cxx index 60fae7b89e4..0e6db5b0a16 100644 --- a/PWGLF/TableProducer/Strangeness/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/Strangeness/lambdakzerobuilder.cxx @@ -1357,13 +1357,12 @@ struct lambdakzeroPreselector { void init(InitContext const&) { - //check settings and stop if not viable + // check settings and stop if not viable if (doprocessBuildAll == false && doprocessBuildMCAssociated == false && doprocessBuildValiddEdx == false && doprocessBuildValiddEdxMCAssociated == false && doprocessBuildFindable == false) { LOGF(fatal, "No processBuild function enabled. Please choose one."); } - - if (static_cast(doprocessBuildAll) + static_cast(doprocessBuildMCAssociated) + static_cast(doprocessBuildValiddEdx) - + static_cast(doprocessBuildValiddEdxMCAssociated) + static_cast(doprocessBuildFindable)) { + + if (static_cast(doprocessBuildAll) + static_cast(doprocessBuildMCAssociated) + static_cast(doprocessBuildValiddEdx) + static_cast(doprocessBuildValiddEdxMCAssociated) + static_cast(doprocessBuildFindable)) { LOGF(fatal, "More than one processBuild function enabled. Please choose only one."); } diff --git a/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx b/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx index 72547fc9f3c..5efa8f401e7 100644 --- a/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx +++ b/PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx @@ -790,13 +790,13 @@ struct strangederivedbuilder { uint64_t combineProngIndices(uint32_t low, uint32_t high) { - return (((uint64_t) high) << 32) | ((uint64_t) low); + return (((uint64_t)high) << 32) | ((uint64_t)low); } void processV0FoundTags(aod::V0s const& foundV0s, aod::V0Datas const& findableV0s, aod::FindableV0s const& /* added to avoid troubles */) { // pack the found V0s in a long long - std::vector foundV0sPacked; + std::vector foundV0sPacked; foundV0sPacked.reserve(foundV0s.size()); for (auto const& foundV0 : foundV0s) { foundV0sPacked[foundV0.globalIndex()] = combineProngIndices(foundV0.posTrackId(), foundV0.negTrackId()); @@ -808,7 +808,7 @@ struct strangederivedbuilder { bool hasBeenFound = false; for (auto const& findableV0 : findableV0s) { uint64_t indexPack = combineProngIndices(findableV0.posTrackId(), findableV0.negTrackId()); - if (std::binary_search(foundV0sPacked.begin(), foundV0sPacked.end(), indexPack)){ + if (std::binary_search(foundV0sPacked.begin(), foundV0sPacked.end(), indexPack)) { // found this element, please mark it as reconstructed hasBeenFound = true; } @@ -819,13 +819,13 @@ struct strangederivedbuilder { using uint128_t = __uint128_t; uint128_t combineProngIndices128(uint32_t pos, uint32_t neg, uint32_t bach) { - return (((uint128_t) pos) << 64) | (((uint128_t) neg) << 32) | ((uint128_t) bach); + return (((uint128_t)pos) << 64) | (((uint128_t)neg) << 32) | ((uint128_t)bach); } void processCascFoundTags(aod::Cascades const& foundCascades, aod::CascDatas const& findableCascades, aod::V0s const&, aod::FindableCascades const& /* added to avoid troubles */) { // pack the found V0s in a long long - std::vector foundCascadesPacked; + std::vector foundCascadesPacked; foundCascadesPacked.reserve(foundCascades.size()); for (auto const& foundCascade : foundCascades) { auto v0 = foundCascade.v0(); @@ -838,7 +838,7 @@ struct strangederivedbuilder { bool hasBeenFound = false; for (auto const& findableCascade : findableCascades) { uint128_t indexPack = combineProngIndices128(findableCascade.posTrackId(), findableCascade.negTrackId(), findableCascade.bachelorId()); - if (std::binary_search(foundCascadesPacked.begin(), foundCascadesPacked.end(), indexPack)){ + if (std::binary_search(foundCascadesPacked.begin(), foundCascadesPacked.end(), indexPack)) { // found this element, please mark it as reconstructed hasBeenFound = true; }