After writing output from a TMVA::Factory to a binary file, I can look at “className” under “TrainTree” and “TestTree” to determine which events in training and testing were used as signal or background. What I would like to know is if there is a way to write under these TTrees either an integer index or character string to indicate which TTree or TChain an event originates from when it is added to a TMVA::DataLoader object through AddSignalTree() or AddBackroundTree()?
I think this can be readily done in the multiclass case using the “className” argument under the function AddTree(), but I don’t think that function can be used with binary classification?
I was thinking I might be able to do it somehow using TMVA::DataLoader::AddSpectator() somehow, but I’m not so sure.
Having assigned a unique weight to each TTree or TChain when calling AddSignalTree() and AddBackgroundTree(), I might be able to refer to values of “weight” under “TrainTree” and “TestTree”. But those weights would have to be recalculated to be referenced this way, and recalculating them requires access to the initial TTrees and TChains. I would like to be able to be able to just refer to TrainTree and TestTree and know where an event originates from without having to refer back to the initial signal and background trees that were added to the DataLoader.