add a function
double landau_quantile(double z, double sigma = 1, double x0 = 0)
to QuantFuncMathCore (this is a slightly edited version of TRandom::Landau, which is a translation of RANLAN),
add two functions
double truncated_landau_moment1(…)
double trunctaed_landau_moment2(…)
that are translations of XM1LAN and XM2LAN
to a new file MomentsFuncMathCore
rewrite TRandom::Landau to use landau_quantile
add functions to TMath:
Double_t LandauQuantile
Double_t LandauMoment1
Double_t LandauMoment2
Any comments, in particular concerning naming of the routines?
I agree to add these functions, in particular the inverse of the landau (landau_quantile), which as you said could be used then to generate the random numbers.
For the first and second moment Landau functions, do you have already the C++ code translated from Cernlib ?
yes, I have the C++ code for XM1LAN and XM2LAN. They compile, run, and look reasonable, though I haven’t yet written a program to verify them against the original code.
As of now I included them in (my copy of) PdfFuncMathCore under the names landau_xm1 and landau_xm2, but I don’t think that’s a good solution.