code for treshold calculation
class for the reco tree