Fitting pdf with non independent parameters using roofit

dear RooFit users,

I have the following PDF:


This is easy to implement. Anyways the parameter f1, f2,f3 are not independent but they are the value of a function f(x,N) calculated respectively x=mu1, x=mu2, x=mu3.
I was not able to implement such dependence in the definition of the pdf, it could be very useful because i’ll only use the parameter N instead of f1,f2,f3.

could someone help me?

thank you


Could you create for each f_i (i=1,2,3) a RooFormulaVar object, which you use to add the PDF components?

RooRealVar N(“N”,“N”,123)
RooRealVar mu1(“mu1”,“mu1”,456)
RooRealVar mu2 …
RooRealVar mu3 …
RooFormulaVar f1(“f1”,“Nmu1789”,RooArgList(N,mu1))
RooFormulaVar f2 …
RooFormulaVar f3 …

RooAddPdf S(“S”,“S”,RooArgList(g1,g2,g3), RooArgList(f1,f2,f3))

(this code may have mistakes, It’s just a sketch)

Thanks for the reply. Yes in principle it should easily work if the formula wasn’t the convolution of Landau with a Gaussian.