THStack dividing and rebinning

Is there a way to divide two THstack histograms ? and after that rebin them ? I used methods for a TH1F but those do not work. I am assuming because it is a different class we have to implement methods specific for THStack but I don’t see any methods online ? Any help is appreciated

You can access the histograms in the THStack and operate on them directly - is that good enough?

like divide the histograms and then store them in a THStack ?
Because what I want to try to do is merge two histograms together with THStack and then divide it by another histogram and define a new histogram as the dividing version of those two histograms do you get me ?

You can retrieve a pointer to the “sum of all”:
TH1 *last = (TH1*)your_stack->GetStack()->Last();

Are you saying here to create a histogram called “last” of TH1 that is filled with the THStack histogram that I have ? @Wile_E_Coyote

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.