TMVA vextor data immport

in my tree, there is 3 vector leaves: vextorx; vextory; vextorz; which means the detecor hit information of tracks of a singal event.

I want to train them by TMVA. How can I import the vector to TMVAfactory?

Thank you very much!

The TMVA manual does not give the answer ?

[quote=“couet”]The TMVA manual does not give the answer ?[/quote]

I saw the manual, but I cannot know whether I can import a vector variable by “AddVariable()”. In fact, I can use TMVA without problem when I import non-vector variable, but when I import vector variable, the TMVA didn’t work properly.

For detail:
when I fill root tree, I use:
vector x[n] = 0;
for(int i = 0; i<n ; i++){
x[i] = var;
Tree -> Fill();

                  when I import the vactor variable:
                  factory->AddVariable( "x", "Variable 1", "units", 'D' );

May be we cannot improt vector variable into TMVA?


The AddVariable() expects a single variable as input. So you would need to explicitly set these.