Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooChi2Var.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooChi2Var.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16
17#ifndef ROO_CHI2_VAR
18#define ROO_CHI2_VAR
19
21#include "RooCmdArg.h"
22#include "RooDataHist.h"
23#include "RooAbsPdf.h"
24
26public:
27
28 // Constructors, assignment etc
29 RooChi2Var(const char *name, const char* title, RooAbsReal& func, RooDataHist& data,
30 const RooCmdArg& arg1={}, const RooCmdArg& arg2={},const RooCmdArg& arg3={},
31 const RooCmdArg& arg4={}, const RooCmdArg& arg5={},const RooCmdArg& arg6={},
32 const RooCmdArg& arg7={}, const RooCmdArg& arg8={},const RooCmdArg& arg9={}) ;
33
35
36 RooChi2Var(const RooChi2Var& other, const char* name=nullptr);
37 TObject* clone(const char* newname) const override { return new RooChi2Var(*this,newname); }
38
39 RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist,
40 const RooArgSet& projDeps, RooAbsTestStatistic::Configuration const& cfg) override {
41 // Virtual constructor
42 return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,projDeps,_funcMode,cfg,_etype) ;
43 }
44
45 double defaultErrorLevel() const override {
46 // The default error level for MINUIT error analysis for a chi^2 is 1.0
47 return 1.0 ;
48 }
49
50private:
51
52 RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
53 const RooArgSet& projDeps, FuncMode funcMode,
56 : RooAbsOptTestStatistic(name,title,func,data,projDeps,cfg), _etype(etype), _funcMode(funcMode) {}
57
58protected:
59
60 double evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override ;
61
62 static RooArgSet _emptySet ; ///< Supports named argument constructor
63
64 RooDataHist::ErrorType _etype ; ///< Error type store in associated RooDataHist
65 FuncMode _funcMode ; ///< Function, P.d.f. or extended p.d.f?
66
67 ClassDefOverride(RooChi2Var,0) // Chi^2 function of p.d.f w.r.t a binned dataset
68};
69
70
71#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
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:55
RooChi2Var implements a simple calculation from a binned dataset and a PDF.
Definition RooChi2Var.h:25
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:39
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:52
RooDataHist::ErrorType _etype
Error type store in associated RooDataHist.
Definition RooChi2Var.h:64
FuncMode _funcMode
Function, P.d.f. or extended p.d.f?
Definition RooChi2Var.h:65
TObject * clone(const char *newname) const override
Definition RooChi2Var.h:37
double defaultErrorLevel() const override
Definition RooChi2Var.h:45
static RooArgSet _emptySet
Supports named argument constructor.
Definition RooChi2Var.h:62
Named container for two doubles, two integers two object points and three string pointers that can be...
Definition RooCmdArg.h:26
The RooDataHist is a container class to hold N-dimensional binned data.
Definition RooDataHist.h:39
Mother of all ROOT objects.
Definition TObject.h:41