Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LHCb HEP analysis: Add more layouts and disable others #826

Merged
merged 1 commit into from
Jan 9, 2024
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
45 changes: 39 additions & 6 deletions examples/root/lhcb_analysis/lhcb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,19 @@ namespace
true>::template fn,
true>;

using Custom6LossLess = llama::mapping::Split<
llama::ArrayExtentsDynamic<RE::NTupleSize_t, 1>,
Event,
mp_list<mp_list<H1, IsMuon>, mp_list<H2, IsMuon>, mp_list<H3, IsMuon>>,
llama::mapping::BindBitPackedIntAoS<llama::Constant<1>, llama::mapping::SignBit::Discard>::fn,
llama::mapping::BindSplit<
mp_list<mp_list<H1, ProbK>, mp_list<H2, ProbK>>,
llama::mapping::BindBitPackedFloatAoS<llama::Constant<6>, llama::Constant<52>>::template fn,
llama::mapping::BindBitPackedFloatAoS<llama::Constant<6>, llama::Constant<52>>::template fn,
true>::fn,
true>;


using Custom7 = llama::mapping::Split<
llama::ArrayExtentsDynamic<RE::NTupleSize_t, 1>,
Event,
Expand Down Expand Up @@ -357,6 +370,23 @@ namespace
true>::fn,
true>;

// Like 9, but split H1.ProbK and H2.PropK again
using Custom10 = llama::mapping::Split<
llama::ArrayExtentsDynamic<RE::NTupleSize_t, 1>,
Event,
mp_list<mp_list<H1, IsMuon>, mp_list<H2, IsMuon>, mp_list<H3, IsMuon>>,
llama::mapping::BindBitPackedIntAoS<llama::Constant<1>, llama::mapping::SignBit::Discard>::fn,
llama::mapping::BindSplit<
mp_list<mp_list<H1, ProbK>>,
llama::mapping::BindChangeType<llama::mapping::BindAoS<>::fn, mp_list<mp_list<double, float>>>::fn,
llama::mapping::BindSplit<
mp_list<mp_list<H2, ProbK>>,
llama::mapping::BindChangeType<llama::mapping::BindAoS<>::fn, mp_list<mp_list<double, float>>>::fn,
llama::mapping::BindChangeType<llama::mapping::BindAoS<>::fn, mp_list<mp_list<double, float>>>::fn,
true>::fn,
true>::fn,
true>;

template<int Exp, int Man>
using MakeBitpacked = llama::mapping::Split<
llama::ArrayExtentsDynamic<RE::NTupleSize_t, 1>,
Expand Down Expand Up @@ -572,20 +602,23 @@ auto main(int argc, const char* argv[]) -> int
testAnalysis<Custom4>(inputFile, treeName, "Custom4");
testAnalysis<Custom4Heatmap>(inputFile, treeName, "Custom4_HM");
testAnalysis<Custom5>(inputFile, treeName, "Custom5");
// testAnalysis<Custom5, true>(inputFile, treeName, "Custom5_S");
// testAnalysis<Custom5, true>(inputFile, treeName, "Custom5_S");
testAnalysis<Custom6<>>(inputFile, treeName, "Custom6");
// testAnalysis<Custom6<>, true>(inputFile, treeName, "Custom6_S");
testAnalysis<Custom6LossLess>(inputFile, treeName, "Custom6LL");
// testAnalysis<Custom6<>, true>(inputFile, treeName, "Custom6_S");
testAnalysis<Custom7>(inputFile, treeName, "Custom7");
// testAnalysis<Custom7, true>(inputFile, treeName, "Custom7_S");
// testAnalysis<Custom7, true>(inputFile, treeName, "Custom7_S");
testAnalysis<Custom8<>>(inputFile, treeName, "Custom8");
// testAnalysis<Custom8<>, true>(inputFile, treeName, "Custom8_S");
// testAnalysis<Custom8<>, true>(inputFile, treeName, "Custom8_S");
testAnalysis<Custom9>(inputFile, treeName, "Custom9");
// testAnalysis<Custom9, true>(inputFile, treeName, "Custom9_S");
testAnalysis<Custom1_3_H1ProbK_float>(inputFile, treeName, "Custom1_3_F");
testAnalysis<Custom10>(inputFile, treeName, "Custom10");
// testAnalysis<Custom9, true>(inputFile, treeName, "Custom9_S");
// testAnalysis<Custom1_3_H1ProbK_float>(inputFile, treeName, "Custom1_3_F");

constexpr auto fullExp = 11;
constexpr auto fullMan = 52;
testAnalysis<MakeBitpacked<fullExp, fullMan>>(inputFile, treeName, fmt::format("BP_SoA_{}e{}", fullMan, fullExp));
testAnalysis<MakeBitpacked<6, fullMan>>(inputFile, treeName, fmt::format("BP_SoA_{}e6", fullMan)); // lossless

// using namespace boost::mp11;
// mp_for_each<mp_reverse<mp_iota_c<fullExp>>>(
Expand Down
Loading