Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
SPlot.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: Kyle Cranmer 21/07/2008
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef RooStats_SPlot
13 #define RooStats_SPlot
14 
15 class RooAbsReal;
16 class RooAbsPdf;
17 class RooFitResult;
18 class RooRealVar;
19 class RooSimultaneous;
20 
21 
22 #include "RooMsgService.h"
23 
24 #include "RooFitResult.h"
25 #include "RooRealVar.h"
26 #include "RooHist.h"
27 #include "RooPlot.h"
28 #include "RooDataSet.h"
29 
30 namespace RooStats{
31 
32  class SPlot: public TNamed {
33 
34  public:
35 
36  ~SPlot();
37  SPlot();
38  SPlot(const SPlot &other);
39  SPlot(const char* name, const char* title);
40  SPlot(const char* name, const char* title, const RooDataSet &data);
41  SPlot(const char* name, const char* title,RooDataSet& data, RooAbsPdf* pdf,
42  const RooArgList &yieldsList,const RooArgSet &projDeps=RooArgSet(),
43  bool includeWeights=kTRUE, bool copyDataSet = kFALSE, const char* newName = "",
44  const RooCmdArg& fitToarg5=RooCmdArg::none(),
45  const RooCmdArg& fitToarg6=RooCmdArg::none(),
46  const RooCmdArg& fitToarg7=RooCmdArg::none(),
47  const RooCmdArg& fitToarg8=RooCmdArg::none());
48 
49  RooDataSet* SetSData(RooDataSet* data);
50 
51  RooDataSet* GetSDataSet() const;
52 
53  RooArgList GetSWeightVars() const;
54 
55  Int_t GetNumSWeightVars() const;
56 
57  void AddSWeight(RooAbsPdf* pdf, const RooArgList &yieldsTmp,
58  const RooArgSet &projDeps=RooArgSet(), bool includeWeights=kTRUE,
59  const RooCmdArg& fitToarg5=RooCmdArg::none(),
60  const RooCmdArg& fitToarg6=RooCmdArg::none(),
61  const RooCmdArg& fitToarg7=RooCmdArg::none(),
62  const RooCmdArg& fitToarg8=RooCmdArg::none());
63 
64  Double_t GetSumOfEventSWeight(Int_t numEvent) const;
65 
66  Double_t GetYieldFromSWeight(const char* sVariable) const;
67 
68  Double_t GetSWeight(Int_t numEvent, const char* sVariable) const;
69 
70 
71 
72  protected:
73 
74  enum {
75  kOwnData = BIT(20)
76  };
77 
78  RooArgList fSWeightVars;
79 
80  // RooListProxy fSWeightVars;
81 
82  RooDataSet* fSData;
83 
84  ClassDef(SPlot,1) // Class used for making sPlots
85 
86 
87  };
88 
89 }
90 #endif