code for TMVA, shape limits and plotting