Skip to content

Instantly share code, notes, and snippets.

@cschwan
Created November 26, 2021 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cschwan/99611c7f1c58a30627890bcfb1c72a51 to your computer and use it in GitHub Desktop.
Save cschwan/99611c7f1c58a30627890bcfb1c72a51 to your computer and use it in GitHub Desktop.
=== modified file 'Template/NLO/SubProcesses/pineappl_interface.cc'
--- old/Template/NLO/SubProcesses/pineappl_interface.cc 2021-07-14 13:01:50 +0000
+++ new/Template/NLO/SubProcesses/pineappl_interface.cc 2021-11-26 11:43:57 +0000
@@ -103,27 +103,6 @@
extern "C" void appl_init_()
{
- // Grid Initialization and definition of the observables.
- // Construct the input file name according to its position in the
- // vector "grid_obs".
- std::size_t const index = grid_obs.size();
-
- int lo_power = 9999;
- int nlo_power = 0;
-
- for (int i = 0; i != appl_common_fixed_.amp_split_size; ++i)
- {
- int sum = appl_common_fixed_.qcdpower[i] + appl_common_fixed_.qedpower[i];
-
- lo_power = std::min(lo_power, sum);
- nlo_power = std::max(nlo_power, sum);
- }
-
- // TODO: are there any situations is which there are NLOs but no LOs?
-
- // we assume that there is always at least one LO, and zero or one NLO
- assert((nlo_power == (lo_power + 2)) || (nlo_power == lo_power));
-
std::vector<uint32_t> subgrid_params;
translation_tables.emplace_back();
@@ -131,18 +110,21 @@
for (int i = 0; i != appl_common_fixed_.amp_split_size; ++i)
{
- int const qcd = appl_common_fixed_.qcdpower[i];
- int const qed = appl_common_fixed_.qedpower[i];
- int const sum = qcd + qed;
+ // make sure there are no crazy values
+ assert( appl_common_fixed_.qcdpower[i] >= 0 );
+ assert( appl_common_fixed_.qedpower[i] >= 0 );
+
+ uint32_t const qcd = appl_common_fixed_.qcdpower[i];
+ uint32_t const qed = appl_common_fixed_.qedpower[i];
translation_tables.back().push_back(subgrid_params.size() / 4);
- if (sum == lo_power)
+ if (i < __amp_split_size_born)
{
// WB
subgrid_params.insert(subgrid_params.end(), { qcd / 2, qed / 2, 0, 0 });
}
- else if (sum == nlo_power)
+ else
{
// W0
subgrid_params.insert(subgrid_params.end(), { qcd / 2, qed / 2, 0, 0 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment