Hi,
I am using the following macro:
void Esc_Etrue_vs_no_xtals_tot()
{
make_plots(“uncorrESC_Etrue_tot”);
}
void make_plots(TString histname)
{
TFile f1 = TFile::Open(“Mean_Pt5_100.root”);
h1 = (TH2F)f1->Get(histname);
TCanvas* c1 = new TCanvas(“c1”, “c1”);
h1->Draw();
h1->FitSlicesY(0, 1, 100, 0, “G2”);
TH1F* G_mean_tot = (TH1F*)gDirectory->Get(histname+“1");
TCanvas * c2 = new TCanvas(“c2”, “c2”);
G_mean_tot->Draw();
c2->Print("Mean”+histname+".gif");
}
When I draw h1 it is obvious that most of the points in the TH2F lie below 1. However, when I plot the Mean from the FitSlices it can sometimes be 5 orders of magnetude too high!! I am inculding both the plots that are produced by this macro. I think that setting a range in Y to fit over would help but I am not quite sue how to do this.
Thanks for your help, Claire