Message: Deposited energy incorrectly saved Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Deposited energy incorrectly saved 

Forum: Analysis
Date: Jan 22, 05:43
From: <fceraudo>

Hello everyone,

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?

Thank you.



Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Deposited energy incorrectly saved   (Ivana Hrivnacova - Jan 23, 03:19)
(_ None: Re: Deposited energy incorrectly saved   (fceraudo - Jan 24, 09:02)
(_ None: Re: Deposited energy incorrectly saved   (Ivana Hrivnacova - Jan 25, 07:59)
(_ None: Re: Deposited energy incorrectly saved   (fceraudo - Jan 26, 01:28)
(_ None: Re: Deposited energy incorrectly saved   (Ivana Hrivnacova - Jan 28, 03:02)
 Add Message Add Message
to: "Deposited energy incorrectly saved"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]