# Comparison of two Gas files

**URL:** <https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690>\
**Category:** Garfield++\
**Created:** [May 3, 2021, 12:53pm UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690 "2021-05-03T12:53:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tahany](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/c6cbf5/32.png) [@Tahany](https://root-forum.cern.ch/u/Tahany)\
**Post date:** [May 3, 2021, 12:53pm UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/1 "2021-05-03T12:53:31Z")

</div>

Hello,  
I have created two gas files of different gas mixture at Garfiled++ , now if i wanna make a comparison plots of the gas properties of the two gas files in the same canvas , How to do this?  
Thanks,

---

<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 3, 2021, 1:59pm UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/2 "2021-05-03T13:59:36Z")

</div>

Hi,  
I’ve attached a simple program that plots two gas files (you’ll probably need to adapt it a bit to your purposes).  
[plot2.C](https://root-forum.cern.ch/uploads/short-url/bnlIs1LMkqZSzAgeVdF5pyvUX9a.C) (860 Bytes)

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [May 3, 2021, 2:04pm UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/3 "2021-05-03T14:04:49Z")

</div>

Thanks for the contribution, @hschindl!

---

<div class="post-metadata">

**Author:** ![Tahany](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/c6cbf5/32.png) [@Tahany](https://root-forum.cern.ch/u/Tahany)\
**Post date:** [May 3, 2021, 2:35pm UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/4 "2021-05-03T14:35:45Z")

</div>

Thanks a lot @hschindl I really appreciate your effort , I have two questions , is this version available to plot more than two gas files ? also if i want to write side information about the plots into the graph ( e.g. the green color refer to gas X and the red refer to gas Y ) can i do this ?

---

<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 11, 2021, 4:20pm UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/5 "2021-05-11T16:20:34Z")

</div>

Apologies for my very late reply!

Yes, you can superimpose more than two curves, and you can set the labels and colours using the methods `SetLabels` and `SetColours` of `ViewMedium`.

You don’t necessarily have to use `ViewMedium` though. For more elaborate plots, it might be easier to retrieve a list of the transport parameters stored in the table, and write a little script yourself to plot them.

I’ve just added a page to the website with some more details and examples for dealing with gas tables and plotting transport properties, which might be helpful:  
[https://garfieldpp.web.cern.ch/examples/gasfiles/](https://garfieldpp.web.cern.ch/examples/gasfiles/)

---

<div class="post-metadata">

**Author:** ![Tahany](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/c6cbf5/32.png) [@Tahany](https://root-forum.cern.ch/u/Tahany)\
**Post date:** [May 15, 2021, 10:15am UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/6 "2021-05-15T10:15:16Z")

</div>

Many thanks for your reply and the website you attached , it was really helpful 🙂

For pot2.C program , it can’t superimpose more than two gas files , I have tried but it doesn’t work . anyway, I wrote a root script with the data retrieved from the gas files to plot them .

---

<div class="post-metadata">

**Author:** ![Tahany](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/c6cbf5/32.png) [@Tahany](https://root-forum.cern.ch/u/Tahany)\
**Post date:** [May 16, 2021, 8:47am UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/7 "2021-05-16T08:47:55Z")

</div>

Hello @hschindl ,

I have a question regarding the longitudinal diffusion coefficient (DL),  
when I made a comparison of longitudinal diffusion coefficient of Pure Freon under different temperature , I found the attached plot which clarify an asymmetric behavior of DL with the Temperature !!! I can’t understand the reason for that , so Do you have an explanation?!  
[Dl with diff T.pdf](https://root-forum.cern.ch/uploads/short-url/454WkZxYPOnFk6Kp1G67r4Mu1VI.pdf) (14.1 KB)

---

<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:** [May 30, 2021, 8:48am UTC](https://root-forum.cern.ch/t/comparison-of-two-gas-files/44690/8 "2021-05-30T08:48:37Z")

</div>

Closed on May 30, 2021, 8:48am UTC

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