Variations of solar, interplanetary, and geomagnetic parameters with solar magnetic multipole fields during Solar Cycles 21–24