Re: Cuts in TTree:Draw

From: Rene Brun <>
Date: Sat, 9 Apr 2005 08:49:35 +0200 (MEST)

Hi Thomas,

With the current version, you can do, eg

 T->Draw("A","rndm < probhist->GetBinContent(50)");


TTree::Draw does not support nested calls to member functions and it does not support a Tree variable as an argument in a function call (although this could be implemented).

When you have this type of problem, use the TTree::MakeProxy mechanism to specify your selection mechanism in normal C++

Rene Brun

On Fri, 8
Apr 2005,
Thomas Bretz

> Hi,
> I have an object stored to a TTree containing two variables A and B. Now
> I want to get a histogram of A such, that B follows a probability
> distribution given in another histogram (probhist), is this possible?
> eg
> T->Draw("A", "gRandom->Uniform() <
> probhist->GetBinContent(probhist->FindFixBin(B))");
> Thanks in advance,
> Thomas.
Received on Sat Apr 09 2005 - 08:49:39 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET