28void rs601_HLFactoryexample()
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");
RooRealVar represents a fundamental (non-derived) real valued object.
HLFactory is an High Level model Factory allows you to describe your models in a configuration file (...
Template specialisation used in RooAbsArg:
RooCmdArg Components(const RooArgSet &compSet)
RooCmdArg LineStyle(Style_t style)
Namespace for the RooStats classes.
static long int sum(long int i)