Hi I have a million entries in a TBranch and the value for each entry ranges from -2.5 to 2.5. I need to cut another set of data using these entries. Is there any way to turn take the absolute value of all the entries in the TBranch? This is the code I’ve been trying to have work:
TTree * tree = (TTree*)file->Get("T_mv");
//find the branch with the data we need in the tree and set the limits
RooRealVar jpsi("Jpsi_mass", "Mass of Jpsi", 2900, 3300);
RooRealVar eta1("Muon1_eta","Muon 1's eta", -2.5, 2.5);
RooRealVar eta2("Muona2_eta","Muon 2's eta", -2.5, 2.5);
RooDataSet data("data", "Jpsi data set", tree,RooArgSet(jpsi, abs(eta1), abs(eta2)));
I’ve tried using RooAbsReal to eta1, RooAbsRealLValue to eta1. I just don’t quite know what to do here. I’ve made a separate file where I plot the values for eta1 and keep trying to find a way to turn all my negative values positive but for the time being I’ve had no success. Any help would be really appreciated. Thanks!
ROOT Version: 6.14
RooFit Version: 3.60
Platform: Windows
Compiler: mobatek