polarizedReducedDeconvFisher.C (4.2 KB)
polarizedReducedDeconvFisherFishy.txt (56.4 KB)
The signal and background trees used in the attached script contain two branches with the same structure. These two branches contain leaves which are length two arrays. I treat the two indices of the leaves as individual variables. Running this script, it appears that everything behaves as normal. However, as a test, I added two more variables “deconvWaveformCuts.fishy” and “deconvWaveformCuts.fishy”. There is no such leaf in these branches, yet macro still runs and the variables have ranking which isn’t at the bottom, as seen in the attached output. What is going on here? Some sort of address confusion I imagine, since the testing/training data histograms of the “fishy” variables looks similar to those from the “deconvWaveformCuts.analyticCorrPeakZScore”.
The TMVA data reading is currently backed by TTreeFormula which supports that syntax for accessing array elements. To my knowledge however it does not do any bounds checking; So it’s up to the user to ensure that
- The variable is indeed an array
- The index is not out of range
Thank you for the response. Attached is the script below in which I make the TTree which “polarizedReducedDeconvFisher.C” above references from. Any recommendations as how to satisfy bound checking with the two points you mention in “polarizedReducedDeconvFisher.C”? Is it necessary to flatten beforehand the TTrees used by “polarizedReducedDeconvFisher.C”?
doCutFileA4.C (34.0 KB)
As far as I can tell, the index on the array should not be out of range. The tree I make in “doCutFileA4.C” has length 2 arrays. In “polarizedReducedDeconvFisher.C”, I attempt to open the file made in “doCutFileA4.C” and read each element in an array as a variable to train against. I think the problem would be in “polarizedReducedDeconvFisher.C”. Is there a bound check which I need to apply to “polarizedReducedDeconvFishter.C”?
I don’t think I understand the problem that you are experiencing. So, TMVA ensures that as long as the branches exists and are arrays you are fed the correct data if you use indices that are in range.
If any of these assumptions do not hold you are given “some” data from memory and, unfortunately, no warning. (This is something that we are working on to improve in an upcoming release of ROOT )