Code with new THcScintillator functions.