Local electric fields in ensembles of composite nanoparticles