Concerning TTree::Draw()/Project()

Hi everybody,

Two questions concerning quick analysis with TTree::Draw() and/or TTree::Project()

  1. When doing something like:

where hist is not yet existing, is there a way to tell root to “call Sumw2()” for hist before filling it? I know that I could construct the hist before calling Draw, but that is not what I want.

  1. The root documentation says that the normal format of the selection parameter of TTree::Draw() is:

Does something like:

also work?

Thanks in advance,

Mathias

[quote]1) When doing something like:
Code:
tree->Draw(“var >> hist(n, min, max)”)

where hist is not yet existing, is there a way to tell root to “call Sumw2()” for hist before filling it? I know that I could construct the hist before calling Draw, but that is not what I want.
[/quote]

do

tree->Draw("var >> hist(n, min, max)","',"e")

[code]2) The root documentation says that the normal format of the selection parameter of TTree::Draw() is:
Code:
“weight*(boolean expression)”

Does something like:
Code:
“weight1*(boolean expression 1)+weight2*(boolean expression 2) …”

also work?
[/code]
Yes

Rene

Thank you for the quick response!