rest-for-physics / framework

The main project containing the core C++ classes defining framework behaviour and primordial analysis and helper tools. It centralises all other rest-for-physics repositories through submodules.
GNU General Public License v3.0
19 stars 11 forks source link

TRestDataSetOdds fix and some more #492

Closed AlvaroEzq closed 11 months ago

AlvaroEzq commented 1 year ago

AlvaroEzq Ok: 54 Powered by Pull Request Badge

This PR is meant to solve a problem when computing log odds for columns of the dataset with int values. This problem happens because the lambda function GetLogOdds requires the double val parameter, which causes the TTreeReader to read the corresponding column as it was a double, thus causing error when the branch is not double type. To solve this in a simple way, the RDataFrame columns (of the selected observables to compute the log odds) that are not double types are Redefine with a static_cast to double. This solves the issue with simple types such as int (which is a common case).

Also some minor additions (see list below).

The changes are: