I am plotting comparison plot between data sideband and signal of MC for different variables. MC is having luminosity 36027.2/fb and data is having luminosity 35.9/fb. So, I need to normalise the luminosity of MC to data luminosity. Could you please tell me how to do it?
There is many operation you can do on histogram. See “Histogram operations”
here. Scaling is one of them.
I tried with scale, but the plot looks as before(without scaling). I am attaching the macro and plot. Please have a look on it.
Deepak Bvtxcl.cc (2.7 KB)
I cannot try your macro as I do not have the files it refers to. I see you are scaling an histogram. The plot before and after scaling should be different (the Y axis should not be the same). See the help here:
I don’t understand what is your problem (i.e. I don’t understand what you expect).
In your macro, you scale “h1” and “h2” histograms, then you draw them and the shown plot seems to be fine.
I’m a new user of both ROOT and RootTalk so please pardon my ignorance. I’ve been trying to normalize several histograms, and when I search in RootTalk, a multitude of ways comes up. How do I know which one is “right”? What is the difference between the following methods?
Here are the 4 methods I tried:
Double_t num = h->GetBinContent(i);
Double_t den = h->GetBinWidth(i);
Double_t value = 0;
value = num/den;
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.