ROOT logo
// @(#)root/roostats:$Id: SPlot.h 26324 2008-11-20 17:17:32Z moneta $
// Author: Kyle Cranmer   21/07/2008

/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef RooStats_SPlot
#define RooStats_SPlot

class RooAbsReal;
class RooAbsPdf;
class RooFitResult;
class RooRealVar;
class RooSimultaneous;

#ifndef ROOT_TH1
#include "TH1.h"
#endif
#include "RooFitResult.h"
#include "RooRealVar.h"
#include "RooHist.h"
#include "RooPlot.h"
#include "RooDataSet.h"

namespace RooStats{

 class SPlot : public TH1F {
  public:
    SPlot();
    SPlot(const SPlot &other);
    SPlot(const char* name, const char *title, Int_t nbins, Double_t xmin, Double_t xmax);
    
    static RooDataSet* 
      AddSWeightToData(const RooSimultaneous* pdf, const RooArgList &yieldsTmp, 
		       RooDataSet &data, const RooArgSet &projDeps=RooArgSet()) ;
    
    
    void FillSPlot(const RooDataSet &data, TString varname, TString weightname);
 
    void FillSPlot(const RooAbsReal &x, RooAbsReal &nstar, RooDataSet data, const RooFitResult &fitRes, const RooArgList &pdfList, const RooArgList &yields, Bool_t doErrors, const RooArgSet &projDeps=RooArgSet() );
    void FillSPlot(const RooAbsReal &x, RooAbsReal &nstar, RooDataSet data, const RooFitResult &fitRes, const RooArgList &pdfList, const RooArgList &yields, RooAbsPdf &totalPdf, Bool_t doErrors, const RooArgSet &projDeps=RooArgSet() );
    
    void FillSPlot(const RooAbsReal &x, RooAbsReal &nstar, RooDataSet data, const RooFitResult &fitRes, RooAbsPdf &totalPdf, RooArgList &yields, Bool_t doErrors, const RooArgSet &projDeps=RooArgSet() );
    
    Double_t GetComponentValue(RooAbsPdf &pdf, RooArgList &yieldsTmp, Int_t igood, RooArgSet &normSet);
    
  protected:

    ClassDef(SPlot,1)   // Class used for making sPlots
   };

}
#endif
 SPlot.h:1
 SPlot.h:2
 SPlot.h:3
 SPlot.h:4
 SPlot.h:5
 SPlot.h:6
 SPlot.h:7
 SPlot.h:8
 SPlot.h:9
 SPlot.h:10
 SPlot.h:11
 SPlot.h:12
 SPlot.h:13
 SPlot.h:14
 SPlot.h:15
 SPlot.h:16
 SPlot.h:17
 SPlot.h:18
 SPlot.h:19
 SPlot.h:20
 SPlot.h:21
 SPlot.h:22
 SPlot.h:23
 SPlot.h:24
 SPlot.h:25
 SPlot.h:26
 SPlot.h:27
 SPlot.h:28
 SPlot.h:29
 SPlot.h:30
 SPlot.h:31
 SPlot.h:32
 SPlot.h:33
 SPlot.h:34
 SPlot.h:35
 SPlot.h:36
 SPlot.h:37
 SPlot.h:38
 SPlot.h:39
 SPlot.h:40
 SPlot.h:41
 SPlot.h:42
 SPlot.h:43
 SPlot.h:44
 SPlot.h:45
 SPlot.h:46
 SPlot.h:47
 SPlot.h:48
 SPlot.h:49
 SPlot.h:50
 SPlot.h:51
 SPlot.h:52
 SPlot.h:53
 SPlot.h:54
 SPlot.h:55
 SPlot.h:56
 SPlot.h:57
 SPlot.h:58