Making multiple plots from a single histogram

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");

Try adding the option “goff” to FNtuple->Draw(“fsrap>>alice”...);.
https://root.cern/doc/master/classTTree.html#a73450649dc6e54b5b94516c468523e45

Instead of:
tree->Draw("varexp >> hname", ...);
use:
tree->Project("hname", "varexp", ...);

Thanks for this help. I tried ‘goff’ first since it was the first response, and it worked.

-Spencer