Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
I am trying to get the neutron spectrum in a vacuum detector, so I plot the initial energy of the incedent neutron.
In the steeping action I called the kinetic energy of the particle (neutron) and I can see the correct energy.
But when I try to transport it to the event action at the ned of each event, it does not work. it copile but without correct energy. the registered energy is zero (initial energy)
I have attached the stepping action and event action files that I use.
can anyone help me in this issue
EventAction.cc (3.7 KB)
SteppingAction.cc (5.8 KB)
EventAction.hh (2.6 KB)
SteppingAction.hh (2.5 KB)