27 using namespace RooFit ;
28 using namespace RooStats ;
33 using namespace RooStats;
34 using namespace RooFit;
37 TString card_name(
"HLFavtoryCombinationexample.rs");
38 ofstream ofile(card_name);
39 ofile <<
"// The simplest card for combination\n\n"
40 <<
"gauss1 = Gaussian(x[0,100],mean1[50,0,100],4);\n"
41 <<
"flat1 = Polynomial(x,0);\n"
42 <<
"sb_model1 = SUM(nsig1[120,0,300]*gauss1 , nbkg1[100,0,1000]*flat1);\n"
43 <<
"gauss2 = Gaussian(x,mean2[80,0,100],5);\n"
44 <<
"flat2 = Polynomial(x,0);\n"
45 <<
"sb_model2 = SUM(nsig2[90,0,400]*gauss2 , nbkg2[80,0,1000]*flat2);\n";
49 HLFactory hlf(
"HLFavtoryCombinationexample",
74 gROOT->SetStyle(
"Plain");
int AddChannel(const char *label, const char *SigBkgPdfName, const char *BkgPdfName=0, const char *datasetName=0)
Add channel for the combination.
RooCmdArg ProjWData(const RooAbsData &projData, Bool_t binData=kFALSE)
RooCmdArg Extended(Bool_t flag=kTRUE)
HLFactory is an High Level model Factory allows you to describe your models in a configuration file (...
RooRealVar represents a fundamental (non-derived) real valued object.
RooDataSet is a container class to hold unbinned data.
RooCategory represents a fundamental (non-derived) discrete value object.
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
void rs602_HLFactoryCombinationexample()
RooCategory * GetTotCategory()
Get the combined dataset.
RooWorkspace * GetWs()
Get the RooWorkspace containing the models and variables.
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
RooAbsArg * arg(const char *name) const
Return RooAbsArg with given name. A null pointer is returned if none is found.
RooAbsPdf * GetTotSigBkgPdf()
Get the combined signal plus background pdf.
RooCmdArg Slice(const RooArgSet &sliceSet)