Trending in Framework: Plotting with optional Error

Dear all,

At the moment, we are working with the general implementation of the Trendingtask QualityControl/Framework/src/TrendingTask.cxx. As an example, we try to plot the mean of an individual TPC Readout Chamber (ROC) versus time. This is already possible with the current version of the Trendingtask. However, we would like to assign the standard deviation of a ROC as an error of its mean and plot it vs. time.

Is it foreseen that the Trendingtask will have such a feature, that one can choose to assign custom errors for the plots?

Thank you very much in advance!

Cindy and Marcel

Dear Cindy and Marcel,

Do I understand correctly that you would like to add error bars on the trending plot ?

Barth + Piotr

Dear Barth and Piotr,

Yes, that’s exactly what we would like to do.

Cindy and Marcel

is this perhaps what you need?

Making a Profile histogram
In case of a 2-Dim expression, one can generate a TProfile histogram instead of a TH2F histogram by specifying option=prof or option=profs or option=profi or option=profg ; the trailing letter select the way the bin error are computed, See TProfile2D::SetErrorOption for details on the differences. The option=prof is automatically selected in case of y:x>>pf where pf is an existing TProfile histogram.

This is from the TTree::Draw documentation

Hi Barth, hi Piotr,

thank you very much for your replies. Concerning the answer from @pkonopka , we understood that the Draw() method of TTree can draw errors as an option, but are these errors calculated by the TTree itself from the values it contains? Or can these errors be given from a specific branch of said TTree?

Because we have a TTree with two branches obtained with a reductor. Let’s call them Branch_A and Branch_B. We would like to draw Branch_A versus time, and take Branch_B as an error on Branch_A. Similarly, like it is done with TGraphErrors, where x would be the time, y the values of Branch_A and the errors on y the values from Branch_B. Hopefully, this is a bit clearer now. =)


Yes, it is, thanks!

Actually I don’t know myself, I am not an expert in TTrees :wink: I was hoping that the feature which I found in the documentation applies to what you want to achieve, but I haven’t tried it myself.

If it is possible to do it with the existing features of TTree::Draw, it would be great. I can try to achieve something like that, but I must confess that I have some more pressing matters which I have to do first. Here is the ticket to track it, anyway. If you perhaps manage to do that first, then please let us know, so we can create an example for others.

If that requires an extension to TrendingTask and you think that feature would be broadly used, then we should to do that, but trying to keep the minimal interface as simple as possible, so it doesn’t grow into a monster. If that is not possible, then there is always a possibility to have a dedicated post-processing task for that.

Hello Piotr,

thank for your reply and for creating the ticket.
We will continue investigating on our side and tell you if we find something usable with the current framework.