28void rs602_HLFactoryCombinationexample()
35 TString card_name(
"HLFavtoryCombinationexample.rs");
36 ofstream ofile(card_name);
37 ofile <<
"// The simplest card for combination\n\n"
38 <<
"gauss1 = Gaussian(x[0,100],mean1[50,0,100],4);\n"
39 <<
"flat1 = Polynomial(x,0);\n"
40 <<
"sb_model1 = SUM(nsig1[120,0,300]*gauss1 , nbkg1[100,0,1000]*flat1);\n"
41 <<
"gauss2 = Gaussian(x,mean2[80,0,100],5);\n"
42 <<
"flat2 = Polynomial(x,0);\n"
43 <<
"sb_model2 = SUM(nsig2[90,0,400]*gauss2 , nbkg2[80,0,1000]*flat2);\n";
47 HLFactory hlf(
"HLFavtoryCombinationexample", card_name,
false);
49 hlf.AddChannel(
"model1",
"sb_model1",
"flat1");
50 hlf.AddChannel(
"model2",
"sb_model2",
"flat2");
51 auto pdf = hlf.GetTotSigBkgPdf();
52 auto thecat = hlf.GetTotCategory();
53 auto x =
static_cast<RooRealVar *
>(hlf.GetWs()->arg(
"x"));
70 gROOT->SetStyle(
"Plain");
RooPlot * frame(const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
RooRealVar represents a variable that can be changed from the outside.
HLFactory is an High Level model Factory allows you to describe your models in a configuration file (...
RooCmdArg Extended(Bool_t flag=kTRUE)
RooCmdArg ProjWData(const RooAbsData &projData, Bool_t binData=kFALSE)
RooCmdArg Slice(const RooArgSet &sliceSet)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.