Newer
Older
TB_Chris / TbEvent / src / .svn / text-base / ChiSquare.cpp.svn-base
@iaro iaro on 9 May 2016 327 bytes first attempt of automated anal
  1. // local
  2. #include "Event/ChiSquare.h"
  3. #include "gsl/gsl_cdf.h"
  4.  
  5. namespace LHCb {
  6. double ChiSquare::prob() const {
  7. double val(0);
  8. if (nDoF() > 0) {
  9. const double limit = 1e-15;
  10. double chi2max = gsl_cdf_chisq_Qinv(limit, nDoF());
  11. val = chi2() < chi2max ? gsl_cdf_chisq_Q(chi2(), nDoF()) : 0;
  12. }
  13. return val;
  14. }
  15. }