Does Max() return index in TTreeFormula?

Dear all,

Just a quick question, maybe someone has an idea on how to get it work if using TTree::Draw,

I would like to get the index of the max element in the TTree’s array,
the max element itself I am drawing like this: tree->Draw(“Max$(array1) >> h1”);
but what I would like to do next is to use array2, array3, … where I would like to put the index of the
max element from array1. Any ideas if it is possible within TTreeFormula without doing any additional loops ?

Thanks,

Kirill

Hi,

Try:Draw("array2:array3","array1==Max$(array1)");

Cheers,
Philippe.