Refractive index sensing based on semiconductor nanowire lasers