# The relationship between the gas pressure and the average collected charge

**URL:** <https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972>\
**Category:** Garfield++\
**Created:** [February 28, 2022, 6:35am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972 "2022-02-28T06:35:06Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 14, 2022, 12:49pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/62 "2022-03-14T12:49:47Z")

</div>

Using this method can indeed solve the fluctuation and abnormal point problem. That’s the result that I have switched off the straggling.

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/1/1/111446415ed8dfdd27bddf47b75fc809e9196237.png)

---

<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:** [March 14, 2022, 8:41pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/63 "2022-03-14T20:41:07Z")

</div>

I’m still looking for a proper fix, but in the mean time please use this workaround: replace the line

```auto
tr.SetClustersMaximum(50);

```

by

```auto
tr.SetTargetClusterSize(1);

```

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 15, 2022, 12:08am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/64 "2022-03-15T00:08:35Z")

</div>

Hi,  
Thanks a lot for your help  
I modified the code as you told me. The result is like this in the below.

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/3/0/3087d3fa3af6cce49d5e9f8bb303ce7e33363be8.png)

---

<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:** [March 15, 2022, 8:09pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/65 "2022-03-15T20:09:29Z")

</div>

Looks good.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 16, 2022, 12:42am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/66 "2022-03-16T00:42:56Z")

</div>

Hi,  
Thanks a lot for your reply  
So is that ok now? Just decrease the cluster size to one electron?

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 16, 2022, 1:17am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/67 "2022-03-16T01:17:41Z")

</div>

Hi,  
I still have some questions confused me a lot, why the curve becomes zigzag? And I use the method to do some simulation, the results are like this

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/d/4/d421e413417ea24b01a6514071ebe1f57e571341.png)  
there is still a mutational range from 540 Torr to 640 Torr just like the Tracktrim method.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 16, 2022, 1:40am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/68 "2022-03-16T01:40:08Z")

</div>

So why the code tr.SetClustersMaximum(50) can eliminate the fluctuation in all the gas pressure but has the opposite curve trend.  
However the code tr.SetTargetClusterSize(1) using the TrackSrim method is almost the same as the TrackTrim method.

---

<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:** [March 16, 2022, 6:01am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/69 "2022-03-16T06:01:32Z")

</div>

> [@XiCheng](#):
>
> why the curve becomes zigzag

You seem to have a parallel-plate geometry (constant electric field and weighting field) so each electron along the track generates a constant induced current while it drifts in the gas. And you have discrete starting points of the electrons along the track.

By the way, if you really have a parallel-plate geometry there is really no point in using a finite-element field map. It’ll be much easier/faster if you use `ComponentConstant` (or `ComponentAnalyticField`).

> [@XiCheng](#):
>
> mutational range from 540 Torr to 640 Torr

You mean the plot labelled “680 Torr”? It does look a bit strange.  
You should have two effects when you change the pressure: with increasing pressure the number of electron/ion pairs created in the gas will increase. But at the same time, if you use the same electric field the drift velocity will also change (to first order the drift velocity scales with E/p).

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 16, 2022, 12:16pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/70 "2022-03-16T12:16:54Z")

</div>

Hi  
Thanks a lot for your reply and help  
It is not just a simple parallel-plate geometry, but a little bit complex parallel-plate geometry which include holes ，grooves，filleted corner and so on. Can that also use the ComponentConstant (or ComponentAnalyticField)?

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 16, 2022, 12:30pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/71 "2022-03-16T12:30:21Z")

</div>

> [@hschindl](#):
>
> ) so each electron along the track generates a constant induced current while it drifts in the gas.

So why some of curve is zigzag , some is columnar，and some is like a pulse signal?

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 17, 2022, 7:05am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/72 "2022-03-17T07:05:56Z")

</div>

> [@hschindl](#):
>
> You mean the plot labelled “680 Torr”? It does look a bit strange.  
> You should have two effects when you change the pressure: with increasing pressure the number of electron/ion pairs created in the gas will increase. But at the same time, if you use the same electric field the drift velocity will also change (to first order the drift velocity scales with E/p).

Yep, I don’t simulate all of the gas pressure, maybe it is not only at the 680 Torr point but a range pressure around it .  
Besides , How to display the E/P value and drift velocity through the code? I agree with what you said about the two effects, I want to do some research on it.

---

<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:** [March 17, 2022, 5:15pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/73 "2022-03-17T17:15:36Z")

</div>

> [@XiCheng](#):
>
> How to display the E/P value and drift velocity through the code?

You can use a script like this

> **[Examples/GasFile/read.C · master · garfield / garfieldpp · GitLab](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/GasFile/read.C)**
>
> http://garfieldpp.web.cern.ch/garfieldpp/

to plot the drift velocity as function of the electric field.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 18, 2022, 7:21am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/74 "2022-03-18T07:21:02Z")

</div>

Hi,  
Thanks a lot for your help  
There is something new problem, I have simulated all over the gas pressure

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/a/e/ae0f16794f9237e32c366d4566b39ebd3bee127d.png)  
But the result seems wrong and no relationship at all

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 18, 2022, 7:58am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/75 "2022-03-18T07:58:58Z")

