Re: ?: TTree->Draw() with a cut on value in another TClonesArray

Rene Brun (Rene.Brun@cern.ch)
Mon, 30 Mar 1998 09:03:31 +0200


Dirk Meier wrote:
>
> Hi,
>
> I draw values from a TTree in a histogramm like
>
> aTree->Draw("fData->Signal","fData->fPlaneNumber==1");
>
> where fData is a pointer to a TClonesArray in events in the TTree.
> So far so good.
>
> My event has another TClonesArray with a pointer fTracks to it.
> I try to draw the same histogram under a certain condition
> of values in the second TClonesArray, like
>
> aTree->Draw("fData->Signal","fData->fPlaneNumber==1 &&
> fTracks->fChiSquare<30.");
>
> The second cut has no effect.
> Also I tried something like
>
> aTree->Draw("fData->Signal:fTracks->fChiSquare","fData->fPlaneNumber==1");
>
> which gives a histogram which make no sense..
>
> I can draw these histograms, of course if I read the events
> in a loop and fill a histogramm according to the cuts.
> But I would like to do it in one commandline.
>
> Is such a construction impossible?
>
> Dirk Meier

Dirk,
The notation "->" is not accepted, only ".". I cannot understand
how your first "successful" example can work.
Contact me directly with an example of file and macro.

Rene Brun