*added sections determining where the segment with highest energy is found
currently not writing segment number into tree