Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRestDataSetOdds fix and some more #492

Merged
merged 3 commits into from
Nov 27, 2023
Merged

TRestDataSetOdds fix and some more #492

merged 3 commits into from
Nov 27, 2023

Conversation

AlvaroEzq
Copy link
Contributor

@AlvaroEzq AlvaroEzq commented Nov 20, 2023

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:

  • Redefine the columns involved in log odds computation to be casted to double.
  • Some debug messages are added within the ComputeLogOdds method. Also change a previous std::cout to RESTInfo.
  • Add getters and setters

@AlvaroEzq AlvaroEzq marked this pull request as ready for review November 20, 2023 18:46
@AlvaroEzq AlvaroEzq merged commit 5063d63 into master Nov 27, 2023
62 checks passed
@AlvaroEzq AlvaroEzq deleted the alvaroezq_oddsFix branch November 27, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants