LikelihoodIntervalPlot.h

Go to the documentation of this file.
00001 // @(#)root/roostats:$Id: LikelihoodIntervalPlot.h 31793 2009-12-10 14:43:51Z moneta $
00002 
00003 /*************************************************************************
00004  * Project: RooStats                                                     *
00005  * Package: RooFit/RooStats                                              *
00006  * Authors:                                                              *
00007  *   Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke       *
00008  *************************************************************************
00009  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
00010  * All rights reserved.                                                  *
00011  *                                                                       *
00012  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00013  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00014  *************************************************************************/
00015 
00016 #ifndef ROOSTATS_LikelihoodIntervalPlot
00017 #define ROOSTATS_LikelihoodIntervalPlot
00018 
00019 #include "RooPrintable.h"
00020 #include "RooArgSet.h"
00021 
00022 #include "TNamed.h"
00023 
00024 #include "TH2F.h"
00025 
00026 #include "RooStats/LikelihoodInterval.h"
00027 
00028 namespace RooStats {
00029 
00030  class LikelihoodIntervalPlot : public TNamed, public RooPrintable {
00031 
00032    public:
00033     LikelihoodIntervalPlot();
00034 
00035     LikelihoodIntervalPlot(LikelihoodInterval* theInterval);
00036 
00037     // Destructor of SamplingDistribution
00038     virtual ~LikelihoodIntervalPlot();
00039 
00040     void SetLikelihoodInterval(LikelihoodInterval* theInterval);
00041     void SetPlotParameters(const RooArgSet *params) ;
00042 
00043 
00044     // set plot range (for 1D plot)
00045     void SetRange(double x1, double x2) { fXmin = x1; fXmax = x2; }
00046     // set plot range (for 2D plot)
00047     void SetRange(double x1, double y1, double x2, double y2) {
00048        fXmin = x1; fXmax = x2; 
00049        fYmin = y1; fYmax = y2; 
00050     }
00051 
00052     //set plot precision (when drawing a RooPlot)
00053     void SetPrecision(double eps) { fPrecision = eps; }
00054 
00055     void SetContourColor(const Color_t color) {fColor = color;}
00056     void SetLineColor(const Color_t color) {fLineColor = color;}
00057     void SetMaximum(const Double_t theMaximum) {fMaximum = theMaximum;}
00058     void SetNPoints(Int_t np) { fNPoints = np; }
00059 
00060 
00061     // draw the likelihood interval or contour
00062     // for the 1D case a RooPlot is drawn by default of the profiled Log-Likelihood ratio
00063     // if option "TF1" is used the objects is drawn using a TF1 scanning the LL function in a 
00064     // grid of the setetd points (by default 
00065     // the TF1 can be costumized by setting maximum and the number of points to scan 
00066     void Draw(const Option_t *options=0);
00067 
00068   private:
00069 
00070     Int_t fColor;
00071     Int_t fFillStyle;
00072     Int_t fLineColor;
00073     Int_t fNdimPlot;
00074     Int_t fNPoints; // number of points used to scan the PL 
00075 
00076     Double_t fMaximum;   // function maximum
00077     // ranges for plots 
00078     Double_t fXmin;
00079     Double_t fXmax;
00080     Double_t fYmin;
00081     Double_t fYmax;
00082     Double_t fPrecision;  // RooCurve precision
00083 
00084     LikelihoodInterval *fInterval;
00085 
00086     RooArgSet *fParamsPlot;
00087 
00088 
00089   protected:
00090 
00091     ClassDef(LikelihoodIntervalPlot,1)  // Class containing the results of the IntervalCalculator
00092   };
00093 }
00094 
00095 #endif

Generated on Tue Jul 5 14:26:24 2011 for ROOT_528-00b_version by  doxygen 1.5.1