2D integration of discrete data

Hi fellows,

The objective is to integrate a quantity (dose) over a given ‘voxel’ geometry in 3D. The data looks like this:

X Y Z dose_value
0 0 0 1.4
1 0 0 0.5
2 0 0 0.08

10 0 0 0.7

The desired output would be: dose_value versus Z (or X or Y, i.e. 1D) integrated over the two other dimensions X and Y. A histogram representation can be a solution.

Any pointers / ROOT tools to solve this will be much appreciated. Thanks.

have a look a TH2::Integral(), should suit your needs.