[TMVA] tune cuts in categories question

Dear ROOT and TMVA experts,

I am wondering whether I could use TMVA to train a classifier
which uses cuts in categories.

There are 2 levels of this problem:

1st level (the simple one).
Suppose that you want to tune the same cuts, but in different
regions of the phase space (e.g. barrel-endcaps configuration)

I suppose that you could define
myVar1New := (abs(eta)<2.0)*myVar1
but is there a better way?

2nd level (more involved)
Suppose that some variables are used only in classification and
some others only to cut on and we want to tune both category boundaries
and cut-values. (e.g. electron Identification in CMS, ATLAS cut-based electron veto)

For example assume 2 variables var1, var2.
and say that the classifier is such that

if (var1 > X1) then if (var2 < X2) return true
if (var1 < X1) then if (var2 < X3) return true
else return false

and we want to optimize X1, X2, X3.
Is there any easy way to do that in TMVA?

In general, is there a way to define through TFormula a discriminant
function with free parameters and use TMVA to tune them?

Thank you very much for your time.

Kind Regards,

Nikos