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

Bug fix in VRAP #27

Open
mariaubiali opened this issue Dec 8, 2023 · 7 comments
Open

Bug fix in VRAP #27

mariaubiali opened this issue Dec 8, 2023 · 7 comments
Assignees

Comments

@mariaubiali
Copy link

Hi all,

As we mentioned at the PC on Wednesday Lance Dixon has not updated the public version of VRAP, but I got hold of the files that Marco Bonvini edited to fix the bug that currently is in VRAP that has to do with the intergration of teh plus prescription and causes numerical instabilities at large-x, small-Q2.
Here's the list

  • integration.h that fixes the integration range bug
  • Vlumifns_LHApdf.C where we have modified the luminosities to account for s!=sbar, c!=cbar and b!=bbar
  • dilog.C and dilog.h, where we have just changed the name of the function "abs" to "dabs", to avoid conflicts with the builtin C abs function (my compiler was giving an error about it).

I have compressed the fixed files and attched them here. Would it be difficult to check if this makes a difference in the observables?
bug-fix-bonvini.zip

@cschwan
Copy link
Collaborator

cschwan commented Dec 8, 2023

I believe we've already fixed points 2 and 3 and saw that this didn't make a big difference, certainly at the level of the cross sections for the FTDY datasets that we consider, but also in the fit (right, @scarlehoff?). But especially for point 2 these source are a good double-check for #25 and #26.

@scarlehoff
Copy link
Member

Vlumifns_LHApdf.C where we have modified the luminosities to account for s!=sbar, c!=cbar and b!=bbar
dilog.C and dilog.h,

Yes, as @cschwan said these two points should be fixed in this repository.

Regarding the actual bug:

integration.h that fixes the integration range bug

If I'm looking at it correctly the only change with respect to the version we started with seems to be:

-  if ((tau * exp(2.*y) >= 1.) || (tau * exp(-2.*y) >= 1.)
-                                 || (z <= tau)){ return 0.; } 
+  if ((tau * exp(2.*y) >= 1.) || (tau * exp(-2.*y) >= 1.)){ return 0.; }

in the NNLO cross section. A quick check for a few points doesn't seem to produce any changes so we might be free from the bug.

