# I would like to get the energy spectrum of β particles in a proportional counting tube, do you have any suggestions?

**URL:** <https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940>\
**Category:** Garfield++\
**Tags:** root\
**Created:** [May 19, 2023, 3:13am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940 "2023-05-19T03:13:54Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 19, 2023, 3:13am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/1 "2023-05-19T03:13:54Z")

</div>

![image](https://root-forum.cern.ch/uploads/default/original/3X/4/3/4388131ca94b42ebf2690b2c48f3abbb9ac0a08b.png)  
I tried modifying the Geant4GarfieldInterface in it, but each event took too long to calculate and the following issue occurred，I changed the gas file and kept the material in geant4 consistent,  
1，is there a way to reduce the calculation time（Each event takes tens of seconds to calculate） and get the energy spectrum of the particles in the proportional counting tube；

2，When the emitted particle energy is greater than 200 keV, it is not completely deposited in the tube, is this normal?

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 19, 2023, 3:28am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/2 "2023-05-19T03:28:33Z")

</div>

@hschindl hi，please need your 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:** [May 19, 2023, 5:15am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/3 "2023-05-19T05:15:55Z")

</div>

What gas gain do you expect in your proportional counter? If the gain is large, the avalanche simulation using `AvalancheMicroscopic` may take a long time; you could try using `DriftLineRKF` instead.

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 19, 2023, 7:29am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/4 "2023-05-19T07:29:06Z")

</div>

I don’t currently care about gas gain, I want to get the energy spectrum of particles in proportional counter，Is there an example of the use of DriftLineRK?

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 19, 2023, 7:31am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/5 "2023-05-19T07:31:45Z")

</div>

“MediumMagboltz::GetElectronCollisionRate” appears:  
Rate at 40.2529 eV is not included in the current table" does it affect the accuracy of the calculation?

---

<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:** [May 19, 2023, 4:32pm UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/6 "2023-05-19T16:32:02Z")

</div>

No, it just means that the table of collision rates is recomputed.

---

<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:** [May 19, 2023, 4:32pm UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/7 "2023-05-19T16:32:49Z")

</div>

This example is probably a good starting point:

[https://garfieldpp.web.cern.ch/garfieldpp/examples/tube/](https://garfieldpp.web.cern.ch/garfieldpp/examples/tube/)

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 20, 2023, 1:57am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/8 "2023-05-20T01:57:03Z")

</div>

In the Geant4GarfieldInterface example, whether the emitted particles (not electron ion pairs) are affected by the electric field corresponding to the gasfile

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 20, 2023, 2:02am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/9 "2023-05-20T02:02:12Z")

</div>

Thank you, I’ll have a look at this example carefully

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 25, 2023, 1:20pm UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/10 "2023-05-25T13:20:16Z")

</div>

![image](https://root-forum.cern.ch/uploads/default/original/3X/8/f/8f85649784bba4431d854fd72e01a9b45cdd0737.png)

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/d/b/dbc23bb57cbd08307ca2ffbc2c070566fa0f669a.png)  
hi，I try using `DriftLineRKF` instead，but there are some errors 。  
When I comment this line，Calculations still take a long time  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/4/d/4d783bc4752d0bf9641a4e965cdd243364f568ef.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:** [May 25, 2023, 1:38pm UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/11 "2023-05-25T13:38:08Z")

</div>

`DriftLineRKF` does not have a function `AvalancheElectron`; the function you need called is `DriftElectron`. In fact, if you are using `DriftLineRKF` there is no need to use `AvalancheMC` to first drift the electron to the wire. You can call `DriftLineRKF::DriftElectron` using the starting point of the electron.

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 29, 2023, 8:45am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/12 "2023-05-29T08:45:03Z")

</div>

hi，I am now using DriftLineRKF as shown in the image below, but the gas energy deposition does not seem to be quite right, I don’t know what is the reason for the initial decline,If I set which parameter is wrong，i use “e-” with 70 keV energy.

![image1](https://root-forum.cern.ch/uploads/default/original/3X/c/e/ce51acdd0a00d221ba488525e7520e6793a86fdc.png)

 ![image2](https://root-forum.cern.ch/uploads/default/original/3X/e/c/ec3c7c46fd4268d0cad4580d4e13589cff030d10.png)  
 ![MQI96BOK}O`4$M1EUWFF3C4](https://root-forum.cern.ch/uploads/default/original/3X/a/3/a30a8ceecb251d98692626287197b73a806adf4a.png)

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [May 29, 2023, 11:54am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/13 "2023-05-29T11:54:58Z")

</div>

Another problem is that I use this formula to calculate the density of the gas mixture, which is not equal to the density in the program，not equal to 1.8223.I wonder if it is calculated with another formula.

![image](https://root-forum.cern.ch/uploads/default/original/3X/9/d/9d6a0c6abe424510ee5cf6feb83b1c51f78b3dde.png)  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/6/6/66fa36c15d5417daff2882eedbc570c1179b4436.png)

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/8/9/897ea91a0d0463443e8e9a96e343542b4b491065.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:** [May 31, 2023, 9:07am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/14 "2023-05-31T09:07:13Z")

</div>

Hi,  
sorry for the late reply. The mixture ratio 70:30 usually refers to the mole fraction (or volume fraction since we assume it’s an ideal gas), not the mass fraction.

---

<div class="post-metadata">

**Author:** ![zjun](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/6a8cbe/32.png) [@zjun](https://root-forum.cern.ch/u/zjun)\
**Post date:** [June 1, 2023, 11:06am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/15 "2023-06-01T11:06:42Z")

</div>

![image](https://root-forum.cern.ch/uploads/default/original/3X/5/f/5f278d00592fb4a3e6e40292fa1a5c545e063b95.png)

I found this in TestEm8, which I used in the mixed gas calculation above, using the molar mass ratio.

---

<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 15, 2023, 11:07am UTC](https://root-forum.cern.ch/t/i-would-like-to-get-the-energy-spectrum-of-particles-in-a-proportional-counting-tube-do-you-have-any-suggestions/54940/16 "2023-06-15T11:07:18Z")

</div>

Closed on June 15, 2023, 11:07am UTC

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