Better labels.

This commit is contained in:
redford_s
2017-11-29 17:42:32 +01:00
parent 054e3cd28d
commit f5b67d4801
+23 -7
View File
@@ -172,13 +172,15 @@ int main(int argc, char* argv[]) {
proj_noise->Draw();
c1->Update();
proj_noise->GetXaxis()->SetTitle("Pedestal corrected ADC [ADU]");
fit->SetParNames("N photons", "Peak position", "Noise RMS");
proj_noise->GetXaxis()->SetRangeUser(-100,150);
fit->SetParNames("N_{#gamma}", "Peak pos", "Noise RMS");
TPaveStats *st0 = (TPaveStats*)proj_noise->FindObject("stats");
st0->SetX1NDC(0.6);
st0->SetX1NDC(0.53);
st0->SetX2NDC(0.94);
st0->SetY1NDC(0.75);
st0->SetY2NDC(0.94);
st0->SetBorderSize(0);
st0->SetTextSize(0.04);
sprintf(savename,"plots/M%s/CuFluo/%s/noise_%s_%d_%s_M%s.png", module_str.c_str(), gain_str.c_str(), pixel_type.c_str(), i, gain_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
@@ -186,12 +188,14 @@ int main(int argc, char* argv[]) {
fittedfun->Draw("same");
c1->Update();
proj_peak->GetXaxis()->SetTitle("Pedestal corrected ADC [ADU]");
fittedfun->SetParNames("p0", "p1", "Peak pos", "Noise RMS", "N_{#gamma}", "CS");
TPaveStats *st = (TPaveStats*)proj_peak->FindObject("stats");
st->SetX1NDC(0.22);
st->SetX2NDC(0.55);
st->SetY1NDC(0.55);
st->SetX2NDC(0.62);
st->SetY1NDC(0.7);
st->SetY2NDC(0.94);
st->SetBorderSize(0);
st->SetTextSize(0.04);
sprintf(savename,"plots/M%s/CuFluo/%s/peak_%s_%d_%s_M%s.png", module_str.c_str(), gain_str.c_str(), pixel_type.c_str(), i, gain_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
}
@@ -289,7 +293,8 @@ int main(int argc, char* argv[]) {
gain_fit_2d->GetYaxis()->SetTitle("Row");
gain_fit_2d->GetYaxis()->SetTitleOffset(0.7);
gain_fit_2d->Draw("colz");
pave->AddText("G0 [ADU/8 keV]");
sprintf(savename,"%s [ADU/8 keV]", gain_str.c_str());
pave->AddText((const char *)(savename));
pave->Draw();
gain_fit_2d->GetZaxis()->SetRangeUser(low_ADU_peak,high_ADU_peak);
sprintf(savename,"plots/M%s/CuFluo/%s/gain_fit_2d_%s_M%s.png",module_str.c_str(), gain_str.c_str(), gain_str.c_str(), module_str.c_str());
@@ -348,13 +353,23 @@ int main(int argc, char* argv[]) {
sprintf(savename,"plots/M%s/CuFluo/%s/noise_fit_poserr_%s_M%s.png",module_str.c_str(), gain_str.c_str(), gain_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
gain_fit->GetXaxis()->SetTitle("Gain G0 [ADU / 8 keV]");
sprintf(savename,"Gain %s [ADU / 8 keV]", gain_str.c_str());
gain_fit->GetXaxis()->SetTitle((const char *)(savename));
gain_fit->Draw();
sprintf(savename,"plots/M%s/CuFluo/%s/gain_fit_%s_M%s.png",module_str.c_str(), gain_str.c_str(), gain_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
gain_fit->GetXaxis()->SetRangeUser(low_ADU_peak+30, high_ADU_peak);
gain_fit->Fit("gaus");
gain_fit->Draw();
c1->Update();
TPaveStats *st1 = (TPaveStats*)gain_fit->FindObject("stats");
st1->SetX1NDC(0.6);
st1->SetX2NDC(0.94);
st1->SetY1NDC(0.75);
st1->SetY2NDC(0.94);
st1->SetBorderSize(0);
st1->SetTextSize(0.04);
sprintf(savename,"plots/M%s/CuFluo/%s/gain_fit_fit_%s_M%s.png",module_str.c_str(), gain_str.c_str(), gain_str.c_str(), module_str.c_str());
c1->SaveAs((const char *)(savename));
@@ -383,7 +398,8 @@ int main(int argc, char* argv[]) {
leg->AddEntry(gain_fit_isEdge, "Edge", "l");
leg->AddEntry(gain_fit_isInnerEdge, "Inner E", "l");
gain_fit_isDouble->GetXaxis()->SetTitle("Gain G0 [ADU / 8 keV]");
sprintf(savename,"Gain %s [ADU / 8 keV]", gain_str.c_str());
gain_fit_isDouble->GetXaxis()->SetTitle((const char *)(savename));
gain_fit_isDouble->GetYaxis()->SetTitle("Normalised");
gain_fit_isDouble->GetYaxis()->SetTitleOffset(1.3);
gain_fit_isDouble->SetMinimum(0.0);