Logo ROOT   6.12/07
Reference Guide
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 #include "Rtypes.h"
16 
17 class RooWorkspace;
18 class RooRealVar;
19 
20 namespace RooStats{
21 
23 
24  public:
25  // need one for expected and one for observed
27  virtual ~NumberCountingPdfFactory();
28 
29  void AddModel(Double_t* sigExp, Int_t nchan, RooWorkspace* ws,
30  const char* pdfName = "CombinedPdf", const char* masterSignalName = "masterSignal") ;
31 
32  void AddData(Double_t* mainMeas, Double_t* bkgMeas, Double_t* db,
33  Int_t nbins, RooWorkspace* ws, const char* dsName = "NumberCountingData");
34  void AddExpData(Double_t* sigExp, Double_t* bkgExp, Double_t* db,
35  Int_t nbins, RooWorkspace* ws, const char* dsName = "ExpectedNumberCountingData");
36  void AddExpDataWithSideband(Double_t* sigExp, Double_t* bkgExp, Double_t* tau,
37  Int_t nbins, RooWorkspace* ws, const char* dsName = "NumberCountingData");
38  void AddDataWithSideband(Double_t* mainMeas, Double_t* sideband, Double_t* tau,
39  Int_t nbins, RooWorkspace* ws, const char* dsName = "ExpectedNumberCountingData");
40 
41  private:
42  RooRealVar* SafeObservableCreation(RooWorkspace* ws, const char* varName, Double_t value) ;
43  RooRealVar* SafeObservableCreation(RooWorkspace* ws, const char* varName, Double_t value, Double_t maximum) ;
44 
45 
46  protected:
47  ClassDef(NumberCountingPdfFactory,1) // A factory specific to common number counting problems.
48 
49  };
50 }
51 
52 #endif
void ws()
Definition: ws.C:62
int Int_t
Definition: RtypesCore.h:41
A factory for building PDFs and data for a number counting combination.
void AddExpData(Double_t *sigExp, Double_t *bkgExp, Double_t *db, Int_t nbins, RooWorkspace *ws, const char *dsName="ExpectedNumberCountingData")
Arguments are an array of expected signal, expected background, and relative background uncertainty (...
void AddExpDataWithSideband(Double_t *sigExp, Double_t *bkgExp, Double_t *tau, Int_t nbins, RooWorkspace *ws, const char *dsName="NumberCountingData")
Arguments are an array of expected signal, expected background, and relative ratio of background expe...
#define ClassDef(name, id)
Definition: Rtypes.h:320
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t tau
Definition: TRolke.cxx:630
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
Namespace for the RooStats classes.
Definition: Asimov.h:20
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")
Arguments are an array of expected signal, expected background, and relative background uncertainty (...
void AddData(Double_t *mainMeas, Double_t *bkgMeas, Double_t *db, Int_t nbins, RooWorkspace *ws, const char *dsName="NumberCountingData")
Arguments are an array of results from a main measurement, a measured background, and relative backgr...
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...
void AddModel(Double_t *sigExp, Int_t nchan, RooWorkspace *ws, const char *pdfName="CombinedPdf", const char *masterSignalName="masterSignal")
This method produces a PDF for N channels with uncorrelated background uncertainty.
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:42