TH1 Scaling with errors

I want to work out a subtraction of two histograms of the form:
I can perform this with TH1::Add and that I should use TH1::Sumw2 to calculate histogram bin errors before scaling or addition.
However my factor c1 has an error itself I wish to include.
Do either of TH1::Scale or TH1::Add include this functionality? (As far as I can tell they do not)
Is there already a way of doing this or is the best option to set the bin errors manually?
James S

Hi James,

Here is a suggestion. You could create a new histogram with bin contents set to the value of your constant and its bin errors set to the constant’s error. I think you can then use the TH1::Multiply(TH1*) method to properly propagate the errors.

Otherwise, you can just brute force write the error propagation routine that computes the result for each bin.

Hope that helps.

Thanks for the suggestion.
Worked nicely than doing it entirely manually.
James S