# How do I produce output distributions for signal and background events from the test sample in TMVA?

**URL:** <https://root-forum.cern.ch/t/how-do-i-produce-output-distributions-for-signal-and-background-events-from-the-test-sample-in-tmva/40160>\
**Category:** Newbie\
**Tags:** tmva\
**Created:** [June 30, 2020, 8:21pm UTC](https://root-forum.cern.ch/t/how-do-i-produce-output-distributions-for-signal-and-background-events-from-the-test-sample-in-tmva/40160 "2020-06-30T20:21:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uwagura](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/uwagura/32/22569_2.png) [@uwagura](https://root-forum.cern.ch/u/uwagura)\
**Post date:** [June 30, 2020, 8:21pm UTC](https://root-forum.cern.ch/t/how-do-i-produce-output-distributions-for-signal-and-background-events-from-the-test-sample-in-tmva/40160/1 "2020-06-30T20:21:08Z")

</div>

I’m trying to produce histograms of the distributions of the signal and background events from a TMVA test sample. In other words, I’m trying to produce the histograms in Figure 3 on page 16 of the TMVA [user guide](https://root.cern.ch/download/doc/tmva/TMVAUsersGuide.pdf). The user guide isn’t clear on how it produced the histograms, and neither their TMVAGui nor my own seem to have an option to create the histograms for the test sample ( it does have an option for the training sample though). Does anyone know how to produce the histograms?

* * *

\_ROOT Version: 6.20/04  
\_Platform: Ubuntu on Windows Subsystem for Linux  
\_Compiler: GCC

* * *

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 1, 2020, 8:44am UTC](https://root-forum.cern.ch/t/how-do-i-produce-output-distributions-for-signal-and-background-events-from-the-test-sample-in-tmva/40160/2 "2020-07-01T08:44:04Z")

</div>

@moneta Is this something you could help with?

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [July 1, 2020, 10:47am UTC](https://root-forum.cern.ch/t/how-do-i-produce-output-distributions-for-signal-and-background-events-from-the-test-sample-in-tmva/40160/3 "2020-07-01T10:47:08Z")

</div>

Hi,  
The output file produced by TMVA contains both testTree and TrainTree. If you cannot use the GUI you can get the output variables distributions from the TTree’s, using for example TTree-\>Draw().

Lorenzo

---

<div class="post-metadata">

**Author:** ![uwagura](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/uwagura/32/22569_2.png) [@uwagura](https://root-forum.cern.ch/u/uwagura)\
**Post date:** [July 10, 2020, 2:14am UTC](https://root-forum.cern.ch/t/how-do-i-produce-output-distributions-for-signal-and-background-events-from-the-test-sample-in-tmva/40160/4 "2020-07-10T02:14:16Z")

</div>

This worked, thank you!
