TH1 Komogorov test with "X" option

The TH1 KS test with “X” option (used in TMVA, I believe) determines its result from throwing N=1000 toys. There is no control to the random seed, so results are not reproducible. Is it possible to add the option to pass it a seed and while we are at it, give the user the option to increase N?
See hep.ucsb.edu/people/claudio/misc/KS_testing.html for an example.
Thanks
Claudio Campagnari
UC Santa Barbara

ROOT Version: 6.28/04 (pyroot)
Platform macosxarm64
Compiler: Apple clang version 14.0.3


I don’t know if this works, but one thing is to try adding

gRandom->SetSeed(yourseed);

Indeed, that works, I should have thought about it. Still, I think it would be better to provide the seed and the number of toys as an option in the interface. Thanks!
C.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.