I’m wondering if this is possible: I have a few different histograms for different backgrounds and would like to plot something, say dE/dx, for each of the separate backgrounds.
I would like to do something like this (just an example with two backgrounds but obviously becomes more useful with more):
TH1F* dEdx_bg; dEdx_bg = new TH1F("dEdx_2212","",100,0,10); dEdx_bg = new TH1F("dEdx_321","",100,0,10); tree->Draw("TrackdEdx>>dEdx_+TMath::Abs(TrackPDG)");
However, I can’t seem to make this work. I’m wondering if root just can’t evaluate elements of the tree after the >>. Or, if this should work, what the correct syntax should be?