following the example of TTreeReader found here, suppose I have the following:
TTreeReaderArray<double> jetPt(reader, "jetpT"); TTreeReaderArray<double> jetEta(reader, "jetEta"); TTreeReaderArray<double> jetPhi(reader, "jetPhi"); // and so on...
Now I want to sort them all as the elements of the
jetPt decrease. Clearly, I cannot do it with
int n = sizeof(jetPt)/sizeof(jetPt); sort(jetPt, jetPt+n, std::greater<double>());
, because it will sort only the
jetPt array, and I won’t be able to find which index of sorted
jetPt corresponds to index of the unsorted
jetPhi. Is there any way to do what I want?
ROOT Version: 6.14/04