# Rectangular cut can't vary discrete variable

**URL:** <https://root-forum.cern.ch/t/rectangular-cut-cant-vary-discrete-variable/39920>\
**Category:** TMVA\
**Created:** [June 15, 2020, 2:34pm UTC](https://root-forum.cern.ch/t/rectangular-cut-cant-vary-discrete-variable/39920 "2020-06-15T14:34:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheZardoz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@TheZardoz](https://root-forum.cern.ch/u/TheZardoz)\
**Post date:** [June 15, 2020, 2:34pm UTC](https://root-forum.cern.ch/t/rectangular-cut-cant-vary-discrete-variable/39920/1 "2020-06-15T14:34:44Z")

</div>

Hi !  
I am currently trying to use rectangular Cut (methode “Cuts”) from TMVA and i have a set of different type of variable with some i want to vary as continuum way and other in a discret way.

The probleme is the optimiser only vary in a continuum way also for the variables i declared as ‘int’

> factory-\>AddVariable(“varname”,''I");

At the beginning i thought it was the fact that my discrete variable was declared as double in my tree but i try with a int variable from my tree and i have the same issue.  
Is that a common issue ?

---

<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:** [June 15, 2020, 3:07pm UTC](https://root-forum.cern.ch/t/rectangular-cut-cant-vary-discrete-variable/39920/2 "2020-06-15T15:07:00Z")

</div>

@moneta can probably help you
