Try to play with this:
TH1 *h = ((TH1 *)(YourHStack->GetStack()->Last())); // the "SUM"
Int_t firstbin = h->FindFirstBinAbove(0);
Int_t lastbin = h->FindLastBinAbove(0);
TCanvas *c = new TCanvas("c", "THStack SUM");
h->Draw();
Try to play with this:
TH1 *h = ((TH1 *)(YourHStack->GetStack()->Last())); // the "SUM"
Int_t firstbin = h->FindFirstBinAbove(0);
Int_t lastbin = h->FindLastBinAbove(0);
TCanvas *c = new TCanvas("c", "THStack SUM");
h->Draw();