TCut mycuts = "Dst_TRUEID==413";
TCut mycutb ="";
factory->AddSignalTree( signal,1.0);
factory->AddBackgroundTree( back, 1.0);
factory->PrepareTrainingAndTestTree(mycuts,mycutb,"nTrain_Signal=0:nTrain_Background=0:SplitMode=Block");
--- DataSetFactory : Splitmode is: "BLOCK" the mixmode is: "SAMEASSPLITMODE"
--- DataSetFactory : Create training and testing trees -- looping over class "Signal" ...
--- DataSetFactory : Weight expression for class 'Signal': ""
--- DataSetFactory : Create training and testing trees -- looping over class "Background" ...
--- DataSetFactory : Weight expression for class 'Background': ""
Error in <TTreeFormula::Compile>: Bad numerical expression : "Dst_TRUEID"
--- <FATAL> DataSetFactory : Expression Dst_TRUEID could not be resolved to a valid formula.
i.e. if the back tuple does not contain the variable which belongs to tuple signal and which I use to cut the tuple signal it crashed.
In my opinion they should be independent
I ran into the same bug. Please fix.
It is natural, there will be some vars missing in the background tree. My sample is background dominated, do I use real data as background and Mc as signal. Of course Mc truth variables are not in my bcg tree.