# Garfield++

**URL:** https://root-forum.cern.ch/c/garfieldxx/25.md?page=1

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

**Page:** 2

---

## [Drift Velocity Calculation in Garfield++](https://root-forum.cern.ch/t/drift-velocity-calculation-in-garfield/64535)

<div class="topic-metadata">

**Author:** [@pedro](https://root-forum.cern.ch/u/pedro)\
**Replies:** 1\
**Last updated:** [December 12, 2025, 7:14am UTC](https://root-forum.cern.ch/t/drift-velocity-calculation-in-garfield/64535 "2025-12-12T07:14:38Z")

</div>

I am currently using Garfield++ to simulate the drift behavior of electrons and ions in gas detectors, and I have a technical question regarding the calculation of drift velocity. As I understand from the Garfield++ doc…

---

## [Periodic conditions with MPGD layout in neBEM](https://root-forum.cern.ch/t/periodic-conditions-with-mpgd-layout-in-nebem/64443)

<div class="topic-metadata">

**Author:** [@gzunica](https://root-forum.cern.ch/u/gzunica)\
**Replies:** 4\
**Last updated:** [December 4, 2025, 11:14am UTC](https://root-forum.cern.ch/t/periodic-conditions-with-mpgd-layout-in-nebem/64443 "2025-12-04T11:14:02Z")

</div>

Dear Experts, I’m trying to simulate a simple alternating strips layout (equally spaced field and sense strips) with neBEM. I would like to implement periodic copies of a basic “cell” to avoid edge effects and reduce c…

---

## [StatusHitPlane VS StatusLeftDriftArea](https://root-forum.cern.ch/t/statushitplane-vs-statusleftdriftarea/64442)

<div class="topic-metadata">

**Author:** [@pigerard](https://root-forum.cern.ch/u/pigerard)\
**Replies:** 4\
**Last updated:** [December 2, 2025, 5:03pm UTC](https://root-forum.cern.ch/t/statushitplane-vs-statusleftdriftarea/64442 "2025-12-02T17:03:56Z")

</div>

Hi, I noticed that the status StatusHitPlane is not privilegied when a particle left the drift medium trough the plane when the sensor area has the same size as the plane. For instance if I have a AddPlaneX with Compone…

---

## [How to get the signal in micromegas geometry?](https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 2\
**Last updated:** [November 29, 2025, 11:00am UTC](https://root-forum.cern.ch/t/how-to-get-the-signal-in-micromegas-geometry/64491 "2025-11-29T11:00:15Z")

</div>

The signal on the anode of micromegas geometry is wanted, but ComponentAnalyticField class object only can have two planes at the y direction, so two ComponentAnalyticField class objects are used, the codes are: MediumM…

---

## [Simulation of boron lined proportional counter considering space charge effect](https://root-forum.cern.ch/t/simulation-of-boron-lined-proportional-counter-considering-space-charge-effect/64438)

<div class="topic-metadata">

**Author:** [@Migu](https://root-forum.cern.ch/u/Migu)\
**Replies:** 5\
**Last updated:** [November 28, 2025, 2:56am UTC](https://root-forum.cern.ch/t/simulation-of-boron-lined-proportional-counter-considering-space-charge-effect/64438 "2025-11-28T02:56:28Z")

</div>

Hi， I saw in an article that when a boron-lined proportional counter is used at high voltage for a period of time, its internal CO2 will be rapidly consumed as a quencher, resulting in a rapid decrease in output pulse a…

---

## [Issues encountered when running the RPC example](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422)

<div class="topic-metadata">

**Author:** [@Whisper](https://root-forum.cern.ch/u/Whisper)\
**Replies:** 3\
**Last updated:** [November 24, 2025, 3:18am UTC](https://root-forum.cern.ch/t/issues-encountered-when-running-the-rpc-example/64422 "2025-11-24T03:18:23Z")

</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 A typical output is as follows: ComponentParallelPl…

---

## [The integrated charge is 0](https://root-forum.cern.ch/t/the-integrated-charge-is-0/64405)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 10\
**Last updated:** [November 19, 2025, 7:55am UTC](https://root-forum.cern.ch/t/the-integrated-charge-is-0/64405 "2025-11-19T07:55:53Z")

</div>

The integrated charge is computed using the gas with pressure of 76. Torr, when changing the charge from negative to positive and filling a TH1D class object, the result is: but when changing the pressure to 760. Tor…

---

## [The run of an application paused](https://root-forum.cern.ch/t/the-run-of-an-application-paused/64409)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 3\
**Last updated:** [November 19, 2025, 12:40am UTC](https://root-forum.cern.ch/t/the-run-of-an-application-paused/64409 "2025-11-19T00:40:41Z")

</div>

The run of an application paused, nothing happened within 18 hours. the output from terminal is: THERMAL MOTION OF GAS NOT INCLUDED ELECTRIC FIELD = 16237.7674 VOLTS/CM. MAGNETIC FIELD = 0.0000 KILOGAUSS. ANGLE B…

---

## [Too many events in electron energy distribution](https://root-forum.cern.ch/t/too-many-events-in-electron-energy-distribution/64392)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 3\
**Last updated:** [November 11, 2025, 9:03am UTC](https://root-forum.cern.ch/t/too-many-events-in-electron-energy-distribution/64392 "2025-11-11T09:03:40Z")

</div>

In the example “GainFluctuations“, for some electric field, the distribution of avalanche size is: and the energy distribution of electrons is: so, the total events from avalanche size are 8.16E+04, but the total…

---

## [A bug that will cause ComponentTcad delayed signal to be NaN](https://root-forum.cern.ch/t/a-bug-that-will-cause-componenttcad-delayed-signal-to-be-nan/64367)

<div class="topic-metadata">

**Author:** [@John\_Leong](https://root-forum.cern.ch/u/John_Leong)\
**Replies:** 3\
**Last updated:** [November 8, 2025, 9:36am UTC](https://root-forum.cern.ch/t/a-bug-that-will-cause-componenttcad-delayed-signal-to-be-nan/64367 "2025-11-08T09:36:33Z")

</div>

Problem locates at function “Garfield::Sensor::AddSignalWeightingField()” in file “Source/Garfield/Sensor.cc”. The for loop start from Line 738 calculates all delayed signal in each electrode. At Line 735, dt may be 0, b…

---

## [Can't get delayed signal from Tcad component by delayed weighting field](https://root-forum.cern.ch/t/cant-get-delayed-signal-from-tcad-component-by-delayed-weighting-field/64361)

<div class="topic-metadata">

**Author:** [@John\_Leong](https://root-forum.cern.ch/u/John_Leong)\
**Replies:** 2\
**Last updated:** [November 8, 2025, 9:34am UTC](https://root-forum.cern.ch/t/cant-get-delayed-signal-from-tcad-component-by-delayed-weighting-field/64361 "2025-11-08T09:34:41Z")

</div>

AvalancheMC class can calculate delayed signal via accepting either dynamic weighting potential or weighting field, however I can’t get delayed signal after setting weighting field. I’ve found where the problem is. T…

---

## [Why 2 ComponentAnalyticField objects are used in the example AliceTPC?](https://root-forum.cern.ch/t/why-2-componentanalyticfield-objects-are-used-in-the-example-alicetpc/64382)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 3\
**Last updated:** [November 8, 2025, 7:23am UTC](https://root-forum.cern.ch/t/why-2-componentanalyticfield-objects-are-used-in-the-example-alicetpc/64382 "2025-11-08T07:23:42Z")

</div>

As the title, Why 2 ComponentAnalyticField objects are used in the example AliceTPC? ComponentAnalyticField cmpe; ComponentAnalyticField cmpi;

---

## [Maybe a bug?](https://root-forum.cern.ch/t/maybe-a-bug/64378)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 3\
**Last updated:** [November 6, 2025, 12:53am UTC](https://root-forum.cern.ch/t/maybe-a-bug/64378 "2025-11-06T00:53:16Z")

</div>

In a Garfield application, the gas(“xe“,90.,”ch4”,10.) is used, in running the application, the memory leak occurs. but when changing xenon to argon, the application run well.

---

## [The magnitudes of induced signal from DriftLineRKF, AvalancheMC and AvalancheMicroscopic class are not consistent](https://root-forum.cern.ch/t/the-magnitudes-of-induced-signal-from-driftlinerkf-avalanchemc-and-avalanchemicroscopic-class-are-not-consistent/64365)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 10\
**Last updated:** [November 4, 2025, 2:33am UTC](https://root-forum.cern.ch/t/the-magnitudes-of-induced-signal-from-driftlinerkf-avalanchemc-and-avalanchemicroscopic-class-are-not-consistent/64365 "2025-11-04T02:33:45Z")

</div>

For same case, DriftLineRKF AvalancheMC and AvalancheMicroscopic classes are used to drift electrons and ions, but the magnitudes of induced signal are not consistent. the signal from DriftLineRKF class is: the sign…

---

## [The error "terminate called after throwing an instance of 'Garfield::Exception' what(): Index out of range in GetElectronEndpoint at /usr/local/garfieldpp-master/Source/AvalancheMC.cc:196:0"](https://root-forum.cern.ch/t/the-error-terminate-called-after-throwing-an-instance-of-garfield-exception-what-index-out-of-range-in-getelectronendpoint-at-usr-local-garfieldpp-master-source-avalanchemc-cc0/64374)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 4\
**Last updated:** [November 3, 2025, 11:37am UTC](https://root-forum.cern.ch/t/the-error-terminate-called-after-throwing-an-instance-of-garfield-exception-what-index-out-of-range-in-getelectronendpoint-at-usr-local-garfieldpp-master-source-avalanchemc-cc0/64374 "2025-11-03T11:37:18Z")

</div>

After a electron avalanche, the ions drift is expected, the code is: mc.AvalancheElectron(xx, yy, zz, tt); double x1,y1,z1,t1,x2,y2,z2,t2; std::size\_t num\_tracks; num\_tracks=mc.GetNumberOfElectronEndpoints(); …

---

## [DriftLineRKF looping indefinitely in MPGD implementation](https://root-forum.cern.ch/t/driftlinerkf-looping-indefinitely-in-mpgd-implementation/64313)

<div class="topic-metadata">

**Author:** [@gzunica](https://root-forum.cern.ch/u/gzunica)\
**Replies:** 7\
**Last updated:** [October 30, 2025, 9:25am UTC](https://root-forum.cern.ch/t/driftlinerkf-looping-indefinitely-in-mpgd-implementation/64313 "2025-10-30T09:25:23Z")

</div>

Dear Experts, I am trying to simulate drift lines with DriftLineRKF in a proof of concept MPGD-like implementation. The geometry consists of two plates (cathode on top, anode on bottom) with a thin dielectric medium on…

---

## [The memory leak occured when transporting electrons and ions using AvalancheMC class](https://root-forum.cern.ch/t/the-memory-leak-occured-when-transporting-electrons-and-ions-using-avalanchemc-class/64316)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 10\
**Last updated:** [October 26, 2025, 8:10am UTC](https://root-forum.cern.ch/t/the-memory-leak-occured-when-transporting-electrons-and-ions-using-avalanchemc-class/64316 "2025-10-26T08:10:53Z")

</div>

I want to show the tracks of electrons and ions using AvalancheMC class. The key codes are: AvalancheMC drift; drift.SetSensor(&sensor); drift.EnablePlotting(&driftView); const unsigned int nTracks = 1; for (unsigned …

---

## [Error: reference to ‘Medium’ is ambiguous](https://root-forum.cern.ch/t/error-reference-to-medium-is-ambiguous/64272)

<div class="topic-metadata">

**Author:** [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Replies:** 4\
**Last updated:** [October 15, 2025, 8:24am UTC](https://root-forum.cern.ch/t/error-reference-to-medium-is-ambiguous/64272 "2025-10-15T08:24:17Z")

</div>

Dear experts I tried to rebuild my program which has succeeded many times, but after rebuild Garfield++ I got an error: /group/had/muon/ssun/crt\_simulation/time\_resolution/diffusion\_boundary/src/xt\_simulation.cxx:112:9…

---

## [Gas file for low pressure: PROGRAM STOPPED TOO MANY PRIMARIES](https://root-forum.cern.ch/t/gas-file-for-low-pressure-program-stopped-too-many-primaries/64262)

<div class="topic-metadata">

**Author:** [@VictorM](https://root-forum.cern.ch/u/VictorM)\
**Replies:** 3\
**Last updated:** [October 7, 2025, 9:00pm UTC](https://root-forum.cern.ch/t/gas-file-for-low-pressure-program-stopped-too-many-primaries/64262 "2025-10-07T21:00:16Z")

</div>

Hi, I have a problem similar to what was discussed in this post and this post. I try to create a Gas File for 0.75 mbar propane gas. It worked out for 1 mbar, but at this pressure, I get, at 56.5124 V/cm, the error: PR…

---

## [Importing (and utilizing correctly) Magnetic field maps](https://root-forum.cern.ch/t/importing-and-utilizing-correctly-magnetic-field-maps/64066)

<div class="topic-metadata">

**Author:** [@keithwm422](https://root-forum.cern.ch/u/keithwm422)\
**Replies:** 7\
**Last updated:** [September 16, 2025, 5:53am UTC](https://root-forum.cern.ch/t/importing-and-utilizing-correctly-magnetic-field-maps/64066 "2025-09-16T05:53:12Z")

</div>

I have setup successfully and ran Garfield++ simulations using ComponentAnalyticFields with the geometry and Voltages of a wire drift chamber I work with. This has enabled me to build time-to-space mappings of my chamber…

---

## [Attaching ComponentConstant electric field to Sensor](https://root-forum.cern.ch/t/attaching-componentconstant-electric-field-to-sensor/64093)

<div class="topic-metadata">

**Author:** [@wjsdms0721](https://root-forum.cern.ch/u/wjsdms0721)\
**Replies:** 6\
**Last updated:** [September 9, 2025, 8:29am UTC](https://root-forum.cern.ch/t/attaching-componentconstant-electric-field-to-sensor/64093 "2025-09-09T08:29:58Z")

</div>

Hi, I am designing TPC using Garfield and installing sensor for it. However, even though I used fSensorDrift-\>AddComponent(fComponentConstantDrift); to attach component to sensor, sensor does not have same electric fie…

---

## [Question about SignalScalingFactor](https://root-forum.cern.ch/t/question-about-signalscalingfactor/64126)

<div class="topic-metadata">

**Author:** [@Migu](https://root-forum.cern.ch/u/Migu)\
**Replies:** 2\
**Last updated:** [September 8, 2025, 9:43am UTC](https://root-forum.cern.ch/t/question-about-signalscalingfactor/64126 "2025-09-08T09:43:35Z")

</div>

Hi, I found that using SetElectronSignalScalingFactor() increases the signal amplitude while drifting electrons using AvalancheMC(). Here is the code, 1.With ScalingFactor: for (const auto& cluster : tr.GetClusters()…

---

## [Multi-thread: Random in AvalancheMC and AvalancheMicroscopic](https://root-forum.cern.ch/t/multi-thread-random-in-avalanchemc-and-avalanchemicroscopic/64083)

<div class="topic-metadata">

**Author:** [@pigerard](https://root-forum.cern.ch/u/pigerard)\
**Replies:** 15\
**Last updated:** [September 6, 2025, 6:16pm UTC](https://root-forum.cern.ch/t/multi-thread-random-in-avalanchemc-and-avalanchemicroscopic/64083 "2025-09-06T18:16:22Z")

</div>

Hi, I’m currently rewriting my code to enable multi-threading with OpenMP, following the examples provided. However, I’ve noticed that the results vary depending on the number of threads used to run the code. I suspect…

---

## [GasFile generate problem](https://root-forum.cern.ch/t/gasfile-generate-problem/64118)

<div class="topic-metadata">

**Author:** [@Migu](https://root-forum.cern.ch/u/Migu)\
**Replies:** 2\
**Last updated:** [September 5, 2025, 1:03am UTC](https://root-forum.cern.ch/t/gasfile-generate-problem/64118 "2025-09-05T01:03:36Z")

</div>

Hi, When I was generating the gas file, the program got stuck at 483293V. The program is still running, but after waiting here for several hours, no new results have been generated. (Where the program stuck) T…

---

## [Segmentation violation when plotting with Garfield++](https://root-forum.cern.ch/t/segmentation-violation-when-plotting-with-garfield/64072)

<div class="topic-metadata">

**Author:** [@gabrielribcesario](https://root-forum.cern.ch/u/gabrielribcesario)\
**Replies:** 7\
**Last updated:** [September 4, 2025, 8:27am UTC](https://root-forum.cern.ch/t/segmentation-violation-when-plotting-with-garfield/64072 "2025-09-04T08:27:59Z")

</div>

Hello, The behavior started occurring after I pulled commit 3adfd42 (“Merge branch ‘PlottingEngine’ into ‘master’”). I have already tried building Garfield++ from scratch, but not even the default examples will work, on…

---

## [Gas File: PROGRAM STOPPED TOO MANY PRIMARIES IPRIM](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088)

<div class="topic-metadata">

**Author:** [@jonathan-owens](https://root-forum.cern.ch/u/jonathan-owens)\
**Replies:** 5\
**Last updated:** [September 2, 2025, 3:41pm UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088 "2025-09-02T15:41:43Z")

</div>

I am facing the situation first documented here in this issue: GarField++ Gas File Error: “PROGRAM STOPPED TOO MANY PRIMARIES IPRIM” (I am a new user and so can’t put links in posts) It exits with the following error: …

---

## [How to use CUDA for AvlancheMC](https://root-forum.cern.ch/t/how-to-use-cuda-for-avlanchemc/64052)

<div class="topic-metadata">

**Author:** [@Migu](https://root-forum.cern.ch/u/Migu)\
**Replies:** 6\
**Last updated:** [August 31, 2025, 3:29pm UTC](https://root-forum.cern.ch/t/how-to-use-cuda-for-avlanchemc/64052 "2025-08-31T15:29:30Z")

</div>

Hello, I have found that the current Garfield++supports the use of CUDA. I want to use CUDA to accelerate running AvalancheMC, and I would like to know if any examples can help me.

---

## [ROOT Problem File dose not exist](https://root-forum.cern.ch/t/root-problem-file-dose-not-exist/64015)

<div class="topic-metadata">

**Author:** [@Migu](https://root-forum.cern.ch/u/Migu)\
**Replies:** 3\
**Last updated:** [August 13, 2025, 5:35am UTC](https://root-forum.cern.ch/t/root-problem-file-dose-not-exist/64015 "2025-08-13T05:35:47Z")

</div>

After updating the ROOT version to 6.36, I encountered this error when running the program.

---

## [MAXWtFld on ComponentNeBEM3d](https://root-forum.cern.ch/t/maxwtfld-on-componentnebem3d/63968)

<div class="topic-metadata">

**Author:** [@gabrielribcesario](https://root-forum.cern.ch/u/gabrielribcesario)\
**Replies:** 3\
**Last updated:** [August 5, 2025, 7:12pm UTC](https://root-forum.cern.ch/t/maxwtfld-on-componentnebem3d/63968 "2025-08-05T19:12:17Z")

</div>

Hello, I was simulating a MWPC with crossed wire planes using the ComponentNeBEM3d and realized there was a coded limit on the number of weighting fields (#define MAXWtFld 11 in neBEM.h). Is there an underlying reason f…

---

## [Simulating an MWPC with neBEM2d but the charges (e⁻/ions) aren't following the E-field lines as expected](https://root-forum.cern.ch/t/simulating-an-mwpc-with-nebem2d-but-the-charges-e-ions-arent-following-the-e-field-lines-as-expected/63928)

<div class="topic-metadata">

**Author:** [@bhb](https://root-forum.cern.ch/u/bhb)\
**Replies:** 1\
**Last updated:** [July 23, 2025, 6:10am UTC](https://root-forum.cern.ch/t/simulating-an-mwpc-with-nebem2d-but-the-charges-e-ions-arent-following-the-e-field-lines-as-expected/63928 "2025-07-23T06:10:10Z")

</div>

“Hey Garfield++ users, I’m simulating an MWPC with neBEM2d but the charges (e⁻/ions) aren’t following the E-field lines as expected. Has anyone encountered similar issues?” I’m trying to create an MWPC (anode wires and …

[Previous page](https://root-forum.cern.ch/c/garfieldxx/25.md)

[Next page](https://root-forum.cern.ch/c/garfieldxx/25.md?page=2)
