# Q Garfield++ Example/RPC: Issues with Small Avalanche Size and Single Gas Gap Avalanche

**URL:** <https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661>\
**Category:** Garfield++\
**Created:** [June 3, 2025, 7:51am UTC](https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661 "2025-06-03T07:51:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaiSun](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kaisun/32/38295_2.png) [@KaiSun](https://root-forum.cern.ch/u/KaiSun)\
**Post date:** [June 3, 2025, 7:51am UTC](https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661/1 "2025-06-03T07:51:39Z")

</div>

Dear Garfield++ Community,

I am working on the Garfield++ Example/RPC and encountered an issue while running the simulation. Initially, I got the following error:

```auto
TrackHeed::NewTrack:
    No ionisable medium at initial position.

```

This seemed to occur because the particle source was defined at the RPC edge (`track.NewTrack(0, totalThickness, 0, 0, 0, -1, 0);`), where no ionizable medium exists, resulting in no avalanche particles. I modified the starting position to:

```auto
double ystart = dMylar + dWindow + 0.9 * dGas;
track.NewTrack(0, ystart, 0, 0, 0, -1, 0);

```

This resolved the error, and avalanches appeared. However, I still observe two issues:

1. The avalanche size and total induced charge are very small, e.g., `Final avalanche size = 31`, `Total induced charge = -4.32227e-05 [fC]`.
2. The avalanche is confined to a single gas gap (where the particle is generated, y-axis: 0.155–0.18 cm).

A typical output is as follows:

```auto
MediumMagboltz::ComputePhotonCollisionTable:
    Photoabsorption cross-section for iC4H10 not available.
    Using n-butane cross-section instead.
Sensor::AddElectrode:
    Added readout electrode "ReadoutPlane".
    All signals are reset.
Sensor::SetTimeWindow: Resetting all signals.
AvalancheGrid::GetParameters:
    Electric field = (0, 58.5182, 0) [kV/cm].
    Townsend = 470.429 [1/cm], Attachment = 74.9058 [1/cm], Velocity = -0.0143166 [cm/ns].
Switching to grid based method.
AvalancheGrid::StartGridAvalanche: Starting grid based simulation with 1 initial electrons.
AvalancheGrid::StartGridAvalanche: Final avalanche size = 31 ended at t = 0.554228 ns.
Script: Electrons have drifted. It took 0.106421s to run.
Sensor::ExportSignal: File 'Signal.csv' exported.
Sensor::ExportSignal: File 'Charge.csv' exported.
Script: Total induced charge = -4.32227e-05 [fC].

```

Could anyone provide insights into why the avalanche size is small and why it’s limited to a single gas gap? Thanks a lot for the suggestions.

Thank you for your help!

Best regards,  
Kai Sun

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [June 3, 2025, 12:46pm UTC](https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661/2 "2025-06-03T12:46:29Z")

</div>

hi let me add in the loop @hschindl

---

<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:** [June 5, 2025, 4:25am UTC](https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661/3 "2025-06-05T04:25:52Z")

</div>

Hi,  
by default, `TrackHeed` will stop simulating a track as soon as it encounters an inactive medium. Can you add a line

```cpp
track.CrossInactiveMedia(true);

```

to your program (to the part where you set up HEED)? With this option enabled, the track should continue through the resistive layers and produce ionization in all gas gaps.

---

<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 19, 2025, 4:26am UTC](https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661/4 "2025-06-19T04:26:04Z")

</div>

Closed on June 19, 2025, 4:26am UTC

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