# Garfield++

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

[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:** 15

---

## [Gas pressure in Garfield++](https://root-forum.cern.ch/t/gas-pressure-in-garfield/48140)

<div class="topic-metadata">

**Author:** [@changjh12](https://root-forum.cern.ch/u/changjh12)\
**Replies:** 1\
**Last updated:** [December 21, 2021, 10:26am UTC](https://root-forum.cern.ch/t/gas-pressure-in-garfield/48140 "2021-12-21T10:26:59Z")

</div>

Hello In my work, I need to set the gas pressure to 1, 3, 5, 7, 10 atm. I am not sure whether Garfield++ can be set like this? In the user guide, I did not find relevant information. What is the gas pressure setting ra…

---

## [No medium at initial position(gas)](https://root-forum.cern.ch/t/no-medium-at-initial-position-gas/48104)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 6\
**Last updated:** [December 20, 2021, 2:03pm UTC](https://root-forum.cern.ch/t/no-medium-at-initial-position-gas/48104 "2021-12-20T14:03:53Z")

</div>

I have set the start point and direction of the proton like the code in the below" double x0 = -0.1, y0 = 0.204, z0 = -0.07, t0 = 0.; double dx0 = 0., dy0 = -1., dz0 = 0.; but the error notice"No medium at initial pos…

---

## [How to set a electrode in the ComponentAnsys123 Class](https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 2\
**Last updated:** [December 20, 2021, 8:13am UTC](https://root-forum.cern.ch/t/how-to-set-a-electrode-in-the-componentansys123-class/48118 "2021-12-20T08:13:45Z")

</div>

I have imported the model from the ansys to the Garfield++, and the most important part of my model is some gas area including the electric field, now I want to get the signal from the electrode, what should I do to add …

---

## [Could not determine the plot limits](https://root-forum.cern.ch/t/could-not-determine-the-plot-limits/48102)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 4\
**Last updated:** [December 18, 2021, 12:14pm UTC](https://root-forum.cern.ch/t/could-not-determine-the-plot-limits/48102 "2021-12-18T12:14:27Z")

</div>

I want to simulate the electron drift lines using the DriftLineRKF, firstly I used the code" ViewDrift driftview; const bool twod = false; const bool axis = true; driftview.Plot(twod,axis); driftview.Plot3d(); //R…

---

## [How to understand the Garfield++ code](https://root-forum.cern.ch/t/how-to-understand-the-garfield-code/48103)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 2\
**Last updated:** [December 18, 2021, 12:05pm UTC](https://root-forum.cern.ch/t/how-to-understand-the-garfield-code/48103 "2021-12-18T12:05:25Z")

</div>

How to understand the three codes in the below cout\<\<"electron position:"\<\< xe \<\<"\\t"\<\< ye \<\<"\\t"\<\< ze \<\<endl; cout\<\<"clusters number: "\<\<counts\<\<endl; std::vector\<double\> xf;

---

## [Calculating a table of electron transport properties using Magboltz](https://root-forum.cern.ch/t/calculating-a-table-of-electron-transport-properties-using-magboltz/48101)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 1\
**Last updated:** [December 18, 2021, 5:18am UTC](https://root-forum.cern.ch/t/calculating-a-table-of-electron-transport-properties-using-magboltz/48101 "2021-12-18T05:18:49Z")

</div>

I have generated a N2 gas file,and now I want to plot the electron transport properties using Magboltz, the code is in the below, but there is no plot at all. MediumMagboltz gas; gas.LoadGasFile("N2.gas") gas.PrintG…

---

## [Cannot open file He.gas](https://root-forum.cern.ch/t/cannot-open-file-he-gas/48061)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 12\
**Last updated:** [December 17, 2021, 9:45am UTC](https://root-forum.cern.ch/t/cannot-open-file-he-gas/48061 "2021-12-17T09:45:59Z")

</div>

I have generated a gas file, then When I want to use it , I type the code " MediumMagboltz gas; gas.LoadGasFile(“He.gas”);" but the running results notice that:Cannot open file He.gas. MediumMagboltz::LoadGasFile: …

---

## [Error importing weight field file](https://root-forum.cern.ch/t/error-importing-weight-field-file/47896)

<div class="topic-metadata">

**Author:** [@changjh12](https://root-forum.cern.ch/u/changjh12)\
**Replies:** 11\
**Last updated:** [December 16, 2021, 6:46am UTC](https://root-forum.cern.ch/t/error-importing-weight-field-file/47896 "2021-12-16T06:46:36Z")

</div>

hello , When I try to import the weight field file obtained from comsol, the error message in the figure below always appears. I did it again many times, the result is still like this.! WPOT.txt is the electric poten…

---

## [How to gain the Bragg peak curve of proton](https://root-forum.cern.ch/t/how-to-gain-the-bragg-peak-curve-of-proton/48035)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 13\
**Last updated:** [December 14, 2021, 7:52am UTC](https://root-forum.cern.ch/t/how-to-gain-the-bragg-peak-curve-of-proton/48035 "2021-12-14T07:52:47Z")

</div>

I want to gain the bragg peak generated by proton incident into the model. But the error notice “the Initial position of proton is not in the ionizable region”, after I modified the coordinates, there is no any plot and…

---

## [Cannot voxelize Top :less than 2 boundaries on X](https://root-forum.cern.ch/t/cannot-voxelize-top-less-than-2-boundaries-on-x/47979)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 9\
**Last updated:** [December 13, 2021, 6:14am UTC](https://root-forum.cern.ch/t/cannot-voxelize-top-less-than-2-boundaries-on-x/47979 "2021-12-13T06:14:02Z")

</div>

When I import the Ansys model to the Garfield++, the results show in the below. but the contour plot is empty. the error notice that" Cannot voxelize Top :less than 2 boundaries on X" mponentAnsys123::Initialise: Re…

---

## [How to make the contours of the electric potential colorful](https://root-forum.cern.ch/t/how-to-make-the-contours-of-the-electric-potential-colorful/48029)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 1\
**Last updated:** [December 11, 2021, 6:27am UTC](https://root-forum.cern.ch/t/how-to-make-the-contours-of-the-electric-potential-colorful/48029 "2021-12-11T06:27:18Z")

</div>

I want to set the contours of the electric potential different colors, the color can change with the different value of electric potential.

---

## [Using time-dependent electric field](https://root-forum.cern.ch/t/using-time-dependent-electric-field/47945)

<div class="topic-metadata">

**Author:** [@llerov](https://root-forum.cern.ch/u/llerov)\
**Replies:** 1\
**Last updated:** [December 8, 2021, 8:09am UTC](https://root-forum.cern.ch/t/using-time-dependent-electric-field/47945 "2021-12-08T08:09:20Z")

</div>

Hello! I would like to use an electric field that varies in time. Does Garfield++ allow us to do this? Thank a lot for your help!

---

## [The reason from ROOT or the Garfield++](https://root-forum.cern.ch/t/the-reason-from-root-or-the-garfield/47967)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 1\
**Last updated:** [December 8, 2021, 7:51am UTC](https://root-forum.cern.ch/t/the-reason-from-root-or-the-garfield/47967 "2021-12-08T07:51:08Z")

</div>

I have imported the Ansys model to the Garfield++, the results show in the below. I have already updated the ROOT from ROOT 6.16 to ROOT 6.24, the error still notice “The file was produced with version 6.16/00 of ROOT.” …

---

## [How to modify the gas file?](https://root-forum.cern.ch/t/how-to-modify-the-gas-file/47715)

<div class="topic-metadata">

**Author:** [@lyp](https://root-forum.cern.ch/u/lyp)\
**Replies:** 21\
**Last updated:** [December 7, 2021, 6:00am UTC](https://root-forum.cern.ch/t/how-to-modify-the-gas-file/47715 "2021-12-07T06:00:39Z")

</div>

Hello, sir. I was using example drifttube with the gas card “ar\_93\_co2\_7\_3bar.gas” before. Now I want to fix the proportion of gas to co2 20%& ar 80% .How should I do and whether I could define my own gas card?

---

## [TrackHeed GetElectron: Index Out Of Range](https://root-forum.cern.ch/t/trackheed-getelectron-index-out-of-range/47939)

<div class="topic-metadata">

**Author:** [@Jason\_Forson](https://root-forum.cern.ch/u/Jason_Forson)\
**Replies:** 3\
**Last updated:** [December 6, 2021, 7:40pm UTC](https://root-forum.cern.ch/t/trackheed-getelectron-index-out-of-range/47939 "2021-12-06T19:40:42Z")

</div>

Howdy. I’m back. So with the help of the last thread I made a lot of progress and think I’m just one bug away from getting it how I want. What this program does is model the results of an 26-Al ion beam hitting a heliu…

---

## [How to plot the 3D model field map mesh](https://root-forum.cern.ch/t/how-to-plot-the-3d-model-field-map-mesh/47886)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 31\
**Last updated:** [December 4, 2021, 12:51pm UTC](https://root-forum.cern.ch/t/how-to-plot-the-3d-model-field-map-mesh/47886 "2021-12-04T12:51:27Z")

</div>

I have build a 3D detector model in the Ansys, and finished the finite electric analysis. Now I have imported the NLIST.lis etc. to the Garfield++, but I can’t gain the 3D plot of the mesh elements and electric potent…

---

## [Too small number of avalanche electrons](https://root-forum.cern.ch/t/too-small-number-of-avalanche-electrons/47720)

<div class="topic-metadata">

**Author:** [@Youngju\_Cho](https://root-forum.cern.ch/u/Youngju_Cho)\
**Replies:** 3\
**Last updated:** [December 1, 2021, 1:15am UTC](https://root-forum.cern.ch/t/too-small-number-of-avalanche-electrons/47720 "2021-12-01T01:15:09Z")

</div>

Hello, I’m trying to simulate the multi-wire proportional counter with TrackSRIM and AvalancheMicroscopic classes. I succeeded to use the TrackSRIM, and then use AvalancheElectron at each cluster points. What I anticipa…

---

## [Import the Ansys LIS files to the Garfield++](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774)

<div class="topic-metadata">

**Author:** [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Replies:** 41\
**Last updated:** [November 30, 2021, 7:36am UTC](https://root-forum.cern.ch/t/import-the-ansys-lis-files-to-the-garfield/47774 "2021-11-30T07:36:48Z")

</div>

I have done the electrostatic field finite element analysis through the Ansys. However when I import the lis files to the Garfield++,there were errors through the importing process. the error shows as the followed： …

---

## [Heed/SRIM/TRIM Cross-Functionality](https://root-forum.cern.ch/t/heed-srim-trim-cross-functionality/47727)

<div class="topic-metadata">

**Author:** [@Jason\_Forson](https://root-forum.cern.ch/u/Jason_Forson)\
**Replies:** 4\
**Last updated:** [November 30, 2021, 1:58am UTC](https://root-forum.cern.ch/t/heed-srim-trim-cross-functionality/47727 "2021-11-30T01:58:32Z")

</div>

Howdy, Me Again. This time is different, I promise. I actually feel pretty good about my code itself, at least from what I know about Garfield++. Just seeing if there’s something I’m missing about the interaction of Tra…

---

## [Get the weight field file of COMSOL](https://root-forum.cern.ch/t/get-the-weight-field-file-of-comsol/47865)

<div class="topic-metadata">

**Author:** [@changjh12](https://root-forum.cern.ch/u/changjh12)\
**Replies:** 3\
**Last updated:** [November 29, 2021, 3:36pm UTC](https://root-forum.cern.ch/t/get-the-weight-field-file-of-comsol/47865 "2021-11-29T15:36:52Z")

</div>

Hello, I want to know how to get the weight field file of COMSOL (similar to WPOT.lis in ANSYS). I guess it is by setting the collecting electrode to 1V and the other electrodes to 0V. Then derive the field norm (V/m) di…

---

## [The problem of importing voltage data (field.txt and weighting field.txt) into Garfield++ in COMSOL](https://root-forum.cern.ch/t/the-problem-of-importing-voltage-data-field-txt-and-weighting-field-txt-into-garfield-in-comsol/47832)

<div class="topic-metadata">

**Author:** [@changjh12](https://root-forum.cern.ch/u/changjh12)\
**Replies:** 3\
**Last updated:** [November 26, 2021, 1:35pm UTC](https://root-forum.cern.ch/t/the-problem-of-importing-voltage-data-field-txt-and-weighting-field-txt-into-garfield-in-comsol/47832 "2021-11-26T13:35:45Z")

</div>

Hello, when the COMSOL file is read in the Garfield++ program, the error message shown in the figure below will appear. I am not sure if it is a problem with the program or the analysis result in COMSOL. Thank you T…

---

## [Problem when reinstall Garfield++ after upgrade GSL](https://root-forum.cern.ch/t/problem-when-reinstall-garfield-after-upgrade-gsl/47753)

<div class="topic-metadata">

**Author:** [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Replies:** 5\
**Last updated:** [November 24, 2021, 11:47pm UTC](https://root-forum.cern.ch/t/problem-when-reinstall-garfield-after-upgrade-gsl/47753 "2021-11-24T23:47:27Z")

</div>

Dear experts I somehow upgraded GSL from 2.6 to 2.7, then Garfield++ gives error when I compile my application with it (of course). Then I try to reinstall Garfield++, deleted the whole directory and reinstall from the …

---

## [TTree problem in using Garfield++](https://root-forum.cern.ch/t/ttree-problem-in-using-garfield/47742)

<div class="topic-metadata">

**Author:** [@Lowerce](https://root-forum.cern.ch/u/Lowerce)\
**Replies:** 2\
**Last updated:** [November 20, 2021, 2:54pm UTC](https://root-forum.cern.ch/t/ttree-problem-in-using-garfield/47742 "2021-11-20T14:54:56Z")

</div>

In the official example of Garfield++, I can not initialize a pointer of TTree.There will be an error in the making process. But other parts like TCanvas 、TROOT 、TApplication of ROOT can work well. Undefined symbols fo…

---

## [Maybe a bug in garfield++](https://root-forum.cern.ch/t/maybe-a-bug-in-garfield/47635)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 14\
**Last updated:** [November 19, 2021, 3:02pm UTC](https://root-forum.cern.ch/t/maybe-a-bug-in-garfield/47635 "2021-11-19T15:02:49Z")

</div>

when i used garfield++ to calculate gas properties like ElectronVelocity, ElectronDiffusionL, ElectronDiffusionT, ElectronTownsend, ElectronAttachment. while the electricfield is set as from 50V/cm to 1000V/cm，as calcula…

---

## [Why the electron velocity drops down as the electric field raises?](https://root-forum.cern.ch/t/why-the-electron-velocity-drops-down-as-the-electric-field-raises/47660)

<div class="topic-metadata">

**Author:** [@newconcept1979](https://root-forum.cern.ch/u/newconcept1979)\
**Replies:** 4\
**Last updated:** [November 19, 2021, 1:39pm UTC](https://root-forum.cern.ch/t/why-the-electron-velocity-drops-down-as-the-electric-field-raises/47660 "2021-11-19T13:39:29Z")

</div>

how to understard the content in the figure below: why the electron velocity drop down in a range of electric field?

---

## [Segmentation fault when use ViewGeometry::Plot3d()](https://root-forum.cern.ch/t/segmentation-fault-when-use-viewgeometry-plot3d/47730)

<div class="topic-metadata">

**Author:** [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Replies:** 1\
**Last updated:** [November 19, 2021, 6:33am UTC](https://root-forum.cern.ch/t/segmentation-fault-when-use-viewgeometry-plot3d/47730 "2021-11-19T06:33:01Z")

</div>

Dear experts, I was trying to set a geometry of my simple prototype of a drift chamber, using GeometrySimple and SolidBox. Also I filled He/IC4H10 for 90/10 by MediumMagboltz. It seems all fine with doing above, but I g…

---

## [How to use neBEM of GARFIELD++ to add chargs?](https://root-forum.cern.ch/t/how-to-use-nebem-of-garfield-to-add-chargs/47685)

<div class="topic-metadata">

**Author:** [@tianxq](https://root-forum.cern.ch/u/tianxq)\
**Replies:** 2\
**Last updated:** [November 18, 2021, 12:28pm UTC](https://root-forum.cern.ch/t/how-to-use-nebem-of-garfield-to-add-chargs/47685 "2021-11-18T12:28:18Z")

</div>

Dear GARFIELD++ people: I try to use the nebem to calculate the field map of the THGEM for simulation of charging-up effect. but I can’t find the way to add charge density. There is no macro or example to use garfield+…

---

## [Recoil Energy Range](https://root-forum.cern.ch/t/recoil-energy-range/47506)

<div class="topic-metadata">

**Author:** [@Jason\_Forson](https://root-forum.cern.ch/u/Jason_Forson)\
**Replies:** 9\
**Last updated:** [November 11, 2021, 11:02am UTC](https://root-forum.cern.ch/t/recoil-energy-range/47506 "2021-11-11T11:02:36Z")

</div>

Howdy, So my program works pretty great now thanks to previous help here, thank you. I have discovered an issue that’s more of a logic error on my end than anything in my code but I’d appreciate another set of eyes on i…

---

## [Is it possible to track using Garfield::TrackSrim class in a magnetic field?](https://root-forum.cern.ch/t/is-it-possible-to-track-using-garfield-tracksrim-class-in-a-magnetic-field/47592)

<div class="topic-metadata">

**Author:** [@user2](https://root-forum.cern.ch/u/user2)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 9:00am UTC](https://root-forum.cern.ch/t/is-it-possible-to-track-using-garfield-tracksrim-class-in-a-magnetic-field/47592 "2021-11-11T09:00:14Z")

</div>

Hi! I’m working on the simulation of AT-TPC with a triple GEM. One of the particles to be tracked is the Oxygen ion in He gas with a momentum of few MeV/c. I thought that a combination of Garfield::TrackSrim would be …

---

## [How to change the wire directions in MWPC?](https://root-forum.cern.ch/t/how-to-change-the-wire-directions-in-mwpc/47420)

<div class="topic-metadata">

**Author:** [@Youngju\_Cho](https://root-forum.cern.ch/u/Youngju_Cho)\
**Replies:** 5\
**Last updated:** [November 1, 2021, 1:55am UTC](https://root-forum.cern.ch/t/how-to-change-the-wire-directions-in-mwpc/47420 "2021-11-01T01:55:18Z")

</div>

Hello, I am trying to simulate the MWPC whose anode and two cathode planes are composed of wires. I want to change the direction of wires of one cathode perpendicular to the anode wires, but I can’t find how to do it. …

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

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