Created attachment 661 [details] program, it's output and description of program formulas Interpolation of physical values by spline has discontinuities of the first derivative at some knot points. It can be shown by the attached code ("Program" section in attached file). There we calculate derivative of successive splines at the same point analytically (description of formulas is in attached pdf file) and numerically for a vector. In program output ("Output" section) we can see that at some points derivatives from successive cubic polynomials doesn't coincide at some points.
Hello, thank you for the proposal. For the new release 11.0 which will be publicly available soon there is a possibility to use different spline methods with different properties. Note, that spline depend on a condition applied to the first and the last point. Your proposal may be also considered, if the first and the last point can be correctly evaluated (sorry had no time to check yet). Concerning the example of Barkas correction table. After evaluation we decided to disable spline for it, because the correction itself is small and the table values have some irregularites, so linear interpolation is more safe and reasonably accurate for this case. Vladimir
Hello, the formula [1] from your attachment is used in Geant4. There are different approaches how to compute the cubic spline coefficients. For today we have 3 variants with different level of accuracy: https://geant4.kek.jp/lxr/source/global/management/src/G4PhysicsVector.cc If you will propose an alternative one it can be considered. VI