Hello,
I am encounting such a problem: There are events with different number of tracks. I want to use Tcut to select events with each track having a pt>0.1
Unless you maximum number of track is relatively small, there is no practical solution using string based cuts. You could do:
TCut ptcut = "(abs(Pt[0])>0.1) && (abs(Pt[1])>0.1) && Alt$(1, abs(Pt[2])>0.1)) && Alt$(1, abs(Pt[3])>0.1)) && Alt$(1, abs(Pt[4])>0.1)) && ... ");Where Alt$(1,Pt[4]>0.1) will be equal to 1 if Ntrk is less than 4 and equal to Pt[4]>0.1 if Ntrk is greater or equal to 4.
If your maximum number of track is too large you will to use a MakeProxy and MakeSelector.