|Message: Deposited energy incorrectly saved||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Geant4 does not seem to save tracking data correctly depending on the statistics. Here is what is happening.
I want to save all the hits generated by an incoming particle in a Sensitive Detector, i.e. position and deposited energy at every step of all the photons/electrons from a primary photon. I have tried with Detector Hits and also to directly register values into Ntuples at every step: the two methods give the same results (as expected). The geometry is extremely simple: a block of silicon in vacuum, with primaries shot directly at it. I use 10 keV photons as primary particles and the Shielding_EMZ physics list.
If the number of primaries is below ~2000, everything is fine, i.e. if I sum up all the energies deposited in the same event (event ID is recorded as well), I always get 10 keV within rounding error (file 2000_10keV_fromfile.png). However, if the statistics is further increased, say to 2700, something strange starts to happen, as the sum of the deposited energies from a same event DOES NOT necessarily add up to 10 keV: it may be lower or even higher (file 2700_10keV_fromfile.png). As I said previously, I tried different methods but the result is always the same.
The curious thing is that if I take the data not from the output root file but from the command line (i.e. I print the deposited energy and event number at every step on the screen and redirect the output to a text file), the sum is correct again (file 2700_10keV_fromscreen.png). So it is really the data that are incorrectly saved in the file. It is also worth noting that if I compute the sum in the simulation (i.e. I simulate a calorimeter), the value is fine: the problem is when I save the values in each step.
Has anyone ever encountered something like this? Can anyone share some thoughts about it?
Attachment: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2019/01/22/05.40-65775-2000_10keV_fromfile.png http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2019/01/22/05.40-71868-2700_10keV_fromfile.png http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2019/01/22/05.40-33372-2700_10keV_fromscreen.png
|Inline Depth:||Outline Depth:||Add message:|