I figured this should be an easy problem but I can’t seem to find a solution for it.
I want to change the default input units of TH1F and TH2F to GeV instead of MeV. This includes MeV/c, MeV/c², MeV²/c⁴ etc.
How is this done?
new TH2F(“momentumVsMissingMassSquared”, 150,0,100000,150,-150000,150000); -> new TH2F(“momentumVsMissingMassSquared”,"",150,0,100,150,-0.150,0.150);
The goal is to get it in units of GeV on the axes when plotting. So I guess there’s that way of approaching the problem as well.
[url=https://root-forum.cern.ch/t/can-we-shift-histogram-for-several-channels/12050/2 we shift histogram for several channels?[/url]
That does indeed solve the problem with the axes. Thanks!
If there’s anyone with a clue on how to change the default units do tell.
You can also try with
Or instead, plot directly in the correct coordinates: