# Pedestal subtraction

**URL:** <https://root-forum.cern.ch/t/pedestal-subtraction/58237>\
**Category:** Newbie\
**Created:** [February 21, 2024, 9:55pm UTC](https://root-forum.cern.ch/t/pedestal-subtraction/58237 "2024-02-21T21:55:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elena\_Veli](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/elena_veli/32/31299_2.png) [@Elena\_Veli](https://root-forum.cern.ch/u/Elena_Veli)\
**Post date:** [February 21, 2024, 9:55pm UTC](https://root-forum.cern.ch/t/pedestal-subtraction/58237/1 "2024-02-21T21:55:52Z")

</div>

Hello, I have some data with pedestal is there an efficient way to subtract the pedestal? Do I fit gaussian and subtract the sigma? Do I do average and subtract the mean? I have a root file with a tree and the branches are the channels with their adc values through the events.

Thank you very much in advance.

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [February 22, 2024, 5:34am UTC](https://root-forum.cern.ch/t/pedestal-subtraction/58237/2 "2024-02-22T05:34:47Z")

</div>

Dear Elena,

Welcome to the ROOT community!  
The answer depends very much on the kind of data you are dealing with and ROOT is not really involved in that.  
I am assuming you want to fit a Gaussian distribution on top of some background. A good way to fit a signal on some background is to use as functional form a polynomial (2nd degree to start) plus a Gaussian.  
I hope this help.

Cheers,  
D
