Normalization by a chosen entry when drawing a tree

Hi

The Draw method of the TTree class provides a neat way to interactively plot an Array[] leaf element against the entry numner, such as:

TTree->Draw(“Array[0]:Entry$”); // to plot the first array element against entry number.

However, it would be even nicer to be able to normalize the plot by a chosen element of a chosen entry, e.g. using the first entry or first element. It would look something like:

TTree->Draw(“Array[0]/Array[Entry$==0]:Entry$”);

and similarly, something like:

TTree->Draw(“Array[]/Array[Iteration$==0]:Iteration$”);

Is there a way to do what are described above interatively?

Vihoa

Hi,

If I understood correctly, TTree->Draw(“Array/Array[Iteration$==0]:Iteration$”); is simplyTTree->Draw("Array[]/Array[0]:Iteration$");

Cheers,
Philippe.

Phillipe,

Thanks for your suggestion, which does what I wanted to do, allthough I was essentially looking for a way not to have to first create the Normalization variable.

It is now clear from your answer that it is not possible GET and HOLD still a key variable like Entry$ or Iteration$ at a certain “index”. That is OK. I was just wondering if it was possible.