# Plotting input variables for specific MVA cut

**URL:** <https://root-forum.cern.ch/t/plotting-input-variables-for-specific-mva-cut/27566>\
**Category:** TMVA\
**Created:** [January 15, 2018, 6:25pm UTC](https://root-forum.cern.ch/t/plotting-input-variables-for-specific-mva-cut/27566 "2018-01-15T18:25:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alkass](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@Alkass](https://root-forum.cern.ch/u/Alkass)\
**Post date:** [January 15, 2018, 6:25pm UTC](https://root-forum.cern.ch/t/plotting-input-variables-for-specific-mva-cut/27566/1 "2018-01-15T18:25:18Z")

</div>

Hello

In the .root file one gets from TMVA, there are the TrainTree and TestTree which also contain the input variables - So, using something like

TestTree-\>Draw(“var1”,“BDT\>x”) one can easily draw the input variable for a specific range of the BDT method. The problem is that there are only the Bkg variables saved, so it is not possible to also plot the same variable for signal. Is there a solution to this ? I am using TMVA under CMSSW8025 (root 6.06)

Thanks

Alex

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [January 15, 2018, 8:55pm UTC](https://root-forum.cern.ch/t/plotting-input-variables-for-specific-mva-cut/27566/2 "2018-01-15T20:55:34Z")

</div>

Hi @Alkass,  
could it be this is an issue with the specific program that produced your trees?  
Can that program be modified to also store the signal variables in your trees?  
Note that often they are in a different tree than the background variables.

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![Alkass](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@Alkass](https://root-forum.cern.ch/u/Alkass)\
**Post date:** [January 16, 2018, 9:13am UTC](https://root-forum.cern.ch/t/plotting-input-variables-for-specific-mva-cut/27566/3 "2018-01-16T09:13:55Z")

</div>

Hello

No, my Classification .C is like any other, so the variables are formed and pushed via the factory for training/testing…So I am expecting to get trees for both S and B separately, no ?

Cheers

Alex

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [January 16, 2018, 12:46pm UTC](https://root-forum.cern.ch/t/plotting-input-variables-for-specific-mva-cut/27566/4 "2018-01-16T12:46:54Z")

</div>

The `TrainTree` and `TestTree`'s will have a branch called `classID` with which you can select events from a particular class. E.g. `TestTree->Draw("var1", "BDT>x && classID==0")`.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![Alkass](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@Alkass](https://root-forum.cern.ch/u/Alkass)\
**Post date:** [January 16, 2018, 12:57pm UTC](https://root-forum.cern.ch/t/plotting-input-variables-for-specific-mva-cut/27566/5 "2018-01-16T12:57:30Z")

</div>

ah! Great, did not realise that

Cheers

Alex
