# The relationship between uncertainty of diffusion parameters and the number of collisions

**URL:** <https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427>\
**Category:** Garfield++\
**Created:** [December 7, 2023, 8:27am UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427 "2023-12-07T08:27:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiangjc-github](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jiangjc-github/32/27278_2.png) [@jiangjc-github](https://root-forum.cern.ch/u/jiangjc-github)\
**Post date:** [December 7, 2023, 8:27am UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/1 "2023-12-07T08:27:03Z")

</div>

@hschindl  
Hi hschindl,

How can we estimate the relationship between uncertainty of diffusion parameters and the number of collisions?

Best Regards,  
Jiechen

---

<div class="post-metadata">

**Author:** ![mdessole](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mdessole/32/34021_2.png) [@mdessole](https://root-forum.cern.ch/u/mdessole)\
**Post date:** [December 7, 2023, 2:51pm UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/2 "2023-12-07T14:51:34Z")

</div>

Hi @jiangjc-github,  
Thanks for reaching out!  
I think that @hschindl might help with this.

Cheers,  
Monica

---

<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:** [December 7, 2023, 3:10pm UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/3 "2023-12-07T15:10:55Z")

</div>

Yes, sorry for the late reply. I’ll try to give an answer later…

---

<div class="post-metadata">

**Author:** ![jiangjc-github](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jiangjc-github/32/27278_2.png) [@jiangjc-github](https://root-forum.cern.ch/u/jiangjc-github)\
**Post date:** [December 8, 2023, 4:18am UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/4 "2023-12-08T04:18:29Z")

</div>

Hi, hschindl

I found the MediumMagboltz::RunMagboltz could output the uncertainty.  
e.g.: Transverse diffusion: 0.00678657 cm1/2 +/- 0.45%，the value is 100 for noll (typical is 10).

I’m not sure the 0.45% means 0.00678657 +/- 0.0045 cm1/2 or 0.00678657 +/- 0.00678657\*0.45% cm1/2? If the error is former one, the error is relatively high, I thought the number of collisions is larger enough in the simulation.

Although I check the source file, I still don’t understand the meaning and relationship.

Thank you very much for help.

Best regards，

---

<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:** [December 8, 2023, 4:10pm UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/5 "2023-12-08T16:10:47Z")

</div>

> [@jiangjc-github](#):
>
> I’m not sure the 0.45% means 0.00678657 +/- 0.0045 cm1/2 or 0.00678657 +/- 0.00678657\*0.45% cm1/2?

It’s the latter (it’s a relative error).

---

<div class="post-metadata">

**Author:** ![jiangjc-github](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jiangjc-github/32/27278_2.png) [@jiangjc-github](https://root-forum.cern.ch/u/jiangjc-github)\
**Post date:** [December 11, 2023, 1:37am UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/6 "2023-12-11T01:37:55Z")

</div>

Thank you, hschindl

Back to the question, I still don’t understand the relationship between uncertainty of diffusion parameters and the number of collisions?  
dterr = 0.5 \* sqrt(Magboltz::diferl\_.dfter \* Magboltz::diferl\_.dfter +vzerr \* vzerr);  
Could you please explain the equation?  
Thank you very much for help.

Best regards

---

<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:** [December 11, 2023, 3:09pm UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/7 "2023-12-11T15:09:25Z")

</div>

Hi,

the variable `dfter` is the rel. error of the transverse diffusion coefficient (unit: cm / s), `vzerr` is the rel. error of the velocity component in the direction of the electric field. The equation calculates the error of the transverse diffusion parameter (unit: sqrt(cm)).

---

<div class="post-metadata">

**Author:** ![jiangjc-github](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jiangjc-github/32/27278_2.png) [@jiangjc-github](https://root-forum.cern.ch/u/jiangjc-github)\
**Post date:** [December 12, 2023, 9:11am UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/8 "2023-12-12T09:11:04Z")

</div>

Thank you, hschindl,

I know the meaning of the variable after your illustration,  
But I still don’t understand how was it derived for this equation? Could you please explain it?  
I try to find the extern struct function “diferl\_”, but fail to find the concrete content.

Thank you very much.

Best regards

---

<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:** [December 16, 2023, 2:16pm UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/9 "2023-12-16T14:16:10Z")

</div>

`DFTER` is the average of `DXXERR` and `DYYERR` which are computed here:

> **[Magboltz/magboltz.f · master · garfield / garfieldpp · GitLab](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Magboltz/magboltz.f?ref_type=heads#L12031)**
>
> http://garfieldpp.web.cern.ch/garfieldpp/

I must admit I don’t know where the factors in these expressions (L12031, 12032) come from. Need to ask the author of Magboltz…

---

<div class="post-metadata">

**Author:** ![jiangjc-github](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jiangjc-github/32/27278_2.png) [@jiangjc-github](https://root-forum.cern.ch/u/jiangjc-github)\
**Post date:** [December 18, 2023, 1:18am UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/10 "2023-12-18T01:18:25Z")

</div>

Thank you very much for your detailed and helpful information,  
I ‘d like to study it based on your reference.

Best regards,

---

<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:** [January 1, 2024, 1:18am UTC](https://root-forum.cern.ch/t/the-relationship-between-uncertainty-of-diffusion-parameters-and-the-number-of-collisions/57427/11 "2024-01-01T01:18:34Z")

</div>

Closed on January 1, 2024, 1:18am UTC

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