Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
19 class RooRealVar;
20 class RooArgList ;
21 
22 class RooChiSquarePdf : public RooAbsPdf {
23 public:
24 
25  RooChiSquarePdf() ;
26  RooChiSquarePdf(const char *name, const char *title,
27  RooAbsReal& x, RooAbsReal& ndof) ;
28 
29  RooChiSquarePdf(const RooChiSquarePdf& other, const char* name = 0);
30  virtual TObject* clone(const char* newname) const { return new RooChiSquarePdf(*this, newname); }
31  inline virtual ~RooChiSquarePdf() { }
32 
33 
34  Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
35  Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
36 
37 
38 private:
39 
40  RooRealProxy _x;
41  RooRealProxy _ndof;
42 
43  Double_t evaluate() const;
44  RooSpan<double> evaluateBatch(std::size_t begin, std::size_t batchSize) const;
45 
46  ClassDef(RooChiSquarePdf,1) // Chi Square distribution (eg. the PDF )
47 };
48 
49 #endif