I’m trying to make a profile plot of the RMS values belonging to a function f, but I get both positive and negative values for what I assume is the RMS. What am I doing wrong?
f has both negative and positive values, and is distributet along w.
I essentially use the following to make the plot:
TProfile *plot = new TProfile((const char*)Pplot,"Profile plot",nbins,-5,5);
for(i = 0, i < max; i++){
chain->GetEntry(i);
plot->Fill(w->at(1), f->at(1));
}
Sorry if I was unclear. f-at(1) is not returning rms. It is returning the value of a function evaluated for event i. I need to plot the rms for each bin of the resulting distribution. Is there a standard way of doing this?
I looked through the reference guide. Should I do something like this (Really not sure about the syntax for getting RMS from an individual bin):
But now I don’t get any vertical error bars (see below), even when I try using the graphical Draw Panel.
So I’ll try to be as clear as I can. I need a profile plot of the rms of a distribution. The profile plot should show the rms with errors for each bin.