#include#include "RooRealVar.h" int main() { RooRealVar x("x", "x", 10, 0, 20); x.setError(1.0); std::cout << "Error on x is: " << x.getError() << std::endl; return 0; }
#includeThe code above creates a Gaussian PDF called gauss with mean and sigma variables. It then sets the errors on mean and sigma to be 0.1 and 0.05, respectively, and prints the errors. Package library: ROOT.#include "RooRealVar.h" int main() { RooRealVar mean("mean", "mean", 0, -10, 10); RooRealVar sigma("sigma", "sigma", 1, 0.1, 10); RooGaussian gauss("gauss", "gaussian PDF", x, mean, sigma); mean.setError(0.1); sigma.setError(0.05); std::cout << "Errors on mean and sigma are: " << mean.getError() << " and " << sigma.getError() << std::endl; return 0; }