Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooChi2Var.h
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*
4 * Project: RooFit
5 *
6 * Copyright (c) 2024, CERN
7 *
8 * Redistribution and use in source and binary forms,
9 * with or without modification, are permitted according to the terms
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11 */
12
13#ifndef ROO_CHI2_VAR
14#define ROO_CHI2_VAR
15
17#include "RooCmdArg.h"
18#include "RooDataHist.h"
19#include "RooAbsPdf.h"
20
21class RooChi2Var : public RooAbsOptTestStatistic {
22public:
23 enum FuncMode { Function, Pdf, ExtendedPdf } ;
24
25 // Constructors, assignment etc
26 RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
28 RooAbsTestStatistic::Configuration const& cfg=RooAbsTestStatistic::Configuration{});
29
30 RooChi2Var(const RooChi2Var& other, const char* name=nullptr);
31 TObject* clone(const char* newname=nullptr) const override { return new RooChi2Var(*this,newname); }
32
33 RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist,
34 const RooArgSet& projDeps, RooAbsTestStatistic::Configuration const& cfg) override {
35 // Virtual constructor
36 return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,projDeps,_funcMode,cfg,_etype) ;
37 }
38
39 double defaultErrorLevel() const override {
40 // The default error level for MINUIT error analysis for a chi^2 is 1.0
41 return 1.0 ;
42 }
43
44private:
45
46 RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
47 const RooArgSet& projDeps, FuncMode funcMode,
48 RooAbsTestStatistic::Configuration const& cfg,
50 : RooAbsOptTestStatistic(name,title,func,data,projDeps,cfg), _etype(etype), _funcMode(funcMode) {}
51
52protected:
53
54 double evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override ;
55
56 static RooArgSet _emptySet ; ///< Supports named argument constructor
57
58 RooDataHist::ErrorType _etype ; ///< Error type store in associated RooDataHist
59 FuncMode _funcMode ; ///< Function, P.d.f. or extended p.d.f?
60};
61
62
63#endif
64
65/// \endcond
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char name[80]
Definition TGX11.cxx:110
Double_t(* Function)(Double_t)
Definition Functor.C:4
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
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
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Container class to hold N-dimensional binned data.
Definition RooDataHist.h:40
Mother of all ROOT objects.
Definition TObject.h:41