Saving the weight values of the photons after bremsstrahlung splitting

Hello everyone,

I have been trying to do bremsstrahlung biasing on the photons generated in an x-ray tube for my project using a simple macrofile based command mentioned in Physics Processes — Book For Application Developers 11.1 documentation

Using that I basically do something like:
/process/em/setSecBiasing eBrem target 10 100 MeV as brought in the above mentioned link.

I save the photons generated leaving my x-ray tube in terms of energy, position and momentum in a phase space file. I was wondering how I should go about getting these photon weights and saving them in the phase space file. These are secondary particles split from the primary electrons as you know. Your input is much appreciated.
Thank you,
-A

G4Track has GetWeight() that might be helpful… can you append that as an additional quantity in the phase space file?

I think I might be able to and then use it in the uncertainty calculations. However, I am not fully clear on that yet.