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?