# How to get the position signal of the proton

**URL:** <https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266>\
**Category:** Garfield++\
**Created:** [January 5, 2022, 12:19pm UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266 "2022-01-05T12:19:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [January 5, 2022, 12:19pm UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/1 "2022-01-05T12:19:13Z")

</div>

I want to get the position signal of the proton , it is like the Gauss distribution.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 5, 2022, 1:05pm UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/2 "2022-01-05T13:05:38Z")

</div>

I guess @hschindl can help.

---

<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:** [January 5, 2022, 1:38pm UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/3 "2022-01-05T13:38:59Z")

</div>

It depends on the readout scheme of your detector and how you do the position measurement.

The simplest approach would be something like this:

- For each cluster along a track, calculate the electron and/or ion drift lines and determine the electrode at which they end up.
- Count the number of electrons/ions arriving at each electrode (= integrated collected charge at each electrode).
- Calculate the measured coordinate using the collected charges and fill a histogram.
- Repeat the same steps for each track.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [January 6, 2022, 1:18am UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/4 "2022-01-06T01:18:04Z")

</div>

Hi，  
Thanks a lot for your reply and detail explanation  
These procedure seem a little bit hard for me  
Is there any examples for reference  
The problem that the TRIM result notice killed error is still not solved, I will try to solve and would you please help to find the reason.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [January 6, 2022, 1:18am UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/5 "2022-01-06T01:18:44Z")

</div>

Hi,  
Thanks a lot for your reply and help.

---

<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:** [January 6, 2022, 1:33pm UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/6 "2022-01-06T13:33:18Z")

</div>

I’m afraid I probably don’t have a ready-made example that matches exactly your application (also I’m not 100% sure what you want to simulate), but I’ve just added a simple example that illustrates how to simulate drift lines from a “TRIM track”:

> **[Examples/Srim/trimsignal.C · master · garfield / garfieldpp](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/Srim/trimsignal.C)**
>
> http://garfieldpp.web.cern.ch/garfieldpp/

You can remove/ignore the part concerning the weighting field/potential and the calculation of the induced current if you don’t need it.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [January 6, 2022, 3:09pm UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/7 "2022-01-06T15:09:36Z")

</div>

Hi,  
Thanks a lot for your reply and help  
The example is helpful and I want to get the current and proton position signal to compare which is the optimization result when I change different gas in the same condition.  
My model is imported from the ansys ,I know it would be more complicated, a new weight lis files and maybe a transfer function to calculate the current ,So I will try to figure it out.  
Thanks again

---

<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:** [January 20, 2022, 3:09pm UTC](https://root-forum.cern.ch/t/how-to-get-the-position-signal-of-the-proton/48266/8 "2022-01-20T15:09:53Z")

</div>

Closed on January 20, 2022, 3:09pm UTC

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