33 TString card_name(
"HLFavtoryexample.rs");
34 ofstream ofile(card_name);
35 ofile <<
"// The simplest card\n\n"
36 <<
"gauss = Gaussian(mes[5.20,5.30],mean[5.28,5.2,5.3],width[0.0027,0.001,1]);\n"
37 <<
"argus = ArgusBG(mes,5.291,argpar[-20,-100,-1]);\n"
38 <<
"sum = SUM(nsig[200,0,10000]*gauss,nbkg[800,0,10000]*argus);\n\n";
42 HLFactory hlf(
"HLFavtoryexample", card_name,
false);
48 auto mes =
dynamic_cast<RooRealVar *
>(
w->arg(
"mes"));
50 auto argus =
dynamic_cast<RooAbsPdf *
>(
w->pdf(
"argus"));
53 auto data =
sum->generate(*mes, 2000);
59 auto mesframe = mes->frame();
60 data->plotOn(mesframe);
61 sum->plotOn(mesframe);
64 gROOT->SetStyle(
"Plain");
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Abstract interface for all probability density functions.
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 Components(Args_t &&... argsOrArgSet)
RooCmdArg LineStyle(Style_t style)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.
static uint64_t sum(uint64_t i)