A question about TProfile(2D) errors

Hello,

I have a question: what is the error returned by TProfile::GetBinError when there is only one entry in the bin? I have a TProfile2D and when I have only one entry I got 0 as error while in the reference guide I found a section which says that it will be the average of the errors of all the other bins and another section which tells me it will be sqrt(Y)/SQRT(N). What should I trust?
Thanks

                                        Andrea

p.s. In general, is there a way to get the full information of a bin in a TProfile(2D), like sum, sum2, …? I have to “add” TProfiles but I cannot use TProfile::Add since the bin I have to combine are not the same in all the TProfiles (bin n is TProfile 1 to be added to bin n+1 in TProfile 2,…)
p.p.s. Is there a way to get the TProfile slices out of a TProfile2D? TH2D::ProfileX(Y) does not work.

Hi Andrea ,

in the documentation,see root.cern.ch/root/htmldoc/TProfi … etBinError

You need then to call TProfile::Approximate to have it enabled.

For your second question

I agree that it would be nice to have some functions returning the statistical bin quantities . We are in the process of improving the TProfile classes, and we could also add these new methods.

For the third question:

You can use :

profile2D->ProjectionXY()->ProfileX()

Ciao

Lorenzo