Too many operators!

Hey all,

I’m trying to perform a resonant capture stellar reaction rate calculation and for those of you not familiar with one it basically involves a sum of many exponentials.
In my case that number is ~60. Each exp has a resonance strength parameter as well so that means ~120 parameters in a TF1.
I’ve attached my code, root cannot seem to perform the calculation saying it’s “too many operators” and I was wondering if anyone had a better idea how to code this using root or if it’s even possible. Thanks!

ReactionRates.C (1011 Bytes)

Here’s the file with the resonance strengths and energies that the above attached code references.
OmegaGammas.txt (1009 Bytes)

You can create a TF1 from a general free function like:

double myfunc(double *x, double *p) { 
   // function implementation
   double y =  ....
   return y;

TF1 * f = new TF1("f","myfunc",xmin,xmax,npar);

This mode is preferable for complex functions, since you can run then efficiently (in terms of CPU) in compile mode.
See also the doc for TF1:

Best Regards


Thanks a bunch, that did the trick!