Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooChi2Var.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 *
4 * Copyright (c) 2024, CERN
5 *
6 * Redistribution and use in source and binary forms,
7 * with or without modification, are permitted according to the terms
8 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
9 */
10
11#ifndef ROO_CHI2_VAR
12#define ROO_CHI2_VAR
13
15#include "RooCmdArg.h"
16#include "RooDataHist.h"
17#include "RooAbsPdf.h"
18
20public:
22
23 // Constructors, assignment etc
24 RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
25 bool extended, RooDataHist::ErrorType etype,
27
28 RooChi2Var(const RooChi2Var& other, const char* name=nullptr);
29 TObject* clone(const char* newname) const override { return new RooChi2Var(*this,newname); }
30
31 RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist,
32 const RooArgSet& projDeps, RooAbsTestStatistic::Configuration const& cfg) override {
33 // Virtual constructor
34 return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,projDeps,_funcMode,cfg,_etype) ;
35 }
36
37 double defaultErrorLevel() const override {
38 // The default error level for MINUIT error analysis for a chi^2 is 1.0
39 return 1.0 ;
40 }
41
42private:
43
44 RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
45 const RooArgSet& projDeps, FuncMode funcMode,
48 : RooAbsOptTestStatistic(name,title,func,data,projDeps,cfg), _etype(etype), _funcMode(funcMode) {}
49
50protected:
51
52 double evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override ;
53
54 static RooArgSet _emptySet ; ///< Supports named argument constructor
55
56 RooDataHist::ErrorType _etype ; ///< Error type store in associated RooDataHist
57 FuncMode _funcMode ; ///< Function, P.d.f. or extended p.d.f?
58};
59
60
61#endif
char name[80]
Definition TGX11.cxx:110
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
Abstract base class for test statistics objects that evaluate a function or PDF at each point of a gi...
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
Abstract base class for all test statistics.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Simple calculation from a binned dataset and a PDF.
Definition RooChi2Var.h:19
double evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override
Calculate chi^2 in partition from firstEvent to lastEvent using given stepSize Throughout the calcula...
RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &pdf, RooAbsData &dhist, const RooArgSet &projDeps, RooAbsTestStatistic::Configuration const &cfg) override
Definition RooChi2Var.h:31
RooChi2Var(const char *name, const char *title, RooAbsReal &func, RooDataHist &data, const RooArgSet &projDeps, FuncMode funcMode, RooAbsTestStatistic::Configuration const &cfg, RooDataHist::ErrorType etype)
Definition RooChi2Var.h:44
RooDataHist::ErrorType _etype
Error type store in associated RooDataHist.
Definition RooChi2Var.h:56
FuncMode _funcMode
Function, P.d.f. or extended p.d.f?
Definition RooChi2Var.h:57
TObject * clone(const char *newname) const override
Definition RooChi2Var.h:29
double defaultErrorLevel() const override
Definition RooChi2Var.h:37
static RooArgSet _emptySet
Supports named argument constructor.
Definition RooChi2Var.h:54
Container class to hold N-dimensional binned data.
Definition RooDataHist.h:40
Mother of all ROOT objects.
Definition TObject.h:41