# How to set charge/cluster density along the track manually?

**URL:** <https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422>\
**Category:** Garfield++\
**Created:** [December 6, 2023, 3:35pm UTC](https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422 "2023-12-06T15:35:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hua-Zhen\_Li](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hua-zhen_li/32/27088_2.png) [@Hua-Zhen\_Li](https://root-forum.cern.ch/u/Hua-Zhen_Li)\
**Post date:** [December 6, 2023, 3:35pm UTC](https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422/1 "2023-12-06T15:35:11Z")

</div>

Dear Garfield++ experts,

Hello!

As described in title, what I am trying to do is setting the charge/cluster density at different positions along the track manually (I am simulating the detector response to a Two Photon Absorption (TPA) event in Diamond/silicon detector, and we have the data of generated charge density along the track from experiment), is that possible somehow?

I found that “TrackSimple” allows for a manual setting of charge density, but that density is constant along the track: If I can set the length of tracks manually, a series of short tracks connected tail-to-head may also be a mimic of a track with changing charge density… Is this possible?

@hschindl Thanks for your help!

Cheers  
Huazhen

---

<div class="post-metadata">

**Author:** ![mdessole](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mdessole/32/34021_2.png) [@mdessole](https://root-forum.cern.ch/u/mdessole)\
**Post date:** [December 6, 2023, 4:13pm UTC](https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422/2 "2023-12-06T16:13:51Z")

</div>

Hi @Hua-Zhen_Li,  
thanks for reaching out!  
To my understanding, your question is more related to Garfield++ rather than ROOT.

Cheers,  
Monica

---

<div class="post-metadata">

**Author:** ![Hua-Zhen\_Li](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hua-zhen_li/32/27088_2.png) [@Hua-Zhen\_Li](https://root-forum.cern.ch/u/Hua-Zhen_Li)\
**Post date:** [December 7, 2023, 12:26pm UTC](https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422/3 "2023-12-07T12:26:00Z")

</div>

Ahh Sorry for the mistake (I forgot to check before posting), and thanks for editing the region to Garfield.

Huazhen

---

<div class="post-metadata">

**Author:** ![mdessole](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mdessole/32/34021_2.png) [@mdessole](https://root-forum.cern.ch/u/mdessole)\
**Post date:** [December 7, 2023, 2:49pm UTC](https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422/4 "2023-12-07T14:49:56Z")

</div>

I think that @hschindl can help with this!

---

<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:** [December 7, 2023, 9:00pm UTC](https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422/5 "2023-12-07T21:00:03Z")

</div>

Hi,  
yes, you can place electron/hole pairs manually. Just simulate electron and hole drift lines from a set of coordinates along your track. If there is a specific distribution or physics model that you have in mind, we can also try to implement a dedicated function for that…

---

<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:** [December 21, 2023, 9:00pm UTC](https://root-forum.cern.ch/t/how-to-set-charge-cluster-density-along-the-track-manually/57422/6 "2023-12-21T21:00:25Z")

</div>

Closed on December 21, 2023, 9:00pm UTC

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