i followed this thread Get local maximum when using THStack
and added
printf("GlobalMaximum: %f\n",hs->GetMaximum());
TH1 *h = ((TH1*)(hs->GetStack()->Last()));
h->GetXaxis()->SetRangeUser(0,100000);
printf("LocalMaximum: %f\n",h->GetMaximum());
it works thanks