Hi all,
I would like to ask how to make (and then fit to data) a Roofit model that combines model with different domain for the independent variable. For example a simple RooAddPdf between a RooLognormal, which is defined only for positive x, and a gaussian that is defined in the whole axis. Of course I am looking for the case when the gaussian is basically around x=0 and extends to negative x:
As you see I have no problem to make gauss + gauss, but as soon as I try to model the red component with the Roofit log-normal pdf (which should better describe the physical process in theory), I start to get complains that this component is attempted to be evaluated below zero, even if I restrict the fit to positive value (you notice in the picture that the blue line starts from 1.0 also in the 2 gaussian example).
I have no problem (well, after some learning to figure out some reasonable choice of the median and scale parameter) to plot, generate and fit a RooLognormal alone, it is really when I start to mix up with other distributions.
Looking at the code ( ROOT: roofit/roofit/src/RooLognormal.cxx Source File ) Roofit relies for the pdf evaluation on ROOT::Math::log_normal_pdf, which puts to zero the pdf for x<0 ( ROOT: math/mathcore/inc/Math/PdfFuncMathCore.h Source File ), but maybe Roofit intercepts this, because I understood that for the logL calculation it does not want zero probability.
So how do you deal with such cases? It seems fairly common to me.
I read that for the FFTConvPdf Roofit implements a shift of a pdf w.r.t. to the other. Can I try something on the same track? Maybe the gaussian depends on a different variable that is just shifted or so?
Any suggestion is really appreciated!
