Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooNonCentralChiSquare.h
Go to the documentation of this file.
1  /*****************************************************************************
2  * Project: RooFit *
3  * @(#)root/roofit:$Id$ *
4  * *
5  * RooFit NonCentralChisquare PDF *
6  * *
7  * Author: Kyle Cranmer *
8  * *
9  *****************************************************************************/
10 
11 #ifndef ROO_NONCENTRALCHISQUARE
12 #define ROO_NONCENTRALCHISQUARE
13 
14 #include "RooAbsPdf.h"
15 #include "RooRealProxy.h"
16 #include "RooCategoryProxy.h"
17 #include "RooAbsReal.h"
18 #include "RooAbsCategory.h"
19 
20 class RooNonCentralChiSquare : public RooAbsPdf {
21 public:
22  RooNonCentralChiSquare() {} ;
23  RooNonCentralChiSquare(const char *name, const char *title,
24  RooAbsReal& _x,
25  RooAbsReal& _k,
26  RooAbsReal& _lambda);
27  RooNonCentralChiSquare(const RooNonCentralChiSquare& other, const char* name=0) ;
28  virtual TObject* clone(const char* newname) const { return new RooNonCentralChiSquare(*this,newname); }
29  inline virtual ~RooNonCentralChiSquare() { }
30 
31  void SetErrorTolerance(Double_t t) {fErrorTol = t;}
32  void SetMaxIters(Int_t mi) {fMaxIters = mi;}
33  void SetForceSum(Bool_t flag);
34 
35 
36  Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
37  Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
38 
39 protected:
40 
41  RooRealProxy x ;
42  RooRealProxy k ;
43  RooRealProxy lambda ;
44  Double_t fErrorTol;
45  Int_t fMaxIters;
46  Bool_t fForceSum;
47  mutable Bool_t fHasIssuedConvWarning;
48  mutable Bool_t fHasIssuedSumWarning;
49  Double_t evaluate() const ;
50 
51 private:
52 
53  ClassDef(RooNonCentralChiSquare,1) // non-central chisquare pdf
54 };
55 
56 #endif