# How to add experimental resolution to a 1D Histogram in root

**URL:** <https://root-forum.cern.ch/t/how-to-add-experimental-resolution-to-a-1d-histogram-in-root/50005>\
**Category:** Newbie\
**Tags:** root\
**Created:** [May 17, 2022, 3:07pm UTC](https://root-forum.cern.ch/t/how-to-add-experimental-resolution-to-a-1d-histogram-in-root/50005 "2022-05-17T15:07:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 18, 2022, 12:33pm UTC](https://root-forum.cern.ch/t/how-to-add-experimental-resolution-to-a-1d-histogram-in-root/50005/5 "2022-05-18T12:33:16Z")

</div>

Assuming that “`Aff1`” is in “amu” units and you want to add a Gaussian smearing with “3.5 amu” sigma, you could try:

```cpp
tree->Draw("Aff1 + 3.5 * TMath::Sqrt2() * TMath::ErfInverse(2. * rndm() - 1.) >> h1"); // inverse Gaussian CDF transform sampling

```

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-add-experimental-resolution-to-a-1d-histogram-in-root/50005)._
