TF3 Projection and then TF2 Integral for a fit

Hi Experts,

Recently, I have been trying to fit some data using a TF2 integral, now the TF2 function itself is a projection from a TF3 function. I am attaching the code here for reference.
The issue is that it gives me segmentation fault and I think it’s because of a memory issue, because I have used TFClass too many times. Please help me find a fix.

Thank you and Cheers,
Single (2.4 KB)

@moneta could you please have a look? Thanks!

Dear Rutik,
please find attached a working version of your macro with several corrections.
Main modification is in the TF3Projector class for functions with parameters.
Also, the number of parameters of your function is 5, not 4.
BWModified_Proton1.C (4.2 KB)

1 Like

Dear Rutik,
here is a simpler version of your macro,
without use of TF3Projector.
BWModified_Proton2.C (2.7 KB)

1 Like

Hi @smgrig,
Yes, it works perfectly! Thank you!

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