Need Help with Overlaying histograms from one root file

I have produced various histograms and I am trying to overlay several histograms from a root file. I’ve written something up based off of things I’ve seen on here and a very simple code I already had. I have 7 root files and in each of these there are 3 histograms that I want to overlay in the same canvas or section of the canvas. So I tried to divide the canvas into various parts and have the histograms plotted in these sections but it’s not working. I’m a baby to root, so I’m not sure what I’m doing wrong. Oh and I also get an error when I run in root that says String literal syntax error polplotoverlay.C:48. Any suggestions or help on this would be greatly appreciated.

Thanks
polplotoverlay.C (6.04 KB)

Hi,

Line 48 is dE_ele->GetXaxis()->SetTitle("Energy(MeV)(electrons));which is indeed missing a quote before the last paranthesis.

Cheers,
Philippe.