Skip to content

Commit 59ce369

Browse files
Minor cosmetic details
1 parent 35d7b4f commit 59ce369

6 files changed

Lines changed: 10 additions & 9 deletions

File tree

examples/cpp/advanced-filling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ int main() {
6464

6565
// Define the unphysical scale objecs
6666
pineappl_scale_func_form scale_mu = { PINEAPPL_SCALE_FUNC_FORM_SCALE, 0 };
67-
pineappl_scale_func_form no_scale_mu = { PINEAPPL_SCALE_FUNC_FORM_NO_SCALE, 0 };
67+
pineappl_scale_func_form no_scale_mu = { PINEAPPL_SCALE_FUNC_FORM_NO_SCALE, 0 }; // Here `.scale=0` is dummy value
6868
pineappl_scale_func_form mu_scales[3] = { scale_mu, scale_mu, no_scale_mu };
6969

7070
// ---

examples/cpp/fill-grid.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ int main() {
116116
// Create all channels
117117

118118
// this object will contain all channels (for two initial states) that we define
119-
auto* channels = pineappl_channels_new(2);
119+
std::size_t nb_convolutions = 2;
120+
auto* channels = pineappl_channels_new(nb_convolutions);
120121

121122
// photon-photon initial state, where `22` is the photon (PDG MC ids)
122123
int32_t pids1[] = { 22, 22 };
@@ -206,7 +207,7 @@ int main() {
206207

207208
// Define the unphysical scale objecs
208209
pineappl_scale_func_form scale_mu = { PINEAPPL_SCALE_FUNC_FORM_SCALE, 0 };
209-
pineappl_scale_func_form no_scale_mu = { PINEAPPL_SCALE_FUNC_FORM_NO_SCALE, 0 };
210+
pineappl_scale_func_form no_scale_mu = { PINEAPPL_SCALE_FUNC_FORM_NO_SCALE, 0 }; // Here `.scale=0` is dummy value
210211
pineappl_scale_func_form mu_scales[3] = { scale_mu, scale_mu, no_scale_mu };
211212

212213
// ---

examples/fortran/lhapdf_example.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ program lhapdf_example
2626
integer(c_int), target :: pdfs_array(2,2)
2727
character(len=30) :: pdfset1, pdfset2
2828

29-
channels = pineappl_channels_new(2)
29+
channels = pineappl_channels_new(2) ! The argument is the number of convolutions
3030
call pineappl_channels_add(channels, 3, [0, 0, 1, -1, 2, -2], [1.0_dp, 1.0_dp, 1.0_dp])
3131

3232
kinematics = [&
@@ -46,7 +46,7 @@ program lhapdf_example
4646
pineappl_interp(2e-7_dp, 1.0_dp, 50, 3, x_reweight, x_mapping, interpolation_meth) &
4747
]
4848

49-
! All the `_body` have to defined with two fields - if not required, the value(s) will be ignored
49+
! The `pineappl_scale_func_form_body` objects have to defined with two fields - if not required, the value(s) will be ignored
5050
mu_scales_form = [ &
5151
pineappl_scale_func_form(PINEAPPL_SCALE_FUNC_FORM_SCALE, pineappl_scale_func_form_body(0, 0)), &
5252
pineappl_scale_func_form(PINEAPPL_SCALE_FUNC_FORM_SCALE, pineappl_scale_func_form_body(0, 0)), &

examples/fortran/pineappl.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module pineappl
9494
integer(c_size_t) :: index
9595
end type
9696

97-
! Implement the ScaleFuncForm struct which is also a tuple-like struct ine PineAPPL Rust code.
97+
! Implement the ScaleFuncForm struct which is also a tuple-like struct ine PineAPPL Rust code. The `pineappl_scale_func_form_body` objects have to defined with two fields - if not required, the value(s) will be ignored.
9898
type, bind(c) :: pineappl_scale_func_form_body
9999
integer(c_size_t) :: index_0 ! index_0 maps to C union field _0
100100
integer(c_size_t) :: index_1 ! index_1 maps to C union field _1

examples/fortran/test.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ program test_pineappl
2626
type(c_ptr), target :: pdfs_state(2)
2727
integer(c_int), target :: pdfs_array(2,2)
2828

29-
channels = pineappl_channels_new(2)
29+
channels = pineappl_channels_new(2) ! The argument is the number of convolutions
3030
call pineappl_channels_add(channels, 3, [0, 0, 1, -1, 2, -2], [1.0_dp, 1.0_dp, 1.0_dp])
3131

3232
if (pineappl_channels_count(channels) /= 1) then
@@ -56,7 +56,7 @@ program test_pineappl
5656
pineappl_interp(2e-7_dp, 1.0_dp, 50, 3, x_reweight, x_mapping, interpolation_meth) &
5757
]
5858

59-
! All the `_body` have to defined with two fields - if not required, the value(s) will be ignored
59+
! The `pineappl_scale_func_form_body` objects have to defined with two fields - if not required, the value(s) will be ignored
6060
mu_scales_form = [ &
6161
pineappl_scale_func_form(PINEAPPL_SCALE_FUNC_FORM_SCALE, pineappl_scale_func_form_body(0, 0)), &
6262
pineappl_scale_func_form(PINEAPPL_SCALE_FUNC_FORM_SCALE, pineappl_scale_func_form_body(0, 0)), &

examples/object-oriented-cpp/dyaa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ int main() {
159159
interpolation_meth}, // Interpolation fo `x2`
160160
};
161161

162-
// Define the μ ScaleFuncForm objects
162+
// Define the μ `ScaleFuncForm` objects
163163
pineappl_scale_func_form scale_form = {PINEAPPL_SCALE_FUNC_FORM_SCALE, 0};
164164
pineappl_scale_func_form no_scale_form = {PINEAPPL_SCALE_FUNC_FORM_NO_SCALE, 0};
165165
std::vector<pineappl_scale_func_form> mu_scales = {scale_form, scale_form, no_scale_form};

0 commit comments

Comments
 (0)