Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooChiSquarePdf.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitModels *
4 * File: $Id$
5 * Authors: *
6 * Kyle Cranmer
7 * *
8 * *
9 * Redistribution and use in source and binary forms, *
10 * with or without modification, are permitted according to the terms *
11 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
12 *****************************************************************************/
13#ifndef ROO_CHISQUARE
14#define ROO_CHISQUARE
15
16#include "RooAbsPdf.h"
17#include "RooRealProxy.h"
18
19class RooRealVar;
20class RooArgList ;
21
22class RooChiSquarePdf : public RooAbsPdf {
23public:
24
26 RooChiSquarePdf(const char *name, const char *title,
27 RooAbsReal& x, RooAbsReal& ndof) ;
28
29 RooChiSquarePdf(const RooChiSquarePdf& other, const char *name = nullptr);
30 TObject* clone(const char* newname) const override { return new RooChiSquarePdf(*this, newname); }
31
32 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
33 double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
34
35private:
36
39
40 double evaluate() const override;
41 void computeBatch(double* output, size_t nEvents, RooFit::Detail::DataMap const&) const override;
42 inline bool canComputeBatchWithCuda() const override { return true; }
43
44 ClassDefOverride(RooChiSquarePdf,1) // Chi Square distribution (eg. the PDF )
45};
46
47#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
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
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
The PDF of the Chi Square distribution for n degrees of freedom.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
bool canComputeBatchWithCuda() const override
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
No analytical calculation available (yet) of integrals over subranges.
void computeBatch(double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of ChiSquare distribution.
TObject * clone(const char *newname) const override
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
RooRealProxy _ndof
RooRealProxy _x
Variable that can be changed from the outside.
Definition RooRealVar.h:37
Mother of all ROOT objects.
Definition TObject.h:41
Double_t x[n]
Definition legend1.C:17
static void output()