Limiting range of input variables in Multiclass

ROOT version: 6.10/09
platform: LxPlus

I am trying to limit the range of a certain input variable so that it is not used when the value is outside of this range. I can’t add it as a cut on TCut because I dont read this variable from the trees. I have tried to use the “min” and “max” values on AddVariable as shown in:
Like this:
dataloader->AddVariable("jet1_qgl:=("+Jet1_qgl+">=0)*("+Jet1_qgl+"+1)-1", 'F', 0.0, 1.0);
However this doesnt have any effect, and the variable has several values of (-1), outside of the (0,1) range.
Am I doing something wrong? Is there a different way of achieving this?
Thanks in advance

If I remember correctly, you have to load the variable yourself, as cuts only work during the training phase.

I invite @moneta, @kialbert or @sitong to confirm.


Is it possbile to use


TString cut = "((Jet1_qgl>=0)*(Jet1_qgl+1)-1)>0 && ((Jet1_qgl>=0)*(Jet1_qgl+1)-1)<1";
dataloader->PrepareTrainingAndTestSet(cut, ...);