Hello,
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:
tree->Draw("func1.cpp");
tree->Draw("func2.cpp");
However, this command
tree->Draw("func1.cpp:func2.cpp");
fails with
Likewise, creating the TCutG from scratch doesn’t help:
root [6] TCutG *cutg = new TCutG("mycutg", 5)
root [7] cutg->SetVarX("func1.cpp")
root [8] cutg->SetVarY("func2.cpp")
root [9] /* All the cutg->SetPoint() commands go here */
root [10] 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,
Davide