I am using
FitSlicesY to fit in each bin in a TH2D. And now I would like to get the fitting plots in each bin to check whether the fit is good. Does anyone know how to do it? This is a part of my code below!
Many thanks in advance!
hdp_p[lab] = tf[lab].Get( "Track/TrackResChecker/Long/vertex/dpoverp_vs_p") hdp_p[lab].SetName("dpoverp_p_" + lab) hmom[lab] = hdp_p[lab].ProjectionX() hmom[lab].SetTitle("p histo. " + lab) hdp_p[lab].FitSlicesY(0,0,-1,0,"")