Once TTree::Draw has been called, it is possible to access useful
information still stored in the TTree object via the following functions:
-GetSelectedRows() // return the number of entries accepted by the
//selection expression. In case where no selection
//was specified, returns the number of entries processed.
-GetV1() //returns a pointer to the double array of V1
-GetV2() //returns a pointer to the double array of V2
-GetV3() //returns a pointer to the double array of V3
-GetW() //returns a pointer to the double array of Weights
//where weight equal the result of the selection expression.
where V1,V2,V3 correspond to the expressions in
TTree::Draw(“V1:V2:V3”,selection);
Example:
Root > ntuple->Draw(“py:px”,“pz>4”);
Root > TGraph *gr = new TGraph(ntuple->GetSelectedRows(),
ntuple->GetV2(), ntuple->GetV1());
Root > gr->Draw(“ap”); //draw graph in current pad
creates a TGraph object with a number of points corresponding to the
number of entries selected by the expression “pz>4”, the x points of the graph
being the px values of the Tree and the y points the py values.
[/code]