Re: [ROOT] How to draw a max(x,y) from an ntuple

From: Luiz Martins Mundim Filho (mundim@uerj.br)
Date: Sun Jun 16 2002 - 17:59:57 MEST






  


Hi Rene

The support for any user defined function directly on the cut and draw operations would be great. I've already been faced a lot of time with such a situation and could not solve it in the maner I thing is the best and more effective. I'm looking forward to have the version with this implementation.

Thanks a lot

Luiz

Rene Brun wrote:
Hi Luiz,

I have added support for min and max functions in the development version
in CVS. Meanwhile you can emulate these functions with eg:
    tree.Draw("x*(x<y) + y*(y<x)")

We are planning to add support for any user defined functions of the
original tree variables.

Rene Brun

On Sat, 15 Jun 2002, Luiz Martins Mundim Filho wrote:

  
Hi

I have an ntuple with mass1 and mass2 (among others) and I need to plot 
and cut the minimux and maximum between them. I tried to use 
ntuple->Draw("min(mass1,mass2)") and also 
ntuple->Draw("TMath::Min(mass1,mass2)"), but it did not work. I find out 
that the min (and max) functions are not between the C functions that 
can be used on cuts (and draw operation). How can I do that from the 
command line? I need to study a lot of plots to  find a better cut and 
it is not straightforward to do that using macros ou MakeSelector.

Thanks.

Luiz Mundim

    

  



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:57 MET