# Zero Events Pass Background Selection with TMVA

**URL:** <https://root-forum.cern.ch/t/zero-events-pass-background-selection-with-tmva/20045>\
**Category:** TMVA\
**Created:** [October 19, 2015, 8:33pm UTC](https://root-forum.cern.ch/t/zero-events-pass-background-selection-with-tmva/20045 "2015-10-19T20:33:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dabalaba](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@dabalaba](https://root-forum.cern.ch/u/dabalaba)\
**Post date:** [October 19, 2015, 8:33pm UTC](https://root-forum.cern.ch/t/zero-events-pass-background-selection-with-tmva/20045/1 "2015-10-19T20:33:06Z")

</div>

I’m working with TMVA to classify signal and background events, and I am trying to apply a selection criteria on the training/testing data for both the signal and background samples. This is the code I used for the selection:

```
TCut mycut = "jet1_pt > 500000 && jet1_pt < 1320000 && jet2_pt > 320000 && jet2_pt < 1320000";
factory->PrepareTrainingAndTestTree( mycut, "SplitMode=random:!V" );

```

With this, the signal events get about 92% efficiency, but none of the background events pass at all, which shouldn’t happen. I tried simplifying the background selection requiring that jet1\_pt \> 0 with the following:

```
TCut mycut = "jet1_pt > 500000 && jet1_pt < 1320000 && jet2_pt > 320000 && jet2_pt < 1320000";
TCut temp = "jet1_pt > 0";
factory->PrepareTrainingAndTestTree( mycut, temp, "SplitMode=random:!V" );

```

Which does exactly as I expect: signal events still have about 92% efficiency and all of the background events pass (100% efficiency). So then I increased the bound on background jet1\_pt from 0 to very low numbers (tried: 10, 1, 0.1, 0.00000001), and again none of the events pass the background selection.

I checked the plot of jet1\_pt for the background sample with TBrowser, and I don’t see anything wrong. There is a large peak around 400000-800000 (units of MeV), the total number of events is about 3 million, and TMVA claims to see 3.2 million events before the selection.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [October 21, 2015, 6:55am UTC](https://root-forum.cern.ch/t/zero-events-pass-background-selection-with-tmva/20045/2 "2015-10-21T06:55:26Z")

</div>

Hi,

Our math/TMVA expert is away until next week, but he will take care of this once back.

Cheers, Bertrand

---

<div class="post-metadata">

**Author:** ![hvoss](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/cc9497/32.png) [@hvoss](https://root-forum.cern.ch/u/hvoss)\
**Post date:** [October 26, 2015, 1:42pm UTC](https://root-forum.cern.ch/t/zero-events-pass-background-selection-with-tmva/20045/3 "2015-10-26T13:42:01Z")

</div>

Hello,

i’ve tried to reproduce your problem but wasn’t able to. Could you perhaps prepare a small scrip+data subsample which would reproduce the problem ??

Which TMVA/ROOT version do you use?

Cheers,

Helge
