# TProfile2D mean of all bins

Dear all,
how do I get the average of all bins in a TProfile2D, please?
My case is the following: I have a 2 efficiency map, let’s say 10x10 bins. Each bin contains
the efficiency for a certain position. How do I get the average efficiency over the entire map, please?
Shall I simply use TProfile2D::GetMean()? But I see the default option is axis=1 which means average with respect to X axis.

Many thanks in advance and kind regards,
Marco Bomben

I might be wrong but what about using GetSumOfWeights divided by the number of bins ?

Yes, this is correct, it is the simplest solution.