I want to set the max step size only for certain particles. From the documentation, it doesn't seem that you can do this - have I missed something? I understand how to set, say, the maximum track length only for, e.g., electrons and positrons, but setting the maximum step size for a volume seems to apply to all particle in that volume. This makes the simulations very slow; ideally, I want to track electrons and positrons with a very small step size, but let photons travel through the volume with their normal step size.
do not use the UserLimit class, but set the stepMax as a full process. This is demonstrated in examples/extended/electromagnetic/TestEm5 or TestEm7. The process is in the StepMax class. You can register this process only in the physics list of some particles, or take advantage of the function IsApplicable()