Logo ROOT   6.10/09
Reference Guide
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 
46 
47  RooDataSet* GetSDataSet() const;
48 
49  RooArgList GetSWeightVars() const;
50 
51  Int_t GetNumSWeightVars() const;
52 
53  void AddSWeight(RooAbsPdf* pdf, const RooArgList &yieldsTmp,
54  const RooArgSet &projDeps=RooArgSet(), bool includeWeights=kTRUE);
55 
56  Double_t GetSumOfEventSWeight(Int_t numEvent) const;
57 
58  Double_t GetYieldFromSWeight(const char* sVariable) const;
59 
60  Double_t GetSWeight(Int_t numEvent, const char* sVariable) const;
61 
62 
63 
64  protected:
65 
66  enum {
67  kOwnData = BIT(20)
68  };
69 
71 
72  // RooListProxy fSWeightVars;
73 
75 
76  ClassDef(SPlot,1) // Class used for making sPlots
77 
78 
79  };
80 
81 }
82 #endif
#define BIT(n)
Definition: Rtypes.h:75
RooDataSet * GetSDataSet() const
Definition: SPlot.cxx:178
int Int_t
Definition: RtypesCore.h:41
Double_t GetYieldFromSWeight(const char *sVariable) const
Sum the SWeights for a particular specie over all events This should equal the total (weighted) yield...
Definition: SPlot.cxx:265
#define ClassDef(name, id)
Definition: Rtypes.h:297
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Double_t GetSWeight(Int_t numEvent, const char *sVariable) const
Definition: SPlot.cxx:185
void AddSWeight(RooAbsPdf *pdf, const RooArgList &yieldsTmp, const RooArgSet &projDeps=RooArgSet(), bool includeWeights=kTRUE)
Method which adds the sWeights to the dataset.
Definition: SPlot.cxx:343
RooDataSet * fSData
Definition: SPlot.h:74
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
RooArgList GetSWeightVars() const
Return a RooArgList containing the SWeights.
Definition: SPlot.cxx:306
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:29
Int_t GetNumSWeightVars() const
Return the number of SWeights In other words, return the number of species that we are trying to extr...
Definition: SPlot.cxx:320
const Bool_t kFALSE
Definition: RtypesCore.h:92
Namespace for the RooStats classes.
Definition: Asimov.h:20
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
RooDataSet * SetSData(RooDataSet *data)
Definition: SPlot.cxx:167
SPlot()
Default constructor.
Definition: SPlot.cxx:80
RooArgList fSWeightVars
Definition: SPlot.h:70
Double_t GetSumOfEventSWeight(Int_t numEvent) const
Sum the SWeights for a particular event.
Definition: SPlot.cxx:234
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset...
const Bool_t kTRUE
Definition: RtypesCore.h:91
This class calculates sWeights used to create an sPlot.
Definition: SPlot.h:32