I would like to make a graphical cut (TCutG) on a two-dimensional plot of two custom functions. I have written two custom functions func1() and func2(), which do some processing on the leaves of a TTree. I can use them as follows:
However, this command
Likewise, creating the TCutG from scratch doesn’t help:
root  TCutG *cutg = new TCutG("mycutg", 5)
root  cutg->SetVarX("func1.cpp")
root  cutg->SetVarY("func2.cpp")
root  /* All the cutg->SetPoint() commands go here */
root  tree->Draw("x","mycutg")
Error in <TTreeFormula::Compile>: Bad numerical expression : "func1.cpp"
Error in <TTreeFormula::Compile>: Bad numerical expression : "func2.cpp"
Is there any way to work around TTree’s limitations?
Thank you in advance,