Retracting primary particles from a root tree

Hi everyone,

I have a question regarding my data that is stored in root trees. In my simulations, I start from electrons and I score bremsstrahlung photons somewhere at the outer layer of my x-ray tube. I get output root files from each simulation which is done in a computing cluster and then merge the root files into one combined root file to use it in further analysis and simulations. For a part of my calculations I need my x-ray tube efficiency. However, I do not know if all my simulations (I have more than 2000 of iterations each with 1000000 particles.) complete and all my root trees supposedly contain all the data from 1000000 initiated electrons, and because I score only the photons, I don’t have any apparent data that show me if all the simulations ran completely and I have the spectrum of photons generated from 1000000 electrons. I was wondering if you guys know of any way I could retract the number of particles started.

Thank you!

I am not sure what you mean by “retract”. May be @pcanal has an idea.

Retract = retrieve?

You seems to be saying: " I start from electrons … [looking for] the number of particles started." and also “all my root trees supposedly contain all the data from 1000000 initiated electrons” So it would be the total number of “initial” electrons in the TTree.

However, I do not know in your TTree there is also produced electrons. If there is no produced electrons then all you need to do is count the number of electrons. If there is produced electrons, you can get your answer only if there is some marker to distinguish the generated from the initial electrons.

Thank you, but I start from electrons and I score and save the generated photons by those electrons. What I store in the files are not the electrons. That is why I am wondering about retrieving.

Thank you

Yes. I mean I score the bremsstrahlung and characteristic photon phase spaces and save them in root trees, but not the primary electrons. Is there a way to be able to know how many electrons generated those spectra?

I am not sure, that depends on what information you actually stored in the file (but it sounds unlikely).