On Fri, 11 Apr 1997, Ivan So wrote:
> A useful construct in using Draw is:
>
> ntuple->Draw("z:x:y","z < maxz && z > minz", ...)
>
> where maxz and minz are general constants computed in an interactive root
> session. The maxz and minz may depend on the data in ntuple and
> other functions.
>
> How can we accomplish this with all our data in ntuple?
>
> Ivan
> so@bnl.gov
>
>
You can do it this way:
Char_t Cuts[80];
Float_t maxz = ntuple->GetMaximum("z") - 50;
Float_t minz = ntuple->GetMinimum("z") + 50;
sprintf(Cuts,"z < %f && z > %f", maxz, minz);
ntuple->Draw("z:x:y",Cuts);
Christian
---
Christian Bormann
bormann@ikf.uni-frankfurt.de
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:18 MET