TMVA branch names containing a '.'

Dear TMVA experts,
when you have a branch with multiple leaves (like a/F:b/I:c/O) and you train brname.b then in the resulting TestTree and TrainTree there will be a branch with a dot in the name (in formulas, other symbols get replaced, for example "+" becomes "_P_"). Shouldn’t the function TMVA::Tools::ReplaceRegularExpressions also replace the dot? Considering the name it definitely should replace it. Should the '.' even be in fRegexp?

See tmva/tmva/src/Tools.cxx, lines ~ 820 (and fRegexp is set in the constructor, line ~ 104).

Or is there a reason to keep the dot? It is very annoying to have a special character in a branch name!

Can I patch this without causing problems elsewhere?

Hi,

Thanks for pointing this out. I’ll bring it up on the next TMVA dev meeting to determine what the intended behaviour is.

Just to make sure that I understand the situation: When you have multiple leaves in the input branch the output will be flattened. So an input of

- branch
    * leaf1
    * leaf2

will be copied to the output TrainTree and TestTree as

- branch.leaf1
- branch.leaf2

Is this correct?

Yes, correct!

struct X { Float_t a,b; } x;
tree->Branch("X", &x, "a:b");
...
dataset->AddVariable("X.a");
dataset->AddVariable("X.b");
dataset->AddVariable("X.a + X.b");
...
TestTree->Print();
// *Br    1 :X.a : X.a/F                                  *
// ...
// *Br    2 :X.b : X.b/F                                  *
// ...
// *Br    3 :X.a_P_X.b : X.a_P_X.b/F                      *
// ...

In formulas (like Br 3) you can even have multiple dots in a branch name.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.