# Issues encountered when running the RPC example

**URL:** <https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422>\
**Category:** Garfield++\
**Created:** [November 20, 2025, 3:25am UTC](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422 "2025-11-20T03:25:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Whisper](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/w/278dde/32.png) [@Whisper](https://root-forum.cern.ch/u/Whisper)\
**Post date:** [November 20, 2025, 3:25am UTC](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422/1 "2025-11-20T03:25:04Z")

</div>

Hello!

I encountered an issue while running the Garfield++ RPC example.[https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/RPC/Weight.C?ref\_type=heads](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/RPC/Weight.C?ref_type=heads)

A typical output is as follows:

> ComponentParallelPlate::Setup: Geometry with N = 15 layers set.
> 
> ComponentParallelPlate::AddPlane: Added plane electrode.  
> MediumMagboltz::LoadGasFile:  
> Reading file c2h2f4\_ic4h10\_sf6.gas.  
> Version 12.  
> Gas composition set to iC4H10/SF6/C2H2F4 (5/5/90).
> 
> MediumMagboltz::Mixer:  
> 4000 linear energy steps between 0 and 40 eV.
> 
> ISO-C4H10 2014 ANISOTRPI  
> mass: 58.1234 amu  
> ionisation threshold: 10.67 eV  
> 24 inelastic terms (15 excitations, 4 superelastic, 5 other)
> 
> SF6 2014 ANISOTROPIC  
> mass: 146.055 amu  
> ionisation threshold: 15.67 eV  
> 35 inelastic terms (25 excitations, 3 superelastic, 7 other)
> 
> C2H2F4 2024 ANISOTROPIC  
> mass: 102.031 amu  
> ionisation threshold: 13.2 eV  
> 19 inelastic terms (10 excitations, 4 superelastic, 5 other)
> 
> MediumMagboltz::Mixer:  
> Lowest ionisation threshold in the mixture: 10.67 eV (iC4H10)
> 
> MediumMagboltz::Mixer:  
> Energy [eV] Collision Rate [ns-1]  
> 2.50 5031.70  
> 7.50 7456.63  
> 12.50 9896.64  
> 17.50 11216.71  
> 22.50 11556.15  
> 27.50 11744.82  
> 32.50 13207.83  
> 37.50 14634.13  
> 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.  
> Sensor::SetArea: Warning. Infinite x-range.  
> Sensor::SetArea: Warning. Infinite z-range.  
> terminate called after throwing an instance of ‘Garfield::Exception’  
> what(): No ionisable medium at initial position in NewTrack at /home/whisper/garfield/vNew/source/garfieldpp/Source/TrackHeed.cc:99:0  
> Aborted (core dumped)

I saw in the post that you can add this line of code.[https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661/3?u=whisper](https://root-forum.cern.ch/t/q-garfield-example-rpc-issues-with-small-avalanche-size-and-single-gas-gap-avalanche/63661/3)

> track.CrossInactiveMedia(true);

However, this has not resolved the aforementioned issues. Have I overlooked any crucial points?

Thank you for taking the time to address my concerns.

Best regards,

Sibo Wang

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [November 20, 2025, 7:19am UTC](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422/2 "2025-11-20T07:19:54Z")

</div>

Welcome to the ROOT Forum!  
I think @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:** [November 22, 2025, 6:09pm UTC](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422/3 "2025-11-22T18:09:00Z")

</div>

Hi,  
apologies for the late reply and thanks a lot for reporting this issue! You didn’t overlook anything, the example needed an update. I’ve just pushed a fix:

> **[RPC example (!561) · Merge requests · garfield / garfieldpp · GitLab](https://gitlab.cern.ch/garfield/garfieldpp/-/merge_requests/561)**
>
> Set the starting point of the track inside the first gas layer (thanks to Sibo Wang for reporting the issue).

Can you try changing the line

```cpp
track.NewTrack(0, totalThickness, 0, 0, 0, -1, 0);

```

to

```cpp
 track.NewTrack(0, totalThickness - dMylar - dWindow, 0, 0, 0, -1, 0);

```

and add a line

```cpp
track.CrossInactiveMedia(true);

```

Let me know…

---

<div class="post-metadata">

**Author:** ![Whisper](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/w/278dde/32.png) [@Whisper](https://root-forum.cern.ch/u/Whisper)\
**Post date:** [November 24, 2025, 3:18am UTC](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422/4 "2025-11-24T03:18:23Z")

</div>

Thank you for your assistance; the issue has been successfully resolved!

---

<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 8, 2025, 3:19am UTC](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422/5 "2025-12-08T03:19:08Z")

</div>

Closed on December 8, 2025, 3:19am UTC

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