Modeling the entry and trapping of solar energetic particles in the magnetosphere during the November 24–25, 2001 storm