# Question on the total deposited charge

**URL:** <https://allpix-squared-forum.web.cern.ch/t/question-on-the-total-deposited-charge/73>\
**Category:** Simulation / Configuration Questions\
**Created:** [July 24, 2019, 4:31pm UTC](https://allpix-squared-forum.web.cern.ch/t/question-on-the-total-deposited-charge/73 "2019-07-24T16:31:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iguaz](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/i/aeb1de/32.png) [@iguaz](https://allpix-squared-forum.web.cern.ch/u/iguaz)\
**Post date:** [July 24, 2019, 4:31pm UTC](https://allpix-squared-forum.web.cern.ch/t/question-on-the-total-deposited-charge/73/1 "2019-07-24T16:31:19Z")

</div>

Hi everybody,

I have a simple question related to the output plot “deposited charge per event” that is created in the module DepositionGeant4 of Allpix2.

I was wondering if the deposited charge counts both electrons and holes.

I’m simulating gamma of different energies (source\_energy = 10, 20, 40 keV) and I always get twice the number of electrons, supposing that

source\_energy (in keV) = charge\_creation\_energy (in eV) x deposited\_charge (in ke-)

Many thanks in advance for your feedback. If necessary, I can provide my .conf file.

Cheers,

Paco

---

<div class="post-metadata">

**Author:** ![pschutze](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pschutze](https://allpix-squared-forum.web.cern.ch/u/pschutze)\
**Post date:** [July 25, 2019, 7:58am UTC](https://allpix-squared-forum.web.cern.ch/t/question-on-the-total-deposited-charge/73/2 "2019-07-25T07:58:56Z")

</div>

Hi Paco,

the _deposited charge per event_ indeed counts both electrons and holes. Furthermore, as the name says, the charge is summed up for all particles (`number_of_particles`) in that event.

You can see that e.g. if you compare this plot to the plot `cluster_charge` in the `DetectorHistogrammer`.

Cheers  
Paul

---

<div class="post-metadata">

**Author:** ![iguaz](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/i/aeb1de/32.png) [@iguaz](https://allpix-squared-forum.web.cern.ch/u/iguaz)\
**Post date:** [July 25, 2019, 2:28pm UTC](https://allpix-squared-forum.web.cern.ch/t/question-on-the-total-deposited-charge/73/3 "2019-07-25T14:28:23Z")

</div>

Many thanks, Paul, for your answer.

Paco
