# On histograms fills and data dependency: Potential misuse of \`Fill\`, its consequences, and possible additional ROOT feature

**URL:** <https://root-forum.cern.ch/t/on-histograms-fills-and-data-dependency-potential-misuse-of-fill-its-consequences-and-possible-additional-root-feature/53535>\
**Category:** ROOT\
**Created:** [February 8, 2023, 6:37pm UTC](https://root-forum.cern.ch/t/on-histograms-fills-and-data-dependency-potential-misuse-of-fill-its-consequences-and-possible-additional-root-feature/53535 "2023-02-08T18:37:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [February 10, 2023, 7:21pm UTC](https://root-forum.cern.ch/t/on-histograms-fills-and-data-dependency-potential-misuse-of-fill-its-consequences-and-possible-additional-root-feature/53535/4 "2023-02-10T19:21:49Z")

</div>

@gabrielle.hugo It seems to me that you try to completely neglect cases when γs (analyzed per event) fall into different bins. This actually introduces correlated uncertainties among the bins, and ROOT cannot deal with them:

> [@Fitting histogram with correlated systematic uncertainties](https://root-forum.cern.ch/t/fitting-histogram-with-correlated-systematic-uncertainties/53185/6):
>
> Hi, We don’t have at the moment examples of fitting data where the points have correlated errors. You need in this case to write yourself the Chi-square function using the correlation matrix. We have however some example on fitting a user provided method, like this one fitting a 3D line to 3D points ([ROOT: tutorials/fit/line3Dfit.C File Reference](https://root.cern.ch/doc/master/line3Dfit_8C.html)). Best regards Lorenzo

---

_[View the full topic](https://root-forum.cern.ch/t/on-histograms-fills-and-data-dependency-potential-misuse-of-fill-its-consequences-and-possible-additional-root-feature/53535)._
