# Will precision of gas table affect the simulation result?

**URL:** <https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297>\
**Category:** Garfield++\
**Created:** [June 7, 2022, 8:38am UTC](https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297 "2022-06-07T08:38:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [June 7, 2022, 8:38am UTC](https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297/1 "2022-06-07T08:38:49Z")

</div>

Dear experts,

I used two different gas files for 1 track simulation in a drift chamber, they are:  
20 steps of grid between 100-400000 V/cm and nColl = 10  
100 steps of grid between 10-500000 V/cm and nColl = 12

The question is: will the result be different if I used more precise gas table? I didn’t see difference in the output file…

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [June 7, 2022, 8:46am UTC](https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297/2 "2022-06-07T08:46:08Z")

</div>

@hschindl that’s for you 🙂

---

<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:** [June 7, 2022, 10:07am UTC](https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297/3 "2022-06-07T10:07:46Z")

</div>

In general yes, the results will be (slightly) different. The `nColl` parameter controls the statistical error of the Magboltz calculation at each of the electric field values (higher `nColl` means better precision). I wouldn’t expect a bit difference between `nColl == 10` and `nColl == 12` though.  
Increasing the number of steps makes sense if the transport properties (drift velocity, Townsend coefficient etc.) exhibit features that you can only resolve by increasing the granularity of the electric field grid. 100 steps is (usually) a bit of an overkill. The lower and upper limit of the electric field grid should be set such that it corresponds to the range of fields present your chamber.

See [Gas files |&nbsp;Garfield++](https://garfieldpp.web.cern.ch/garfieldpp/examples/gasfiles/) for some more pointers on this topic…

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [June 8, 2022, 6:10am UTC](https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297/4 "2022-06-08T06:10:03Z")

</div>

Thank you for the explanation, I looked at the page you sent, it says “if I use DriftLineRKF and AvalancheMC”, does it mean gas file is not used if I use AvalancheMicroscopic to simulate the drift and avalanche?  
And just another non-relative question… is there a function to get number of cluster in TrackHeed? I didn’t find so far…

---

<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:** [June 8, 2022, 1:28pm UTC](https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297/5 "2022-06-08T13:28:22Z")

</div>

> [@](#):
>
> does it mean gas file is not used if I use AvalancheMicroscopic to simulate the drift and avalanche?

Correct, `AvalancheMicroscopic` does not use the gas file, it uses directly the microscopic electron-molecule scattering cross-sections.

> [@](#):
>
> is there a function to get number of cluster in TrackHeed?

Do you mean the average number of clusters per cm? You can use the function `GetClusterDensity` for that. Or the number of clusters on a specific track? To get that number you need to loop over the clusters and count them.

---

<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 22, 2022, 1:29pm UTC](https://root-forum.cern.ch/t/will-precision-of-gas-table-affect-the-simulation-result/50297/6 "2022-06-22T13:29:11Z")

</div>

Closed on June 22, 2022, 1:29pm UTC

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