using namespace TMVA::Experimental; RSofieReader model("Higgs_trained_model.h5"); std::vector input = {0.1,0.2,0.3,0.4,0.5,0.6,0.7}; auto output = model.Compute(input); std::cout << "Event prediction = " << output[0] << std::endl; std::string inputFileName = "Higgs_data.root"; std::string inputFile = "http://root.cern.ch/files/" + inputFileName; ROOT::RDataFrame df1("sig_tree", inputFile); auto h1 = df1.Define("DNN_Values", Compute<7, float>(model), {"m_jj", "m_jjj", "m_lv", "m_jlv", "m_bb", "m_wbb", "m_wwbb"}) .Define("y","DNN_Values[0]") .Histo1D({"h_sig", "", 100, 0, 1}, "y"); ROOT::RDataFrame df2("bkg_tree", inputFile); auto h2 = df2.Define("DNN_Values", Compute<7, float>(model), {"m_jj", "m_jjj", "m_lv", "m_jlv", "m_bb", "m_wbb", "m_wwbb"}) .Define("y","DNN_Values[0]") .Histo1D({"h_bkg", "", 100, 0, 1}, "y"); h1->SetLineColor(kRed); h2->SetLineColor(kBlue); auto c1 = new TCanvas(); gStyle->SetOptStat(0); h2->DrawClone(); h1->DrawClone("SAME"); c1->BuildLegend();