# Need Help with Simulating Electron Avalanche

**URL:** <https://root-forum.cern.ch/t/need-help-with-simulating-electron-avalanche/40630>\
**Category:** Garfield++\
**Created:** [July 25, 2020, 9:48am UTC](https://root-forum.cern.ch/t/need-help-with-simulating-electron-avalanche/40630 "2020-07-25T09:48:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khang\_Pham](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/khang_pham/32/19369_2.png) [@Khang\_Pham](https://root-forum.cern.ch/u/Khang_Pham)\
**Post date:** [July 25, 2020, 9:48am UTC](https://root-forum.cern.ch/t/need-help-with-simulating-electron-avalanche/40630/1 "2020-07-25T09:48:48Z")

</div>

I need some help with creating electron avalanches. At the moment, I am able to simulate and plot electron avalanches from a track of proton. As shown in the picture below:

 ![Garfield](https://root-forum.cern.ch/uploads/default/original/3X/6/2/627448950b539e9260b758d4884bd2a6292a3009.png)

From what I can understand by tinkering with the Gem example, the green dots seem to represent where the avalanche start?

If so, is there another way to represent the electron avalanches? For example, can I turn them into drift lines but with a different color to distinguish them from the primary electrons?

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 27, 2020, 9:11am UTC](https://root-forum.cern.ch/t/need-help-with-simulating-electron-avalanche/40630/2 "2020-07-27T09:11:12Z")

</div>

Hi @Khang_Pham,  
I bet the Garfield developers, e.g. @hschindl, can help you out!

Cheers,  
Enrico

---

<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:** [July 27, 2020, 12:21pm UTC](https://root-forum.cern.ch/t/need-help-with-simulating-electron-avalanche/40630/3 "2020-07-27T12:21:57Z")

</div>

Hi,  
sorry for my late reply. The green dots represent the points where an excitation happens. You can switch them off by calling the function `EnableExcitationMarkers(false)` of `AvalancheMicroscopic`.  
If you understand your other question correctly, you want to plot the drift lines of the initial electron and those of the secondary electrons produced in the avalanche using different colors? That’s not really possible out of the box at the moment, but it shouldn’t be too hard to implement.  
What you could do as a “hack” is to retrieve the coordinates of the initial/“primary” electron (using `AvalancheMicroscopic::GetElectronDriftLinePoint`, the initial electron is normally the one with index 0, but better check), and then plot it yourself on top of the other drift lines…

---

<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:** [August 10, 2020, 12:21pm UTC](https://root-forum.cern.ch/t/need-help-with-simulating-electron-avalanche/40630/4 "2020-08-10T12:21:58Z")

</div>

Closed on August 10, 2020, 12:21pm UTC

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