Creating Array from Histograms

Hi there,

I have a couple of root LET files from GEANT4, and I want to create arrays with the histograms.

Currently I know how to get the Mean for example:

TFile *file1=new TFile("GCR_Pb208.root");
TTree *tree1 = (TTree*)file1->Get("LET_Box_tuple_LET");

TH1F *hist1 = gDirectory->Get("hist1");
Stopping_Power_Matrix[i][j][k] = hist1->GetMean();

Instead of this, I looking for how to create an array with all the LET values, so I can compare with others.

What would be the most efficient way to do this?

Thank you in advance.

I guess the following example may help you:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.