Re: [ROOT] TProfile::SetBinError

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Aug 25 2003 - 10:42:57 MEST


Hi Colin,

SetBinError sets the sum of squares of weights in the data structure.
In case of a TProfile, the computation of errors uses this information,
but also the number of entries in a bin.
In general, it does not make much sense to call this function for a TProfile
See the various options for errors in TProfile.

May be what you want to do is the following:
  TH1D *proj = profile->ProjectionX();
  proj->setBinError(...   loop

Rene Brun

Rene Brun

Colin Bernet wrote:
> 
> Hi all,
> 
> I don't understand what is happening when using SetBinError on a TProfile
> .   au->fHxbja1d is a TProfile, and I was expecting SetBinError to set the
> error for the bin, but it does something different :
> 
> root [12] au->fHxbja1d->GetBinError(1)
> (const Stat_t)6.10376002362651021e-04
> root [13] au->fHxbja1d->SetBinError(1,0.1)
> root [14] au->fHxbja1d->GetBinError(1)
> (const Stat_t)1.21475547561875668e-04
> 
> Could somebody explain ?
> 
> I'm using /afs/cern.ch/sw/root/v3.05.07/rh73_gcc2952/root/
> 
> thank you !
> Colin



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET