Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:29:45

0001 // @(#)root/roostats:$Id$
0002 // Author: Kyle Cranmer   28/07/2008
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef RooStats_NumberCountingPdfFactory
0013 #define RooStats_NumberCountingPdfFactory
0014 
0015 #include "Rtypes.h"
0016 
0017 class RooWorkspace;
0018 class RooRealVar;
0019 
0020 namespace RooStats{
0021 
0022    class  NumberCountingPdfFactory {
0023 
0024    public:
0025       /// need one for expected and one for observed
0026       virtual ~NumberCountingPdfFactory() = default;
0027 
0028       void AddModel(double* sigExp, Int_t nchan, RooWorkspace* ws,
0029                     const char* pdfName = "CombinedPdf", const char* masterSignalName = "masterSignal") ;
0030 
0031       void AddData(double* mainMeas, double* bkgMeas, double* db,
0032                    Int_t nbins, RooWorkspace* ws, const char* dsName = "NumberCountingData");
0033       void AddExpData(double* sigExp, double* bkgExp, double* db,
0034                       Int_t nbins, RooWorkspace* ws, const char* dsName = "ExpectedNumberCountingData");
0035       void AddExpDataWithSideband(double* sigExp, double* bkgExp, double* tau,
0036                                   Int_t nbins, RooWorkspace* ws, const char* dsName = "NumberCountingData");
0037       void AddDataWithSideband(double* mainMeas, double* sideband, double* tau,
0038                                Int_t nbins, RooWorkspace* ws, const char* dsName = "ExpectedNumberCountingData");
0039 
0040    private:
0041       RooRealVar* SafeObservableCreation(RooWorkspace* ws, const char* varName, double value) ;
0042       RooRealVar* SafeObservableCreation(RooWorkspace* ws, const char* varName, double value, double maximum) ;
0043 
0044 
0045    protected:
0046       ClassDef(NumberCountingPdfFactory,1) // A factory specific to common number counting problems.
0047 
0048    };
0049 }
0050 
0051 #endif