1 #ifndef PhysicsTools_Utilities_HistoChiSquare_h 2 #define PhysicsTools_Utilities_HistoChiSquare_h 28 if ((
x >
rangeMin_) && (x < rangeMax_) && (err_[i] > 0)) {
45 if ((
x >
rangeMin_) && (x < rangeMax_) && (err_[i] > 0))
50 T &
function() {
return *
t_; }
51 const T &
function()
const {
return *
t_; }
65 unsigned int ndof =
f.numberOfBins() - numberOfFreeParameters;
66 std::cout <<
"chi-squared/n.d.o.f. = " << amin <<
"/" <<
ndof <<
" = " << amin /
ndof 67 <<
"; prob: " << TMath::Prob(amin,
ndof) << std::endl;
double operator()() const
HistoChiSquare(T &t, TH1 *histo, double rangeMin, double rangeMax)
void setHistos(TH1 *histo)
std::vector< double > cont_
std::vector< double > err_
static void print(double amin, unsigned int numberOfFreeParameters, const HistoChiSquare< T > &f)
size_t numberOfBins() const