Home | News | Documentation | Download

Formula doesn't compile in RooFormulaVar

Dear experts,

I am trying model a distribution using RooLandau and RooGaussian. For both of these shapes, I have fixed the mean and the sigma. I want to introduce two other free parameters , delta(shift in the mean) and a s(scale factor for the width) using RooFormulaVar but my formula doesn’t compile and I am not
able to spot my mistake.

Here’s the macro and the root file.
kpipi0_semileptonic_bkg_fit_d0pi.C (4.7 KB)
kpipi0_semileptonic_1.75to1.76.root (28.9 KB)

Would you please help.

HI,
I cannot run your code, since it is missing some user code.

Processing kpipi0_semileptonic_bkg_fit_d0pi.C...
In file included from input_line_11:1:
/home/moneta/root/tests/roofit/kpipi0_semileptonic_bkg_fit_d0pi.C:37:10: fatal error: 'myRooPolBG.cpp' file not found
#include "myRooPolBG.cpp"

Lorenzo

Hi,

Thank you for the message. I managed to fix it this morning. The code should be:

/> /Landau

RooRealVar mean_L("#mu_{L}", “mean”,2.01516);
RooFormulaVar mean_L_shifted("#mu_L_shifted", “@0+@1”,RooArgList(mean_L, delta));

RooRealVar sigma_L("#sigma_{L}", “sigma”, 0.001412);
RooFormulaVar sigma_L_shifted("#sigma_{L}_shifted", “@0+@1*@0”,RooArgList(sigma_L, s));

RooLandau landau(“landau”, “landau component”, d0pi, mean_L_shifted, sigma_L_shifted);

//Gaussian
RooRealVar mean_G("#mu_{G}", “mean”,2.01027);
RooFormulaVar mean_G_shifted("#mu_G_shifted", “@0+@1”,RooArgList(mean_G, delta));

RooRealVar sigma_G("#sigma_{G}", “sigma”, 0.002145);
RooFormulaVar sigma_G_shifted("#sigma_{G}_shifted", “@0+@1*@0”,RooArgList(sigma_G, s));

RooGaussian gauss(“gauss”, “gauss component”, d0pi, mean_G_shifted, sigma_G_shifted);

RooAddPdf sig(“sig”,“landau + gaussian”,landau,gauss,f1);

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.