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"));
59 auto mesframe = mes->frame();
61 sum->plotOn(mesframe);
64 gROOT->SetStyle(
"Plain");
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), 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
RooDataSet * generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
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 Components(const RooArgSet &compSet)
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)