Template histograms morphing with RooIntegralMorph

Dear all,

questions at the bottom, here I explain the situation:

I have, let’s say
TH1D H0(x),H1(x)
and I get the corresponding
RooHistPdf PDF0(x), PDF1(x)

I want to use linear interpolation between PDF0(x) and PDF1(x) but my problem is that RooIntegralMorph treats them as continuous functions rather than histograms.

This means that the output PDF(x,alpha), with alpha the shape interpolating parameter,is a continuous function of x, while I would like something like a step function of x.

I found a trick to override that problem by using an appropriate granularity, printing the 2D histogram of PDF(x, alpha) and converting it to RooHistPdf.

I do not go in further detail because the questions I have are quite generic.

My questions are:

  1. Is there a way to use the morphing technique directly on histograms? I have the feeling it would be more efficient for my purposes.

  2. If not, are there other ways other than the one I used to produce a step function as an output of the RooIntegralMorph? Can I somehow force RooIntegralMorph not to do any interpolation on x?

Cheers and thanks in advance,
Orso Iorio