Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooXYChi2Var.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_XY_CHI2_VAR
14#define ROO_XY_CHI2_VAR
15
17#include "RooDataSet.h"
18#include "RooAbsPdf.h"
19#include "RooNumIntConfig.h"
20#include <list>
21class RooAbsIntegrator ;
22
23
24class RooXYChi2Var : public RooAbsOptTestStatistic {
25public:
26
27 // Constructors, assignment etc
28 RooXYChi2Var(const char *name, const char* title, RooAbsReal& func, RooDataSet& data, bool integrate=false) ;
29 RooXYChi2Var(const char *name, const char* title, RooAbsReal& func, RooDataSet& data, RooRealVar& yvar, bool integrate=false) ;
30 /// \cond ROOFIT_INTERNAL
31 // For internal use in RooAbsReal::createChi2().
32 RooXYChi2Var(const char *name, const char *title, RooAbsReal& func, RooAbsData& data, RooRealVar *yvar, bool integrate,
33 RooAbsTestStatistic::Configuration const& cfg);
34 /// \endcond ROOFIT_INTERNAL
35
36 RooXYChi2Var(const RooXYChi2Var& other, const char* name=nullptr);
37 TObject* clone(const char* newname) const override { return new RooXYChi2Var(*this,newname); }
38
39 RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& adata,
40 const RooArgSet&, RooAbsTestStatistic::Configuration const&) override {
41 // Virtual constructor
42 return new RooXYChi2Var(name,title,pdf,(RooDataSet&)adata) ;
43 }
44
45 ~RooXYChi2Var() override;
46
47 double defaultErrorLevel() const override {
48 // The default error level for MINUIT error analysis for a chi^2 is 1.0
49 return 1.0 ;
50 }
51
53 const RooNumIntConfig& binIntegratorConfig() const { return _intConfig ; }
54
55protected:
56
57 bool allowFunctionCache() override {
58 // Disable function (component) caching if integration is requested as the function
59 // will be evaluated at coordinates other than the points in the dataset
60 return !_integrate ;
61 }
62
63 RooArgSet requiredExtraObservables() const override ;
64
65 double fy() const ;
66
67 bool _extended ; ///< Is the input function and extended p.d.f.
68 bool _integrate ; ///< Is integration over the bin volume requested
69
70 RooRealVar* _yvar ; ///< Y variable if so designated
71 RooArgSet _rrvArgs ; ///< Set of real-valued observables
72
73 void initialize() ;
74 void initIntegrator() ;
75 double xErrorContribution(double ydata) const ;
76
77 double evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override ;
78
79 RooNumIntConfig _intConfig ; ///< Numeric integrator configuration for integration of function over bin
80 std::unique_ptr<RooAbsReal> _funcInt; ///<! Function integral
81 std::list<RooAbsBinning*> _binList ; ///<! Bin ranges
82};
83
84
85#endif
86
87/// \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
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
Abstract interface for integrators of real-valued functions that implement the RooAbsFunc interface.
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 unbinned data.
Definition RooDataSet.h:34
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
Variable that can be changed from the outside.
Definition RooRealVar.h:37
Mother of all ROOT objects.
Definition TObject.h:41
void initialize(typename Architecture_t::Matrix_t &A, EInitialization m)
Definition Functions.h:282