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 
39  enum FuncMode { Function, Pdf, ExtendedPdf } ;
40 
41  RooChi2Var(const char *name, const char *title, RooAbsPdf& pdf, RooDataHist& data,
42  Bool_t extended=kFALSE, const char* rangeName=0, const char* addCoefRangeName=0,
44 
45  RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
46  const RooArgSet& projDeps, FuncMode funcMode, const char* rangeName=0, const char* addCoefRangeName=0,
48 
49  RooChi2Var(const RooChi2Var& other, const char* name=0);
50  virtual TObject* clone(const char* newname) const { return new RooChi2Var(*this,newname); }
51 
52  virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist,
53  const RooArgSet& projDeps, const char* rangeName=0, const char* addCoefRangeName=0,
54  Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition,Bool_t verbose=kTRUE, Bool_t splitCutRange=kTRUE, Bool_t = kFALSE) {
55  // Virtual constructor
56  return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,projDeps,_funcMode,rangeName,
57  addCoefRangeName,nCPU,interleave,verbose, splitCutRange,_etype) ;
58  }
59 
60  virtual ~RooChi2Var();
61 
62  virtual Double_t defaultErrorLevel() const {
63  // The default error level for MINUIT error analysis for a chi^2 is 1.0
64  return 1.0 ;
65  }
66 
67 protected:
68 
69  static RooArgSet _emptySet ; // Supports named argument constructor
70 
71  RooDataHist::ErrorType _etype ; // Error type store in associated RooDataHist
72  FuncMode _funcMode ; // Function, P.d.f. or extended p.d.f?
73 
74  virtual Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const ;
75 
76  ClassDef(RooChi2Var,1) // Chi^2 function of p.d.f w.r.t a binned dataset
77 };
78 
79 
80 #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 constructor.
Definition: RooChi2Var.cxx:71
RooChi2Var::_emptySet
static RooArgSet _emptySet
Definition: RooChi2Var.h:83
RooCmdArg
Definition: RooCmdArg.h:27
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooChi2Var::create
virtual RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &pdf, RooAbsData &dhist, const RooArgSet &projDeps, const char *rangeName=0, const char *addCoefRangeName=0, Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition, Bool_t verbose=kTRUE, Bool_t splitCutRange=kTRUE, Bool_t=kFALSE)
Definition: RooChi2Var.h:66
RooChi2Var::FuncMode
FuncMode
Definition: RooChi2Var.h:53
RooAbsData
Definition: RooAbsData.h:46
RooAbsData::SumW2
@ SumW2
Definition: RooAbsData.h:96
RooAbsOptTestStatistic::data
RooAbsData & data()
Definition: RooAbsOptTestStatistic.cxx:792
RooAbsOptTestStatistic.h
RooChi2Var
Definition: RooChi2Var.h:25
RooFit::MPSplit
MPSplit
Definition: RooGlobalFunc.h:70
RooChi2Var::Function
@ Function
Definition: RooChi2Var.h:53
RooAbsReal
Definition: RooAbsReal.h:61
RooCmdArg::none
static const RooCmdArg & none()
Return reference to null argument.
Definition: RooCmdArg.cxx:52
RooAbsData::ErrorType
ErrorType
Definition: RooAbsData.h:96
bool
RooAbsTestStatistic
Definition: RooAbsTestStatistic.h:37
RooChi2Var::evaluatePartition
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.
Definition: RooChi2Var.cxx:243
RooDataHist
Definition: RooDataHist.h:39
RooAbsPdf.h
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooDataHist.h
RooChi2Var::_etype
RooDataHist::ErrorType _etype
Definition: RooChi2Var.h:85
RooFit::BulkPartition
@ BulkPartition
Definition: RooGlobalFunc.h:70
RooCmdArg.h
Double_t
double Double_t
Definition: RtypesCore.h:59
RooChi2Var::~RooChi2Var
virtual ~RooChi2Var()
Destructor.
Definition: RooChi2Var.cxx:234
RooAbsOptTestStatistic
Definition: RooAbsOptTestStatistic.h:28
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooChi2Var::defaultErrorLevel
virtual Double_t defaultErrorLevel() const
Definition: RooChi2Var.h:76
RooAbsPdf
Definition: RooAbsPdf.h:40
RooChi2Var::clone
virtual TObject * clone(const char *newname) const
Definition: RooChi2Var.h:64
RooChi2Var::Pdf
@ Pdf
Definition: RooChi2Var.h:53
RooChi2Var::ExtendedPdf
@ ExtendedPdf
Definition: RooChi2Var.h:53
RooChi2Var::_funcMode
FuncMode _funcMode
Definition: RooChi2Var.h:86
RooArgSet
Definition: RooArgSet.h:28
int