Minimizing capital injections by investment and reinsurance for a piecewise deterministic reserve process model