Weighting a variable

Dear ROOT users,
Can someone confirm if I’m using the drawing function correctly for adding a weight to a variable? For example I want to plot velocity and weight it with its speed, thus I have done so like this:

TBranch->Draw(“velocity” , “speed” )

This is correct? Or is there something I have misunderstood?
Thanks

Kim

It is correct. See TTree::Draw documentation.

Rene

[quote=“brun”]It is correct. See TTree::Draw documentation.

Rene[/quote]

Thanks, I read it and didn’t quite get it so wanted to make sure. Thank you.