Transient Monte Carlo analysis and application to heterojunction bipolar transistor switching