bug fixes in median and variance calculation. Fixed number of tracks corresponding to a jet