17 double cpu_bw(
double x,
double x0,
double gamma) {
19 ret /= (2 * sqrt(M_PI));
20 ret /= ((x - x0) * (x - x0) + 0.25 * gamma * gamma);
24 int main(
int argc,
char **argv) {
32 Variable gamma{
"gamma", 2, 0.1, 0.1, 5};
42 for(
int i = 0; i < 100000; ++i) {
43 xvar.setValue(donram.Uniform(20) - 10);
45 double bwvalue =
cpu_bw(xvar.getValue(), x0.getValue(), gamma.getValue());
46 double roll = donram.Uniform() * (2.0 / (sqrt(M_PI) * gamma.getValue()));
53 xvar.setValue(xvar.getValue() + donram.Gaus(0,
sigma.
getValue()));
55 if((xvar.getValue() < xvar.getLowerLimit()) || (xvar.getValue() > xvar.getUpperLimit())) {
63 BWPdf breit{
"breit", xvar, x0, gamma};
71 TFile f(
"output.root",
"RECREATE");
72 auto toroot = convolution.plotToROOT(xvar);
Special class for observables. Used in DataSets.
int main(int argc, char **argv)
__host__ void setData(DataSet *data)
fptype getValue() const
Get the value.
ROOT::Minuit2::FunctionMinimum fit()
This runs the fit.
#define GOOFIT_PARSE(app,...)
double cpu_bw(double x, double x0, double gamma)