Measuring CP violation and mass ordering in joint long baseline experiments with superbeams