About selection

Hi,
I understand “selection” is a very popular thing in root, such as:

tree->CopyTree(YourSelection);

The selection is “char *” defined such as “myleaf >= 0.5”. However, sometimes I don’t know 0.5 ahead of time, I have to calculate it and then give it to the selection. How can I realize that? What I tried:

float mycutvalue = 0.25*3;
tree->CopyTree(“myleaf >= mycutvalue”);

Of course, this is not working. Any hint?

Cheers,
Zhiyi.

do:

tree->CopyTree(Form("myleaf >= %g",mycutvalue));
Rene

Great! Thanks.

[quote=“brun”]do:

tree->CopyTree(Form("myleaf >= %g",mycutvalue));
Rene[/quote]