1D histogram isn't created

Hi,

I am trying to produce and fill a 1D histogram with the energy deposited in my sensitive detector. I am creating the histogram in my run action constructor and filling from my energy deposition in my SD constructor. My code compiles and prints the energy deposition and cell ID however there is no histogram produced. I have tried to adapt the B1 example and looked other examples however am unsure as I am new to Geant.

Many thanks!

BeDetectorSD.cc (3.2 KB) BeRunAction.cc (1.7 KB)

Hello,
Your code looks ok. Could you upload the output from a simulation of a few (5) events?
Best regards,

This is a screenshot of my output, energy deposition and cell ID are printed.

This screenshot does not help, as we do not see the debug messages from creating histograms. Could you upload the output in the form of a zipped text file:

./myApplication myMacro >& output.txt
gzip output.txt