And since for now we are still using NLO fktables we should be fine (I don't know if maybe the NNLO MHOU are already using the NNLO grids for vrap? @andreab1997 ?)

In any case, I've added the fix in #28, recomputing the grids should be fairly quick so we can check explicitly.

@mariaubiali
Copy link
Author

Thanks a lot @scarlehoff and @cschwan

@andreab1997
Copy link

And since for now we are still using NLO fktables we should be fine (I don't know if maybe the NNLO MHOU are already using the NNLO grids for vrap? @andreab1997 ?)

No, all the grids I am using are still NLO, with the kfactor included.

@scarlehoff
Copy link
Member

Perfect, then we should be safe.

@scarlehoff
Copy link
Member

scarlehoff commented Dec 11, 2023

I've recomputed the NNLO grids. For E605 the difference is below per-mille:

E605
NNPDF31_nnlo_as_0118 PDF set, member #0, version 1; LHAPDF ID = 303600
 b        x1           x2                     diff                 
---+-------+-------+----+----+-------------+-------------+---------
  0 7.10428 7.10428 -0.2 -0.2   4.4168053e2   4.4094677e2  1.664e-3
  1 7.30604 7.30604 -0.2 -0.2   3.7837893e2   3.7779209e2  1.553e-3
  2  7.5078  7.5078 -0.2 -0.2   3.2450954e2   3.2401430e2  1.528e-3
  3 7.70568 7.70568 -0.2 -0.2   2.7938109e2   2.7897179e2  1.467e-3
  4 7.90744 7.90744 -0.2 -0.2   2.4002454e2   2.3971822e2  1.278e-3
  5 8.10532 8.10532 -0.2 -0.2   2.0699663e2   2.0671613e2  1.357e-3
  6 8.30708 8.30708 -0.2 -0.2   1.7810675e2   1.7788477e2  1.248e-3
  7 8.50496 8.50496 -0.2 -0.2   1.5378135e2   1.5358856e2  1.255e-3
  8 8.70672 8.70672 -0.2 -0.2   1.3237081e2   1.3220102e2  1.284e-3
  9 8.90848 8.90848 -0.2 -0.2   1.1396367e2   1.1383165e2  1.160e-3
 10  10.507  10.507 -0.2 -0.2   3.5358445e1   3.5324436e1  9.628e-4
 11 10.7088 10.7088 -0.2 -0.2   3.0623947e1   3.0595764e1  9.211e-4
 12 10.9106 10.9106 -0.2 -0.2   2.6541533e1   2.6519982e1  8.126e-4
 13 11.3102 11.3102 -0.2 -0.2   2.0043746e1   2.0030057e1  6.834e-4
 14 12.1095 12.1095 -0.2 -0.2   1.1612623e1   1.1603315e1  8.022e-4
 15 13.3123 13.3123 -0.2 -0.2   5.3003149e0   5.2975005e0  5.313e-4
 16 14.9108 14.9108 -0.2 -0.2   1.8491329e0   1.8485686e0  3.053e-4
 17 7.10428 7.10428 -0.1 -0.1   4.5992028e2   4.5910934e2  1.766e-3
 18 7.30604 7.30604 -0.1 -0.1   3.9474947e2   3.9408512e2  1.686e-3
 19  7.5078  7.5078 -0.1 -0.1   3.3919683e2   3.3865197e2  1.609e-3
 20 7.70568 7.70568 -0.1 -0.1   2.9259577e2   2.9214504e2  1.543e-3
 21 7.90744 7.90744 -0.1 -0.1   2.5186086e2   2.5150448e2  1.417e-3
 22 8.10532 8.10532 -0.1 -0.1   2.1760874e2   2.1729844e2  1.428e-3
 23 8.30708 8.30708 -0.1 -0.1   1.8757987e2   1.8732844e2  1.342e-3
 24 8.50496 8.50496 -0.1 -0.1   1.6224891e2   1.6203674e2  1.309e-3
 25 8.70672 8.70672 -0.1 -0.1   1.4001287e2   1.3985299e2  1.143e-3
 26 8.90848 8.90848 -0.1 -0.1   1.2087248e2   1.2073769e2  1.116e-3
 27  10.507  10.507 -0.1 -0.1   3.7739355e1   3.7701835e1  9.952e-4
 28 10.7088 10.7088 -0.1 -0.1   3.2562368e1   3.2533186e1  8.970e-4
 29 10.9106 10.9106 -0.1 -0.1   2.8088758e1   2.8063977e1  8.830e-4
 30 11.3102 11.3102 -0.1 -0.1   2.1015229e1   2.0997435e1  8.475e-4
 31 12.1095 12.1095 -0.1 -0.1   1.1835935e1   1.1826749e1  7.767e-4
 32 13.3123 13.3123 -0.1 -0.1   5.0870230e0   5.0837367e0  6.464e-4
 33 14.9108 14.9108 -0.1 -0.1   1.8081608e0   1.8072876e0  4.831e-4
 34 16.9129 16.9129 -0.1 -0.1  5.0960540e-1  5.0966184e-1 -1.107e-4
 35 7.10428 7.10428    0    0   4.7619403e2   4.7528271e2  1.917e-3
 36 7.30604 7.30604    0    0   4.0940217e2   4.0867938e2  1.769e-3
 37  7.5078  7.5078    0    0   3.5238579e2   3.5178651e2  1.704e-3
 38 7.70568 7.70568    0    0   3.0447589e2   3.0398013e2  1.631e-3
 39 7.90744 7.90744    0    0   2.6255769e2   2.6216692e2  1.491e-3
 40 8.10532 8.10532    0    0   2.2725965e2   2.2692068e2  1.494e-3
 41 8.30708 8.30708    0    0   1.9625950e2   1.9599449e2  1.352e-3
 42 8.50496 8.50496    0    0   1.7007461e2   1.6984913e2  1.328e-3
 43 8.70672 8.70672    0    0   1.4706798e2   1.4689600e2  1.171e-3
 44 8.90848 8.90848    0    0   1.2723787e2   1.2709340e2  1.137e-3
 45  10.507  10.507    0    0   4.0513495e1   4.0478913e1  8.543e-4
 46 10.7088 10.7088    0    0   3.4982930e1   3.4949401e1  9.594e-4
 47 10.9106 10.9106    0    0   3.0187715e1   3.0158528e1  9.678e-4
 48 11.3102 11.3102    0    0   2.2503635e1   2.2483900e1  8.777e-4
 49 12.1095 12.1095    0    0   1.2408975e1   1.2399510e1  7.634e-4
 50 13.3123 13.3123    0    0   5.1400587e0   5.1364391e0  7.047e-4
 51 14.9108 14.9108    0    0   1.7096195e0   1.7086163e0  5.871e-4
 52 16.9129 16.9129    0    0  5.2398712e-1  5.2374721e-1  4.581e-4
 53 7.10428 7.10428  0.1  0.1   4.8953417e2   4.8856117e2  1.992e-3
 54 7.30604 7.30604  0.1  0.1   4.2151824e2   4.2076096e2  1.800e-3
 55  7.5078  7.5078  0.1  0.1   3.6340994e2   3.6277525e2  1.750e-3
 56 7.70568 7.70568  0.1  0.1   3.1448695e2   3.1396664e2  1.657e-3
 57 7.90744 7.90744  0.1  0.1   2.7167563e2   2.7128220e2  1.450e-3
 58 8.10532 8.10532  0.1  0.1   2.3557353e2   2.3521969e2  1.504e-3
 59 8.30708 8.30708  0.1  0.1   2.0382339e2   2.0354386e2  1.373e-3
 60 8.50496 8.50496  0.1  0.1   1.7695811e2   1.7671749e2  1.362e-3
 61 8.70672 8.70672  0.1  0.1   1.5330413e2   1.5309962e2  1.336e-3
 62 8.90848 8.90848  0.1  0.1   1.3285193e2   1.3268975e2  1.222e-3
 63  10.507  10.507  0.1  0.1   4.2789700e1   4.2752353e1  8.736e-4
 64 10.7088 10.7088  0.1  0.1   3.7057973e1   3.7024610e1  9.011e-4
 65 10.9106 10.9106  0.1  0.1   3.2081807e1   3.2053168e1  8.935e-4
 66 11.3102 11.3102  0.1  0.1   2.4107063e1   2.4088768e1  7.595e-4
 67 12.1095 12.1095  0.1  0.1   1.3494012e1   1.3485180e1  6.550e-4
 68 13.3123 13.3123  0.1  0.1   5.5622545e0   5.5589874e0  5.877e-4
 69 14.9108 14.9108  0.1  0.1   1.7952419e0   1.7943463e0  4.991e-4
 70 16.9129 16.9129  0.1  0.1  4.6300380e-1  4.6274491e-1  5.595e-4
 71 7.10428 7.10428  0.2  0.2   4.9889118e2   4.9791059e2  1.969e-3
 72 7.30604 7.30604  0.2  0.2   4.3015607e2   4.2938820e2  1.788e-3
 73  7.5078  7.5078  0.2  0.2   3.7133333e2   3.7070287e2  1.701e-3
 74 7.70568 7.70568  0.2  0.2   3.2178774e2   3.2126660e2  1.622e-3
 75 7.90744 7.90744  0.2  0.2   2.7833739e2   2.7792767e2  1.474e-3
 76 8.10532 8.10532  0.2  0.2   2.4163327e2   2.4127811e2  1.472e-3
 77 8.30708 8.30708  0.2  0.2   2.0931849e2   2.0903774e2  1.343e-3
 78 8.50496 8.50496  0.2  0.2   1.8194595e2   1.8171705e2  1.260e-3
 79 8.70672 8.70672  0.2  0.2   1.5773134e2   1.5752617e2  1.302e-3
 80 8.90848 8.90848  0.2  0.2   1.3677347e2   1.3661561e2  1.156e-3
 81  10.507  10.507  0.2  0.2   4.4562780e1   4.4528919e1  7.604e-4
 82 10.7088 10.7088  0.2  0.2   3.8700161e1   3.8666820e1  8.622e-4
 83 10.9106 10.9106  0.2  0.2   3.3605195e1   3.3576263e1  8.617e-4
 84 11.3102 11.3102  0.2  0.2   2.5396405e1   2.5375055e1  8.414e-4
 85 12.1095 12.1095  0.2  0.2   1.4528503e1   1.4518858e1  6.643e-4
 86 13.3123 13.3123  0.2  0.2   6.2506064e0   6.2481862e0  3.873e-4
 87 14.9108 14.9108  0.2  0.2   1.9347504e0   1.9337621e0  5.111e-4
 88 16.9129 16.9129  0.2  0.2  2.0861552e-1  2.0852059e-1  4.553e-4
 89 7.10428 7.10428  0.3  0.3   5.0243911e2   5.0148123e2  1.910e-3
 90 7.30604 7.30604  0.3  0.3   4.3370462e2   4.3294200e2  1.761e-3
 91  7.5078  7.5078  0.3  0.3   3.7478394e2   3.7413224e2  1.742e-3
 92 7.70568 7.70568  0.3  0.3   3.2486471e2   3.2436528e2  1.540e-3
 93 7.90744 7.90744  0.3  0.3   2.8097686e2   2.8058987e2  1.379e-3
 94 8.10532 8.10532  0.3  0.3   2.4389345e2   2.4354794e2  1.419e-3
 95 8.30708 8.30708  0.3  0.3   2.1123125e2   2.1097177e2  1.230e-3
 96 8.50496 8.50496  0.3  0.3   1.8357664e2   1.8338189e2  1.062e-3
 97 8.70672 8.70672  0.3  0.3   1.5920295e2   1.5901505e2  1.182e-3
 98 8.90848 8.90848  0.3  0.3   1.3810830e2   1.3795244e2  1.130e-3
 99  10.507  10.507  0.3  0.3   4.5376541e1   4.5345114e1  6.931e-4
100 10.7088 10.7088  0.3  0.3   3.9496395e1   3.9464135e1  8.175e-4
101 10.9106 10.9106  0.3  0.3   3.4403906e1   3.4377717e1  7.618e-4
102 11.3102 11.3102  0.3  0.3   2.6185003e1   2.6169230e1  6.027e-4
103 12.1095 12.1095  0.3  0.3   1.5132952e1   1.5125903e1  4.661e-4
104 13.3123 13.3123  0.3  0.3   6.5508347e0   6.5488724e0  2.996e-4
105 14.9108 14.9108  0.3  0.3   1.6797837e0   1.6787760e0  6.002e-4
106 16.9129 16.9129  0.3  0.3  1.2781372e-1  1.2768174e-1  1.034e-3
107 8.30708 8.30708  0.4  0.4   2.0875941e2   2.0851517e2  1.171e-3
108 8.50496 8.50496  0.4  0.4   1.8137848e2   1.8119962e2  9.871e-4
109 8.70672 8.70672  0.4  0.4   1.5726567e2   1.5708791e2  1.132e-3
110 8.90848 8.90848  0.4  0.4   1.3640631e2   1.3626584e2  1.031e-3
111  10.507  10.507  0.4  0.4   4.4935987e1   4.4903895e1  7.147e-4
112 10.7088 10.7088  0.4  0.4   3.9099077e1   3.9074368e1  6.323e-4
113 10.9106 10.9106  0.4  0.4   3.4002504e1   3.3981042e1  6.316e-4
114 11.3102 11.3102  0.4  0.4   2.5807078e1   2.5793742e1  5.170e-4
115 12.1095 12.1095  0.4  0.4   1.4755179e1   1.4748672e1  4.412e-4
116 13.3123 13.3123  0.4  0.4   5.7446015e0   5.7422002e0  4.182e-4
117 14.9108 14.9108  0.4  0.4   1.3204562e0   1.3199108e0  4.132e-4
118 16.9129 16.9129  0.4  0.4 -2.4551158e-2 -2.4688223e-2 -5.552e-3

and similarly for all the others (which also might mean that I didn't apply the patch correctly if greater differences were expected).

@cschwan
Copy link
Collaborator

cschwan commented Dec 11, 2023

That's good, OTOH we know that small differences at the level of the cross sections may result in not so small differences of the chi^2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants