Charge Losses in Silicon Sensors and Electric-Field Studies at the Si-SiO$_2$ Interface