Re: [ROOT] TGraph divide

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Jul 23 2004 - 11:33:26 MEST


Hi Tancredi,

We do not have a TGraphErrors::Divide function. However, after some gymnastic,
you should be able to do the job via TGraphAsymmErrors::BayesDivide
or the corresponding TGraphAsymmErrors constructor.
See the description of this function at:
http://root.cern.ch/root/htmldoc/TGraphAsymmErrors.html#TGraphAsymmErrors:BayesDivide

You will have to transform your TGraphErrors to histograms before using this
function.
A direct interface TGraphAsymmErrors::Divide taking two TGraphs as input
could be implemented.
I am ccying this mail to Andy Haas the author of BayesDivide.
Andy, would you like to implement TGraphAsymmErrors::Divide ?

Rene Brun

Tancredi Carli wrote:
> 
>  Hello,
> 
>   I have two objects of type TGraphErrors, let's say TG1 and TG2
>  and I would like to divide them, e.g. TG3=TG1/TG2 and get
>  the correct error treatment. Is there an function for this
>  operation which I overlooked ?
> 
>  ..or do I have to get the values at each point by GetPoint
>  make the division, calculate the error, create new objects
>  and set the points ?
> 
>  Thank you for you help.
> 
>              Tancredi Carli
> 
> --
> 
> +-------------------------------------------------------------------+
> |  Tancredi Carli                     tancredi.carli@cern.ch        |
> |  CERN, Division EP                  phone  ++41 22 767 9606       |
> |  CH-1211 Geneva 23                  Room   40-1-C06               |
> +-------------------------------------------------------------------+



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET