Logo ROOT  
Reference Guide
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 
20 #include "RooAbsOptTestStatistic.h"
21 #include "RooCmdArg.h"
22 #include "RooDataHist.h"
23 #include "RooAbsPdf.h"
24 
26 public:
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 
66 protected:
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
RooChi2Var::RooChi2Var
RooChi2Var(const char *name, const char *title, RooAbsReal &func, RooDataHist &data, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none())
RooChi2Var::_emptySet
static RooArgSet _emptySet
Definition: RooChi2Var.h:68
RooCmdArg
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Definition: RooCmdArg.h:27
RooChi2Var::FuncMode
FuncMode
Definition: RooChi2Var.h:39
RooAbsData
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:49
RooAbsData::SumW2
@ SumW2
Definition: RooAbsData.h:99
RooChi2Var::RooChi2Var
RooChi2Var(const char *name, const char *title, RooAbsPdf &pdf, RooDataHist &data, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none())
RooChi2Var::RooChi2Var
RooChi2Var(const char *name, const char *title, RooAbsPdf &pdf, RooDataHist &data, RooAbsTestStatistic::Configuration const &cfg=RooAbsTestStatistic::Configuration{}, bool extended=false, RooDataHist::ErrorType=RooDataHist::SumW2)
RooAbsOptTestStatistic.h
RooChi2Var
Definition: RooChi2Var.h:25
RooChi2Var::Function
@ Function
Definition: RooChi2Var.h:39
RooChi2Var::evaluatePartition
virtual Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
RooAbsOptTestStatistic::data
RooAbsData & data()
Definition: RooAbsOptTestStatistic.cxx:773
RooCmdArg::none
static const RooCmdArg & none()
Return reference to null argument.
Definition: RooCmdArg.cxx:52
RooAbsData::ErrorType
ErrorType
Definition: RooAbsData.h:99
RooChi2Var::create
virtual RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &pdf, RooAbsData &dhist, const RooArgSet &projDeps, RooAbsTestStatistic::Configuration const &cfg)
Definition: RooChi2Var.h:53
RooAbsTestStatistic
RooAbsTestStatistic is the abstract base class for all test statistics.
Definition: RooAbsTestStatistic.h:39
RooDataHist
The RooDataHist is a container class to hold N-dimensional binned data.
Definition: RooDataHist.h:37
RooAbsPdf.h
RooDataHist.h
RooChi2Var::RooChi2Var
RooChi2Var(const RooChi2Var &other, const char *name=0)
RooChi2Var::_etype
RooDataHist::ErrorType _etype
Definition: RooChi2Var.h:70
RooAbsTestStatistic::Configuration
Definition: RooAbsTestStatistic.h:43
RooCmdArg.h
RooChi2Var::~RooChi2Var
virtual ~RooChi2Var()
Double_t
double Double_t
Definition: RtypesCore.h:59
RooAbsOptTestStatistic
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
Definition: RooAbsOptTestStatistic.h:28
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooChi2Var::defaultErrorLevel
virtual Double_t defaultErrorLevel() const
Definition: RooChi2Var.h:61
RooAbsPdf
Definition: RooAbsPdf.h:41
RooChi2Var::clone
virtual TObject * clone(const char *newname) const
Definition: RooChi2Var.h:51
RooChi2Var::Pdf
@ Pdf
Definition: RooChi2Var.h:39
RooChi2Var::RooChi2Var
RooChi2Var(const char *name, const char *title, RooAbsReal &func, RooDataHist &data, const RooArgSet &projDeps, FuncMode funcMode, RooAbsTestStatistic::Configuration const &cfg=RooAbsTestStatistic::Configuration{}, RooDataHist::ErrorType=RooDataHist::SumW2)
RooChi2Var::ExtendedPdf
@ ExtendedPdf
Definition: RooChi2Var.h:39
RooChi2Var::_funcMode
FuncMode _funcMode
Definition: RooChi2Var.h:71
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:33