TH1D* plotProjection(TH2* h) { h->FitSlicesY(0,0,-1,0,"QNRSG3"); TString hname=h->GetName(); hname+="_2"; TH1D *h_2 = (TH1D*)gDirectory->Get(hname.Data()); return h_2; }