# Confused about LoadGasFile() and gas parameters setting

**URL:** <https://root-forum.cern.ch/t/confused-about-loadgasfile-and-gas-parameters-setting/54255>\
**Category:** Garfield++\
**Created:** [March 28, 2023, 4:19am UTC](https://root-forum.cern.ch/t/confused-about-loadgasfile-and-gas-parameters-setting/54255 "2023-03-28T04:19:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zql21](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/zql21/32/33487_2.png) [@zql21](https://root-forum.cern.ch/u/zql21)\
**Post date:** [March 28, 2023, 4:19am UTC](https://root-forum.cern.ch/t/confused-about-loadgasfile-and-gas-parameters-setting/54255/1 "2023-03-28T04:19:04Z")

</div>

In examples, some code uses :  
MediumMagboltz gas ( ’ ar ', 80., ’ co2 ', 20. ) ;  
gas.SetTemperature ( 293.15 ) ;  
gas.SetPressure ( 760. ) ;  
Some code uses :  
gas.LoadGasFile ( ’ xxx.gas ’ ) ;

I have read [gas.LoadGasFile() vs gas.Initialise(true)](https://root-forum.cern.ch/t/gas-loadgasfile-vs-gas-initialise-true/44925) ),I Know the first case prepares the table of microscopic scattering rates. The second case LoadGasFile prepares the tables of macroscopic transport parameters  
I am still a little confused, I want to confirm whether my following understanding is correct :

1. If I use AvalancheMicroscopic, I don 't need to import gas files
2. If using AvalancheMC or DriftLineRKF, I must load the gas file  
3.Is gas.LoadGasFile(‘xxx.gas’); and gas. SetTemperature (293.15);gas.SetPressure ( 760. ) ; gas. SetComponent ( ’ xx ’ ) completely independent ? Does **simultaneous use in the program affect each other**?
3. What is the function of **gas.Initialise (true)** without loading the gas file ?Must I use it ?
4. **When must gas.LoadIonMobility** be used with AvalancheMicroscopic, AvalancheMC or DriftLineRKF？What is **the role of gas.LoadIonMobility( )**？

---

<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 28, 2023, 7:45am UTC](https://root-forum.cern.ch/t/confused-about-loadgasfile-and-gas-parameters-setting/54255/2 "2023-03-28T07:45:09Z")

</div>

Hi,

1. Yes.
2. Yes.
3. No, they are not independent. If you load a gas file, the gas mixture, temperature and pressure are set to the values given in the gas file.
4. This function sets up the table of scattering rates. You don’t need to call it explicitly; if you don’t it is called on demand.
5. It loads a table of ion mobility values. You need to use it if you want to simulate ion drift (with AvalancheMC or DriftLineRKF).

---

<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:** [April 11, 2023, 7:45am UTC](https://root-forum.cern.ch/t/confused-about-loadgasfile-and-gas-parameters-setting/54255/3 "2023-04-11T07:45:28Z")

</div>

Closed on April 11, 2023, 7:45am UTC

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