# Plotting bdt output over a input variable

**URL:** <https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031>\
**Category:** TMVA\
**Created:** [May 22, 2021, 2:47pm UTC](https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031 "2021-05-22T14:47:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rithishbarath](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rithishbarath/32/23840_2.png) [@rithishbarath](https://root-forum.cern.ch/u/rithishbarath)\
**Post date:** [May 22, 2021, 2:47pm UTC](https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031/1 "2021-05-22T14:47:34Z")

</div>

How to place a cut on the BDT output \> 0 and calculate the amount of background removed and signal removed from a specific input variable’s distribution? How to do this using TMVAAPPLICATION.C?  
How to plot a variable distribution over a BDT output?

---

<div class="post-metadata">

**Author:** ![rithishbarath](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rithishbarath/32/23840_2.png) [@rithishbarath](https://root-forum.cern.ch/u/rithishbarath)\
**Post date:** [May 24, 2021, 3:55am UTC](https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031/2 "2021-05-24T03:55:59Z")

</div>

@moneta please help

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 25, 2021, 7:54am UTC](https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031/3 "2021-05-25T07:54:39Z")

</div>

> [@rithishbarath](#):
>
> How to do this using TMVAAPPLICATION.C?

What is “TMVAAPPLICATION.C” ?

---

<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:** [May 25, 2021, 2:09pm UTC](https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031/4 "2021-05-25T14:09:58Z")

</div>

I think he refers to the tutorial [ROOT: tutorials/tmva/TMVAClassificationApplication.C File Reference](https://root.cern.ch/doc/master/TMVAClassificationApplication_8C.html),  
correct ?  
With the `TMVA::Reader` class you can evaluate your trained model, get the BDT output and then perform your analysis, for example counting how many events pass the criteria BDT output \> 0.

Note that after the classification (shown in the tutorial TMVAClassification.C) you get an output file that you can examine with the TMVA GUI

Lorenzo

Lorenzo
