void CreateFriendTrees(TString scriptDirectory = ""){ TString selectorName = scriptDirectory; selectorName+="omega2pi_selector.C"; cout << "=====================================================" << endl; cout << "======== Processing Signal Tree ========" << endl; cout << "=====================================================" << endl; TFile *signalFile = new TFile("tree_omega2pi.root"); TTree *signalTree = signalFile->Get("omega2pi_Tree"); signalTree->Process(selectorName, "Signal"); cout << "=====================================================" << endl; cout << "======== Processing Background Tree ========" << endl; cout << "=====================================================" << endl; TFile *backgroundFile = new TFile("tree_omega2pi_background.root"); TTree *backgroundTree = backgroundFile->Get("omega2piBackground_Tree"); backgroundTree->Process(selectorName, "Background"); }