findMaxCost function

Find maximum tracking cost