TMVA feeding input variables

Hi Everybody ,
as I am playing with TMVA tutorial file , I can see input variables have been fed from tree’s variables from a ntuple file. but variables I needed to use for TMVA are not at Trees, they have been calculated at event loop .
I wonder if there is a way to feed TMVA by calculated variables from events, if yes I appreciate to have some tips .


There are 2 phases in TMVA: training and application. We suppose that you do not want to do the training in an event loop, but rather select training events beforehand (using MC, or calibration data), and write these into a tree (or - if you prefer - an ascii file).

Once the training done, TMVA produces weight files from which you can recreate the classifier you want to use for your actual data analysis. This you can apply within your event loop. It is done in the “TMVApplication.C” example. (Training is TMVAnalysis.C). Have a look at the users guide: