void rf505_asciicfg()
{
std::unique_ptr<RooDataSet>
d{model.generate(
x, 1000)};
std::unique_ptr<RooArgSet> params{model.getParameters(
x)};
params->writeToFile("rf505_asciicfg_example.txt");
dir1.
Append(
"/roofit/rf505_asciicfg.txt") ;
TString dir2 =
"rf505_asciicfg_example.txt";
params->readFromFile(dir2);
params->Print("v");
params->readFromFile(dir1, 0, "Section2");
params->Print("v");
params->readFromFile(dir1, "READ", "Section3");
cout << "The following parameters of the were _not_ read from Section3: "
<< (*params->selectByAttrib("READ", false)) << endl;
params->readFromFile(dir1, 0, "Section4");
params->Print("v");
}
Efficient implementation of a sum of PDFs of the form.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooPolynomial implements a polynomial p.d.f of the form.
Variable that can be changed from the outside.
TString & Append(const char *cs)
RooCmdArg PrintLevel(Int_t code)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
[#0] WARNING:InputArguments -- The parameter 's' with range [-10, 10] of the RooGaussian 'g' exceeds the safe range of (0, inf). Advise to limit its range.
[#1] INFO:Fitting -- RooAbsPdf::fitTo(model) fixing normalization set for coefficient determination to observables in data
[#1] INFO:Fitting -- using generic CPU library compiled with no vectorizations
[#1] INFO:Fitting -- Creation of NLL object took 883.661 μs
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_modelData) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
1) 0x7ffdc8edc938 RooRealVar:: f = 0.50733 +/- 0.020971 L(0 - 1) "f"
2) 0x7ffdc8edbd80 RooRealVar:: m = 0.0064018 +/- 0.053686 L(-10 - 10) "m"
3) 0x7ffdc8edc550 RooRealVar:: p0 = 0.0073509 +/- 0.0078312 L(0 - 1) "p0"
4) 0x7ffdc8edc168 RooRealVar:: s = 0.96516 +/- 0.047052 L(-10 - 10) "s"
[#0] ERROR:InputArguments -- RooArgSet::readFromFile(parameters) error opening file /usr/share/root/tutorials/roofit/rf505_asciicfg.txt
1) 0x7ffdc8edc938 RooRealVar:: f = 0.50733 +/- 0.020971 L(0 - 1) "f"
2) 0x7ffdc8edbd80 RooRealVar:: m = 0.0064018 +/- 0.053686 L(-10 - 10) "m"
3) 0x7ffdc8edc550 RooRealVar:: p0 = 0.0073509 +/- 0.0078312 L(0 - 1) "p0"
4) 0x7ffdc8edc168 RooRealVar:: s = 0.96516 +/- 0.047052 L(-10 - 10) "s"
[#0] ERROR:InputArguments -- RooArgSet::readFromFile(parameters) error opening file /usr/share/root/tutorials/roofit/rf505_asciicfg.txt
The following parameters of the were _not_ read from Section3: (f,m,p0,s)
[#0] ERROR:InputArguments -- RooArgSet::readFromFile(parameters) error opening file /usr/share/root/tutorials/roofit/rf505_asciicfg.txt
1) 0x7ffdc8edc938 RooRealVar:: f = 0.50733 +/- 0.020971 L(0 - 1) "f"
2) 0x7ffdc8edbd80 RooRealVar:: m = 0.0064018 +/- 0.053686 L(-10 - 10) "m"
3) 0x7ffdc8edc550 RooRealVar:: p0 = 0.0073509 +/- 0.0078312 L(0 - 1) "p0"
4) 0x7ffdc8edc168 RooRealVar:: s = 0.96516 +/- 0.047052 L(-10 - 10) "s"