# Error with TMVAClassificationApplication.C

**URL:** <https://root-forum.cern.ch/t/error-with-tmvaclassificationapplication-c/55391>\
**Category:** TMVA\
**Created:** [June 22, 2023, 6:53am UTC](https://root-forum.cern.ch/t/error-with-tmvaclassificationapplication-c/55391 "2023-06-22T06:53:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ampudia](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ampudia/32/32149_2.png) [@ampudia](https://root-forum.cern.ch/u/ampudia)\
**Post date:** [June 22, 2023, 6:53am UTC](https://root-forum.cern.ch/t/error-with-tmvaclassificationapplication-c/55391/1 "2023-06-22T06:53:20Z")

</div>

Hi,

I am trying to do the TMVA tutorial (specifically using a BDT) using a root file of mine. TMVAClassification.C is working well with both the example file, tmva\_class\_example.root, and mine, outputTrees.root (for convenience, I named the branches so that they would match the ones in the example file). However, TMVAClassificationApplication.C only works properly with the example root file. When I run it with my file, it reads the leaves for all of the events as the same value (and it is a weird value that I am not sure where it is getting it from), and therefore the result from the BDT is the same for all of the events, which is not what we expect. Here I attach the screenshots of the output I get from the TMVAClassificationApplication.C with both files, as well as the code and the files.

Does anyone know what the error might be? The code seems to be fine as it is working properly with the example root file, and my root file, when opened by itself, also looks fine (the leaves for different events have different values). Any help would be really appreciated.

Thank you very much,  
Santiago Ampudia

 ![outputWithExampleRootFile](https://root-forum.cern.ch/uploads/default/original/3X/6/b/6b8af92451b85c68c3d930373da6c85cd800bbf0.png)  
 ![outputWithMyRootFile](https://root-forum.cern.ch/uploads/default/original/3X/f/6/f6caaa59d12b1bfb8f4d0f9ef1ab4b08d8ba8d89.png)  
[tmva\_class\_example.root](https://root-forum.cern.ch/uploads/short-url/aWm2XgIFA3zCyT6rGZGHLcSAGaa.root) (201.9 KB)  
[outputTrees.root](https://root-forum.cern.ch/uploads/short-url/7m06CbBjtIKazUFnLpnuZZh2Did.root) (222.0 KB)  
[TMVAClassification.C](https://root-forum.cern.ch/uploads/short-url/pqpfQHAU0I4ZiAsN6iFoY7pcZXK.C) (27.5 KB)  
[TMVAClassificationApplication.C](https://root-forum.cern.ch/uploads/short-url/m1n3Op0x55K99WzTKsCFU2eIrws.C) (22.3 KB)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [June 22, 2023, 6:54am UTC](https://root-forum.cern.ch/t/error-with-tmvaclassificationapplication-c/55391/2 "2023-06-22T06:54:06Z")

</div>

I think @moneta can help you.
