Only make vector of DetectorElements if needed (i.e. for Run 4) (23.0 edition)
See merge request !63845 (merged) - I put this into the wrong branch
(cherry picked from commit 5523b51b)
87ae2138 Only make vector of DetectorElements if needed (i.e. for Run 4) 5eae2c63 Remove commented out code