Hello dear Rooters,
I’ve written a program to identify pulse overlap. What I want is to separate the pulses overlapping and then extract the pulse’s features individually (rise time, maximum, area, etc). To do that, I fit a TGraph instance containing the isolated pulse overlap. The TF1 function that fits a single pulse has two parameters, f(t; [0], [1]), so when I want to fit the pulse overlap the fitting function has a form like F(t; [0], ..., [2n-1]) = f(t; [0], [1]) + f(t-t1; [2], [3]) + ... + f(t-tn; [2n-2], [2n-1])
, where n is the number of pulses overlapping. n is unknown a priori.
I’d like to write that sum as a sigma summation with n as parameter to be provided, F(t; [0],...,[2n-1]) = summation( f(t-ti); [2i-2], [2i-1], i = 1..n)
, so that the fitting method creates the necessary number of f() functions every time that it’s called, without having to define a function for every n case ( n up to 5 in practical cases). This would save me a lot of repetitive lines and actually would cover many more n cases (as I won’t write down fitting functions for every n case).
I already looked it up on the ROOT User Guide but I didn’t find anything. Hope I was just no exhaustive in my search and you can help me by posting any relevant/important documentation.
Thanks in advance, everyone!
Daniel