using namespace TMVA::Experimental; void Belle_e_mva_apply(const char* inpfilename, const char* outfilename) { ROOT::RDataFrame df("variables", inpfilename); RReader e_id_model("/suphys/ahua8340/phd_analysis/belle_mva/tmva/Belle_e_tmva/weights/TMVAClassification_Belle_e_id.weights.xml"); auto e_id_vars = e_id_model.GetVariableNames(); auto df2 = df.Define("Bsig_belle_e_id_mva_out", Compute<7, float>(e_id_model), e_id_vars); df2.Snapshot("variables", outfilename); } int Belle_e_tmva_apply() { Belle_e_mva_apply("/import/wu1/ahua8340/phd/pi_tau_nu_MC/SLptn_e_mix_sig_train_belle.root", "/import/wu1/ahua8340/phd/pi_tau_nu_MC/SLptn_e_mix_sig_train_belle_app.root"); return 0; }