Dynamics of a rodlike deformable particle passing through a constriction