_ROOT Version: 6.24.06
_Platform: centos7.6
Compiler: Not Provided
Hello everyone,
I am currently using the tmva framework to build a BDT.
I will explain in two parts : one version that works, another that does not.
Works :
To get my inputs for my BDT (signal and Background), i have a code that builds two trees => one for signal and one for Background.
The good thing here is that I only need to fill my trees with branches that have the same number of entries.
Therefore, I only needed to Fill my tree after the value of my variables were assigned to my branches
To simplify:
for loop
{
myvariable1 = myvalue1;
myvariable2 = myvalue2;
etc..
if (condition){treeSignal->Fill();}
else{treeBkg->Fill();}
}
With this configuration, the number of entries for all my variables is good for all my variables when I look at the “Input Variables” from the TMVAGui.
Does not work :
I am still building two trees however the different branches are not filled at the same time.
I know that this specific subject has already been covered and by doing this:
treeSignal->GetBranch("name_of_branch1")->Fill();
...//same with TreeBkg
treeSignal->GetBranch("name_of_branch2")->Fill();//with different number of entries
...
treeS->SetEntries(totalNumberofEntriesofAllBranches);
This actually works fine when i look at my trees, all the branches have the right amount of entries.
Now, this issue comes when I give these trees as inputs to my BDT.
TMVA takes “totalNumberofEntriesofAllBranches” as the number of entries for all variables while all htese varaibles don’t have the same number of entries. It gives this weird behavior where it fills the variable (having less number of entries) with a certain value until reaching the “totalNumberofEntriesofAllBranches” (see picture of the TMVAGui->Input Variables)
The peaks being the weird behavior that does not show when I look at this distribution in my tree
Has anyone ever encountered that behavior or am I mis-using the SetEntries in the case that it does not work.
Sorry for being this long, I hope I made it clear.
Thanks to anyone that reads all of this!
Paul