00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitModels * 00004 * File: $Id: RooChiSquarePdf.h 28259 2009-04-16 16:21:16Z wouter $ 00005 * Authors: * 00006 * Kyle Cranmer 00007 * * 00008 * * 00009 * Redistribution and use in source and binary forms, * 00010 * with or without modification, are permitted according to the terms * 00011 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00012 *****************************************************************************/ 00013 #ifndef ROO_CHISQUARE 00014 #define ROO_CHISQUARE 00015 00016 #include "RooAbsPdf.h" 00017 #include "RooRealProxy.h" 00018 00019 class RooRealVar; 00020 class RooArgList ; 00021 00022 class RooChiSquarePdf : public RooAbsPdf { 00023 public: 00024 00025 RooChiSquarePdf() ; 00026 RooChiSquarePdf(const char *name, const char *title, 00027 RooAbsReal& x, RooAbsReal& ndof) ; 00028 00029 RooChiSquarePdf(const RooChiSquarePdf& other, const char* name = 0); 00030 virtual TObject* clone(const char* newname) const { return new RooChiSquarePdf(*this, newname); } 00031 inline virtual ~RooChiSquarePdf() { } 00032 00033 00034 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ; 00035 Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ; 00036 00037 00038 private: 00039 00040 RooRealProxy _x; 00041 RooRealProxy _ndof; 00042 00043 Double_t evaluate() const; 00044 00045 ClassDef(RooChiSquarePdf,1) // Chi Square distribution (eg. the PDF ) 00046 }; 00047 00048 #endif