Re: problem of changing parameter of a TF1

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Fri, 2 Dec 2011 00:51:44 +0100


Hi,

somebody investigated the problem. It seems that there is no link with roofit actually...

The preliminary conclusion would be (?) that : (i put conditional everywhere : so if an author of root could confirm (or say the opposite), it would help)

when one does a fit on a TH1 and save the histo to a root file, there would be (?) no more possibility to "directly" rescale the function associated to the histogram.

so that the only possibility (?) if one has done a fit of an histogram and saved it to a .root file, and would like to rescale it afterwards would be (?)   the painful procedure of :

i) read the individual parameters of the function associated to the TH1 in the root file ii) create a new TF1 and copy the previous parameters to this new function iii) change the normalization of the function iv) change the normalization of the histogram v) delete the initial function associated to the histogram (that do not follow the rescaling) because it seems (?) that there is no way to draw a histogram that has a function associated to it without drawing the fit associated ?

Could you tell my mistakes in the previous attempt of understanding ?

Are there special tricks ?

Thanks a lot for your help





On Thu, 1 Dec 2011, Marc Escalier wrote:

> Hello,
>
> (using root 5.30 for example)
>
> i occur a problem with a basic minimum example where the parameter of a TF1
> (that is fine) is changed, but when drawn, nothing change.
>
> actually, this function has been created from a RooAbsPdf transformed to a
> TF1, via the asTF(...) method. So it may be the main problem
>
> the minimum example is here
> /afs/in2p3.fr/home/e/escalier/public/test
>
> From the print in the example, we see that everything looks as if the change
> of one of the parameter (here the amplitude) is "understood", but when
> drawing it, it "forgets" this
>
> thanks for any advice
>
> (i asked to colleagues who didn't success before to ask here)
>
>
Received on Fri Dec 02 2011 - 00:51:50 CET

This archive was generated by hypermail 2.2.0 : Fri Dec 02 2011 - 23:50:02 CET