Hello all!
I have trouble when I manually parse the “.csv” file with a 2D histogram. Unfortunately, I have not found any information about “.CSV” file format in the official GEANT4 documentation. I hope in future versions somebody will add it.
I create analysis manager in a standard way:
…
using G4AnalysisManager = G4CsvAnalysisManager;
G4int id2d2 = man->CreateH2(“X_Y”, “Energy distribution X-Y plane (cm, MeV)”, 200, -1, 1, 500, 0., 5.);
…
at the end, I get file which contains data like this:
#class tools::histo::h2d
#title Energy distribution X-Y plane (cm, MeV)
#dimension 2
#axis fixed 200 -1 1
#axis fixed 500 0 5
#planes_Sxyw -1.71347
#annotation axis_x.title
#annotation axis_y.title
#bin_number 101404
entries,Sw,Sw2,Sxw0,Sx2w0,Sxw1,Sx2w1
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
0,0,0,0,0,0,0
…
How correctly restore grid of X, Y - axis from this data and find corresponding Z value?