RooMomentMorphND implementation

Dear Experts,

I have some sets of TH2s representing distributions with two free parameters X and A from MC generation of distinct points in X and A. Now I would like to use RooMomentMorph to generate shapes with intermediate X and A (between points I generated).

I have implemented essentially this:

``````*X1500a50pdf = RooHistPdf("X1500a50pdf", "X1500a50pdf", RooArgSet(X,a), X1500a50, 3)* #Created from the TH2s
*X2500a50pdf = RooHistPdf("X2500a50pdf", "X2500a50pdf", RooArgSet(X,a), X2500a50, 3)*
*X1500a30pdf = RooHistPdf("X1500a30pdf", "X1500a30pdf", RooArgSet(X,a), X1500a30, 3)*
*X2500a30pdf = RooHistPdf("X2500a30pdf", "X2500a30pdf", RooArgSet(X,a), X2500a30, 3)*

*d_X = RooBinning(1, 1000.,4000.)*
*d_a = RooBinning(1, 110.,120.)*
*Grid = RooMomentMorphND.Grid(d_X,d_a)*
*morph = RooMomentMorphND("morph", "morph", RooArgList(X,a), RooArgList(X,a), Grid, RooMomentMorphND.Linear) # not clear to me why I have input the grid axes twice, or what these inputs represent.*
``````

But am not clear on how to get a TH2 (or equivalent RooFit object) for some fixed new X and A. For example if I wanted X2000A50 I would be on point 0.5,1 of the Grid… but how do I ask for this and what it the output?

Thanks,

• Marc

Hi Marc,

firstly, is it `RooMomentMorphND::Grid2`? I don’t see anything that’s called `Grid` in `RooMomentMorphND`.

If I see correctly (first time I look at this), you can just set up a different binning with e.g. three bins in X and A. Then, when you add the PDFs, you use the bin numbers [0, 1, 2] to denote which PDF represents which bin.

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