Module 040 had the wrong number of points, now has 4 more scan points. Improved the empty fit check.

This commit is contained in:
redford_s
2018-04-27 14:46:17 +02:00
parent 61b35385bb
commit 5a055ac7db

View File

@ -744,8 +744,10 @@ int main(int argc, char* argv[]) {
// filter out points at zero and points with 0 error (mean taken from one entry in hist)
int m_max = 0;
if (module_str == "032" || module_str == "040" || module_str == "044") {
if (module_str == "032" || module_str == "044") {
m_max = 27;
} else if (module_str == "040") {
m_max = 31;
} else if (module_str == "008") {
m_max = 35;
} else if (module_str == "006" || module_str == "022" || module_str == "065" || module_str == "069" || module_str == "079" || module_str == "068" || module_str == "088" || module_str == "055" || module_str == "059" || module_str == "094" || module_str == "066") {
@ -1282,20 +1284,20 @@ int main(int argc, char* argv[]) {
pave2->SetFillStyle(0);
pave2->SetTextSize(0.04);
pave2->SetTextAlign(32);
if (g0overg1hist->GetEntries() > 0) {
g0overg1hist->Fit("gaus");
g0overg1hist->Draw();
c1->Update();
TF1* g0overg1hist_gaus = g0overg1hist->GetFunction("gaus");
g0overg1hist->Fit("gaus");
g0overg1hist->Draw();
c1->Update();
TF1* g0overg1hist_gaus = g0overg1hist->GetFunction("gaus");
if (g0overg1hist_gaus) {
sprintf(savename,"Mean %0.4f #pm %0.4f", g0overg1hist_gaus->GetParameter(1), g0overg1hist_gaus->GetParError(1));
pave2->AddText((const char *)(savename));
sprintf(savename,"Sigma %0.4f #pm %0.4f", g0overg1hist_gaus->GetParameter(2), g0overg1hist_gaus->GetParError(2));
pave2->AddText((const char *)(savename));
pave2->Draw();
g0overg1hist->SetStats(kFALSE);
sprintf(savename,"plots/M%s/CurrentSource/g0overg1hist_fit_M%s.png", module_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
}
g0overg1hist->SetStats(kFALSE);
sprintf(savename,"plots/M%s/CurrentSource/g0overg1hist_fit_M%s.png", module_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
g0overg1erhist->GetXaxis()->SetTitle("G0 / G1 uncert");
g0overg1erhist->GetXaxis()->SetTitleOffset(1.1);