'High Level Factory Example' RooStats tutorial macro #602
This tutorial shows an example of creating a combined model using the High Level model Factory.
Processing /mnt/build/workspace/root-makedoc-v610/rootspi/rdoc/src/v6-10-00-patches/tutorials/roostats/rs602_HLFactoryCombinationexample.C...
#include <fstream>
void rs602_HLFactoryCombinationexample() {
TString card_name("HLFavtoryCombinationexample.rs");
ofstream ofile(card_name);
ofile << "// The simplest card for combination\n\n"
<< "gauss1 = Gaussian(x[0,100],mean1[50,0,100],4);\n"
<< "flat1 = Polynomial(x,0);\n"
<< "sb_model1 = SUM(nsig1[120,0,300]*gauss1 , nbkg1[100,0,1000]*flat1);\n"
<< "gauss2 = Gaussian(x,mean2[80,0,100],5);\n"
<< "flat2 = Polynomial(x,0);\n"
<< "sb_model2 = SUM(nsig2[90,0,400]*gauss2 , nbkg2[80,0,1000]*flat2);\n";
ofile.close();
card_name,
false);
hlf.AddChannel("model1","sb_model1","flat1");
hlf.AddChannel("model2","sb_model2","flat2");
gROOT->SetStyle(
"Plain");
}
- Author
- Danilo Piparo
Definition in file rs602_HLFactoryCombinationexample.C.