macros used to sort samples in a finite pT hat range