# Please help fitting

**URL:** <https://root-forum.cern.ch/t/please-help-fitting/37233>\
**Category:** Newbie\
**Tags:** hist\
**Created:** [December 17, 2019, 7:19am UTC](https://root-forum.cern.ch/t/please-help-fitting/37233 "2019-12-17T07:19:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaggylee](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@Shaggylee](https://root-forum.cern.ch/u/Shaggylee)\
**Post date:** [December 17, 2019, 7:19am UTC](https://root-forum.cern.ch/t/please-help-fitting/37233/1 "2019-12-17T07:19:10Z")

</div>

Hello Rooters.

I drew the following picture.

![Inkedenergy%20resolution_LI](https://root-forum.cern.ch/uploads/default/original/3X/7/7/77e21f9a17948176145e80e3b296f91a502bd5b8.jpeg)

I want to fit like a blue line and I want to know the function to get as a result of the fitting.

please help…

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [December 17, 2019, 12:12pm UTC](https://root-forum.cern.ch/t/please-help-fitting/37233/2 "2019-12-17T12:12:44Z")

</div>

Through 3 points many functions can be used. It is up to you to decide which one is the most  
appropriate for you particular problem.

---

<div class="post-metadata">

**Author:** ![Dilicus](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dilicus/32/14338_2.png) [@Dilicus](https://root-forum.cern.ch/u/Dilicus)\
**Post date:** [December 17, 2019, 1:38pm UTC](https://root-forum.cern.ch/t/please-help-fitting/37233/3 "2019-12-17T13:38:56Z")

</div>

This seems more a question you should ask to your supervisor.  
If I should guess, I would say it’s how the resolution of a calorimeter vary with the energy.  
In that case the correct function is

```auto
TF1 *f= new TF1("f","TMath::Sqrt( TMath::Pow([0] ,2) + TMath::Pow([1]/TMath::Sqrt(x) ,2) + TMath::Pow([2]/x ,2) )")

```

Look here [EM Calorimeter](https://www.hephy.at/fileadmin/user_upload/VO-6-Calorimeters.pdf)

Cheers,  
Stefano
