Re: [ROOT] Drawing tree with weight function

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Jul 02 2001 - 22:53:17 MEST


Hi Slava,
In PAW, the uwfunc.f function was generated by the command uwfunc.
In ROOT, you can have the same in generating the skelton analysis code
with TTree::MakeClass or MakeSelector.
See Users Guide for more details and examples.

Rene Brun


On Mon, 2 Jul 2001, Viatcheslav Kouznetsov wrote:

> Hi ROOTers!
> I have a little question.
> How I can draw tree with a my weight function?
> An example:
> 
> //------MyMacro.C------
> // x, y, z - variables from MyTree
> 
> Float_t MyFunc(Float_t x, Float_t y)
> {
> /*
>   Something doing with x & y
>   Very complicated and big code.
> */
>  return some_weight;
> }
> 
> void MyMacro()
> {
>   Tree *t = (Tree *) gROOT->FindObject("MyTree");
>   t->Draw("z",???????);
> }
> 
> //------End of MyMacro.C------
> 
> ??????? - It's a MyFunc(x, y) or something else?
> I want to draw "z*some_weight"
> 
> 
> In the PAW, I can just use UWFUNC, e.g.
> PAW> nt/pl 1.z uwfunc.f
> 
> Best wishes,
>    Slava.
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:51 MET