Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed May 4, 2024
1 parent ba76b31 commit 5b59aa4
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,12 @@ DECLARE_SOA_TABLE(V0MCRefs, "AOD", "V0MCREF", //! index table when using AO2Ds
using V0sLinked = soa::Join<V0s, V0DataLink>;
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,
Expand All @@ -718,7 +718,7 @@ DECLARE_SOA_TABLE(FindableV0s, "AOD", "FindableV0", //! Will store findable
v0::IsCollinearV0<v0::V0Type>,
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<FindableV0s, V0DataLink>;
Expand Down Expand Up @@ -1260,15 +1260,15 @@ using CascadeLinked = CascadesLinked::iterator;
using KFCascadesLinked = soa::Join<Cascades, KFCascDataLink>;
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<FindableCascades, CascDataLink>;
Expand Down
20 changes: 10 additions & 10 deletions PWGLF/TableProducer/Strangeness/cascadebuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(doprocessBuildAll) + static_cast<int>(doprocessBuildMCAssociated) + static_cast<int>(doprocessBuildValiddEdx)
// + static_cast<int>(doprocessBuildValiddEdxMCAssociated) + static_cast<int>(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<int>(doprocessBuildAll) + static_cast<int>(doprocessBuildMCAssociated) + static_cast<int>(doprocessBuildValiddEdx)
// + static_cast<int>(doprocessBuildValiddEdxMCAssociated) + static_cast<int>(doprocessBuildFindableRun3)) {
// LOGF(fatal, "More than one processBuild function enabled. Please choose only one.");
// }

auto h = histos.add<TH1>("hPreselectorStatistics", "hPreselectorStatistics", kTH1D, {{5, -0.5f, 4.5f}});
h->GetXaxis()->SetBinLabel(1, "All");
Expand Down Expand Up @@ -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<int> lIndices;
Expand Down
3 changes: 2 additions & 1 deletion PWGLF/TableProducer/Strangeness/cascademcbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ struct cascademcbuilder {
void init(InitContext const&) {}

template <typename TCascadeTable>
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;
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Strangeness/cascademcfinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<aod::TracksIU, aod::TracksExtra, aod::McTrackLabels>;
using LabeledFullV0s = soa::Join<aod::FindableV0s, aod::McFullV0Labels>;

Expand Down
7 changes: 3 additions & 4 deletions PWGLF/TableProducer/Strangeness/lambdakzerobuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(doprocessBuildAll) + static_cast<int>(doprocessBuildMCAssociated) + static_cast<int>(doprocessBuildValiddEdx)
+ static_cast<int>(doprocessBuildValiddEdxMCAssociated) + static_cast<int>(doprocessBuildFindable)) {

if (static_cast<int>(doprocessBuildAll) + static_cast<int>(doprocessBuildMCAssociated) + static_cast<int>(doprocessBuildValiddEdx) + static_cast<int>(doprocessBuildValiddEdxMCAssociated) + static_cast<int>(doprocessBuildFindable)) {
LOGF(fatal, "More than one processBuild function enabled. Please choose only one.");
}

Expand Down
12 changes: 6 additions & 6 deletions PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint64_t> foundV0sPacked;
std::vector<uint64_t> foundV0sPacked;
foundV0sPacked.reserve(foundV0s.size());
for (auto const& foundV0 : foundV0s) {
foundV0sPacked[foundV0.globalIndex()] = combineProngIndices(foundV0.posTrackId(), foundV0.negTrackId());
Expand All @@ -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;
}
Expand All @@ -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<uint128_t> foundCascadesPacked;
std::vector<uint128_t> foundCascadesPacked;
foundCascadesPacked.reserve(foundCascades.size());
for (auto const& foundCascade : foundCascades) {
auto v0 = foundCascade.v0();
Expand All @@ -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;
}
Expand Down

0 comments on commit 5b59aa4

Please sign in to comment.