CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/HiggsAnalysis/CombinedLimit/interface/RooSpline1D.h

Go to the documentation of this file.
00001 #ifndef HiggsAnalysis_CombinedLimit_RooSpline1D_h
00002 #define HiggsAnalysis_CombinedLimit_RooSpline1D_h
00003 
00004 #include <RooAbsReal.h>
00005 #include <RooRealProxy.h>
00006 #include <Math/Interpolator.h>
00007 
00008 //_________________________________________________
00009 /*
00010 BEGIN_HTML
00011 <p>
00012 RooSpline1D is helper class for smoothing a list of values using an interpolator provided by the ROOT::Math::Interpolator class. 
00013 For the interpolation types, see http://project-mathlibs.web.cern.ch/project-mathlibs/sw/html/group__Interpolation.html
00014 </p>
00015 END_HTML
00016 */
00017 //
00018 class RooSpline1D : public RooAbsReal {
00019 
00020    public:
00021       RooSpline1D() {}
00022       RooSpline1D(const char *name, const char *title, RooAbsReal &xvar, unsigned int npoints, const double *xvals, const double *yvals, const char *algo="CSPLINE") ;
00023       RooSpline1D(const char *name, const char *title, RooAbsReal &xar, unsigned int npoints, const float *xvals, const float *yvals, const char *algo="CSPLINE") ;
00024       ~RooSpline1D() ;
00025 
00026       TObject * clone(const char *newname) const ;
00027 
00028     protected:
00029         Double_t evaluate() const;
00030 
00031     private:
00032         RooRealProxy xvar_;
00033         std::vector<double> x_, y_;
00034         std::string type_;
00035 
00036         mutable ROOT::Math::Interpolator *interp_; 
00037         void init() const ;
00038 
00039   ClassDef(RooSpline1D,1) // Smooth interpolation       
00040 };
00041 
00042 #endif