Parametrizing the bin edges of a RooParametricStepFunction?

Dear RooFit experts,

I am trying to convolute a Gaussian PDF (a RooGaussian) with some step function. The 1-dimensional Gaussian not only depends on x but its values for mean and sigma are functions (RooFormularVars) of another variable y. The step function should have three bins in x, yielding a probability if zero in both the very left and the very right bin. The edges of the central bin, i.e. the region of non-zero probability, should depend on y! I started to implement this using a RooParametricStepFunction. However, while the weights of the individual bins can be given as RooRealVars, the bin limits have to be entered via a simple TArrayD. This does not allow me to parametrize the bin edges of my RooParametricStepFunction as a function of y, right?! Any suggestions how I could achieve that (within RooFit)?

Thanks a lot in advance!

Best regards,
Sebastian

Hi,

You should be able to implement this function yourself as a C function, or as a class and then create from it a RooAbsReal or a RooAbsPdf

Lorenzo

Dear Lorenzo,

thanks a lot for your reply!

I realized now that I can nicely use a RooGenericPdf with its string-type formula to implement my simple step function as a PDF that has the bin edges as RooRealVars, which allow me to parametrize them as functions of other variables:

RooGenericPdf stepFuncPDF("stepFuncPDF", "stepFuncPDF", "(@0 >= @1) && (@0 < @2)", RooArgList(x, leftEdge, rightEdge));

Testing the convolution with some Gaussian PDF in a slightly simplified scenario gave me results that looked fine:


However, before implementing and testing the parametrized edges for my step function, I have to find a nice solution for another detail: The two PDFs that I want to convolve represent different uncertainties on one observable, i.e. they have the same mean value. When convolving the PDFs with a non-zero mean, the resulting PDF will not only have the combined “width” but also a new, shifted mean. I guess I will have to find a convenient way for transforming x into x- before the convolution…

Cheers,
Sebastian