I’m trying to now apply and save the results of my trained MVA to my ntuples and am currently trying to test this with the current training file. I seem to be running into some sort of issue due to TTreeReaderValueBase::CreateProxy() not being able to read a specific branch which is formatted as a double. Is there a solution to this? I’ve attached the code for both the MVA and application and there is a link to the example ntuple in google drive.
Edit: The code in question which causes the error is the Belle_e_tmva_apply.C
Error in <TTreeReaderValueBase::CreateProxy()>: The branch weMissM2__boY4ScleanMask__cm__sp0__bc contains data of type double. It cannot be accessed by a TTreeReaderValue<float>
terminate called after throwing an instance of 'std::runtime_error'
what(): An error was encountered while processing the data. TTreeReader status code is: 6
ROOT Version: 6.32.00 Platform: Linux Red Hat Enterprise Linux 9 v9.6 Compiler: g++ (GCC) 14.2.0
Changing the variable type within the code creating the MVAs does not appear to solve the problem unless I have done so wrong. I take it that changing to ‘D’ should be the correct input for setting as a double?
The error persists for both where only my “weMissM2__boY4ScleanMask__cm__sp0__bc” variable is set as a double or even with all the variables set as doubles (checking the data types of the variables, they are all doubles).
The code in question which raises the error is the Belle_e_tmva_apply.C and I’ve attached a version of the xml weight file to the google drive (the weight file was made with the variable set with float typing).
Maybe the problem is TMVA::Experimental::Compute<7, float>(e_id_model) which should be changed to double, but then there is a TMVA function that does not support this.
So I guess the workaround is to copy your TTree to one with all variables as float?