When using TLimit, one can add individual histograms as in the tutorial limit.C
Once can also add each histogram bin individully in a loop using
mynewdatasource1->AddChannel( sigHist[ i ], bgHist[ i ], datHist[ i ] );
where sigHist, bgHist, and dataHist are arrays of one cell histograms.
Is there an advantage to either method? What is the difference?
There is no difference on the result. Both methods should agree, but the first method is certainly more efficient in term of computing time, due to the way inputs are handled internally.
Also, it may be more difficult to track (correlated) systematics in the second case. But this is at the level of the user code, not internally in TLimit. So if you have a good reason to use the second way, I don’t see why to refrain you.
Thanks for the information. The code I inherited uses the second method so that different systematics can be applied to each bin.