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=RooCmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(),
31 const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(),
32 const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ;
33
34 RooChi2Var(const char *name, const char* title, RooAbsPdf& pdf, RooDataHist& data,
35 const RooCmdArg& arg1 , const RooCmdArg& arg2=RooCmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(),
36 const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(),
37 const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ;
38
40
41 RooChi2Var(const char *name, const char *title, RooAbsPdf& pdf, RooDataHist& data,
43 bool extended=false, RooDataHist::ErrorType=RooDataHist::SumW2) ;
44
45 RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
46 const RooArgSet& projDeps, FuncMode funcMode,
49
50 RooChi2Var(const RooChi2Var& other, const char* name=0);
51 virtual TObject* clone(const char* newname) const { return new RooChi2Var(*this,newname); }
52
53 virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist,
54 const RooArgSet& projDeps, RooAbsTestStatistic::Configuration const& cfg) {
55 // Virtual constructor
56 return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,projDeps,_funcMode,cfg,_etype) ;
57 }
58
59 virtual ~RooChi2Var();
60
61 virtual Double_t defaultErrorLevel() const {
62 // The default error level for MINUIT error analysis for a chi^2 is 1.0
63 return 1.0 ;
64 }
65
66protected:
67
68 static RooArgSet _emptySet ; // Supports named argument constructor
69
70 RooDataHist::ErrorType _etype ; // Error type store in associated RooDataHist
71 FuncMode _funcMode ; // Function, P.d.f. or extended p.d.f?
72
73 virtual Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const ;
74
75 ClassDef(RooChi2Var,1) // Chi^2 function of p.d.f w.r.t a binned dataset
76};
77
78
79#endif
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
char name[80]
Definition TGX11.cxx:110
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:82
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:64
RooAbsTestStatistic is the abstract base class for all test statistics.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
RooChi2Var implements a simple calculation from a binned dataset and a PDF.
Definition RooChi2Var.h:25
virtual Double_t defaultErrorLevel() const
Definition RooChi2Var.h:61
RooDataHist::ErrorType _etype
Definition RooChi2Var.h:70
virtual RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &pdf, RooAbsData &dhist, const RooArgSet &projDeps, RooAbsTestStatistic::Configuration const &cfg)
Definition RooChi2Var.h:53
virtual TObject * clone(const char *newname) const
Definition RooChi2Var.h:51
virtual Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const
Calculate chi^2 in partition from firstEvent to lastEvent using given stepSize Throughout the calcula...
FuncMode _funcMode
Definition RooChi2Var.h:71
static RooArgSet _emptySet
Definition RooChi2Var.h:68
virtual ~RooChi2Var()
Destructor.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Definition RooCmdArg.h:27
static const RooCmdArg & none()
Return reference to null argument.
Definition RooCmdArg.cxx:52
The RooDataHist is a container class to hold N-dimensional binned data.
Definition RooDataHist.h:45
Mother of all ROOT objects.
Definition TObject.h:41