In a defined benefit pension scheme, such as the BACB Pension Scheme, the amount you are entitled to at retirement is determined by your salary, the duration of your career, and the accrual rate specific to the scheme.
There is a pension fund from which pension payments are made. This fund is invested in the market to provide a return in a way determined by the scheme trustees. The investment performance of the fund does not affect the amount of pension that members receive. The investment risk is borne by the company, as they are ultimately responsible for making good any deficit in the scheme.