# Can Garfield + + simulate the number of electrons or ions absorbed on each electrode?

**URL:** <https://root-forum.cern.ch/t/can-garfield-simulate-the-number-of-electrons-or-ions-absorbed-on-each-electrode/50054>\
**Category:** Garfield++\
**Created:** [May 22, 2022, 8:47am UTC](https://root-forum.cern.ch/t/can-garfield-simulate-the-number-of-electrons-or-ions-absorbed-on-each-electrode/50054 "2022-05-22T08:47:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![changjh12](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/cc9497/32.png) [@changjh12](https://root-forum.cern.ch/u/changjh12)\
**Post date:** [May 22, 2022, 8:47am UTC](https://root-forum.cern.ch/t/can-garfield-simulate-the-number-of-electrons-or-ions-absorbed-on-each-electrode/50054/1 "2022-05-22T08:47:13Z")

</div>

Hello  
Can Garfield + + simulate the number of electrons or ions absorbed on each electrode? For example, there are three electrodes on the drift track of electrons in the detector. I want to know the number of electrons absorbed on each electrode.  
Or can I only know the induced charge of each electrode to calculate the number of electrons collected?

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [May 23, 2022, 4:49am UTC](https://root-forum.cern.ch/t/can-garfield-simulate-the-number-of-electrons-or-ions-absorbed-on-each-electrode/50054/2 "2022-05-23T04:49:43Z")

</div>

Hi,  
yes, absolutely. There is no predefined function for this, but you can retrieve the endpoints of the electrons using `GetElectronEndpoint` (see [Examples/Gem/gem.C · master · garfield / garfieldpp](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/Gem/gem.C#L116) for an example) and determine based on the coordinates (and status code) at which electrode they arrived.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [June 6, 2022, 4:50am UTC](https://root-forum.cern.ch/t/can-garfield-simulate-the-number-of-electrons-or-ions-absorbed-on-each-electrode/50054/3 "2022-06-06T04:50:37Z")

</div>

Closed on June 6, 2022, 4:50am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
