Add TMVA training code (big mess, needs to be cleaned up)