I am wondering if it is possible to identify two parameters in a TF* so that when doing a fit, the two parameters are treated as a single parameter. E.g. if I have a TF1,
can I after the fact set the two parameters as one? As if I had written “x*+/x”?
The reason I want to do this is that I have a big TF2 which is the sum of three two-dimensional Gaussians. It has 18 parameters (each Gaussian has an amplitude, (x,y) central value and sigma, and correlation coefficient). To make this function I first create a single 2D Gaussian using a TFormula:
TF2 f2_e("f2_e","/(2.0*pi***sqrt(1.0-**2))*exp( -1.0/(2*(1-**2)) * ( ((x-)/)**2 + ((y-)/)**2 - 2**(x-)*(y-)/(*) ) )",xmin,xmax,ymin,ymax);
Then I clone it twice, giving the clones the names “f2_mu” and “f2_pi”. Then I add them into a big TF2:
I set the parameters and parlimtis of this big TF2 and use it to fit a TH2D. I want to try the fit with the correlation coefficients all equal , , and , but I would rather not have to put in a TFormula with 17 parameters…