How to combine two gaussian functions in a histogram?

A histogram contains a numbers of gaussian peaks.
Now how to combine two of the peaks?

ROOT Version: 6.14
Compiler: Not Provided

Can you elaborate a bit what you mean by “combine” ? add ?

I guess “combine” needs to be defined. @moneta may have a an idea about it.

One more thing: how should i write the code for calculating the number of peaks in the histogram.
I have seen this, but i am unable to understand.
Please provide in simpler code how should i execute for loop?

The simplest example is:

In this code i don’t know from which line i should start and to which line i should stop.

The peak search part is:

 TSpectrum *s = new TSpectrum(2*npeaks);
   Int_t nfound = s->Search(h,2,"",0.10);

In the above code you are defining npeaks initially that i want the code to calculate itself.
How it could be possible?
Also ecplain the meaning of

  Int_t nfound = s->Search(h,2,"",0.10);


I would suggest you read the doc of TSpectrum as @Wile_E_Coyote suggested and also try to run and “play with” the example I pointed. You will then better understand how it works. I am afraid I will not be able to tell you more than what is in that example and in the doc.

I understood what does threshold signifies but what does sigma do is still a mystery for me?
Please elaborate more on sigma.


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