Hi,
Assume I have a tree with three variables var1, var2, var3
I use the following code to draw a 2D plot:
tree -> Draw("var1:var2>>hh1");
How do I add a weight=var3 for this histogram?
Same question for plotting a profile:
tree -> Draw("var1:var2>>hh1", "", "prof");
Another tree-related question: How do I set my own binning while Drawing from tree.
For example I want the binning twice smaller then root does automatically.
[quote]How do I add a weight=var3 for this histogram?
Same question for plotting a profile:
Code:
tree -> Draw(“var1:var2>>hh1”, “”, “prof”);
[/quote]Do:
tree -> Draw("var1:var2>>hh1", "var3", "prof");
[quote]Another tree-related question:
How do I set my own binning while Drawing from tree.
For example I want the binning twice smaller then root does automatically.[/quote]
Do
tree -> Draw("var1:var2>>hh1(50,xmin,xmax)", "var3", "prof");
see doc
well! the first thing to do when using TTree::Draw is to read the documentation of this function. see: root.cern.ch/root/html/TTree.html#TTree:Draw
and read the chapter about Trees in the Users Guide.