ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
NumberCountingPdfFactory.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: Kyle Cranmer 28/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_NumberCountingPdfFactory
13 #define RooStats_NumberCountingPdfFactory
14 
15 #ifndef ROOT_Rtypes
16 #include "Rtypes.h"
17 #endif
18 
19 class RooWorkspace;
20 class RooRealVar;
21 
22 namespace RooStats{
23 
25 
26  public:
27  // need one for expected and one for observed
29  virtual ~NumberCountingPdfFactory();
30 
31  void AddModel(Double_t* sigExp, Int_t nchan, RooWorkspace* ws,
32  const char* pdfName = "CombinedPdf", const char* masterSignalName = "masterSignal") ;
33 
34  void AddData(Double_t* mainMeas, Double_t* bkgMeas, Double_t* db,
35  Int_t nbins, RooWorkspace* ws, const char* dsName = "NumberCountingData");
36  void AddExpData(Double_t* sigExp, Double_t* bkgExp, Double_t* db,
37  Int_t nbins, RooWorkspace* ws, const char* dsName = "ExpectedNumberCountingData");
38  void AddExpDataWithSideband(Double_t* sigExp, Double_t* bkgExp, Double_t* tau,
39  Int_t nbins, RooWorkspace* ws, const char* dsName = "NumberCountingData");
40  void AddDataWithSideband(Double_t* mainMeas, Double_t* sideband, Double_t* tau,
41  Int_t nbins, RooWorkspace* ws, const char* dsName = "ExpectedNumberCountingData");
42 
43  private:
44  RooRealVar* SafeObservableCreation(RooWorkspace* ws, const char* varName, Double_t value) ;
45  RooRealVar* SafeObservableCreation(RooWorkspace* ws, const char* varName, Double_t value, Double_t maximum) ;
46 
47 
48  protected:
49  ClassDef(NumberCountingPdfFactory,1) // A factory specific to common number counting problems.
50 
51  };
52 }
53 
54 #endif
int Int_t
Definition: RtypesCore.h:41
int nbins[3]
void AddExpData(Double_t *sigExp, Double_t *bkgExp, Double_t *db, Int_t nbins, RooWorkspace *ws, const char *dsName="ExpectedNumberCountingData")
void AddExpDataWithSideband(Double_t *sigExp, Double_t *bkgExp, Double_t *tau, Int_t nbins, RooWorkspace *ws, const char *dsName="NumberCountingData")
#define ClassDef(name, id)
Definition: Rtypes.h:254
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:37
double Double_t
Definition: RtypesCore.h:55
void AddDataWithSideband(Double_t *mainMeas, Double_t *sideband, Double_t *tau, Int_t nbins, RooWorkspace *ws, const char *dsName="ExpectedNumberCountingData")
void AddData(Double_t *mainMeas, Double_t *bkgMeas, Double_t *db, Int_t nbins, RooWorkspace *ws, const char *dsName="NumberCountingData")
RooRealVar * SafeObservableCreation(RooWorkspace *ws, const char *varName, Double_t value)
need to be careful here that the range of observable in the dataset is consistent with the one in the...
float value
Definition: math.cpp:443
void AddModel(Double_t *sigExp, Int_t nchan, RooWorkspace *ws, const char *pdfName="CombinedPdf", const char *masterSignalName="masterSignal")
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:42