Dear experts,
I want to store the rank of a variable as a new branch in my root file. I have a root file ( attached). It has a tree “dsubszerostp”, which consist of a number of branches. As I do,
dsubszerostp->Scan(“BDT:evt_no”)
I can see that an event number ,for e.g. event number 4, has more than one values of the variable BDT. Now in an event I want to arrange these BDT values in the descending order, and provide the rank to each of the BDT values. I want to provide the rank 1 to the highest value of BDT in that event, 2 to the second highest and so on. Repeat the same for all the events and eventually store this “rank” for all the events as a separate new branch in the tree dsubszerostp.
As a newbie in root and c++ I am struggling to execute this idea in the codes. Could any one help me on this? How do I get started? Any kind of help will be highly appreciated.
Bs2Ds0STplnul-Cands_BDT.root (2.3 MB)
Regards,
Bibek