Creating a histogram in a loop

hello experts
i have a code for measuring CLs(confidene limit) and it difined a loop for calculating CLs vs r_steps! now i want to make a histogram which draw CLs according to r-steps. i want each bins of histogram display a value of CLs but i’m a new user of root and need help :frowning:
Limit.C (1.75 KB)

Limit.C (1.97 KB)

thank you very much. but would you please tell me the meaning of this part of defining your histogram? [(0.5 * r_step), ((0.5 + steps) * r_step)]

TH1::TH1(const char* name, const char* title, Int_t nbinsx, Double_t xlow, Double_t xup)

i’m really thankful. :slight_smile:

ROOT primer
ROOT documentation

I would try to measure confidence level (CLs) in my code and I want to calculate expected clsb(0),clsb(1) and clsb(-1) and make a multigraph for observe + expected cls in one graph. i wrote the code but it did not work. how can i correct it? could you please guide me?
Limit.C (2.9 KB)

I think the right forum to ask this question is the “Stat and Math Tool Support”.

I don’t really know what you want to achieve, but try the attached macro.
Limit.C (3.3 KB)