</div>

Hi,  
I am very confused now and even don’t know whether my simulation is right during the nearly half of years learning,which depress me a lot. why should we choose the TrackSrim instead of the TrackTrim? Is the because using the TrackSrim method can switch off the straggling and reduce the fluctuation , which tends to the deposited energy simulation but not the transportation of the proton . Is that right?

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 19, 2022, 7:18am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/77 "2022-03-19T07:18:33Z")

</div>

Hi,  
Is there still anything problem in the `TrackSrim` class?  
After I change the code from " tr.SetClustersMaximum(50);" to " tr.SetTargetClusterSize(1);"  
The result turns to be like this

![image](https://root-forum.cern.ch/uploads/default/original/3X/b/e/be3950508d3c8172ec51f7693df075569c112d42.png)

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/1/4/141d1cb5ff104f46df0f14bec67f00b8d7064d5b.png)

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 19, 2022, 7:50am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/78 "2022-03-19T07:50:33Z")

</div>

Hi,  
Would you please tell me how to get the electron drift velocity value? not the one like this  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/c/7/c79473f64ace5246c9599a0c890b1175065ee84a.png)  
because once the voltage is set ,the electric field is constant, I want to get the drift velocity at different gas pressure. the X-coordinate would change to V/cm•p

---

<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:** [March 20, 2022, 8:24pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/79 "2022-03-20T20:24:06Z")

</div>

Can you please provide the SRIM output files you are using?

---

<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:** [March 20, 2022, 8:27pm UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/80 "2022-03-20T20:27:33Z")

</div>

There is no predefined function for that. You can retrieve the values of the drift velocity stored in the gas table using something like that:

> **[Examples/GasFile/printTable.C · master · garfield / garfieldpp](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/GasFile/printTable.C)**
>
> http://garfieldpp.web.cern.ch/garfieldpp/

and then make a plot yourself.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 21, 2022, 5:08am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/81 "2022-03-21T05:08:09Z")

</div>

[740Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/5rSEAJKBJyN0L1vKmAWiik3f3Iy.txt) (9.1 KB)  
[720Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/lG45MzuvYlqKLcpPji63ddKRjdg.txt) (9.1 KB)  
[700Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/d5wlfEf3IcRjanf8d0O410LY5w1.txt) (9.1 KB)  
[680Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/tFqcB1ltXhNSSbjf3kEnaIPmdb9.txt) (9.1 KB)  
[660Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/jcI8OKtZAO3gtBp3KkXlUq9oyjS.txt) (9.1 KB)  
[580Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/zlV3uClA5hJmlGkjfZ7dtJERwqr.txt) (9.1 KB)  
[640Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/6f8MzSkhCIQyLBO2WGodUDn95Ql.txt) (9.1 KB)  
[620Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/2lXgFQRMJ7knsYfQoK0IN58tk1R.txt) (9.1 KB)  
[600Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/vVbfCXc2PAFScwoNVS3lMydIpC4.txt) (9.1 KB)  
[560Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/qN6KEv7RTBF92wGa6AQuPBmuemI.txt) (9.1 KB)  
[540Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/nLIzu9gkZh8glA2XuGjXsOtQsTR.txt) (9.1 KB)  
[540Srim-He.txt](https://root-forum.cern.ch/uploads/short-url/nLIzu9gkZh8glA2XuGjXsOtQsTR.txt) (9.1 KB)

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [March 21, 2022, 5:09am UTC](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972/82 "2022-03-21T05:09:40Z")

</div>

Hi,  
Thanks a lot for your reply and help  
The SRIM output files are theses in the above, thanks again for helping me solve the problem.

[Previous page](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972.md?page=3)

[Next page](https://root-forum.cern.ch/t/the-relationship-between-the-gas-pressure-and-the-average-collected-charge/48972.md?page=5)
