TTree::Draw()

Hello there!

Is it possible to draw a histogram from a tree, where I do some calculations to the variables.
i.e.
TTree->Draw("(Frequency-b)*a[n]:Phase");

where my branches are Frequency and Phase and b and a are coefficients. I have tried it in my code and it says that a and b are bad numerical expressions.

Thanks
Belen

The argument to TTree::Draw is a string !!

You can solve your problem in the following way:

double b = something;
double a[] = {some values};
tree->Draw(Form(“frequency-%g)*%g:Phase”,b,a[n]);

Rene