Tutorial on TMVA Classifiers

Hi all,
I am very new to TMVA and have so far only used python for classifiers. Now I used the tutorial for the TMVAClassification and used my personal data (which did give quite nice results). The used data for training etc was simulated data and now I would like to apply this trained classifier on my real data. I would expect the functionality to be as follows: I pass a Tree with real data to the classifier which then gives me some kind of an array as an output containing 0 and 1 for background and signal (or something similar). However the Tutorials on this point seem kind of complicated and I do not really understand, which one of the different one is the important one in my case. Maybe someone can tell me, where I should look to most efficiently get to the solution.

I guess @moneta can help you

Were you able to find information about this? I am in a very similar position.

There is a Macro called TMVAClassificationApplication which did kind of what I wanted. It is a little bit difficult to first understand this. In the end, the Macro TMVAClassification creates a root file that contains everything you need to have (called TMVA.root or similar). The Application Macro then has an object called TReader that loads this file. Afterwards you have to book a method (the one you trained before). Lastly you iterate over your TTree that contains the data you want to classify and for each value you can let this reader calculate a value (depending on the type of classifier for example from -1 to 1) and then you have to simply take the data with a value above threshold and call this your signal.
I hope I could help a little, but sadly I myself am no expert on this topic yet.

Emil, thank you very much. This information was really helpful!

1 Like