History-by-history method in command-based scoring

Hello everyone!

I hope everyone had a nice Holiday and my best wishes for this 2024. I want to ask you guys something. I am trying to use the command-based scoring method, but the output file only contains the quantity of interest per voxel. Does anyone know if the history-by-history method can be used with command-based scoring or has anyone implemented it using this method? How do you deal with the uncertainties for each voxel?

Thank you in advance!

Dear Victor,

Sorry for late response… I think the example extended/runAndEvent/RE03 may help to do this job. Here, the event maps store variables of type G4StatDouble, and by means of class G4VScoreWriter, you may print out the sum_wx and sum_wx2 of the additive quantity per event, which is what you need to calculate uncertainties with the history-by-history method.

Please check this out, I hope this helps. Regards,