From this post (see at the end) I see one could scale the pdf before getting TF1 object from it. The relevant lines from this example are given below and I run them and it worked:
double scale_factor = histo->Integral()*histo->GetBinWidth(1);
TString formula = TString::Format("%f * roopdf_gaus",scale_factor);
// create a scaled Gaussian function = scale * Gaus
RooFormulaVar scaled_gaus(“scaled_gaus”,formula,RooArgList(roopdf_gaus) );
TF1 * f_roopdf_gaus = scaled_gaus.asTF(RooArgList(x) ) ;
Now I want to do similar thing but I have a generic pdf defined with 4 parameters and the input histogram with which I want to compare has variable bin width. In the above example the bins are equal so it worked fine but in my case I do not know how to do it for variable bin size?
Thanks for you help in advance,
How to get the maximum of a RooFFTConvPdf?