I want to save the spectrum of deposited energy in a detector.
I was able to create a histogram with a constant step size and I would like to know if it is possible to use a histogram in which energy values are specified for each bin. So as to obtain the spectrum based on a energy calibration of the detector (with energy bins unequally spaced).
These are the lines of code I use.
G4double EdepStep = aStep->GetTotalEnergyDeposit();
if (EdepStep > 0.) fEventAction->AddEdep(EdepStep);
In Analysis.hh I included g4csv.hh to save the histogram in a csv file.
I am using geant4-10-06-patch-02.