Hi,
I am (again) stuck on how to plot information from a single TTree with different cuts, without the second histogram overwriting the first. I want to read in a TTree, and plot a variable. I’d like to plot it without cuts, and then put a second histogram on the same plot, this time applying cuts to the other variables in the TTree. I am able to plot the first histogram successfully. However, when I add in the second, it overwrites the first, even though I have different histogram names. If I uncomment the second FNTuple->Draw() comment, then it fills in the first (‘gen’) histogram. How can I plot these two histograms on the same plot, without the two histograms interfering with each other.
I know that this has come up before, but I am cannot figure out how to search for it in the Forum.
Spencer
TH1F *gen = new TH1F("gen","",40,-8.0,8.0);
FNtuple->Draw("fsrap>>gen");
// Style command removed, to simplify
gen->Draw();
// current ALICE
// TH1F *alice = new TH1F("alice","",40,-8.0,8.0);
// FNtuple->Draw("fsrap>>alice","abs(p1prap)<4.0 && abs(p2prap)<4.0 && abs(p3prap)<4.0 && abs(p4prap)<4.0 && p1pt>0.1 && p2pt>0.1 && p3pt>0.1 && p4pt>>0.1");
// alice->Draw("same");