Capacitors for electric locomotives