Build TF1 function

Hi experts,
I have a problem when build a function with TF1 type. For example, I have a variable Double_t w_mass, and it depends on another variable Double_t mu_pz. After a complex calculation, the w_mass is dependent on variable mu_pz as a quadratic “function”. I wanna build a TF1 type function use w_mass and take mu_pz as varialbe. How can I make it?
The caculation from Double_t mu_pz to Double_t w_mass is related to many variables defined in previous code, so it’s not convenient to define a c++ function which take mu_pz as input, w_mass as return variable, then build a TF1 type function. Because it’s not convenient to use many varialbes defined out the c++ function body. Can you give me instructions?

Best regards
Renqi Pan

See types “3.” to “6.” in: TF1

Hi Wile,
I have read TF1 reference carefully. type 3-6 of TF1 use a c++ function to build a TF1. But I am afraid that in my case it can’t work.
best regards

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