# How to access the Diffusion Coefficients calculated by Garfield to do calculations

**URL:** <https://root-forum.cern.ch/t/how-to-access-the-diffusion-coefficients-calculated-by-garfield-to-do-calculations/58411>\
**Category:** Garfield++\
**Created:** [March 6, 2024, 3:06pm UTC](https://root-forum.cern.ch/t/how-to-access-the-diffusion-coefficients-calculated-by-garfield-to-do-calculations/58411 "2024-03-06T15:06:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aneesha6](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aneesha6/32/28535_2.png) [@Aneesha6](https://root-forum.cern.ch/u/Aneesha6)\
**Post date:** [March 6, 2024, 3:06pm UTC](https://root-forum.cern.ch/t/how-to-access-the-diffusion-coefficients-calculated-by-garfield-to-do-calculations/58411/1 "2024-03-06T15:06:43Z")

</div>

I am running the example “~/garfiledpp/Examples/Gasfile/generate.C” to generate a gas file. I now want to retrieve the Diffusion coefficients from the gas file and use their values to calculate the electron cloud size as the electron drifts along the electric field. My question is: What function do I use to get those D values?  
GetElectronDiffusion() does not seem to be a defined function in Magboltz, even though GetElectronTownsend() is and GetElectronVelocity() is.  
Could someone please inform me how to access the calculated values of the other transport quantities?

---

<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 6, 2024, 3:24pm UTC](https://root-forum.cern.ch/t/how-to-access-the-diffusion-coefficients-calculated-by-garfield-to-do-calculations/58411/2 "2024-03-06T15:24:54Z")

</div>

The methods are called `GetElectronLongitudinalDiffusion` and `GetElectronTransverseDiffusion`.

---

<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:** [March 20, 2024, 3:24pm UTC](https://root-forum.cern.ch/t/how-to-access-the-diffusion-coefficients-calculated-by-garfield-to-do-calculations/58411/3 "2024-03-20T15:24:54Z")

</div>

Closed on March 20, 2024, 3:24pm UTC

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