Get local maximum when using THStack

Try to play with the histogram that you can get using:

TH1 *h = ((TH1*)(hs->GetStack()->Last())); // the "SUM"